Sunday, 14 December 2014

Neat Code

Code written in javascript, css, html, etc. is all very free-form, which means that taking care to organize code neatly is particularly difficult. As I work on a project, I often find that there are many ways to write a certain part of my code, but that I'm not sure which one is the nicest, most readable way to write the code. Given that the different options are nearly identical in performance, I don't have an easy tie-breaker for the different styles. Shorter code is not always easier to read, but longer code is not always sufficiently succinct. If a single css file is becoming thousands of lines long, it seems like I should refactor some of it, but isn't it uglier to have the code split between css files than have it all be in one easily searchable document? My solution to this has typically been to read others' code and model it off theirs. For this reason, I spend a fair amount of time browsing websites like codepen.io and various web design blogs to catch a glimpse of others' programming paradigms. But who is to say that their code is better? For this reason, I've read various books on general code organization, e.g. Code Complete and The Pragmatic Programmer, two books that I plan on looking back upon over the break.

Sunday, 7 December 2014

Material Design and color selection

I decided to take a break from my internship and instead read up on web design. Google has a pretty exhaustive article on their own design philosophy, dubbed material design. These guidelines are extremely specific (they even specify to have no space in between en-dashes when specifying a range of times). The entire design philosophy centers around imitating tangible objects (mostly paper) in your websites, to have an intuitive and elegant aesthetic. Beyond that, the design rules are pretty typical- attractive colors, strategic placement of elements, and intuitive animations.