Write Less Code
mikegrouchy.com
Write Less Code
1–10 of 54 posts
Re: Write Less Code
#2This usually means I found a good refactoring, or a good abstraction that removes a lot of stuff that is now boilerplate.
If I can also add a feature with a negative net LOC count, it is a gold-star day :)
That being said, sometimes just dumping a pile of code that passes tests, but is large (bloated), unwieldy and redundant is the right move. It give me something to refactor and abstract, and gets things done.
It's all about balance.
Re: Write Less Code
#3Re: Write Less Code
#4Re: Write Less Code
#5Re: Write Less Code
#6For example I produced a CMS that was intended to be used by content writers who were not technical. However as the complexity of the website increased (more dynamic content on pages etc) I had to write a lot of code because there were a lot of exceptional cases "I want this side bar to appear on all of these types of pages apart from these 3 because of condition X and this other one because of condition Y". This means that my code ends up being an enormous pile of if statements with a huge number of database flags at the backend and checkboxes on the front end.
In the end it proved more effort efficient to produce a simple tag language for the front end and expose that to the designers and content writers, this took a lot of complexity out of the back end which could then concentrate on providing the primitives for the tag language.
You do move some complexity to the front end here for sure, but people are often better at specifying what it is they mean if they can actually generate and tweak it to some extent themselves and show the result rather than trying to explain everything in an email.
Another great example of this is Unix command line utilities , the basic interface for many of these has remained relatively unchanged since the 80s whereas GUI applications seem to be continuously redesigned.
Re: Write Less Code
#7I find as a general rule, the more that my application tries to abstract and protect the user from the "technical" nature of the platform the more code I have to write. For example I produced a CMS that was intended to be used by content writers who were not technical. However as the complexity of the website increased (more dynamic content on pages etc) I had to write a lot of code because there were a lot of except…
Re: Write Less Code
#8Re: Write Less Code
#9 code == ui
code has to look beautiful, it should feel good to work with, easy to use, etc.maybe this is all about the zen of coding.
Re: Write Less Code
#10Any day that has a negative LOC count is a good day :) This usually means I found a good refactoring, or a good abstraction that removes a lot of stuff that is now boilerplate. If I can also add a feature with a negative net LOC count, it is a gold-star day :) That being said, sometimes just dumping a pile of code that passes tests, but is large (bloated), unwieldy and redundant is the right move. It give me somethin…