The State of Web Development

I came across this article from NetTuts+ about the Tools of the Trade: Web Development Frameworks that the Pros use. A fairly exhaustive list! I’m starting to see why a lot of people are just overwhelmed with getting into web development; what do you learn first? There’s so much stuff out there. Add the list of the top 10 most usable content management systems and you are looking at a lot of options.

After seeing all this I thought, right back to basics, how about I blog about what I’ve chosen to use:

  • Server Side Frameworks: Ruby on Rails. If you’re getting into web development without any real baggage then this is the way to go. All the good frameworks are MVC based, so I think this comes down to programming language preference: PHP, Ruby, ASP.NET, Python, Groovy, Java.
  • JavaScript Frameworks: jQuery. Sticking with jQuery because it seems to be the most widely used and the one with the most tutorials and documentation.
  • CSS Frameworks: undecided. Need to investigate this more. Leaning towards 960 gs.
  • JavaScript Animation Frameworks: huh? Might worry about that when I need it…
  • Content Management Systems: Wordpress. Again due to its widespread use, as well as its large selection of themes and plugins. A runner up here is Joomla for similar reasons. Yes these are both PHP based, but that really doesn’t seem to matter much at the end of the day.

Also noticed this article about choosing a web development framework which might be handy if you’re undecided.

Testing websites with Internet Explorer

Testing web sites with different versions of Internet Explorer has always been a  bit painful. Sure you can use different machines, or virtual machines, but that all takes time. However, there’s a tool to take care of testing IE versions 5.5,6,7 and 8: IETester. Its free for private/commercial use, however for commercial use you should buy a license.

On a related note:

  • Check out this article by Lins about why we should stop developing for IE6
  • Check out this article by NetTuts+ about 9 common IE bugs and how to fix them

Solve the problem at hand

Recently, I’ve had a bit of a paradigm shift in the way I think about software development. Essentially, that shift is to only focus on solving the problem at hand and not to write additional code just in case it might be needed. Credit for this comes from the excellent RailsTips article, Just in Time, Not Just in Case. Now many developers are going to find this concept hard to accept. After all, you should be writing code that addresses any problems that may arise in the future. That is how you write robust code right? … right???

Well I had the same problem accepting this at first. I had already accepted that my code sucks, and that I could be a better programmer by not programming. However, the concept of solving the problem at hand takes this one step further by making you catch yourself before you go writing code just in case it might be needed.

You end up asking yourself: “Wait a minute, am I over-engineering this?

The main reason for not writing code just in case is that it rots. Code that isn’t used still requires maintenance, it still has bugs in it, and it still needs to be tested. The key is to accept that every line of code you write will potentially add more bugs. Reducing bugs means writing less code. Writing less code involves finding the simplest thing that could possibly work. Remember as a software developer, you are you’re own worst enemy. I believe that’s what makes this concept so hard to accept, particularly if you already think you’re a rockstar programmer.

Another problem, is that the simplest solution isn’t elegant enough for some people. For example, the simplest solution might be to just to skip the first line when looping through a file because it stores headings and not data. But then the questions start; what if the data changes and the first line isn’t a heading any more? What if we have headings across two lines? What if the data is encrypted in an alien cipher … and so on. Right now, the headings are on the first line, and the code passes the test of reading the data with the headings where they are. Problem solved, move on now.

A good way to ensure you solve just the problem at hand is to take a test first strategy. Sure you can write unit tests and execute them in xUnit if all that is available to you. But really, this simply means:

  • Write the test first;
  • Write enough code to make it fail second;
  • Write enough code to make it pass third;
  • Move on.

Note that writing the test may simply mean writing the test out in English (or your preferred language). Automated unit tests are still a luxury.

Copying very large files across a LAN network

I needed to copy a very large file (~25GB), a virtual machine disk across a network (LAN). Standard Windows copy isn’t great for this, and it kept on getting stuck. I also tried using the copy/xcopy commands but they weren’t much help. The problem was a matter of feedback and recovery. That is, having the ability to see how much longer it was take and to pause/resume in case of a failure.

Finally I settled on TeraCopy, a GUI file copy tool which has a portable version. All up it took about 4 hours to copy across a wireless network. Best thing is you can pause/resume if there are any network drops and you get instant feedback about the copy process. The remaining time is also a little bit more reliable than Microsoft time!

Local Web Development Servers

There are a number of great web development servers available that you can install on your PC to get straight into web development or trying out various web applications without the hassle of installing and configuring your own server.

These include:

  • XAMPP – Apache-MySQL-PHP and Perl server (its portable too)
  • WAMP Server -  Apache-MySQL-PHP for Windows
  • InstantRails – An instant Ruby on Rails Development Server
  • The Uniform Server – Windows-Apache-MySQL-PHP, there’s also a Tomcat Plugin
  • Server2Go – Windows-Apache-MySQL-PHP-Perl and also supports SQLite

Web Development Screencasts

I like learning web development skills by watching screencasts. They allow you ton see what’s being changed as its happening and you can pause and rewind as much as you need to.

Here’s a list of some really good screencasts sites and some specific screencasts that may be of interest:

Sites

ASP.net

CSS

General Web Development

JavaScript

PHP

Ruby on Rails

Wordpress

I’ll try to keep this post updated as I find more good screencasts.

Shut down Button on Login Screen

To enable the shut down button on the login screen in Windows Server (classic login), use these steps:

  1. Run Group Policy editor – Start > Run > gpedit.msc
  2. Navigate to Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options
  3. Find the entry Shutdown: Allow system to be shut down without having to log on
  4. Set to enabled if disabled

Firefox Keyword Bookmarks

If you like having a number of bookmarks available to you, then how about using keyword bookmarks in Firefox?

Here’s how it looks:

With the use of favicons, its enough in most cases just to use just one letter, e.g. w for wikipedia. This gives you heaps more real estate to fit in your favourite bookmarks. Of course if you have conflicting bookmarks with the same first letter, add a second letter, e.g. fb = facebook, fl = flickr.

What’s more, you can specify keywords that correspond to each bookmark name, e.g. the letter w for wikipedia or the letters lh for the lifehacker site.You simply type the letter(s) in the address bar and you are automatically taken to your bookmark. You also don’t need to remember the shortcut letter(s) – just look at your bookmarks toolbar, find the favicon and pick out the right one. Too easy!

Here’s how to add keywords in Firefox (note the convention, name = keyword):

Deleting Stubborn “Stuff” in Microsoft Word

Love it or hate, if you work with computers you generally need to use Microsoft Word. One common problem is that it can be very hard to delete “stubborn” stuff from Microsoft Word, for example a table. If you can’t manage to delete something using the traditional way through menus, try highlighting the offending object (e.g all the cells in the table) and then pressing SHIFT + DELETE.

VMware shared folders can access mapped drives

Turns out that VMware shared folders in VMware workstation can access network shares (e.g. UNC paths) and network drives mapped on your host (main) computer. This can be really handy if you want to access a network share but can’t work out/be bothered setting it up in the VM (e.g for installing software). Simply add the folder and point to the appropriate network share.

It’s nice when something useful that should work, actually does work…

Powered by WordPress with modified GimpStyle Theme originally designed by Horacio Bella.
Entries and comments feeds. Valid XHTML and CSS.