Skip to content

Don’t forget to deactivate inactive items in easyrec

delete photo
Photo by Ervins Strauhmanis

I wrote before about easyrec, a recommendation system with an easy to integrate javascript API, but just recently realized that I was still showing inactive items as ‘recommended’.  This is because I was marking items inactive in my database, but not in my easyrec system.

Luckily, there’s an API call to mark items inactive.  You could of course manually login and mark them as inactive, but using the API and a bit of SQL lets me run this check for all the items.  Right now I’m just doing this manually, but will probably put it in a cron job to make sure all inactive items are marked so in easyrec.

Here’s the SQL (escaped so it doesn’t wrap):

select concat('wget "http://hostname/api/1.0/json/setitemactive?apikey=apikey&tenantid=tenantid&\
active=false&itemtype=ITEM&itemid=',id,'"; sleep 5;')
from itemtable where enabled = 0;

I have an item table that looks like this:

CREATE TABLE `itemtable` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
...
`enabled` tinyint(1) NOT NULL DEFAULT '1',
...

Where enabled is set to 0 for disabled items and 1 for enabled items. The id column is numeric and also happens to be the easyrec item id number, in a happy coincidence.

The end output is a series of wget and sleep commands that I can run in the shell. I added in the sleep commands because I’m on the demo host of easyrec and didn’t want to overwhelm their server with updates.

 

Mis en place

kitchen knife photo
Photo by Australian War Memorial collection

Professional chefs have a concept termed ‘mis en place’.  While I know very few professional chefs, the idea appeals to me.  It basically means ‘keep your workplace in order, before you start doing anything important’.  (Of course, you can read about ‘mis en place’ more on Wikipedia.)

I find that this is very true of software development as well.  If you don’t have your workplace in order, you will suffer.  Now, the definition of ‘workplace’ varies–someone building a webapp has a different work environment than someone building software that will run on ASIC chips.  I’ll speak to my workplace, but I challenge you to review your workplace and see what, if anything, is out of sorts.

I’m going to break this up into three different segments.  First is the physical, then organizational, then the coding environment.

First off, the physical workspace.  This includes your desk, your monitor and computer setup, your work environment (headphones, bull pen), and your view.  It also includes your body–how you are sitting, how often you move around.  My current physical workspace is a desk with perhaps a bit too much clutter on it, a desktop machine (I know! they still sell them, apparently.  And you can get a lot of machine for not much money), and a view outside.  My work environment, since I’m working from home, is alternately morgue like and circus like, depending on who comes down to the basement.

Then there’s the organizational component.  Since I’m now contracting, this is something I have less control over, but it is important to organize your working environment in terms of the organization as much as you can.  Are you working on the right things?  Are the right people on the team?  Are they spending the right amount of time on the project?  In business speak, is everything aligned?  If the answer is no, how can you fix this?

Finally, there’s the actual hands on coding environment.  This can include everything from having a continuous deployment environment to your shell aliases to your software stack to your IDE (if you lean that way).  This is what I originally thought this post was going to be about, because this aspect of the workplace is where the rubber meets the road, so to speak.

Problems with any of these can cause a project to fail.  So make sure your work environment as clean, ordered, and ready to go as possible before you start a new project, or if you are in the middle of one, take some time to clean things up as you go.  You’ll be happier and more productive.

The Tragedy of Mobile Development

unicorn photo
Photo by Origamiancy

The web, for all its warts, pushed a major advance in software construction.  The separation of concerns.  This is the idea that, just as you wouldn’t have the same person paint a house as lay the foundation, you should have different people design the user interface and the internal guts of software applications.  The skillsets are simply different.

Since modern web applications exist in the browser and are primarily CSS and HTML, with some amount of javascript, it is fairly easy to split up development between designers and developers.  Designers could focus on beautiful, functional user interfaces and developers could focus on making the application work.  HTML and CSS were the common interface, and they weren’t complicated (neither is a full featured programming language).

This separation is more difficult to maintain since the rise of the single page application, which pushes a lot of logic and functionality into the browser with javascript, but is still possible.

But, the mobile device, with its native apps, is a huge step backwards.  Sure, there’s still plenty of scope for people who just want to make things work–APIs and server side logic are a large part of most mobile services.

But for the client side, it’s not enough for designers and UX folks to be fluent in the traditional tools.  They can still do mockups, but the UI for mobile devices is constructed in code (objective C or android java, primarily).  That means that the finer points of UI must be added by developers.  No longer can they be delivered by HTML and CSS.

And hence, the rise of the proverbial unicorn, who can do mobile development, design and UX.  And makes very good money, since there are very few of these.

Is this sour grapes?  Nope.  I know that one of my limitations is my aesthetic sense.  (If I harbored any illusions about this, my wife would be quick to disabuse me.)  And I think that the unicorns should ride this market for all it is worth.  It just frustrates me that we came so far with web applications and separate of concerns and now are taking a huge step back.

GuideStar, or Find the Form 990

nonprofit photo
Photo by jurvetson

Tis the season!  You may not give as much as Bill Gates (in fact, I bet you don’t).  But, if you give money to any non profits, you should be aware that the IRS requires every 501(c)(3) organization to file a form 990. (This post is not going to be useful to my readers in other countries, but I’d be interested to know if there are analogous services elsewhere.)

