Friday 29 June 2012

Ace that Java Interview

So I've recently been through the process of various Java development interviews with a whole host of different companies and I wanted to impart some advice and things I learned along the way. Here are the key points I believe you need to be successful at interviews.

Get the basics nailed!

Oh you're an experienced developer right? You've been working on large scale systems and designing things at a high level of abstraction, so simple questions about the scope of variables in methods are easy right? Well you better be able to nail every one of the simple questions then! Don't underestimate getting the simple things right. You will be asked simple programming questions in interviews regarding syntax, threading, primitives, etc.

The first couple of interviews I went to on my quest for a new job, I'll be the first to admit, I wasn't prepared. I fell into the exact trap I'm discussing here and got caught out. An example was that I got totally caught out by bitwise operation questions (>>>, >>, ^=, etc).

So brush up on your basic syntax skills, if you can't nail the first bit of the interview, you won't get a chance to talk about that complex system you designed. I cannot tell you how many times I had to answer "The difference between an interface and an abstract class"!

Research into EVERYTHING in the job spec

Most job specs are split into "Essential" and "Desirable" qualities which you should have a good knowledge of. Do not make the mistake of thinking "oh I don't know about X but it's only a desirable quality so it won't matter". Make sure you know about all the desirable qualities, even if you don't have any experience with it.

Let me give you an example, lets say I'm applying for a UI designer role and the company are planning on using GWT for a lot of their front end development. Now say I'm a GUI developer but I haven't used GWT before and don't really know what it is.

Scenario 1 - Don't research GWT before interview

Interviewer: "What do you know about GWT? Is it something you have experience in?"
You: "No it's not something I've used really, in my current work we tend to just use X"

Scenario2 - Research GWT for an evening before the interview

Interviewer: "What do you know about GWT? Is it something you have experience in?"
You: "I only have some limited experience from using it in my own projects, but I know that it's essentially a library for writing user interfaces in Java and compiling them into Javascript... etc"

See the difference here? Just by doing a little bit of research before the interview about a previously unknown technology the interviewer now see's that:

  • You are keen to learn new technology, even if it means going over and beyond what is expected of you at work.
  • You have some knowledge in a technology they are using, even if you are exaggerating slightly how much you have used it. 

Study Study Study

It took me approximately two months to find a job and most of that time I spent evenings and weekends studying for roles, completely coding exercises and brushing up on the basics. I cannot emphasise enough how important it is to really going over and beyond to know as much as you can about the technologies in the spec. For Java, there are some great resources online, here are some I found to be really useful:

  • http://java-success.blogspot.co.uk/ - This blog is absolutely amazing! The content is excellent, I would highly recommend any Java developer reading the entire site before any interview.
  • http://www.careercup.com/ - This can be really good for testing yourself on interview questions. They may even have questions for the company you are applying for, which is a big bonus.
  • http://www.techinterviews.com - This site contains lots of lists of typical programming questions, make sure you know them. 

Hope this helps some people out there!

Tuesday 25 October 2011

Goal Flash Website

So I've started work on a new website, which is going to be a site showing football results and fixtures. I've done a bit of the back end work, but more recently I've been playing out with some images and the CSS. Here's a screen print of a prototype results page.

The general idea of the site is that you will be able to "alert" on fixtures, so you can receive either an Email, SMS or notification on your phone to let you know when something happens in a game. There are sites that offer these kind of things already, but none of them make it easy and a lot of the sites are very complex and horrible to look at.

I am also definitely going to use the Play Framework for developing the site. Looks amazingly easy and should create some nice results. More to come....

Friday 26 August 2011

My First Android App

To carry on my 'new technology' learning, I set-up my machine for Android development. To my surprise this again was very easy! I already had Eclipse and the JDK installed, so it was just a case of getting the Android SDK and the Eclipse Plugin.

With both of those installed I was ready to start my first Android project. This was literally just a case of clicking File -> New -> Project -> Android Project. The project starts you off with all the boiler plate you need to get going, with the main part being a core "Activity". Activities are the Java classes which contain the main bulk of your application, each Activity can be thought of as a different page in your app.

So great, I got a very basic project created, but now I want to run it! This is just a case of right clicking the project and going Run As -> Android Application. At which point it fired up the Android SDK Manager and alerted me I need to create a new Android Emulator. This is where I hit my first problem! After creating a new Android 2.2 emulator, it wouldn't start, giving the following error:


invalid command-line parameter: Files\Android\android-sdk\tools/emulator-arm.exe.


