DEV Community

Discussion on: Code creation, try it!

Collapse
 
jfrew profile image
jfrew

I shouldn't have been rude to you, I can make a better contribution than being mean.

So, I am not suggesting that we bring in third party libraries to do stuff instead of writing it ourselves. While I believe we should be careful about which wheels we reinvent, there are some wheels that are plenty over engineered. I still count any library used to support code that I've written as part of the codebase's total size. I like that you put forth the classic axiom of Don't Repeat Yourself, but I think that generalizing it to actual production is increasing the complexity, which directly increases the likelihood of error. So, sure, build practical tools. But emphasis on practical.

Also the idea that high LoC is a positive indicator is straight wrong thinking. Increasing the complexity of a system increases its chances of failure. Nobody who writes secure software thinks that big is better.

Rereading it, is your piece about tooling or automation? Code that writes code, like with metaprogramming and macros, is not the same as a function that spits out a preconfigured webpage.

Thread Thread
 
chris_bertrand profile image
Chris Bertrand

Not a problem, it wasn't taken to heart. The LoC line was tongue in cheek, do you not keep a tally of where you're at? 😊

Exactly practical ways of not repeating yourself are important to be aware of, this is potentially one of them. Not to be used too frequently, but definitely, in my opinion, more than we currently do.