Forward Moving

by Kieran

Today I accepted a job offer to work in a finance firm as an in-house software developer in VB.NET and SQL.  I’ve never had anything against Microsoft’s .NET technologies (or languages), however, I’ll always stand by the "it’s nothing new" saying.  Java had essentially achieved the same thing beforehand, that being the JRE.  Microsoft’s equivalent was the .NET framework which is a VM in itself unknowingly to end-users.

In terms of language and library features, I did have to use C#.NET when I was working for Symantec for a few small internal tools related to my job.  The libraries were scarily similar to Java’s.  The only thing I haven’t been keen on with Microsoft is their ability to introduce a hoard of language features which I never thought particularly good.  One of my previous rants included partial classes, generic getter/setter method, combining the functionality into one etcetera.  My personal belief is that everything should be very explicit.  Language features such as these are the "slang of English" as so to speak and can cause fuzzy edges diminishing understandability of code.

Whilst I’ve never worked in VB I’m quite looking forward to the opportunities this job is going to bring, and the people I’m going to work with.  I’ve met two of the people I’ll be working with and both of which seem extremely down to earth.  Hopefully my skills will be able to add much more to the company, and I’m especially looking forward to perhaps implementing some newer features as a personal touch to my job.

All of this is quite the culmination as I’m soon due to be married, plus a career, plus my degree, a house, a cat and more.  I’m twenty-two years old going on forty-five as many have told me (although, many have also told me I’m a splitting image of Gok Wan).

In the great wide expanse of software there exists a feature which is common to a large proportion of software products, something which you never notice yet your eyes are a victim of its look, and its feel.  Without this feel an application can feel stodgy, much like an unfinished painting.  You may think this "feature" is an awe-inspiring, turn-of-the-century feature that changed the face of the earth as we know it, but alas, it is merely the button, and more importantly, how it behaves.

Searching the Internet never seemed to help on my quest to find out where on earth the library features exist in order to achieve the desired effect.  The effect I talk of is how your button reacts to a mouse roll-over, click, and the mouse-out event.  Try it in most of your applications, you’ll find the behaviour is the same, if not very similar.  Upon rolling your mouse over that small button the state changes to this bordered, lighter-coloured button indicating that it’s feeling under the spotlight of that tiny little cursor.  The much awaited click again changes the look of the button to make it seem as if it has been trodden on.  And finally, the mouse-out event where its state is returned back to normal.

Java, much like any other language and their relative libraries, don’t just support this kind of behaviour normally.  An intricate web of code must exist to support this kind of behaviour, and so for every button that exists you must add listeners.  I myself created my own data type, extending the functionality of JToggleButton and the likes.  It took quite a while to achieve the desired effect due to the nature of my application, but I eventually got there.  The situation becomes even more difficult when you’re supporting selectable buttons.

In human-computer interaction this kind of look and feel is vital for end-users and how they interact with the application.  The desktop metaphor - making sure users have something familiar they can interact with - is also vital to how usable your system will be.  I heavily advise that this type of feel is applied to all of your applications.  And of course, this doesn’t apply just to Windows-based systems, but Linux and Apple based operating systems also.

This afternoon I was given the chance to show off my final year project in its current state.  There were far more people than I expected, there were more people than I could actually talk to but fortunately a lot of people just crowded around my desk to check out what was going on.  I literally got the project working properly about ten minutes before the event started.

Unfortunately I didn’t get a chance to check out other projects, and the ones that I did see belonged to other departments and so weren’t in my subject area.  Also, I didn’t manage to get any pictures which was a shame, I’m sure there are some floating around somewhere though.

The project itself is a virtual whiteboard capable of sharing vector-based graphics written in Java over a network connection.  In its current state it can share two types of shapes, an ellipse and a rectangle (and rounded rectangle) with a selected colour.  It’s fast, and uses a decent MVC architecture (thanks to Sinbad for the insight into that).

A variety of people approached my desk, some from the industry, others from employment agencies, and some professionals just taking some interest.  I received a couple of cards from companies asking me to give them a call, although it won’t be any use as I live overseas and don’t have the chance of moving in the next year.  Another comment I received from a "professional" was that if I wasn’t using serialization then I wouldn’t have any port/Socket issues blocked by firewalls.  The truth in that statement is beyond me, I didn’t think the Socket cared if serialized data was sent over a network connection, it doesn’t know what the data is, it just knows there’s data being sent/received.

Other people wanted to receive updates on the current status of the project and whether I would take it commercially.  My plan is to actually release it open source and continue work on it in the future as a side project.  It’s a large field and interests me greatly, I wouldn’t mind taking it to the 3D realm either.

I missed the winning prize by two votes and there was no "second place" prize either which was a shame.  I enjoyed the event though and it was good to see how interested people were in projects like this.  As it’s a very visual application it’s very easy to grasp what’s going on.

After university I expect a sourceforge page will be created for this project as it advances further.

Crazy Dog

by Kieran

I watch quite a few videos on the Internet, but this one had me in hysterics, and I don’t usually laugh out loud to videos posted on the Internet, no matter how funny they are.


Death Metal Puppy - Watch more free videos

I spend about ten hours a day coding, primarily in Java.  Ten hours is enough to give me a headache, but ten hours of getting literally nowhere is a migraine.  This stressed me out enough last night to just give up, and today I had to show the working code to a moderator which was obviously not working.

Fortunately for me the person whom isn’t familiar with Java decided to go through the code and ask me exactly what’s being called.  I spent an hour going through the code until eventually I spotted something, and this is what it looked like:

hasChanged();
notifyObservers();
clearChanged();

A cold sweat sat upon my brow upon realising what I had done.  Let’s try that one again:

setChanged();
notifyObservers();
clearChanged();

Three characters.  Three characters!  That’s all it takes to waste twenty-four hours of mind-numbing agony of confusion.  Tomorrow this code has to be working for some show-off event, so at least I found the bug!

As I’ve now decided to go ahead and use Serialization in my application and differentiating the data by giving leading bits indicating what type of data is about to come in I am now using ObjectOutputStream and ObjectInputStream.  This application needs to be working by Wednesday so obviously I’m in a bit of rush to get this to work and today got completely stuck when the application decided to pause.  Of course it’s threaded so the whole thing didn’t just die, but when a window was supposed to pop up, nothing happened.  I traced through the code, shoved test cases here and there and still couldn’t figure it out.

The moment that ObjectOutputStream and ObjectInputStream were being created, it got stuck, for no reason.  Type Exception wasn’t caught, and nothing else was thrown.  I sat and waited thinking that something is just going slow but d’ya know what? Nothing happened.

Eventually I hopped on IRC (a great resource for situations like this) and found that ObjectOutputStream needs to be constructed first as it sends setup data.  So, if you’re using Serialization over Sockets and your application decides to stop processing when constructing these types, remember to instantiate ObjectOutputStream before ObjectInputStream.

*grumbles* ;)

I recently found an article over at Coding Horror describing some shareware which was not being entirely ethical with its approach to achieving a certain task.  Sure enough I own a GMail account and use it for all of my e-mails, and personally I have been thinking about switching to offline mail for general security reasons.  In order to do this you would have to use an application to migrate your e-mails out from the mailbox and then import them into your client-side application.

Typically we trust software that we get from the Internet.  Someone put a lot of time and effort into making it, and it does what it says on the tin, right?  Wrong.  I myself have my hand in the software development jar and personally know many software developers.  Most of them are ethical in what they do but not all software is made secure (I’m sure if you do a search for Microsoft you’ll find many complaints in many blogs).

Should we trust software?  After that little post I’m not so certain.