As a general rule, successful programmers have been doing this forever:
- It works. You added 2 things. It doesn't work. Which thing broke it?
- It doesn't work. You changed 2 things. It works. Which thing fixed it?
- It works. Two people changed it. It doesn't work. Who broke it?
- One donut left. 2 programmers went into break room. No donuts left. Who ate it?
Now change "2" to "1" in all of the above examples. See how much easier?
- It works. You need to add 16 things. You add 1 thing at a time. 16 operations later you are good but the deadline has passed. Fired.
- It works. Add 16 things. It doesn't work. Remove 8 things. It works. You've eliminated 8 culprits. 4 operations later done. Delivered on time. Get a promotion.
- One donut left. 2 programmers went into the break room. No donuts left. Who ate it? Not any of the 30 programmers outside of the break room. Ask the 2 programmers who did it. Prisoner's dilemma. Fun had by all.
Having done this for a number of years now, I’d argue that your first point is based on a false premise. Adding each thing one at a time feels slower because you don’t get the frantic rush from doing 16 things at the same time on a tight deadline, but most of the time end-to-end it takes the same amount of time or less, because when something does break it’s super easy to look at the one thing you did and fix it without having to suck in the entire context of the 16 things.
If you’re doing all 16 at the same time and they’re not one liner trivial things, how do you even know where exactly the 8 from your divide-and-conquer strategy are? And can you actually back them out without further breaking things?
I like this, especially the first point. I would just like to point out that the "fired." part doesn't have to be a real threat, a perceived (or even subconscious) threat is sufficient to generate the effect.
That can be a horrible time sink as well though. Imagine if only changing one thing means, that you need a test cycle of 15 minutes or even if it is only 5 minutes. You will need 5 minutes per change then. If you know multiple things you still need to change ahead of time, you might also go ahead and fix them all, and then fix resulting or remaining issues after only running one test cycle.
I think it depends on the situation, what the best approach is. Is it a system, which is running in production and you are operating an "open heart"? Well, better only change one thing and check. Is is a newly developed thing, which you develop on your own dev machine? You can easily fix many things and many more will still remain for further iterations.
“In retrospect it is clear that without all-up testing the first manned lunar landing could not have taken place as early as 1969,” von Braun wrote. “It sounded reckless, but George Mueller’s reasoning was impeccable.”
I got so excited by your response, I figured what the heck and turned my original response into a code-generated, html-driven, svg-drawn comic strip and put in on the front page of my portfolio here: edweissman.com. (Hit the 2 big arrows to surf the other 18 comics. For me, this is way more fun than anything else I ever did on that page.)
You talked about having a positive mental attitude being really helpful in overcoming shortcomings. This implies you didn't start that way and you learned the behavior.
Can you explain the thought process you adopted? I sincerely struggle with having a positive mental attitude (see I did it again) but I have recognized it's a huge indicator of a better life (social, work, family etc)
I always had a positive mental attitude. Not really sure why. Difficult childhood? Last kid picked in kickball? Couldn't get a date? Knew nobody was ever going to give me a thing so I would have to do it myself? Who knows? Way too much to think about for an answer now, but that's OK because...
My problem wasn't that I didn't have a positive mental attitude.
My problem was that I didn't know I had a positive mental attitude.
I was a typical nerd who found solace in math and programming but somehow worked my way up into a dev / project management / digital rainmaker position. My customer wanted me to do something he knew I could do that no one else had been able to do (something boring sounding like "implementing a factory shop floor control system").
He became so exasperated at my pushback (I can't. It can't be done. It's too hard. etc) that eventually yelled at me something like, "You know the business! You know the tech! You're good with people! You have PMA! So what's the f*in problem?) I asked, "What is PMA?" He said "Positive Mental Attitude!"
That conversation changed my career (and my life). And he became my major mentor. (That's why I thought of him in that "Advice that changed your life" thread last week.
This may sound bizarre and counter-intuitive but I think the short answer to your question may be, "You have PMA when you decide you have PMA."
Over the years, I've witnessed countless counter-examples to this: people don't have PMA because they don't know they have PMA so they never "breakthrough" like they could.
I'm so glad I met that mentor. Thanks for reminding me.
Is there something that just generates the html for you?
Exactly. I rolled my own CMS just for this. No images, just html and superfast svg built from database parameters. I'll be launching a full webcomic only site by the end of the year. I hope to include source at some point. I'll keep you posted.
My corollary to this is that bugs are a sort-of conserved quantity. For every 1,000 real* bugs found, 1,000 bugfixes are required. Bug report in, bug fix out.
The longer you delay fixing bugs, the more concurrent issues are present in the codebase. So then when you add a feature, instead of either having 0 errors or diagnosing a bug in 1 new thing, you now have to diagnose n+1 bugs, where 'n' is the number of unresolved bugs.
The more this is allowed to fester, the worse this becomes, to the point of hopelessness. I've seen a codebase with ~1K open crash bugs, and hundreds of memory corruption bugs. Developers were making things worse and convincing themselves that they were fixing things because randomly the memory corruption was less bad on that test run.
*) To make things simple, just ignore false bug reports for now. Pretend all bugs are real, such as "makes the program crash".