"You gotta think lazy" Me: coding for hours to automate 5 minutes tasks.
Be DRY don't be WET ( We Enjoy Typing)
As someone who just started c# this help a lot. Thx!
"Don't repeat yourself is aimed at encouraging programmers to not repeat themselves"
"Don't repeat yourself is a software development principle aimed at reducing repeating yourself." ah yes, the floor is made out of floor here
Well, sometimes readability takes precedence over DRY. :)
Make sure not to use DRY programming in test cases, they are meant to be repetitive otherwise you will need to write tests for your tests.
Oh don't you worry, im lazy alright, too lazy to even start coding
Ca you make video explaining SOLID principles? Your explaining skill is great
I'M A PROGRAMMER, I GOTTA THINK LAZY 🔥🔥🔥🔥🔥🔥
if you dont want to use objects in this case, you can pass a function to a wrapper function that does the setup def wrapper(operation): x = 10 y = 10 return operation(x, y) def add(a, b) return a + b and use like this: wrapper(add)
“Gotta think lazy”… that’s what I’m doing when I repeat myself. It’s out of laziness… efficiency is hard.
Refactoring and abstracting is not “thinking lazy” – quite the contrary, as saving time long term takes a lot of effort up front.
There is no “DRY” npm package. Am I supposed to do this by thinking?
This is good advice for code you know you're gokng to use again. Sometimes you just have bulk operations that need to get done in a specific way that doesn't pertain to another scenario.
"You gotta think lazy" Me: goes to stack overflow then copy-paste
As a developer with a lot of experience, i must say that the DRY principle is not applicable to tests; it only confuses when a dev has to jump around in test code to figure out wth is going on. And since test code is often hard to figure out, being explicit at the cost of more lines of code is ALWAYS preferable
"You're a programmer, you gotta think lazy" man this line will stick with me for the rest of my life.
very context dependent, but sometimes the cost of repeating yourself doesnt outweigh the cost of refactoring to be DRY. Again, also very context dependent but you can risk tighter coupling by trying to be too DRY
@Kaitokid730