Live data from Hacker News

Things I Learnt from a Senior Software Engineer

neilkakkar.com

121–130 of 301 posts

Re: Things I Learnt from a Senior Software Engineer

#121
post #99

Earlier quoted context omitted.

I've read that in feng shui what you describe is called the "command position". I'm not able to work with my back to a crowd. That's a recipe for anxiety. I quit a company when they moved my desk so my back was to a hallway, and refused to compromise on this issue in any way.

If it happens again, I've been told that having a mirror on your desk so that you can see what's going on behind you can help a lot.

Or if your monitor is one of those glossy ones, just glance into a darker part.

Re: Things I Learnt from a Senior Software Engineer

#122
post #4

The referenced idea of a 'human log' is great[0]. I started doing something similar 4 years ago and it eventually evolved from per-project notes into a full diary. Being able to search for 'August 24 2016' and know exactly what I did that day is quite powerful. I encourage anyone to take 10 minutes(or 30...) at the end of the day to write up what they've done. Just a text file with minimal formatting has scaled to 2.…

I have an admittedly crazy thing I do occasionally. I do 5 minute pomodoros. So it's 5 minutes of writing code followed by 1 minute of reflection. In that one minute, I'll write down what I did in the last 5 minutes (it takes about 10 seconds to write since it isn't much ;-). I'll also add a few TODOs that I'm hoping to do, or break down ones I've already got.

Now, 5 minutes seems an impossibly small amount of time, and admittedly this is a difficult technique. It's also very tiring (I can't do it day after day), but once you get good at it, it's surprising what you can get done in 5 minutes. You don't necessarily need to have written code -- just made some progress towards understanding something, etc.

Later, I'll go over my notes. I've got everything annotated every 5 minutes which means that it's ripe for thinking about how I can improve. Did I make a wrong turn somewhere that wasted me time? Was there a way I could have detected that? Did I decide not to do something test first when it would have been better to do so? Etc, etc.

I should point out that while I have a timer, I only use it as a suggestion -- I don't have any notifications for instance. It's just that if I glance down and notice my timer has gone (or is close), then I wrap up what I'm doing to get to the reflection stage. Similarly, if I'm writing TODOs and it's being productive, I don't mind doing it for 5 minutes or so. Finally, if I run into something really puzzling, then I just turn off the timer. Some problems need thinking time (though I have found that having only a few minutes to make progress often forces me to try something in order to get more information and that will crack the nut -- indeed, far more often than I would have ever suspected).

It's the only tool I've found that really helps me improve my technique. The other pretty cool thing about it is that I've found that this log helps me get in and out of the zone extremely quickly. Even if I've put it down overnight, I'm right back into it within a minute or so.

I am measurably much more productive with this method (like 2 or 3 times more productive), which surprised me initially (I thought I would be much less productive). The real downside is that it's draining. I can't keep it up for more than a couple of days at a time.

Anyway, very dissimilar to what you were talking about, but I highly recommend it for those interested understanding what they are doing and how to improve.

Re: Things I Learnt from a Senior Software Engineer

#123
post #61

Earlier quoted context omitted.

As long as you don't go into potentially offensive humor

Upthread we have someone boasting about naming their business machines after porn stars.

Why does that bother you so much?

Re: Things I Learnt from a Senior Software Engineer

#124

> I like a bit of humour in my code, and I wanted to name it GodComponent. No. Just no. Do not ever be funny in code. No one else likes your humor, and it's distracting. (Ignoring the other reasons "GodComponent" is a bad name.)

I needed to wrap the code that handled thread management that I use in Swift. I called the component Threader, and in the comments I mention I named it after the TMNT character Shredder. Two things came from that: I have gotten a chuckle from all the developers I introduced to that code, and no one has forgotten about it. Some humor is useful.

The trick here (and in someone else’s “Thrilla in Mozilla”) is that you don’t need to understand the humor or reference to understand the code. It’s just a nice little bonus, since threader is already a perfectly reasonable[0] name.

This is different from insisting that helper functions in brains.c be of type pinkyfunc_t.

[0] I was tempted to undercut my own point and write cromulent there instead.

Re: Things I Learnt from a Senior Software Engineer

#125
post #4

The referenced idea of a 'human log' is great[0]. I started doing something similar 4 years ago and it eventually evolved from per-project notes into a full diary. Being able to search for 'August 24 2016' and know exactly what I did that day is quite powerful. I encourage anyone to take 10 minutes(or 30...) at the end of the day to write up what they've done. Just a text file with minimal formatting has scaled to 2.…

I created something for myself to use https://www.logbook.my

I can both back date and future date entries.

I keep a tag called "Daily Entries" with a timestamp on the day of what I use, I can automatically add a timestamp with the shortcut "CTRL + T"

Future dating allows me to plan ahead as well.

I write an entry about a future event (ie a meeting) and prefill some information. Then when the meeting happens, I just open up the entry and start entering.

I've been using Logbook since 1st May, and personally now have 1139 entries, and 576 tags.

I've been recording:

- Recipes - Meeting notes - Shower Thoughts - Career timeline - Car maintenance - "Best Practices" on a variety of subjects - Many more

I also use timestamps a lot, and have a preference for how they are formatted so I created https://timestamps.aizatto.com

I hope some of these may help people here

Re: Things I Learnt from a Senior Software Engineer

