TDD is overrated. Code coverage is extremely overrated. Both of these tend to lead to a morass of tests that prove the compiler works at its most basic level while simultaneously generating a surplus of smugness about the whole situation.
Tests have their place. Tests can be, and often are, valuable. But the easier the test is to write, the easier it would’ve been to just encode it into the type system to begin with.
deleted by creator
I also think a lot about how I might extend whatever I’m implementing. It’s helped me to make classes more generic and keep things laser-focused so that blocks/methods/classes are reusable.
Nothing grinds my gears like seeing the same block all over a codebase especially if each are just slightly different (time to subclass).
and how you could test it easily! it’s incredible how much it helps for cleaner architectures
Except if your adhd includes the perfectionist trait, because then you will never get to write the next line of code.
deleted by creator
DRY means Do Repeat Yourself, when the alternative is cooking up some awful OOP abstraction
Modern PHP is great and people judging it by PHP 5 (version that’s almost 20 years old) are idiots.
JQuery was just Javascript for lazy people.
deleted by creator
Make your app use native components instead of making your own crappy theme for the 782th time
Using single character variable names is always bad practice
If your function is longer than 10 statements, parts can almost always be extracted into smaller parts. If named correctly, this improves readability significantly
If your code files don’t contain more lines of comments than lines of actual code, then you’re doing it wrong. (For Python, docstrings count as comments)
And your comments shouldn’t say what each line of code is doing. If you can code, then you can already tell what each line is doing by just reading the code. The comments should explain WHY it’s being done this way, or HOW it’s being done, or highlight some pitfalls that might snare a future developer, and generally just give some higher level context to a line or block of code.
Don’t be afraid to drop a tool although you’ve spent years mastering it if there is something new that is much more efficient. Some day you have to switch anyway.
Front end and back end are different enough that you can really specialize in one or the other. They take very different mindsets. I know how to make css obey, I don’t know how to make sql performant. Its possible to have both, but not as well.
For every front-end dev, you need 3 back-end guys and a designer.
Programmers are not bad at our jobs, its just not a mature disclipline yet.
I don’t agree and I don’t disagree, but I thinkcontext matters a lot here. Some teams and codebases need deep knowledge, some don’t. Some nned sql performance, some don’t. Your conclusion is only true some of the time
It’s not mature, because nobody let it mature.
Programming is over 70 years old, that’s not a new discipline. Yet, the engineering in our industry is still abysmal. Countless reinvented wheels, nothing is ever finished, changes happen often enough for the sake of change, not progress.
That’s part of the nature of programming. Half-finished might be good enough. If you’ve made an awesome wheel but I need a kink in one of my spokes and yours doesn’t do that, making my own wheel might be cheaper than modding yours.
OTOH, there’s nothing more frustrating than looking for a particular wheel, finding ten really great ones that collectively have the features you need, but individually aren’t good enough.
To stay in the analogy: usually we just want to transport things from a to b. It doesn’t matter, how we get there. So usually we begin with a road and start to cobble together a vehicle from barely fitting and functioning junk we find on the roadside.
There’s hardly any stable surface to work on. And that’s extremely costly.
Pure text is probably not the best way to write code, even if it is the most interoperable format
You can never have too many children
Here’s another: most code reviews on larger companies are BS, just for show and nitpicking.