Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've seen junior devs write code carefully, putting time and effort into it. The code was ornate and almost too over-commented.

mid-level devs become more pragmatic, but can skimp on both elegance and simplicity vs complication.

What's interesting is that decent senior dev code sometimes almost looks careless, but really works well in the end. For example, immediately exiting with an error instead of complex error recovery. (the latter would just move the problem around and make finding and fixing the root cause more troublesome)

Another thing would be duplicating code instead of doing some complex re-use with complicated conditionals.



    What's interesting is that decent senior dev code 
    sometimes almost looks careless, but really works 
    well in the end.
I absolutely love this description.

In a lot of ways, YAGNI is what really sets senior code apart. When I was a more junior dev, I thought senior code often looked under-engineered, but in hindsight I realized I was over-engineering things at the time.

    Another thing would be duplicating code instead of doing 
    some complex re-use with complicated conditionals.
God, I wish I could go back in time and burn this into my brain.


Another example is some devs chain maps and array filters when a mundane for loop would do.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: