Skip to main content

Posts

IE8 readiness

I know people have done in depth reviews etc..., but here is a quick a low down of what you need to do as a web developer to support IE8. I am going to assume that you have been a standards based web developer for the last couple of years and that you have not been doing too many hacks to support IE7. 1) Add the new metatag in the top of the to force IE8 to render in standards mode. <meta http-equiv="X-UA-Compatible" content="IE=8;FF=3;OtherUA=4" /> Without this tag a little button appears next to the location bar which allows the user to view the site in IE7 compatibility mode. You probably don't want to do this because you want people to view your nice standards compliant website and also the render mode is slightly different from real IE7 in any case. 2) If you were using conditional comments to catch IE and add some extra CSS, you will probably need to update the condition from <!--[if IE]> < link rel="stylesheet" type="tex...

sudo = Stupid Utility, Distinct Overkill

I think XKCD said it best... "Make me a sandwich." "What? Make it yourself." "sudo make me a sandwich" "ok" The UNIX OS was originally designed to run on computers that many people would use and in those situations you don't want every Tom, Dick and Janie installing stuff that could break a shared computer. However, on desktop Linux (which one person normally uses) , sudo is kind of useless. Why not just prompt for the user password without sudo (if root access is needed to install or change modifications)? I guess sudo IS easier than logging out and then logging in again as root, but it's annoying (especially if you give your normal user permission to administer the system). It almost becomes a point of politeness (in which the word please would make much more sense). Instead of sudo apt-get install ruby you could just ask please install ruby . No wonder people think techies speak their own language. You are probably saying please ...

Life with Linux

I have been using Ubuntu Linux at home for the last month (courtesy of those folks over at Wubi ). Overall I think it is great. So much faster than MS Vista and it helps inject life back into old machines. However I have spent a fair amount of time configuring and re-configuring things (partly my own fault, and also partly because of the learning curve involved with any new OS). I even had to do one re-install (more on that later). Mostly though it worked out of the box. So here are a few good ground rules for newbies... 1) Make sure you have more than one Internet enabled computer in the house before you do anything. If for some reason you have a hardware conflict (as I did with the wireless card on my wife's laptop) you will need to look up how to fix it. 2) Most of what you need is available through Synaptic Package Manager or Applications > Add/Remove. If you need a program or driver search there first before the Internet. The only notable exceptions I can think of are Sky...

On gambling and computer languages

Today's entry will be a bit more esoteric than most others, it's basically an broad analogy between gambling a choosing a software language to learn/specialize in. Basically as a programmer you have many choices in your career as to how which languages to learn and what level. The main 2 choices though are whether or not to become a specialist or a generalist. Take a roulette table, it's possible to make sure you will have a better chance of winning by spreading your money around it (being a generalist) but if you win, your win will be offset by your losses. If you put all your money on one square, if you will you will win big but your chances of winning are lower. Now look at specializing vs generalization in programming. Some of the people I know who earn the most money as programmers (at least per hour) tend to specialize in small areas. I know one who only really knows JavaScript (at an architect's level), another who writes add ons for Outlook, and another who spec...

Flash for Programmers Part 2: The Display List

The Display List in ActionScript 3 is comparable to the DOM on a web page. Through the Display List you can add and remove your View components. I am not going to go into too much detail here are there are already many excellent articles about it online ( http://www.adobe.com/devnet/flash/quickstart/display_list_programming_as3/ ) ( http://developer.yahoo.com/flash/articles/display-list.html ). Suffice to say you will be calling addChild() and removeChild() quite frequently. I am going to give you a few practical tips though... Often (if you are doing truly modular MVC, which I will cover later), you will be firing off notes that may tell you to add and/or remove various components from the display list. You may fire a note which will ask to remove a child which doesn't exist though and this will cause your app to throw a nasty error. Just like in real life, I find it handy to name my children i.e. var dialog:Dialog = new Dialog(); dialog.name = "dialog"; this.addChild(...

Programmer's Guide to Flash: Part 1 - The Document Class

While Adobe came out with Flex specifically to create an IDE for programmers to create ActionScript/SWF applications, it is actually possible for programmers to use Flash CS3 (normally seen as a design tool) to create Rich Internet Apps. Most Flash programmers tend to regard Flex programmers in the same way that Web Developers regard .NET programmers. Flex (and .NET) programmers tend to be generalists who don't really know that much about interface programming and are afraid to get into the guts of a system. Flex itself is a 300k beast which may speed up your development, but it will slow down your application. However you are in luck. With Flash CS3 Development, the only really hard part is knowing where to start. Once you are over the initial hurdle, you will find yourself in code most of the time. Step 1: First of all, open Flash CS3 and create a new project (File -> New... -> Flash File (ActionScript 3.0). If you open the Properties Window you will see a box labelled Docu...

Freezing Gems

What is a gem and why would you want to freeze it? In Ruby, there are times when you want to access pieces of functionality that other people of written (3rd party libraries) and you normally have 2 options. You can install a plug in or install a gem. Normally the method you use is determined by which ever is made available by the author. Gems are installed on the host machine and are pretty handy when you want to run things in the command line or else across lots of projects, but their downside is that if you use a gem in a Rails project there is no automatic publishing mechanism when you deploy your site. You will need to log onto the remote host machine and install the gem manually. Plugins are specific to Rails and are similar to gems in that they are also 3rd party libraries. However they are associated with your Rails project as opposed to your machine so they will get posted to the server on a regular deploy. Freezing a gem is the process of transforming a gem into a plug in. Es...