Good code is like underwear. Simple, short and and a joy to look at

Good code is like underwear. Simple, short and and a joy to look at #HoskCodeWisdom

Developers write complex code because they don’t have enough time to write simple code.  To get to a place to write simple code you need to have understood the key requirements and create a simple design.

When explaining a subject, an expert identifies the key points, the hierarchy of knowledge and can explain it.  People who don’t understand a topic jump between points, use 20 words when 5 will do and repeat themselves.

The difference between complex code and simple code is noise; the purpose of the code is unclear with unnecessary steps.  Simple code has clarity, it’s concise and written with a purpose.  When designing code you create excess because you understand the problem whilst you solve it, the design evolves as with your understanding.

Developers skip the design stage and move straight to writing code, it gives the illusion of progress.  The developer learns the solution but the more thought you put into the problem the clearer the solution becomes.  Learning the needs half way through leaves you in a dilemma to adjust what you have or start again.

Writers should not publish an first draft of writing, developers should not release an first draft of code.  You should release when it’s ready, not what you have.

Simple code is created by developers who care about quality, who care about the developers read, maintain and extend it.  Clean code is not written by accident.

Sometimes the most productive day as a programmer is the day you remove hundreds of lines of code and refactor a large confused class into small focused methods

I finish this post with a KISS – Keep it simple stupid

Further reading

 

Advertisements

3 thoughts on “Good code is like underwear. Simple, short and and a joy to look at

  1. Pravin Pawar September 13, 2018 / 1:31 pm

    Hi Hosk,

    While looking into your blogs, I must say its very fantastic to read and enjoy.
    Really enjoying your blogs…!

    Like

  2. Nicolebolton September 25, 2018 / 3:12 pm

    Here i had read the content you had posted. It is much interesting so please keep update like this.

    Like

  3. André Cavaca September 26, 2018 / 11:01 am

    One of your best quotes hands down

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.