Latest Publications

Holiday Rant

Christmas is really not that exciting in our household. Parents are both working on Christmas Eve and Day. I asked my bro “What day is it tomorrow?” and he replies with “Um, Friday…” (instead of Christmas). In the morning I asked him “Do you want to open up your presents?” in which his response was “Maybe later”. No excitement.

But no I’m not going to rant about Christmas, about how “fake” it is or how it’s not really about the birth of Jesus Christ or instead of how it should be about the birth of this man. I’m going to rant about something else. So tell me…if you have been friends with someone for 8 years, would you bother to see them one last time before they fly off to another country for 6 months? Or would you call them up when it’s past midnight telling them you can’t make it WITHOUT giving a reason and say something like “Maybe I’ll see you tomorrow” simply due to the mere coincidence that you both decided to go shopping (not together btw).

I had something really interesting happen to me the other day.

This guy who I met in first year uni decided to talk to me. I don’t remember how we met or even his face till I saw his display pic. Only thing I do remember was that I gave him a copy of Office 2007. I think a lot of us techies use it as a way to get to know someone, they require something computer related and you offer it to them, it’s like sex…but not. So anyway, this guy who hasn’t bothered talking to me in the 3 years decided to contact me all of a sudden, gave me the usual formalities, how you doing, what are your plans etc etc and then was pretty honest about his intentions, saying he wanted Windows 7. He suggested to me to give it to him on a weekend, in the city (as if I’m the one asking for a favour). I told him Weekday in the city and for him to discuss the place/time later. One week goes by and nothing. He finally contacts me again asking about Windows 7…and this is a guy who will be doing honors next year (god help Australia’s medical industry). He also had the nerve to ask me to write him instructions on what to do. I simply said “Insert disk…follow onscreen instructions” (FYI, Microsoft really did make it that easy…). He offered to pay me if I upgraded his laptop for him, I contemplated the idea but thought that a) I wouldn’t get a good deal 2) No way am I accepting any responsibility and 3) I’d prefer not to see you again.

I ended up giving him the disk, we talked for a minute, again…the usual formalities and I bailed straight away. It was also one of those awkward goodbyes where you say goodbye and end up walking in the same direction. I simply walked a bit faster, didn’t take notice and entered the sexy Macquarie building (oh god is it a nice building, the NCSS kids will be visiting on the 7th so maybe I can show them around!).

There are some people you keep around because they are of use and people you keep around because you enjoy their company. Wish more people would start a conversation without some kind of hidden agenda.

Also I would like to talk about my internship at Macquarie. I’m loving it.

They threw me in the deep end, wasn’t expecting to do any real projects but they gave me two high priority projects to conduct over the 12 weeks. The first one is a Java based webapp. It uses spring, hibernate, jboss, sybase db and of course java, merged together in get a memory hungry webapp! I’ve actually just completely finished it two days ago so it was quite exciting. I learnt so much along the way (a lot more than the shitty 13 weeks of major project that I had to pay to do).

People I work with are extremely lax. My buddy is a gamer who plays LoL and got another guy that reads reddit!

When people ask me how I find Macquarie I find it extremely difficult to answer. I usually reply with “oh it’s really good” and I feel like people don’t believe me and are thinking “Pfft, as if working for a major money sucking corporate company will be any fun”. But in fact I don’t think I’ve enjoyed work so much before. I actually look forward to starting work rather than constantly thinking about how long till home time.

My next project is a lot bigger than the one that I just did. I’ll be porting the existing app to unix (from windows  which shouldn’t be tooo difficult I hope), also have to port the framework from Webware to CherryPy AND make sure the odbc libraries are compatible with the various DBMSes under unix. It’ll also be nice to strip out apache from the list of dependencies and solely rely on cherrypy to do the file handling. It also needs to access various files on a windows shared drive so that’ll be another challenge (hopefully to be solved easily via samba).

If you understood the previous paragraph…you’re probably in the minority, don’t need to congratulate you since I’m not talking about tesla data mining mainframe access initiators>.>

Anywho, I’m gonna head off to bed now…need to wake up for the boxing day sale at EB :P Thinking of getting Dragon Age, Tekken and possibly a bunch of pre-owned games.

