Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login
What I learned working with a senior engineer as a new grad (tanishqkancharla.dev) similar stories update story
160 points by antidnan | karma 634 | avg karma 6.04 2022-08-18 22:29:22 | hide | past | favorite | 199 comments



view as:

> senior engineer

> been a professional engineer for 6 years

Man, the software world is just weird.


I’ve worked with some consultants that were ‘senior’ after 2-3 years of experience. I think there are two reasons for this trend: giving some a senior title can sometimes mean you have to pay them less (paradoxically perhaps) because they feel they are more important now, second consultancy agencies can ask higher rates for ‘seniors’.

Is it really that weird?

In the military 6 years is definitely considered senior and I’m sure that’s also the case in a lot of other fields.


I know the EE & ME worlds, senior generally implies at least two decades of experience. I'm pretty sure the same is also true for civil engineering, and most of the other "hard" engineering practices.

It seems like (at least outside of the military) the duration to being senior and the importance of things not going wrong are correlated.


The meaning is different. In software industry, senior means "doesn't need handholding", not "super-super-long experience" as in other more traditional fields.

I expect more than that, a senior should be in the position of accomplishing a task based on a ruff abstract, they should also be able to mentor juniors and jump into meetings with the customer, supporting architects and sales, if needed.

None

I think a part of this issue is that there is nothing above senior.

Additionally, "seniority" is relative and can vary between different technologies: for example, I have been working as a software engineer for 25+ years, and while I have worked with Java before I am no better at it than someone who just graduated. Similarly, even though I spent nearly a decade as a frontend dev, the last time I did that professionally was in mid-aughts, and I have zero experience with React, TypeScript and other modern staples of that area.


Sometimes I see the title "principal engineer" used, and my impression is that it trumps a mere senior. See [1] for an example.

I'm not in the US though and also work as a contractor so it's hard to use titles like these in my daily work.

[1]: https://about.gitlab.com/handbook/total-rewards/compensation...


You, accidentally, tripped a pet peeve of mine. Many people seem to think of writing software as a command and control function like some hypothetical military rank (and the leveling process engaged in by tech. companies reinforces this) where people higher up the ladder “trump” those lower.

But in software (and perhaps all knowledge work) many many times its the lowest ladder employees who are closest to the actual problem space. They are the ones dealing with the hacked up code base from 8 years ago, the indecipherable comments, the untested code that is critical to the business.

The job of the more senior people is not to command and control those employees, but to empower them. Bringing breadth of experience, or in depth expertise that is not specific to the problem at hand to help them make a decision.

Sorry, rant over.


What do you think should happen if a more senior person brings their breadth of experience or expertise and the junior engineer disagrees and does something else?

Obviously depends on the situation but almost always the person closest to the specific problem should make the call.

That’s why one of the most important differences between a more senior engineer and a more junior one is the ability to mentor.


> nothing above senior.

Title inflation dictates that there is and inevitably will be.

If you’re senior after six years, and you’re staff after 12 then eventually people will be staff after 7 years and there will be a new title above that which takes 12 years to get (principle?).

I haven’t seen a junior in 10 years, I haven’t seen an intern in longer. People seem to come out of school into “mid” level roles - which means the mid levels are actually entry levels and the titles shift down.


> there is nothing above senior.

Only in industries where software development is not a primary business; beyond Senior there's titles like Lead, Staff, Principal, Distinguished and Fellow SWE, or branching off, things like architect.

Anyway, senior engineer is less about what languages do you know and more about making informed technology decisions, maintaining quality, managing and training less experienced people, etc. It's also - IMO - not down to years of experience, because you can have 25 years of experience but be stuck at a certain level or stuck in a certain technology.


"Lead, Staff, Principal..." exist only in few companies, are even more vague that "senior" and don't even represent seniority but rather how long a person worked in the same company.

(And how lucky they are at getting promoted withing that company)


> there is nothing above senior

Staff, senior staff, principle, distinguished, architect, etc?


> I have been working as a software engineer for 25+ years, and while I have worked with Java before I am no better at it than someone who just graduated

Don't see how that's possible. I wouldn't even think 50% of what makes anyone a good Java developer is due to anything Java-specific. And you'll undoubtedly pick up Java-specific knowledge faster than the graduate is likely to.


Maybe on a "does it compile" and "does it work" level you might be the same as a fresh grad, but I'm sure you have years of experiences that help you make decisions and think of possible pitfalls. Plus each new language over the years is easier and easier to pick up.

In many hard sciences, 6 years is graduate school.

And a PhD would be senior to a graduate?

Also the quote is 'professional', so although it's probably not the case, it doesn't preclude spending your 6 years in 'graduate school' beforehand anyway.


After PhD, people are forced to do postdocs, which are nominally junior positions.

> After PhD, people are forced to do postdocs

You don’t have to do a postdoc.


But not compared to the new grad/undergraduate intern washing petri dishes or whatever. My point is that what you label 'junior' doesn't matter, it's all relative.

If you go to graduate school then your first job is ‘senior’ because by that point you’re a world-expert in your field.

My friend is in the military (information technology side). We are both 40-ish. I am only beginning to feel like a senior, and he has the option to retire.

In most engineering it takes 15 if not 20 years. Otherwise the term "senior" gets completely watered down.

Many software companies have official ranks where "senior" is a step up after "junior," to be followed by "principal," "senior principal," and/or "staff." "Staff engineer" may not sound as impressive as "senior" to a layperson, but at say Google those people are like minor deities.

"principal" and "staff" are even more vague than "senior" and exist only in few companies. More importantly, they almost never refer to total experience and instead refer to being promoted within a given company.

Easy to be a senior frontend engineer. Just say you were already around when the current most hyped JS framework was released that everyone must move to, 1-2 years ago.

You mean like React (9 years ago), Angular (12 years ago) or Vue (8 years ago)? Who seriously uses anything else?

I think you confused the JS ecosystem with the C# one.


>I think you confused the JS ecosystem with the C# one.

What do you mean?


Angular will turn 6 years old next month. You're thinking of AngularJS, which despite the (unfortunately) similar name and parent, is basically a completely different framework.

Although I don't see why you're bashing C#. Despite the .NET Framework > .NET Core > .NET transitions, it's not really that different. There's a ton of new functionality and ways to do things, but for the most part the old ways still work too.


For software developers, I've thought 5 years of solid work and continuous learning is about the right time horizon for a senior title, in a typical contemporary software/internet company. (At least, 5 years of seeing the lifecycle through awhile -- not job-hopping repeatedly, before getting to see cause and effect together.)

