Tag Archives: crapfest

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.

7 Links I Know You’ll Enjoy

Continuing with the theme somewhat, here are 7 links I know you’ll enjoy. I’ve put them here for your satisfaction, but really, they’re just here so I can get them out of my webbrowser and make room for more news that I missed out on. I’m under 2000 RSS items (I started at 4000), so progress is being made! Enjoy.

So, in the list we have:

  • Dynomighty Mighty Wallets
    These things rock. I already own a tri-fold dot-matrix wallet which gets questioned frequently in public, and to stand out more, I’m going to get some more. They make great gifts, but really – if the Australian dollar wasn’t so sucky at the moment, I’d buy them inΒ  a heartbeat. They’ll have to wait, however.
  • Glow Grafitti
    I’m no grafitti artist, but glow in the dark spray paint? That’s like any childhood dream! I found this on the internet – thanks Boing Boing Gadgets – a while ago, lost the link, but then found it again, so here it is for posterity. There’s probably nothing cooler than glow in the dark grafitti. Again – a little exxy at $59 a can, and when you convert that into Aussie dollars, well, it hurts.
  • Uma Doodlebook Frame
    A tradition photo frame (read: non-digital) with a twist – you can create your own borders simply by drawing them. It’s got 80 pages, so you can create up to 80 custom borders for any of your pictures. Again, how cool is that? I rekon I’ll just stick one photo in it, and then use it as a scratchpad for notes and stuff.
  • iTunes Music Store – the web version
    Yeah – again, props to df.net for this one – this one’s cool. It’s essentially a webbrowser-based version of the iTunes store. It’s a pretty good rendition of the actual store, but you need to open itunes to buy stuff from it anyway, so yeah. Handy if you don’t have iTunes on your current computer, or need to browse something quickly at the library or whatever.
  • Windows Shutdown Crapfest
    I had no idea Windows developement was this convoluted. It’s actually amazing that they manage to ship products at all, considering that they’re “the left hand cannot see what the right hand is doing” approach with regards to all their code. No wonder Vista was so bad – here’s to Windows 7, the start (hopefully) of a new era in Microsoft computing.

Update – here’s your seventh link, folks.

  • Palm, Google, and Apple

    Unlike Siegler, I think the large number of recent Apple employees now working at Palm on the Pre suggests that the relationship between the two companies is cold β€” ice cold. What I heard last month at Macworld Expo is that Palm has a standing offer for engineers at Apple to jump ship, with a starting salary of 1.5 times their current Apple salary.

When you’re done perusing the links – give us your comments below, yeah?