Best place on the internet

I’m always quite cynical about people on the internet. Filled with trolls, spammers, scammers etc

But underneath all that lives a community that I believe makes our world a better place to live in…

…and that is www.reddit.com

Okay, a lot of you might be thinking “pfft, just another community that posts useless crap on the internet to gain “lulz” where the majority of people are males under 40 living in their mother’s basement”. I’m sure that statement has some sort of merit but it doesn’t mean they’re all bad people.

Reddit inspires user driven projects. E.g. www.imgur.com was designed for digg/reddit (digg didn’t appreciate it but it took reddit by storm). The guy who made is losing HEAPS of money each month, but he does it anyway, and with the support of reddit I think he might actually be making a profit now.

A more recent development (not that imgur.com isn’t recent) is reddit secret santa. A user thought that getting reddit to do secret santa would be a pretty good idea and managed to generate enough support!

Today I received a package in the mail.

Share photos on twitter with Twitpic

I honestly did not expect to get anything from Secret Santa, but what do you know, some guy in the states spent $50 bucks to get these marvelous things delivered to me.

People even ask for personal advice on reddit. I mean sure, getting feedback from untrained professionals is probably a bad idea especially when the topic is…say suicide, but I’m sure most people feel better after reading some of the feedback.

Here is one very good (or bad) example.

For those who don’t visit reddit, give it a go, subscribe to their rss feed. Most of the time it’ll make you seriously LOL but other times it might actually touch you.

Start of corporate life

I started working at Macquarie yesterday. Went through an induction where there were team activities, presentations and of course free food. Today, I got told what I would be doing.

It seems easy enough, but like everything, it’s all easy when you first hear it.

I have 3 tasks.

First task is to upgrade an existing permission system. Currently users are allocated various permissions given their role. However, if their role were to change, admins would have to manually remove and add permissions. This worked when user base was small, but in order for it to scale a new system would have to be implemented. I would have to create a profiling system, where each user would have 1 profile rather than several different permissions. The profile will then contain the permissions. This way you just have to change the profile rather than changing a dozen or so permissions. Seems easy huh?

Well, I guess the problem I have at the moment is understanding the system. It is quite monstrous (by my standards anyway, probably small compared to some of the other applications). The code is actually quite easy to navigate, it doesn’t contain any javadoc but is intrinsic enough to understand. Hopefully I can work out how the permission system work by this week. It uses hibernate which is an ORM for java, which is extremely funky. Basically turns DB table rows into objects which you can manipulate directly upon.

Two other tasks that I have to do is replace the webware python framework with another framework (possibly cherrypy) and also migrate the system to unix (as opposed to windows).

I stayed back till 6:45pm today, and it’s only been my second day. It was by choice though, nobody forced me to. I’m also sick so I feel like crap.

Tutorial: Boot Ubuntu 9.10 Partition using Virtualbox inside Windows

So Ubuntu 9.10 got released several weeks ago and people have been asking about how to get my old tutorial working for 9.10.

The problem is that Ubuntu 9.10 uses the new grub 2 boot loader which changes LOTS of things. In this tutorial I will be showing you how to get Ubuntu 9.10 (or any other linux OS with grub2) working under your Windows installation.

Before we begin, you should have a dual boot setup. I will NOT be showing you how to setup a dual boot, if you need help plenty of other guides out there.

Step 1: Creating a grub 2 boot iso

The grub iso file will allow you to specify which partition to boot into.

  1. Boot into Ubuntu
  2. (OPTIONAL) Configure your /boot/grub/grub.cfg This is so that you don’t accidentally boot into your Windows partition from inside Windows! Bad things will happen if you do!!!
    $ gksudo gedit /boot/grub/grub.cfg
    Comment out your Windows Menu, should be towards the bottom
  3. Create the bootable iso
    $ grub-mkrescue –overlay=/boot/grub GRUB2CD.iso
  4. (DO THIS STEP ONLY IF YOU PERFORMED STEP 2)
    $ gksudo gedit /boot/grub/grub.cfg
    Uncomment out your Windows Menu, so you still can boot into windows after the reboot!
  5. Move the iso into a location that is accessible by windows

