Mark Parnell on Marine Policy 101

Thoughts

Mark Parnell MLC

For those who don't use Twitter and who aren't following South Australian Legislative Council Greens member Mark Parnell, he had this to say earlier this afternoon:

Marine Policy 101: Kill seagrass with pollution = mobilised sand = eroded beaches = $$$ to pump more sand on shore to keep our beaches nice!

It's funny (in a kind of tragic way) because it's true. Welcome to the world of reactionary rather than preventative environmental politics, or as I see it, fixing the symptoms not the causes. It works so well for health, education and transport, might as well put it into practise for the environment too.


BASIC on the iPhone Commodore 64

Hardware

It turned out to be another epic saga involving Apple and the denial of an application on the iPhone App Store, then approval, then a hasty revoke. The problem is Apple doesn't want programming languages and virtual machines for other programming languages running on the iPhone because they claim it would adversely affect the user experience by making the device less secure. Presumably I would think they're more worried about sidestepping and potentially allowing another competing app store.

After disabling the BASIC interpreter, Apple finally approved a beautifully written and faithful reproduction of a Commodore 64 for sale which I hastily snatched up. I played a few rounds of Jack Attack and was instantly hooked! Today though, Apple has since revoked the app meaning people who didn't download it yet can't once again.

While the initial splash screen says BASIC has been disabled, it turns out you can sneakily get to it by enabling the full keyboard at all times, then loading a game and pressing Reset on the Extra keyboard. In Steve Jobs parlance, BOOM, you're at a Commodore 64 BASIC interpreter!

Presumably the app won't be allowed back in the store (if ever) until this backdoor way to get to the BASIC interpreter is removed, but it means people like me who were extraordinarily lucky enough to download it before Apple discovered the hidden feature just don't upgrade if it ever does reappear.

The iPhone User News site has more information about the initial application approval and subsequent workaround and rejection.


Lesson 9 in grilled cheese sandwich observation

Thoughts

Recycled grey water

Oh come on, nine lessons? Now we're just getting silly people. Welcome to your ninth grilled cheese sandwich observation lesson. As usual, feel free to take notes.

As far as I know this is not a grilled cheese sandwich, and quite frankly it concerns me that you think it is. Please seek counselling.

ASIDE: I have been advised by my solicitors to disclose that while this information has been deemed accurate by most gastronomes, it should not be taken as sound legal advice when attempting to identify grilled cheese sandwiches in criminal and civil cases, particularly if you are serving with a jury of your peers.

If you do attempt to use such advice in legal proceedings however, please cite Neal O’Carroll as the creator of this post and not me so that I may not be involved and have to deal with the associated paperwork and litigation. Thank you ever so much.

Previous lessons

08, 07, 06, 05, 04, 03, 02, 01


#Anime Bakemonogatari 09

Anime

You all remember that computer game Lemmings? I'm talking about the original one that was released for the Amiga and DOS. We had the original version and I remember this one level that had dark green trees and spooky music, both of which weren't featured on any other level. In a spooky way (well, it is a Ghost Story!) this episode of Bakemonogatari kept reminding me of it.

It's a new Nadeko Snake story arc with and that means the introduction of a new character, if the previous ones are anything to go by. Quite a laid back, easy going episode until we got to the last five minutes!

I've noticed I've started slipping into old habits again with my reviews here. On my old anime blog I tended to start a review of a series by talking generally about it, but as the story progressed I started slipping into more of a spoiler discussion of just the story for each episode instead. I guess as shows progress it's hard to just keep talking about themes and art without talking about what happened. Can you forgive a computer science student who isn't doing any courses in creative writing or journalism? :)

Epic Hawaiian Shirt guy sent our superhero Koyomi on an errand at an overgrown, abandoned shrine and Suruga tags along with him and is surprisingly chummy. Turns out Her Senjougaharaness is more concerned with Koyomi messing around than Suruga and gave her firm instructions to report back if he tried anything lewd and/or sneaky. She… has… him… under… her… control!

On the way up the trillions of stairs which are in surprisingly good condition and aren't overgrown even though the shrine was in compete ruins, they pass a mysterious girl who Koyomi thinks he recognises. I recognised her clothes: she has a Shihou Matsuri hat! I wrote so much about Sola on my old blog, really wish I still had all those posts. Anyway Koyomi and Suruga are scared sh*tless by a huge dead snake that's been hacked to bits and the scene is abruptly cut, as we've come to expect from this unconventional series.

