Twit-twoo
Tig Tag Toe
Top

Thursday
May032012

Lego 747-400

Following my post about a year ago on my British Airways 747-400, I thought it was about time I got the .lxf file into the wilderness.  By far and away, the original post was my most popular content on my blog and I've had so many requests to release the file.  My intention was to finish the bird, but I'm just not finding as much time as I'd like these days.

Throughout the entire design, I've tried to balance aesthetics with function.  The latter is important because my intention was to build the plane at some point and it'd have to stand-up!  Naturally, it wouldn't stand without the other-half, but still, you get the idea.

The biggest problem I think the build would face would be the weight. Lego is heavy. Really heavy. And the 744 has enormous backside.  All the weight on the three flimsy wheels? What about those big flapping wings? Surely, they'd just rip away from the hull?  This shot of the undercarriage shows my attempt to 'pin' the wings in over the wheels:

The wing has been cantilevered on the wheels, with the two wheels supporting the main wing beam.  Do I think it'd hold with real Lego? No. I think LDD limits the true potential to pinning the wing into the hull.  All that being said though, I always attempted to make the plane structurally sound.  The wings have a 'cross-hatch' system where the weight of the wing (the sag), holds the wing rigid as the load is pushed down the blocks I've built:

 

Other areas I was completely stumped upon were doors, the cockpit and the very back of the plane.  I am releasing my .lxf file, which you'll find below to download, in the hope that someone with a little more enthusiasm can complete the beast!

She's currently running at just over 10,000 bricks and I guesstimated she weighs close to 15 kilos -- see I told you she was heavy!

So, download the file, take a spin around her in Lego Digital Designer and why not return to tell us how you got on? If any Lego enthuisiast wants to build her and has unlimited BrickLink funds to put her together, please let me know - I'd love to know how some of the major problems are solved!

A few shots of her before she heads out:-

The .lxf file is 565kb.

Enjoy!

 

Tuesday
Apr172012

How (not) To Hire A Programmer

Jeff Atwood over at Coding Horror recently posted 'How to Hire a Programmer' where he shared some techniques he's seen work when hiring developers in the past.  Most of the post got a thumbs-up from me, but his section 4, "Do a detailed, structured phone screen" was ludicrious:-

  1. A bit of on-the-fly coding. "Find the largest int value in an int array." or "Write a function to reverse a string." or "Write function to compute Nth fibonacci number." or "Print out the grade-school multiplication table up to 12x12.";
  2. Some basic design. "Design a representation to model HTML." or "Design a deck of cards that can be used for different card game applications. " or "Model the Animal kingdom as a class system, for use in a Virtual Zoo program. ";
  3. Scripting and regular expressions. "Last year my team had to remove all the phone numbers from 50,000 Amazon web page templates, since many of the numbers were no longer in service, and we also wanted to route all customer contacts through a single page.  Let's say you're on my team, and we have to identify the pages having probable U.S. phone numbers in them. To simplify the problem slightly, assume we have 50,000 HTML files in a Unix directory tree, under a directory called "/website". We have 2 days to get a list of file paths to the editorial staff. You need to give me a list of the .html files in this directory tree that appear to contain phone numbers in the following two formats: (xxx) xxx-xxxx and xxx-xxx-xxxx. How would you solve this problem? Keep in mind our team is on a short (2-day) timeline."
  4. Data structures. "When would you use a hashtable versus an array?" or "When would you use a linked list vs. a vector?" or "Can you implement a Map with a tree? What about with a list?" or "How do you print out the nodes of a tree in level-order (i.e. first level, then 2nd level, then 3rd level, etc.)";
  5. Bits and bytes. "Why do programmers think asking if Oct 31 and Dec 25 are the same day is funny?" or "Describe a function that takes an int value, and returns true if the bit pattern of that int value is the same if you reverse it (i.e. it's a palindrome); i.e. boolean isPalindrome(int x) "

The post incensed some of the Coding Horror readers and I must agree with a number of them.  When a bricklayer goes for a job with a bricklaying firm, is he asked to build a wall and describe the sand to cement mixture ratio? Doubtful.  I'm not overly adverse to some of the methods picked out by Jeff, but I am concerned about how employers may read his blog, misunderstand his point (as did many) and introduce these as their tests.  

When a prospective employer asks their candidate on the telephone that they wish to remove 50,000 telephone numbers from some static HTML pages, what's the candidate's preferred method, what are they expecting for an answer? Will regex or grep suffice? Do they want an example? "(\([0-9]{3}\)\s|[^0-9][0-9]{3}-)[0-9]{3}-[0-9]{4}\b"? Or do they want a clever candidate, one that thinks about the requirements?  Even as someone who knows the answer, there doesn't seem to be a correct answer!  Far too much is left to interpretation.

These questions aren't really testing a candidate and their programming ability at all. The test merely confirms if they are good or bad at telephone interviews and technical tests.  A programmer may not know that 2^16 is 65536 (despite it being an important number), but may know that:-

