Archive for December, 2006

Don’t $@!% with IDocument.DEFAULT_CONTENT_TYPE

Friday, December 15th, 2006

I’ve been doing some general bug fixing of the Specfile Editor today and noticed that we had some problems with partitioning the document. We had defined 4 types of partitions for spec files:

  • Files (for a single %files section)
  • Scriptlets (i.e. %post, %prep, etc.)
  • Changelog
  • Default (for everything that is not one of the above)

What I noticed is that the default partition never got used, instead the IDocument.DEFAULT_CONTENT_TYPE partition was used for this. After digging through the code for a while and “fixing” what seemed to be the places that caused this, I ended up completely foobaring the partitioner.

Turns out that the Eclipse Text framework doesn’t support having a different default partition, and will happily barf in your lap if you try to force it.

Morale of the story children: Don’t $@!% with IDocument.DEFAULT_CONTENT_TYPE.

CUSEC 07

Thursday, December 14th, 2006

This year I’ve been involved in the Candian University Software Engineering Conference, which happens every year in Montreal.

I’ve personally never been to it, but heard great things from those who have. So I decided to evangelize it at UofT and volunteered to become the head delegate, which means I get to (try to) herd a whole lot of sheep into coming. :D

So if you’re a university student in Canada, and interested in software engineering and software development, check it out! It will be a blast!

How do you put a giraffe into a refrigerator?

Thursday, December 14th, 2006

This week is exams week.

Which roughly translates to OMG do whatever the hell I can to not study for exams week.

I guess this is one of those things. ;)

Here’s a bunch of questions I encountered today that’s supposed
to help you judge whether someone will be a good Consultant. This is not
really specific to IT consultants, but the point is useful anyway.

————————

Q1.  How do you put a giraffe into a refrigerator?

The correct answer is:  Open the refrigerator, put in the giraffe, and close the door.

This question tests whether you tend to do simple things in an overly complicated way.

Q2. How do you put an elephant into a refrigerator?

Did you say, Open the refigerator, put in the elephant and close the refrigerator?

Wrong Answer

Correct Answer:  Open the refrigerator, take out the giraffe, put in the elephant and close the door.

This tests your ability to think through the repercussions of your previous actions.

Q3.  The Lion King is hosting an animal conference.  All the animals attend… except one. Which animal does not attend?

Correct Answer:  The elephant.  The elephant is in the refrigerator.

You were the one who just stuffed the elephant into the refrigerator.

This tests your memory.

Okay, even if you did not answer the first three questions correctly, you still have one more chance to show your true analytical abilities.

Q4. There is a river you must cross but it is used by crocodiles, and you do not have a boat. How do you manage it?

Correct Answer:  You jump into the river and swim across. Have you not been listening? All the crocodiles are attending the Animal Meeting.

This tests whether you learn quickly from your mistakes.

According to a consulting firm using this test, approximately 90% of the professionals tested answered incorrectly but many preschoolers answered several answers correctly.

One conjecture: most professionals don’t have the analytical powers of a four-year-old.

————————

Now, I fully realize that this isn’t a “ask this questions on a job interview” kind of advice, but more like “here’s something to break the ice”. But I would bet large amounts of money that some bozo hiring manager in some consulting company will actually use this as a criteria for hiring someone.