TIL, 2017-06-27
- AR Stateful enum querying both:
Match.where(status: [Matches::Statuses::HELLO, Matches::Statuses::HI])
. - Debugging: Please check the thing first :(.
- If
a
is not defined,a || a = 42
raisesNameError
, whilea ||= 42
returns 42. thread_mattr_accessor
, you can use this if you want to share state in a single thread. Not sure if it is good though (global state). I imagine this would be useful for config stuff? (This usesThread.current
andPerThreadRegistry
internally).Reference
Wildbit, Good Developer
- Good developer: Cares about the quality of the code and works hard to maintain it. Bad developer: Creates technical debt by sacrificing quality to meet a delivery deadline.
- Good developer: Tests their own code instead of relying on QA to find every bug. They value the safety and self-documenting properties of automated tests. Bad developer: doesn’t document their work. They don’t ask for code reviews and no interest in reviewing other people’s code.
- Good developer: Knows when they should include others during a project. Bad developer: sits on their hands after running out of tasks or hitting a roadblock.
- Good developer: Keeps the user in mind when building features, and think about the future to see the patterns of issues their systems and customers could encounter. Bad developer: Does not take ownership for the entire product and bugs. They make sure everyone knows exactly who was responsible when a bug was created by someone else.
- Good developer: Eager to learn new things. They strive to understand how all the pieces of the architecture work together and what state they are in. A bad developer is attached to their favorite technology.
- Good developer: builds for project performance (memory, storage, I/O, network). Bad developer: complains about the limitation of their resources.
- Good developer: assumes that what exists was designed with thought or prior reasoning in mind. Bad developer: assumes the previous author was an idiot, and aims to change things instead of understanding history..