Are you a lazy programmer?
lazyprogrammer.it
lazyprogrammer.it
Just because Jenkins does the final "cp && restart" does not mean that critical bug will not ruin your weekend. The tests mentioned before help, but the unexpected is, per definition, unexpected.
In fact, when the house is burning, I found CI deploys to be quite a slowdown. But this might just be me.
A good infrastructure will help you at every point, but it will still take time.
“So just roll back” I hear you say, to which I respond: “it ain’t always that easy”. You can’t always just turn the reactor off once the meltdown is in progress.
CI will rebuild after you revert everything and still fail to deploy if you pushed a versioned library from your broken code.
Go into your environment and manually roll back to a working image... and learn a powerful lesson.
Even then it's manageable if your production deployments are version pinned, it only becomes a problem if schemas in your database or messaging have had non compatible changes and data has been written (i.e you have binary and data dependencies in a release)
All this being said with the assumption that the CI/CD pipeline has been designed to best practices.
In the (very large) company I work at, the engineers are responsible for writing the code, testing it, and supporting it once it's live. That includes being Oncall and being paged if something goes wrong.
But I can see that it might be useful to have it all together... (DevOps, QAOps)
It depends how you think about it I think. Meaning, it'll feel like quite a slowdown but exists to help mitigate errors made by humans experiencing varying degrees of panic while their house is burning. In my opinion CI deploys are meant to provide consistency, not speed (although people generally experience speed ups in their deployment process when there are no longer "works on my machine" type issues that pop up each deploy causing slowdowns in new and exciting ways).
But I also think that programmers flaunt "Friday afternoon deploys" too much in either direction. It shouldn't be the end of the world but it also is just an unnecessary risk if you can help it.
Mostly, it was easier to not push on friday.
I divide my officers into four classes as follows:
The clever, the industrious, the lazy, and the stupid. Each officer always possesses two of these qualities.
Those who are clever and industrious I appoint to the General Staff. Use can under certain circumstances be made of those who are stupid and lazy.
The man who is clever and lazy qualifies for the highest leadership posts. He has the requisite nerves and the mental clarity for difficult decisions.
But whoever is stupid and industrious must be got rid of, for he is too dangerous.
> In conclusion, this was a difficult expression to trace because it was complex, and it could be articulated in myriad ways. Currently, the earliest example located by QI appeared in English in 1933 and was credited to Kurt von Hammerstein-Equord.
Others might call this being efficient or work smart, not hard etc. etc.
To me, it's quintessential laziness at its most glorious.
Edit: knew there was a link somewhere https://github.com/NARKOZ/hacker-scripts
Look, I get that you're trying to cleverly put in a bunch of rules that "make a good programmer", but rules do not the master make. A master knows the best practices and rules, knows why they apply, and knows where their usefulness ends. Many of the properties here range from naive to downright dangerous.
Example:
- "A lazy programmer do not deploy in production, they instruct Jenkins to do that. Therefore a lazy programmer is not afraid of deploying on Friday afternoon."
Using a tool to deploy does not remove all of the risks of deployment. If you deploy on Fridays, you WILL eventually be there on Saturday fixing a problem.
- "A lazy programmer is a master of delegation. After they delegated a task, they immeditaly forget about it."
Also very bad advice. Forgetting about a delegated task removes you from the chain of responsibility. If you're delegating, it's on YOU to follow up. Otherwise things get lost in the chaos.
I'm not going to run through all of them. Please just disregard this site and take lists of "a good programmer does..." as a red flag for the company promoting it. A good engineer is not made through lists and rules. If it were that easy, we'd all be good engineers.
For a great programmer you are missing that they control the environment as well.
If you know who you are delegating to you know what will be returned, when and how that is going to affect the next step. As a great programmer you are 15 moves ahead. Why would you worry about chaos? There is a lack of trust in your plan if fear of chaos exists. You are Michael Jordan and can see the entire court.
As an average developer I don't trust anything will work even if it was just tested.
I'm a little sour because apparently "writing a blog" is not hip anymore and we need dedicated domain for every brain fart.
Also, this does not seem lazy to me at all: > A lazy programmer writes a lot of tests, so QA junks do not waste their time. > A lazy programmer documents their code, so thar [sic] coworkers do not waste their time.
Would rather say:
A lazy programmer documents their code so they do not have to waste time explaining it in person.
A lazy programmer writes thorough automated tests so they do not have to waste time on repetitive manual testing.
I know that I am guilty of automating stuff for way too long :)
I have been compelled to write detailed documentation specifically because I was getting tired of being asked questions about it[1]. Though I would say the issue isn’t really laziness so much as general asociability and a need to focus...
[1] It does nothing to stop the flow of questions but it does mean I’m more likely to give an answer that’s actually correct :)
Serious question. I've spent a lot of effort writing internal and external documentation for various systems over the years, and I'm not sure anybody ever read any of it.
Also, if you write relatively small and short functions and you document the goal, the inputs and the result, then the code is quite self explanatory.
But there are many functions where it is reasonable to have even hundreds of words worth of comments:
- anything that heavily uses intrinsics and requires the programmer to have a detailed mental model of the CPU in order to analyze (e.g. making an ASCII table of the register state at each major step of the program). Likewise with assembly programming, though obviously that’s a special case.
- a particularly sophisticated graph-theoretic algorithm, for which the “comment” might be essentially a short CS paper explaining how the algorithm works, giving its time/space complexity, and proving correctness
- the “main function” for simulating a physical or financial system, which might required detailed descriptions of the equations, parameters, and various options
I am working on some compiler stuff and have taken to literate programming for basically everything that’s not a simple utility.
And also, as a programmer I enjoy the process of writing and debugging tests much more than manual testing, so even if it wasn't a time saver, it would still make my job more enjoyable.
> A lazy programmer is super efficient, does in a couple of hours what would take a whole day to others, so that they can spend the rest of they lingering on the couch feasting on Netflix.
This is a crazy high, unrealistic bar. It’s almost comical.
> A lazy programmer startes at the code for hours, trying to figure out the way to write as little code as possible.
I may or may not want someone on my team to do this, depending on what it is their working on, its significance, etc. but staring at your code for hours on anything you work on probably means you’re not great at making trade offs and haven’t considered if what you’re doing is actually worth trying to over optimize.
> A lazy programmer uses the basic UI template the hosting service provides them and then they say it’s brutalism.
This is some pretentious gate keeping. Does the lazy programmer also hack into government “mainframes” in 10 seconds?
> A lazy programmer do not deploy in production, they instruct Jenkins to do that. Therefore a lazy programmer is not afraid of deploying on Friday afternoon.
Jenkins isn’t a solution to when you deploy. You could have all the tooling for effortless deployments but not have enough test cases, canaries, etc. And your software failing, especially if it’s a service, could have a blast radius that now impacts several other teams and their on calls on a late Friday. And it might not even realistically be in your control to get the automation quality to the bar you’d love to have because of competing priorities and ROI.
If you’re someone young at HN, please take this stuff with a grain of salt. This document sets realistic standards of what it means to be a lazy programmer (in a good way) the way the Kardashians set standards on beauty with their fake photoshopped Instagram images.
It's easy to write a lot of code really fast. Then bolt in on an existing application and write as much code doing the bolting as you wrote initially.
Reading a lot means getting an understanding of what you are about to extend, figuring out the best way of doing it and what's already provided by the application.
My favorite bit of humor is:
• Writes code that &emdash; gasp &emdash; has bugs.
The misspelled and non-decoded em dashes started out as an actual mistake but are now kept in because of the delicious self-reference:
Not all 10x are jerks.
"Respects and upholds community Codes of Conduct."
kind of feels like a 1.5x criteria. A true 1x hasn't read the CoC, and if they have, they didn't memorize it or see the e-mail about the latest updates. Though they will course-correct if you tell them they've erred.
This is incredibly important:
"Willing to admit when they're wrong, and aren't afraid to say "I don't know."
There's incredible power in being able to show your hand with an open understanding of how it could be better.
Or is it supposed to be that many people are less-than-one-x and aspire to be 1x?
>"A lazy programmer writes a lot of tests, so QA junks do not waste their time."
I'm really trying to wrap my head around this sentence, but it just doesn't make sense. Also please just don't talk down to QA like that.
0/10, this site actively makes me not want to work there.
I work as hard as I can to be as lazy as I can.
A lazy programmer uses a proper parser instead of trying to write a parser in regular expressions.
I felt cheated after reading that page with as positive an outlook as possible -- while disagreeing left and right mentally -- only to find out on the last line that it was a self-promotion for a company.
I can't wait to read 'The Hacker's Manifesto, Brought to you by Microsoft'.
What a crummy feeling; and congratulations 'Saasform', I associate it with that name.
A lazy programmer produces the simplest and most graspable solution.
A lazy progammer has the easiest time explaining their solution.
;-)
And yet, problems still happen.
Programming is the art of adding bugs to an empty text file.
Not taking five extra minutes to explain what you did when submitting a Pull Request - that's laziness, and forces your team mates to spend more time and mental effort on understanding what's going on.
Not going back over your diff one last time before submitting it for review - that's laziness, and it puts the onus on discovering things you forgot on your team mates.
Not going through the effort of making individual changes easy to revert - that's laziness, and it forces the future maintainer (possibly yourself) to put in extra work at a time when they're under stress, e.g. when fixing a critical bug.
I could go on.
A lazy programmer takes time to search for the things that the OS will do "for free". Keeping up with and using, the latest developments in OS libraries. This can save you a lot of coding, and gives you capabilities that are likely to keep working on diverse future hardware.
A lazy programmer will check in the smallest possible fix when fixing other's code. The simplest change takes time to isolate, but it causes the least disturbance and reduces chance of side-effects and new bugs. It also makes the change comprehensible to others, which saves time having to explain it.
If you do something right the first time, you don't have to do it again, and in order to do that you have to do it simply and carefully or you will never get it right.
I guess basically, I'd just like to remove the positive connotations with the term, and instead just focus on the actual virtue: working efficiently.
Of course, it's not a major issue. It's just semantics, and I'm not that much of a 'language matters' type of person.