Lurker News
Sharing something that I wrote for my use but I think can be useful to others (I am an engineer with the title of Senior Software Engineer)

Visit [1] for a full list (table view gives a lot of options. See "Controls"). Visit [2] for a summary. The source of the list is at [3]
1. https://littleblah.com/post/2019-09-01-senior-engineer-checklist/
2. https://medium.com/@littleblah/my-top-25-items-in-a-senior-engineers-checklist-c8e9f9f6e3c2
3. https://github.com/littleblah/senior-engineer-checklist
Feedbacks/Pull requests solicited :)

Comments (143) 32 threads

dbmikus5 replies#
About this one:

> Respect code and systems that came before you. There are reasons for every code and every guard that exists in production
Sometimes there's bad code in prod, or code that doesn't need to exist anymore. You should try to understand when something is there for a good reason versus a bad reason. Cut out the bad code, keep the good code.
I've seen a lot of cases where people assume that current code is untouchable or designed very intentionally, so they wrap it and then you end up with a tower of abstractions built on a poor base.
So, I think as a senior engineer you should try to understand the difference between code that should stay and code that should go.

manojlds3 replies#
I think the main thrust is respect the code and understand why it was there. Don't start with the possible initial feeling that a particular piece of code or guard is not needed. If you do find that it's not needed, remove it or fix it.
Pawka#
I'll second manojlds's comment. If there is bad code/design decision on production - it not necessary means it was bad all the time. Software grows, requirements changes and it is very likely there is a reason why the code is as it is now. Even if it does not solve the problem efficiently today.

People also tend to forget human and business impact. The code might look different if there is 1 week or 4 weeks given for implementation. Timelines, pressure from management/stakeholders to deliver faster has impact to made solutions and implementations.
That is when respect is needed - having empathy to understand why this part of software looks like it is now.

littleblah#
Yup. That was my inspiration, and sadly, I have been on the side as well where things started from scratch, and ended up blowing up couple of months later.
icebraining#
It's essentially the Chesterton's Fence principle.
mgkimsal6 replies#
The opposite can happen.

Took over a system in Aug '18 with someone else. Previous 'senior engineer' had left after a year to go be a CTO someplace else. Everything seemed wrong - bad smells everywhere, spidey-sense a-tinging every day.
In October, we found that code put in place had been losing data since April - we had 6 months of pure data loss. Data that people assumed was 'working' because ... they hit a button and looked at the screen, and it was there. HOWEVER... after the midnight job run, the data was gone. No one ever looked the next day. Until October, and then it was way too late.
The whole "respect the existing code" has a HUGE assumption in it - that things are actually WORKING CORRECTLY in the first place. It also often assumes some of the original people who wrote the code you're dealing with are still on the team and and to answer questions.
THAT particular project above - my gut was "rebuild" - and we didn't. 16 months later, we are still finding code that is simply broken - data is lost, things are breaking, etc. But the whole "well, you're just someone coming in new - all devs just want to start from scratch and you shouldn't do that!" reared its head, and that idea was pushed aside.
I'd turn it around. Someone needs to be able to demonstrate - usually via automated tests I'd think - that things are, in fact, working as expected/assumed. If not, study/understand, then feel free to rebuild/throwaway.
I've taken part in another project with hundreds/thousands of tests, and while I hit code that looks/smells weird sometimes, some of the original people are on the team still, answer questions about 'why', and the tests pass. Even though it sometimes looks 'bad', it's functional and we can demonstrate its functional and working.
This is a HUGE difference, and that assumption about "it's working correctly right now" shouldn't be taken for granted.

DarkWiiPlayer1 reply#
That's why I think code that seems "weird" should always be accompanied by a comment explaining why it is the way it is and why a seemingly more obvious approach wasn't taken.
mgkimsal#
At the very least.

Better might be a comment linking to a ticket or wiki page or internal README with far more explanation. What's the technical reasoning, and what was the business impetus for requiring this done this way at this time?
Again, I've been on both sides of this fence, but the "never rebuild" mantra has a lot of assumptions built in, chief being that things are actually working correctly. If they are, and there's no tests around it, memorialize the existing state with your own tests at the very start. It's what we did on the August project referenced above, and it took weeks (months, really) to have a modicum of basic tests ensuring some base level of understanding for our team (just 2 of us).