Zipping forward we're back at the high school after classes and Koyomi has enlisted the help of our super cute and smart meganekko friend Tsubasa to help him pick books to study for his entrance into the same university as Hitagi. After she abruptly leaves with a headache Koyomi notices the same girl he saw before looking up books on the occult. I'll be talking more about the art in a second, but I thought this whole scene was drawn amazingly. To use technical cinematic terminology.

Having seen the girl he recognised from before, Koyomi arranges for Suruga to meet him at the abandoned shrine in the hopes of seeing her again. They find her attacking another snake, to use the Bakemonogatari parlance her "oddity". Her name is Sengoku Nadeko and he knew her from when he'd meet his younger sister's friends back when he was in primary school. The plot thickens.

They take her back to Koyomi's room which looks like the set for an Ikea catalogue and after Suruga tries to look for his… stash… the poor Nadeko shows them some bloomer related fanservice and scars that were inflicted upon her by her oddity, in this case the snake she can't seem to kill. She pleads for help and the credits come up, talk about a damn cliffhanger!

I reckon the art in this episode was some of the best since episode 01, possibly the best so far. The whole scene at the abandoned shrine was stunning. The bookshop was also beautifully detailed and had so much more depth than what you'd typically expect even from a higher end production. If there's ever a BR version of this series I'll be buying it and a PS3 Slim just to take screen captures for desktop backgrounds, they really are that good!

I'm also left with a sense of jealousy over Koyomi's room. Neither my room in Singapore or Adelaide is as swish, and I can certainly say I don't have a giant banana… I think I might end that sentence right there.


Samoa now has left drivers

Thoughts

Getting dark in Hahndorf

If I were a car driver, I could now add Samoa to the list of countries I could figure out how to drive in, because they drive on the right side of the road now. Wait, I meant right as in correct not as in the right-hand side. I meant they're now driving on the left-hand side. From the SBS Australia news site:

On Tuesday, Samoa will end a century-old tradition of European-style driving, on the right, to become aligned with its Pacific neighbours.

The controversial move will make car importation from Australia and New Zealand easier and cheaper.

But the move has been fiercely opposed, with thousands taking to the streets in protest and backing a law suit to have the change overturned.

Until recently I had no idea so few countries drive on the left. I'm an Aussie and grew up in Singapore and Malaysia, so guess I'm just used to it. Apparently aside from much of the Pacific, Indonesia, Ireland, the UK, Japan, Hong Kong and most of south-eastern Africa most of the world drives on the right.

I know I have my own biases, but I always thought driving on the left made more sense anyway. Most people are right-handed which means they have better control of the steering wheel, while their less accurate left hand is just used for the transmission.

What can I say, people say I tend to have left-leaning sympathies ;-)


Rubenerd Fun Fact #81

Thoughts

Fun Facts!

Here's another Rubenerd Fun Fact for all you rabid Official Rubenerd Fun Fact fans. I know you're out there, I can hear you breathing. Oh wait, that's me.

It’s illegal in most jurisdictions for civilians to operate single vehicles with more than 300 axles.

Thank you.


Multiple Java classes in one file

Software

Classic Java logo

I got so much helpful feedback from friendly people here with my last Java question I thought I'd try again with another problem that's been gnawing at me for a few days. It's probably just a matter of scope, but I want to be sure!

Say for example I have a very basic Train class and within it I have Carriage objects. In this example the private Carriage class is within the class Train:

public class Train {
  Carriage[] carriages = new Carriage[10];
  public Train() {
    // constructor stuff
  }
  private class Carriage {
    public Carriage() {
      // constructor stuff
    }
  }
}

In this version Carriage is within the same file, but is a different class. This also compiles, but if I try to append a private keyword Java throws a "modifier not allowed here" error.

public class Train {
  Carriage[] carriages = new Carriage[10];
  public Train() {
    // constructor stuff
  }
}
class Carriage {
  public Carriage() {
    // constructor stuff
  }
}

Basically I need to know what the functional difference is between the two. Both compile and can be used; on my machine here I added a bunch of toString() methods and fleshed out their constructors and got identical output with each version. Is it simply a matter of scope? Is one approach more acceptable or preferred?


Links for 2009-09-07

Internet

Links shared from del.icio.us today:

"Observing American Rabbis unite over Palestinian rights is an inspiring sight."
(categories: politics middleeast givepeaceachance humanrights)

"Kingston Random Access Memory (RAM), Computer Memory, Computers at Shopping.com Australia"
(categories: thinkpad hardware shopping ram memory)

(categories: photos ibm thinkpad images lenovo)