I could even see that going faster than 5 years, especially in a startup. For example, say one of your early hires is fresh out of school, but really curious and learning fast, already did some open source, learns from mentoring/osmosis, takes easily to a team sensibility, and has to tackle a lot of things like is the norm in a startup. Within a couple years, as the startup is starting to think about titles more, they might be a battle-scarred veteran with firsthand experience and maturity beyond their years. (Or, even if not everything is yet the complete senior package -- such as maybe they've only worked on one system and team, and could've overlearned from limited data points -- you want to acknowledge the value of their contributions, as well as their institutional memory and cultural role. So maybe help them level up any aspect they haven't yet had a chance to.)

(BTW, I avoid the term "professional engineer" when talking about software, because I've heard it have special meaning in the more regulated, traditional engineering disciplines.)


I absolutely cannot agree with this.

It's true that after five years in a startup, you'll have seen lots of systems. But being a senior practitioner requires deep experience as well as breadth, and enough time in the industry to recognise larger trends.

There is no magic mark for this, and it's quite possible to reach ten years and still be a weak practitioner, because you were exposed to a narrow range of problems and were never around to see your bad decisions bear bad fruit.

However, the opposite does not hold. It doesn't matter how intelligent you are, you can't short circuit repeated experience and the mix of breadth and depth required. People want to. I wanted to. But I didn't: all I became was an overbearing mid who had the rhetoric (and the OSS contributions!) to convince others I knew what I was doing. There is absolutely no comparison between myself in 2017 and myself in 2022, but we both have a job title of "Senior Engineer".

In fact, I think that in the long term the trend is for the senior bar to get _higher_. This is pushed by two things: firstly, that the technical domain gets harder, software becomes more abstract, our expectation of engineers increases particularly in "left shifted" environments where every IC must do everything from frontend to microservices to infra to security to testing.

The second force is demographic: as IC salaries have increased, there has been less pressure for senior engineers to exit in favour of the management track. That means more experienced engineers on average. Industry needs a way to describe these practitioners, beyond "very senior", and overall the range of skills of ICs will widen. Under those conditions the definition of senior engineer gets more exclusive, not less.


It is just title inflation. A senior is one who has graduated apprenticeship and is equipped with technical knowledge to begin training an apprentice.

Are there those who are masters of their craft who call themselves a senior, of course.


Good point about the increasing demands on Seniors in some regards. (The role might also be changing, such as juggling lots of high-level abstractions and vendor bureaucracy in many domains, with a significant amount of Stackoverflow consultation, rather than lots of experience in lower-level details.)

I'm trying to reconcile meaningful titles with current industry norms.

I'm open to other schemes, but, FWIW, this is my current rough idea:

* First is some kind of new college grad. Some of whom would object to Junior in their title, and I think Technician sends the wrong message about near-term goals, so I'd just call it plain Software Engineer.

* After maybe at 1 or 2 years, they've been through some projects, and they know a lot of the mechanics (big contrast to a new-grad who learns as they unlearn what they got from bloggers). You want to acknowledge that, so maybe it's Software Engineer II.

* At some point, maybe it's 5 great years in, they've seen a lot of stuff, and gotten wisdom and insight, and Senior sounds about right and conventional. This could be a plateau title that someone has for a decade, even as their TC increases quite a bit.

* Staff and Principal engineer roles transcend project teams (more than Seniors do). Large companies will each have their own definitions, and there might also be unwritten meaning. (At my first hardcore software engineering employer, there was no Staff, and only a tiny percentage ever made Principal. By the time I made Senior, the VP asked me where I saw myself in 5 years, and I said Principal... He gently set expectations that that's pretty ambitious, only a few people ever do it, and 5 years would be very fast. Correct on all points, and now I think I have a better idea of how much more the Principals knew that I didn't even know were things to be learned.)


I don't think I've seen anyone provide a workable system where senior is reserved for people around 20 years of experience. What's that structure look like? Everyone from 1-20 years experience has the same title?

There's definitely inflection points at years of experience:

0: Good enough to be hired

1-3: Solid team contributor

3-5: Best IC on a team

5-8: Lead a project/team

8+: Lead multiple projects

Then from there it's increasing complexity of teachnical problems and project size.

If you're insisting that senior applies only to the last level what do you call all those steps between 0 and 8.


There are senior engineers out there that have <4 years professional experience. I myself went from IC3 (junior) to IC5 (senior) at FB in around 3 years and this is pretty common at FB from what I've seen.

I think the concern is that the industry, including Facebook, has decided that the designation “senior” is a thing you can get in <5 years. It’s a norm in software so it’s easy to see examples of it, and in practice who cares what the titles were if they are used consistently.

But what if you were outside the industry and heard that term? A senior judge typically has decades under their belt. A senior chief petty officer is the second highest non-commissioned rank in the navy implying a whole career behind them. They might infer it only takes three years of experience to reach the near top of the software craft.


It feels similar to the title bloat of Goldman Sachs, where a lot of people are Vice Presidents.

In certain regulated or audited environments you’ll see rules like “only a person at the VP level or higher can make decision xyz”.

It’s just as stupid but there is a different reason for it.


> A senior judge typically has decades under their belt.

A senior judge is also quite literally a semi-retirement role. You take on reduced workload.

> But what if you were outside the industry and heard that term?

"Senior Associates" in the legal profession are junior/mid roles, similarly, senior account managers etc. aren't particularly senior in most places. In white collar roles, a "senior" is really just a distinction of independence and reliability.


Maybe I'm the outlier but at >15 years into this job I think back on what I was like/did/thought 6 years in and shudder, at that point I never mentored anyone my junior seriously enough to influence their perception (I don't think) but if I did I'm not sure it would have been a positive influence. The lack of failures, felt pain, time to reflect.. in combination with the hubris of 20-smth youth isn't a recipe for good software engineering I don't think.

Yeah, I stopped reading after this line. Sorry, but if you call yourself "senior" with 6 years of experience you've lost all credibility in my book.

The author said that, we don't know if the mentioned person does it.

Seniority is the fact or state of being older or higher in rank or status than someone else. Within an organisation, a senior engineer could be the engineer with the most experience with the codebase everyone else is working on.

I do agree that certain habits or experience from working for additional years might be missing, but as the first engineer of a codebase, IMO, there will always be something to learn from them. Which makes the article credible enough to warrant a read.


Years of professional experience isn't a great metric of time steeped in software practices. There's a difference between someone who did a bootcamp and worked for 6 years compared to someone who started contributing to open source software at the age of 12, studied computer science, and then went into the industry. The latter might be more experienced at 1 year than the boot camp grad at 6 years.

I wouldn't instantly go that far. There are people who can be senior in 6 years. People truly that good are the exception, not the rule though.

Much of the most widely used software in the world comes out of mid 20s so-called Senior Engineers in Silicon Valley (and other major US metros). Gatekeeping on the basis of years of experience is naive and unproductive.

IMO "senior" is a function of behavior not time. At FAANG, levels are formally defined by traits. For example, a senior engineer can plan and lead 6-12 month long projects, delegating some parts of the implementation to others where appropriate. I personally was fulfilling this definition at 25 and I know several dozen others in similar situations.


I suspect 'Senior' most places just means 'more senior than at least one other person'.

None

No content with Javascript disabled. Hardly unheard of among a technical audience.

Ah! That’s unfortunate . All that work of pre-rendering, and it won’t even work with javascript disabled. To be clear, I use a very very tiny bit of javascript only to animate the article elements after render.I guess when that fails, it just doesn’t animate the opacity to 1…hm...

Haha, same thing was pointed out to me when my site was posted to HN. My advice: use a css transition instead of js

Im not sure if there’s a good way to use css to animate an arbitrary number of children with a delay, while retaining clean markup. I did this before: .article-child { animation-delay: var(—index)*0.025s; } and while rendering, set style tags on each element style=“—index:5”, etc. That works, but it was annoying to maintain, and every single element has these style tags. So I just use Motion One (WAAPI) now.

Drop the animation and just let the browser render the elements and css position/style them. Most 'animations' on otherwise textual articles are merely eye-candy fluff that is totally unnecessary.

PS: Viewing with JS on -- yes, totally unnecessary eye-candy fluff in that animation.


But that’s my vibe!

I wouldn't want to live on an internet without a hint of personalization or eye-candy fluff :P

If you're willing to do some heavy copy-paste, there's always:

    @keyframes fdsseq { 
    100% { opacity: 1; }
    }

    #fds p {
    animation: fdsseq .5s forwards;
    }
    #fds p:nth-child(1) {
    animation-delay: .5s;
    }
    #fds p:nth-child(2) {
    animation-delay: 1s;
    }
    #fds p:nth-child(3) {
    animation-delay: 1.5s;
    }

