2006-12-22

MSIE Autocomplete Annoyance

I had accidentally typed the wrong URL for my test system into MSIE6 one day and whenever I try to visit the same site, MSIE6's autocomplete feature would NOT let me change the URL. The wrong URL I first entered was local:7001/ when I meant localhost:7001/. Now, each time I try to enter localhost:7001/, MSIE6 would replace what I typed with local:7001/.

There's no way to delete that URL in the address (unlike Firefox, Shift-Delete doesn't work for MSIE6's address bar). So I used the Clear History feature in MSIE6 and blew away my history.

Then I found that auto-complete not longer had previously entered folder paths in Windows Explorer nor the name of programs in the Windows Run dialog. This is definitely unexpected and very annoying.

2006-12-04

Weblogic Console Firefox incompatibility

After trying to add users to more than one group in the Weblogic console for half an hour and receiving this cryptic error each time ...

<BEA-240003> <Console encountered the following error weblogic.management.utils.NotFoundException: [Security:090259]Group undefined
...

... it dawned on me that no one else on site had encountered this problem. I switched from Firefox to Internet Explorer and the problem vanished.

31 Jan 2007: Note to myself. This problem occurred with Weblogic 9.1 and Firefox 2.0.

2006-11-23

Windows CMD Redirect Error And Standard Stream To File

To redirect error and standard stream of a program to a file, use the following in Windows cmd shell: prog args > file.log 2>&1.

2006-11-20

Java IDEs Jgrasp Eclipse

I had a play with two Java IDEs recently: Jgrasp and Eclipse. For a developer, Jgrasp was small and worked reasonably well. Since I was trying to fix someone else's code, I wished Jgrasp had more features and shortcut keys for debugging. Eclipse is huge but I like the way it automatically parsed my source code to find errors and warnings.

2006-11-19

New Blogger Interface

I migrated my blog to the new Blogger interface. Since I had a Google account, now I have one less username-password combination to remember. One nice new feature: labels. Now I don't have to put keywords in the title of each blog entry just for categorising blog entries. It's a Google-ish feature and works like labels in Google Mail.

Misc: Saving A Minute A Day

We used to have a slow login start script that would take a minute or more to map remote drives and printers to our workstations. The script was over-complicated and no longer maintained, so I asked our IT person to write us a much a shorter and simpler one. The resulting script now takes one or two seconds to run. For 10 staff, saving that one minute a day is worth up to one man-week a year (1 minute * 10 * 240 working days)!

2006-11-13

Software: Oracle SQL Loader NL_DATE_FORMAT

I had to load some data into our Oracle test database server. The data was created in Excel, exported as CSV files, then read into Oracle using sqlldr.exe (SQL Loader). Pretty straightforward, but sqlldr.exe complained about the date format of some entries and some constraints being broken. It turns out that the date field in the CSV files were "dd/mon/YY" while sqlldr.exe expected "DD-MON-YY" by default. Also, Excel was writing two digit year values, so some start dates were occurring after end dates. For example, if the start and end dates were "1-Jan-2006" and "31-Dec-9999", then they were being written as "1-Jan-06" and "31-Dec-99". Solution was to set the NL_DATE_FORMAT environment variable to YYYY/MM/DD and ensure that the date fields in Excel match them.

I had to be a little careful with setting NL_DATE_FORMAT. In Windows shell, double quotes are treated literally in statements, so use SET NL_DATE_FORMAT=YYYY/MM/DD instead of SET NL_DATE_FORMAT="YYYY/MM/DD" to define the environment variable's value. I guess this will bite you if you come from a Unix environment where the shell treats double-quotes as a string delimiter.

2006-11-03

Misc: Firefox 2.0

Just installed latest Firefox 2.0 on my Windows box. It works as expected. Can't see a technical reason why the release number was bumped to "2.0" when there are just a lot of minor changes and fixes.

Having a close button on the right hand side of each tab is more intuitive. Previously, there was only one close button on the right hand side of the Firefox window for closing the currently active tab. I had no problem with that but I noticed my son didn't realise he could close tabs by pressing that button. Score an extra point for usability.

Update: Firefox 2.0 can spell-check text fields. Now I know what rubbish I've been writing.

Misc: Vim No Backup

