I’ve reused code many times. I’ve also worked with code written to be reusable, which turned into incomprehensible garbage that compiled and ran on luck. I’d say: Don’t aim for reuse. Just write smart code and you’ll want to copy-paste and use it again.
-
-
-
i like that! reuse that happens this way is def a good thing
Kraj razgovora
Novi razgovor -
-
-
My rule is to abstract the third time I have to do something nearly identical. Before that, you’re probably building the wrong abstraction
-
that's the perfect rule! 3x is the charm
Kraj razgovora
Novi razgovor -
-
-
Too bad I can only give one like for this! We are underestimating power of duplicating older code to solve similar problems in a new project, and being able to improve/change it for newer specific cases that we wouldn't have anticipated with so called "reusable" code anyway.
-
so true, recreating something from scratch the 2nd time around often takes very little time and comes out better
- Još 1 odgovor
Novi razgovor -
-
-
And here I am, reusing the same Weapon class for the 6th game in a row. I think the benefit comes when you need to maintain that code for months or years after you've stopped doing it daily. In that case, being on a reusable framework helps keep orientation.
-
the important question is did you design that weapon system to be used in 6 games from the get go? would today's system have made sense on game one? or did it build up slowly, on demand, vs "maybe I'll use this new feature someday"
- Još 1 odgovor
Novi razgovor -
-
-
It's often more efficient just to remember that you have solved a similar problem, than overengineering your code before you actually have to use it at least twice.
-
Yeah, more useful than a library of reusable code is a easily searched library of past attempts at problems - often so you can say "oh yeah, when I wanted to do X, I tried Y on one project, and tried Z on another. Both of those were awful, so I'll try something else"
- Još 1 odgovor
Novi razgovor -
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.