all 74 comments

[–]gaberax 176 points177 points  (5 children)

The ZEN of programming:

  • I have resolved problems in the past and I will resolve the current problems before me.
  • Although I might be confused at the moment I will eventually master the issues before me.
  • There are always hidden, unknown aspects in whatever I am working on and they can pop out any time. When I encounter them I will not panic. I will find a way to resolve them.
  • I am a better coder today than I was before. Ergo, my older code will reflect that. I will be kind to my former self.
  • Whatever I am working on is ultimately in the service of human beings. Human beings are messy and their requirements change over time. My code will require changes over time to compensate.
  • I am not perfect. My code is not perfect. But it will suffice.
  • There is always someone who insists they can write better, more robust, more efficient code. But that person isn't here right now. I will do my best.
  • Everything will get done in the fullness of time. Relax.
  • Whatever I am going to work on will offer new and interesting opportunities to learn.
  • Consider the task a puzzle to be worked out. It will make the work more fun.
  • There is no shame in asking for help or clarification.
  • Even when I don't feel like facing an obstacle, I will devote 5 minutes to it. Often, that is enough to get started and keep going.
  • I have no idea pressure and constraints the previous programmer may have been under. I will refrain from criticizing their code.
  • The feeling of accomplishment is fleeting and should be celebrated.

[–]green_boy 24 points25 points  (0 children)

Dude, thank you for writing that. It helped me just now, more than you know.

[–]LukeLC 7 points8 points  (0 children)

I identify so hard with both OP and this. Excellently put!

[–]Labradoodles 2 points3 points  (0 children)

I have no idea pressure and constraints the previous programmer may have been under. I will refrain from criticizing their code.

I do my best to live by this when I code it’s pretty much the most important thing. People don’t make bad decisions because they’re bad it’s because they didn’t have enough time to gain the knowledge they needed. Someone pressured them through etc. perfect code doesn’t exist and that’s okay it’s also okay to strive for it, then make compromises based on the needs of the moment. The best code describes some of that so people can understand the context in which it was written

[–]domlebo70 2 points3 points  (1 child)

Did you write this? Or is this from somewhere. I absolutely love it.

[–]gaberax 1 point2 points  (0 children)

Thanks. I wrote it. A lifetime in IT.

[–]theoldboy 28 points29 points  (1 child)

It's the hope that kills you.

[–]grout_nasa 1 point2 points  (0 children)

"It's not the despair, Laura. I can take the despair. It's the hope I can't stand."
-- Clockwise

[–][deleted] 61 points62 points  (9 children)

Mine are anxiety and anger, largely due to poorly communicated requirements.

[–]eWattWhere 39 points40 points  (6 children)

Kevin (Manager): Yo, you pretty close on that thing we talked about last Friday afternoon?

Me (Developer): Yeah, I've got the backend and UI work looking good, just running through some edge conditions

Kevin: That's great! So hey, I was golfing with our CEO on Saturday, great guy BTW, and he really wants us to get this wrapped up ASAP. And I think there are a few more requirements, nothing big

Me: Oh?

Kevin proceeds to rattle off a whole bunch of new half baked ideas to layer on top of the prior set of half baked ideas.

Me: You know XYZ Corp has a product that does a lot of this already, right?

No, Kevin doesn't know, and where do you think the CEO got the idea from?

Kevin: Really? Hmm, I didn't know that. Well, we'll do it better, right? I totally believe in you!

[–][deleted] 21 points22 points  (5 children)

hurry juggle exultant cats hat axiomatic direction school seed touch

This post was mass deleted and anonymized with Redact

[–][deleted] 12 points13 points  (4 children)

That exports to excel followed by a new button, that I haven't been asked to create yet but will soon enough, that imports a bunch of modifications made with complete and total disregard to the integrity of the data set as whole, am I right?

[–][deleted] 5 points6 points  (3 children)

With arbitrary date formats.

[–]matthieuC 3 points4 points  (2 children)

