Infographic: User reviews are the king

by Joey deVilla on April 5, 2017

If you’re reading this blog, chances are that you often check the reviews before you buy something, whether online or in a brick-and-mortar establishment. I always see what the reviews are before buying something at Amazon, usually check the reviews for restaurants and hotels that are new to me, take the temperature of a film on Rotten Tomatoes, and even at the local craft beer pub where Tampa’s monthly Ybor Tech OpenHack get-together (New World Brewery; 4.6 stars on Facebook, 4.2 stars on Yelp), I’ve pulled out my phone to check reviews when faced with a menu of unknown ales and stouts.

I’m not telling you anything new by saying that in a world with nearly ubiquitous networked computing, reviews are crucial to bringing in new business. What might be new to you are the numbers behind reviews, but you can discover them in Website Builder.org’s User Reviews are the King, which collects data from 30 sources and brings them together into a single infographic.

Here’s a preview of the infographic. Click it to see the whole thing:

{ 1 comment }

Those of you familiar with the Game of Thrones TV series will recognize the guy in the photo above: he’s Tyrion Lannister, one of the most-loved characters, if not the most-loved character on the show. A good part of his charm is his ability to get results by forging unlikely alliances and winning over people despite some very long odds.

If you look online, you’ll find many tributes to Tyrion’s genius. Here’s one of my favorites: Charisma on Command’s video, Why Tyrion Will Win the Game of Thrones. It’s just under 15 minutes long, but it’s fun to watch, and you’ll find some tips that you can use in your working life:

If you’ve got another 11 minutes to spare — hey, watch both during lunch! — here’s another Charisma on Command video showing Tyrion’s ability to take control of a situation:

There’s a reason for all this Tyrion Lannister preamble: I’m here to tell you that I’m the Tyrion Lannister of tech. And I’ll do it by citing examples.

Winning over an free software / open source crowd at a student conference and trolling Richard Stallman

The odds were very much not in my favor at my appearance at the 2009 CUSEC (Canadian University Software Engineering Conference). Look at what I was up against:

  • Mine was the last presentation of the day.
  • I was following a presentation by the amazing, brilliant, and entertaining Giles Bowkett, who put together a rapid-fire 400-slide extravaganza, which included stories about carrying a gun because he was in actual danger of being mauled by a cougar (here’s one of his presentations that’s pretty close to the one he gave there). Giles is a stunningly good presenter, and it’s deadly to follow him.
  • I was the most “corporate” speaker there, as a representative of not just Microsoft, but Ballmer-era Microsoft (it was 2009) .
  • The audience was made up entirely of university engineering and computer science students with a strong preference for free software and open source, who also invited Free Software Foundation founder Richard Stallman to speak.

You’d think that I shouldn’t have been the breakout speaker of the event, but that’s how it turned out.

First, there was my presentation. I won over the crowd by opening with the unexpected — an accordion number — and then proceeded not to talk about Microsoft technologies, but about finding ways to harness your love for technology to create a great career and great life, telling amusing stories along the way, and appealing to the collegiate sense of humor. (You can watch the entire presentation — it’s the video above.)

If the presentation established me as a trusted and liked speaker, my actions the next day cemented my status as a CUSEC “One of Us” and got me invited to subsequent conferences. It’s what happened when I, as a Microsoftie, attended Richard Stallman’s talk the following day, participated in his auction for overpriced (especially for students) Free Software Foundation trinkets, won the auction for the stuffed GNU (mascot of the Free Software Foundation), and uproariously paid for it with a Microsoft credit card, much to the audience’s delight.

The story spread, so I won over not just the conference audience, but a whole new audience of developers who wouldn’t have paid attention to anything that Microsoft did as word of what happened spread, established Microsoft Canada as regular CUSEC guests, and until later incidents with a pair of rented chaps and a gong, made one of Microsoft Canada’s strangest expense reports.

You can read the entire amusing story here: Winning the GNU.

Getting Microsoft to sponsor an Android conference when Google wouldn’t