I got a new workstation at work and reinstalled Vim. Then vim started creating backup files with the tilde (~) and .bak extensions. Right-O, no problem. I edited my _vimrc file and added set nobackup and set nowritebackup but that didn't work. Puzzled about this problem off-and-on for a couple of weeks. It turns out that I added my settings before source $VIMRUNTIME/vimrc_example.vim and source $VIMRUNTIME/mswin.vim. Duh! My configuration settings were being overrode by the default settings. I moved my configuration settings below those two lines and vim behaved as expected.

2006-11-02

Misc: Disable Windows Autoplay

Windows' Autoplay feature annoys me whenever I put a CD into my CD-ROM drive. Copy Controlled CDs are especially annoying because a dialogue pops up asking me to install a proprietary player. My solution is to disable running software on a CD-ROM by changing this registry value: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\CDRom\Autorun = 0. Extra: As usual, once I start looking, I find out more than I need to know in this site.

2006-10-08

Article: Blender for Windows Users

After struggling for an hour trying to use Blender, a 3D modelling, animation and rendering tool, I wrote a short article describing its GUI to get a better understanding. Maybe it will be useful to other beginners as well.

2006-10-06

Misc: SpamBayes For Outlook 2003

After trying Outlook 2003's spam detector for two weeks on my new notebook, I turned it off because it was still leaving spam in my inbox. Outlook's spam detector would even leave e-mail that had been classified with "{Spam}" in the subject by my corporate e-mail filter! I've installed SpamBayes again and look forward to a clean inbox in the near future.

Software: SVG Submarine Assault

Marek Raida was kind enough to send me the link to his SVG Submarine Assault game. It's pretty cool and comes with sound effects.

Software: Oracle Shutdown

I was trying to shutdown an Oracle server on my Windows test computer. Whenever I try to enter my credentials in the Oracle Enterprise Manager console, I get this message: RemoteOperationException: ERROR: Wrong password for user. Oracle's online help was utterly useless because it just describes exactly what I could see with no explanation or tips. I checked on Google and I found this thread. Message 173817 explains what to do, which is to allow my credentials to be used for running a batch job on Windows.

2006-09-28

Software: Resize Firefox Search Bar

Just moved to a new computer and my Firefox search bar (the text field on the right hand size of the tool bar) is too small by default. On my previous computer, I hacked userChrome.css (as described here) but now I'm too lazy so I got this extension instead. It adds a grab control to the toolbar and I can resize the search bar interactively.

2006-07-18

Misc: Spam-free

After running SpamBayes in addition to our server-based spam filter for one week, my inbox is spam free! It's so-o-o much nicer to start the day and see spam getting clobbered.

2006-07-07

Misc: Spamish Thoughts

While browsing the spam tokens reported by SpamBayes, I realised that spam messages often have the same words, including typos and deliberate mispellings. As described in Paul Graham's A Plan For Spam, it's pretty straightforward to detect spam once you have trained your spam filter. Spammers are victims of their own dubious success; the more spam they send, the more duplicates each person is likely to receive and hence identify automatically as spam. Unfortunately, not everyone knows how to run their own spam filter. Heck, I've been online for years but only just started my own filter.

Julian asked why spammers think anyone would buy mortgages / fake watches / online diplomas / genital enhancements / medicines from a stranger based on a tacky and badly spelt message. Other than the obvious response that enough fools actually respond to spam to keep spammers employed, perhaps enough people accidently click on the spammer's link to earn them advertising dollars!

2006-07-06

Misc: Identifying Spam

You'd be a lucky person if you don't receive spam e-mail. I get about 15 spam e-mail daily, which is a smallish number but annoying. My company's mail server identifies about two-thirds of spam e-mail correctly, leaving me to deal with the remaining third. This is a pain but I can see our IT administrator's point of view; he can't really make his filter more aggressive without mis-identifying valid e-mail as spam. So, I looked around for a personal spam filter and found SpamBayes. It's a Python program wrapped within an Outlook plug-in, and delivered in a Windows installer, so it's pretty easy to install and use. I'm looking forward to seeing some results tomorrow!

2006-07-05

Misc: Redirecting Web Visitors

After moving all my stuff to my new web site, I thought it'd be simple to redirect all the visitors from the old site to the new one. After some false starts, I found that the easiest method is the following:

  1. Create a moved.html file with <META HTTP-EQUIV="refresh" content="5; URL=http://kamhungsoh.com">.
  2. Copy moved.html to index.html.
  3. Create a .htaccess file with this rule: ErrorDocument 404 http://members.optusnet.com.au/khsoh/moved.html.
  4. Delete all files and folders on the old server and upload the new files.
