atc » Quick post http://blog.alexcollins.org Musings of technology, sport, life et al Thu, 10 Jun 2010 10:24:24 +0000 en hourly 1 http://wordpress.org/?v=3.0.5 Weblogic Errors http://blog.alexcollins.org/2010/03/22/weblogic-errors/ http://blog.alexcollins.org/2010/03/22/weblogic-errors/#comments Mon, 22 Mar 2010 17:27:35 +0000 atc http://blog.beplacid.net/?p=141 I’ve been plowing through Maven2 & Weblogic at work recently, in an attempt to get an EJB/MDB & EAR deployed for testing out JMS. I would often hit the following errors when deploying an App in Weblogic 9.2:

  • Unable to access the selected application.
  • Exception in AppMerge flows’ progression

Baffled, I almost gave up – the errors mean nothing.

Thankfully trial and error (and plenty of web searching) I have discovered that the errors are caused by invalid deployment descriptors or invalid WAR/EARs (an empty WAR or EAR will cause these errors immediately). So don’t fret, it’s not the end of the world!

First check your web.xml, application.xml and then ensure the contents of the WAR/EAR are as expected – APP-INF, META-INF only for the latter!

Hope that helps someone, it annoyed me for a while!

]]>
http://blog.alexcollins.org/2010/03/22/weblogic-errors/feed/ 0
Battlefield Bad Company 2 (Xbox 360) first impressions http://blog.alexcollins.org/2010/03/08/battlefield-bad-company-2-xbox-360-first-impressions/ http://blog.alexcollins.org/2010/03/08/battlefield-bad-company-2-xbox-360-first-impressions/#comments Mon, 08 Mar 2010 08:57:55 +0000 atc http://blog.beplacid.net/?p=116 Some initial thoughts halfway through my most anticipated sequel this year…

The story’s poor. What am I doing really? You find this guy, now this guy, oh here’s something different: find this place! Whilst you’re doing that random people will pop up like something out of Time Crisis 2 and try and kill you. Oh and to do all that you go through a million different checkpoints. That’s what MW2 did and it f-cking sucks. It feels really scripted to me and I hate it for that. The ‘level’ interaction seems unfinished. For instance when you run into the castle-esque areas on the desert map (de targo or something?) you affectively initiate a mission or new sub-story sequence that ends in a boss (i.e. a f-cking great big Apache helicopter). Once you’re done, the screen fades to black, you see a random cinematic sequence where Haggard says something odd or funny, and suddenly you’re outside with your vehicle and squad (which, by the way, are popping into view from top to bottom like something out of a tech demo). Christ.

Oh, and that annoying bug with the loading screen: you’re reading the tip text then it fades to black. You think “great, the level’s starting” and suddenly the text’s back and you’re loading again. Huh?

The action is outstanding, second to none. The gadgets, guns and vehicles are much better than before; they feel more realistic and reactive. The destructive environment is also an improvement on the first (which wasn’t bad in the first place!). The textures look amazing and the game looks ever-so realistic. The Brazilian jungle was actually beautiful.

It’s a good, fun game, but the thing that made the first Bad Company instalment so good was its open-ended gameplay and well-polished storytelling, both of which have taken a back seat in #2 to do what seems like its competitor does: all looks and no substance. Grr!

That said, I’ve yet to play multiplayer which is where Bad Company 1 really got going.

]]>
http://blog.alexcollins.org/2010/03/08/battlefield-bad-company-2-xbox-360-first-impressions/feed/ 0
Ant TODO Update http://blog.alexcollins.org/2010/01/02/ant-todo-update/ http://blog.alexcollins.org/2010/01/02/ant-todo-update/#comments Sat, 02 Jan 2010 21:34:38 +0000 atc http://blog.beplacid.net/?p=111 Quick update regarding Ant TODO: there’s now a JAR available for download, so you can get it running even quicker!

]]>
http://blog.alexcollins.org/2010/01/02/ant-todo-update/feed/ 5
Ant Task for TODOs http://blog.alexcollins.org/2009/12/31/apache-ant-task-todo/ http://blog.alexcollins.org/2009/12/31/apache-ant-task-todo/#comments Thu, 31 Dec 2009 15:58:35 +0000 atc http://blog.beplacid.net/?p=108 I often felt the need to scratch an itch when it comes to source code and a little fragment called //TODO. It’s scattered everywhere; I’m sure you’ve seen it. Yet no matter what codebase you’re looking at, there’s never any real exposure to them.

I therefore decided to implement an Ant Task for parsing TODOs in source code. You can read more about it over on the Google Code project. Please feel free to review code, suggest features or try it out and report a bug.

Happy new year to all; many happy returns.