jacekm1 reply#
I think respect does not imply assumption of correctness. It's more like: there's a reason why the code looks like it does. The reason could be time pressure, some crucial information missing at the time when it was being implemented, etc. By all means try to improve it but don't look down on a person who created it. It's easy to judge from perspective of 6 or more months.
mgkimsal8 replies#
"The reason" can also be lack of basic competence in previous workers. That can be extended to the rest of the team or management around the worker(s) for not providing a guidance/help.

"reason" can be "cause/effect" reason, but also "justifiable rationale". The files look like they do because someone typed keys and hit 'save' - cause/effect. But there's often no justification for how some code exists in its state that has to do with issues related to the business/logic itself. External factors - time (as you mentioned) or missing info (as you mentioned) - that missing info should have been documented somewhere.
I put out a lot of bad code in my early days. Seniors who came in afterwards ... yeah, the only or primary reason they could get from my code was "he wasn't very good at this". And they were correct. I got better, but primarily through trial and error (lots of them).
In thinking of some specific projects from 98/99 - I was demonstrably not good. I got stuff done, but it was generally very inefficient. But... it worked (to the level of understanding of everyone on the project). Even then, people weren't coming in after me to make basic stuff work, but they did help make it better.
If you're coming in to a project and there's no unit tests, no sample data, no repeatable build process, no documentation, no testing or verification process, and no previous team members to actually talk to to get questions answered, there's little reason to have any assumption of correctness. There may very well be 'reasons' for the lack of all of those factors above, but nothing makes me assume the code is correct. And... if I'm brought in to a project like that, "respecting" the code or the people before adds no benefit to the project, and may detract from getting stuff done.

Continue this thread — 8 replies

mrfredward#
It's very situation dependent. I try to advocate for the old code when I can, but I've had similar experiences. The most recent example was a multithreaded app started by a person who understood neither mutexes nor pure functions. Doing a ctrl+f for "sleep" for quickly showed that code was doomed to always be breaking in inexplicable ways. Give code the benefit of the doubt as much as possible, but there is a point where old code deserves more suspicion than respect.
teddyuk1 reply#
"respect the existing code" <-- for me, this means respect the people who wrote it especially if they are still about.

Don't just trash it, learn it, understand it, talk about why it could be improved - people write crap code for many different reasons.
Do replace it but do it with valid reasons and without being horrible.

mgkimsal#
if they're still around, you can ask questions, and get a much better handle on why it's the way it is, and perhaps avoid earlier mistakes, and come up with a better strategy. maybe even just actually document the 'whys' and leave it as is.
candu#
Fair point: sometimes things are, in fact, bad enough that a rewrite is warranted. IMHO, this is where the "senior engineer" mantle becomes less about engineering and more about interpersonal / organization-navigational skills.

Let's say I'm a manager at said company. An engineer who just joined my project - which our previous senior engineer, who I trust (fairly or not), built - tells me it needs a complete rewrite. My default reaction is likely skepticism: the received wisdom is that rewrites are seldom justified; your assertion contradicts both this wisdom and my previous senior engineer. What do you expect my answer will be?
As the engineer making this recommendation, you'll need to do a bit of showing why. Part of this is technical: write some tests that show the problem, quantify the data loss, etc. Show that you've carefully balanced rewrite vs. other more incremental approaches to fixing the problem. Prototype part of a newer system quickly and show that it can be done.
The harder part to motivate - and often the more important part when it comes to "how do I get people to say yes?" - is non-technical. What's the business impact? What's the user impact? Is this an existential risk to the company if not fixed? How so? How do we assure our clients / users / etc. that time spent here is more important than time spent on features they want? Can you get someone with significant decision-making power to agree? How will you de-risk the rewrite and eventual migration, neither of which are trivial? How can you get just enough buy-in to secure the time needed to answer these questions, show quick progress, and reassure others that this won't be an even bigger catastrophe?

arendtio#
I think you are missing the point. Respecting systems doesn't mean 'not touching' or 'working around' existing systems. It just means 'understand it, before you change/rewrite it'. Otherwise, your rewrite might be even worse.

I have seen people proclaiming a rewrite with a newer technology would be a good idea who didn't have the slightest clue about the system they were trying to replace (except that it was build with some outdated technology) and I am 85% sure, that their rewrite would have been worse. When I confronted them with my claims, they gave up quickly.
As a Senior Engineer, you should know what you are doing. If you see obviously bad code, thinking about a rewrite is no sin. Just try to understand what caused the current system to look like it does.

KaiserPro#
respect doesn't mean revere.

