Courtesy of Twitter

Archive for the ‘Uncategorized’ Category

Two Guys Break Into A Car…

Thursday, October 9th, 2008

Well, I’ll assume it was two. Some idiot(s) in the middle of the night smashed the corner of my back-right window and rifled through my car looking for something. Obviously they didn’t find it because the car is still there. They changed the gearstick to reverse, took off the handbrake and moved an American flag I had in the boot into the backseat (I know! The outrage!). Everything’s still in the car, just in more disarray than usual.

Orderly Code is Readable Code

Tuesday, October 7th, 2008

We were talking in #offrails today about coding standards and a few points came up on how to lay out “good” rails code. They were:

  • Controllers laid out in this order: index, show, new, create, edit, update, destroy, custom actions
  • Models laid out in this order:  Associations, Validations, Callbacks, Class Methods, Instance Methods
For controllers I would put filters first, then the 7 restful actions (index, show, new, create, edit, update and destroy) and then the custom actions and then if I needed to find a parent resource (for example /forums/1/topics) I would call private and then put a find_forum method there.

The Super-Consumer

Tuesday, September 30th, 2008

So I have this friend who’s the same age as me. He doesn’t work. He doesn’t appear to be actively looking for work. He got “fired” from his last job because he wasn’t fast enough, but apparently the boss was an asshole. There was an excuse for the job before it too, but I can’t remember what that was. He’s constantly getting new things. I’d like to refer to him as a “super-consumer”, someone who has too much. He loves NERF and Transformers (keeping in mind he’s the same age as me). He’s never outwardly happy with the things he has, and is constantly in a “covet thy neighbour” state of mind (and he’s Christian!), always wanting the next level up as soon as it’s been released. Take for instance the graphics card I won at AsLAN in a silent auction. He asked me if I could put my brand new graphics card into his media center. His argument was for when he has movie nights, then I will appreciate the gift I gave unto him. Admittedly, it’s a card I have no use for, at the moment, but it’s always handy to have a spare in case things go wrong. So, rather than him actually putting the energy used into his craving for all that is new & shiny into finding work so that he can buy all that is new & shiny, he just craves. I think this path is going to destroy him, and there’s nothing I can do or say that will open his eyes to what he is bringing on himself.

A List of Police-related Shows on Australian Free-to-air TV

Monday, September 29th, 2008

The Bill
Taggart
CSI: Miami
Crime Investigation Australia
CSI: NY
Dexter
Bones
City Homicide
The Force - Behind the line
Border Security - Australia’s Front Line
NCIS
Criminal Minds
Life
Law & Order: Criminal Intent
Law & Order: SVU
Motorway Patrol
Police Ten 7
Miami Vice
The Strip
Inspector Rex

How To Ask For Help

Thursday, September 25th, 2008
  1. Have you tried stopping your server and starting it? This fixes many problems and may fix yours!
  2. If you’re getting a NoMethodError which ends in “The error occured when evaluating nil.method” this means you’re trying to call a method on a nil object! Check the object that you’re calling that method on and make sure that it actually is set!
  3. Google the error message. If you’re getting “undefined method `blah`”, try googling just “undefined method”. Never ask a question without googling first.
  4. State your problem clearly. Never, ever say “I have a problem plzzzz help me !!!1!” or ” is not working” or something to that effect. Say, for example, that you’re getting an undefined method. Type “pastie: hi” into the channel and the pastie bot will send you a link via private message where you can show us your code, stack trace and error. Giving all three will provide us 99% of the time with the information we need to help you solve your problem.
  5. Don’t use dummy examples. An example would be asking a question like “How does A relate to B?” when asking “How does a blog relate to comment?”.
  6. Don’t ask “can you do <thing> with Rails?”, because the most often answer is “Yes”. Ask rather “How can you do <thing> with Rails?”
  7. Don’t ask to ask, just ask.
  8. Paste anything over 3 lines of code using the pastie service (type “pastie: hello”) into the channel and the pastie bot will send you a link via private message where you can put your code.
  9. Don’t ask “Has anybody used <thing>?” rather state your problem that you’re having with <thing> and somebody may be able to help you. See #2.
  10. Don’t prefix your question with a statement or another question. For example just write your problem rather than prefixing it with something like “Can anyone help me with this? <problem>” or “I am a noob help me with <problem>” or “I have a problem… <problem>” it’s a waste of your time typing it out and a waste of our time reading it.
  11. Computers never lie.
  12. Don’t ask subjective questions. “Subjective” means a question that’s answer is entirely opinion based, such as questions like “What is the best text editor?” or “What is the best testing framework?”