The META directive in the HTML files tell the browser to load a new URL after 5 seconds. The index.html handles the case when a visitor only enters the URL without any file name. If the visitor enters the URL for a file name, then the ErrorDocument rule is activated and the moved.html is displayed.

Misc: Domain Name At Last

After more procrastination, I finally got myself a domain name. Registering a domain, buying a host service, transferring my pages and blog to the new domain was a bit time consuming; luckily I could consult people who have done the same thing for advice.

2006-06-01

Software: SVG Planetoids finished

After some feedback from some friends and tweaking the update code, SVG Planetoids is finished. Some bug causes ASV3 to crash but I can't figure out how to solve it. Maybe later I'll try to create a test case to reproduce the bug.

Edit: Changed name to Planetoids.

2006-05-28

Software: SVG Planetoids beta

A Planetoids game implemented in SVG and Javascript that works OK on Firefox 1.5 and Opera 9 (beta), but eventually crashes on MSIE6 + ASV3. Still investigating.

Edit: Changed to Planetoids.

2006-05-21

Software: SVG Cannons Update

Added some minor features to the SVG Cannons:

  • Player can change gravity value.
  • Basic keyboard shortcuts to elevate the barrel and fire the cannon.
Thanks to Jonathan Chetwynd, Richard Gnyla and Geoff Tham for their feedback!

2006-05-15

Software: SVG Cannons, Updated Sliding Tile Game

Been busily hacking over the last couple of weekends and finished SVG Cannons and updated SVG Sliding Tile puzzle.

Cannons is a simple turn-based game where each player tries to blast the other. Initially, I thought of introducing a basic AI for the second player but the whole project exploded into a mess of inter-related function calls because of the animation routine, so I left introducing an AI until I can figure out a more systematic way to do browser animation.

In the updated Sliding Tile Puzzle, the player can now choose a different sized puzzle (3x3 and 4x4) and there's a new randomize button which generates (in theory) solvable puzzles.

Julian remarked that my site, with all these 80s games, has a retro feel. :)

2006-05-04

Misc: Add SVG to Internet Explorer

If you are interested in seeing SVG implemented in Internet Explorer 7, login to the Microsoft Connect site and vote here. The only annoying thing with Connect is that you have to have a Passport account and you need to provide your name, country of residence and e-mail address (again!) in order to register to vote.