short x = z + y;

...will throw a compilation error because z + y evaluates to an int by default.  The correct way is to cast:-

short x = (short)(z + y);

Out of the two answers, which is the more useful to know?  When, whilst working on commercial projects, have you ever needed to know that 2^16 is 65536 anyway?

One of the comments to Jeff's posts by Jorge summed it up perfectly:-

"...The first couple of interviews I went to I did very badly in the technical test. The interviewer thought that I wouldn't be up to the standard they were after. The 3 or 4th I did much better. The 5th and 6th I blitzed and got some very nice job offers!

OK, I may have felt the pressure a bit after bombing on the first two, so I have been doing some extra study. Did my technical skills really develop so rapidly over the past 2 months, or did my interview skills develop? Did the first interviewers just miss a good opportunity... or were the later interviewers duped?

The fact is, it's easy to get good at interviews after a couple of times. You hear the same questions every time, so you can go away and cover the holes in your knowledge..."

The UK development job-market these days are Monday to Friday 9 to 5 dev slogs, working on mundane applications built on some crappy code-heap-of-a-platform that you'll be expected to deal with.  Often developing for a faceless, bland company with no sense of creativity or adventure. The majority of us don't get to work for Google, Stack Overflow or Facebook.  So, if these mediocre dev houses come knocking on my door and decide to make me jump through all these hoops, I don't want your job.

If I was running an interview, I wouldn't have a paper test or even a practical one. I'd have some basic questions where the answer wasn't important. I'd just want to see how the candidate goes through the process of the solving the problem.  Consider "ask the duck"...:-

Bob pointed into a corner of the office. "Over there," he said, "is a stuffed duck. I want you to ask that duck your question."

I looked at the duck. It was, in fact, stuffed, and very dead. Even if it had not been dead, it probably would not have been a good source of design information. I looked at Bob. Bob was dead serious. He was also my superior, and I wanted to keep my job.

I awkwardly went to stand next to the duck and bent my head, as if in prayer, to commune with this duck. "What," Bob demanded, "are you doing?"

"I'm asking my question of the duck," I said.

One of Bob's superintendants was in his office. He was grinning like a bastard around his toothpick. "Andy," Bob said, "I don't want you to pray to the duck. I want you to ASK THE DUCK YOUR QUESTION."

I licked my lips. "Out loud?" I said.

"Out loud," Bob said firmly.

I cleared my throat. "Duck," I began.

"Its name is Bob Junior," Bob's superintendant supplied. I shot him a dirty look.

"Duck," I continued, "I want to know, when you use a strap hanger, what keeps the sprinkler pipe from jumping out of the strap when the head discharges, causing the pipe to..."

In the middle of asking the duck my question, the answer hit me. The strap hanger is suspended from the structure above by a length of all-thread rod. If the pipe-fitter cuts the all-thread rod such that it butts up against the top of the pipe, it essentially will hold the pipe in the hanger and keep it from bucking. 

I turned to look at Bob. Bob was nodding. "You know, don't you," he said.

"You run the all-thread rod to the top of the pipe," I said.

"That's right," said Bob. "Next time you have a question, I want you to come in here and ask the duck, not me. Ask it out loud. If you still don't know the answer, then you can ask me."

"Okay," I said, and got back to work.

The very process of answering the question reveals the answer.  It is this "aloud thinking" you want to see from a candidate.  This implies an ability to problem solve themselves and at the same time, learn the answer and logic - thereby making better programmers.  

Some time ago I was asked to undertake a technical test for a role and the only convenient time for both parties happened to be on my commute.  I refused to undertake any technical test whilst driving, but would be happy to discuss technical subjects to show proficency. This was thoroughly frowned upon and questioned. I promptly decided the role wasn't for me, another mediocre dev shop who treat programmers like crap - do you need a programmer who can drive and program at the same time?

Technical tests in the interview process will find you candidates that are good at technical tests and interviews, not necessarily good programmers.

Friday
Mar022012

We No GO!

I've used Kayak many times to search and book flights. It really is the best flight aggregator out there, especially with its filters and AJAX interface. Kayak act as a portal for the agents and airlines that actually have the tickets, such as Southwest, Delta, Expedia and Opodo. This is great for competition, great for the consumer and keeps prices competitive.  They are the equivalent of a friend, you can trust them, they've never let you down, they're always there.

Unfortunately, I experienced a darker side to Kayak recently - or at least one of Kayak's friends. I was looking for tickets for five travellers from Las Vegas to San Francisco in early March and the search threw up the usual options, United, Continental, Virgin America, Delta and Southwest, each offering pretty much the same price for given departure times throughout the day. Opting for a suitable time in the morning, I selected a Southwest direct flight and wanted to book the tickets. Selecting 'book' presented me with two choices; £66 with a company called Wegolo, £76 with a company called Budgetair. I had heard of neither of these companies and did what most people would do; select the cheapest.

