Code Readability

This week, I read an article by Max Kanat-Alexander, discussing the readability of code (https://www.codesimplicity.com/post/readability-and-naming-things/#more-797). The article spoke to the idea that a large part in writing readable code is spacing. I can see how that can be true. Also, according to Max, another way to make readability present in code is to use proper naming conventions. Naming things with readability in mind goes a long way. 

It is understandable why proper spacing makes a big difference in the readability of code. When I am reading a book, I prefer that book to have bigger spaces in between the lines. This results in a more smooth and enjoyable read. This also applies to code. I have read spaced out code and I have also read code bunched together and every time, I will choose the spaced out code over the bunched together. Reading someone else’s code is already difficult because you aren’t necessarily familiar with their habits. Writing code bunched together and not spaced out just results in another layer of unnecessary difficulty that is a waste of time. 

Another aspect of readability that Max talks about is naming. Naming your variables and functions after the purpose that they serve is incredibly important. When someone else is looking at your code, it is essential that they are able to piece together what does what in the code and naming conventions help to expedite that investigative aspect of programming. I personally have worked on projects where variables were incredibly vague and figuring out what those variables meant and what purpose they served was an obstacle in the workflow of the project. 

Overall, the importance of readability cannot be overstated because it is something that affects the time management and progress of a project.

要查看或添加评论,请登录

Martin Nesbitt的更多文章

  • Data Culture

    Data Culture

    This week, I read an article from Eric Brown (https://ericbrown.com/your-data-project-is-going-to-fail.

  • Estimating Task Completions

    Estimating Task Completions

    This week, I read an essay from Andy Hunt (https://pragprog.com/magazines/2010-11/guru-meditation) on estimating time…

  • Duct Tape Programming

    Duct Tape Programming

    Recently, I read an article on Joel on Software (https://joelonsoftware.com/items/2009/09/23.

  • Software Development Constraints

    Software Development Constraints

    Recently I read an article by Kevin Rutherford…

  • Keeping the User in Mind

    Keeping the User in Mind

    This week I found a short and sweet article on Code Simplicity by Max Kanat-Alexander (https://www.codesimplicity.

  • Adjusting to Agile Development

    Adjusting to Agile Development

    This week, I read an article on Andy Hunt’s website (https://pragprog.com/magazines/2011-01/guru-meditation).

  • Agile, Test-Driven Development, and Pair Programming

    Agile, Test-Driven Development, and Pair Programming

    Recently, I read an article describing how a lot of companies that are transitioning over to agile development are…

  • Writing Maintainable Code

    Writing Maintainable Code

    I read a blog post on Code Simplicity (https://www.codesimplicity.

  • Agile and Agility

    Agile and Agility

    In February of 2001, 17 programmers met in Utah and developed an approach to software engineering known as Agile. One…

  • Refactoring HTML

    Refactoring HTML

    Recently I read an article on Martin Fowler’s website about the value in refactoring code; specifically, the value of…

    1 条评论

社区洞察

其他会员也浏览了