Clean code is code you and others can understand and everybody seems to have a different idea of that.

Sentence long variable names I don't like, they slow me down when thinking about or remembering what to do I'm not sure you can remember the names without Intellisense/IntelliJ autocomplete.

I don't think I would enjoy working on this codebase.


Naming things is hard. Often when names are very long, they could be shortened, because they are in a function, which already narrows down the context and makes a shorter name still understandable. Very long names can also sometimes be a code smell, if they are relating to a lot of global state, which is not narrowed down in context by where it is defined.

Sometimes however, it is really difficult to come up with a shorter name. I think it is definitely a skill, that takes practice and never is really perfected.


The point is to always name your variables / methods / classes as exactly what they do (not how they do it, but what they achieve). If this name looks ridiculous, like `doXAndYAndZAndSideEffect`, then your code is likely poorly factored. I've found it works very well for helping to find good separation of concerns.

The recommendation I read back in the 90's in Code Complete that has served me well ever since was that variable name length should be roughly proportional to the variable span. "Variable span" being the distance between where the variable is first defined and its last use. Generally that means that a temp variable inside a short function can be a single letter since you can see the full context of its entire lifecycle right there and it's unlikely to be confusing; indeed, a short variable name in that case will often be much easier to read and work with than a longer one. OTOH, a global or exported variable that might be accessed in different files from where it is defined or used across thousands of lines really needs to be descriptive enough that anyone encountering it should know what it's for without having to backtrack to where it was defined. A variable name that's a few words long might be entirely appropriate for that. A corollary is that a large variable span is often an indicator of a bad design. So if you find that you need really long variable names to make your code easy to understand, you might want to step back and see if you could set up some better or different boundaries.

I've found this to be a much better rule of thumb than "always use long variable names" or "always use short variable names".