That form 990 is required to be publicly available. You can request a copy as well.

But, you may be in the middle of making a donation, or you may not want to contact the organization to request a 990. GuideStar is a non-profit information aggregator, and they have 990’s for most organizations. You do have to create a free account, but that’s it. If you pay for a premium account, you have access to more years of 990s, but I’ve found that for the casual inquiry, what the free account provides is enough.

There is all kinds of interesting information in the 990. Here’s the 2013 990 for the New York City Ballet. In it, we can see that this organization:

  • has 66M of revenue and expenses
  • has millions of dollars of investment income
  • paid 3.4M in advertising
  • paid 20k for meetings
  • has a large number of directors who all work for free
  • pays the ‘ballet master in chief’ 800k in salary

And plenty of other interesting information.

If you are thinking of giving to an organization, you can learn a lot about it from the form 990’s it files.

RSS Pick: Clay Shirky

Clay Shirky only posts once every few months, but when he does, he posts excellent long form articles about the intersection of the internet, journalism and society. Like Dion, he has also posted to Medium.

One of my favorites:

The most important fight in journalism today isn’t between short vs. long-form publications, or fast vs. thorough newsrooms, or even incumbents vs. start-ups.

If you are into big thinking about how the internet is going to change how information is controlled, distributed and charged for, Clay is your guy.

Follow people on Hacker News, get new posts in your inbox

Ever since Jeff Beard introduced me to Hacker News, it’s been one of my favorite sites.  You can check out my profile here.

Justin Jackson pointed me to a useful tool which lets you follow activity on HackerNews: HNWatcher. This lets you set up searches for various terms, users or other interesting topics on Hacker News, and emails you the results regularly.

Right now, I simply follow a few users that say interesting things, but I could see it being as useful as google alerts for staying on top of certain topics.

If you’re an avid Hacker Newser, or are interested in what this demographic (startups, hackers, overindexed on Silicon Valley, overwhelmingly young and male) has to say, sign up for HNWatcher today.

Helping a friend gather data and reach prospects with gentle intros

coffee photo
Photo by My Aching Head

I had coffee with a friend the other day, and he shared a business idea. I thought it was an awesome idea–I certainly saw the need in the marketplace and believed he had the skillset and resources to execute on the idea.

He’s still in the exploratory phase, so I offered to send gentle intros to people in my network who I thought would benefit from his idea. (The target market is anyone with a custom web application that makes money, or anyone who builds custom web applications and is looking for a way to provide ongoing support–if that is you, contact me if you would like to learn more.)  I asked him to write a small spiel that he’d feel comfortable with me sharing.  If you are thinking of doing this, make your friend write a spiel for you.  If they can’t write a spiel, chances are they won’t be good at follow up and your intros will be wasted.

Then, I went through my LinkedIn network and put contacts into categories:

  1. this person (or the company for which they work) might want to partner with my friend
  2. this person (or the company for which they work) is a possible client for my friend’s offering
  3. this person might know people who are in categories 1 or 2.
  4. this person (or the company for which they work) is not a good fit for what my friend is working on
  5. who is this person?

And then I sent soft pitch emails to almost everyone in categories 1, 2 and 3.  The content varied based on which category someone was in, but for category 1, the email was something like:

I have a friend who owns a hosting company who is looking to talk to consulting companies about a possible new product he is thinking about offering.  Here is his spiel:

 

[…spiel from friend …]

 

I wasn’t sure if this kind of software maintenance was something that your company wanted to keep inhouse, or if you would be interested in discussing this with him.  I wanted to check before I did intros.    Is this something you think is worth learning more about?

This way, my friends and contacts on LinkedIn don’t get spammed from someone they don’t know.  Instead, they get an informative email from me, asking if they want to learn more.  If they do (and about 10% did), I do mutual introductions, and then the ball is in their court.  (Side note: here’s a great intro email etiquette guide.)

Why did I do this?  Well, there were a couple of reasons.

First and foremost, because I thought it would be a win win for both sides.  My friend gets more data about his offering and how the market will react to it.  My contacts/friends on LinkedIn learn about a new product from a trusted source.

Second, I was able to do some social network housecleaning.  I was able to ‘unlink’ with all people in category #5–it’s always nice to clean up your social graph.

Third, I reached out to people and had some interesting conversations.  Some folks I hadn’t talked to in years.  It’s good to reach out to people, and always better to do so with something of use to them, rather than a plea for work.

This was a fair bit of effort (a couple of hours).  I can’t imagine doing this monthly, but once a quarter seems reasonable, especially if I’m reaching out to a different segment of my network each time.  And I don’t have to do the whole process every time–spiel, linkedin, soft pitch, intro.  I actually like scanning news sites and simply sending interesting articles to old contacts: “Thought you might be interested in this <link> because of XXX and YYY”.  Those are super simple to send, and again, provide value and raise your profile.

Next time you talk to a friend who has a great idea, who can execute on it, and who will follow up with anybody you introduce them to, consider reviewing your social graph for prospects.  Gentle intros can benefit all three of you.