And Now For Something Completely Useless

Tuesday, September 23rd, 2008
class Model < ActiveRecord::Base
  has_many (Dir.entries("#{RAILS_ROOT}/app/models")-['.','..',"#{self.to_s.downcase}.rb"]).delete_if{|a|
File.directory?("#{RAILS_ROOT/app/models/#{a}")}.rand.gsub(".rb","").pluralize.to_sym
end

Parking

Wednesday, September 17th, 2008

An idea that’s been playing around in my head today:

Twonklist

Tuesday, September 16th, 2008

The site twonklist.com was an idea conceived of at my last job (NetFox) and I coded it up in a night or two with Brenton Fletcher adding the styling in later on.

This afternoon it was defaced. I have since removed all the awesome pictures a certain person put on the site, and it’s a person who apparently has a grudge against me. Now, I know who this person is. I even know their IP is 122.109.249.211. I know their ISP is Optus. I’ve even sent an email (with screenshots!) in the vain hope that they’ll do something about it, but they most likely will not. Now if you have a grudge against me, the way to go about things is to not deface any of my sites. You come to me, face to face, as a man and talk to me. I’m available most days. Say what you like, just don’t deface my sites.

Congratulations to this person, as now all the requests from any IP beginning with 122.109 will go to a very useful/useless google search entry. Yes, that basically means the entire Optus network.

The Accident: Followup #1

Monday, September 15th, 2008

This is a followup to my InLAN blog post, best to read that first to get the whole story.

So today I get a phone call from Allianz about my compulsory 3rd party insurance and they told me the guy is filing a personal injury claim and apparently has “legal representation”. They asked me all kinds of questions like “Were you using a mobile phone?”, “Did you get alcohol testing?”, “Were you and your passenger wearing a seatbelt?” and so on.

What really amazes me is that someone who, despite the thousands of years of evolution the human race has undergone, still thinks it possible to file a personal injury claim for an accident he caused. Had he not bolted out of the bushes onto the road, whilst it was raining AND in the middle of the night, this would have never happened. You (and the insurance company) can only take my word that I’m not a homocidal maniac who enjoys late night rampages that involve running over pedestrians and causing hundreds of dollars worth of damage to my dearly beloved car, not to mention my state of mind.

If I have to pay this guy a cent, that will be the last of my faith in humanity gone for quite a while.

Ham & Rocket Rolls

Wednesday, September 10th, 2008

Usually I post technically minded stuff, but today I decided to share my “recipe”. Mum and Darrel have gone away for a month so I’ve been left to fend for myself with my cooking skills near to non-existant. I can microwave, I can toast and I can simmer.

For the past few days I’ve been eating these hamburger rolls from woolworths stuff with various ingredients and I’ve found that ham (any kind) and cream cheese go nicely together. I tweeted yesterday about having the rolls and got the opposite reaction to what I expected, nikc recommended I try putting rocket on it. Also with me being a long-time fan of cream cheese and sweet chilli sauce (the only two liquids I find that complement each other so perfectly), I put that on the roll too.

“What was the end result?”, I hear you speak through the saliva drooling from your mouth. It was this:

Ingredients

  • Knife to cut rolls
  • Sandwich Toaster (optional)
  • 1 Hamburger Roll
  • Cream Cheese
  • Sweet Chilli Sauce
  • Rocket leaves
  • Honey Baked Ham

Preparation:

  1. Cut rolls directly down the middle and lightly toast them for about a minute on the sandwich toaster (optional)
  2. Spread cream cheese lightly on both sides of the rolls
  3. Put ham on top of the cream cheese
  4. Put a drop of sweet chilli sauce on the ham and spread
  5. Tear off some rocket leaves and spread over ham
  6. Put roll back together

Thanks to the viscosity of the cream cheese and sweet chilli sauce combination, your roll should stay nicely packed together.

Photos are here and here!