In October 2010, Toronto’s AndroidTO conference needed a couple of big sponsors to help ensure that they could hold their day-long, hundreds-of-attendees event without losing money. I’d heard that Google wasn’t going to sponsor them, and asked: Why doesn’t Microsoft sponsor them instead?

I used the event as an opportunity to showcase Windows as a great development platform for Android, by demoing an HP touchscreen computer set up as an Android development station running Eclipse (which at the time was the preferred Android IDE) and also showing the Windows Phone development environment, which looked a lot less confusing and more aesthetically pleasing than Eclipse (although that’s easy), and showing the C# language (similar to Java, so it seems familiar) and Windows Phone in the process.

Our unexpected presence there got us a lot of attention, and as with the CUSEC crowd, I got people who ordinarily wouldn’t give Microsoft any thought to take a closer look…and hey, if Google got shamed along the way, it’s only because I was quick-thinking enough to seize upon an opportunity.

Calming angry air travellers

The hours-long line at Toronto’s Pearson Airport, March 2011.

Air travel can be bad at the best of times, but when people from a several planes who’ve just debarked are stuck waiting in the hallway that leads to customs for hours, it’s downright terrible. That’s what happened in March 2011, as recounted in my blog entry, The Crazy Customs Line at YYZ.

The mood was getting ugly, and despite the fact that there was a bona fide rock star there…

…it was up to Yours Truly to lighten the mood…

…and not only did it help, but it made the news:

It’s not the only time that I’ve used the accordion to make delays a little more bearable, and memorable in the good way:

And now, I’m available to make my Tyrion Lannister-like powers to turn lemons into lemonade for your organization!

If you need someone with both technical and communications skills, who loves a challenge, can rally people, and knows how to turn disadvantages into advantages, you need me! Find out more:

{ 0 comments }

Here’s what’s happening in Tampa Bay and surrounding areas for developers, technologists, and tech entrepreneurs this week.

Monday, April 3

Tuesday, April 4

Wednesday, April 5

Thursday, April 6

Friday, April 7

Saturday, April 8:

Sunday, April 9:

{ 0 comments }

Tales from my job search: Let me be your voice

by Joey deVilla on March 31, 2017

Regular readers of this blog and my social media feeds will know that I’m currently looking for my next gig. This resulted in my magnum opus job application, which while filled with information, is a very long read. This is one of a series of posts highlights some of the bits you may have missed.

About ten years ago, people started asking me “Do you work in radio? Because you have a radio voice.

Rather than go on about my vocal qualities, I thought it would be best to let you decide for yourself. Here are some video presentations that I’ve done in my previous roles, where you can hear my dulcet tones…

IBM’s NICO

This 5-minute, 33-second video introduces IBM’s NICO service to the viewer. It explains how your network infrastructure could be costing your organization significantly more than it should, and how NICO can drive down your infrastructure and service costs, identify and fix system issues in your telecom system, and give you the tools and best practices to make the most of your network.

I was the “army of one” behind this video, which I produced when I was the Technology Evangelist at GSG, who are an IBM partner, and provide the software platform and assessment services that go into NICO. I wrote the script, did the narration, gathered or created its images, and produced it — all in the span of a couple of weeks.

Honeywell’s “Dark Mobile” webinar

This 13-minute, 12-second video is taken from the “Dark Mobile” webinar that I led for a division of Honeywell formerly known as Enterprise Mobile. “Dark Mobile” is a term that I coined the term during my time at GSG, and it refers to those parts of an enterprise’s mobile telecom environment that goes unobserved, unmanaged, and unknown.

In addition to coming up with the topic and title for the webinar, I wrote the script, hosted the webinar, and produced the video based on the recording and Honeywell’s slides.

GSG intro to MMS

This 8-minute, 19-second video was my first video for GSG. This one explains what MMS is — it’s short for managed mobility services or mobility managed services, depending on whom you ask. As with most of these videos, I’m the “army of one” behind it.

HTML5 and RIAs: Friends with benefits

When I was a Developer Evangelist at Microsoft, a fellow Microsoftie had a problem: he was buried in work and needed a video comparing HTML with rich internet applications (RIAs) such as Adobe Flash or Microsoft Silverlight. “Can you make one…by tomorrow evening?” he asked. “That’s when I have to show it to this group in Montreal.”

