Sunday, 30 November 2008

The week in review - 2008-48

I've installed Ubuntu 8.10 on my Dell 1525. I had 8.04 and I could have upgraded but I like having a clean install, and because with Linux its so easy! When I'm done I'll share my backup and re-install scripts via google-code. I've got /home on a separate partition so the installation really just means running the installer from CD, and then re-installing all of my favourite software. This is just one place where Linux is nifty - all the software is in a repository and installing it can be done from the command line so it can be scripted. And you get the latest versions automatically. No 'download and run setup.exe and click through the wizards'.

I'm happy to report that suspend and resume is almost instant - even when disconnected from the network. I haven't installed any extra software yet, so we'll see if it regresses when I have the full compliment of wares (with 8.04 and all of my added software, resuming took ages when disconnected from the network). Unluckily, volume is still only audible above 50%, and I'm not having much luck with the microphone (required for skype).

Unfortunately Memokeys doesn't doesn't paste straight into DOS windows - you have to first push your key sequence to get the text into the clipboard, then right mouse click in the dos window to paste. Sooo close. Works as expected in text editors though (I only really wanted it for dos commands though).

Theres an interesting post about java packaging here. I hear what he is saying and it makes sense, but I think I've always worked in shops that package by type. What do you do?

I'm happy to see Netbeans 6.5 supports PHP and Python. This means in addition to using Netbeans for my Grails/Groovy/Java work I can now use it for Wordpress and Google App Engine applications.

I just noticed you can use WinSCP from the command line. I've never needed to do this before, but next time I'm using windows I can script uploading sites.

One of my favourite pet-peeves with commercial application servers is the restriction of the JVM. If I was using Tomcat or Glassfish I'd be using the very latest version of the JVM. But when running a commerical application server you always come up against the "Thats not a supported configuration" argument - and therefore it is vetoed.

Apt-get is so cool. I've exceeded my bandwidth quota for this month so I'm throttled to a trickle - so apt-get is taking hours to complete downloads. But, I've been suspending and resuming during this process, and apt-get hasn't missed a beat. It just carries on like nothing happened! No broken connections, no re-tries. Suspend and resume is still working like it should (I've got mysql and mythtv-frontend installed now).

I'm using jQuery these days, and I wanted to display a spinner during ajax requests. I found the answer here.

I was using the jquery.ui.Dialog too, and found that when I closed the dialog I couldn't reopen it. The answer was here - you should only initialize it once with .dialog(options), and then use "open" to show it.

When new developers join a team, I always see them get given their predecessors machine, with all of their old files on it. What should be happening here is that IT support should re-image the machine with the Operating System, and then the development team reinstalls the required development tools. Thus the user gets a new machine that is clean and consistent with the others. Ideally, power uses should get the latest machines and this is a good oppourtunity to upgrade power users and pass the older machines on to non power users.

Hopefully installing the development tools is a one-click process (such as unzipping a zip file). I created ToolInstaller as a simple solution to installing preconfigured software, but unfortunately this is another one of my products that no-one uses!

For the first time I came across a requirement to run a java program and detect success or failure. This is easily done from a script if the program in question uses System.exit() correctly (so you can use %ERRORLEVEL% in DOS and $? in Unix to read the exit code). The problem is, the program doesn't use System.exit() properly and even worse, its a commercial closed-source product!

This is how it works:

[sourcecode language="java"]
public class ReturnCode {
public static void main(String[] args) {
System.out.println("Return code test");
System.exit(3);
}
}
[/sourcecode]

Now in your bat file:

java -cp classes ReturnCode
echo %ERRORCODE%


Working with ArcGIS 9.3 is much more fun than 9.2. The javascript and REST APIs make working with the map a lot eaiser. ArcSDE 9.3sp1 has been released : release notes.

I'm using the Geodatabase Designer extension for ArcCatalog to export a database as XML. We can put this in Subversion for version control and import this file to create our feature classes whenever we create a new environment. Unfortunately we need to use ArcCatalog to do the import. It would be good if we could script the import so it could be fully automated. Note, we also manually register as versioned with move edits to base.

With text fields in feature classes if you specify a length greater than 255 you'll end up with column type of NCLOB and a max length of 2147483647. This affected a query which was trying to order by the NCLOB column - apparently this isn't good (ORA-00932: inconsistent datatypes: expected - got NCLOB). Keeping the length less than equal to 255 results in an NVARCHAR2 column which is okay.

Released:

0 comments:

Post a Comment