See you in 2010!

]]>
http://blog.alexcollins.org/2009/12/31/apache-ant-task-todo/feed/ 0
Sky Songs and Linux http://blog.alexcollins.org/2009/12/15/sky-songs-and-linux/ http://blog.alexcollins.org/2009/12/15/sky-songs-and-linux/#comments Tue, 15 Dec 2009 22:55:02 +0000 atc http://blog.beplacid.net/?p=104 If you want to use the Sky Songs download client in Linux (say Ubuntu or Debian), just paste the following into a file called skysongs in $HOME/bin and then chmod a+x it:
cd $SKY_SONGS_DIR; /usr/bin/java -cp . -jar downloader.jar $*

Note, $SKY_SONGS_DIR should be changed to your installation directory. If you used wine to install Sky Songs, have a look under /home/YOURUSERNAME/.wine/drive_c/windows/profiles/YOURUSERNAME/Local Settings/Application Data/Sky  Songs/.

Sky Songs works by giving you “SKS” files that describe to its client (“Sky Songs MP3 Downloader“) what and how to download; i.e. your songs. Once you’ve downloaded one (say Renegades.sks; the “Renegades” album by Rage Against the Machine), just execute the skysongs script as follows:
alex@prometheus:~/Music$ skysongs Renegades.sks

Thankfully the Sky Songs download client is written in Java so it’s not only cross-platform but its structure is obvious.

Please note that these instructions are absolutely not intended for circumventing Sky’s download procedure, nor are they to be used to break the Terms of Service you’re most likely bound to by law. This information is purely for educational purposes and to assist those who are new to Linux get to grips with their everyday software in a new environment.

]]>
http://blog.alexcollins.org/2009/12/15/sky-songs-and-linux/feed/ 0
Google Wave Extensions Python API – Annotation Documentation http://blog.alexcollins.org/2009/10/19/google-wave-extensions-python-api-annotation-documentation/ http://blog.alexcollins.org/2009/10/19/google-wave-extensions-python-api-annotation-documentation/#comments Mon, 19 Oct 2009 06:57:53 +0000 atc http://blog.beplacid.net/?p=93 Quick post documenting the much-sought-after structure of the Python API’s Annotation name/value pairing. If you want to annotate a blip’s content, you’ll need to utilise the values below:

  • conv/title
  • lang = en
  • style/fontWeight = bold
  • style/fontStyle = italic
  • style/textDecoration = underline
  • style/textDecoration = line-through
  • style/fontSize = 2em
  • style/color =r gb(229, 51, 51)
  • style/backgroundColor = rgb(51, 127, 229)
  • link/manual = http://example.com/

A Python example of using the above:


msg = "This is a message for you"
doc = wavelet.GetDocument()
doc.SetText(msg)
doc.SetAnnotation(Range(msg[-4:], len(msg) - 1), "style/fontStyle", "italic")

The above should italicise the word “you” in the variable “msg”.

According to Google employee ‘Pamela’, this isn’t set in stone “as we aren’t confident in their stability”. Thanks to Dave of the same Google Group thread for documenting and posting the styling annotation name and value pairs.

Hope that helps someone ;)

]]>
http://blog.alexcollins.org/2009/10/19/google-wave-extensions-python-api-annotation-documentation/feed/ 1
Google Wave Python API and Annotations http://blog.alexcollins.org/2009/10/19/google-wave-python-api-and-annotations/ http://blog.alexcollins.org/2009/10/19/google-wave-python-api-and-annotations/#comments Mon, 19 Oct 2009 01:08:53 +0000 atc http://blog.beplacid.net/?p=90 I spent a considerable amount of time this weekend hacking away at my Google Wave robot, Wave Toolkit. It’s a lot of fun and I’ve managed to write something that allows for quick implementation of ‘commands’ from initial idea to ‘live’.

One of the frustrating things about developing Google Wave extensions is the poor documentation. It starts out great: lovely overview documentation and tutorial, with plenty of insight and step-by-step instructions; and then nothing. It stops there. Apart from reading the API documentation which can be cumbersome, you’re left alone in the dark, weeping like a sad puppy after meeting its new owners.

An example of this is using Annotations within Google Wave; formatting text for bold or italics,  providing nicely worded hyperlinks or embedding images is governed by inserting annotations that ‘explain’ how the text should look. If you try to find out how to use these objects within the Python API you’ll see it’s nearly impossible. I got my answer only from guessing and scouring the Google Group and reading and example in Java, then posting when that didn’t work and finally getting some helpful advice. Please Google, document this protocol more!

So, to save an further frustration, here’s how to use Annotations in the Google Wave python API for robots:
doc = wavelet.CreateBlip().GetDocument()
doc.SetText("THIS IS ANNOTATED TEXT")
doc.SetAnnotation(Range(2, 12), "link/manual", "http://www.google.com")