I got to work, and the result is this 5-minute, 46-second piece that summarizes the web world in the summer of 2010. I wrote, designed, narrated, and as the credits say, hastily produced this video, and my coworker was able to present it the following evening.

Shopify Fund

Here’s a 4-minute, 10-second video that I made during my time as a Developer Evangelist at Shopify. This one was aimed at developers, letting them know about the Shopify Fund, a $1 million fund to incentivize developers to build apps for the Shopify ecommerce platform. As with the other videos in this post, this was pretty much me, a microphone, and a laptop with Camtasia Studio and Audacity.

Why you should hire me

If your organization needs someone with a voice that your customers, partners, and investors will listen to, and has technical skills, you may be interested to know that I’m available and looking for work.

If you’d like to learn more, you can:

{ 0 comments }

Here’s another interesting tidbit from my Magnum Opus Job Application that you might have missed…

You are watching Silicon Valley, aren’t you?

If you’re a regular reader of my personal blog, The Adventures of Accordion Guy in the 21st Century (and hey, it’s possible, what with over 27 million pageviews since its inception in 2001), there’s a slim chance that you might remember my Secret Side Trip in the summer of 2012.

The Pebble smartwatches of that time (2012).

As I write this, almost five years have passed since the Secret Side Trip. In that time, I have never revealed where I went or what the purpose of that trip was. It can now be told: I was in the San Francisco Bay Area (which I call “The Other Bay Area” since I live in Tampa) to interview for evangelism positions at a couple of companies that I’m quite sure you’ve heard of. One of them was the smartwatch company Pebble.

The importance of networking and writing good cold emails

I was in the Philippines in June 2012, and it was generally known in my professional social circle that I was looking for new opportunities. I didn’t have international roaming (I was still living in Toronto at the time, and didn’t want to pay the exorbitant data roaming rates that my mobile provider, Rogers, wanted), but still had online access thanks to hotel wifi.

One evening — which would’ve been morning on this side of the globe — I received a couple of messages on friends via social media telling me that they’d seen an announcement that Pebble was looking for a developer evangelist, and that they thought the role was made just for me. I never saw the announcement, and without my network, I never would’ve known about the opening.

I quickly jumped on the opportunity and wrote them an email, text text of which I’ve copied and pasted below:


Date: Mon, Jun 18, 2012 at 3:11 PM
From: joey@joeydevilla.com

Subject: I want to be Pebble’s developer evangelist!

Dear Pebble people:

I’m Joey deVilla, and I’d like to throw my hat into the ring for the position of developer evangelist promoting Pebble. Yours is an exciting project in my favourite field — mobile development — and I’d love to be involved!

