The short way to create arrays in Ruby 2
Ruby has a really simple notation to create an array of strings:
I always forget this. The magic is in %w.
Ruby has a really simple notation to create an array of strings:
I always forget this. The magic is in %w.
The short version: on Xbox Live, the online network that allows you to play games and connect with friends via your Xbox 360 over the internet, you have an avatar. This avatar is a digital representation of yourself and is actually used in some games to represent your character. For example, in Guitar Hero 5, my avatar is on stage rocking out with a bass guitar (along with Magdalena, and any other friends I might be playing with).
With the introduction of avatars a few years ago, Microsoft gave users the ability to customize not only the physical appearance (sex, face, height etc) but also let you dress for success. You’ll notice that my avatar has a beard and kinda looks like me, and wears a Cleveland Indians hat, jeans Adidas sneakers and a black hoodie. Or, if you’re viewing this after September 15th, 2010, I could be wearing something entirely different. That’s also important to note: I actually take the time to change how I look online if I get bored, or no longer think that my mini-me represents me accurately anymore. According to the last paragraph in Randy’s excellent article about the Avatar Marketplace, he does the same thing too. I bet a fair few people do.
Here’s my idea, which is actually two ideas rolled into one. I would like the ability to dress my avatar how I like, then click a button and purchase those clothes in real life. Conversely, I’d like to buy some new clothes in real life, and receive an Xbox code that I can use to unlock the digital equivalent online.
Considering Microsoft have arrangements with a lot of recognized brands already, including Adidas, Quicksilver, Diesel, Burton and Roxy, as well as the facilities to enable online trade (with both real currency and Microsoft Points, the online currency used within Live for micro-transactions), it wouldn’t be much of a leap to connect these up.
About 90 minutes ago I was involved in an accident which resulted in a death. The worst part of it all is that I feel like it could have been avoided.
I was travelling down Roberts Road in the left lane, heading out of Subiaco. I had been spending some time with with Duncan, and it was getting dark so we said our goodbyes. Just past the football grounds, a black dog ran across the road, from the left. I knew straight away that we were going to impact, and hit the brakes. The ABS kicked in, but it happened instantly and the dog hit the car fair and square in the centre.
A split second after the heavy, loud thud of the impact some explosive pistons fired at the rear of the bonnet, near the windshield. This caused the bonnet to lift from the rear and tuck in from the front. I pulled over straight away, and could see in my rear-view mirror that there was a few people on the road, attending to the dog. The dog was contorting and twisting, and letting out the most helpless yelping you could imagine.
At this point, Duncan came running down the street after having heard the impact. I was stunned and shocked, and it was very comforting to have him there.
The dog’s male owner cradled him and ran off looking for a car to take their dog to the vet. The female took my number down and ran off too. I stood around for a few minutes, wondering what the fuck just happened. A guy gave me his business card, reassured me that he’d seen everything and that there was nothing I could have done. I appreciated that, and it might be useful when the insurance company is informed, but I still felt like shit. I knew in my heart that the dog was mangled beyond recovery. I heard the impact; I saw it writhing; I knew.
The dog’s owner’s neighbour, Claire, was walking her big black fluffy poodle at the same time. We think that the hurt dog saw his friend from next door and just bolted across the road to say hi. I took Claire’s details and she reinforced what the others were saying about it being an accident, and how we should be thankful that it wasn’t a child.
I said goodbye to Duncan and drove the car back to the office. I knew there would be people there because we were holding an Agile meetup, and I was right. Aaron, John, Fitzy, Dirk and Dan were all there still and consoled me.
My head knows it was an accident, but my heart doubts that it couldn’t have been prevented.
I called Magdalena and she came to pick me up from the office. I’m leaving the car there until it gets fixed. I started filling out a crash report online at the advice of the Subiaco Police but left it half done.
Matt, the owner of the dog that was hit, called me up at about 8PM to see how I was and to apologise for the situation. I told him that I was OK, the car is insured and that I was sorry for the whole circumstance.
With so many emotions running through me, it’s surprised me that one of the feelings is anger. I hope that the dog broke free from his owners, and that he wasn’t walking off lead, but I don’t think that was the case. I’m angry at the idea that this could have all been prevented.
Too many dog owners will spin some bullshit story about how their dog is different, and how their dog responds to commands and how it’s safe for them to walk off lead, because they’re special. If you walk your dogs off lead, and you can see cars, then you’re a fucking idiot. Dog beaches, dog parks or enclosed areas that are safe are different. It your dog has line of sight to a moving car then you’re taking a huge fucking gamble.
I killed someone’s family member tonight, and it could have been avoided.