I checked and double check my install, at which point I decided to Google the problem and found the following link:

http://stackoverflow.com/questions/6638713/android-emulator-is-not-starting-showing-invalid-command-line-parameter

So great, a nice simple answer, just change your Android SDK path in Eclipse so that the space is encoded and it works! My android emulator was up and running. Then my next problem...When I fire up my app, all I got was a screen saying "Android..."


Weird huh? I didn't think this what my app should do! Turns out it's not weird, this is just the loading screen!! doh!! At which point I feel like an idiot, but turns out I'm not the only person that got stumped by this =)

Anyway after loading, my android app was up and running, nicely showing "Hello Ash" - cool but not very functional. As Louise said "at least it's friendly".

Next step, actual functionality!

Monday 22 August 2011

Riding the Rails

So I got Ruby on Rails installed and went through the first tutorial to get a mini blog application up and running. Seems very nice and it was very easy to get up and running, but might take a little while to get used to since it's very different to Java!

If any very n00b Ruby on Rails developers come across this, starting points you should firstly think about getting your head around are as follows:
  • MVC - Learn what it means, how they components hook together and how it works in Rails. Personally this is one area I need to look into more since I am not used to splitting up code into the MVC model, though I think this is a very good ideal to stick to.
  • REST - Everything around Rails appears to be RESTful. If you don't know what this means, go look it up and understand what it means to be a RESTful application. In very basic terms, REST is the idea of sending HTTP requests to the server (such as GET, POST, DELETE and PUT) to different URLs in order to get responses. 
  • Routes - Web Applications in Rails have a routing file, which tells your applications what certain links map to. Firstly, I think this is incredibly useful! It means that when making any communication between client and server (post request, ajax, hyperlink, etc) you can just reference a route in your routing file. I only understand the very basics of this but I can see this being a very helpful part of Rails. 
The more I've been looking into this, the more I've realised how out of the game I have been when it comes to  web development! So much has changed since the last time I really made any kind of website! One of the hardest tasks I foresee is getting used to the Ruby syntax and also learning how to write HTML5 code, heavy on Javascript. Once I have the knowledge of what libraries are out there and how modern websites work now, then hooking it all in and deploying it in Rails should be very easy.

Anyway - to start with - I need to come up with some ideas and designs for a website. The technology can wait and for the mean time I think I need to do some serious reading!

Thursday 18 August 2011

Ruby on Rails and Ubuntu

So had the bright idea of trying to start a little project working on a website with Tony. After looking at a few web frameworks, it's pretty clear Java is pretty garbage. Ruby on Rails looks really nice, but it's really only meant to be used on the Unix environment. This is going to be interesting since I have pretty much always developed in Windows and all my machines have Windows installed on them.

Anyway, first plan, get Ubuntu. Turns out you can get a Ubuntu installation to run just a Windows service (sounds great!!), though i'm pretty sceptical about the performance...

Next step, get Ruby on Rails. Seems pretty simple to install and get an application server up and running. Should be done in no time!!! (no doubt I'll be blogging tomorrow about how much I detest Ubuntu).

Wednesday 17 August 2011

Java Notification Widget

I found this really cool little Java notification widget written by hexapixel. The link is here:

http://hexapixel.com/2009/06/30/creating-a-notification-popup-widget

It uses the SWT library to popup a notification in the bottom right hand corner of the screen. This is great when developing any kind of application that needs some kind of notification. I can think of loads of use cases, especially when running a Java process as a Windows service. You could basically have your Java process running in the background seamlessly working away, then when something happens, it just shows you a nice notification. I am going to work on my own system which uses a similar notification system, with the plan to make a nice standalone widget for displaying notifications.



The code is really simple, but the effect is really nice! The fading in animation is a pretty much must have when it comes to making dialogs look fluid. Good job to Hexapixel for the excellent blog article and nice code!

Tuesday 16 August 2011

Quitting Warcraft

So just when I started writing blog articles about making gold, progress in warcraft, etc, I decide to quit. This actually hasn't come from anything in particular, the game is just boring now.

The final nail on the head for me was waiting for patch 4.2 to come out, then when it did, all I found myself doing was aimlessly running dailies for pointless gear which just adds a few extra stat points. Making gold isn't even fun any more. My total tally was around 260k, but I still have banks full of materials that I can't even be bothered to sell.

Warcraft was good while it lasted, but I won't be going back it. Diablo 3 on the other hand sounds rather interesting...