Clean Code Resources

Clean Code Cheatsheet

Useful Clean Code related links from Fall 2012 CSC 430 Students:


From Jason Clark:
http://www.garshol.priv.no/blog/105.html
Here are 7 tips on writing clean code

http://mindprod.com/jgloss/unmain.html
This is a somewhat humorous but very informative on code maintenance

http://www.altdevblogaday.com/2012/08/18/cleaning-bad-code/
Yes, this is just a blog, but it is a very informative blog on cleaning bad code.

From Steven Conner:
http://www.lagerweij.com/2011/05/28/code-cleaning-a-refactoring-example-in-50-easy-steps/
shows bad code then 50 steps to clean it up

http://www.garshol.priv.no/blog/105.html
7 tips on writing clean code

http://java.dzone.com/articles/clean-code-four-simple-design
4 simple steps for clean code

http://sgoettschkes.blogspot.com/2012/02/path-to-clean-code.html
a bunch of stuff for clean coding

From Kurt Ladendorf:
http://net.tutsplus.com/tutorials/html-css-techniques/top-15-best-practices-for-writing-super-readable-code/
-  Gives the author's opinion on how to write readable code.  It might be a good thing for people to read and critique.

http://www.lagerweij.com/2011/06/08/code-cleaning-how-tests-improve-code/
-  Rather lengthy, but this is a series of posts that discuss cleaning Java code.

From Micharel Owen:
Code examples that could be cleaned up:
http://www.happycodings.com/ 
     This site has lots and lots of code for many languages that could be used to clean up a bit
http://www.codegonewrong.com/
     A funny collection of bad code examples.  
http://oreilly.com/catalog/javanut/examples/
     Lots of Java code that could be used for cleaning up.

Sites that would go well with the Clean Code book:
http://www.exmsft.com/~hanss/badcode.htm  
     This page is hilarious.  It talks about what to do if you want to right BAD code!  It makes it pretty clear what you should avoid and it is an enjoyable read.
http://www.codinghorror.com/blog/2006/05/code-smells.html
     A good summery of things to consider when writing code to keep it clean

From Demis Harper:
http://www.codeproject.com/Articles/251885/Here-is-why-we-write-poor-quality-software-- This gives a pretty good explanation of how good code can go to bad code if coders aren't careful, and how it can be difficult to maintain code quality.

http://www.webkit.org/projects/cleanup/index.html -- this site details an open source project that relies on contributes to clean the code.  Perhaps the code could be used in class?

From Daniul Byrd:
Some articles about good programming practices:
http://www.omninerd.com/articles/Coding_Practices
http://www.kmoser.com/articles/Good_Programming_Practices.php
http://www.codeproject.com/Articles/31011/Bad-coding-Practices

This one has some good tips about writing clean/readable code:
http://www.codeproject.com/Articles/8971/C-Coding-Standards-and-Best-Programming-Practices

About cleaning bad code:
http://www.altdevblogaday.com/2012/08/18/cleaning-bad-code/

From Jessica Lott:
Interesting article on Clean Code by IBM:
http://www.ibm.com/developerworks/rational/library/nov06/pollice/index.html

Another blog that has many different topics, including entries about how to write clean code:
http://avalanche123.com/

Top 15 tips for writing clean code:
http://net.tutsplus.com/tutorials/html-css-techniques/top-15-best-practices-for-writing-super-readable-code/

From James Cain:
7 tips on writing clean code | Larsblog
http://www.garshol.priv.no/blog/105.html
This blog entry includes some helpful programming tips from Lars Marius Garshol, a Norwegian technologist living in Oslo. These tips are based on problems that tend to recur again and again in code written by other people.

Why clean code is more important than efficient code | TechRepublic
http://www.techrepublic.com/blog/programming-and-development/why-clean-code-is-more-important-than-efficient-code/4284
Chad Perrin, an IT consultant, developer, and freelance professional writer, discusses his reasons for putting clarity ahead of efficiency at certain times, while putting more emphasis on efficiency at other times. As an example, he talks about a program that he once made, which became very inefficient due to its surplus of clarity and lack of efficiency.

From Jonathan Vinson:
http://www.garshol.priv.no/blog/105.html
a condenced version of clean code.

http://www.amaxus.com/cms-blog/refactoring-to-clean-code
a good example of step by step refactoring using ideas from clean code etc.

http://geekswithblogs.net/akraus1/archive/2010/04/04/139091.aspx
some code to be cleaned with steps of cleaning it

http://www.youtube.com/watch?v=XcT4yYu_TTs
GoogleTech Talks about writing clean code