Thank you. I'd read CC ... 15+ years ago, but couldn't remember this specific step (but I know I've internalized it). I had criticism from folks a couple years back because I used "x" and "i" as variable names in loop counting - for (x=0; x<limit; x++) - that sort of thing. I had folks block my PR because "don't use short variables - that's unprofessional". These were loops inside a test file, and, at that time (8 months after launch), I was committing the first test to the project. It was blocked while I had to think of something better, like for(loop=0; loop<limit; loop++) - which was deemed "acceptable".

This concept from CC was at the back of my mind, but couldn't articulate it, or even remember where I'd first read about it, but it's been something I've worked at adopting and growing over the years. 6 line loops - x/i/j/k/etc are all valid and usable. In some ways, it's actually more helpful to me, because the longer names indicate something concrete/real, and the single letter names indicate local/throwaway values.


For Java and Python for each loops I often use "current" or a singular name for the thing being iterated. If it's a nested loop then I use "other".

For C and JavaScript I use single letter indexes ijkl or "current".

I think it's a personal preference. I don't think there is a wrong way or a right way. Your team needs to agree though. I would be annoyed if I implemented a deep feature and the PR was blocked due to something as inane and useless as this.


I don't mind "i", but if there's an inner loop with "j" as well, you are BEGGING for confusion.

I got down to "k" too. What about "x" and "y"? One important consideration of nested loops is row major access pattern rather than column major pattern, so access array[i][j] rather than array[j][i] due to the data locality of each. You shall get a performance boost by accessing them in that order.

I worked on parallelizing nested loops across OS threads and load balancing between outer loops for different progressions through the loop. I also wrote some code to reverse the loop direction to avoid a cache miss when the indexes go back to 0.

https://github.com/samsquire/multiversion-concurrency-contro...


`x` and `y` are also problematic, though slightly less so. The biggest issue I have is that they're similar in appearance. `abc` is much better, because they're clearly different from each other, if you're married to single-letter values.

`i` and `j` are usually indicative an index for something, and indicating what you're indexing makes the code clearer to read and easier to maintain. `idxUsers`, `idxPosts`, for example. `x` and `y` are a bit trickier because they're very frequently the canonical positional co-ordinates, and renaming them can actually make it _harder_ to read, so (like all things in naming) is a real judgment call, but frequently can be replaced with `col` and `row`, which, to me reads _much_ clearer, especially when using row-major access pattern: `array[row][col]`.


Often "i" and "j" would appear when the code is the implementation of some math formula which would idiomatically use "i" and "j" when written 'properly' on paper or LaTeX.

Sounds like your colleagues are cargo-culting rather than arguing from experience or knowledge.

My standard solution for this is to name the loop counter for the things being counted. So your example would be:

    for (horse=0;horse<n_horses;horse++) {
    }
or

    for (horse in horses) {
    }
or equivalent depending on whatever language you use.

Kudos to Code Complete, specially l the tips regarding "safe" C code and parameter validation, based on Microsoft learnings in failure to do so.

One anecdote I remember from the book, is how for a while Excel allowed for dual colored cells based on a parsing error due to trying to be too clever.


I like this, I adopted this intuitively over time. But man do I loathe single variable names. My brain starts to shut down when there’s more than one of those anywhere. I write a lot of GLSL and that crowd loves working in wingings.

I think I get frustrated here because "Clean Code" is talking about a very specific style of coding popularized by Robert Martin in the book with the same name. It is not a synonym for Good Code.

Longer variable names are certainly a facet of Clean Code. It's in chapter 2, and Chapter 1 is an introduction.

That said, I strongly suggest Arlo Belshee's series https://www.digdeeproots.com/articles/naming-as-a-process/ - this gets to the heart of how to have both descriptive and not-sentence-long.


I think the names in the article were pretty decent, but here is good article about common errors that result in unnecessarily long names:

https://journal.stuffwithstuff.com/2016/06/16/long-names-are...


the takes in this thread are the worst

I have never given much attention to functional programming just out of prejudice.

Now I read this blog and my head just exploded in the functional part.

It's beautiful.

What good introductions to functional can you people point me to?

Also, good code is like prose. You write to other to read, and you need to guide their minds.

Of course you can write in dense, truncated and clever ways, but your audience will be small (even yourself won't like your own prose 6 months from now).

Good software is delightful to read.


What part are you referring to? I don't see any FP stuff in that article... It's all imperative code?

Anyway I would recommend learning Haskell. I like languages that allow different styles (like js does to a certain extent). But I think it's better to learn a modtly pure OO language like java and a pure FP language like Haskell to be able to make the right decisions in a language that supports both like JS.


The author refers to it as "declarative programming" when they talk about functional programming.

I would link to the section "Functional, declarative programming" but there are no anchors. The table of contents (which the author calls a "minimap") is not clickable either.


> What good introductions to functional can you people point me to?

When people hear "functional programming" many of them will immediately point you to Haskell (and totally forget to mention The Haskell Pyramid [1]). I'd advise you to stay away from it until you _want_ to go deeper down the rabbit hole.

Play with Elm and Erlang ("Programming Erlang" [2] and "Erlang Programming" [3] books are great) to un-learn imperative patterns, tinker with OCaml to learn a new way to modularize code.

[1] https://patrickmn.com/software/the-haskell-pyramid/

[2] https://www.amazon.com/dp/193778553X

[3] https://www.amazon.com/dp/0596518188


I’m glad it left that impression! My thoughts have clarified a bit since I read that post, and I think what I describe is more declarative, like React. But the best places to read about it (for web devs) are in Elm!

There is also this new thing I found that seems to really lean into the core of what being functional means here: https://github.com/jorgebucaran/hyperapp

After a while, you see that basically all systems can be modeled as event-driven, functional systems. It’s a flexible model, and fits beautiful into web dev where the semantics are very clear: the system is the web app and events are clicks, keyboard events, asynchronous calls...


What tech stacks are you currently comfortable with? If you have significant .NET experience f# can be a great entry point as you can reuse a lot of the same tools (VS/VSCode/Rider + Nuget or Paket if you wanna go full f#), and sites like https://fsharpforfunandprofit.com/ go pretty deep into why f#/functional etc.

Just a note that functional programming here seems to be conflated with declarative programming. They do have some things in common ("no mutable state" being the main one I can recall), and technically I think FP is categorized as a subset of DP, but in reality a declarative program ends up looking quite different from a functional program, so it's with distinguishing the two.

To give a trivial example to illustrate the conceptual difference: a declarative program could say something like "the output is the solution to f(x) = 0", defining f explicitly and leaving it to the compiler/interpreter to supply the algorithm for figuring out an x that satisfies it. Note that, as long as x is unique, "try all legal values of x" works, so a viable fallback algorithm always exists; it's just inefficient. Whereas with FP you actually have to supply an explicit function to (hopefully efficiently) compute the output, i.e. you basically have to write f^-1 yourself, which typically results in a very different program - sometimes harder to read, sometimes easier.

Now, of course, you could do "FP" by writing f instead of f^-1 and then enumerating all possible inputs as with DP, just as you could write a DP to compute functions explicitly at every step, and you could write imperative programs for all these. But those would be unnatural, and would generally defeat the advantages of the paradigms.


I've noticed many of these articles about what it takes to be a good software engineer talk about code quality.

I recently started to work in a team of very senior engineers (with relatively little experience) and what I've noticed is that code quality is rarely mentioned. Everybody write "good enough" code and there's never much discussion around code quality (occasionally a few remarks in code reviews) or design.

Generally, there's very little bikeshedding on code quality and that kind of things. People are pragmatic and wants to get the work done. It also means there are trade-offs regarding code quality (also dictated by management and pressure to deliver).

The challenges are elsewhere. Prioritising, communication, relationships with colleagues, setting up roadmaps and milestones, proposing designs, solving various challenges.

Generally, I found software engineering is less and less about writing code. I'm impressed how my colleagues are good at everything. Fluent in most programming paradigms, able to debug complex production issues, do low level performance analysis and so on...


Make it work, then make it pretty.

Undelivered pretty code doesn't deliver any business value.

Same applies to 100% code coverage that isn't running on customers computers.


There are a ton of people at all levels that don't get this.

I think it was Judd Apatow who said “You have to give yourself permission for the first draft to be shit.”

The hardest part of making anything is getting to the minimal viable product. Editing and refining and upgrading aren’t necessarily easy, but they are typically less daunting than staring at a blank page that you need to fill.


Problem is the business will often never let you improve it.

So you better not tie your self worth to the quality of the things you produce.


It's not a universal thing.

You can go into some interviews, say you write code just good enough to ship, and that will be a red flag to them.

You have to choose your tribe on this issue and be comfortable with the other tribe hating your style.


Surely, I have given up to the pretty tribe on a couple of pull requests, as I have better things to do with my time, and it is easier to make their wishes come true than endless arguing.

The counterpoint to this is "Rough Prototypes have a bad habit of being shipped out as End-Products". And technical debt 'does' kill products.

There's probably an optimum somewhere in the middle of each philosophy, but it's certainly not close to either extreme.


I would say technical debt is a better problem to deal with. At least the project is alive at that point and you are able to get feedback from actual users.

> an optimum somewhere in the middle

Reasonable code isn’t technical debt. The obvious tipping point is when spending X hours now likey saves people less than X hours in the future. Which unfortunately depends a great deal on the details of the actual project involved and therefore requires experience not some universal methodology.


Sure, in the other extreme they never got shipped in first place, and that marvelous piece of art ended up in a museum.

It is a balance that needs to be learnt, and a trait of seniority.


I don't care if it's pretty.

Make it work and make it as straightforward as possible.


If by "straightforward" you mean "readable" I agree. If I can read it easily, it's pretty enough.

It depends, if it has a bunch of nested loops and easily abstracted code but it works sure, who cares. If someone decides to store JSON as a string in the db that will work and deliver business value, but 8 months later when you want to query information in that JSON string you have a very difficult/dangerous migration due to someone just "making it work".

This philosophy less relevant in larger companies with more engineers also.


One of the traits of seniority is to understand what that "it depends" means in reality.

Do you know of any RDBMS's that can't take a text column and treat it as BSON?

I get your point, I just question the specific example.


> Undelivered pretty code doesn't deliver any business value.

See also: https://apenwarr.ca/log/20211024 (Wants, needs, and chasm crossing).


Learning how to write good code is a topic for juniors. Any senior would already know how to that so we focus on other things.

It depends what is understood as code quality. After a while, writing code that is not verbose, fairly maintainable, and readable, is a given. There is a minimum bar that each team set and it is gated by code reviews. The tradeoff start to happen after those minimums are reached.

I think quality in terms of correctness is always the target, and performance usually has a target SLA.


I wouldn't fully agree, because while senior engineers don't often discuss "code quality" syntax/aesthetic issues, it is quite common for people to discuss bugs/edge-cases that need fixes or to discuss simpler approaches to achieve business goals or getting rid of difficult to maintain logic/services.

At some point your craft is good (or good enough) that progressing further on it is not moving you forward as an engineer. It is often a difficult thing to notice and a trap one can easily fall into of over-focusing on craft and not realizing you’re plateauing your overall career or skill set.

IMO too many coders can't write high quality code even if they tried. So when they write code that they feel is good enough, it rarely is good enough objectively.

What even is high quality code? I was on a project with a seasoned grey beard once and all he bitched about was dumb stuff like insisting NOT to prepend variable names with is and forcing a python project to have dependency injection. Sure, those things can make a high quality project but often misplaced and strangely opinionated.

For benefit of a friend new to HN (and anyone else who might be new here): Yes, the comments and the articles are almost separate, parallel discussions. The articles can be interesting in themselves, but for purposes of reading the comments, the articles are often just kind of inspirations or writing prompts.

So, yeah, the OP doesn't even mention code quality. The comments do. That's ok. It's just how the site works.


Article start with variable names (which pertains to code quality)

> Variable names are important because they communicate to the reader what’s happening. That’s their only job in code, so it’s important to name them well. Long verbose names don't cost anything:


Except in JavaScript ;)

And legacy c/opengl, where the variables names tell you the return type...

HN maintainers should optimize page load time by just omitting the actual link to the article. The discussions would be pretty much the same.

It's certainly there, but it comes in different avenues: tech lead meetings (where is our technical debt?), early in projects (as everyone is building a consensus for the project), and code reviews (where they're talking about a facet to make code more understandable or testable or otherwise fulfilling non-functional requirements.)