Replacing something simply because its not code you authorised or written isn't respectful. Replacing something because its not on a shiny platform, took too long to figure out, or simila, again isn't respectful.
replacing broken code, fixing bugs, changing architecture to adapt to another situation is fine.

dahart1 reply#
> you should try to understand the difference between code that should stay and code that should go.

I think that’s exactly what the rule is saying, I think almost everyone would agree. The problem is assuming that code is bad, or even actively looking for “bad”. If it’s in prod, that usually means it worked and was needed. Engineers in my experience do like to assume things are bad and actively look for reasons to re-engineer things without properly accounting for the number of ways things are going right. During my career, I’ve watched two separate large teams at two separate companies decide to rewrite a major codebase because they thought there was too much bad, and they thought there was a tower of abstraction. The result was they both dramatically underestimated the time needed to rewrite, and after having wasted literally tens of millions of dollars, ended up with roughly the same code quality as before and a couple of years of unnecessary down time. It’s more difficult to understand the code that came before and the reasons why it’s there, and it’s easier to judge it bad and decide to rewrite it without completely understanding it, that’s why the default should be to assume the code is there for a good reason, and try harder to understand the reasons.
That rule should, of course, be balanced with this rule, both are true:
> Simplify code, systems, and architectures relentlessly
I personally suspect that writing down and maintaining all the requirements and lifetimes for the codebase separately from the codebase, and having a regression test suite with complete coverage, is the way to safely deprecate features and continue to simply old large complicated codebases. But I’ve never seen that work in practice, yet...

dbmikus1 reply#
I don't think the OP meant "don't touch old code", but this sentence, to me, implies that "reasons" means good reasons:

> There are reasons for every code and every guard that exists in production.
Sometimes the reasons are not good ones. Maybe that's exactly what the author meant. The rule doesn't read like that to me, though.
And yeah, if you're rewriting something, don't rewrite the whole damn thing! Good code is modular and you should be able to pick it apart and replace components that are causing problems. If it's not causing a problem, don't rewrite it...
However if you're going to be adding features to a section of code (or otherwise working on it a lot), it's a good time to try to understand if you can do a bit of refactoring along the way to clean it up. By default, all code gains code smell over time and also becomes more robust. It's a tight rope to walk.