"It's hard to say for sure exactly what the problem is. But, the inverter lights up the light in LCD panel. Your cheapest fix is to replace the inverter located in the LCD panel and if that doesn't work then the light is burned out in the LCD panel itself. You would be then looking at replacing LCD panel. Could also be a loose wire, but not likely."
(categories: parts macbookpro apple hardware)

"922-7191. This is a brand new inverter board assembly for the MacBook Pro"
(categories: parts macbookpro apple hardware)

"661-3950 or 661-4015. This is the 15" LCD TFT Display and backlight for the MacBook Pro."
(categories: parts macbookpro apple hardware)


Prohibition works! Wait, what?

Thoughts

Bar at the Hahndorf Inn Hotel

Adelaide Now is reporting that millions of Australians have had their first drink by age 10, and that it's the reason for alcohol abuse later in life. I don't buy it.

MILLIONS of Australians have been put at risk of developing alcohol problems later in life by drinking before the age of 10, new research shows.

Research commissioned by The Salvation Army shows more than two million Australians were under 10 years old when they first tried alcohol.

The Roy Morgan research also showed that 12 million Australians were unaware of new national guidelines which advise the safest option for teenagers is to delay drinking for as long as possible.

The Salvos said the research was alarming, adding it was concerned the message that children under 18 should not drink is not getting through.

Leaving aside the title which doesn't say anything about alcohol, I completely fail to see the connection between this alleged research into the age alcohol was first consumed, and the problems with alcohol abuse.

My father's side of the family is from Germany which has no age limit on the consumption of alcohol, and many other countries in Europe that have proud traditions surrounding beer and wine have similar laws. Do these European countries have problem drinkers? Absolutely. Are there any more than in Australia where the early age of alcohol is being blamed without evidence for so many youth trouble drinkers? I'd wager a grilled cheese sandwich the answer is no.

The fundamental problem with banning a substance outright is that socially it just doesn't work. Banning hard drugs doesn't stop the drug trade, prohibition in the United States didn't stop drinking, and abstinence classes don't stop woohoo. In fact often such efforts backfire simply because they're seen as forbidden fruit.

The real problem the Anglosphere is facing with alcohol abuse (Australia, the United States et al) is that heavy drinking is seen as a rite of passage to adulthood. Our society dictates that young people who get completely wasted and smashed are in, and the people who choose not to are losers. Frankly I don't know the answer to this problem, but I'm not pretending that we can blame it all on the fact trillions of under-age youths had their first taste of alcohol earlier than the law says they should have.

As a matter of disclosure, I had my first glass of red wine when I was 12. I'm 23 and I have a standard drink perhaps once or twice a month, if that. Now if we wanted to talk about coffee…!


Theory behind linked lists

Software

Chain photo by Toni Lozano on Wikipedia

One of the things I've had to relearn in Java after not touching it for a while in a university setting is not the concept of linked lists specifically, but how they're implemented. Despite Java having native support for them in its API, we're expected to create our own Linked List objects to use in our programs, presumably to demonstrate we understand the concept and so we could create a really long linked list of grilled cheese sandwiches.

As I understand it in an abstract sense, each node in a linked list contains an object and a pointer to the next node if applicable. The header points to the first node, and the last node points to null. To load in all the nodes we'd traverse the linked lists starting at the head until we encountered a null.

In a similar way to a primitive array with shifting, a linked list is expected to be able to have nodes removed and added from any arbitrary position including at the head and the end.

Adding nodes to a link list

Adding nodes entails traversing the linked list until we come to the node just before where we want to insert our new node. We then point the previous node to our new one, and our new node to the next in.

To add the node to the beginning, we don't need to traverse the list, we just point the header to the new node, and our new node to the previously first node.

To add the node to the end, we traverse until we reach a null value, then have the last node point to our new node, and our new node point to null instead.

Removing nodes

Not surprisingly, removing nodes entails the opposite of adding them. Instead of severing links to place a new node, we sever the nodes between the node to remove and the nodes surrounding it, then link the surrounding nodes. If your programming language doesn't have garbage collection, you'll then want to undefine the object.

If the node is at the beginning we link the header to the next node on the list, and if the node is at the end we take the second last node and point it to null.

Observations

Linked lists (and binary trees etc) are a classic example of a concept which seems perfectly simple when you explain it, but I imagine if you don't plan it and understand it properly you could make a huge mess of it when it comes down to coding. Like deciding to make a grilled cheese sandwich with pop tarts and chocolate ice cream instead seems like a great idea in theory, but you end up setting your toaster oven on fire.