\

Fix your tools

163 points - today at 4:12 PM

Source
  • nicbou

    today at 4:48 PM

    The caveat is that you might end up shaving a yak.

    More often than not I end up three or four tasks deep while trying to fix a tiny issue.

    https://m.youtube.com/watch?v=_UZFI-8D5uA

      • bonoboTP

        today at 7:21 PM

        There is simply no general recipe for this. Sometimes I put my little tools and libraries in order and then I'm very productive with them and looking back it seems to have been the key enabler to the actual thing getting done. Other times I go dirty mode and just hardcode constants, copy code files under time pressure and looking back it is clear that getting to the same result with the clean approach would have taken months and the benefit for later tasks would be unclear.

        I know some are tired of AI discourse, but I found AI can help to sharpen the tools but at the same time I find that my scope grows such that dealing with the tools takes just as much time but the tools have more features "just in case" and support platforms or use cases that I won't often need, but it feels easy enough to just do, but then as I said it still takes long in total.

        It's all mostly an emotional procrastination issue underneath it. Though that can go both ways. Sometimes you procrastinate on thinking about the overall architecture in favor of just making messy edits because thinking about the overall problem is more taxing than just doing a small iteration, sometimes you procrastinate on getting the thing done in favor of working on more tightly scoped neat little tools that are easier to keep in mind than the vague and sprawling overall goals.

          • nine_k

            today at 8:39 PM

            What looks like "wasting time on procrastination" may be actually "spending time on thinking". Thinking takes time.

            Making messy edits is a bet on previous code quality. If you have paid off enough technical debt, you can take another "technical loan" and expect the rest of the owl to still function despite the mess being introduced. If things are already messy, there's always a risk to make the fess incomprehensible and failing in mysterious seemingly unrelated ways, with the only way to fix it being to git reset --hard to the prior point, and do a more right thing. But the time would have been wasted already.

            My approach is usually to timebox it, and cut the losses if an acceptable solution is not yet in sight when the time runs out.

            • sandyagent

              today at 9:32 PM

              [dead]

          • 9dev

            today at 5:11 PM

            I knew which vid's it gonna be before even clicking. Still hilarious.

            • Sophira

              today at 5:15 PM

              Relevant XKCD: https://xkcd.com/349

                • wredcoll

                  today at 5:38 PM

                  This comic definitely speaks to me on a deep emotional level, but at the same time one of the things I like so much about computers is they're essentially unbreakable.

                  Not that you can't get one into a non-working state, that is, of course, trivial but with the lone exception of deleting data, you can always restore a computer, the only tool being needed is some kind of boot disk.

                  (Compare that to breaking a literal hammer, you'd need a pretty specialized set of tools handy if you wanted to actually restore it)

                    • buildbot

                      today at 7:47 PM

                      Ah; if only this was really true. You can certainly get a computer into a permanently bricked state, especially an embedded device. Even a modern x86 machine can be basically toasted by a bad firmware update.

                      • today at 5:50 PM

                    • sltkr

                      today at 6:11 PM

                      And perhaps less well known to the Hacker News crowd, relevant Malcom in the Middle: https://www.youtube.com/watch?v=5W4NFcamRhM

                        • teddyh

                          today at 6:23 PM

                          That’s the same video (but in a higher quality) as in the grandparent comment.

                  • malux85

                    today at 8:07 PM

                    This only happens when the tools have become so neglected that every single one is broken. You should still take the time to pay down that debt, and in the process learn the lesson to pay the debt in smaller chunks in the future.

                    You are going to pay it anyway, its not an "if" its a "when"

                    • Graziano_M

                      today at 5:57 PM

                      Weird. I happen to be watching Malcolm in the Middle and I find a link to Malcolm in the Middle

                    • kurthr

                      today at 5:14 PM

                      LOL! Well, somebody's gotta shave it!

                  • sfink

                    today at 9:52 PM

                    Excellent advice. I try to follow it in my daily work, with some success.

                    Excellent follow-up advice: now stop fixing your tools, and go fix your actual problem instead. I try to follow it in my daily work, with noticeably less success.

                    • highfrequency

                      today at 5:19 PM

                      Engineering is a continual lesson in axe-sharpening (if you have 6 hours to chop down a tree, spend the first 4 sharpening your axe).

                      My favorite framing, from Kent Beck: “first make the change easy, then make the easy change.”

                        • goda90

                          today at 5:31 PM

                          I recently got assigned to enhance some code I've never seen before. The code was so bad that I'd have to fully understand it and change multiple places to make my enhancement. I decided that if I was going to be doing that anyway, I might as well refactor it into a better state first. It feels so good to make things better instead of just making them do an extra thing.

                            • hvb2

                              today at 8:30 PM

                              Just be careful that 'better' doesn't just mean 'written by me'. I've seen that a lot too

                          • qup

                            today at 6:18 PM

                            I don't think you spend all 4 hours up front, friend.

                            In my experience you're going to want a sharp axe later in the process, once you've dulled it.

                            Not sure if that ruins the analogy or not.

                            • bee_rider

                              today at 7:52 PM

                              I have mixed feelings here because on one hand I prefer the “axe” when programming (vim with only the right extensions and options). But for trees
 chainsaws are quite a bit easier. Once it is chopped down, maybe rent a wood splitter.

                                • huflungdung

                                  today at 8:19 PM

                                  [dead]

                              • ShellfishMeme

                                today at 6:15 PM

                                This approach is also what I'm still missing in agentic coding. It's even worse there because the AI can churn out code and never think "I've typed the same thing 5x now. This can't be right.".

                                So they never make the change easy because every change is easy to them... until the lack of structure and re-use makes any further changes almost impossible.

                                • IshKebab

                                  today at 6:11 PM

                                  Most of my colleagues are content to spend 50 hours chopping up the tree with a pipe. We don't have time to spend making things work properly! This tree has to be finished by tomorrow! Maybe after we've cut up this forest, then we'll have a bit of spare time to sharpen things.

                                    • eddythompson80

                                      today at 7:06 PM

                                      As Charlie Munger used to say “show me the incentives and I’ll show you the outcome”.

                                      What are the incentives for these developers? Most businesses want trees on trucks. That’s the only box they care to check. There is no box for doing it with a sharp axe. You might care, and take the time to sharpen all the axes. Everyone will love it, you might get a pat on the back and a round of applause, but you didn’t check any boxes for the business. Everyone will proceed to go through all the axes until they are dull, and keeping chopping anyway.

                                      I see 2 year old projects that are considered legacy systems. They have an insurmountable amount of technical debt. No one can touch anything without breaking half a dozen others. Everyone who worked on it gets reasonable rewarded for shipping a product, and they just move on. The business got its initial boxes checked and everyone who was looking for a promotion got it. What other incentives are there?

                                        • IshKebab

                                          today at 8:01 PM

                                          It's not about incentives; it's just bad management. As you said, the business just wants trees on trucks, so good management would realise that you need to spend some time sharpening axes to get trees on trucks quickly. It just seems to be something that a lot of software managers don't get.

                                          I don't think every company is like this though. E.g. Google and Amazon obviously have spent a mountain of time sharpening their own axes. Amazon even made an axe so sharp they could sell it to half the world.

                                            • argee

                                              today at 10:41 PM

                                              [delayed]

                              • umairnadeem123

                                today at 9:42 PM

                                biggest lesson i learned here: all-in-one tools that promise to handle your whole workflow are almost always worse than stitching purpose-built ones together.

                                i tried every no-code automation platform (make, airtable, n8n) for a content pipeline i was building. they all break the moment you need to run it more than twice a day at any real scale. weird rate limits, silent failures, state management nightmares.

                                ended up just writing python scripts that call APIs directly. less "elegant" but infinitely more debuggable. the fix-your-tools moment for me was realizing the tool itself was the problem -- sometimes fixing means replacing with something simpler and more transparent.

                                  • melvinroest

                                    today at 9:50 PM

                                    I haven’t tried n8n and similar tools but I always had the suspicion that they wouldn’t be that good. Would you say there are scenarios where tools like n8n would be better to use than Python and calling some APIs?

                                    • Rietty

                                      today at 9:51 PM

                                      And this is why I just love Airflow so much.

                                  • semiinfinitely

                                    today at 6:43 PM

                                    > The very desire to fix the bug prevented me from seeing I had to fix the tool first, and made me less effective in my bug hunt

                                    Kenneth Stanley's book "Why Greatness Cannot Be Planned: The Myth of the Objective" is dedicated to this phenomenon

                                    • wangzhongwang

                                      today at 5:38 PM

                                      Totally agree with this. I spent way too long fighting my dev environment last month before I finally sat down and properly configured everything. The ROI on fixing your tools is insane - what took me 2 hours of yak-shaving per week now takes zero.

                                      The hard part is convincing yourself it's worth the upfront time. There's always "real work" that feels more urgent than fixing your build script or editor config.

                                    • didgetmaster

                                      today at 6:36 PM

                                      It's not just the tools, it is your tests. Most times you encounter and fix a bug, your first question should be 'Why didn't my tests catch this?'

                                        • deepsun

                                          today at 6:43 PM

                                          Yes, but the answer depends on the bug. 100% test coverage leads to brittle tests, when any change leads to many broken tests, and fixing them is like repeating the change multiple times.

                                      • unkulunkulu

                                        today at 5:19 PM

                                        Using the debugger to understand/read code is invaluable. Seeing live stacks is so powerful compared to static analysis.

                                          • bluGill

                                            today at 5:42 PM

                                            I'm not convinced. At times it can be valueable, but at times you can go around in circles, changing checking variables/break points all the time, but never finding the problem. Often thinking about the problem and what is important is what you need. Playing in the debugger is fun and feels like progress, but it can just be a distraction from understanding the real problem.

                                            I'm not completely against debuggers, but in my experience they only are useful either to get the trace of the problem when it first occurs and then use static analysis until you have a theory the debugger can prove/disprove - but only prove/disprove that theory don't keep looking: you will feel productive but in fact be spinning circles

                                              • Bukhmanizer

                                                today at 7:14 PM

                                                As with most continuous arguments in SWE, it really depends. I used to do a lot of debugging of random (i.e. not written by me) bioinformatics tools and being able to just fire up gdb and get an immediate landscape of what the issues were in the program was just invaluable.

                                                Times when I was more familiar with the program or there were fewer variables to track it was less helpful

                                                • unkulunkulu

                                                  today at 6:37 PM

                                                  I’m talking about using debuggers not even to debug, but to familiarize yourself with the codebase and gain general understanding.

                                                  Measure of progress for me is formulating and answering questions. Sometimes trying to answer a question leads to formulating sub questions.

                                          • stivikivi

                                            today at 4:48 PM

                                            This is the reminder I needed. For some projects the python LSP I am using in Neovim just breaks sometimes. Always so frustrating when I start fuzzy searching instead of just jumping to a declaration or restart it.

                                            • bergheim

                                              today at 5:44 PM

                                              If you like what you just read you should probably never install Emacs.

                                              You're welcome.

                                              • yegle

                                                today at 5:57 PM

                                                My friend once told this joke:

                                                > "A good programmer, when encountering a debugger bug," he paused, cleared his throat, and said solemnly: "should immediately drop the program they're debugging and start debugging the debugger instead!" The auditorium once again erupted in thunderous applause.

                                                • maccard

                                                  today at 6:16 PM

                                                  I aim for the Boy Scout rule - always leave things better than you found it. It’s always a balance and you have to not lose the forest for the trees. Always ask what is the end goal, and am I still moving forward on that.

                                                    • esafak

                                                      today at 9:09 PM

                                                      When I find something wrong with my tools I file a report or submit a fix.

                                                  • cloverich

                                                    today at 6:52 PM

                                                    If you're still dipping your toes into an LLM world, this is an excellent place to begin. I helped with a deploy at work the other day, we have some QA instructions (Notion). I pointed the LLM at one of the sections, asked it to generate task list for each section, and once that looked good, had to convert the processes into a set of scripts. The latest models make short work of scriptable stuff that you can use for debugging, testing, poking, summarizing, etc.

                                                    • doctorhandshake

                                                      today at 7:26 PM

                                                      My version of this is ‘always be toolin’, but then of course one must use judgement lest it be better to just get on with it.

                                                      • chihuahua

                                                        today at 5:24 PM

                                                        Ugh, this brings on flashbacks to when I had to work with Ruby, and the *** debugger would break with every single release. The RubyMine IDE that 45% of the company used was based on some bizarre custom Ruby gems to enable debugging, and that crap would take a month to be fixed by JetBrains. 10% used VSCode where debugging would sometimes work and sometimes not.

                                                        • r1cka

                                                          today at 4:44 PM

                                                          "Give me six hours to chop down a tree and I will spend the first 4 sharpening the axe"

                                                            • bluGill

                                                              today at 5:47 PM

                                                              I takes less than 2 hours to chop down a tree [of the type Lincoln would have been chopping down with an ax - trees elsewhere may be different]. It doesn't take 4 hours to sharpen an ax unless you were mistreating it either though. So given 6 hours to chop down a tree I'd spend 15-20 minutes sharpening my ax (divided into several 2-5 minute sessions when I need a break anyway), 2 hours chopping the tree, and the remaining 3.5 hours reading a book. But I keep my tools in good shape so I don't need a long presharpending before the first cut.

                                                              I'm not physically in good enough shape to swing an ax for 2 hours, but I've done enough with an ax to know the above is right if I was in physical shape to do it.

                                                                • b00ty4breakfast

                                                                  today at 7:19 PM

                                                                  hello, it's me the Language Fairy.

                                                                  Sometimes when people use an expression to convey an idea concisely , the details of the imaginary scenario within the expression are less important than the concept being expressed (just so long as the general shape of that scenario fits the thing being discussed).

                                                                  To be more particular, the exact time it takes to sharpen an ax and chop down a tree are not important here.

                                                              • phendrenad2

                                                                today at 5:57 PM

                                                                I always liked "The craftsman who wishes to do his work well must first sharpen his tools" by Confucius

                                                            • d--b

                                                              today at 5:25 PM

                                                              Also, FYI: Claude is very good at fixing tools

                                                                • wofo

                                                                  today at 9:54 PM

                                                                  That's what I actually used to fix this one! I'm not too deep into the JVM ecosystem, so I gave Claude a try just in case... and it fixed it :)

                                                                  Btw I didn't mention it in the blog post, because I think that would have derailed the conversation (after all, the point of the article is not "use LLMs", but "fix your tools"). In any case, I agree that LLMs can make it easier to fix the tools without getting side-tracked.

                                                              • wofo

                                                                today at 4:21 PM

                                                                OP here, thanks for submitting!

                                                                  • bpavuk

                                                                    today at 4:34 PM

                                                                    hey, the idea of Krossover is actually dope! my sole question is, why does it exist?

                                                                    I understand that one might call Rust from Kotlin for performance reasons (I do that often, Mozilla does, some others too), but Kotlin from Rust? where would it be useful?

                                                                    no snark or subtext here, I'm genuinely curious

                                                                      • wofo

                                                                        today at 5:36 PM

                                                                        Calling Kotlin from Rust (and other languages) is useful when you want access to an existing Kotlin codebase and would rather avoid creating a full-blown port. I guess most people don't do things like this because creating bindings for languages that are not C (or C-like) is usually cumbersome. Krossover is trying to fill that gap for Kotlin. Does that make sense?

                                                                          • bpavuk

                                                                            today at 8:58 PM

                                                                            pretty much!

                                                                            I'm still curious about case studies. I can imagine that something has SDK for Kotlin but not for Rust, yet outside of that case, technical benefits are not yet obvious to me.

                                                                    • obsidianbases1

                                                                      today at 4:43 PM

                                                                      How'd you get the notice that this was submitted so quickly?

                                                                        • wofo

                                                                          today at 5:32 PM

                                                                          I got a notification through F5 bot (https://f5bot.com/)

                                                                            • obsidianbases1

                                                                              today at 7:45 PM

                                                                              Good to know, thanks!

                                                                          • bombcar

                                                                            today at 5:32 PM

                                                                            If you watch your refers you'll see HN pretty easily. Could be even setup as a notification.

                                                                    • mentalgear

                                                                      today at 6:02 PM

                                                                      "first we shape our tools, then our tools shape us"

                                                                      • adriaanmol

                                                                        today at 6:42 PM

                                                                        Next time use AI.