Clean all the things!

Image courtesy of Allie Brosh. I highly reccommend buying her book. It will make you laugh and feel like you are not alone, especially if you experience anxiety.

As I am getting into more in-depth HTML5 and CSS- I’m finding that my OCD is kicking into high gear. Cleaning up your HTML and CSS mark-up is important not only for yourself to read later on (you will have the memory of a goldfish when it comes to your own code), but also for others. I am understanding that by being a Web Developer, your code will be read over and over by many people. It will most likely be hacked up and re-written so labelling your .divs properly makes all of the difference. Half-way through my 2nd week .psd web assignment I ended up re-labelling my elements (except my <div class= “bloggie”> how adorable is “bloggie”??) Make sure your labels make sense, serve their purpose, and are not unnessessarily long.

Keep the code clean and DRY (Don’t Repeat Yourself). For example…

A lot of my code looked like this:

Okay, it doesn’t look horrendous, no. But it definitely repeats itself. I kept forgetting to keep the margin and the padding on one simple line using TRBL ( Top, Right, Bottom, Left) and styles that repeat itself such as weight and font-family could go under one section. Also getting rid of pesky bare-lines makes me super happy.

See? Not dramatically different, but not hard either. Simple little clean-ups.

So, I am making it my personal duty to make sure my code is clean clean clean.

Short post- not a lot of writing time on my hands! Time to clean my house now.

xo Alex

P.S. I am using Brogrammer as my theme.