The conversations aren't about code quality -- they're about a finer point of it and in concrete terms rather than in beginner terms.


Sounds like a startup? Title inflation is pretty rampant at smaller newer companies. The expectation is definitely ship the product before all else. Obviously if you are an established company serving services to hundreds of thousands or millions of customers code quality and reliability becomes an order of magnitude more important.

I used to work with a guy who took "gets shit done" to a level I'd never seen before. It changed the way I look at programming. He was actually a pretty good engineer. Wrote good-enough code. But he wasn't precious about anything and he didn't care all that much about finding the 100%-guaranteed-socially-approved-correct way to do things. What he had was an incredible ability to diagnose and fix problems quickly, strong intuition about how to architect greenfield projects, and the complete confidence of his bosses, with whom he very quickly earned a reputation as the person to go to when something absolutely needed to get done. He knew what to prioritize. He knew which parts of the code to plow through and which to take his time on. He knew exactly where in the code to start looking when a bug came in. And he knew which things were important to management and which weren't.

I learned way more from him than I ever have from the kind of peers who have opinions about how to structure every line of code.


If I may, you should encourage your ex team-mate to share their side of things: https://staffeng.com/stories

In my experience it is useful to have such people on the team, but if they make up most of the team then the codebase becomes a gigantic mess over time, and it negatively impacts everyone else.

Perhaps but having "that programmer that management likes" is worth 10x more than whatever mess is generally being made.

Yep I tend to be more on the spectrum of focusing on code & architecture quality over raw productivity, and I find the "plow through it and get it done" engineer to be the perfect foil to have on my team.

Ultimately it gets done faster than it would if the whole team was my personality, but with higher quality than if the whole team was their personality.


If you're lucky enough to have someone buy into a centralized code/arch strategy then this is idea, the issues arrive when the code/arch strategy isn't a hard sell for the plow engineers.

I consider myself a plow engineer, and I definitely agree with you, a team full of people like me would descend a codebase too deep into chaos. A dance between balance of order and chaos is ideal, as too much of the other has significant negative side-effects.

He is almost certainly way above a pretty good engineer.

Nobody can quantify 'good-enough code' but everyone can quantify meeting a deadline.

How much engineering is anyone really doing anyhow - or are we calling using React to build yet another set of forms users fill out with some error handling engineering nowadays? :)


Fixing bad code is easier than fixing bad architecture. And if your architecture is modular and cleanly decoupled, then the bad code’s impact can be contained.

This is a good point. Modularity is the key to managing complexity. Unfortunately, I think writing a good architecture is harder than writing good code at the local level (because most developers have less experience at writing code in the large). And projects with a good initial architecture tend to diverge as developers add new features and introduce new dependencies. They often don't understand the original design and want/need to get things done quickly.

There are a few hard and fast rules around code quality (and every rule is meant to be broken), everything else is just preference.

Depends on where you are.

In the company I used to work at, code quality was a huge deal. I think, destructively so.

Nevertheless, I exercise pretty extreme code quality in my work (see for yourself[0]). It's long reached the state of "muscle memory," and I work very quickly.

As I am the person that most frequently has to go back and fix the code I write (I eat my own dog food), I write code that is what I want to see, when revisiting, six months later.

On another note, this industry considers six years to be "senior." I find that interesting.

[0] https://github.com/ChrisMarshallNY#browse-away


> I exercise pretty extreme code quality in my work

I'd say maintain good code quality on your own project is much easier than within a team. It's like living in a house with different people: not everybody has the same standard regarding keeping the place tidy and clean, and compromises have to be made.

