Thursday, May 10, 2012

Digging Into Web Development

An alternative title for this post might be: Digging Out Of Low Level Programming... or something like that.

I've known the basics of "web development" for close to 10 years now. Those basics are essentially HTML, CSS and Javascript. Now anyone who knows a thing or two about "real" web development, especially as it exists today, is probably thinking "you simply CAN'T get more basic than that!". There are two reason why I want to write a bit about this. First, I've spent the last several years in university for computer science, as both an undergrad and graduate student. In school our concentration was primarily theory and design, and much less about the specifics of particular programming languages or libraries. This meant that the major evolution of web development, specifically social media and web apps, appeared to be outside the scope of what I needed to concentrate on. The second reason is closely related to the first, having to do with my graduate and research work the past 2-3 years. I took a significant interest in ray tracing and high performance computing (HPC), and in this domain C/C++ and a few other "intermediate-/low-level programming languages are king. Spending such a long time dealing with low-ish level problems; like floating point rounding error, packaging data for inter-process communication and coordinating hundreds of individual processors; has made it a challenge to step back and get used to the relatively "easier", high-level world of Ruby, Python, HTML5, CSS3, jQuery and so on.

For the last week or two I've finally gotten around to making a personal website for myself (WAY overdue). At first I concentrated entirely on HTML and CSS, completely forgoing Javascript and all the fancy frameworks that seem to be out there. Currently the site is really only 3 pages, but even with such a small size, I had a nagging voice saying "why are you copying all this markup when the only difference between them is the content on the page?". When I began to look for a simple solution I looked at the problem from the perspective of a C programmer; essentially I wanted an "#include" statement, or something similar to pull in markup from different files. OK, I could use PHP or something along those lines to pull it off, but then I remembered the websites a couple of my more web-savvy graduate school colleagues had put together. They had bragged about their use of a cool little static HTML generator called nanoc; then the flood gates opened.

I basically feel like I've been living under a rock with respect to Ruby, scripting languages, and web development in general. In the past I had really gotten into Flash/ActionScript development. Although I hated the idea that it had to be contained within a 3rd party plugin, the vector drawing capabilities and relative ease of putting together complicated games and applications was extremely attractive. Now with the advent of HTML5, just about all the capabilities of Flash are now defined as standard for modern web browsers! It's been astounding to watch some of the things that developers (much more creative than myself) have come up with using the HTML5 features. The best example that sticks out in my mind right now is BrowserQuest by Mozilla. Their open source code is up on github. This is essentially everything I really wanted from Flash, including embedded audio, video, graphics rendering, network communication; all without the necessity of Flash Player.

Alright now I'm just descending into rambling. Going forward I don't want to forget and leave behind all my experience in those compiled, statically typed, lower-level languages; but I need to broaden my range of expertise a bit. I need to realize I don't need to meticulously control every minor aspect of an application, I can probably trust an established and supported framework, like Ruby and its libraries, to do some of the mundane details for me. I'll keep experimenting with nanoc as I flesh out my website and see what strange and interesting things it's really capable of. For those of you that read this far, is it important to really dig into the web based development world or is a skill set in intermediate-level programming still just as valuable?