3 ms·
>I struggle to codify what “coding as a craft” is. It means different things for different people, but for me, it means: Step one is getting it to work, ste
by Clubber 4y ago
>I struggle to codify what “coding as a craft” is.
It means different things for different people, but for me, it means:
Step one is getting it to work, step two is making is as simple/clean as possible (most people stop at step 1 it seems).
Take time to fix issues / sloppy code when you see it.
Ideally you want the codebase to look like it was all written by one person.
Carefully balance maintainability vs speed or cleverness.
Refactoring is a necessity and should be done periodically. Same with tuning.
Take the time to name your methods/classes/variables as accurately, verbosely and consistently as possible.
Test your shit for bugs before you give it to QA, for the love of everything holy. If QA sends something back, you should feel a little embarrassed.
Take the time to write useful comments. Focus on intent, that way the next person can know if the code is doing what it's supposed to or not.
KISS, DRY, YAGNI.
The best test is when I come back to my own code I wrote 6 months ago and if I say, "who the hell wrote this shit?!" and it's me, I need to clean it up.
- bluedino 4y agoWhat's the quote about writing a shit program and then thinking you're clever when you fix SOME of the bugs it has?
- cgrealy 4y agoI 100% agree with all of that. That’s how you make good software in a sustainable business. Unfortunately, that’s not how the market works anymore. Do the minimum, get to market first, hype features over reliability and performance, get a nice looking balance sheet, and cash the fuck out. I love writing software, but I hate this industry.
- throwaway2037 4y agoYou wrote: <<The best test is when I come back to my own code I wrote 6 months ago and if I say, "who the hell wrote this shit?!" and it's me, I need to clean it up.>> Up vote on this! I do it once a week -- at least. First, I am frustrated by some unreadable logic, then I look at Git blame... "Oh..." Second, fix it... again!