I agree wholeheartedly of doing something that you believe is valuable.
The process of figuring out what's valuable is different from person to person. Some people know from a young age. Others figure it out in college or post-education. My values have been shaped and refined over the course of high school, college, and work. The high level picture may not be clear, but I believe it's beneficial to hone in on what you find valuable and see where it takes you.
Anyone familiar with Breaking Bad? Walter White goes under the alias of Heisenberg. When he’s Walter, he’s anxious and fearful. It’s such a contrast compared to the calm, calculated Heisenberg.
The writers did a phenomenal job of using an alter ego to slowly change the character from Mr. Chips to Scarface.
When I worked at Amazon, our team decided to have a theme for each sprint consisting of breakfast items.
Product launches & demos were small celebrations at the end of the sprint. So one sprint was Croissant Week, another may be Donut Week, and the scrum master would be responsible for bringing in breakfast at Demo Day.
We'd get breakfast from a local bakery or cafe, and because our team was 10-12 people, there wasn't a need for a large delivery.
100% agree that in object-oriented programming, only the object itself should care about its internal state. The object should know about its behaviors and what state changes are actually valid.
In Java, many projects overuse getters and setters. Getters and setters break encapsulation. More so public setters since they allow any piece of code anywhere can change the value of an object's internal state at any time.
Consider a class Person. A person has a name, SSN, salary. Let's assume name and SSN cannot be changed. What about salary? We don't have to add a setSalary() method. Instead, we should have something like: public void acceptNewJob(Job newJob) { salary = newJob.getSalary(); }
This is one more layer of abstraction that was unneeded. In your example you went through all the trouble to get the same result. Where as there is no notion of a Job inside the person encapsulation (since you don't set a job field ). It's just the salary the object cares about. So why pass in a Job. It so confusing for the reader.
That example is correct, because in OOP you should not simply change state/value inside other object, because you pretty much end up with anemic domain model where classes are just structs and code that modify it is not part of the class. What parent meant was that you call "accept new job" on person object and then use this object instead of just setting the salary. Maybe it was oversimplified, though.
„[...] in OOP you should not simply change state/value inside other object, because you pretty much end up with anemic domain model where classes are just structs and code that modify it is not part of the class.“
Yep, and that’s pretty much the simplest and most modular design for that problem.
This is one of the cases where OOP(whether using methods or messages) leads to more coupling and less flexibility.
I know what the parent meant. Your explanation now directly contradicts what the code does because even with the Job method you are directly setting salary except now it's a more circuitous way for the sake of abstraction. The person class has no notion of a Job.
What you are referring to our container classes which exist solely to hold members. This is not that case. The setting of salary is one of many behaviors offered by the class.
Thinking of interfaces as state machines can be valuable.
An area that I think about a lot is how effective are companies at spreading useful information to the people who can best utilize that information. Internal tools are interfaces to information. Wikis, mailing lists, code repositories, Q&A boards, chat rooms are all different interfaces that I commonly search through for useful bits. A formal spec would help us quantify how effective our company is at spreading information. What information is commonly rewritten, what pages are hard to get to, which internal tool does a page of documentation belong to, etc.
I love SequelPro but I've been thinking about switching to TablePlus from SequelPro for quite some time since SequelPro isn't available on Windows / Linux.
Do you know how TablePlus clients compare on Windows and Mac? Been wondering since they're both built natively instead of using cross platform development like Electron.
I also use Things and Quiver (note taking) for 2 weeks now and it has grown on me.
I use to write creative thoughts in a text document or Notes on iOS. I never revisited these notes. The most important thing is having a dedicated system that you revisit daily to revise and refine the ideas / tasks.
That meant that the system I used needed to meet these criteria:
1. Accessability: I do my planning throughout the day, in bed, on the train, at work, etc. A physical notebook doesn’t work for me because there was too much friction in getting a notebook and pen out while in bed or on the subway.
2. Synchronization: Working on Mac / iOS. Thorough notes are taken on a laptop while on-the-go notes are needed for quick scribbles.
3. Indexing: Having a proper file system to organize and categorize thoughts. I’ve found that Things works good enough for 90% of notes. For other uses, I supplement it with Quiver for code related notes or food recipes.
4. Thoroughness: Having ability to write quick one-line notes or in-depth notes that sufficiently captures my thought is important.
The process of figuring out what's valuable is different from person to person. Some people know from a young age. Others figure it out in college or post-education. My values have been shaped and refined over the course of high school, college, and work. The high level picture may not be clear, but I believe it's beneficial to hone in on what you find valuable and see where it takes you.