1. 64

  2. 22

    At my previous job, I used to regularly point out both to my more junior engineers and to my late-night-code-committing CTO the punchcard graphs on a few of our GitHub repositories. Funny how the ones with the latest commit clusters “coincidentally” had the most issues filed and the most hotfix tags. Not that that’s a causal relationship ;)

    1. 9

      The stats lover in me wants to know if they got more defects because they changed more lines of code or if their defects per change rate increased. Or both.

    2. 16

      Don’t crank out code at 2AM, especially if you’re the CTO


      Couldn’t help but notice this irony ?

      1. 2


        They’re more like guidelines. ♥

        1. 4

          Yes! E.g. working at 2AM is fine if that’s normal working hours for your sleep cycle and you’re not setting a bad example.

      2. 15

        I never quite understood the appeal of pulling all nighters. After about 9 PM, I’m done for the day and don’t try to write code anymore, because I know I’m gonna bugger it up big time if I try. Same rule for studying for exams - if I really need to cram, I’ll sleep now, and wake up early later to study for it.

        1. 24

          Different people have different cycles. Personally, I’m usually mostly useless before 3 PM and often at my most focused between 7 PM and midnight.

          1. 6

            Sometimes, you go on a roll. I never did it on a regular basis - but I find myself working in cycles - very intense for a week or so, then coast for a few days, then back. In the intense part, sometimes, it’s good to give in and keep coding until the part is done.

            1. 21

              I’ve found that it’s helpful for me to stop at a point where I know what the next step is. It makes ramping back up the next day easier, and helps maintain steady progress. If I stop when I finish something, it somehow makes it harder to get back into the groove the next time I start up. This is -especially- the case over weekends.

              1. 5

                Me too, but I’ve learned to watch for when I get simultaneously too tired to think and too far “in the zone” to stop. It’s sort of like berserker mode. The next day I look at what I was doing for the last hour and it’s like “oh, instead of trying to scratch through the door with bare hands, I could have just turned the knob”.

              2. 5

                I’m not a fan of working crazy hours but actually I’m often really productive if I eat dinner and start working around 7pm.

                Maybe it’s the lack of external interruptions, I don’t know.

                1. 3

                  until about 9pm i’m done for the day, then if i don’t stop myself i could code until ~3am

                2. 12

                  I have worked in cultures where it was expected of you to commit all of your time to the projects. I saw two major contributing factors to this mentality.

                  The first was a sense of superiority from the owners of the company. Whenever we would voice a concern about being tired, or not wanting to push those hours and get some sleep, the response was always a degrading “Well when I was in your position this was just how we did things.” I’m sorry, but I really don’t give a shit what you did when you were a developer, I care about my health and wellness way more than your company.

                  The second I saw was absolutely unreal time estimates for clients. The quoting process usually went hand in hand between design and development. I don’t want to take anything away from designers because they do amazing work, but their quoted timelines for deliverables are very manageable and do not translate well to development. Two weeks may be enough for a few mock ups, a round of revisions, and an approval. It is not enough to build a fully responsive, extremely custom, CMS. There will be bugs. This pushes back deadlines, this upsets clients, this costs more to finish.

                  I’ve lamented about design agency work in the past, but its something I wont be able to shake for a while. I chalk it up to broken cultures.

                  1. 8

                    This feels like an invitation for anti-hubris but also is too general.

                    Some people work better at night; a couple people on my team arrive at ~noon and leave at 8pm, and will still be committing at 1-2am from home. It’s what works for them.

                    Personally, I enjoy coding. It’s how I relax sometimes. I’ll crank out some unit tests before bed if I’m bored.

                    There is also a huge difference between deploying code and writing code. Deploying code with no one around to monitor things post deploy is irresponsible. Writing code is fine, just make sure your org has a proper PR/CR process that everyone abides by.

                    1. 6

                      There are also significant failure modes even if the CTO writes 1. error-free code that 2. correctly solves 3. a real problem, because the team needs to integrate your work. That can be a significant cost at the wrong time even if everything else is right.

                      1. 4

                        In college, I made a rule that banned all after-midnight coding (excepting the 3-4 days a year when I have bad insomnia). I’d stayed up until 2am working on an assignment for splay-trees in C++ and awoke the next morning, completely horrified at the code I’d written. In my ignorance, I continued to massage the horribleness instead of burning it all up and starting over. (I didn’t do so well on that assignment.)

                        More to the point: I understand the need for occasional crunch, but if you’re doing it regularly, you probably aren’t very good at your job, be it scheduling or actual execution.

                        Related: OSS tends to prize high commit rates over everything else, even bug rates.

                        1. 4

                          Related: OSS tends to prize high commit rates over everything else, even bug rates.

                          Well, that could be an artifact of github etc. prominently featuring that stat. I don’t think it’s universally true.

                        2. 3

                          I have learned this the hard way too many times. I’m a slow learner, apparently. I’ve never really been forced to do it for work, but I’m naturally a night owl and late at night is usually when I experiment with tech. However, I found that I’m much more prone to oversights and avoidable missteps. Stay in school kids.

                          1. 3

                            “codewithoutrules.com” gives us a good rule for coding. Ok.

                            1. 2

                              As soon as Twitter was linked to in the article, I imagined an old geezer hating his life and missing his family, but seeing the opportunity to score points and appear interesting online.

                              Thus he kept up social media appearances; he tweeted to get retweets and likes and attention and all that. On the way home he felt something next to his fatigue, which he couldn’t quite recognize, but recalled doing things in his childhood because his parents told him to.

                              In other words, the CTO may have known this was irresponsible and stupid all along, but nowadays you’re expected to not keep it to yourself. He fulfilled his Instagram duty.

                              Pure conjecture on my part, but no one else commented along these lines.