#126
post #4

The referenced idea of a 'human log' is great[0]. I started doing something similar 4 years ago and it eventually evolved from per-project notes into a full diary. Being able to search for 'August 24 2016' and know exactly what I did that day is quite powerful. I encourage anyone to take 10 minutes(or 30...) at the end of the day to write up what they've done. Just a text file with minimal formatting has scaled to 2.…

And what does one do when one is struggling with burnout/depression/insomnia and the only legitimate thing to write down is "Not a whole lot really." for days in a row? (A problem a um, ... friend has, of course.) Risky habit to have under those circumstances.

I've had burnout a few times in my career. I think it happens to anyone who really enjoys their job. It's like being placed in front of a pile of candy -- just one more piece!

But burnout is an awful feeling. You aren't able to work. For me, I would stare at the screen for hours on end without being able to get started.

I found that 2 things helped me the most. First the pomodoro system. You are probably familiar with it, but just in case: you have a 25 minute session, where you devote yourself to nothing but concentrating on work. For me, it's unbelievably important to get my first pomodoro in as early in the day as possible. I also found that it is just as important that this pomodoro is coding: not reading mail. Not doing a status update. Not having a standup meeting. Not investigating some bug. I've got to write code as soon as I can in the day. That flips a switch for me. Very important, especially if you are burned out: show up for work significantly before your fist meeting of the day -- the meeting will suck the life out of you and you need some life to suck.

The next thing, strangely, is a TODO/log of what I'm doing. Being burned out means that everything is a barrier. Usually the barrier is too high, so you are stuck staring at it with no idea how to get over it (because normally you would just step over it).

When I first start a pomodoro, I write a TODO of what I'm going to do for the next 25 minutes. I find it's best to spend as little time as possible doing it. Just write down the first thing that comes to your mind about what you need to do. Write 3-4 items at least. Then start tackling the first one. Inevitably, you will find that your TODO was not good -- because you didn't spend time thinking about it. As soon as you realise what you need to do, update your TODO and then do it.

It's tempting to write the code and then write down what you did. I find that it works best to do it the other way around even though it breaks the flow. When you are burned out, flow is quite hard to maintain and any distraction is going to grab you hard. By focussing on making sure your TODOs are correct, it means that you can easily jump back in.

The biggest thing to realise is that you will often be punted out of the zone and will be staring at your screen. What you need to do is to say to yourself, "Just one more" -- which means, making an easy TODO for yourself and writing the code to fullfil it. Then "Just one more". Eventually you will get distracted. When you finish being distracted, turn on the pomodoro timer and say, "Just one more".

At first you may find it hard to do more than 4 pomodoros in a whole day. Don't worry about it. Just try to do as many as you can. Then the next day try to do more than the previous day. I have found that I can claw my way out of burnout pretty quickly like this. It doesn't take long before I'm enjoying my work again. After that, the productivity starts coming back and things start to feel easy again.

Hope this helps.

Re: Things I Learnt from a Senior Software Engineer

#127
post #99

Earlier quoted context omitted.

I've read that in feng shui what you describe is called the "command position". I'm not able to work with my back to a crowd. That's a recipe for anxiety. I quit a company when they moved my desk so my back was to a hallway, and refused to compromise on this issue in any way.

If it happens again, I've been told that having a mirror on your desk so that you can see what's going on behind you can help a lot.

Wouldn't that cause even more distraction as you see all the people walking behind you?

Re: Things I Learnt from a Senior Software Engineer

#128

> I like a bit of humour in my code, and I wanted to name it GodComponent. No. Just no. Do not ever be funny in code. No one else likes your humor, and it's distracting. (Ignoring the other reasons "GodComponent" is a bad name.)

100% with you on this. I find the replies to your comment here remarkable.

Namings should be descriptive not idiosyncratic.

It might be just like the guy I spoke to last month that said he just makes everything public when writing Java. Some people can have opinions that differ from best practice, it doesn't justify them, however.

Express your personality when you speak to people face to face, tell a joke, make witty observations at lunch, or in a code review meeting, don't express your personality in manifest idiosyncracies in your comments and code.

Re: Things I Learnt from a Senior Software Engineer

#129

Earlier quoted context omitted.

If you designate your servers with numbers or meaningless identifiers instead of names, you also won't ever feel guilty about killing and replacing them. I believe this is (somewhat gruesomely) called the "pets vs. livestock" approach.

Every time someone trots out that old analogy, I think of my uncle who has a small dairy farm in the U.S. midwest with over 50 head of cattle. He gave each one a name, and when one is sick, he cares for it until it is better if possible.

Right, because 50 is still a small enough number to care about each one. If he had 20,000....

Re: Things I Learnt from a Senior Software Engineer

#130
post #104

Earlier quoted context omitted.

If you designate your servers with numbers or meaningless identifiers instead of names, you also won't ever feel guilty about killing and replacing them. I believe this is (somewhat gruesomely) called the "pets vs. livestock" approach.

If you believe people can't get a little attached to "prodsys3" or whatever, then you underestimate the sentimentality of some of us. ;) Of course, the other thing you can do is name server roles rather than specific hardware, so all of your servers are immortal, Ship-of-Theseus style.

Yeah, I work for a CDN with tens of thousands of machines, and I still miss wac052.mad when we decommmed that POP 5 years ago.
Post reply on HN