I was redirected to a booking page on the Wegolo site, which seemed professional enough and entered the required details for the five travellers. I entered my credit card details and hit the submit button. I promptly received an error, saying no payment had been taken and my booking was unconfirmed. I was advised not to attempt to book again (why?), but contact the Wegolo support team, who would respond within 24 hours. Silly annoyed I even had to do this, I completed the necessary form to contact the support team and was thanked with a courtesy message saying it would take two days to get back to me - what happened to 24 hours?

Out of complete curiousity, I checked with my bank that evening to see if anything had been requested from Wegolo. Surprise, surprise, it had been. The company had charged the full amount to the card. So I was now in a predicament. I had no confirmation, no receipt, no flights and now had been charged the full amount for five tickets I didn't seem likely to receive. My bank were unable to help me yet, because I'd need to wait at least 28 days and at least attempt to contact the company before they could become involved. Wegolo, didn't respond to emails and they had no telephone number on their site. Panic started to creep in and that awful feeling that you've just been had.

The next port of call was to contact Southwest who said they had no record of reservations on that day in my name. Ut oh.

So I was contemplating writing off the money and started writing a letter to Kayak and Wegolo, seeking some sort of explanation.

Three days after my booking, I got a email from Southwest saying my booking was confirmed and they provided the locator. Cue huge sigh of relief!

At the time of writing, Wegolo have yet to contact me or send confirmation and on Googling my scenario, it turns out the Wegolo booking error is quite common and this limbo happens to countless unwary travellers. My tip? Avoid Wegolo like you'd avoid piles and spend the extra money to book directly with the airline.

Tuesday
Oct252011

Why World of Warcraft has taught you to 'gamify' your boring business application...

Following Jeff Atwood's recent Coding Horror post regarding 'gamification', I wanted to add my own thoughts on the subject.  Jeff was using the premise of games that require teamwork or a sum-of-parts to achieve a single goal, in this instance to make the web a better place through the Stack Exchange and rewarding players as they 'win'.  Users of the Stack Exchange win by collecting reputation, badges, increasing their ranking and obtaining upvotes.

I'd go further to say that the 'gamification' of an application or site can increase its retention rate, or stickyness.

One of the most repetitive, and dare I say occasionally dull, games on the market currently is Blizzard's World of Warcraft.  Despite its repetition and occasional dullness, it is a game that attracts nearly twelve million active players and most players tend to return after each hiatus.  Why do players suffer numerous repetitive tasks, spend hours running to-and-fro within the game maps and spend immeasurable time mastering the games professions?  'Beating' the game is one reason, but surely the collection of the in-game collectibles influence the games stickability?

Warcraft and it's 2533 possible achievements...

Are the icons, achievements and badges like an illusive sticker-book for many gamers?  Are we magpies of shiny digital iconography?  Do we pour hours into a game such as Warcraft to beat the game (which is almost impossible) or to satisfy the human urge to collect things perceived as valuable?

Gowalla, my favourite geo-location service was my favourite not because it was technically any better than Foursquare, but because Gowalla's artwork, icons and collectibles knocked Foursquare's into next week.  Albeit, this was before the Gowalla update, now -- I'm just confused.

Further, although slightly deviating off course, user interface is so important. Look at MySpace and Facebook.  Both were conceptulised at roughly the same time, the former being the bigger brother for a while, but MySpace was so god-awful to use because of what its users were allowed to do to their own spaces, it destroyed the user experience, and then the traffic to the site. I'm not the only one who thinks this either...

I'm of the opinion that if an application developer was to introduce achievements, badges and user ranking into business software, it could drive a marked improvement in interactivity and engagement.  Users want to engage with Gowalla, World of Warcraft and the Stack Exchange, not just because of the value of the product, but for what it gives back. 

Why would anyone spend 671 minutes (11.18 hours if you're curious) of their life repeating the same button presses just for this?  Combined with being able to say they've 'done it', they claim the badge/achievement to prove they've done it.  It is this desire to collect badges and achievements, even for the most trivial items, that if captured in a business application could be truely powerful.

Go for those achievements!Engage your users with a powerful user-interface and keep them with badges, achievements and pretty icons...

Wednesday
Oct122011

Is your jQuery library genuine?

Recently, I had to download a copy of the jQuery UI library to make use of the 'modal' functionality.  I did what most would do and hit Google for 'jquery ui modal':

As you can see from the visited link colour, I blundered straight in and was presented with what looked like the jQuery site.  Luck would have it that the download link didn't work, so I came back out to Google to try and find an alternative.  At this point, I spotted the URL.  The site listed isn't a genuine jQuery site.

I did a little more reading and found that some users had managed to download the jQuery master from the .it domain and were receiving strange syntax errors.  Check to see if you have been the victim of SEO and always goto jquery.com to grab the latest or use an official CDN.