by pdubroy on 2/6/25, 2:44 PM with 39 comments
by NotAnOtter on 2/7/25, 5:29 PM
Analogies should "simplify" not complicate. If you're ever writing an analogy and think "How can I add more meat to this? You know, enough to make it worth sharing in a blog post?" you're on the wrong path.
by disambiguation on 2/7/25, 5:55 PM
I think scrappy and mcguyver could be the same hat.
I also think chef here is really craftsman, whereas chef makes me think of cooking, as in playful discovery, which is worth its own hat.
As someone else mentioned, war time / emergency this is not a drill hat deserves a spot on the shelf.
by gorjusborg on 2/7/25, 6:38 PM
Coding using only exacting, mechanical transformations that can be reasoned to be safe. Used when coding in poorly understood, mission-critical code bases. You do the bare minimum change to get the result, using verifiably safe operations.
by Blackarea on 2/7/25, 4:43 PM
by pdimitar on 2/7/25, 11:50 PM
I'd simplify this to "commercial hat" and "hobbyist hat", more or less, but there's another axis entirely and that's the hat OP kind of looks down on, namely "chef's hat".
Because making code readable and maintainable also makes it suitable for teaching and onboarding juniors -- or any other teammate really.
As a guy with 23 years in the profession I started getting sick of myself being a hobbyist at times so I just do whatever is needed for a code to work BUT I don't keep it together with spit and 5-year old duct tape; I also give it some of the "chef's hat" treatment. How much of the "chef" touch do you give it determines the readability and maintainability. And whether you or your employer care about those, well, this is where actual real-world nuance and spectrum come into play.
by stevage on 2/8/25, 7:18 AM
Probably the different hands vary from person to person.
The "Chef's hat" reminds me of when you're writing code for a publicly distributed library, with inline documentation. Making it look nice does matter.
by zoogeny on 2/7/25, 8:15 PM
I don't think having a fixed set of N perspectives is the correct approach. Rather, it is often a good idea to understand that there are many perspectives to view things from and to encourage productive perspectives when possible.
One frustrating thing I find with people I consider closed minded is an insistence on viewing every single issue from a single unchanging perspective.
by aqueueaqueue on 2/8/25, 4:51 AM
by eamonobr on 2/10/25, 5:40 PM
Detective's Hat The detective's hat is all about investigation and debugging. When you put on this hat, you're diving deep into the code to find the root cause of a bug or issue. This involves a lot of patience, attention to detail, and sometimes a bit of intuition. You might use tools like debuggers, log analyzers, and performance profilers to track down elusive problems.
Architect's Hat The architect's hat is for designing systems and thinking about the big picture. With this hat on, you're considering how different components of the system interact, scalability, maintainability, and future growth. This involves creating diagrams, writing design documents, and making decisions that will impact the project long-term.
Gardener's Hat The gardener's hat is about nurturing and maintaining code. This involves refactoring, cleaning up technical debt, and ensuring that the codebase remains healthy and manageable over time. It's about pruning unnecessary parts and fostering good practices so that the code can grow sustainably.
Scientist's Hat The scientist's hat is for experimentation and research. When you wear this hat, you're exploring new technologies, trying out different algorithms, or conducting performance benchmarks. It's about being curious and methodical in your approach to discovering new solutions.
Librarian's Hat The librarian's hat is focused on documentation and knowledge sharing. With this hat on, you're writing clear documentation, creating tutorials, and ensuring that information is easily accessible to others. This helps in building a knowledge base that can be referred to by team members or the wider community.
Diplomat's Hat The diplomat's hat is for collaboration and communication. When you wear this hat, you're working with other teams, stakeholders, or clients to understand their needs and ensure that everyone is on the same page. It's about negotiating requirements, managing expectations, and fostering a collaborative environment.
by KerryJones on 2/8/25, 4:18 PM
I'm not sure "style" is the right word, but "hat" feels like the wrong one.
by user3939382 on 2/7/25, 5:50 PM
by throwaway092323 on 2/7/25, 4:59 PM
For me personally, there isn't much difference between the Chef's Hat and the Teacher's Hat; the way I make code presentable is the same as how I make it self-documenting. I can tell I did a good job if the person reading my code feels smart.
by motorest on 2/8/25, 10:34 AM
by fullstackwife on 2/8/25, 9:45 AM
once you get someone pigeonholed, it becomes a self fulfilling prophecy
by em-bee on 2/7/25, 9:22 PM