I have a dozen years’ experience working either as a developer evangelist or playing that role as a programmer. I’ve been blogging actively since 2001 on my personal blog, The Adventures of Accordion Guy in the 21st Century (http://joeydevilla.com/) and my technical blog, Global Nerdy (http://globalnerdy.com/), has been around since 2006 and got 1.5 million pageviews last year. I’ve organized developer events ranging from small gatherings at coffee shops to cross-country conferences for thousands of developers and IT pros and I’ve delivered presentations at these events.

Among the companies for which I’ve held the developer evangelist role are:

– OpenCola, Cory Doctorow’s startup, where among other things, we helped popularize the concept of “Whuffie” (a unit of social capital, defined here: ). OpenCola’s development offices were in Toronto, while Cory and I worked out of the evangelism office in San Francisco.

– Tucows, where the position was called “Technical Community Development Coordinator”, the longest title I have ever held (it’s one syllable shy of a haiku). I shortened it to “TC/DC””.

– Microsoft, where I was hired from the open source world to reach out to developers who might not ordinarily consider using Microsoft tools and technologies. I promoted ASP.NET MVC, Windows Azure and was on the Windows Phone “Champs” team. I also helped organize events like “Make Web Not War”, a conference on Microsoft/open source interoperability.

– Shopify, where I most recently worked. I oversaw the Shopify Fund, a $1 million pool of money being used to encourage developers to build apps on the Shopify API and was Shopify’s representative on the 2011 BarCamp Tour, a group of startups that sponsored and actively participated in BarCamps across the country.

I’m also known for bringing my accordion — I call it “social hardware” — to developer conferences and gatherings. I play rock and pop accordion, from Nine Inch Nails to Britney Spears, and I use it as a tool for breaking the ice, livening up technical presentations and adding a little fun weirdness to conferences (here’s a video of me performing at the evening keynote of RailsConf 2007: http://www.globalnerdy.com/2007/05/24/playing-accordion-at-the-railsconf-keynote-or-theyd-never-let-me-do-this-at-javaone/)

I’m currently based in Toronto, but I’d be willing to relocate for the opportunity to promote Pebble. I’ve lived and worked in the Bay Area before (during the Bubble, at OpenCola) under a TN-1 visa. I still have my U.S. Social Security card and also have a NEXUS card, which cuts the time I spend in U.S. Customs down to 10 seconds.

I believe that I would be the perfect evangelist for you, and would love to talk to you about the opportunity to evangelize Pebble to developers. I’ve enclosed my resume with this email (PDF, 110K). If you have any questions, I would be very happy to answer them.

My LinkedIn profile:
http://linkedin.com/in/joeydevilla

My resume:
http://www.globalnerdy.com/wordpress/wp-content/uploads/2012/06/Joey-deVilla-2012-Resume.pdf

My technical blog:
http://globalnerdy.com/

My personal blog:
http://joeydevilla.com

My Twitter account: (@AccordionGuy)
https://twitter.com/#!/AccordionGuy

A mere four hours later, I got this reply from Pebble’s founder and CEO, Eric Migicovsky:

Date: Mon, Jun 18, 2012 at 7:02 PM
From: Eric Migicovsky
Subject:  Re: I want to be Pebble’s developer evangelist!

Hey Joey,
Thanks for sending all the info. It would be really good to chat soon. I’m in UK right now for Leweb, but do you want to Skype on Wednesday morning EST?


The next day, we were chatting on Skype, with him in a hotel room in London, and me in the business center of my hotel in Manila (The Ascott in Makati, which I highly recommend), both of us dealing with the sound occasionally dropping out and trying to work out dates for meeting up for an in-depth interview in Palo Alto.

“First world problems are the best,” I remember saying.

Two days in the Valley

Pebble flew me from Tampa to San Francisco on their dime…

An actual photo taken on the first leg of my flight from Tampa to San Francisco.

…and put me up for two nights at this hotel…

An actual photo taken in the hotel lobby on the evening I arrived.

…so that I could do two days’ worth of interviews at Pebble HQ.

In the summer of 2012, Pebble HQ and Eric’s house were one and the same. This isn’t all that different from the office setting in the TV series Silicon Valley, with Erlich Bachman’s house functioning as Pied Piper HQ…

The living room in Erlich Bachman’s house / Pied Pier HQ in Silicon Valley.

…except that rather than being like this…

The exterior of Erlich Bachman’s house / Pied Pier HQ in Silicon Valley.

…it was more like a townhouse, closer to the center of town, only a couple of blocks from University Avenue and the CalTrain station…

Google Street View of a street near Eric’s place.

…but if you replace the early 1960s house design in the Silicon Valley promo photo below with 1990s townhouse design, Pebble’s living-room-turned-into-office setup wasn’t all that different from Pied Piper’s:

The workspace in Erlich Bachman’s house / Pied Pier HQ in Silicon Valley.

The interview

I took the photo above on the first day of the two-day interview. I was overdressed, by Silicon Valley techie standards, but I’m a grown-ass man, and if you’re over 30, in a white-collar line of work, and not in a tropical climate, you should wear a jacket to your job more often than not. I also figured that I’d also stand out against most of the other people dropping by Pebble for a job, who would show up in the stereotypical startup schlub uniform of hoodie, T-shirt, and jeans.

I spent a good amount of my time with Eric brainstorming ideas for Pebble. A lot of people feel uncomfortable when this sort of thing happens; they see this as a company’s way of milking them for ideas for free, especially when the interview doesn’t result in their getting hired. I don’t, for the following reasons:

  • The job for which I was applying requires generating ideas. I needed to prove to them that I could do that.
  • I’d rather turn all my dials up to 11 in an interview and go all out. I think that putting in a half-hearted effort in order to prevent them from taking my precious ideas and running with them without my getting anything in return would guarantee a half-assed interview performance.
  • There’s a world of difference between having an idea and turning that idea into reality. As Thomas Edison said, “Genius is one percent inspiration and ninety-nine percent perspiration.”
  • The bigger danger to me was them not hearing my ideas, not Pebble “stealing” my ideas. To quote Tim O’Reilly, “Obscurity is a far greater threat to authors and creative artists than piracy.”

I’m particularly pleased with one of my answers that came up during the brainstorming session. It was in response to this question from Eric: “How would you suggest dealing with the watch’s one-bit resolution?” The classic Pebble watch screens were effectively black-and-white: no color, and all their pixels had only an “on” state and an “off” state.

Windell Oksay throws the right-hand rule physics gang sign.
Taken from this article about Atkinson dithering.

I answered by saying that they should think of their screens as “retro”, embrace their one-bit-ness, and borrow as many graphic tricks from the original Macintosh as they could, such as using dithering to simulate grayscale colors, as shown in the picture above.

I also spent a few hours on their programming challenge, which was to come up with a simple app for Pebble’s predecessor, the inPulse smartwatch, which was designed to be a BlackBerry accessory. They set me up at a coffee table, pointed me to where I could download the inPulse SDK, and said “see what you can come up with.”

The exercise required using things I’d never used before (Oracle VirtualBox, the inPulse SDK) and things I hadn’t used in ages (gcc and C), but in an afternoon, I not only had a working inPulse dev environment, but a working “Magic 8-Ball” app running on the SDK’s simulator.

Outcomes and output

If you know me personally, or if you look at my LinkedIn profile, you’ll know that I didn’t get the job. I think the interview went well, and I continued corresponding with Pebble after the interview, sending them writing samples and other artifacts of my developer evangelism at previous companies, but as July turned into August and then September, no responses came. I believe they ended up going with someone else for the role.

In September 2012, when my friend Katherine Hague was still running her quick-and-easy e-commerce service, ShopLocket (which has since been acquired), I introduced her to Eric via email, thinking that it would be beneficial to both ShopLocket and Pebble, and perhaps might even get my conversation with Pebble going again. As far as I know, nothing came of it.

One bit of my output from my Pebble interview lives on today: my inPulse Magic 8-Ball tutorial, located in my GitHub account. It’s one of a very few inPulse programming tutorials still on the web today, and in my opinion, it’s the most through, best-written, and best-designed one out there. Give it a look, and marvel at my programming and writing prowess!

Why you should hire me

If your organization needs someone with technical skills who can also communicate with a wide range of audiences — even to kids, with the assistance of a puppet c0-host — you may be interested to know that I’m available and looking for work.

If you’re looking for someone with desktop, web, mobile, and IoT development skills who can also communicate to technical and non-technical audiences, or a marketer or evangelist who also has a technology background and can code, you should talk to me.

If you’d like to learn more, you can:

{ 2 comments }

The original version of my magnum opus job application, which was for a particular job at a particular company, failed in two respects:

  1. It failed to advance me to the next round of their candidate selection process. I got the “We get many quality applicants that we have to turn down, and you’re one of them — good luck in your future endeavors!” email on Friday. This sort of thing happens, and that’s why I posted a generalized version of the application on this blog. I didn’t want all the work I put into it to be for naught simply because it didn’t impress one prospective employer.
  2. It’s pretty big. There’s a lot of stuff in there because I’ve done a lot of stuff in my career, and it makes for a lot of reading.

There’s not much I can do about the first failure, but there is something I can do about the second. I’m going to highlight some of the items I featured in the magnum opus job application that may have been lost in its deluge of information, starting with this one…

Developer Jr., my short-lived children’s technology show

Back in 2010, when I was a Developer Evangelist at Microsoft, Kelly Bateman and Andy Walker approached me with hosting an web show jointly created by Microsoft Canada and the video tech tutorial site Butterscotch.com (a branch of Tucows). It was called Developer Jr., and it would show its young viewership — around the ages of 8 through 14 — how to make the most of everyday technology. Kelly managed to get funding for two episodes from her department, but we were both unable to find some group within Microsoft Canada that could cover the budget for more; nobody within that branch of the organization had a mandate to reach the show’s audience.

When preparing the show, we shot some test footage with a number of human co-hosts until someone suggested that we get puppeteer Brian Hogg to create a co-star just for the show. That’s how my co-host, Junior, was born.

Here’s the first episode, in which Junior and I walk the audience through building a simple game using the Windows/Xbox 360 game development system, Kodu. To this day, I still get emails from people who see the video and want to know more about Kodu:

In the second episode, Junior and I show our audience how to make their own movies, complete with closing credits, using Windows Movie Maker:

We also shot a couple of promo videos, such as this one where Junior and I are interviewed by Developer Jr.’s co-producer and director Matt Harris

…and this quick teaser promo with Junior and me:

Why you should hire me

If your organization needs someone with technical skills who can also communicate with a wide range of audiences — even to kids, with the assistance of a puppet c0-host — you may be interested to know that I’m available and looking for work.

If you’re looking for someone with desktop, web, mobile, and IoT development skills who can also communicate to technical and non-technical audiences, or a marketer or evangelist who also has a technology background and can code, you should talk to me.

If you’d like to learn more, you can:

{ 0 comments }


Regular readers of this blog or followers of my LinkedIn or Twitter accounts will know that I’m currently looking for a new job. I’ve been doing the requisite searching and networking, and have taken some less typical approaches such as publicizing my magnum opus job application (which was actually an application to a prospective employer, with information about that prospect sanitized out) and ramping up my activities at local events (such as the recent Makers Hustle Harder hackathon, and various local meetups).

In this article, I’m sharing a Python program that I wrote as my solution to a programming challenge issued to candidates for a developer marketer position. I didn’t land the job, but going through the challenge was still a worthwhile experience, and worth sharing here.

The position and the challenge

The position for which I was applying was that of Developer Marketing Manager at a company whose online service allows users to integrate or “glue” various web and other applications together to create new functionality, without programming, in a “when a certain event happens, perform this defined task in response” fashion. For example, you could use their service to tie together email and SMS so that you would be sent a text message whenever you received email from a specific email address. You’ve probably heard of this company.

They wanted someone who could wear both marketer and developer hats. To test the developer hat, part of the application required submitting a response to a programming challenge.

The challenge was to take a CSV file with the following contents…

…and write an application that does the following for each non-heading row:

  • Perform a Google search for the item in the first column
  • Write the link from the first result of that search into the second column

Once this has been done for all the rows, write the results into a new CSV file. For the example search terms, the resulting file should look like this:

They wanted it implemented in Python, which is the language they use to implement their main product. Although it’s been some time since I’ve done any Python coding — and even longer since I’ve written any Python code professionally, I was confident that my familiarity with its syntax and my knack for picking up programming languages I haven’t touched in ages (go to my GitHub account and see this repo, this repo, and this repo for examples) would serve me well.

Before you code: Determine what’s on their mind

Sigmund Freud, who turned reading things into what people do and say into an entire industry.

Before you even begin to think about how you’d tackle the programming problem given to you, think about the question that they’re trying to answer by giving you the assignment. That question will depend on where the company doing the hiring is on the spectrum:

  • On one end of the spectrum are organizations like Google, Microsoft, and Amazon, who are in the business of making software, and have whole departments, complete with dedicated people and well-defined processes, dedicated to finding and evaluating prospective employees. They’re often looking to fill a specialized role on a larger team, and the question they’re asking is “Is this person someone with the developer skills to fill a very specific, well-defined role to meet our very specific, well-defined set of needs?”
  • On the other end are businesses made up of a handful of people — or perhaps only one person — who have been given the task of finding a new programmer in addition to all their other day-to-day responsibilities. They’re often looking to find a techie who can wear many hats, and the question they’re asking is “Is this person someone with the developer skills to fill a number of related roles to meet our amorphous, general set of needs?”

You’ll need to determine where the people interviewing you are on this spectrum, and tailor your answer accordingly.

You should also think about the company’s “obsessions”, by which I mean the topics, issues, areas of expertise, and programming tools and technologies that are the driving forces behind their technology. Their obsessions will often dictate the sort of programming assignment that they give, and may even give you an idea of the sorts of problems they’re trying to solve and skills they’re looking for.

Here’s a short list of programming assignments I have been given in the course of job interviews and application processes. Note the connection between what a company does and the programming assignment it issues:

Company description Programming assignment description
A large company (about 50,000 employees worldwide) in the search engine business.

Build a class that stores an index of web pages by their urls, with methods for adding a web page and for returning only those web pages that contain a given search term. It would essentially be a very scaled-down version of their own application.

They didn’t care what programming language I used, although their preferred programming languages are C++, Java, JavaScript, Python, and a couple of programming languages they developed in-house.

A growing company (just under 1,500 employees) whose service lets you store and share files in the cloud, as well as synchronize those files in the cloud with your own local filesystems.

Build a program that would let you create a nested hierarchical store of key-value data and write methods to create, read, update, and delete from this store. It would essentially be a very scaled-down version of their own application.

The application was to be written in Python, as this was their preferred programming language, adn used extensively on both the server and desktop client sides.

A training company with dozens of instructors that was looking for people to teach Windows/.NET desktop development to beginner/intermediate developers.

Build an application that stores student information in a relational database. It should allow the user to create, read, update, and delete student information from the database. It would be the sort of application that graduates of their courses would need to learn how to write.

The application could be written in C# or Visual Basic, as these are preferred development languages for in-house line-of-business Windows desktop applications.

A consultancy of about 18 people that developed custom sites based on WordPress.

Build a plugin that would display the 5 most recent blog comments and links to them in the sidebar. They have to customize WordPress for their clients on a regular basis, and having a library of reusable plugins would help shorten the time it took to build custom sites.

The plugin was to be written in PHP, which is what WordPress is written in.

A three-person shop who needed a developer to help lighten the load.

FizzBuzz, that now-infamous programming exercise, which goes like this:

Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.

The guy who interviewed me had been burned by a couple of hires (and fires) who said that they could program, and interviewed well, but when it came time to actually code, they couldn’t. He was using it as a “can you program or not?” filter.

He didn’t care what programming language I used, so for maximum portability, I did it in JavaScript.

In the case of this programming challenge, the company was about 50 people in size at the time, and as I said earlier, their main product was a “if a certain thing happens, perform a certain action in response” kind of online service. Many techies are familiar with their service, but not they’re not yet a “household brand”. The question they were trying to answer with this challenge was “Can this person program, and can he explain it to other developers?”, so I wrote my response with that in mind.

Eat the frog

This expression comes from Mark Twain, who said “If the first thing you do in the morning is eat a live frog, you can go through the rest of the day knowing that the worst is behind you.”

It’s a suggestion to tackle the worst, most unpleasant task of the day at the start. In the case of this programming assignment, I’m using it to suggest that you tackle the part about which you know the least.

This assignment breaks down into three major parts:

  1. Reading the given CSV file
  2. Performing the Google search
  3. Writing a new CSV file

Reading and writing files is pretty straightforward stuff, but until this assignment, I’d never needed to perform a Google search programatically. I declared that programmatic Googling would be the frog. It was time to do some research.

Google used to provide an API for web search, but they announced its cancellation in 2010 and its last day of operation was September 29, 2014. These days, they offer the Custom Search API, which won’t work for the purposes of this application, as it’s limited to either:

  • Creating a search engine for a single site
  • Creating a search engine that focuses on a particular topic, but searches across a collection of websites

Without an API, doing Google searches programmatically involves sending GET requests to Google and “screen scraping” the results page. Programming screen scrapers is tedious, trial-and-error work. Luckily for me, someone’s already done the work, and the result is the google Python package.

The simplest way to install this package is to use pip, the Python package manager. With pip, installing the google package is as simple as entering this at the command line:

If for some reason you don’t have pip installed, you can go to the google Python package page, and download the tarred-and-gzipped package. At the time of this writing, its filename is google-1.9.3.tar.gz. Once you’ve downloaded it, you’ll have a new directory named google-1.9.3. From the command line, go into the directory and run setup.py using the following command:

The google package function that I was interested in was search, whose signature is:

The function returns a generator that yields found URLs. Here’s a quick run-down of the parameters:

  • query: The query string, which must not be url-encoded.
  • tld: The top level domain, for which the default value is com.
  • lang: The language for the results, for which the default value is en.
  • num: Number of results per page.
  • start: An integer specifying the first result to retrieve.
  • stop: An integer specifying the last result to retrieve. The default is None, which means the search goes on forever.
  • pause: Time (in seconds) to wait between HTTP requests. Setting this too high slows down the search greatly, but setting it too low will annoy Google and may cause them to block your IP.

I installed the package using pip, and then took search for a test drive by opening a Python REPL and entering:

I expected that this test function would return the URLs for the first ten Google results for the given search term. I entered this at the Python prompt…

…and got this:

It worked! Now it was time to code the function I actually needed: one that would return only the URL for the first Google result for the given search term:

Remember, search doesn’t return a list, but a generator, so I set it to stop after one result, store the result in the variable url, and then return the value in that variable. The break statement is there because Python syntax doesn’t allow for empty loops, and to guarantee that the loop is exited after its first iteration.

I tested out the new function by entering…

…and got this result:

The function works, but since it’s making an online request, it’s a good idea to put in some error handling. Since this is just a programming test assignment and not a production application, it doesn’t have to be a lot of error handling — just enough to make it clear to whoever’s evaluating your code that you’re mindful that this operation might fail.

Here’s what the function looks like with just enough error handing:

With the frog eaten, it was time to code the other parts of the program.

Reading search terms from the CSV file

I needed a method to read the CSV file, so I wrote this one. Given a filename for a two-column CSV file, it returns a list of two-element lists, each of which represents a row in the file:

The real work is done is the try block, where:

  • The file is read line by line.
  • Each line has any leading and trailing whitespace stripped from it, and then is converted into a list, with each element representing a column in our table.
  • The newly-created list is added to our list of rows.

Once again, to communicate that I can write code that can deal with Murphy’s Law, I wrote the method with just enough error handling for this sort of assignment. It deals with cases where the file with the given name doesn’t exists, as well as general file I/O errors that may crop up from time to time.

Getting search results for the file

I now had…

  • a method that reads the CSV file and returns a list of two-element lists (read_input_file), and
  • a method that given a search term, returns the URL for the first Google result (first_google_result_url).

I could now write this method, which would be used to take the results of read_input_file and feed them to first_google_result_url:

This method returns a list of two-element lists, where the first element contains a search term, and the second element contains the URL for the first Google result for that search term.

Writing the results to a file

I needed a method that would write the results of get_search_results to a CSV file. Here’s what I wrote:

It takes these two arguments:

  • A list of two-element lists, which should be the result of get_search_results, and
  • the name for the file to be created.

Just as with read_input_file, I added just enough error handling to show that yes, I can write code that deals with the real world.

Tying it all together

I had all the methods I needed, so it was time to write a main method to tie them all together. I wanted the program to be called this way…

…so I wrote it to accept two parameters when called…

…and once again, with just enough error handling.

With main defined, it was time to place this at the bottom of the file:

This is a Pythonism that states “If this file is being executed directly rather than being imported, run the main method.” It encourages developers to write code in such a way that defined functionality is separate from function, and it also encourages code reuse.

Here’s the complete file:

 

Are you looking for your next great hire?

I’m looking for my next great job! If you’re looking for someone with desktop, web, mobile, and IoT development skills who can also communicate to technical and non-technical audiences, or a marketer or evangelist who also has a technology background and can code, you should talk to me.

If you’d like to learn more, you can:

{ 5 comments }