I hope to hell that helps someone and saves the pain I underwent to work it out! Buggered if I know how to bold text though…Happy hacking!

]]>
http://blog.alexcollins.org/2009/10/19/google-wave-python-api-and-annotations/feed/ 2
Google Wave Extensions – Wave Toolkit http://blog.alexcollins.org/2009/10/17/wave-toolkit-google-wave-extensions/ http://blog.alexcollins.org/2009/10/17/wave-toolkit-google-wave-extensions/#comments Sat, 17 Oct 2009 22:38:36 +0000 atc http://blog.beplacid.net/?p=82 Update: You might find my latest posts on Google Wave helpful.

So I managed to join the select elite bandwagon that is the Google Wave preview, which entitled me to early access to Google’s new masterpiece and 8 invites to bribe friends with (although I only have a few, so the whole eight might not stretch too far…). I have to admit, I’m not sure what the fuss is about. It’s clever, really clever; but there’s not much to it yet. It is, for all intents and purposes, a well-marketed collaboration tool, or put simply: a clever chatroom. Time will tell though. Perhaps its usefulness is yet to be seen.

Being a devout geek, and a sucker for anything Google, I was led to explore the programming possibilities behind Wave. Rather brilliantly Google have created an API that will allow you to do one of two things: create a ‘Robot’ – an automated participant programmed by you – or embed your own ‘gadget’ in a wave (think a Google map, but your content). The API is rich, if its documentation can be a bit light in some respects (where the hell are the CreateBlip() and such methods documented?! All you get in the API docs are ‘Get*’ methods…pointless!).

Introducing Wave Toolkit

Having programmed plenty of bots for IRC and Eternal Lands over the years I had the experience and ideas behind creating an automated character that can be used to aid users, or simply provide a bit of light entertainment. So after plenty of reading and hacking, I managed to come up with Wave Toolkit; a simple Python robot for wave that provides features that are either lacking or a little tool that might aid your chatroom…err I mean collaborative-blue-sky-thinking…yeah.

To get a bot running you do need a Google App Engine account, which allowed me to explore this little world offered by Google. It’s cleverly done and nicely polished. Still think it’s just cleverly managed free-hosting though ;)

The capabilities of robots within the Google Wave extension API are pretty much exactly what a human participant can do: edit, post, delete and edit ‘blips‘, create waves, see who’s participating and apparently manipulate playback. It’s very fun writing something that can do all this too; that wonderful satisfying feeling of achievement when you spam “hello world” to a wave…

Wave Toolkit‘s in constant development so it might be a little ropey, but please feel free to add wave-toolkit@appspot.com as a contact and invite it to a wave, and feel free to suggest new things, report bugs or even tell me you love it. ;)

So back to coding more lovely Python, and perhaps writing something useful for all the wavers out there. Right? ;)

]]>
http://blog.alexcollins.org/2009/10/17/wave-toolkit-google-wave-extensions/feed/ 7
Alt+Tab and Linux Window Managers http://blog.alexcollins.org/2009/09/25/alttab-and-linux-window-managers/ http://blog.alexcollins.org/2009/09/25/alttab-and-linux-window-managers/#comments Fri, 25 Sep 2009 14:33:47 +0000 atc http://blog.beplacid.net/?p=78 Regardless of window manager, why can’t I click on an icon to select the app I want to focus when ALT+TAB’ing? Or am I missing something?

Yes it’s used primarily for keyboard usage to prevent having to use the mouse, but sometimes I’m ALT+TAB’ing while I am web browsing to check on the progress in another application. Clicking would speed things up by, say, 0.0051 ms. Perfect, right?

]]>
http://blog.alexcollins.org/2009/09/25/alttab-and-linux-window-managers/feed/ 0
Learning Scala – first impressions http://blog.alexcollins.org/2009/09/03/learning-scala-first-impressions/ http://blog.alexcollins.org/2009/09/03/learning-scala-first-impressions/#comments Thu, 03 Sep 2009 18:45:08 +0000 atc http://blog.beplacid.net/?p=74 So every year I learn a new language. It’s fun, insightful and leaves me feelin’ a fresh for new challenges in my new found religion.

This time round I’ve been learning Common LISP and now Scala. Being a Java programmer professionally it makes sense to try the latter. I love the idea of it being its own language – for scripting as well as fully-fledged development – that can run inside the JVM (or if you’re evil, the .NET CLR).

First impressions are that it’s exciting to learn. I love its simplicity, and its productivity. One thing I do hate: the syntax of array indexes. I can’t for the life of me think why it’s a good idea. I like the [] syntax because it makes it explicit as to what you’re working with. Doing array(1) looks like a method call, not great. Sure I’ll find out soon enough as to why it’s done that way.

I wrote the following today whilst waiting for my Grilled Mackerel to finish soaking :)

#!/bin/sh
exec scala $0 $@
!#
args.foreach(arg => for (c <- arg) println(c))

]]>
http://blog.alexcollins.org/2009/09/03/learning-scala-first-impressions/feed/ 2