Tuesday, November 21, 2006

NoMachine - The Coolest Thing Since VMware

I finally got around to giving NoMachine a go, and it works great! At the weekend I got around to getting the machine that I was planning on using with NoMachine (and eventually, Xrdp) up and running (I can't remember if I've had that machine sitting around for 1 year, or for 2). I can sit at work and (thanks to some ssh tunnelling) "forget" that the machine I'm actually using is back at the flat. It gives the same sense of "coolness" that VMware gives.

One of the things I've found really useful is session suspend - so that I could connect to the NoMachine server from inside the flat, then suspend the session, go to work and then resume the session, picking up right where I left off.

One thing to note, when using ssh to tunnel the ssh connection that NoMachine will be using (ie, ssh into machine A with a -Llocalport:B:remoteport, so that I can ssh into machine B via machine A) be sure to set "enable SSL encryption of all traffic", otherwise it will try to use ports that aren't being tunnelled and will fall over.

Another thing to note, the "new" machine is running Xubuntu, as it's not a particularly high spec machine (256Mb of RAM and Dual 600MHz P3s), so I use "dbus-launch --exit-with-session xfce4-session" as the custom command to run.

Tuesday, September 05, 2006

EntityManager Injecting Again

I better write this down, as I'll be needing it again when the app I'm writing gets deployed - from this page, the way to get the EntityManager injected again is to add the following

<context-param>
<param-name>com.sun.faces.injectionProvider</param-name>
<param-value>com.sun.faces.vendor.GlassFishInjectionProvider</param-value>
</context-param>

to the APP_SERVER_HOME/domains/domain1/config.default-web.xml (I put it down at the bottom, just before </webapp>)

Tuesday, August 29, 2006

Model Driven Development

IBM's System Journal is running an issue on Model Driven Development. There's something that bugs me a bit in the introduction -

Amazing feats can now be accomplished with sophisticated modeling tools. For example, the latest Dassault Aviation commercial jet, the Falcon 7X®, was designed, simulated, and had its entire bill of materials generated by a CAD/CAM system. It was the first airplane ever designed that flew without any physical models ever being built and discarded. Millions of dollars and significant amounts of time were thus saved. In addition, the completeness of the model makes testing the comfort and safety characteristics of the airplane very simple and quick.

In light of this, the question should be why not model complex software applications



When will people realize that developing software isn't anything at all like building a jet, or a building or any other analogy often used when people are promoting their "improvements" to the software development process? If you must come up with a real world analogy for software development, one good analogy would, oddly enough, be model building.

That's what bugs me about this introduction to MDD - pretty much all software development is in essence the development of a model. So it's hard for me to see how you could make a model of a complex software application that isn't the application itself, unlike with jets and buildings, where the model is far removed from the final product. While MDD operates at fairly high level, from what I've seen of it, you'd be hard pressed to find a MDD tool that doesn't output some form of runnable code. This means you're not really building a model of your complex application separate from your complex application, you're building your complex application. Don't get me wrong - I think there's the potential to get a lot out of using MDD tools - what gets me is the inappropriate analogies to various forms of engineering.

Monday, June 12, 2006

Groovy

I had my first use of Groovy, the Java Scripting Language (no, not JavaScript :-) ). It's basically a version of the Java language that sucks less. It feels like a mixture of Java and Ruby.

The language itself is fine - they ripped the verbosity out of Java, and it can access Java libraries - which is both a benefit and a curse as while it offers access to a large library, a lot of the Java API (like the Java language) is a bit verbose at times. Still, groovy has some syntactic sugar that lets you avoid using the Java API at times (especially with JDBC stuff, which is why I was using Groovy today).

If you know Java and Ruby/Python, you'll be right at home with Groovy.

Thursday, August 04, 2005

Connection Pooling with Tomcat

I finally got pooled connections to both MS SQL and Sybase. For something that you would think would be straight forward, it's not. Some of what I encountered:

ResourceParams


ResourceParams don't work. All the documentation I found about connection pooling says that you should define your pool as such:

<Resource name=".....">
<ResourceParams name="***same as above***">
various <parameter> tags here
</ResourceParams>

This doesn't seem to work. Instead, you dump all the parameters for the resource into the resource element. OK, I haven't been using Tomcat for long, but splitting the resource's parameters away from the resource they parameterize seems a bit odd anyway, so I'm not that bothered by this. If I get some free time I should try a connection to MySQL with ResourceParams and see if that works, as what seems like 75% of the example out there use MySQL (the rest is mostly Oracle) and they all use ResouceParams.

server.xml


As several apps on the same web server are going to use the Sybase connection, I wanted to use the main server.xml to hold it. I used the admin app (which of itself was another joy to get up and running, as the doc's say you need to install it separately, but don't bother to point out where you get it) to insert the resource into server.xml. However, even though the resource was placed into server.xml, it didn't work - I had to place the resource in the conf/catalina/localhost/XXXXX.xml file (replace XXXXX with the name of the app) and it did work. But as I actually do want that resource to be server wide, I'm going to have to play around with getting it to work.

"application name".xml


