Thursday, August 26, 2010

Too much of a (good?) thing, Be wary of what you ask for, A bird in the hand is just going to shit on you and other BS

So I now have both a 100Mb/s connection to the house (thanks Kev) and a Wifi enabled phone which has granted me the ability to hold all of the world's information in the palm of my hand.

The issue I have is that after checking my email a few times, looking at the latest election results and spamming facebook and twitter for 3 hours straight I have nothing else to do.

Eventually I found my way to a little know upstart website called YouTube. After watching both the video of a cat jumping out of a cardboard box and the video of the cat trying to climb through a box when it is far too fat the quality of content went down hill and down hill fast.

So after a week of the world at my finger tips I have realised that "the world" is best kept at arm's length.

FFS I am a spoilt little shit, why don't I just shut the hell up and watch some porn.

Wednesday, August 4, 2010

A DailyWTF Candidate

This from a build script that isn't far from my reach by a long way from my heart.


<!-- Make lowercase (Dont hate me for this, it is the cleanest way) -->
<propertyregex override="yes" property="dir_name" input="${dir_name}" regexp="(A)" replace="a" global="true"/>
<propertyregex override="yes" property="dir_name" input="${dir_name}" regexp="(B)" replace="b" global="true"/>
<propertyregex override="yes" property="dir_name" input="${dir_name}" regexp="(C)" replace="c" global="true"/>
<propertyregex override="yes" property="dir_name" input="${dir_name}" regexp="(D)" replace="d" global="true"/>
<propertyregex override="yes" property="dir_name" input="${dir_name}" regexp="(E)" replace="e" global="true"/>
<propertyregex override="yes" property="dir_name" input="${dir_name}" regexp="(F)" replace="f" global="true"/>
<propertyregex override="yes" property="dir_name" input="${dir_name}" regexp="(G)" replace="g" global="true"/>
<propertyregex override="yes" property="dir_name" input="${dir_name}" regexp="(H)" replace="h" global="true"/>
<propertyregex override="yes" property="dir_name" input="${dir_name}" regexp="(I)" replace="i" global="true"/>
<propertyregex override="yes" property="dir_name" input="${dir_name}" regexp="(J)" replace="j" global="true"/>
<propertyregex override="yes" property="dir_name" input="${dir_name}" regexp="(K)" replace="k" global="true"/>
<propertyregex override="yes" property="dir_name" input="${dir_name}" regexp="(L)" replace="l" global="true"/>
<propertyregex override="yes" property="dir_name" input="${dir_name}" regexp="(M)" replace="m" global="true"/>
<propertyregex override="yes" property="dir_name" input="${dir_name}" regexp="(N)" replace="n" global="true"/>
<propertyregex override="yes" property="dir_name" input="${dir_name}" regexp="(O)" replace="o" global="true"/>
<propertyregex override="yes" property="dir_name" input="${dir_name}" regexp="(P)" replace="p" global="true"/>
<propertyregex override="yes" property="dir_name" input="${dir_name}" regexp="(Q)" replace="q" global="true"/>
<propertyregex override="yes" property="dir_name" input="${dir_name}" regexp="(R)" replace="r" global="true"/>
<propertyregex override="yes" property="dir_name" input="${dir_name}" regexp="(S)" replace="s" global="true"/>
<propertyregex override="yes" property="dir_name" input="${dir_name}" regexp="(T)" replace="t" global="true"/>
<propertyregex override="yes" property="dir_name" input="${dir_name}" regexp="(U)" replace="u" global="true"/>
<propertyregex override="yes" property="dir_name" input="${dir_name}" regexp="(V)" replace="v" global="true"/>
<propertyregex override="yes" property="dir_name" input="${dir_name}" regexp="(W)" replace="w" global="true"/>
<propertyregex override="yes" property="dir_name" input="${dir_name}" regexp="(X)" replace="x" global="true"/>
<propertyregex override="yes" property="dir_name" input="${dir_name}" regexp="(Y)" replace="y" global="true"/>
<propertyregex override="yes" property="dir_name" input="${dir_name}" regexp="(Z)" replace="z" global="true"/>

Monday, July 12, 2010

Datasets - large, fast but not cheap and absolutely not easy