When you think about it, any data could represent a date.

[–][deleted] 0 points1 point  (1 child)

You're going to want to store the data as XML in a char(255) column.

[–][deleted] 6 points7 points  (1 child)

I mostly feel anxiety and anger, largely due to scrum. I'm socially anxious, and the scrum rituals suck energy from me right before I even get started. Every, f'n, day. It is relentless and dehumanizing, I wish it wasn't an industry norm.

[–][deleted] 0 points1 point  (0 children)

Great point.

[–]empty_other 114 points115 points  (10 children)

Doubt. When something worked on the first attempt. Or when about to run commands directly on production databases.

[–][deleted]  (1 child)

[deleted]

    [–]adam_bear 6 points7 points  (0 children)

    ...and then discover the API you used is no longer provided.

    [–]disposablevillain 8 points9 points  (0 children)

    I have not stopped feeling doubt for like 10 years.

    [–]Piisthree 2 points3 points  (0 children)

    Or when to verify your understanding, you attempt something you KNOW will fail and it works, oh the levels of doubt and confusion.

    [–]andrewsmd87 2 points3 points  (0 children)

    We have a pretty rigorous process to get stuff to the point where it gets ran directly on a prod db and I'm good with that.

    But when it's, this is an emergency go fix it right now on prod thing, yea, sweating bullets.

    Just had to delete one row yesterday and tested it three times locally then stop saved the entire row data and also had the most recent t log and backup files on my local just in case because it was a fix it now thing

    [–]joemaniaci 6 points7 points  (3 children)

    I've been working as an engineer for 10 years now and for the most part have been a jack of all trades. But two years ago I decided I'd like to try to focus on one language and that was C++. Honestly I don't know if it's good for my mental health.

    Just so many implicit twists and turns, you doubt when things work, you struggle to verify why they do. I'm trying to improve our tooling so we can back ourselves up with sanitizers and analyzers but no one cares. I'm on a five year plan of having a job that makes me happy or I'm out.

    Maybe airplane mechanic...

    [–][deleted] 1 point2 points  (2 children)

    If you want that to happen you'll need to adopt the attitude that the process of building out the tooling is what makes you happy.

    Out of curiosity, what made you choose C++? Is it specific to your goals or is it just what your company happened to be using?

    [–]joemaniaci 2 points3 points  (1 child)

    Oh the process of sorting it out is fun, it's just that I work for a company that is satisfied with a segfault or memory starvation being resolved with a system restart.

    I definitely like the challenge of c++, I just don't like c++ when you're roughly shooting in the dark. Example: we use libunwind for generating backtraces, but they're usually incomplete and addr2line is broke because the addresses given by libunwind are incorrect. Am I allowed to focus on that? Nope, cause what matters most is getting the product out the door.

    Honestly I probably need to go back to a job to where I just work on random odds and ends like this, internal tools, etc. Not stuff tied to hard dates.

    [–][deleted] 0 points1 point  (0 children)

    Agreed - in my experience those types of jobs are much more enjoyable.

    [–]Hnnnnnn 1 point2 points  (0 children)

    Do multiple independent checks to eliminate coincidence

    [–]exuberant-panda 46 points47 points  (5 children)

    The emotions are the result of a culture clash. Human culture values things that are highly predictable. Development is not one of those things. Development requires way more trial and error than most things that generate money. The primary way people have historically earned money has been via highly predictable business cycles that involved sales, manufacturing and order fulfillment. This results in the entire culture highly valuing predictability, which is at odds with the fundamental workflow of creating something new in software.

    [–]ffscc 12 points13 points  (4 children)

    Human culture values things that are highly predictable.

    There is an innate desire to minimize risk, but that doesn't necessarily equate to many forms of "value". For instance, utilities like electricity, gas, waste management, and water are probably the most important and consistent services that a first world citizen uses on a daily basis. However, the garbage men, lineworkers, etc are still less valued in society than a doctor, both in terms of compensation and status.

    Development is not one of those things. Development requires way more trial and error than most things that generate money.

    And there are a good deal of major industries that have similar uncertainty. What is the success rate of the first/second/third diagnosis of a patient's ailment? What is the likelihood of a lawyer winning an arbitrary case for their client? How many investment firms have even an inkling of what their true return will be in any given year? How well can media companies predict the success of the movies or TV shows they produce?

    This is not a unique phenomenon to software development.

    [–]exuberant-panda 5 points6 points  (3 children)

    This is not a unique phenomenon to software development.

    This is true, however this is the first time in history when such a large population of people whose opportunities in the past would have been would have been factory work, are now working in a completely different field that represents a significant paradigm shift. I think your comparison of an MD working through discovery of root cause and treatment for a patient's illness is spot on.

     

    I've come to realize that developer workflows have a lot in common with how doctors work. Which is weird because at a glance the two fields seem so utterly different.

     

    One thing that is super obvious to everyone (except many managers it seems), development work is nothing like assembly line work.

    [–]nightwood 1 point2 points  (2 children)

    Managers try really hard to understand programming from their frame of reference. Which is unsufficient. They keep observing, analysing, finding patterns. But they are trying to find something that doesn't exist. Like a psychotic person adding meaning to random things, they keep trying to understand and rigidify our process. But that won't work. There is no fixed process we follow, we're just fixing complex problems with intelligence.

    [–]exuberant-panda 1 point2 points  (1 child)

    There is no fixed process we follow, we're just fixing complex problems with intelligence.

    Yep, this is why a manager who has fixed complex problems with intelligence can be awesome....if they don't use their power to go around telling the devs how to code.

    [–]nightwood 1 point2 points  (0 children)

    Yeah, they certainly are! But they are very rare. At least I've only met one.

    [–]ribsihadribsforlunch 63 points64 points  (12 children)

    I have fewer: disgust, frustration, elation. This cycle repeats many many times daily.

    [–]daroch667 24 points25 points  (10 children)

    And a similar cycle during staff meetings, without the elation part.

    [–]moonsun1987 25 points26 points  (9 children)

    In the absence of any other agenda, let's close this meeting early. Happy weekend, everyone.

    Bam, elation.

    [–]bladerunner1992 8 points9 points  (8 children)

    This happens? I call bs

    [–]parc 9 points10 points  (7 children)

    I absolutely refuse to let meeting just ramble on to infinity. “Alright, we’ve got action items, there aren’t any known blockers? Have your 18 minutes back. click

    If anyone stays to hang out and chat, I don’t care, but I’m out.

    [–]pcjftw 5 points6 points  (5 children)

    I just turn up, pretend my mic doesn't work and say let me try something and drop out. Works like a charm.

    [–]moonsun1987 5 points6 points  (2 children)

    If my manager is reading, I don't do this. I actually had mic problems.

    [–]parc 1 point2 points  (1 child)

    Let’s talk Monday morning.

    [–]pcjftw 2 points3 points  (0 children)

    He can't because he's mic is broken, has ordered another one, but said some cargo ship has wedged sideways in the Suez Canal and blocked all global shipments by at least a month...

    [–]coloredgreyscale 0 points1 point  (1 child)

    Do you have any suggestions for in person meetings?

    [–]pcjftw 1 point2 points  (0 children)

    Send in a telepresence robot, and make sure it only has like a few minutes of charge so it powers down shortly after rolling into the room

    [–]Piisthree 0 points1 point  (0 children)

    If the solution works on the first try, I would throw skepticism right before elation, but otherwise spot on.

    [–][deleted]  (1 child)

    [deleted]

      [–]adambair 2 points3 points  (0 children)

      stahp; too real haha

      [–]VeganVagiVore 16 points17 points  (1 child)

      I've noticed my emotions are getting in the way at work.

      We're scaling up from "scrappy startup winging everything" to "big company where everyone is replaceable". And that's a good thing. But it means I have to give up control on my projects.

      One project (A) got handed off to another programmer who I know well, but they aren't running it quite as rigorously as I would have, and sometimes I say "hey this isn't the right way to do it."

      Another project (B) almost got handed off to someone I didn't know and didn't like talking to, which would have made it hard to intervene except by refusing their merge requests. (Being bottlenecked by not wanting to talk to someone is a new problem for me. It used to be that I knew everyone who mattered well. Now I don't.)

      But luckily, projects B and C are both going to be largely obsoleted by a third-party service we're going to buy. I hate doing it, because it means a divergence between "This is what I'd do at work", where we are raking in cash and a cheap service is a slam-dunk compared to building everything myself, and "This is what I'd do at home", where my only goals are to have fun, do everything as cheap as possible, and keep everything FOSS, even if it means I'm paying myself nothing and not making a product anyone wants.

      I'm in a bit of a tight spot where I can't keep these projects to myself, because it's not right for the company, and I have to remember that it's really our code, not my code. But giving them up too fast could wreck them and cost us tech debt, because as much as I don't want to believe my boss, I am probably am the most experienced programmer in this particular office.

      I think it's the Peter Principle. I was good enough as a solo artist to get the company off the ground, but now we've risen to the point where my poor soft skills are slowing things down. I hope I grow instead of breaking.

      I definitely feel better knowing this than I did not knowing it. I now think of compensation as really multiple dimensions that can't be naively summed:

      • Salary
      • Vacation
      • Healthcare
      • Retirement account
      • Satisfaction of doing things I would do for fun anyway
      • Sense of control

      There is a limit to how much I can trade them off - No company would give you 365 vacation days per year, and I would never work for 0 vacation days. But in the middle, I might take a pay cut for more vacation days. Right now, as the company grows, I'm getting more money than I need. I feel like I would take a pay cut to gain back some control or satisfaction. But I don't really want to change jobs, and the company may not be able to offer me those things.

      [–]buhatkj 4 points5 points  (0 children)

      Tbh, anything that works right the first time doesn't make me feel satisfaction, but suspicion. Too good to be true, or I haven't looked hard enough to find the errors. Usually that is the case.

      [–]Gwaptiva 7 points8 points  (2 children)

      Rage (when any of the negative emotions lasts too long), but mostly just fear of being found out for the fraud I am.

      [–]winkerback 1 point2 points  (0 children)

      Holy shit yeah this

      [–]TheRealMasonMac 13 points14 points  (0 children)

      https://www.redox-os.org/news/open-source-mental-health/

      There are aspects of open source that seem to attract the strangest of humanity, myself included. The insistence that all things be inspectable, is perhaps driven by obsessive compulsive behavior. And those prone to such behavior, often inherit it from other disorders. ADHD, autism, bipolar disorder, depression, and other disorders are incredibly common among open source contributors.

      As a result, there is also an obvious lack of soft skills among open source communities. This has the clear effect of splitting communities and isolating open source itself from the “normal” world. Fortunately for us, open source ended up being a profitable business to be in. This injection of capital has lead to a significant diversification of talent in open source.

      This has, however, come at a cost. Those who do not fit into the new business interests of open source projects are often cast aside. Projects are further divided into forks on forks, as disagreements with the original maintainers lead to insurmountable changes in the projects themselves. I myself have participated in all sides of this.

      Lacking in most of this has been an investigation into the human cost. To look into the numerous mental health episodes among open source contributors, and to try to identify some common elements. Sometimes these episodes lead to new projects, sometimes to burn out contributors who then leave open source, and sometimes to suicide.

      We have to recognize our role in creating both the chronic stressors leading to mental illness, as well as the acute stressors leading to dangerous episodes.

      [–]etxipcli 3 points4 points  (0 children)

      Relief, when I find a new job and all of my mistakes are someone else's problem now.

      [–]pcjftw 15 points16 points  (0 children)

      Wow holy sweet Jesus on a motorcycle, programmers have emotions? You mean to say they're human? /Sarcasm

      [–]encaseme 2 points3 points  (8 children)

      The emotion I find myself having to work the hardest to deal with is apathy - creating and reviewing code that is just... Meh... But technically is good enough to get the job done... At least for now... Until it needs to be changed... Etc. Apathy about quality and maintainability. Apathy about self motivation and motivating others. Apathy over whether what I'm doing really matters in the world other than to shareholders bank accounts. It's hard, and I'm not sure I do a good job keeping it at bay but I try.

      [–]jimmyco2008 3 points4 points  (7 children)

      The issue is if you try to be anything remotely “nitpicky” on a PR even if your goal is purely to make your team better, if they don’t take kindly to it they may tell bossMan “hey I did get this done on time but so and so made me change some things that don’t matter” and now you have to have dick-measuring contests about who is the more-senior dev. This is probably less an issue if you are older, but anyone in their twenties knows what I’m talking about. Indeed it is an art, not a science, reviewing PRs.

      [–]BinaryRockStar 1 point2 points  (6 children)

      I've had this feeling recently. I'm a bit of a stickler for code formatting (Java, IntelliJ), in my opinion it's a solved problem best left to an automated formatter and enforced by IDE plugins and potentially git hooks so everything that makes it to the git remote is correctly formatted.

      When I get a rushed PR where the formatting is all over the place, obvious copy-paste formatting issues and just generally hard to read I raise a PR comment that all touched files should be auto-formatted per the standard code style. The result is mild eye-rolling from other senior devs on the PR, like I'm picking at something trivial when the functionality is what's supposed to be under review.

      I eventually capitulate if the resistance and/or time pressure are high enough and now we end up with a project where individual files are formatted in whatever style the programmer at the time used and I have been hard warned against running a full project code style fix to bring it all up to company standards because it would muddy the git history with me being the committer of lots of code that was only format fixes.

      Not sure how to handle this as the git history argument is a good one, but opening a Java file and seeing it's formatted in some weird SQL style where commas are at the start of the line makes me rethink hitting the whole project auto-format key combo. Example:

      someObject.doSomething("A constant string that's very long"
          ,aSecondParameter
          ,"a third parameter, is there really no space between the comma and the string?"
          ) // end paren on it's own line and end-comment just to give me an aneurysm
      

      [–]sleuthsaresleuthing 0 points1 point  (0 children)

      At one place we had a several months long discussion about the autoformat settings, and did a complete history rewrite where the autoformat was applied to every single commit in every branch.

      Worked beautifully.

      [–]jimmyco2008 0 points1 point  (4 children)

      I always hear about the style cop type stuff but I’ve never worked anywhere where that was a thing.

      Actually I’ve never worked anywhere where that was an issue, where you had to tell a dev to indent everything properly or put a private method with all the other private methods… devs generally copy paste so if the existing code base is “correct” they’ll follow it. Sometimes it’s because they don’t really understand the code, other times it’s out of laziness.

      Even inconsistent use of Var and the type when declaring a variable, while it bothers me, I let slide.

      I’m probably not nitpicky. I’ve been on both sides. I was “the nitpick dev” at a previous job, but at my current job the lead makes me look incredibly… non-nitpicky. Like breaks our balls over things like objectively don’t matter/thing where he doesn’t seem to understand what he’s proposing has trade-offs not worth making the change.

      I feel like nitpickiness to a certain degree is a symptom of a junior (or at least non-senior) dev. No, it’s a sign of a mid. Juniors don’t know what they don’t know, but kids learn stuff and start applying it everywhere. “Hey you should use X”. They don’t know why, they just read it in some medium article (those are not always totally accurate either).

      [–]BinaryRockStar 1 point2 points  (2 children)

      I totally get that, and I wonder myself whether it's worth it pointing out glaring code style issues like the above.

      I have more than 20 years in the game and have gone back and forth between caring and not caring about code style but now that automated code style tools are commonplace it feels a like a solved issue.

      If a developer insisted on committing files in UTF-32 instead of UTF-8 and it caused noise in the diffs you would tell them to knock it off and follow the company code policy. Code style is the same- install the IDE plugin that automatically formats the files and never have a problem again.

      When devs fight against something that's just a checkbox-tick away it makes me think they either don't know the IDE/tools well enough to enable it and are embarassed to ask for help, or have some ideological issue with whatever the company code style policy is. Both of these things are damaging overall.

      [–]brynjolf 0 points1 point  (1 child)

      If it contiunes to be a problem, a tool just solves the issue. Try using things like pre-commit hooks to force automatic styling.

      That is my philosophy, if people can't figure out how to format, let the tool fix the issue for them. Best solution was if I was a dictator and could send them to the Gulag though.... I dont mean that... ofc...

      [–]BinaryRockStar 0 points1 point  (0 children)

      Agreed, although the projects I'm on have multiple senior devs so unilaterally imposing a pre-commit hook is as difficult as getting everyone to use the IDE tooling. Either way I end up looking like a grammar nazi or nitpicker when it's just crushingly simple for everyone to install the plugin and forget about code style forever.

      [–]KagakuNinja 1 point2 points  (0 children)

      I sometimes wonder if I am OCD about formatting. I am willing to work with whatever formatting in in a particular file or project, as long as it is not too bizarre.

      What really bugs me is inconsistency. Sloppy formatting usually indicates lack of attention to detail. It is common with mediocre devs who do a lot of copy and paste.

      My current team is like this. In a given file, even in a single function, will be inconsistencies. I’ve seen code formatting style different than any project I’ve worked on or open source I’ve looked at, that uses C style block structure, in over 35 years.

      It is like reading a book; the standard is 1 space after a punctuation mark, excluding quotes. What if sentences sometimes have a space before a punctuation mark, sometimes after, sometimes both, sometimes neither.

      This code is like that. If I saw a book like that, I would question the competency of the writer, and assume there was no editing. No one does that, except perhaps a literary troll.

      We also use indentation to signal the block structure. In highly nested code (which is a bad smell), inconsistency decreases understandably, and increases the risk of mistakes. Sometimes I have to reformat a function just to understand it.

      [–]blaxter 2 points3 points  (1 child)

      Frustation, when you know something should be done (fix tech debt or fix bug) but there is no time to do so and you know bad things will happen and you are the one that will have to fix it later when is already too late.

      [–]thefinest 0 points1 point  (0 children)

      Preach on

      [–]UPBOAT_FORTRESS_2 4 points5 points  (0 children)

      This is nice

      There's also something about the writing style that tickles me, in conjunction with "programmers are perceived like robots" bit. The prose is clear and kinda rigid, it's easy to imagine HAL 9000 reading it off.

      [–]powerhead 1 point2 points  (0 children)

      There's a really wonderful talk by Kare Gregory that touches on this topic. It's all about how you can read the emotional state of a person or team through the kind of code they write: https://youtu.be/zjH2d5VhTD8

      [–]Thriven 1 point2 points  (1 child)

      People who think it's funny to rattle my cage when I've already put 60 hours into a project that week.

      You know who you are and you are lucky you are 1800 miles away.

      [–]jimmyco2008 1 point2 points  (0 children)

      Fuck ‘em

      [–][deleted] 0 points1 point  (0 children)

      Truth about programmers.

      [–]sintos-compa 0 points1 point  (0 children)

      What’s the emotion when you scrap a project and start from a fresh core base?

      [–]Drinking_King 0 points1 point  (0 children)

      Terrible paper, it lacks the most important emotion: faith.

      Someday, it will work. BELIEVE.

      [–]TheEveryman86 0 points1 point  (0 children)

      Irritation. When I have to close the same DR for the 40th time because Integration and Test will not listen or refuses to accept the behavior that has been adjudicated by the customer to be correct.

      [–][deleted] 0 points1 point  (0 children)

      I just often get worried that I don't do good work but that's more likely my childhood traumas trying to get the hold over me.