This was one of the biggest pain point for me, moving from my own personal projects to working with other people.


This is true. Many things suddenly become much more difficult, when even one other person is involved.

Managers often neglect to take team overhead seriously.


> Everybody write "good enough" code and there's never much discussion around code quality (occasionally a few remarks in code reviews) or design.

This approach probably works out because you have senior engineers laying out a lot of the core structure and architecture for how things built. There's a tendency for newer people to tacitly adopt patterns that already exist and replicate.

However, this approach can be really problematic when you have a team that's primarily newer engineers. I've seen it multiple times and it's always the same result - productivity almost grinds to a halt over time because there are so many problems in the code base. The worst example I saw was switching teams and seeing the team velocity. We measured all the work in story points and used the exact same task as a baseline story point. The previous team with mostly senior engineers, a point took .5 days. With the new team that was started by all fresh grad engineers, a story point took a minimum of 3 days and usually bumped up to 4 days. This velocity lasted multiple years, even when the team had a much more balanced spread of senior, mid-level, and fresh grad engineers.


Are you sure that the discussion should be around code quality but not architecture? I think they are quite different...

In addition, I think it's the fault of management if it's all young engineers.

I've often said the difference between a senior and a junior isn't writing software successfully, it's writing software that's maintainable 5 years down the road. The only way to learn that skill is to deal with a project over years and learn the pain points that aren't immediately obvious w/i the first 18 months.


This is touching on something I have been thinking a lot about as I progress in my career.

The thing good and bad code have in common is the fact that it needs to updated. Either for bugs or changing business need.

So focusing on the operational side becomes much more important. Code is the trivial part. Creating systems that can be modified reliably is the hard part.

I rather have ownership over a "poorly" coded service with proper ci/cd, integration tests, monitoring, and a team that reasons about and follows strong operational processes, rather than some beautiful code in a vacuum.


My experience is that “good” code enables all of that — CI/CD, meaningful testing, monitoring/logging, operational tooling, etc.

Making any of that work for spaghetti is rough, since it lacks the boundaries and entry points those things rely on. And even if you ostensibly have it for “bad” code, it tends to be fragile and unreliable. (As my many, many overnight pages have shown.)

Of course, that may be different perceptions of “good”.


Depends on the seniority imo. If you don't make code quality a thing with early in their career devs, you might open up a door to some bad habits to take hold.

> I recently started to work in a team of very senior engineers (with relatively little experience) and what I've noticed is that code quality is rarely mentioned. Everybody write "good enough" code and there's never much discussion around code quality (occasionally a few remarks in code reviews) or design.

I'll play devil's advocate and argue that this could just be the code equivalent of privatizing the benefits while socializing the costs. You mention that your team writes code without explicit discussion of its quality. The benefits of that choice are front-loaded, while the costs of that choice won't be apparent until later. Furthermore, the team members who have to pay those costs may not even be the current team members - it may actually be those on the team months or years from now, after the original code authors have left for greener pastures.

So it may be too early to declare that your choice was a successful one. As the article mentions, code is read much more often than it's written.


I'm not saying that my team writes unmaintainable code, but rather that because they're all strong and experienced, writing decent code is a given and the focus is on other, more challenging, problems. That being said, our code is definitely not as readable as it could be, but I understand it's a trade-off and there are more important things to do than refactoring code, unless it really gets in the way.

I used to feel this way until I started working with a very senior engineer (20+ years) who writes some of the worst code I have ever had to work with.

Functions are regularly 50+ lines with 10+ logical expressions. Most features are written as single classes with 3k-5k lines. Everything is written imperatively (that 50 line function declares a variable at the top and mutates it 10 times as it works through the control flow.) The same magic values are redeclared multiple times through the codebase instead of using a shared constant. His PRs are usually 3k-5k lines and take hours to work through. etc. etc

His code takes way more effort to understand and takes orders of magnitudes longer to change than it reasonably should.

Also his code works. It generally does what its supposed to do, covers edge cases, and is reliable. He also delivers with decent speed, but all that saved time is being pushed on the poor sap who has to work with the code next.


For me, code quality boils down to two aspects: (1) current operation cost and (2) future maintenance / alteration cost.

You can cut a lot of corners, as long as you don't paint yourself into a corner. OTOH an extra hour not spent today on doing the right thing may and will result in extra weeks and extra thousands of dollars spent in a few months.


yep.

A common refrain is that if you're not looking at code you wrote 6 months ago and thinking it's poor quality then you're not growing as a developer.

This is probably true for the first few years of a developers career, but there are only so many ways to build an authentication system (for example).

At some point your improvements are at the design and systems level. You start to develop a nose for what can be problematic and how to avoid it. Linus Torvalds referred to it as 'taste'.

And as you said, often times there are organizational and procedural challenges that have a much larger effect on the success of a project than purely code concerns. Not that code concerns are irrelevant, but good enough is good enough, there's generally an expectation that developers can read code. In the same way there's an expectation that readers of a novel are at the literacy level to understand novels. No one would blame James Clavell if a 5th grader couldn't understand Shogun, even though it's true that Shogun could certainly be improved from a prose perspective.


Hi! I’m the creator of the post. Thank you for all the comments on my post! I’m glad more people are getting to see it. Thanks for posting, @antidnan!

Reading through, it looks like I have some rough edges of my website to clean up as well...


I enjoyed reading your blog post. It was very well written. Most of your points resonate with me.

Thanks!

Congratulations on the post. One may agree or disagree with the content, but the text is clear, to the point, and generally very well written.

Good writing is, to me, the foundation of a good engineer. I know excellent engineers who are not great verbal communicators, but every excellent engineer I know writes like you do. I think it is the result of a structured thought process, that flows naturally into a structured clear text.


Thank you so much! I’m so glad it gave off that impression. I went through a lot of revision and planning to write it: I had learned a lot, and wanted to organize all of it carefully. I’m glad it paid off!

Hope you didn't mind me posting it! I was reading through the parser you posted yesterday and stumbled onto your blog :)

All good, I’m glad you liked it! I’ve already posted it once, but it had no traction last time for some reason.