Todays task: Make the large data set load quickly, render seamlessly and run efficiently.

In the end, there is just only so much you can do.

This excerpt from an email explains the issue that the users were having when "loading the module": (note that it is edited to protect product secrets while context remains)

.... the [largest module source] uses 360MB of RAM to load the [items] (all 465,000 of them at just over 800 bytes each) from the [data source] and render the schematic on the screen. This is on top of the 170MB that the application usually requires.
With the latest changes, 98% of this RAM is either freed and released or reused when a different [module source] is opened but a user still requires 530MB of heap space for this to run .....

Saturday, July 3, 2010

Mark went to Google

We attended the final day of DevFest 2010 at the Sydney office of Google yesterday.

Apart from acting like total tourists (with the photos and the questions and the wandering around) we actually learned some cool new stuff with the V3 Google Maps API.

Here is the result of my code lab http://flickrmap-devfest-2010.appspot.com/

Can't wait for next year !!

Friday, June 18, 2010

Tomcat6 running PHP applicatoins: Can it be done?

Simply, Yes it can be done.

Download PHP-Java Bridge (http://php-java-bridge.sourceforge.net/), install it and your away.

Also, it doesn't work. It takes all day to set up the configuration and still runs pretty buggy.

By "doesn't work" I mean, to run Tomcat6 (because you already have it installed) on you windowsXP laptop to serve up PHP files straight from you eclipse workspace in order to develop and test a pure PHP app which is intended to run in a vanilla PHP production system, "doesn't work".

Why not? Well it sets the PHP session.save_path to the temp directory that Tomcat is intended to use, which is not a bad thing, except that it leaves in the single quotes. So you end up with a session.save_path of (for example) "'C:\WINDOWS\Temp'\sessions" (including the single quotes).

This then doesn't work.

You can spend half a day screwing with it but it will just end in frustration.

My suggestion.
Spend 2 minutes downloading the Apache2.2.x server MSI and then run it.
Spend another 2 minutes downloading the PHP5.x.x MSI and run it (even if you have PHP installed, rerun the installer) and select to configure with Apache2.2.
Spend 21 seconds changing the Apache Document Root to be your workspace path.
Then restart Apache.

Total for the day:
Screwing with Tomcat6 and PHP-Java Bridge - 5 hours.
Creating a fully functional dev enviroment with Apache2.2.x - 2 minutes, 21 seconds.

Saturday, May 15, 2010

Google ads, aren't they great

This made me laugh.

Look at how well the ad block matches my content.
To be fair the content of the ad is a statement of what the advertiser thinks I might want.


I think today, they will be disapointed

64bit Flash on 64bit Linux as easy as falling off a log

Have I mentioned how easy this is ?

Go to the adobe download site: http://labs.adobe.com/downloads/flashplayer10_64bit.html
Download the tar ball from the link at the bottom of the page.
Untar it and copy the contents (one file) into the "plugins" directory of your lib64 folder.

For me (on Fedora) this is "/usr/lib64/mozilla/plugins/"

Wednesday, May 5, 2010

How to do my job : Lesson 1

Step 1) In the morning when you get to work, have a quick glance at the user manual for the legacy system.

Step 2) Spend 2 hours creating a fancy looking wizard in the new system that uses the same database procedures by a more streamlined entry method but produces the same data structure as the legacy system.

Step 3) Spend 2 hours creating a build and deploying it.

Step 4) Spend 2 hours training your co-worker on how the new system should be used.

Step 5) Spend 2 hours releasing it to the client's production system.

Step 6) Wait by the phone for the day while your said co-worker runs an on site training session for the client.

Step 7) Drink coffee.

Wednesday, December 23, 2009

The Browser Wars - Google isn't So Goog

When I notices that Opera had a new beta out I found the urge to yet again run a Browser Race.

After installing the Opera Beta, I fired up the four browsers installed on my machine and let rip on the SunSpider benchmark.

Here are the results:

Opera: 419.81
Chrome: 481.19
IE: 5160.45
Firefox: Didn't actually start up until all the other browsers had finished their tests and then scored a little over 1800.

Not really surprising in a way, I guess it is fair to say some companies are happy to be in an arms race for JS speed and some well, frankly don't give a damn.