John Campbell

Success and Occupational Hazards of Software Engineering

Tech: LINQ Provider for Indeed and SimplyHired.

I love LINQ — .NET’s Language-Integrated Query that allows you to query and update data in languages such as C# or VB.NET.  You can query databases with LINQ, iterate collections and filter or transform objects.  At my beloved employer we do a lot with LINQ and it’s easy to get use to it.

We also do a lot with job postings from jobs boards (such as Indeed or Simply Hired) and I thought it would be great to have a LINQ provider that would allow you to search jobs using LINQ. I imagined something like…

from job in JobsProvider
where job.Company == "Apple"
&& job.Title.Contains("Genius")
select job;

Using this walkthrough as my guide I collaborated with @yoenhofen and we rolled our own LINQ provider that would query the Indeed and Simple Hired api. It worked out well and soon we were using LINQ in a web project to display a list of jobs.

But almost out of the gate we had a requirement to do a keyword search against jobs. But keyword searching doesn’t map to LINQ well and I wondered what a keyword search in LINQ would look like. A number of discussions around LINQ providers to search engines such as solr, lucence, elastic search, etc. seem to converge at the conclusion that LINQ isn’t a good fit for that type of searching.

But I pressed on and came up this:

from job in JobsProvider
where job.Company == "Apple"
&& job.Keyword.Contains("iOS")
select job;

My brilliant idea of a LINQ provider to job search turned out to be not so great. But the insight into the some LINQ nitty-gritty was well worth the effort and I hope to find another good reason to play around with an LINQ provider in the future.

Double-Dose of (Economic) Depression

If Planet Money’s podcast on nonpartisan economic no-brainers that will never see the light of day didn’t depress you enough check out the podcast where they have political consultants give their thoughts on how to make those policies sexy. It’s a lesson is spin doctoring and political persuasion that illustrates voting is an emotional enterprise.

First Look: PatzerMob

PatzerMob Co-op Chess

Here’s how PatzerMob–a co-op chess game–works:

–You join the game and are assigned to either the white or black team.
–Each player on the team has 20 seconds to vote on what should be the next move. (You vote by simply moving a piece.)
–The votes are counted at the end of the turn and the move with the highest number of votes is made.

It has a long way to go before it’s “finished” but it is playable. Check out the code here. (Warning–there be dragons.) Suggestions graciously accepted.

And if you’re wondering patzer is chess slang for a poor player.

Time vs Productivity

Early in the movie ‘Moneyball’, Peter Brand (played by Jonah Hill) explains to Billy Beane (played by Brad Pitt) the epidemic failure in baseball thinking…

Okay, people who run ball clubs, they think in terms of buying players. Your goal shouldn’t be to buy players. Your goal should be to buy wins and in order to buy wins, you need to buy runs.

Most employers think when they hire an employee the are buying time. Be in the office at 8:30 and leave a 5:00. That’s medieval thinking. (Or at least industrial revolution thinking.) You shouldn’t buy time, you should buy productity. The time you buy from an employee in and of itself isn’t worth anything. It’s productivity you want.

Measuring time is a poor proxy for measuring productity.

Thin Business Models Everywhere

Here’s a good discussion on Hacker News about hotels that inject content into web pages as their customers surf the web.

The root cause of this bad behavior is the thin margins that hotels must operate in today’s Priceline and price-pressured environment. The New York Times detailed the increased pressure that consumers, armed with their mobile devices in hand, are putting on retailers.

How will businesses survive? It won’t be by suppressing technology. Embracing technology, innovation and customer insights is the recipe for success.

Number One Reason to Optimize your App? SXSW Launch

In this nice recap of SXSW Dino Talic mentions the problem of trying out app during SXSW.

it’s impossible to get a good data connection in downtown Austin with 250,000 geeks vying for valuable data packets. With GPRS speeds on your iPhone, it’s difficult to download the app let alone get an optimal user experience.

Could this be a reason to optimize performance of your app? If you have any intention on trying to make a sizable splash, it might be a good idea.

OMGPop Dust-Up

Internet dust-ups are my guilty pleasures. Here’s a recent one:

Shay Pierce writes about turning a Zynga employment offer down after Zynga purchased his employer OMGPop–maker of Draw Something.

CEO of OMGPop calls Shay out as being a weak employee.

SFGate tries to figure it all out.

And as an aside bonus, an amazing video of the OMGPop offices.

On the subject of bots and bad browsers…

I’ve seen this pattern a couple places in controllers where looking for optional information:

int id;
string idString = [via a param or getting it from the url query string]

if (!int.TryParse(idString, out id)) {
    // idString is a valid id
} else {
    // id string is missing

Two states (the id is there or it is not) so we’re all good? Or are we…

Url: /MyController.aspx/mymethod?id=24922%20ForceRecrawl:%200
HTTP_USER_AGENT : Mozilla/5.0 (compatible; bingbot/2.0; +

Sometimes bots or bad mobile browsers (I’m looking at you blackberry) will add junk to the url. Just checking the to see if the id parses isn’t enough to know the state—there are three states here: the id is there and is valid or invalid or the id is missing. The code required probably needs to look more like…

If ( !string.IsNullOrEmpty(idString) ) {
    if (!int.TryParse(idString, out id)) {
        // idString is a valid id
    } else {
        // id string contains an invalid id
} else {
    // id string is missing

Innovation vs Invention, Gladwell vs Parc

Parc's Alto Computer

Most of us know the story: Steve Jobs got a look at what was going on at Xerox Parc and took those ideas to create the Macintosh. Suprisingly Malcolm Gladwell’s article (abstract-only) on innovation contained a couple new facts (at least to me). For example, I didn’t know that Jobs paid for access to Parc (in the form of Apple stock) and that it was Apple that made the mouse affordable. (Parc’s mouse cost $300, Jobs needed one that cost $15.)

Galdwell uses the Apple/Parc story as a jumping off point to discuss the difference between invention (the creation of an idea) and innovation (the application of the idea that changes things). Yep, Parc created the mouse (invention) but Apple used the mouse to bring computers to the masses (innovation).

Gladwell’s article caught the attention of Parc (they still exist?) and Parc responded (or as other say, fired back). But the Gladwell article and Parc’s response are merely complementary. Gladwell sets up the problem (how can inventors move past the idea phase) and Parc responds with a solution (open innovation).

More and more I’m starting to think that using open innovation is the key if your battlefield is mature or crowded. Fighting over each percentage of the market is hard–using inventions for innovation, that’s where the easy money might be.

Step One: Brand with Ascetics

Branding, personal brands, brand spanking and so on. You’ve probably had it up to your ears with branding branding branding.

Most people associate indelible marks most closely with branding–logos and colors associated with the product. But as Apple has proven, branding also includes other factors, such as a great user experience or a great design.

When your main avenue of brand creation is a web property, first and foremost your brand should start with ascetics. Make the site look great, make it look modern, make it look clean. Focus on the main interaction and remove anything that doesn’t contribute to core goal.

This past week Amazon lauched–Amazon’s high fashion daily deal. I love the simplicity of the site, super clean and focused on viewing the products and making the purchase. I haven’t made a purchase but I’ve visited the site each day–anyone who understands the attention economy knows the importance of that.

Thinking of launching a web site–start with ascetics. No one ever complained that a site was just too beautiful.