Step 2: Creating the .vmdk file

This creates a file which tells Virtualbox what partition to actually load as the harddrive. Unfortunately, unlike VMWare Workstation, Virtualbox does not support a GUI interface for selecting RAW hard disks as the “virtual hard drive”.

  1. Boot into Windows
  2. cd into the directory you installed virtualbox
  3. Find out which drive contains Ubuntu (if you don’t know already)
    Run the command: VBoxManage.exe internalcommands listpartitions -rawdisk \\.\PhysicalDrive1
    (where 1 is the number of the hard drive ubuntu is installed on. E.g. Master should be 0, you’re second hard-drive should be 1 etc…The output should be something like:Number  Type   StartCHS       EndCHS      Size (MiB)  Start (Sect)
    1       0×07  0   /32 /33  1023/254/63        902023         2048
    5       0×83  1023/254/63  1023/254/63         49677   1847346543
    6       0×82  1023/254/63  1023/254/63          2164   1949086188

    In this example, my Ubuntu partition is number 5 and the swap is number 6. So my Ubuntu partition lies in PhysicalDrive1

  4. We now create the VMDK file with the given information
    Run the command: VBoxManage.exe internalcommands createrawvmdk -filename C:\ubuntu.vmdk -rawdisk \\.\PhysicalDrive1 -register

Step 3: Setup Virtualbox

Now everything should be ready to setup Virtualbox. Create a new virtual machine. Select the .vmdk file we just created as the hard drive and mount the grub.iso file we created at Step 1.

Step 4: Running the VM

Due to the way grub 2 works, whenever you put into it you now have to load the appropriate grub config file.

grub2

Just type the above into terminal and grub should load and boot into your Ubuntu 9.10 installation.

If this has helped you in any way, please take the time to drop a comment (or a donation)! If you have any problems, just post a comment or send me an email through the “Contact me” page.

ISSUES:

  1. For some reasons Grub does not recognise the partition if you specify the EXACT partition entry of Ubuntu. You have to specify the entire drive for it to be recognised.
  2. It doesn’t seem to like nvidia drivers in this release so you might have to reset your x.org for it to work inside a VM. Just have to live with the lack of acceleration!

References:

Boot an existing XP (Physical HD) install with VirtualBox

Linux Bash Commands for GRUB2

Transitioning to SSD

So my dear friends chipped in and got me an Intel x25-m gen2 80gb ssd for my 21st, it’s intel’s attempt to provide a mainstream ssd product that contains the same performance as it’s more expensive counterparts.

It arrived around 2-3 weeks ago, however, it took me several days to get it installed. Mainly because, it didn’t come with any brackets so impossible to fit inside my computer, unless I result to using cable ties or even let it hang lose in the drive bay.

I went to 6 different shops, 3 local and 3 in the city. Finally, I was able to purchase a bracket at Capitol Computers. However, it came with 2 brackets and I only need one. If anybody needs a 2.5″ bracket to fit inside a 3.5″ bay, let me know.

However, that worked out all nicely but I have an Antec Sonata II case, but it has rubber vibration dampeners on the 3.5″ brackets. Meaning that the screws are too short to reach. But taking out the dampeners would mean too big of a hole so the screws fall right through. Had to dig up some washers in my house and finally managed to get it installed safe and sound.

Here is the SSD fitting on the palm of my hand.

IMG_0385

And here it is sitting comfortably inside it’s two brackets.

IMG_0386

I also decided to compile a video of the boot time when using my 7200rpm hdd compared to the ssd.

This is NOT scientific at all. Mainly because the hdd uses a different bootloader (grub), I had to hit enter during the boot process so grub doesn’t lapse through the 10 seconds and it was NOT a clean install. But even considering all those factors, the reduction in boot time is significant.

Sorry for the crappy quality video but I couldn’t be bothered re-rendering the files to be any better.

I’ve had the ssd for couple of weeks now and realised that my pc now boots faster than the Windows 7 boot animation. So I decided to disable it and then run the same test. Here are the results.

It shaves around 1-2 seconds off the boot time. I realise it’s not very significant but just another micro-optimisation :P

Here are the specifications of my machine:

CPU: Intel Core 2 Duo E6400 2.13ghz
RAM: 4gb
GPU: Nvidia 7600GT

computer rating

The SSD brought my hdd rating from the bottom to the top, but it seems now my bottleneck is the CPU. Firefox doesn’t seem to load any faster. Chrome loads instantaneous, likewise for IE.

Day 2: Forbidden Palace (29/09/09)

Was a bit slack over the pass few weeks, hence did not put this up as promptly as I should have. Enjoy it nevertheless.

We had breakfast at the hotel, they offered both Western and Eastern breakfast menus. I opted for the more traditional breakfast.

Dou Jiang You Tiao

They had pretty much everything you expect in a breakfast and then some. They also had actual chefs to cook for you, if you wanted a Chinese pancake or maybe even a noodle dish.

After breakfast, we decided to catch a taxi to the Forbidden Palace. For a city of 18 million, you’d think taxis are common but most of the taxis were occupied. As soon as you see a taxi drop someone off, all of a sudden you have groups of people rushing towards it trying to hitch a ride. After 10 minutes of waiting and aimless flagging, we caught a break when a taxi dropped someone off 10 meters from us.

So like the Forbidden Palace is one of those places where people tell you it’s big…but you don’t realise how big it actually is when you step into it. Man, it’s bloody big. Everything is big and grandeur. We also hired a freelance tour guide, they seem to just stand around the ticket office asking if people needed a guide. It’s nice that you don’t have to find one, they just come to you, but it’s also rather annoying when everybody you meet is either trying to sell you something or offer you a service (there’s more on that later).

So began our journey throughout the palace. Most of what the tour guide said I didn’t actually understand but I did understand several stories. One being how all the concubines slept in this one “house” and every night the emperor would come and select 3 concubines to bed with. Ridiculous.

I also noticed that several freeloaders have jumped onto our ship. Towards the end we had around 6 random strangers following us listening to our tour guide.

Unfortunately, wordpress doesn’t allow you to insert more than one picture into a post when you click “insert media” so I’m just going to put up the entire gallery. If you want to read up on each picture just hover your mouse over the pic and read the alt text. Enjoy!

Edit: Turns out the alt text is the description, the file name is the alt text and the description is…well..nothing! BUG!

Firefox Extensions for teh Pros

So with every installation of Windows/Ubuntu, I find myself reinstalling Firefox and then reinstalling all the extensions and then configuring the extensions to match my needs.

Unfortunately, Mozilla only has this crappy service that syncs your bookmarks (which 100 other extensions do already) and does not offer extension or settings sync.

I’m just gonna list a run-down of all the extensions that I use to improve my productivity.

  • Adblock Plus – Blocks ads!
  • Better Gmail 2 – It just runs several greasemonkey scripts to make your gmail experience that much better. It emulates “Folders” and allow dynamic Favicon displays.
  • Download Statusbar – One of the most annoying things about firefox is that when you download something it opens it up in another window. Why?! This extension displays everything in a neat statusbar.
  • Echofon (Formerly Twitterfox) – If you use twitter then this is an extremely light and simple twitter client. Most clients that I’ve used are generally extremely verbose. This displays a tiny icon in your statusbar and alerts you when there’s a new tweet.
  • Faviconize Tab – I find that at any given time I always have two tabs open, Gmail and Google Reader. What this extension does is that it makes the tab size of selected tabs to be the size of the favicon. This way you reduce clutter and allow more tabs to fit on the one screen!
  • Fire Gestures – Brings mouse gestures to Firefox!
  • Hide Menubar – One of the simplest extensions I have installed! It allows you to hide the menubar. To use the menu you just press ALT. You just saved x-pixels of screen real estate!
  • Net Usage Item – This basically checks your Net usage, it pretty much supports every ISP in Australia. However, the UI isn’t that great. But since I’ve hidden the menubar I just dock it in the corner of the menubar. Press alt when I want to see it. It beats having to install a separate Usage Checking client.
  • Skip Screen – If you follow me on twitter/facebook/msn, then you’ve probably seen this. But this is an amazing extension. It basically skips the waiting time when trying to download files from Rapidshare and what not.
  • Speed Dial – Whenever I show people this extension they’re like “Oh so it’s just a copy cat of Chrome!”. No you ignorant fools! It’s copying speed dial made by Opera! Unlike Chrome though which shows you the sites you’ve visited the most, it only allows you to select the sites that you want to visit.
  • Tab-mix plus – To put it simply it’s like your tab-bar on steroids and then injected with Rhino hormones. The main reason that I use it is that it supports multiple-row tabs and also allow you to customise the size of each tab.

My FirefoxSo this is the result! It only demonstrates couple of the extensions but the changes are quite significant. If any of the extensions interest you give it a try! If you know of any other funky extensions, drop a comment!

HowTo: Slimming down your Windows 7

When I was on Windows XP I had this crazy obsession with making XP as slim as possible. I made custom XP installs slipstreamed with the most recent updates, disabled all the unnecessary services and only used apps that had small memory footprints.

I believe I got it down to around 18 processes on start up. Then I moved to Ubuntu and all these obsessions went away. I mean, Ubuntu would just keep chugging no matter how much crap I chucked at it.

Now I’m on Windows 7 and whilst those crazy obsessions have NOT returned, it does interest me as to what I can disable to get the most out of my system.

So here is a list of all the services I decided to disable. Just type services.msc in the start menu and hit enter. Double click the service, select stop and then “disable” from the drop down.

Disclaimer: I’m not responsible for ANYTHING yada yada yada.

  1. Diagnostic Policy Service
    This is basically that thing that goes “Windows have detected a problem, would you like to check for solutions?” TBH, the advice from that thing is actually quite useful. But I don’t really need it.
  2. Distributed Link Tracking Client
    Keeps tracks of all the “linkages”. E.g. You create a shortcut to document A. You move document A to another location. Windows will automatically update all shortcuts to point to that new location so you don’t get “File Not Found” errors. Not very useful if you ask me, unless you’re a shortcut junkie.
  3. Function Discovery Provider Host
    Used for Home Groups. Not useful if you don’t care about sharing files or have other methods of doing so.
  4. Function Discovery Resource Publication
    See 3.
  5. IP Helper
    It’s meant to help transition to IPv6 but I don’t know of any ISPs that even support IPv6 so until they do this service can go bye bye.
  6. Offline Files
    Disgusting.
  7. Peer Name Resolution Protocol
    When was the last time anyone used Remote Assistance?
  8. Peer Networking Grouping
    See 7.
  9. Peer Networking Identity Manager
    See 7.
  10. Problem Reports and Solutions Control Panel Support
    This can be disabled in the control panel. I don’t care too much for error reports.
  11. Windows Connect Now – Config Registrar
    Unless you have a “Compatible with Windows 7″ sticker on your router, this is useless.
  12. Windows Media Player Network Sharing Service
    Interesting service, but I won’t ever be sharing music over the network.

I recommend you keep a list of all your changes and revert back if there are any problems.

That’s it for now. I have several other blogs lined up but just haven’t been bothered posting them. The lack of comments saddens me.

Day 1: Travelling to Beijing (28/09/09)

Suitcases packed.

Wallet emptied out of any useless cards (man do I have a lot of useless cards).

iPhone ready.

Let’s roll out!

I was considering leaving my iphone at home but then where would my only source of internet be? I was hoping to use some free interwebs at the airport or at the hotel but you’ll find out soon enough how that goes.

Got on our first flight, QF128, to HK. Flying business. It’s amazing how little staff travel costs. The cost of my flight (including airport tax) is probably less than a flight to Brisbane. Honestly, flying business is the way to go for long distance travel. I don’t think I’ll ever be able to handle economy seats on any flight longer than 5 hours. Tiny seats, no leg room, constant worry about touching people and annoying people behind me by tilting the seat, terrible food…the list goes on.

The flight to HK went smoothly, I naturally went straight for the inflight entertainment (which I later found out runs on Windows CE), ended up watching Terminator Salvation, 1/4 of the Proposal (it was so slow and boring), Star Trek (2nd time watching it and the awesomeness is still there) and Duplicity. I sat next to my brother, who surprisingly wasn’t as annoying as before. That kid’s been to more places than I have…quite depressing.

We landed at HK at around 6:30pm HK time, got our luggage, checked out and went for the next flight. Surprise fucking surprise, we “missed” the flight, not enough time to check in, travel to domestic terminal and then walk to the boarding gate. Plan A has failed. But not to worry, Plan B is still in tact, we purchased “open-tickets” so that means we can fly whatever flight that cooperates with Qantas as long as there are seats. Walked over to the check-in of our second flight and they told us it’s actually a combined service with another airline so they cannot accept our tickets.

GG.

Plan C?

That’s the only downside to buying extremely MW airline tickets, you’re put on standby and not guaranteed and seats.

At this time my bro was tripping out. First time that I’ve really seen him scared. He was asking dumb questions like “What if we become homeless?”.

Sad James

Sad James

Thankfully (sorta…but not really), there was this tourism salesperson standing around and heard our “plea”. Walked over and offered us tickets, HK$2000 per ticket. I’m like thinking GTFO but my parents were actually considering.

After haggling here and there we managed to get the price down to HK$1650 a ticket. It probably is cheaper to buy these tickets than staying at a hotel next to the airport, it’s around $400AUD for the night for a single room. After buying our tickets, we ran for the boarding gate. Except we realised that the boarding gate is at a another terminal and you reach that terminal by train. I looked at the watch…it was 8:00pm, the flight leaves at 8:03pm and the train is in 1 minute. I bolted like a crazy asian for the rice truck as soon as I got off the train in an attempt to hold the door so the rest of my family can get on (I had the image of Home Alone 2 in my head where they’re all running for the door and get in just as it was about to close). After running to the gate there was a sea of people lining up to board the flight, apparently it’s been delayed.

When we finally got on the plane the first thing I noticed (apart from the fact that I was sitting 3rd row from the back, the small seats and the lack of legroom) was the aroma of urine. I sat down on my seat and my seatbelt was wet. FML.

The food was also bloody terrible.

Aeroplane Food

Exhibit A.

Here’s also the difference in legroom.

Economy

Economy

Business

Business.

We finally arrived at our hotel at around midnight. We stayed at Crowne Plaza, the first 5 star hotel that I’ve stayed at. Everything is all very nice and clean, and they also have a door man! The guy just stands there and presses the up/down button for the elevator.

Here are some pics of the room.

Room Wardrobe and Bar TV

That’s about it for the day. Forbidden palace coming up!

Slurpty Slurp

I came across this youtube clip either on Digg or Reddit, most likely Reddit.

It was pretty mesmerising to watch. Generally I don’t comment on youtube clips but this time something perturbed me. Towards the end of the clip the guy says “Now as for slurping, well, it will just be plain rude not to”. Nothing wrong with that statement until I saw this in one of the comments.

“slurping is rude, i am Chinese.”

Excuse me?

I replied with:

“I don’t know what part of China you’re from but we definitely don’t consider it to be rude”

in which I got replied with (by an American):

“I don’t know where you’re from, but slurping is considered rude everywhere, especially China”

Especially China?!

I just had some ignorant American, trying to educate me on my own culture, yes I admit, I actually don’t know a lot in terms of our thousands of years old history but I know how to eat!

Yes I know it’s late and I really shouldn’t be up trying to prove somebody wrong on the internet, but I thought this would be pretty interesting for people of non-asian descent.

Slurping is rude in Western Cultures, sure, we all know that but it’s different in Asian cultures.

I was raised on the idea that you can’t enjoy a good noodles meal without slurping. Confused?  So is this gaijin.They should seriously scientifically test it out. Do our taste buds react more positively when we slurp as opposed to biting into it without slurping?

For the record, we (Chinese people) actually invented the first noodles so we have the right to say it’s NOT rude to slurp! Ha!

Other common food etiquette involves double dipping with chopsticks (in family dinners anyway) and spitting food out.