Lurker News
I'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 comments
atomicnumber33 replies#
When I was about 3 months into my programming career I performed a minor refactor to some code.

Unfortunately, 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.

throwup238#
> I'm not sure exactly what all it taught me

Time to get into woodworking!

sk5t#
> I'm not sure exactly what all it taught me

Make curly braces mandatory with a linter, of course!
Also, add tests before changing the thing.

nottorp1 reply#
Did that when I was younger, but with my own code :)

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.

ordu1 reply#
It is the thing I love about emacs, it autoindents everything, so if you got brackets/braces/parenthesis wrong you see something you don't expect. But obligatory braces work too.
nottorp#
Yeah maybe these days the smarter autoindent would prevent incidents like this. But it's too late for me, I'll add braces around 1 line branches till i die :)

Well, not in python...

ChicagoDave2 replies#
In 1994 my boss asked me how long a set of changes would take in an existing billing application. I took a day to look at the code and I said 6-8 weeks.

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.

chr15m#
This is a great story. Similarly I've learned that any amount of planning is better than no planning. Simply drawing a few mock-ups of what you're going to build will make things go a lot better. It's cheaper to fix mistakes at the design phase than the implementation or production phases.
eru#
Interesting! Though most of the time, the problem with estimating how long software takes to develop is that people tend to be hopelessly over-optimistic.
LVB1 reply#
While in Army basic training, my duffel got swapped with another guy's (no idea whose). Back at the barracks, I discovered that they'd snagged some spent shells from the range. Massive no-no. Young, naive me assumed that presenting these to the drill sergeants and explaining the situation would be the correct move. I was severely disciplined as a result. Others were like, "Dude... why didn't you just quietly toss that shit in the trash?!?" It was a big wake-up call for how poorly I could gauge people (e.g. the sgts), adapting to the situation, etc.
TimTheTinker4 replies#
Naive civilian question here -- If the drill sergeant is your boss in basic training, I don't understand why telling him info you think is important got you into trouble. After all, "talk to your boss if you have a concern" is the #1 piece of advice given to anyone who has a job.

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.

LVB#
It wasn't a particularly healthy environment, as I recall (it was a long time ago). Rather than "tough but fair," I remember my drill cadre being volatile and sort of mean.

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.

frickinLasers1 reply#
Basic training isn't supposed to be a healthy work environment. It's about breaking the recruits down and reforming them into perfect, interchangeable cogs that won't interfere with the operation of the machine.

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.

eru#
You are partially right.

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.

djeastm#
>In healthy work environments

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.

bombcar#
> talk to your boss if you have a concern

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.

agentultra#
Learning Haskell.

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.

Load more comments