Typodermic Fonts

I doubt that I will ever be for want of a font again. I just found an artist who gives away 390+ fonts for free, including commercial usage.

Typodermic is a site created by the artist, Ray Larabie, who has been obsessed with typefaces and fonts since his childhood. There are lots of styles on the site and a large number of them are free.

What can I say, I am a sucker for peng, leng, zheng stuff.

Another great source of stylistic fonts is Dieter Steffmann, though I am not quite clear about their licensing.

IE8 Development on Linux

As an open-source advocate and Linux developer, I sometimes face the problem on creating websites that do not work correctly in IE because it is a borked browser. While IE is fast losing its market share to other browsers, it is still the dominant PC desktop browser and needs to be supported by any web applications that I develop.

To that end, I need to make sure that my code works on IE and these are the two steps that I recommend.

Firstly, use the X-UA-Compatible meta tag to ensure that IE works in a more standards compliant mode. This meta tag can be set either by the web-server or it can be set in the HTML header section itself. It is simple, just stick the following code in the header section of any HTML page:

<meta http-equiv="X-UA-Compatible" content="IE=8">

There are a number of parameters that are possible and these are described in the appropriate knowledge base page. The important thing is to ensure that your site adheres to web standards and to set the compatibility mode to IE8, which is the most standards compliant IE browser at the moment.

The next gem that I recently discovered is the availability of IE8 testing images from Microsoft. Turns out that Microsoft provides VPC images that can be used to run special VMs that can be used to test websites under IE8 rendering. Since I do not use VPC, I had to tweak things a little and run things under VirtualBox instead.

Even then, there are a couple of gotchas to note:

First, it is essential that the network drivers be installed when the VM is first booted. This is to allow the VM to activate itself online. Otherwise, on a second bootup, the VM will not allow the user to login because it is not activated, and will not be able to activate itself because it is not online – an infinite loop.

To do this, once the VirtualBox machine is booted and the Guest Additions disc is inserted, run the following command:

D:\VBoxWindowsAdditions-x86.exe /extract /D=C:\Drivers

Immediately after that, use the Windows Add/Remove Hardware wizard to detect the new network card and specify the drivers manually. They will reside in the earlier subdirectory. Once this is done, bridge the VMs network to your existing Internet network and ensure that the network settings are all working. Launch an instance of IE8 to see if the site works correctly.

Then, after a reboot, the VM will insist on activating itself online. If the network was working correctly earlier, just proceed with the activation. It works after that like any normal Windows except that it will display an “evaluation” notice on the desktop.

This is a good solution to work with IE8 development on Linux.

Sassy Sass

I had a public holiday today and I ended up spending it on hacking some code. I decided to do a WordPress Theme for my company blog instead of lazing around. It was a fun thing to do on a lazy holiday – not very healthy but quite fun. In order to spice things up, I decided to take this opportunity to learn some Syntactically Awesome Style Sheet (SASS).

That is how I do every project – I make sure that there is something new to learn.

According to their website, “Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It’s translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.” Essentially, it is a meta-language that can be transformed into legal CSS using an external tool. On top of all the advantages stated, it can be used to automate the generation of complicated style-sheets.

One other advantage that it can deliver is eliminate the need for multi-file CSS that is currently used for organising CSS. SASS is like a programming language in many ways and can include stuff from other files, perform variable substitution and even evaluate some basic expressions and built-in functions. With all that, it can still generate a single compressed CSS file for the browser, which will reduce the number of loads needed.

Anyway, it was a fun project. I will convert the other subdomains on my company site later.

VirtualBox vs QEMU

Turns out that VirtualBox is extremely easy to use for personal virtualisation. I have been using KVM and XEN based virtualisation solutions on the server. They both work wonderfully for that purpose. However, for local machine virtualisation, they are both a chore to setup.

Turns out that another open source product – VirtualBox, is better suited for local virtualisation. I will ensure that it is made available for all my machines in the future. It even supports non-VT based hosts after KVM decided to drop support for it in their recent versions.

I have been setting up some personal virtual machines for the purpose of testing software. It is always a good idea to start off with a virgin machine when doing testing.

I hope that Oracle does not kill this product!

Stuxnet Worm

This video comprehensively explains how a hypothetical attack could be carried out by an attacker using the Stuxnet worm. This has very serious implications because it means that low-level industrial embedded systems are also now targets for attack. These SCADA systems are used everywhere and lack the necessary resources to defend themselves from attack.

The technique used is a fairly straight-forward one. The attacker can download and modify a programming library and use that to intercept the actual programme being downloaded onto the SCADA system.

This technique has been used for ages, in a non-malicious way. For example, my Xilinx board does not properly support my OS for programming. Thankfully, someone out there has written an open source driver to intercept all the Xilinx calls. Install this driver and the Xilinx ISE will think that it is talking to its own driver while all its calls are actually being intercepted by the wrapper.

Interesting, and cool.

This makes me think that I will probably need to build in some protection to my future cores to at least enable a limited amount of security checking of downloaded code.

Physical Programming #105: Duffy Objects

I ended up giving a short 1-hour lecture at work today, about object-oriented programming. OOP is a confusing enough paradigm as it is without having to indoctrinate my kids with more behind the scenes stuff. However, over the course of actually explaining to them about OOP, I came to realise that the reason why I understand OOP better than them is because I understand physical programming.

So, I thought to myself, it would be useful to include a chapter in my book on OOP – a behind the scenes picture.

Then, while reading stuff on the Internet today, I came across something called Duff’s Device. It is something that I had learned about a while ago but had forgotten. And again, I realise that it is a problem only to people who do not understand physical programming aspects as well. Again, it will make a good example chapter for my book.

Seems like I will have to expand the physical programming aspects to include lots of behind-the-scenes examples of common operations.