dahart#
It is true, sometimes the reasons are not good ones. But, if it is in production, one should assume the reasons are good ones, there's already some evidence. The point is mainly that the burden of proof is on the reader to demonstrate the reasons are not good before modifying it... especially because you're right: code smell is the default product of time. We have to be careful about assuming that code smell indicates something is wrong. My couple of decades of experience is that people assuming reasons aren't good and jumping into modifications is a bigger acute problem than being more conservative than necessary. Accumulating the tower of abstractions is no doubt a problem, but it happens more slowly and is caused by a multitude of bad practices, it rarely breaks production or causes downtime, unlike refactoring too eagerly because of smell or opinion rather than demonstrated necessity. It is indeed a fine line, I completely agree!
littleblah1 reply#
Thanks. Somehow I failed to create clickable links :(
Flimm#
Not your fault. It's impossible to do in the post description.
notTyler4 replies#
'Get involved with hiring for your team and company, and maintain a high bar for hiring quality candidates.'

Posts derailing this 'high bar' are posted semi-daily to Hacker News, no? It's a really big dilemma (extensive hiring process that weeds out good candidates due to time and frustration or take risks) and it makes it sound like it's just something, you can, you know, do on a Tuesday in your spare time, and then on Wednesday you can solve the architecture problem.
And that's pretty much this list summed up. It's nice on paper, and maybe it will make a difference if someone consults it when making tough decisions. Thanks for your effort.

PopeDotNinja3 replies#
The "high" in high bar is not a particular useful measurement. What is high? Unless you've defined what that means, and everyone involved understands and agrees what that means, it's just a word. What you can say is "we need someone who knows the internals of tool X, and we measure it via Y". Basically, avoid using adjectives to measure things (e.g. say 1 liter glass, don't say big glass).
l0b01 reply#
The only "problem" with that approach is that it invalidates most hand-wavy advice:

"Make everything as simple as possible but no simpler." All well and good if your requirements are written in formal logic or if there is only a single axis along which complexity can be measured.
"Hire only the best." What if the best only want to work with the best pay and the most interesting work? But "hire only the best of the very few who are willing to work on your projects for the kind of pay you're willing to offer, who will consider it a blessing that they were hired at 20% above your minimum starting salary with no other career avenues than management, and who are naive enough to think of options as valuable rather than lottery tickets" isn't quite as snappy or happy.
"Don't be evil." And since you have that slogan anything you do is by circular logic not evil. Handy.

dagw2 replies#
"Hire only the best." What if the best only want to work with the best pay and the most interesting work?

That's the interesting question. The hard choice, that I rarely see discussed, is what to do when "the best" won't work for you. Do you hire the "perfectly adequate" or do you not hire and not do that thing you want "the best" person to work on.

Continue this thread — 2 replies

tomxor#
> What is high? Unless you've defined what that means, and everyone involved understands and agrees what that means, it's just a word.

Yes, this is the right question. I think the reason there is no generic definition is because it's subjective. The most generally applicable part of this is the differences in hiring practices at large-scale vs tiny-scale (there was an article on HN previously explaining this particular area):
The main points were google-scale can afford high salaries and can afford to cut out good candidates from the hiring process in the name of automation, so easy to automate and standardise empirical testing works for them, but not for small-scale, because you wont be able to afford the same candidate. Instead small-scale either hire for the people who fall through the cracks of large corporate structures or they hire for potential.
In answer to your question, this difference affects (or should affect) the qualities being measured... for large scale it's whatever the job requirements are, measured there and then; for small-scale it's the potential for whatever the job requirements are e.g enthusiasm, drive, domain specific interest. That's just one dimension of a company, there are all kinds of other aspects that will also affect qualitative measurement of a candidate.

C1sc0cat#
What defines a high bar, at BT our team had a DBA whose first boss was Dijkstra (yes that one) we was the unofficial database GURU for the entire engineering centre.

But we also had some one who was even more of a GURU IBM used to ask him for advice on large Mainframe database problems.

zachrose#
Maybe the idea is that the senior engineer here should collaborate on what that bar is.
xxpor5 replies#
I wonder where people work where they can become a senior engineer in the first place without getting involved in hiring.
LandR1 reply#
I'm a senior developer and have almsot zero involvement in hiring.

PRevious place I worked had probably a hundred senior developers and none of them had any involvement in hiring.
IME the only developers that get involved in hiring is architect level and Lead Developers.

scaryclam#
At my current company we ask even juniors to get involved. Interviews are in pairs, with at least one senior person in that pair, so we can make sure each interview is as fair as possible. IMO everyone can have a valid view, and since we could well be looking for their next team mate I'd prefer to know that it's not just my opinion that gets heard. It's been working pretty well so far, and given people more experience in hiring that I hope helps them later in their careers.
dagw2 replies#
I've been a "senior" engineer for years, in that time I've read through a few dozen CVs, sat in on 2 interviews, and had final say in hiring of exactly zero people. I suspect the same is true for at least half the senior people here, unless they also happen to managers.
xxpor#
I'm not trying to sound accusatory, I'm just interested. Aren't you interested in choosing the people the people you're going to have to work with every day? Are managers doing interviews where they're asking technical questions?
jcadam3 replies#
I remember myself and every other senior engineer on a team once rejecting a candidate and being overruled by management. The guy was hired and... turned out to be as useless as we thought he'd be.

Continue this thread — 3 replies

EnderMB#
This is probably far more common than we'd like to admit.

I've certainly worked in places where they'd rather I didn't get involved in the hiring process. These kind of places often heavily relied on external recruitment, and would rather that I spend my time working on projects than potentially rejecting candidates that could do the job, but weren't up to my standard.
These aren't non-tech companies either - these are companies that deal in/sell tech as a project and/or service. Even in companies that live and die by their development team, non-technical management can run the show and dictate hiring.

C1sc0cat#
Why most developers never have any HR/IR training or do this in their day to day Job.

Continue this thread — 1 more reply

Continue this thread — 1 more reply

tmh88j5 replies#
Thanks for the list. There are a lot of great suggestions here, but I think the scope is much wider than just senior engineers for a majority of the items. Here are a few that I think are especially important for junior level engineers.

• Question everything and ask “why” repetitively until you get to the root of problems and situations.
• Do not be adamant about your views. Listen to others and accept that there is more than one way to look at a problem statement, and multiple valid solutions to a problem.
• Have strong mentors to help you navigate and grow in the company.
• Read a few technical books every year.
• Actively seek feedback from your manager
The bullets above brings me to halfway through the list, and I feel that I was pretty selective in the ones that I chose. At this point for the remainder of the list nearly every item is one that I'd suggest for any experience level.

Continue this thread — 5 replies

Load more comments