Live data from Hacker News

Things I Learnt from a Senior Software Engineer

neilkakkar.com

101–110 of 301 posts

Re: Things I Learnt from a Senior Software Engineer

#101
post #95

Earlier quoted context omitted.

It's sad to see in the current century that a group of erstwhile professionals jump to "porn stars".

Why is this being downvoted? It is highly inappropriate to do this in a work context.

Maybe. But they were doing web filtering, so I get it.

Re: Things I Learnt from a Senior Software Engineer

#102
post #81

> in my team culture it’s not frowned upon to “snoop behind” people writing code. Whenever I sensed something interesting going on, I’d roll around and watch what was happening. Agh, I'd hate that. In fact if anything interesting had been going on on my screen it would immediately stop, no way I could work with someone watching. I struggle enough at desks with my back to a door or where people walk by, just can't sto…

We have a similar culture on my team. When I was a junior engineer, being able to poke my head into any open office that sounded like it had an interesting conversation going on was really an invaluable way of learning.

Listening to or participating in technical conversations is just regular business, but the proposal of looking over someone's shoulder sounds very distracting and unnecessary...

Re: Things I Learnt from a Senior Software Engineer

#103

Earlier quoted context omitted.

Isn't Cloud-Computing something that should make it unnecessary to name individual computers?

How do you make a service call or ssh into a machine without a name?

IP Address. We have “servers” that get created and destroyed nightly based on how many items are in the queue. All of our web servers are behind autoscaling groups. Even the ones where we have a min/max of 2. If it doesn’t respond to a health check it gets killed and another one is brought up.

Ideally, none of our servers are special.

Re: Things I Learnt from a Senior Software Engineer

#104
post #21

> Naming your clusters? Naming them after the service that runs on them is great, till the point you start running something else on them too. We ended up naming them with our team name. This is covered by RFC 1178¹, Choosing a Name for Your Computer (from 1990): Don't choose a name after a project unique to that machine. A manufacturing project had named a machine "shop" since it was going to be used to control a nu…

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.

Re: Things I Learnt from a Senior Software Engineer

#105

Earlier quoted context omitted.

This is EXACTLY where comments should be used, great example! Extremely high-performance database code is not what most of us are doing, however. We are doing enterprise software development to send emails and scrape money out of people. I would want that function to be multiple smaller functions with docstrings and such, but obviously, that would add stackframes to the call stack and be slower. Additionally, many mo…

> Extremely high-performance database code is not what most of us are doing, however. That's true. But look at the overall coding style in that file: Code is structured into cohesive blocks, which are prefixed by a comment which explains in english language the intention, pitfalls, limitations of the following code. I find this quite elegant and readable. An ideal to aspire to. I am not advocating nonsensical JavaDoc…

> If you are able to just use names and types to document your intentions, pitfalls etc ... then by all means, do just this

That's sort of the point. Step 1, your code should be self explanatory. When the natural interpretation a reasonable person would have from reading the code differs from reality: that's when you add Step 2: add comments to "fix" the gap between perception and reality. The less Step 2 is necessary the better.

Re: Things I Learnt from a Senior Software Engineer

#107
post #82

Earlier quoted context omitted.

What's wrong with the spelling? He's from the UK.

I don't know what GP has a problem with, but I don't think the author's British - 'internalize' in the opening paragraph.

The zed disease has, unfortunately, spread.

Re: Things I Learnt from a Senior Software Engineer

#108
post #21

> Naming your clusters? Naming them after the service that runs on them is great, till the point you start running something else on them too. We ended up naming them with our team name. This is covered by RFC 1178¹, Choosing a Name for Your Computer (from 1990): Don't choose a name after a project unique to that machine. A manufacturing project had named a machine "shop" since it was going to be used to control a nu…

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.

Re: Things I Learnt from a Senior Software Engineer

#109
post #61

Earlier quoted context omitted.

I think it's okay to be funny in test cases. For instance, my test data has included the user-agent string, "The Thrilla In Mozilla".

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

why not? best kind of humor

Re: Things I Learnt from a Senior Software Engineer

#110

The main value in software is not the code produced, but the knowledge accumulated by the people who produced it Don't agree with this at all. If you're relying on people to maintain knowledge then you're doing it wrong and setting yourself up for failure. Document the why.

You are thinking just the running system. The decisions behind why, the quirks of the software, how that all fits together, and the knowledge of why you should do certain things (like monitoring, experiments and whatnot) is important.

Good luck documenting all that. Good luck making that document discoverable and readable.

Post reply on HN