Palagpat Coding

Fun with JavaScript, game theory, and the occasional outbreak of seriousness

Friday, January 08, 2010

View-Source is Good?

Alex Russell, founder and president of the Dojo Foundation, recently wrote on his blog about the importance of "view source" to the evolution and growth of the World Wide Web:

Web developers get started by taking some code, pasting it into a file, loading it in a browser and switching between editor and browser between even the most minor changes. This is a stark contrast with other types of development, notably those that impose a compilation step on development, in which the process of seeing what what done requires an intermediate action. In other words, immediacy of output helps build an understanding of how the system will behave, and ctrl-r becomes a seductive and productive way for developers to accelerate their learning in the copy-paste-tweak loop. The only required equipment is a text editor and a web browser, tools that are free and work together instantly. That is to say, there’s no waiting between when you save the file to disk and when you can view the results. It’s just a ctrl-r away.

As I read the above quote, it hit me: this is exactly why I love developing in old-school Visual Basic, and why even now VB.NET doesn't feel natural to me. For almost 10 years, my work was primarily done in Visual Basic 5 (and later 6), where the normal process of development runs something like:

  1. Design something in the UI
  2. Write an event handlers for the UI component
  3. Run the app in debug mode and test the new feature
  4. Break program execution and tweak the event handler
  5. Continue program execution and test the revised code
  6. Repeat steps 1-5 as necessary

This is precisely the same reason why I love web development so much: the immediacy of the feedback loop, the ability to see your changes almost as you make them, and to, essentially, evolve the code to achieve your end goals. Tools like Firebug have made this process even easier, allowing me to actually poke and prod UI elements in runtime without having to change and refresh the underlying code. And I absolutely love the ability to see a cool effect coded by someone else, and do the old "right-click, inspect element" to see how they did it.

Interestingly, the parallels between VB and the web don't end there. From time to time you hear developers of languages like Java and C++ pooh-pooh both Visual Basic and Javascript as being somehow "inferior". The simple syntax, lack of a compiler and need for a runtime are somehow seen as negatives, even though the trend from the beginning has always been towards more, not less, abstraction.

Now, do I use VB6 for all of my Windows desktop development? No, I also code in C++, C#, and sometimes even batch scripts. Do I use JavaScript for all of my web development? No, all of my back-end and template code is typically written in Python, PHP, and the like. But for when I need a simple tool to do a simple job, simple code wins every time.

Labels: , ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home