http://theholyjava.wordpress.com/2011/02/14/clean-code-four-simple-design-rules/
some basic rules to follow if you wanna start writing clean code

From Michael Holt:
http://www.onextrapixel.com/2011/01/20/10-principles-for-keeping-your-programming-code-clean/
10 Principles for clean code
 
http://www.ibm.com/developerworks/rational/library/nov06/pollice/index.html
About keeping clean code with examples
 
http://drupal.technicat.com/writing/programming.html
Seven habits of highly effective programmers
 
http://repeatgeek.com/career/5-types-of-comments-to-avoid-making-in-your-code/
Examples of bad comments and how to avoid them
 
http://www.cs.arizona.edu/~mccann/style_c.html
How to develop a good programming style
 
http://www.ehow.com/how_6769859_improve-programmer-productivity.html
How to improve programmer productivity
 
http://www.jaysonjc.com/opinion/top-10-traits-of-a-good-programmer.html
10 traits of a good programmer

From Conal Green:
<http://sourceforge.net/projects/svideoconverter/?source=directory>
A simple project to clean and/or enhance, but there is some *.form stuff that I know nothing about... oops. Each student could try and then later compare the results as an exercise.


Useful Clean Code related links from Fall 2013 CSC 430 Students:

From Matt Carson:
http://www.youtube.com/watch?v=k6VVURkxNkk
Video of JeremyBytes Clean Code: The Refactoring Bits

From Aaron Clark:
https://www.thc.org/root/phun/unmaintain.html
This shows you what not to do by telling you how to write unmaintanable code.

From Cody Driskill:
http://net.tutsplus.com/tutorials/html-css-techniques/top-15-best-practices-for-writing-super-readable-code/
Contains some pretty basic, but still important tips that apply to pretty much any language.

http://lumiera.org/project/background/CleanCodeDevelopment.html
Breaks down different clean code techniques into karate style belts to indicate importance. Helps to clarify basics and even more advanced techniques to keep in mind.

http://www.macronimous.com/resources/writing_clean_secure_and_easy_php.asp
Has some tips to help write PHP code and could double up and helps a bit in the web programming class too.

http://www.newthinktank.com/videos/refactoring-video-tutorial/
A video series that covers code refactoring. I found the guy who does the videos a bit long winded but maybe some people can relate to him.

http://www.dreamincode.net/forums/topic/335368-refactoring/
A write up of refactoring techniques that pertain to VB. It also has some good tips that can apply to any OOP language.

http://www.perl.com/pub/2003/10/09/refactoring.html
This is an article about refactoring in the Perl language, and good practices to employ there. This is particularly useful because Perl, I feel generally doesn’t get too much individual coverage.

http://beyondrelational.com/modules/2/blogs/79/posts/11540/refactoring-of-c-code.aspx
This covers C# and the best part is that it actually has examples of before and after code.

https://github.com/thomasdavis/best-practices
Gives a good overview on how to write good code in general.

http://www.ucl.ac.uk/~ucappgu/seminars/good-practice.pdf
Powerpoint slides done at a London University that also give good tips.

http://www.cs.usfca.edu/~parrt/course/601/lectures/refactoring/refactoring.html
An overview of refactoring code from the University of San Francisco, includes links to a database containing patterns to watch out for.

From Parks Frazier:
http://java.dzone.com/articles/what-clean-code-%E2%80%93-quotes
-Quotes from a few leading figures in the Computer Science field on clean code.

https://www.42lines.net/2012/07/06/clean-code-reducing-wtfs-per-minute/
-Interesting article that should sooth your pain a little

http://www.javapronews.com/using-finally-to-write-clean-code/
-Article for Java users on how to use a Finally statement to clean up code

http://net.tutsplus.com/tutorials/html-css-techniques/top-15-best-practices-for-writing-super-readable-code/
-Tips and practices for writing good, readable code

http://www.education.vic.gov.au/devreskit/appdev/standards/general/general-standards-summary.htm
-general coding standards

http://java.dzone.com/articles/10-subtle-best-practices-when
-10 good coding practices for Java

http://www.phptherightway.com/
-great help for coding in PHP

http://www.slideshare.net/theojungeblut/2013-106-clean-code-part-i-design-patterns
-good powerpoint on design patterns and more coding practices

From Jennifer Gross:

http://www.jeremybytes.com/Demos.aspx
There was too much information on this site for me to just choose a few. This site has information on both Clean Code and Design Patterns, including videos, pdfs, presentations, and downloadable code. Jeremy is very clear, thorough and easy to understand. This was probably my most visited site during this semester.