As of 4 May 2006, there are 198 votes, which seems (can't sort the features by votes) by far to be the largest number of votes for any feature.

2006-04-30

Software: SVG Sliding Tile Puzzle

I wanted to create a simple interactive SVG demonstration, so I wrote this sliding tile puzzle (see http://kamhungsoh.com/000e.xhtml).

The initial coding was straightforward and quick. Only when I wanted to make the demonstration work in MSIE6 and ASV3 did I run into trouble. The first problem was that ASV3 did not process events for SVG elements if the SVG code was inline XHTML, so onclick didn't work. The workaround was to put all the SVG code in a separate .svg file and get the user to open that file. The second problem was that MSIE6 (or ASV3) did not accept a function reference as the first argument to the setTimeout() function, unlike Firefox and Opera. That stumped me for about half an hour until I found an example that used a string as the first argument.

1 May 2006: Tested the program on another Windows XP computer using MSIE6 + ASV3, and it works without needing to open another window. It must be some setting on my notebook.

2 May 2006: In a Gamedev.net thread, Enselic points out that the shuffle doesn't usually move the "1" and could be replaced by a randomizer that ensures that the initial configuration is solvable. I found some maths required to determine if a sliding tile puzzle can be solved in Kevin Gong's Analysis of the Sixteen Puzzle.

2006-04-17

Software: SVG Conway's Game of Life

Between driving 2 * 650 km, amusing the kids and visiting my in-laws over the Easter break, I managed to put together an SVG version of John Conway's Game of Life. The interesting bits are:

  • Using SVG lines to create a raster by twiddling the lines' stroke-dasharray attribute.
  • Making the demonstration work for Firefox and Opera 9 was straightfoward, but I had no idea how to make it work for MSIE + ASV because MSIE does not support the DOM function createElementNS().
  • The demonstration ran like a dog until I spent some time optimzing the Javascript code. It's still not blazing fast but I can't think of any more tricks.

I picked up the stroke-dasharray tip from Kevin Lindsey and Martin Honnen showed me how to use ASV's SVGDocument properly. See the Yahoo! svg-developers mailing list for the discussion.

2006-04-02

Software: Javascript SVG Analogue Clocks

After a weekend's break due to real life intrusions, I finished a demonstration of SVG-drawn analogue clocks animated by Javascript. It's the simplest thing I could imagine that could not be easily done using just XHTML + Javascript because it involves rotating the hands of a clock. Along the way, I found some unexpected gotchas involving CSS and SVG (see my programming notes below the clocks).

2006-03-27

Software: Limitation Of Using SVG Plugin

Is this a limitation of displaying content using a MSIE browser plug-in: elements can't be shared between plug-ins? For example, using MSIE + ASV, I can't seem to define elements in one SVG element, then use them in another SVG tag. What I wanted to do was to define some SVG elements, then use a XHTML table to lay them out in a grid:

<svg>
  <defs>
    <g id="myElement"> … </g>
  </defs>
</svg>

<table>
  <tr>
    <td>
      <svg>
        <use href="xlink:#myElement" > … </g>
      </svg>
    </td>
    <td>
      <svg>
        <use href="xlink:#myElement" > … </g>
      </svg>
    </td>
  </tr>
</table>

While Firefox 1.5 can display my SVG elements in a table, MSIE + ASV shows nothing.

2006-03-16

Software: 2xExplorer Remove Search Results

Nikos Bozinis' 2xExplorer (a Windows Explorer replacement) has a neat but not so obvious feature. When you search for all files or folders with a certain pattern, 2xEplorer will display the search results window. Selecting an item in that window will cause the main window to jump to that item in your filesystem. The not-so-obvious feature is that when you delete items in the search results window, those items are deleted in your filesystem! This feature came in handy when I wanted to delete all CVS folders (to set up a new module) or all obj folders (to work around a Visual Studio bug).

2006-03-15

Software: Basic SVG Shapes and Javascript

Once I realised that I can reference SVG objects in Javascript by using object = document.getElementById(), it became a straightforward task to change any attribute of an SVG object using object.setAttribute(). I added a control panel to my Basic SVG page, which I started last weekend, to interactively set the attributes of the SVG objects on that page. Now, I can immediately see the effects of setting different values to fill, fill-opacity, fill-rule, stroke, stroke-linecap, stroke-dasharray, stroke-linejoin, stroke-opacity, stroke-width.

2006-03-13

Software: Basic Inline SVG At Last!

It seemed like such a simple task: put some SVG code into an XHTML document on my hobby web site. I managed to do it but it required jumping through several hoops. The best source of information on inline SVG can be found in this Wiki article. Here's some extra gotchas that I found while developing this simple page. Note that I'm using Firefox 1.5, IE6.0, ASV 3.03 and Windows XP Professional SP2.

Create your XHTML + SVG document

Follow the Wiki article and create an XHTML document (one with DOCTYPE and the required namespaces) and insert your SVG fragment with its own namespace. Save your file with a .xhtml extension.

The .xhtml extension is required otherwise Firefox will load your file in HTML standards compliance mode and you will not see any SVG image at all. On the other hand, if you use the .xhtml extension and try to open that file in IE6.0, IE6.0 will show the XML tree view! In the end, I stuck with the .xhtml extension because there's a web server workaround (see the Wiki article) and made a copy with a .html extension for testing with IE6.0.

Add special tags for IE6.0

The extra <object> tag and <?import?> processing instructions tell IE6.0 to use ASV for the svg namespace elements. The only gotcha is that IE6.0 leaves a blank space for the tag and processing instruction.

Add web server support

Fortunately, my hobby site is running on an Apache server, so it was easy to add the required changes to the .htaccess file.

Finally …

After spending some hours setting things up and working through the gotchas, I finally got a simple draft page on my hobby site. It isn't much to see at the moment, just a yellow disk. Still, it's a start!

2006-03-12

Software: Javascript Text to HTML Update 1

After using the text to HTML convertor for a bit, I found it useful and easy to add the following features:

  • Convert ampersand (&) into an HTML entity.
  • Convert whitespace to &nbsp;.
  • Add <pre> tags at the start and end of the output.

2006-03-06

Nethack: Death by Green Elf Gang

Gunthur the Barbarian was going about his business of pillage and amulet hunting when he goes down some stairs and four Green Elves pounce on him. He tries to escape but the elves stand between him and the stairs (that's where he was placed when he descended the stairs). Even worse, they box him into a corner and proceed to zap him with wands of sleep while chopping him to bits. In three moves, it's RIP Gunthur.

The final tableau looked like this (with Gunthur in the top right corner):

########
.....@@#
....@@@#
..<.....
.......#

As usual, it was going passably well until the unexpected end. Gunthur had cleared out the Gnome Mines and Sokoban levels, and he had Cleaver and Dragonbane. Annoyingly, the Sokoban level had neither an amulet of reflection nor a bag of holding!

Software: Javascript Text to HTML Convertor

When entering bugs in our local bug reporting system, I forget to enter reserved HTML characters such as < (less-than) and > (greater-than) as character codes &lt; and &gt;. When I submit my bugs, our server swallows up these reserved characters and my bug reports look rather silly (mind you, a lot of bugs are silly to start with). A similar problem happens when I write a blog with code fragments containing these characters or if I want my source code to be indented nicely. So, here's a simple Javascript Web page to handle these conversions.

The nice bit of code (IMHO) is using string.slice() in the regular expression to replace tabs with a user-specified number of space characters: sIn.replace(/\t/g, '        '.slice(0,iTabSpace)).

2006-03-02

Software: WinCVS Compare Versions in Graph

In WinCVS, I can select two versions of a file in the Graph view, then find their differences using the Diff menu item. Upon hindsight, it seems obvious but I hadn't thought I could select multiple versions in the Graph view. Should've read the manual!

2006-03-01

Software: SVG Red Circle Test

Can I include SVG pictures in blog entries without mucking around with <embed> tags and separate files? If you have an SVG- and Namespace-aware browser such as Firefox, can you see a red circle below this paragraph?

Probably not. If you check this page's properties (context menu View Page Info) Blogger has sent this file with Content-Type: text/html, so Firefox goes into quirks mode and displays this file as old-fashioned HTML, ignoring the svg elements. I tried changing the template's <meta> element to change the file's Content-Type but no go.

2 March 2006: Wiki describing the horrors of inline SVG coding.

21 August 2015: Yay, nine years later, I can see a red circle after reading Making SVG work with Blogger.

2006-02-28

Math: No Wizards on Weekends?

I noticed that I haven't been starting as a wizard in Nethack for a while. Maybe the DevTeam have special code for weekend players just like they have for the new and full moon? But that's jumping the gun. There are 13 roles in Nethack, so assuming that any role is generated independently at the start of a game, what is the probability that I wouldn't get a wizard after n starts? In other words, what is P(k=0) after n trials?

Using the binomial distribution C(k, n) * p^k * q^(n-k), let p=1/13, q=12/13, k=0
if n=20, p(k=0) = 0.20 and if n=40, p(k=0) = 0.04. So, I should only start to wonder about special code if I don't see any wizards in 40 starts!

2006-02-27

IE6 MHTML Case-Sensitivity and CSS Paths

We wanted to generate and send an MHTML file to a customer. The source HTML page was on our file system and it referenced some image files and CSS files. We could have used a ZIP archive instead, but since IE6 could create .MHT files, we thought we had a simple solution.

After generating the MHTML file, we opened it on another computer and we noticed that the styles were not working. After some hacking, it turns out that there are two problems with the MHTML file generated by IE6:

  1. The <link> tag and Content-Location contain an absolute path to the CSS file. We had to replace those path strings with a relative path string.
  2. Harder to spot but very annoying was that IE6 now treated CSS class names as case sensitive, so class="footer" and class="Footer" are different. IE6 ignores the case of class names when it opens HTML files!

It turns out that Firefox's MAF extension is a better solution. MAF generates relative paths for files (the first problem) and in this sense, generates better MHT files than IE6. I found it a bit ironic since Firefox does not, by default, open MHT files.

2006-02-23

Software: Excel Copy Chart as Picture

We were trying to copy some charts as pictures or images from one Excel workbook to another but Excel would not paste a chart as an image. One workaround was to paste the chart in a drawing tool, then copy and paste that image into the workbook. While this workaround was OK, it was rather cumbersome since there were many charts to copy. With a little bit of searching, I found that this was #9 in the Top 10 Excel Annoyances. To copy a chart as a picture, select the chart, hold down the Shift key, then select Copy Picture in the Edit menu (not available in the context menu).

Another Excel quirk I've just noticed but don't have time to chase down is why I get the Paste Special menu item after copying a chart while my colleague does not.

Nethack: Death by Exploding Wand

Things weren't going so well for Mannix the Monk. He'd finished exploring the Sokoban levels but only found a bag of holding, not an amulet of reflection. The Gnomish Mines had no co-aligned priest and the only temple in the main dungeon wasn't co-aligned either. He scraped together some money to gain some holy protection but that was all he could manage. Then, he killed a nymph with a force bolt spell and broke her looking glass (bad luck!).

Things go from bad to worse; he discovers a level with a barracks with plenty of soldiers. His centaur was too wimpy to take on these soldiers and was just hanging around. Retreating to the stairs, Mannix fries a soldier with a wand of fire. A sergeant rushes into the room and zaps Mannix with a wand of lightning, causing the wands in his pack to explode. Mannix cops the full blast and dies.

This was a pretty hard game. It really sucked not getting an amulet of reflection in the Sokoban level. Not finding a co-aligned temple or even a plain altar made it impossible sacrifice monsters to improve my luck. I didn't find any good gloves, helmets, boots or cloaks from any of the corpses. None of the floating eyes left any corpses, so I couldn't scan monsters in a level.

On the other hand, I suppose I was forced to be a bit more inventive. I tamed many cats, dogs and horses because I needed help fighting monsters, and used the magic whistle to herd them up and down levels. I even managed to charm a centaur and increased my skill at casting enchantment spells just before I walked into the fatal last level. If I'd been thinking straight, I'd have charmed more monsters (for example, I found some stone giants) and brought them with me to the last level, then zapped them with my wand of teleport to drop them among the soldiers.

2006-02-22

Misc: Graduate Engineer or Scientist Portfolios

After interviewing some engineering graduates, I noticed that hardly anyone brought documentation, reports or samples of their work to the interview session. It seems pretty strange to me because the interview is a graduate's big chance to make a strong impression, and giving us interviewers something to read or examine strengthens our rapport with the candidate. I suggest making a kit consisting of your transcripts, certificates, awards, reports or theses, pictures or samples of your software or hardware. Actors and artists always have their portfolios ready for interviews, so why not engineers and scientists?

2006-02-16

Misc: Better Graduate Resumes, Please

I read a resume to get an idea of the person it represents. Obviously, if your resume is vague or skimpy, I'm going to get an incomplete picture. Having recently perused plenty of graduate resumes, here's what I look for:

Completeness
Write a complete timeline of what you've done recently without leaving any huge gaps. What's a huge gap? It depends on how precise you are. If you list your activities by the month, then you should explain any multi-month gaps (other than summer vacations). If you list by the year, you should explain year-sized gaps. For example, "In 2001, I took one year off studies to live in Vietnam."
Clarity
Don't obfuscate and don't be vague. Bad writing leaves a bad impression.
Academic record
Just give me the facts. "Bachelor of Electronic Engineering and Science, Honours 2A, 2006, University of Northern Mars" is fine. Better still, attach a copy of your academic transcript. It's pretty useless writing "Credit / Distinction Average" because I can read the transcripts.
Projects
Your big chance to shine! Describe your project, your involvement, highlights and lowlights. "Rescued project from failure by heroically working two days and night to remove memory bugs" is pretty impressive. "Member of final year project team" or "Reports to Project Manager" is uninformtive and uninspiring.
Work Experience
Describe relevant work experience in detail. Who did you work for, what was their business and what did you do? As before, "Member of …" and "Reports to …" is uninformative.
Interests
What are you like when you're not a wage slave? Please don't slack off and write the usual trite "Reading / Socializing / Watching Movies / Playing Games / Jogging" list. What do you really like doing in your spare time? Run the Harry Potter fan club? Train for marathons by running 10 kms a day?
Referees
Don't care until you survive the face-to-face interview and we really want to hire you.

BIG TIP: Get someone else to analyse and criticise your resume. Yes, it's painful and embarassing. Face up to the fact that hardly anyone can edit their own writing.

It's your resume, not you, that will be compared against 50 others that arrive in my inbox. If your resume doesn't have enough information or is badly written, there's no way I can tell if you're a savant.

Disclaimer: I'm not a career consultant or recruitment specialist, so don't send me any resumes to review. I'm just the dude who tries to review resumes as fairly as possible.

2006-02-08

Software: Regulator Regular Expression Editor

Regulator is a nifty regular expression (RE) editor written for the .Net environment. With this tool, you can create and edit REs, test them against sample input and get tooltips as you edit your REs. I found the user interface a little unintuitive initially (the input and output panes should be swapped) but I got used to it after reading the quick start in the online help. Some other features: describing your REs in English and generating VB.Net and C# source code from your REs.

Misc: Dull, dull, dull job applications

Graduates, take pity on the poor sod (like me) who has to read your applications looking for that handful of interesting candidates to interview. I've just read 50+ applications and resumes (and read another 50+ late last year) and almost without exception, they were dull, dull, dull. Anyone who did something out of the ordinary automatically jumped to the head of my list. Where are the innovative final year projects? Don't you take any difficult units? Just for computer science, I didn't find anyone who studied compilers, computer architecture, mathematical logic, computability or information theory, who implemented a game or a utility, contributed to an open source project, wrote an FAQ or even has a Web site!

Corollary: Don't write rubbish. Interesting doesn't mean you have carte blanche to write whatever rubbish comes to mind. If you claim to be an expert in Babbage difference engines (or more prosaically, C++ or SQL), you'll be certain that we'll find someone to ask you about your expertise.

If you want to be taken seriously, you have to rise above the ordinary graduate who only did the required units.

2006-02-02

Software: XML Schema Global versus Local Elements

After my encounter with namespaces in XML Schema, I was left wondering when a schema designer should or should not make local elements belong to the target namespace (or made global). The best discussion I found was in this thread which was summarised in the Hide Namespaces Versus Expose Namespaces article.

Software: XML Namespaces and Schemas

This error message from Altova's XMLSpy bit me while I was testing an XML Schema:

Unexpected element 'title' in element 'book'.  Expected: title

Here is the sample document:

<?xml version="1.0"?>
<book
  xmlns="bookSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="bookSchema book.xsd"
  >
  <title>Snoopy</title>
  <author>Charles Schulz</author>
</book>

And here is the schema:

<?xml version="1.0" ?>
<xs:schema
  xmlns:xs="http://www.w3.org/2001/XMLSchema" 
  targetNamespace="bookSchema"
>
  <xs:element name="book">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="title" type="xs:string"/>
        <xs:element name="author" type="xs:string"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

Since I wasn't making any headway with XMLSpy's validator, I tried xsv from the University of Edinburgh and I received a more meaningful error message:

element {bookSchema}:title not allowed here (1) in element {bookSchema}:book, expecting [{None}:title]:

It turns out that in the XML Schema, title is not by default in the bookSchema namespace (see Qualified Locals in XML Schema Primer). The solution is to either add elementFormDefault="qualified" into the schema and force all local elements into the namespace or ensure that only the root element is in the namespace (using <bk:book xmlns:bk="bookSchema">) while its descendants are not in any namespace.

2006-01-23

Review: Spiderman 2 (2004)

Poor Peter Parker (Tobey Maguire)! As if being an unappreciated superhero in New York isn't enough, he's too skint to pay his rent, his life long sweetheart MJ (Kirsten Dunst) is betrothed to a national hero, Aunt May's (Rosemary Harris) house is about to be repossessed by the bank and his best friend Norman (James Franco) is consumed with hatred of Spiderman who killed his dad. What's more, there's a new super villain Dr Ock (Alfred Molina) on the loose. Maybe this superhero lark isn't all it's cracked up to be and it's time to grow up. Or maybe being a hero means more than just rounding up baddies, leaping between buildings and wearing a cool costume?

This second installment of Spiderman's adventures is unusually sophisticated for the costume superhero genre. Writer Alvin Sargent assails our hero with numerous mundane and profound problems, and reflects his situation in the subplots. He's also been allowed to move the story along a couple of years and to avoid revisiting ground covered in the first film. A little extra care with the science would have helped avoid some annoying statements (for example, Dr Ock's fusion device generates one thousand megawatts of power without immediately incinerating everyone in the room).

Director Sam Raimi keeps a tight grip on the story and the tone light. He pokes gentle fun at the essential silliness of the genre (the lift scene is hilarious) and doesn't let the special effects overwhelm the most down to earth superhero in the world.

The cast look as if the characters in the comics have come to life, especially the editor of the Daily Bugle, J. Jonah Jameson (J. K. Simmons) with his flat top haircut and overbearing behaviour. The leads, Tobey Maguire and Kirsten Dunst, are starting to look a bit too old as college kids in their first jobs. There's a cameo appearance of Sam Raimi's buddy Bruce Campbell as the snooty theatre door attendant.

A satisfying continuation of Spiderman's story.

Stars: 3 out of 5

Review: Sky Captain and The World of Tomorrow (2004)

In the 1930s, intrepid reporter Polly Perkins (Gwyneth Paltrow) and her former boyfriend Joe "Sky Captain" Sullivan (Jude Law) race around the world to foil the evil plans of Dr Totenkopf. They have to battle Totenkopf's robots and henchmen, and rescue Sky's gadgeteer mate Dex (Giovanni Ribisi) and a bunch of kidnapped scientists. On their mission, they get meet of some of Sullivan's old friends Kaji (Omid Djalili) and Franky (Angelina Jolie).

After a spectacular start with its impressive backlit cinematography and computer generated visuals inspired by "Metropolis", this film runs of out steam after Polly meets Sky Captain (which is pretty darn early) and crawls from action scene to action scene. The rudimentary adventure plot quickly disintegrates from too many holes, omissions and convenient escapes. For example, the journey to Nepal serves absolutely no purpose other than to provide some background on Totenkopf.

Jude Law is an appropriately square-jawed hero, Angelina Jolie provides a surprisingly plummy British accent, but Gwyneth Paltrow lacks the spark to be an enterprising journalist and looks too modern. Michael Gambon as Polly's editor vanishes after stating some obligatory concerns for his reporter's safety. Sir Laurence Olivier makes a short digitized appearance as Dr Totenkopf.

Special effects needing a plot.

Stars: 1 out of 5

2006-01-20

Review: Philosophy Of Science: A Very Short Introduction (2002)

TitlePhilosophy Of Science: A Very Short Introduction
AuthorSamir Okasha
Year2002
ISBN0-19-280283-6
Stars3/5

Reasonable Overview For The Interested

What do philosophers think about science? This book provides a brief history of the philosophy of science, describes some logical assumptions in the practice of science and problems in science, and discusses Thomas Kuhn's scientific revolutions. The book concludes with a discussion on science and society.

Philosophy of science, as described in this book, seems to have become a rather esoteric subject removed the daily practice of scientists and the everyday use of science. Some questions that spring to mind but which are not covered in this book: Does the publication and independent verification of results lead to the self-correcting nature of science? Why is the simplest explanation the best? How can scientists who cannot easily perform experiments, such as astronomers and sociologists, make verifiable theories?

Chapter 6 presents three problems in science: Newton's view of absolute space, the classification (by feature or by genetics) of living creatures and the whether the mind is modular or not. It's not clear to me how the philosophy of science can help in resolving these problems. Newton's view was probably driven by his desire to prove the literal truth of the Bible. In this day and age of automated indexing systems, does it really matter which method is used to classify creatures? Finally, shouldn't scientists collect more data before deciding if the mind is modular or not?

This book covers a number of topics in the field but fortunately doesn't get bogged down in a deep technical discussion on any single topic. It is a reasonable overview of the topic for the interested reader and one of the better books in the "Very Short Introduction" series.

2006-01-06

Review: Birthday Girl (2001)

John Buckingham (Ben Chaplin), a lonely and frustrated bachelor, marries a Russian mail-order bride, Nadia (Nicole Kidman). After an initial period of awkwardness (they don't speak each other's language), they settle down to a life of kinky sex. Their marital bliss is upset by the arrival of Nadia's friends, the genial Yuri (Mathieu Kassovitz) and the menacing Alexei (Vincent Cassell).

The premise makes no sense: Why doesn't Nadia speak English? How do Nadia's friends know John's responsibilities in his job? After the interesting start exploring the theme of trust, the second half of the film becomes conveniently plot driven and predictable. As expected, the stars do a fine job in their constrained roles with French actor Vincent Cassell having the strongest presence as the violent yet tender ex-lover.

Stars: 1 out of 5

Review: The Ipcress File (1965)

When a top government physicist goes missing and his minder is found murdered, the British secret service decides to investigate. Harry Palmer (Michael Caine) is transferred to the team looking for the physicist. During the investigation, he discovers something more sinister called Ipcress.

This low-key thriller has all the elements of the "realistic" spy genre: mysterious shadowy men, treachery, seduction, and a bit of action. Sometimes, it feels like it tries to be too realistic when the agents also have to do boring surveillance tasks, fill in forms and survive departmental politics.

Michael Caine is perfect as the bespectacled gourmet Harry Palmer, playing him with the right amount of cheek, charm and ruthlessness expected of a public service secret agent. A youngish Gordon Jackson co-stars as Palmer's partner, Jock, with that very recognisable Scottish accent.

Very dated but watchable.

Stars: 3 out of 5