6 years of experience does not make one a senior engineer. I`ll be polite and say that most engineers with 6 years of experience I know are not seniors.

I think there's a split in the industry; outside of FAANG senior means "certain amount of time spent in front of the computer getting paid", inside FAANG, it's a set of behaviors encapsulated in a particular mid-career job title.

Inside FAANG, it is literally a job title.

"Senior engineer" is a job title at every place I've ever worked.

Yes, very good point. I added a little edit to clarify that.

Outside of FAANG, senior means "we can't pay as much as FAANG but we will call you senior when you have two years of experience and no idea what you're doing".

Two years of experience may not get you really knowing what you're doing, but you should know significantly more than someone with zero years...

I've been in the field for about 18 years. I feel like I "got it" about 11 years in, and that's being generous.

I did mentor a couple of interns that were juniors in college, though, and they were awesome. It might just be me that takes 10 years to get it.


Yeah its pretty scary, 6 years mean you've either only understood on one or two big systems, or you've job hopped more projects and never understood them in depth.

According to this[0] John carmack released 22 games before Doom all in the span of 5 years. Years of experience means nothing, working on real products that get shipped means a lot. I know plenty of programmers with 10+ years of experience that may never reach the level of expertise that Carmack reached in 5 years "professionally".

[0]: https://en.m.wikipedia.org/wiki/John_Carmack


This has been my experience as well. I've worked with junior devs who understood their domain well and were very productive. I've worked with 20 year enterprise development veterans who are still doing the same basic Java work they have always done at large companies with questionable practices and literally haven't grown as a developer. Experience does matter, but what you've done with that experience is far more important than how long it is in absolute terms.

Would you rather go to a mechanic that fixed only breaks in one car model for 10 years.

Or to a mechanic that fixed many things in many different cars over 10 years ?

Thats the difference between hoppers and “veteran corpo ppl”.


1. That depends on how difficult the problem is. For some problems, you're better off with a specialist.

2. Do you want a whole car designed by someone who designed the hubcaps of a Ford Model, and the driver's side door handle for an Audi, and a dash switch for Toyota, and on through 10 other random parts? Or do you want someone who has been part of a team that designed a whole car before, from start to finish?


I would want someone who was part of few teams who designed a car.

Average project in IT is built in 2 years. In 8 years you could have built 4-6 different projects.

The dude that stayed in first project to maintain it, probably did not learn anything more.

Thats at least my experience. Old Java devs that stopped learning after java 8.


comparing to the top percentile is almost never a valid way to look at things.

14 year olds have competed in the olympics, I would never claim that should be the bar for considering health for 14 year olds.


This is true. I'm just responding to OP though, they said:

> Yeah its pretty scary, 6 years mean you've either only understood on one or two big systems, or you've job hopped more projects and never understood them in depth.

Which is blatantly false. I only need to provide one counterexample, and John carmack blows this assumption out of the water. I wouldn't expect the average developer to be anywhere near that level.

But if the top percentile is shipping over 20 commercial products and literally changing the industry with a technical innovation in only 5 years, then I would wager it's very attainable for an average dev to reach a "senior" level of experience in 5 years.


language is more fuzzy than binary logic systems, John Carmack is an exception rather than a counterexample.

And that's the point, comparing exceptional people to the general population isn't valid or relevant here.

Also, these people are typically on teams as juniors who are learning.

Consider that you immediately reached for someone who is over 50 as an example of a developer having a large impact in the first 5 years of their career. That really does say everything.


> language is more fuzzy than binary logic systems, John Carmack is an exception rather than a counterexample.

An exception is a counterexample. For example, are all prime numbers odd? No.

Why not? Because 2 is prime and even. This is exceptional because 2 is only 1 out of a (theoretically) infinite number of prime numbers that are even. This doesn't mean I can now say, "All prime numbers are odd".

The OP gave a tautology that basically went, "If you've only had 6 years of experience, then you only worked on 1 or 2 big projects OR you've job hopped and have a low level of understanding". John Carmack is exceptional, but also a counterexample to this statement in both regards. He was also the lead programmer at ID when he made Doom, not a junior.

Besides this point, what does him being over 50 have to do with this? He was 19 when he started working professionally if I remember correctly, which means he was 24 by the time he made several significant industry impacts.

Besides that point, here are some more counterexamples to the original claim. Mark Zuckerberg was 19 when he started Facebook. Alan Turing was 29 when he cracked the enigma. Djikstra invented Djikstra's algorithm when he was 26. Bill Gates founded Microsoft when he was 20 and released Windows when he was 30. I have plenty of personal examples as well, but it wouldn't do any good to mention them since they're not famous programmers.


Since you're insisting on putting it into mathematical terms, here it is.

you're insisting on 2-valued logic, language does not work that way.

---

Here's what you're doing.

"seat belts save lives, therefore you should wear them".

"aha! There was this ONE car wreck where they would have died if they were wearing their seatbelt. It's a counter-example and therefore invalidates your point!."

Said no reasonable person, ever. What it IS is an exception to the general rule. Because it turns out, reality isn't 2-valued.


"Seat belts always save lives" vs "seatbelts save lives". The first is false according to your counterexample, and the second is true as long as seat belts save some lives.

Reality is not 2-valued. I don't understand why you're still arguing this point. Yes John Carmack was exceptional. And yes it's true that 6 years of experience does not automatically imply a junior level of experience. That's all I'm saying here.


None

It depends on the person and domain. I've been in the industry for 5 years, but I worked on a lot of projects and did a lot of self learning since high school through college. Now I've been promoted to a front end lead position and I'm fully comfortable with the "senior" in my job title.

Being a senior is about how confident you are with your skill and your proven ability to deliver.

It has nothing to do with years or getting depth in projects. Most projects are just data pipes. Hard projects are rare.


I agree 1000%, but at my company and many I've looked into(not FAANG), it's the way they structure it. Senior is level II, one above Junior. Then all kind of inflated things above that like Lead, Principal, Architect, Principal Architect, Master. Just waiting for them to add Physician or something...it fits in line with our industry stealing other job titles to feel important.

33rd Degree Revered Imperial Grand Master of the Ancient and Sacred Order of the Freecoders

So, just to make myself clear - there are very talented engineers with just a few years of experience, however that's the extreme exception.

As pointed here, it is rare to work on interesting and trail blazing stuff - that's why it takes time, sometimes years, to gain the experience. There's a low probability of actually working on something meaningful, therefore you have to fight it with repeated attempts of finding the interesting stuff - and that takes time. Obviously, time is not the only thing needed to become a really experienced engineer, but - in almost all cases - its a prerequisite.


> Long verbose names don't cost anything

They absolutely do have a cost. The question is whether the benefit they bring in implicit documentation is worth their cost.

> Even beyond the DX of readable names, it also acts like a type-checker. By reading the code, you can verify at least the semantics make sense.

I would strongly prefer that the actual type system do this job instead. As a toy example, if a function is only meant to operate on "lengths" (i.e., non-negative scalar values) then that should be modeled in the types of its arguments, not in its name.


What's the cost?

Readability. In particular, an increase in the rate at which long, verbose names which are mostly the same are confused with one another.

> I would strongly prefer that the actual type system do this job instead. As a toy example, if a function is only meant to operate on "lengths" (i.e., non-negative scalar values) then that should be modeled in the types of its arguments, not in its name.

Have you never worked in a dynamically typed language?


I have. I prefer statically typed languages.

Python is only palatable with strict type checking everywhere. I don't see how unchecked dynamic typing can bring anything else than chaos in a large project.

>They absolutely do have a cost.

what cost? aesthetics?


Cognitive overload. Storing 3-4 succinct variable names in your head takes the same energy as storing 1-2 verbose variable names in your head.

Cognitive overload.. Perhaps it'd be best to provide and example of a "verbose" variable name as compared to a "succinct"

Personally I'm thinking more along the lines of

Succinct ->KEY

Verbose -> MAIL_SERVICE_API_KEY


I think there's some nuance though. If I'm the one writing the code, sure I can keep 3-4+ succint names of things I came up with in my head.

But then somebody else needs to look at this code in the future, and they're scratching their head as to what these names represent. Or somebody didn't really put enough thought into what the variables are, or gave them a name that only half represents what they actually mean.

I basically threw away all care for how long a variable name is long ago and have never had a problem. I just name it with enough words it needs to describe what it represents and don't fuss with making it smaller. With a decent IDE you don't even have to remember the whole name for things half the time, only parts of it.


Long, verbose variables are hard too read (it literally takes more time to read more characters), cause excessive line breaks, are harder to remember, and in general hurt readability more than they help.

Modelling in the type system has a cost too. You have to digest a lot of text (wrapping & unwrapping, etc.) just to understand that you're passing a length. Comparatively some extra characters in an identifier are basically free and can tossed in anywhere.

That may be a fair criticism in some cases.

For my toy example I don't think it is because it's generally easy (in the languages I work in) to overload arithmetic operators on types that are basically constrained scalars so there's no explicit wrapping/unwrapping to do when you want to operate on them as if they were plain scalars.

Maybe you could give me an example of the kind of pathological situation you're alluding to?


I think the lessons learned are exactly those you should be as a junior, nice post.

The passionate arguments about what a senior is or isn't seems strange to me. Who cares if someone is junior, senior, jedi, ninja whatever. Using senior to distinguish between someone who just started and someone who has been there for a while seems perfectly fine.

Agreed. Title worship isn't helpful.

Perhaps a qualifier would have avoided this whole issue, eg "my more senior teammate" or "my mentor".

Then again, this seems like a reader issue, not an author issue. The salient point was never that Chet had status X and therefore could teach skills Y, it just was that Chet taught skills Y.


I would be very interested to read an article titled "What I learned as a senior engineer working with a new grad".

Been in the field more-or-less since the late 80s.

There are days, weeks really, when I can't tell you what I've done. The business just chugs along. If I'm gone a day, though, my phone will ring by 10 a.m.


Bjarne Stroustrup said "It is essentially impossible to judge a programmer on the basis of only one year's work."

I don't think 'type unsafe' is the only way to enable decoupling. For adding new commands, it can be done in a pretty type safe way. The problem is that the `ICommandHandler` may be used in a lot of places expecting different parameters, so they try to simplify the interface by using `any` as the parameter type.

> Static typing is really a form of testing

No! Static typing is not a form of testing. Static typing or static analysis, is an approximation of you program behavior, because it is undecidable in general. Depending on the properties of the type system, you can guarantee that you program doesn't go wrong if it is well-typed, where the definition of 'go wrong' depends on the type system. On the contrary, testing can check the behavior of your program with respect to a set of inputs, and it doesn't guarantee anything outside that set of input. You are doing state partitioning by doing a static analysis over your code to determine what tests you may need, and test some of them.


If I may pick on one piece of advice here: intermediate variables. I think both the bad and good examples are both equally unreadable and feel the "good" version would introduce more confusion into a code base than the "bad" example.

For example, if I came across the example in code, I would begin to wonder why the `deltaX` variable exists at all if its only purpose is to be renamed `translateX` and spend some time tracing the code to see where the variable falls out of scope and to see if it's important. Then I might wonder whether it used for something else at some other point in time and trace the history of these lines (somewhat akin to nerd sniping).

Now I'm focusing on the variable as if it's important when really the important bit is the relationship of the current to the initial. The code is obscuring the fact that "delta" is `current - initial`. Look how many times the pattern is repeated! Perhaps we need an abstraction that can produce the delta for us. However, the data structure makes that a little bit tricky as scrollTop is held in an ad hoc manner, so maybe we should update the data structure so that we can eventually have an api like:

   type ScreenPoint = { x: number; y: number; scrollTop: number }

   type toDelta = (current: ScreenPoint, initial: ScreenPoint) => ScreenPoint

   // example implementation of toDelta using ramda for brevity
   const toDelta = R.mergeWith<ScreenPoint, ScreenPoint>(R.subtract)

   const delta = toDelta(current, initial)
   shadow.style.transform = `translate(${delta.x}px, ${delta.y + delta.scrollTop}px)`
Intermediate variables can be tricky because you can't always trust that the name matches what's actually going on inside, so you have to read everything anyhow.

> using ramda for brevity

please don't do that. Unless the article also uses Ramda (it doesn't) its not really appropriate for you to do so. If you want to use Ramda in your own, personal code, go ahead. But if you're posting a public example for other people to look at, including Ramda only makes sense if you're on a Ramda forum.

The whole point of this article is clarity in programming, you've reduced that with you decision to include some obscure package.


It was only intended to be illustrative of thinking about the operation as merging two identical data structures in a manner that produces the result. You could accomplish the it using any technique your codebase prefers be it FP, OOP, &c. (some languages might even handle such an operation natively).

In this case, I felt that it was sufficiently close to pseudo code “merge these objects by subtracting identical keys left to right,” but I understand your objection to obscurity. I actually feel that the implementation in this example is fairly unimportant.


Two of the points in the article are at cross purposes.

The author mentions doing Mindful Practice but later says to be Problem Oriented. The first one implies a background thread making judgments that is constantly running in the back of your mind. The second needs you to ignore everything but the problem at hand.

I’d go with the latter, esp if you’re new to the job. Let judgments accrue over time rather than go looking for them in the middle of a task at hand.


I find it hilarious the fresh grad with 6 months experience that doesnt know how to use git properly calls himself a “fullstack developer”.

JS dev is a state of mind it seems.


Sorry, but how the @#€& is 6 years a senior engineer?

I consider all of the lessons that he mentions to be things that junior engineers learn before becoming medior engineers.


None

Legal | privacy