Hacker Newsnew | past | comments | ask | show | jobs | submit | unifyjs's commentslogin

What is your preferred programming style, are you more comfortable with an object oriented or functional approach?

Vue is entirely "class based" and matches more closely with an object oriented style. It is heavily based on the mobX (previously knockout.js) approach to reactive properties on objects.

React, at least the more recent iterations, works best using function components with hooks and adheres to more of a functional programming paradigm (though you can still use class based components, these are no longer what the react team recommend).

After many years of playing with both React and Vue, I personally much prefer a functional approach and prefer React. The "top down" data flow is much more predictable and easier to debug than having derived properties that are dependent on other derived properties that are dependent on other derived properties (etc... you get the idea).


Here's the key - find a physically strenuous activity that you actually enjoy. It does not have to be working out at the gym, there are lots of other activities that will work, but the trick is to find one that you enjoy and actually want to go back and do (for the rest of your life! Your health never stops requiring attention, nor does it take holidays).


Please don't attempt to disable the back button! If someone is leaving your site, they're going to leave. Trying to stop them will simply guarantee they'll never come back.


Doesn't Molly get literally sick from being so absolutely negative all the time?


Be ready for the opportunity. Get experience with the alternatives. Study event based architectures like the "Kappa Approach" (great presentation - https://www.youtube.com/watch?v=0cJ565r2FVI), install Apache Kafka and build something with it.

The world is slowly coming around to a better way. There are definitely jobs out there, mostly in the start up world, but even enterprise is making a shift, too.

I spent many years building many iterations of an event based platform as a side project (the most recent is https://unifyjs.io/) and am now living the dream - working part time as Head of Technology for a funded startup building an event based platform using Apache Kafka. The opportunity materialised and I was ready for it.

You are a kindred spirit! Don't lose faith, there are better ways than CRUD, and we're getting there slowly!


First up - don't take the harsh tone of some commenters to heart. It can be difficult for people to put themselves in your shoes!

As a 44 year old single male with very average looks who beat (smashed the sh!t out of) stage 4 bowel cancer about 4 years ago, I can somewhat identify with what you are going through. Perhaps the main difference between you and I is that I f^%$ing love life.

Some thoughts / ideas that you may find helpful:

- How much alcohol do you drink? If the answer is anywhere near "a lot", stop that right now. I decided to do Dry July in support of the Australian Cancer Council, and it's remarkable the thoughts and emotions you are forced to deal with when you can't drown them with booze. After 12 days, the mental clarity and energy I have is simply amazing.

- Try to stop focusing on money. You do not need to earn $500k per year to be happy, let alone find someone else that does, too! I could be doing government contracts and earning similar amounts (also, I quit my job at Microsoft in Redmond about 5 years ago), but instead I choose to work a 4 day week for a funded "startup" where the work is so much more creative and meaningful. I really look forward to going to work now!

- Related to above, start (or focus more) on personal projects that stimulate your creative, intellectual mind. Rediscover the joy of learning.

- Your children are a blessing even if they are hard work sometimes - try to rediscover the joy there (disclaimer: I do not have kids of my own but really enjoy spending time with friend's children of all ages).

- Exercise. This is really important! Find an activity that you enjoy - it doesn't have to be hitting the gym, just something that raises your heart rate - and do it several times a week. Not only will this make you more attractive to women, it will stimulate your body into producing more of the hormones that make you happier. You never know, you might just meet your wife at said activity.

If you can find contentment in yourself again, finding a wife becomes secondary to simply enjoying life.

Finally - if you struggle with the internal mental and emotional side of things (it seems clear that you do?), you need to fix this. Psychotherapy is not just for crazy people! I do not condone the use of illicit substances, but the fastest and easiest way to rewire your brain is through psychedelics such as psilocybin and LSD. If you are in doubt, I highly recommend watching "Fantastic Fungi" on Netflix. It will blow your mind!

HTH!


This seems pretty standard practice. Enter an email address anywhere on the web and the recipient takes that to mean "I like having my time wasted, please send me spam".


My initial gut reaction to this was "%$#@ no!", but there are some well reasoned answers here from both camps. The overriding takeaway here is "there is a happy middle ground".

Personally, I have often found that once you try to scale complexity much past the canonical "Student is-a Person" example, it's extremely difficult to avoid violating SOLID principles, and things turn to a big ball of mud pretty quickly.

This is mostly due to inheritance being way overused. Even the initial creators of OOP stated "prefer composition over inheritance" [1], but this seems to get forgotten more often than not. Couple this with Javascript's well known issues with the "this" keyword, and you've got a recipe for disaster.

I avoid the OOP "pillar" of Javascript [2] for these reasons, plus the fact it just isn't required - I never wonder whether the caller has messed with "this", never need to use "bind", etc. etc. "Scoping by function" is a concept I'll blog about sometime soon.

[1] - https://en.wikipedia.org/wiki/Composition_over_inheritance [2] - https://medium.com/javascript-scene/the-two-pillars-of-javas...


Yep, guessing mostly bots doing indexing / aggregation. Every publish triggers somewhere around 30-40 downloads.


I'm not sure what you're implying here. Are you drawing an analogy between the concepts discussed in the article to cleaning dust with a power washer?


I am saying both have their places, some apps would be a way over kill to implement event based system instead of simple crud. I found it out first hand in redux. When I had to first define an event, define a listener, define event trigger function... 3x boilerplate already, then find special tooling to keep track and debug of N^n events firing, then literally read every event listener code to figure total sequence of events occurring if user clicks something vs sequential code in the same file. I found redux wasn't worth it. Pub/sub systems have a place but it's not where MVC model fits.


The tooling has improved immensely. Unify (https://unifyjs.io/docs) aims to be a complete state management solution, avoiding the need for client side state management frameworks like redux. It abstracts away all of that boilerplate code.

Thinking about systems in terms of events is a pretty big shift in thinking but worth learning to add to the tool kit!


They were trying to sound intelligent, alas, it didn't pan out so well.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: