Ask HN: What was your most humbling learning moment?
532 pointsI've worked on large products for large and small companies and written tens of thousands of lines of code across my career, solving complex, abstract, challenging technical problems in a variety of languages on a variety of platforms, sometimes under difficult conditions. I have often been a resource for my friends and co-workers when they have programming or technical questions.
I only recently learned how to correctly raise and lower window blinds--I had been doing it wrong my entire life. It was maybe the dumbest I have ever felt, and was a humbling reminder of how much I don't know about how much I don't know.
Have you had similar experiences?
Comments (680) 153 threads
Earlier commentsUnfortunately, the program was difficult to test (no unit tests) and very important, and difficult to verify correctness of output as well. (As in, you can't just look at it and say "yeah that's numbers lgtm").
Also unfortunately the previous author had not been very consistent in their programming style, so there was a lot of syntactic noise (some single line if statements used braces, some omitted them, etc)
Also unfortunately in my prior rewrite work in this, I had grafted the old UI onto my new backend to save time, but not brought the rigor there up to snuff (it's UI code, I had thought. It's well enough to have tests covering the business logic for now.)
Well anyway when I had rearranged some code, I hadn't realized there had been an extremely large block right underneath an if statement that wasn't using brackets, and I had accidentally split it into a few statements. N-1 of which were naturally now outside of the if statement.
The end result being that a bunch of code would run and the "is dirty" state worked fine, but if you clicked save on a "clean" state with no edits, it would blank the fields in the DB but not in the UI.
It didn't end up having any actual impact because we caught it in time, but god damn did it teach me something about "real" programming. I'm not sure exactly what all it taught me, but I think about that a lot as I do random other things now 8 years and 3 companies later.
Time to get into woodworking!
Make curly braces mandatory with a linter, of course!
Also, add tests before changing the thing.
There was an if that didn't need brackets when I wrote it. 6 months later it needed more stuff on a branch but i was tired and in a hurry so I didn't notice adding extra lines needs brackets. New code compiled but wasn't part of the if. Turned a 5 minute fix into 2 days.
Of course, all my ifs have had brackets on both sides since then.
Well, not in python...
He said we (me with his guidance) could do it in a week, maybe two. I adamantly disagreed.
We proceeded to spend about 3 days writing a detailed document on the logic required. Once he was satisfied, he asked me to take a final look at the code and revise my estimate.
I was shocked and came back and said “a few days.”
It was all done and tested in less than two weeks.
That’s when I learned how to read code and how pseudo logic can speed up software development.
In healthy work environments, the culture is to assume the best about the intentions of others ... sounds like he wasn't doing that at all.
It was ridiculous that they punished me for coming forward. OTOH, I knew them well enough by that point, and a wiser me would have chosen to continue keeping a low profile until I could GTFO.
Recruits leave with a sense of pride and belonging, and they fit seamlessly wherever they end up, doing their required work with minimal hassle. They address problems at the lowest possible level (e.g., a supervisor handles the discipline--no need to run it up to management unless the ramifications are severe.)
Notionally, anyway.
Another justification for making parts of basic training hard, is that fighting a war is hard.
So before they send you out into the field, they should make sure they know how you handle sleep deprivation, bad food and confusing orders etc.
There are healthy work environments in the military. Basic training, however, is not one of them. There are certain things about joining a military, like the prospect of having to be sent to kill other people you've never met or be killed by them, that changes the calculus of what is "healthy" or not.
I remember in basic there were Drill Sergeants you learned that could be reasoned with and those that could not. Your experience depended largely on which DS was on shift when you screwed up.
This is one of those pieces of advice that is spoken but has a huge unspoken part, mainly - if talking to the boss makes them look bad or causes problems for them more than not talking would then you stay silent.
A friend of mine had been gracious enough to lend their time and expertise to teach me TLA+ to help me solve a problem I'd been wrestling with. When we'd have lunch together they'd tell me about their work and how they were using Haskell. At the time I was skeptical that Haskell was a practical language for building software outside of academia.
I had realized I was regurgitating opinions from other people that I'd heard about Haskell. When interrogated I couldn't come up with good reasons for my opinions. I didn't want to continue embarrassing myself. I decided to learn enough of the language to form my own opinions.
And I've been programming in it as much as I could ever since.
All comments shown.
Couldn't load more comments. Check your connection and try again.