Culturally transmitted skills and values
danluu.com
danluu.com
I once joined a team that had tremendous amounts of copied code. I got a bit fed up with fixing the same issues across multiple files, so I created a tool to flag files with copied code in the codebase.
This would have made me a hero at my previous company. The encouraged you to have a low programmer ego, and be very concerned with quality. Teams were often weirdly eager to try anything that could plausibly improve code. You could get promoted by making another hoop for programmers to jump through.
But the new company had programmers with rockstar egos, and thought following rules were for losers. They valued how quickly they could get code from a programmer's editor into production, and organized everything around that metric. Introducing an automated code quality tool, that from their perspective, slowed things down and pointlessly blamed some people as lazy? That didn't make me popular.
Programming culture is really an underrated aspect of the job. I'm not remotely as good as Dan, but I've also had a pretty varied career. I think many programmers, even if they job hop, spend their whole careers in the same sort of company. So they don't even know what else might be possible.
He was introduced to Slack and Basecamp.
Working really fast, he got in trouble (and by that I mean about a 50 minutes brainwashing session) because he doesn't report "properly" the tasks he finishes and ticks off on Basecamp to his manager.
This is also a good way to use IntelliJ because it makes it easier to do large changes that span many code bases / repos.
Creating an abstraction that makes no sense is worse than just having code being there twice (e.g. different codebases). I worked with a guy who would apply DRY to literally everything like it was a panacea. It was an awful time.
I've done a lot of legacy work, and most repetition is due to a loss of business context. Naturally support staff don't want to be hero's and make big changes.
Right now I work with a system that's been in active development for 30 years and it's a dream to work on because everyone knows it and I can just ask some of the original authors what something is, or to explain an edge case.
Most dev's aren't that lucky.
that very much depends of how the function is called. there are a lot of ways I've encountered in the wild which wouldn't be found by this.
> Creating an abstraction that makes no sense is worse than just having code being there twice
The key point being 'that makes no sense'.
If you have experience as a software engineer you understand that most 're-use' isn't completely de-duping a function, but instead you see it being abstracted out into a more generic fn that can handle two or more _slightly different_ use cases.
This typically makes the original intent of the fn difficult to understand
Some programmers do this and then pat themselves on the back, repeating the 'DRY' mantra to themselves and everyone else around them.
80% isn't completely pulled out of thin air, the vast majority of fn abstraction leads to a less understandable (therefore less maintainable) codebase.
1. They disagreed with you about code quality. For example: Imagine your tool highlighted duplication across tests and pushed people into using things like rspec’s shared examples. People would disagree with (their interpretation of) you that duplication was worse than the wrong abstraction.
2. They were already overwhelmed trying to follow multiple rules from multiple people (PM, CTO, manager, team lead, various staff engineers) who all have conflicting ego-driven priorities.
3. They see rules not being followed by other people and consequently feel like they lack the skill to be the unique engineer who can simultaneously jump through all the hoops and execute fast enough to avoid losing their home by being judged as “the slow one”.
I've been very curious about these because I sense a lot of paradoxical behavior. People ranting about state of affairs but refusing solutions (because it clashes with some unclear principle they hold, often a pavlovian reflex that doesn't work well in large groups, only creating political issues in the long run)
My previous role was in a team run like the first company. There were sky high barriers to get code into production, mostly centered around code reviews. It could take weeks to get the attention of enough people to review your code. Complex features had to be broken into multiple code reviews, and only people at your level or higher could review your code. So you ended up with a lot of code reviews and not enough reviewers.
The result? Politics. And where there is politics, there is corruption.
One time, one of my former team mates casually asked me to send him some Bitcoin if I wanted him to move faster. I refused, and the code review was delayed. Another team member stonewalled my code reviews as a retribution on an unrelated technical dispute.
It took me weeks to move through all my code reviews into production. I left the team immediately thereafter.
Be careful what you wish for.
At the perfectionist company we were six weeks away from final release - for a year. On the other hand, that company's codebase almost brought me to tears with its conceptual unity and perfection. And some process was worthwhile for us; we were adding fintech features to a userbase of hundreds of millions.
At the speedy company we did social media, so there were way lower stakes. Projects turned around really fast. LAMP stack all the way. The attitude was that code would always be kind of sloppy and unpredictable, and there would always be unforeseen disasters. To cushion shocks like that, they invested a lot in their feature flag and deployment system.
These are both paths borne of wisdom and experience.
But here's where culture comes in. The culture at both companies was that these weren't choices that worked for them, but the optimal choice for everyone. At either company I think most people would think the other company's approach was not just bad, but literally impossible.
In my experience, a bad process is one that 1) produces responsibility without accountability, and 2) does not account for process bottlenecks.
Amount of people being late goes up once they realize they can skip stupid meetings simply by being "late"
One the banes of good meetings are people who don't belong in your meeting but whose feelings will be hurt if they aren't invited.
I worked in one organization where leaving early was disrespectful. Being late was a "flex" move done by leaders who were "super busy".
I'm not saying that is right. I'm just saying that is how it was viewed.
The issue here is in scheduling. Forcing people to leave other meetings early is no different then coming late to this one.
And at minimum, by the start of the meeting you can choose which topic to start with.
In any case, it’s probably best to make all meetings 50 minutes long instead of scheduling in blocks of hours. I always set speedy meetings on in Google Cal.
In a way that is no different then leaving sooner. Missing start is no more harming then missing end.
Plus, if it robs so much, then check out with people prior organizing it. Or whoever is organizing the meeting should. In an ideal world, the meeting that was scheduled second without regard of already existing schedule should be one where people miss part.
> it’s probably best to make all meetings 50 minutes long instead of scheduling in blocks of hours.
Imo, ideal is to have maximum run time determined. It is perfectly ok to have and schedule short meetings.
The second or third time the “boss” rolls into a meeting 30 minutes late, you go look at his calendar and realise somebody scheduled a 1 hour session as a 15 minute catch-up.
Still, starting sharp on time is essential. Once it is done often, people learn that they will miss important stuff when they are late. Allowing to start later often makes people show later and later.
I thought this only happens in tv shows. Was it more like Big Head from HBO Silicon Valley (the company forgot about the employee) or Frank Abagnale from Catch Me If You Can (conman who managed to fake his identity and credentials)?
Leetcode problems require you to know that.
So quite possibly this was a perfectly good architect/programmer from a successful product who was turned into a C++ engineer on paper but never actually accepted the new role and only continued to architect.
Civil engineering company hired CAD savvy engineer. A rarity back then. Jared. Then sent him to advanced training. Before his first day in office. Then bought him the best gear, including extra monitor and custom desk. Which caused a little bit of resentment, of course. (New hires generally got hand me downs.)
Second day on the job. Yay, welcome to the team. Jared got his machine booted. Pulled up a drawing. Stared at the screen for a while. Then he asked me how to draw a line.
Smart ass me: "Ell eye n e, then hit enter."
Jared presses the keys, repeating the letters out loud, hits enter. Then says "LINE. Oh."
The rest of the drafters and engineers looked up, unbelieving.
Jared was also adept at sloughing his workload and tasks onto others.
I'm now remembering some other Jared stories.
Jared tells me his machine is broken. He kept erasing a line. And when he did 'refresh', the line was still there. Of course I debug. Turns out Jared had made dozens of copies of his entire design, in exactly the same location. So he was just erasing the top instance, one at at time.
Remember acoustic ceiling tile? Jared was adept at flicking pencils up so they'd stick in the ceiling, like darts. One of his hobbies. He'd lay multiple pencils flat in his hand. Then kinda slapped that arm against the other hand. Jared proudly claimed his personal record was something like 4 pencils at once (successfully stuck in the ceiling).
Remember when GIS systems were the new hotness? Jared scored a job at the county, becoming the director of GIS systems. I'm sure if any actual work happened during his reign, it was accidental. Our tax dollars hard at work.
> Incentive: dock pay for people who are late
There are much better incentive-based solutions. For example: - Managers reprimand employees who are frequently late. - Positive incentive for physical meetings: have a nice fruit bowl with just enough fruit so there are no leftovers for anyone who's late.
> Process: make process for creating or executing on a work item so heavyweight that people stop doing simple work
Better process-based solution: every employee has a "big" item that they work on, with planning weeks/months into the future, and syncing occasionally with their manager and/or peers.
I’ll usually interview a company for at least a hour before I consider taking their offers seriously just to identify the type of culture that they have.
Depends on where you live in the stack and the impact of the bug. Critical bug causing customer impact? You bet you are going to have tons of (senior) engineers jump all over it — bug will get squashed, fast. Low impact impact ... they tend to get backlogged, very rarely revisited. Definitely context dependent.
For some start ups I've worked with, there's a move fast and who cares if it breaks mentality. At AWS, I was on a more critical, mature networking team and while speed was important, correctness (and lack of bugs) were valued much higher.
Seems great for architecture astronauts. Maybe they'll stay long enough to eat their own crap. In the meantime, I'll keep in mind to stay away from such companies.
I bet it's the same way even now, unofficially. For better or worse, engineers do not seem to sufficiently value simplicity, so people hated the rules, but played the game, producing insane rube goldberg like backends all over the place that you need whole teams of experienced SREs to run successfully. The fact that this is ridiculous was not at all lost on people either - memes on Memegen (an internal meme site) were pretty vicious. But, not a heck of a lot you can really do if you want those golden handcuffs to turn into platinum ones.
I'd be remiss if I did not mention the silver lining in all this: Google's SRE team is very likely the most experienced in the world, and SREs are respected there. Stuff wouldn't run at all if this wasn't the case, and certainly not with five nines of reliability.
Another bullshit requirement in the general case is "cross-team impact". No matter how valuable you are as an IC, you gotta get a bunch of other people involved so they write your peer feedback and endorse you for a promo. Sometimes this makes sense. Often it does not. And those people better be one or two levels above you, which is a problem in a remote office.
There was a whole slew of antipatterns like that which might have made sense at some point in the past, but now are perceived as an immutable thing nobody can do anything about. So in a way, "culture" is not necessarily an _universal_ good, although at the time I was there the good outweighed the bad IMO.
This cultural stuff is also why Agile by itself does not mean you'll be particularly "agile", nor is Agile required for high agility. As a manager I've found that if I can get people to care about things and give them autonomy, most of them will not require close supervision and will move faster than they'd otherwise. Some will require supervision, reminders, incentives, and all that, and those are best sequestered from the rest and grouped with folks with similar working styles and put to work on tasks that tolerate that kind of thing, or in clinical cases let go.
My experience, which matches exactly what I would expect from a technological solution to a people problem:
Nobody cares, meetings still go 5 minutes too long instead of ending 5 minutes early.
If at your company nobody keeps the time to the regularly scheduled time, nothing will change! It takes people actually keeping the time box of the meeting to change any of this. Be the guy that says "2 minutes left" 3 minutes before the end of the meeting. End your own meetings early by saying "running up on the time box, 2 minutes left" when it's 5 minutes to the end of the meeting and actually ending it. If nobody does that, nothing will change.
A lot of Robert C Martins pieces are just variations on his strong belief that ill-defined concepts like "craftsmanship" and "clean code" (which are basically just whatever his opinions are on any given day) is how to reduce defects and increase quality, not built-in safety and better tools, and if you think built-in safety and better tools are desirable, you're not a Real Programmer (tm).
I'm not the only one who is skeptical of this toxic, holier-than-thou and dangerous attitude.
Removing braces from if statements is a great example of another dangerous thing he advocates for no justifiable reason
https://softwareengineering.stackexchange.com/questions/3202...
Which caused the big OSX/iOS SSL bug in 2014, see https://www.imperialviolet.org/2014/02/22/applebug.html
This link and thread on hackernews is good too
https://news.ycombinator.com/item?id=15440848
The current state of software safety discussion resembles the state of medical safety discussion 2, 3 decades ago (yeah, software is really really behind time).
Back then, too, the thoughts on medical safety also were divided into 2 schools: the professionalism and the process oriented. The former school argues more or less what Uncle Bob argues: blame the damned and * who made the mistakes; be more careful, damn it.
But of course, that stupidity fell out of favor. After all, when mistakes kill, people are serious about it. After a while, serious people realize that blaming and clamoring for care backfires big time. That's when they applied, you know, science and statistic to safety.
So, tools are upgraded: better color coded medicine boxes, for example, or checklists in surgery. But it's more. They figured out what trainings and processes provide high impacts and do them rigorously. Nurses are taught (I am not kidding you) how to question doctors when weird things happen; identity verification (ever notice why nurses ask your birthday like a thousand times a day?) got extremely serious; etc.
My take: give it a few more years, and software, too, probably will follow the same path. We needs more data, though.Wait... maybe that is toxic.
The toxicity is in blaming an inherently fallible human for having the audacity to be fallible. It's not productive, it's just an intellectual dead end.
If someone's answer to that is "just don't slip or make mistakes", well... I don't even know what to say to that, it's so dumb it can't really be meaningfully responded to.
I'm out of car analogies today but how about a software analogy?
"just don't slip or make mistakes" makes sense as an "Acceptance Criteria".
The implementation details of that? I minimize my mistakes and slip ups by doing things like always fully curly-bracing all of my if-statements and actually enforcing it through a linter that doesn't let me merge any code to master that doesn't adhere to this rule, because it'll make the build red and our repo doesn't allow me to merge anything that doesn't have a green build and I can't push directly to master.
Do I still slip up sometimes? Sure, the build catches it. The slip ups this doesn't catch? We try to find implementation details that reduce those slip ups too. Rinse, repeat.
If you slip up as a manager/team lead? Show your developers. Show how you handle it. Lead by example.
This obviously doesn't completely solve the "culture or process?" question on its own. I just enjoy software for having a relatively unusual place where the two can be overlapped. I'd have a hard time going into any other engineering field where I lost unit tests, they're so integrated into how I think.
I actually kinda consider myself personally not all that strong with processes... but you wouldn't know it to look at my output because I put the processes in my code.
(This is also one of the reasons I find the slowly-but-not-slowly-enough dwindling obsession with claiming programming isn't a "real engineering discipline" to be silly. We don't do what all the other engineers do because we have quite a lot of options that are better than what other engineers do. Sure, if you're a "senior" dev who has never heard of a unit test, you may be cowboying it too much, but, I mean, other engineering disciplines would murder for some of the processes we can create around quality.)
This split between incentive, process and culture doesn't make me comfortable. I think culture and processes emerge from incentives, and incentives are not just what the company signals (pay, perks) but also the effects of actions.
For instance if reducing bugs brings company wide fame, money and makes everyone's work visibly better, people will spend more time on avoiding/fixing bugs, and a culture of quality will impregnate the teams. Process will be adjusted accordingly when they don't align with that culture.
Someone moving to another job might bring that culture with them, but we know it will disappear if the incentives are completely different in their next job (if shipping 2 weeks faster and fixing bugs afterwards make a ton more sense, they'll adapt)
Seeing leadership create processes and incentives that align with the stated values of a culture builds trust that those stated values are authentic.
I work alone so my extent of 'culture' has been pycharm warnings. I imagine if another programmer saw my code they'd vomit so violently they'd have to buy new electronics.
I try to do the right thing, but PEP 8: E501 line too long (125 > 120 characters) I'm not really caring too much about being 5 characters too long. I tend to comment my code well but there's certainly areas where there's nothing because the comments wont help much.
Yet what ego do I have to get in the way? I know I'm not a programmer, I know there's tons of room for improvement. Its just... I don't know what I don't know. I feel this article speaks to me but I don't really have a mentor :(
Edit/ just ran pylint against one of my projects. It fell over laughing.
Not sure if I should be happy or sad by this. Because I still dont think I can program at all. And I think part of the reason why FAANG ( or are they called MAMAA now ? ) are paying $200K for fresh grad and yet other there are part of US paying sub $100K. The range of qualities in terms of programmer is far too wide.
Warning: doing this at a startup will get you fired.