Andrew's Stuff

Java Is Bizarre

Posted at Sat, 10 Dec 2005, 00:59:03

Started actually learning Java today. It's not majorly hard, though I am still getting confused with the 'default' code that the IDE gives us when we start new classes. That said I managed to complete the work for the next three weeks in under an hour - half of our two-hour tutorial - so I just spent the rest of the lesson playing around to see what else I could make it do. I determined that for loops work in the same way I'd expect them to (I'd say the same as PHP, but it's not quite the same since PHP is typless so PHP's for ($i=0; $i<10; $i++) becomes (int i=0; i<10; i++) in Java), switch statements worked just as I expected, too, though unfortunately they only accept integers (C-style) while PHP quite happily accepts strings for switch statements. I then started playing around with creating an interface (i.e. a GUI). I didn't really achieve much there, though, and was just able to create a 'frame' with a progress bar. I could happily change the value of that progress bar, but I couldn't get it to loop with a slight delay to give it a nice "Hello World"-for-progress-bars effect (instead I ended up creating an infinite loop that crashed the IDE). In retrospect I should have given the frame a text box and a button as well to allow the user (me) to enter a number between 1 and 100, press the button and then had the progress bar set itself to that length. Maybe I'll do that tomorrow or next week :p

Other lessons were boring... Completed this week's and next week's work for Computer Systems & Internet Technology in today's tutorial so it'll be back to entertaining myself next week, and Professional & Business Skills was dull, as predicted. I really have no intention of talking about CVs and Transferrable Personal Skills.

I'm running out of food again, having failed to really buy much at crappy Somerfield last week. If my flat mates still don't need any I'll have to get the bus to Tesco tomorrow and get a few bits. I could do with getting more than I'm willing to carry up the hill, though, so we really do need to do an online order ASAP.

Quite glad I avoided the party last night. People were up fairly late yelling in both our flat and next door, and apparently one of the guys from next door got totally pissed and ended up running around the flat naked.

I'm now incredibly tired and I still haven't fixed the W2M bots (by "fixed" I mean "converted the PHP bots to the new system"...) so I'm going to sleep.

blog comments powered by Disqus