Hacker News new | ask | show | jobs
by rdrey 2616 days ago
Great news! I first found this book at the end of my first year in a corporate dev job, as I was becoming a bit bored/disillusioned with the industry. Most of the lessons were great and have improved my career. (Here's a succinct list of the Tips from the first edition: https://pragprog.com/the-pragmatic-programmer/extracts/tips)

The only piece I'd probably eliminate was focused on code generation ("Write Code That Writes Code"). The idea is fascinating and led me down a rabbit hole. I've always looked for an opportunity to do code-gen since, and have never really found a good one.

2 comments

I have run into the same situation as you, and it always seems to be bad timing to invest into code generation for projects. I am not affiliated with this project, but I have good success with http://www.hygen.io/ especially with component frameworks and resolver middleware boilerplate getting deeper and deeper.
Eliminate it or not, it's how big projects are managed, in some industries at least. Instead of rewriting the same stuff over and over again, paying attention to the slightest of details, you generate your code based on the slightly modified new requirement which can be an excel sheet that all the stakeholders can read. Taken to the extreme, even the configs are done by clicking menus and buttons where a single line of code could would suffice. This is taken to the extreme, I agree, and it's the reason lots of devs are not so happy with their jobs. But it's also necessary, I suppose, if you want to externalize your projects to far away lands or you can't find top-notch devs for each and every project: you simplify and dumb down the work. Code generation helps here. It removes the hairy details.

From another view, eliminate you cannot not, since if you think nice and deep about it, what your compiler does is to generate code. You use this idea everyday, even if you know it or not. It's code generators all the way down.