That XXXXX.xml file I mentioned above has a habit of getting overwritten. It gets rewritten when you redeploy the war file (which is not that surprising), but it also seems to get blanked out at other times (perhaps when the server is restarted). I'm hoping there's some way to get it to stay with the content I want. I suspect the contents of context.xml get placed in their, but I'm not sure - I had been playing with putting the resources in context.xml earlier in the day, but that didn't work - however that was when I was still trying to use ResourceParams, so I will try it again with just Resource elements.

Documentation?


What's really getting me is how undocumented it all seems. Even the book I have on Tomcat 5 (Professional Apache Tomcat 5) doesn't go into any great depth on the subject - in fact it seems to be little more than what's already in the Apache Docs.

Friday, February 11, 2005

Upflickr 0.1 released

I've released version 0.1 of upflickr, a command line uploading tool for flickr. It can be found here.

It's a bit rough when it comes to installing, as in it's just the source code (but as it's a python script it's runnable straight from source). And there's some other stuff I want it to get it to do, but it is at least in some form of state to show the world.

Thursday, November 25, 2004

Quik Finally Running

I finnaly figured out why Quik wasn't working on my powermac 4400 - the IDE drive was set to master, changing it to single worked.

When I first installed the hard drive I noticed MacOS couldn't see it at all- I had put it down to limitations in Apple's Drive Setup (as it's not an Apple drive) seeing as Linux would see it and install. Even though I could get Linux installed on it Quik never worked, so I had to boot off an external SCSI drive with BOOTX.

I started playing around with Quik and OpenFirmware and I noticed that OF couldn't see the drive either (it never appeared in OF's dev / ls command). Googleing around found indications that MacOS (at least when running on a 4400) is a bit odd about how it handles IDE, so I decided to pop the case off and have a play with drive's jumpers. Setting it to single worked - it popped up in OF and after booting one more time via BOOTX so I could run a dpkg-reconfigure quik it started working.

Monday, November 15, 2004

Circular Knoppix

In order to get Knoppix running on an old machine that won't boot from a CD, you need to use boot floppies. In order to make boot floppies with the current version of Knoppix you need to boot into Knoppix and run the makefloppies script.

The terms Chicken and Egg come to mind.

Why is distutils seperate from python on debian

distutils is part of the core of python, but the debian people have decided to make life harder for their users and have split it off from the main python package and into python-dev. Why? Besides being part of the core, distutils is used by non developers to install python software. It should not be in a seperate package.

Friday, July 16, 2004

Ebay and the WRT54G

OK, I think I'm pretty much sold on the Linksys WRT54G, so I've been looking around at prices. Of course, I've checked ebay, but the prices there are almost as much (and sometimes even more) than what I'd be paying at ebuyer or amazon.

More thoughts on WRT54G

Thinking about, the WRT54G wouldn't fully eliminate the need for the firewall box, for the moment at least. Untill I get upgraded to the new Ethernet based Homechoice, I'm still stuck with the somewhat odd USB based serial PPP setup, so I would still need something sitting in between the WRT54G and the homechoice box. What I would want to do is make that setup appear as similar as possible to the Ethernet HC setup, so when I do get the upgrade it would be a matter of plugging the router from the bridge pc and straight into the new HC box (though I suppose I might need to power cycle the router).

Fortunatly, my friend Graham already has the ethernet hc, so I might have to go around and have a look at it.

Thursday, July 15, 2004

Lucent WaveLan Silver card

Today I won on ebay a Lucent WaveLan 802.11b Silver PCMCIA card to use with the new Newton. Hopefully it'll get here soon, however I still haven't decided on how I'm going to setup the wireless lan in the flat - I'm not sure whether to get a standalone AP or to try and get the firewall/router pc I'm intending to setup to act as an AP. A standalone AP would be the probably be the easiest solution but setting up the firewall to be the AP would take up less space (which is at a premium). I suppose it will mostly depend on whichever is the cheaper option - a standalone AP or a PCI card that can be used as AP (which appears to be any card with an Intersil Prism 2 chipset). Oh, and then there's the little matter of should I go for an 802.11b only network or an 802.11b/g one. While b/g would be more futureproof it's more expensive and as I'm mainly setting this up for the newton I won't be using the g option for some time.

Wednesday, July 07, 2004

A New Newton

I've got myself a new Newton - this one's an MP2000! I'm looking forward to trying to figure out how to get it to work with WiFi (I know I need Hiroshi's driver and WaveLan based WiFi - ebay here I come)

Friday, June 25, 2004

Mozila crashes and tabs

Galeon has a very usefull feature - when it's started after a 'non-normal' shutdown, it offers the ability to recover the tabs that were open. A very nice, usefull feature. How come Mozilla 1.6 doesn't do this? Mozilla flaked out on me just now, and I lost a lot of tabs.

Monday, May 10, 2004

Motorola V100

I picked up an old Motorola V100 off eBay last week. It was Motorola's 'text messaging phone' - ie it's got a qwerty keyboard and no built in microphone/speaker. It's a bit of a shame they didn't continue development of this type of phone - with Bluetooth, Java, a few PDA functions and a larger screen it could have been a rival to a Blackberry. However, it's been fun to use it for text messaging and instant messaging on MSN, though I don't think I'll ever use it as a voice phone as I can't be bothered carrying around the handsfree kit (Bluetooth would have been so useful here). One thing though, I can't seem to get it to do the : character.