Earlier quoted context omitted.
I disagree strongly with it on multiple fronts. That concern should be secondary to your program actually doing its job well. Your customer will literally not care how elegant or ugly your code is; they just see the end result. And when the program fails them, it really doesn't matter to them whether your juniors understand the code or the error. Moreover, not every abstraction is (or can be expected to be) accessibl…
Exactly. How many entry level engineers come onto a project per year? 5? Is onboarding them onto the project is a deliberate and streamlined way such an undue burden that you must change your programming style to avoid it?
Drunk Post: Things I've Learned as a Sr Engineer
111–120 of 510 posts
Re: Drunk Post: Things I've Learned as a Sr Engineer
#112> Good code is code that can be understood by a junior engineer. Great code can be understood by a first year CS freshman. The best code is no code at all. This a thousand times. Having empathy for future devs, maintenance, and bug fixes is so important.
1) Readable Interfaces usable by juniors when parts of the code will be used by lots of devs and will almost certainly change
2) Higher complexity behind the interface for parts of the code that change less often and require more skilled engineers
Re: Drunk Post: Things I've Learned as a Sr Engineer
#113Earlier quoted context omitted.
Exactly. How many entry level engineers come onto a project per year? 5? Is onboarding them onto the project is a deliberate and streamlined way such an undue burden that you must change your programming style to avoid it?
It's not only about new hires. You will have to figure out things about code that you wrote 3/6/12 months ago.
Re: Drunk Post: Things I've Learned as a Sr Engineer
#114Earlier quoted context omitted.
Even worst is the meme that “programming is just copy+pasting from stack overflow”
Because good senior programmers are rare (as can be observed if you post a job listing). Most of this stuff comes from students / junior developers, where yes, they probably visit stack overflow every 20 minutes
Re: Drunk Post: Things I've Learned as a Sr Engineer
#115Earlier quoted context omitted.
This sentiment is exactly why programming in an org-chart is so much different than programming as an individual. Don't apply corporate best practice designed to withstand turnover to personal programming - you're leaving abstraction and efficiency on the table. The better code for your own projects is almost definitely inscrutable to a newcomer a lot of the time. It's okay for there to be prerequisites to understand…
I’m not sure, you can become the newcomer yourself when you have to come back to parts of your code base months later. My experience writing simpler code has been pretty successful to respond to customers wanting random new features.
e.g. I'll understand my monad transformers in a year, but a new hire with no Haskell experience will not.
Re: Drunk Post: Things I've Learned as a Sr Engineer
#116Earlier quoted context omitted.
This assumes you are absolutely certain you know what the code should do. And that it does what you think it does. Hence while you might think “performs its task” is an easily defined I’d disagree. I’d take clear code that wasn’t working over code that was hard to reason about and somehow worked every day.
> I’d take clear code that wasn’t working over code that was hard to reason about and somehow worked every day. Then you'd be out of business.
Re: Drunk Post: Things I've Learned as a Sr Engineer
#117Earlier quoted context omitted.
three things i find to be true of every web app i work on: 1. good logging is the most important part of the app. whatever the app is meant to do is secondary. the app should be a logging app first, and then a backend service to sell widgets second. 2. assume performance requirements for request latency and transactions per second will be at least 3x whatever the product owner tells you at the start of the project an…
Logging at the boundaries or seems is especially helpful.
Re: Drunk Post: Things I've Learned as a Sr Engineer
#118> Good code is code that can be understood by a junior engineer. Great code can be understood by a first year CS freshman. The best code is no code at all. This a thousand times. Having empathy for future devs, maintenance, and bug fixes is so important.
I disagree strongly with it on multiple fronts. That concern should be secondary to your program actually doing its job well. Your customer will literally not care how elegant or ugly your code is; they just see the end result. And when the program fails them, it really doesn't matter to them whether your juniors understand the code or the error. Moreover, not every abstraction is (or can be expected to be) accessibl…
That performant code that you wrote maybe at the expense of readability? It could very well become bad code when you leave the company and it falls to a junior engineer to modify it to fit some changing business requirement. Or, there’s a bug in the code and the amount of time it takes to fix it is a direct function of how quickly and completely that junior engineer can understand the code.
For me, the hard part is knowing when and how to make that trade off. I’ve definitely erred on both sides often enough.
Re: Drunk Post: Things I've Learned as a Sr Engineer
#119Earlier quoted context omitted.
Logging at the boundaries or seems is especially helpful.
Can you elaborate on what you mean by a boundary? You mean logging the interface between two services or modules?
Re: Drunk Post: Things I've Learned as a Sr Engineer
#120> Good code is code that can be understood by a junior engineer. Great code can be understood by a first year CS freshman. The best code is no code at all. This a thousand times. Having empathy for future devs, maintenance, and bug fixes is so important.
Amen. Something bizarre I have noticed though in junior-almost-senior engineers is that they pride themselves in obfuscating and writing "highly complex" logic, with no documentation. It's almost like they are demonstrating their new abilities in the worst way possible. I have been dealing with one of these engineers recently, and they have expressed to me that they love writing because it's so terse. It's been a poi…
I noticed that they put a lot of their self-worth in the sophistication of their code, so it's difficult to criticise without making them feel bad. You need alternative methods of getting them to "see the light" and write code that's more understandable and maintainable by others.