Tag Archives: java

Jawa Cake

jawa cake

A cake for a huge Star Wars geek’s 40th. Rum and Raisin Chocolate cake, 3×6 inch cakes and 1×5 inch carved. All accents are gumpaste or fondant.

“utini!” is the only legible word said by the Jawa in Star Wars and everybody at the party knew exactly what it was.

Geeks and Nerds Rule 😉

via Jawa Cake on Flickr – Photo Sharing!.

Jawa, folks.

Not Java. 😉

The ‘X Character Finder’ Crapfest

So, Java, huh?

It’s not so bad, actually.

As a first language, Java is okay – especially when it is taught right (inside joke there).

Anyway, hot on the heels (somewhat cold, actually), of the Windows Shutdown Crapfest, comes the X Character Finder crapfest, courtesy of yours truly.

First, a little background to this – at Uni I’m doing a subject called programming and problem solving. It involves Java.

Our first assignment was to calculate some variable. Or something. Anyway – one of the things we had to do was find out if the user’s name had the ‘x’ character in it – in either upper or lower case.

This is what I managed to come up with – I’ve commented the code so you understand what it does. I’ve also used Pastie to embed the code, because this is the one time WordPress has failed me. Right, everything seems to be failing hard on me tonight, so I’ve just linked the Pastie… 🙁

If you don’t really get what’s going on, I wouldn’t worry. Here’s the english explanation: Get a username. Count the letters in that username. Look at the first character – if it’s an X or an x, then we have an x in the username. If it’s not an X or an x, then we look at the next character in the username, and perform the same “Is it an X or and x check” again. We keep doing this until we either find an X, or we’ve run out of characters in the username. If you just want to know why this is the X Character Finder crapfest, well, it’s just because I’m re-inventing the wheel here, man – there’s a heaps easier way to find if a particular word/string has a particular character in it, and that’s via use of methods.

The real code that I submitted looks like this. Thanks again to Pastie. 🙂

See? Much easier.

This was the X Character Finder Crapfest, brought to you by Benny Ling.

Comments below.

LOLCODE – Wikipedia, the free encyclopedia

LOLCODE is an esoteric programming language inspired by the language expressed in examples of the lolcat Internet meme. The language was created in 2007 by Adam Lindsay, researcher at the Computing Department of Lancaster University.

The language is not clearly defined in terms of operator priorities and correct syntax, but several functioning interpreters and compilers already exist.

via LOLCODE – Wikipedia, the free encyclopedia.

“Hello World” in LOLCODE:

HAI
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
KTHXBYE

“HAI” introduces the program.

“CAN HAS <file>” acts as the includes statement.

“VISIBLE <message>” prints a message to the screen.

“KTHXBYE” exits the program.

See? Far, far easier than Java.

Left 4k Dead

About the game:

Left 4k Dead was made by Markus Persson,

for the 2009 Java 4k Competition.

The entire game is less than 4kb.

The game is inspired by Left 4 Dead by Valve Software.

via Left 4k Dead.

It’s actually quite good. Nothing compared to the real Left 4 Dead, but fun nevertheless.

Holidays are AWESOME!

Well, it’s officially the holidays now – and if you’re wondering why I just have to post this, it’s because my holidays are all set!

I’ve got three books to finish off:

  • Dreamweaver CS3 with CSS, AJAX, and PHP
    I’m mainly reading this for the AJAX and PHP parts – while I have a working knowledge of CSS, I couldn’t write my own CSS from scratch. Not without a WYSIWYG editor, anyway.
    PHP is HUGE in the webdesign world. If I want to be serious, or at least semi-serious about Web stuff, I want to learn PHP.
    And Ajax, well, that’s just cool 😀
  • Physics of the Impossible
    This is an awesome book by one of my all-time favourite authors, Michio Kaku, the author that “built a 2.3-million-electron-volt betatron particle accelerator, which consumed 6 kilowatts of power an generated a magnetic field 20,000 times that the earth’s magnetic field.” – all while he was in high school!
    It covers everything from the technology that is impossible today, but does not break physics as we know it (such as force fields, death stars, telepathy and teleportation, antimatter), to technology that sits on the boundary of our technical knowledge today (such as a speed faster than light, time travel, and alternate universes) to things that are just plain impossible – things such as perpetual motion and precognition – things that violate known laws of physics.
    It’s a really good read – if you’re thinking about doing something in Physics, then I highly recommend that you read this book – you’re welcome to read my copy, but only when I’m finished with it 😛
  • Cocoa Programming for Mac OS X
    Regarded as “the Bible” for Cocoa programming on OSX, for OSX, Cocoa programming is a minor hobby of mine. I started it way before we started Java at school, and compared to Java for GUI stuff, it is so much easier!
    For those special few of you that have worked with a Java GUI interface, the way that I’ve been taught it just plain sucks.
    With Xcode’s Interface Builder, I don’t have to write the code for each radio button, write yet more code for where I want it to go, or even what I want to do – all this can be done using a GUI. Easy, no? Objective-C is great.
    This book is a little hard to acquire in Australia, though, so I’d be looking to your closest bookshop to see if they can order it in. Mine certianly did, and I”m so glad for it…

Yep, I’m all set. So I might have to do a little work, but I’m cool with that, I’ve got plenty of time for that kind of stuff… Take, for instance, the Steam Weekend Deal – this week, it’s 50% of all ID games, you know, like Commander Keen, Quake, Doom, etc. I bought the super pack for $35 – you can check it out here if you have Steam and are interested.

So, what are YOUR holiday plans? Shout out in comments.