timemachine
Joined 11 years ago
Joined 11 years ago
I would remind everyone at family gatherings that I was collecting them if they didn’t need them and quickly had about 15 I could use.
This style of application development benefits from an object-oriented language. Where an object encapsulates the domain logic of business rules. This can be accomplished in Go with structs and funcs.
Classes in Java make good domain models because of (overbearing) enforcement of file structure (object creation validation rules in the constructor, limit access to properties to getter/setter methods that can verify inputs before mutation, yadda yadda). In domain models, neatness and organization counts a lot for the long-term health of the code.
My opinion is that Go is well suited to the task of creating autonomous worker applications that enforce business logic rules for domain objects with well-defined borders. If your domain objects have overlapping concerns or you have actors/business rules that need access to more than one domain object for calculation/mutation you would be wise to think carefully about the application structure before selecting Go as your language.
While a sleek looking use case on the surface, mounting the PI as a fake, non-standards compliant, mass storage device is just a hack.
For example the first recipe will not work as expected with out a multi-column unique index (specifically the MySql example).
I feel that the preexisting knowledge required for such examples does not align with the stated target audience for the book.
Also ‘find’ing and ‘filter’ing arrays is more error prone (like not properly handling a miss on a find).
I don’t completely agree with the author, but the idea that more care needs taken when dealing with arrays is worth considering.
Arrays will always have important uses. Tuples, enumerations, and the like. However, ‘n’ database records shoved into an array and then iterated over in a for-loop is a cumbersome way to structure a program.
That’s my take on it.
I’ve both used strategies on many different projects. Regardless of the development strategy I’ve seen nasty merge parties. The way to avoid those merges is to reduce your batch size and keep your un-integrated changes to a narrow scope.
If you need to make changes out side of that scope. Stash your work; create a new branch; make the change; let your teammates know what you did; before going back to your other branch. You can then integrate that fix back to your local copy. But the important thing is that your team mates can also sync that one off change to their local copy too.
The worse thing is when two developers find the same bug and fix it simultaneously in different commits. Trunk-based and GitFlow both have this problem. Stick to the scope of work that was coordinated in your standup meeting for the day and let your coworkers know if you need to go outside of that scope. Be conscientious.
(Complete aside: Try to do trunk based development in a Perforce code base and you will learn a lot about reducing your the batch size of your commits and communicating the scope of code changes. Perforce requires you to be team oriented when developing)