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...