From My-Gyeong Gwak:
http://www.cs.usfca.edu/~parrt/course/601/lectures/refactoring/refactoring.html
(This is a lecture note about code refactoring. There are some JGuru examples to illustrate refactoring.)

From  Jerad Hobgood:
http://www.theguardian.com/info/developer-blog/2011/oct/07/programming-developer-journalist
Sort of off topic a little but can help beginners who have only taken a few programming classes get to know clean code.

From William Holt:
Writing Clean Code in C# - http://www.codeproject.com/Articles/539179/Some-practices-to-write-better-Csharp-NET-code

From Emilee King:
http://repeatgeek.com/technical/a-list-of-coding-standard-websites/
Nifty list of coding standards for different languages, just to help keep things clean and readable

http://www.harding.edu/fmccown/WritingCleanCode.pdf
Tips on writing clean code

http://www.newthinktank.com/videos/refactoring-video-tutorial/
Refactoring video tutorials, I really enjoyed  this. It's easy to follow and actually fun to listen to.

http://www.artima.com/weblogs/viewpost.jsp?thread=331531
The Principles of Good Programming

From Jinbo Lin:
https://www.youtube.com/watch?v=RlfLCWKxHJ0&list=PL693EFD059797C21E

A presentation about clean code from Google Tech. However this guy is so familiar.


From Jason Mallory:
Short post on not letting readability affect maintainability.
http://thatextramile.be/blog/2011/07/clean-code-versus-great-code/

Article about cleaning bad code.
http://www.altdevblogaday.com/2012/08/18/cleaning-bad-code/

From Keith Neer:
http://www.slideshare.net/wakaleo/clean-codingpractices
   This link explains why you should write clean code.

http://www.garshol.priv.no/blog/105.html
   This link summarizes the important clean code practices found in the Clean Code book

http://net.tutsplus.com/tutorials/how-to-write-code-that-embraces-change/
     This link provides some tutorials on how to write cleaner code.

ttp://visualstudiomagazine.com/articles/2013/06/01/roc-rocks.aspx
      This article gives some interesting reasons why you shouldn't comment your code.

http://net.tutsplus.com/tutorials/html-css-techniques/top-15-best-practices-for-writing-super-readable-code/
       List practices for writing clean code

http://www.slideshare.net/theojungeblut/2013-106-clean-code-part-i-design-patterns
       More on Clean Code practices.

From  Xulong Peng:
How to write a clean code without comments
http://www.wikihow.com/Write-Readable-Code-Without-Comments

How to write a readable source code
http://software.ac.uk/resources/guides/writing-readable-source-code

Good article for cleaning bad code.
http://www.altdevblogaday.com/2012/08/18/cleaning-bad-code/

Really good post/comments to avoid bad coding habits for beginner
http://www.reddit.com/r/learnprogramming/comments/1i4ds4/what_are_some_bad_coding_habits_you_would/

From Tyler Roberts:
http://codekata.pragprog.com/2007/01/code_kata_backg.html
Taken from our Clean Code book, refractoring functions

http://www.planetgeek.ch/wp-content/uploads/2013/06/Clean-Code-V2.2.pdf
Clean code cheat sheet

http://blog.goyello.com/2013/05/17/express-names-in-code-bad-vs-clean/
Short clean code lesson

http://www.youtube.com/watch?v=k6VVURkxNkk
Refractoring code (35 minutes long)

From Christian Vargas:
This is a short pdf of some tips to write clean code. its only two pages and is a very short read that wont take up anytime
http://www.harding.edu/fmccown/WritingCleanCode.pdf

Link to a detail report of 12 principles for keeping clean code along with examples
http://coding.smashingmagazine.com/2008/11/12/12-principles-for-keeping-your-code-clean/

Tips for a clean programming code
http://www.yourhowto.net/tips-for-a-clean-programming-code/

link to a blog where "7 reasons why clean code matter" is discussed and debated 
http://blog.pluralsight.com/7-reasons-clean-code-matters

From Wissem Zrelli:
http://pluralsight.com/training/Courses/TableOfContents/writing-clean-code-humans
How to produce a software that is easy to write, read and maintain (Sign in to pluralsight required)

http://www.slideshare.net/rdohms/your-code-sucks-lets-fix-it-cakefest2012?from_search=4
Guidelines from a PHP Developer to write a readable, maintainable, reusable and testable code

http://www.lagerweij.com/2011/05/28/code-cleaning-a-refactoring-example-in-50-easy-steps/
A step-by-step guide to clean and refactor your code. This article incorporates source code snippets to work with and understand the concepts.