Archive | Uncategorized RSS for this section

Using a foot pedal for ctrl and alt modifiers on Ubuntu

I’m a big fan of my DataHand (or one of these) but overtime I’ve found the Ctrl and Alt modifiers a bit uncomfortable.

One of my favorite hotkeys is to use the ctrl key with left or right to move between words but that has me regularly holding down the key.

The solution I’ve found is to use a USB foot pedal, here are the steps to set it up on Ubuntu.

First use evtest to determine the /dev/input/event number and the button codes

/dev/input/event16: OLYMPUS CORPORATION HID FootSwitch RS Series
Select the device event number [0-16]:
Event: time 1456855230.136267, -------------- SYN_REPORT ------------
Event: time 1456855230.528267, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90011
Event: time 1456855230.528267, type 1 (EV_KEY), code 272 (BTN_LEFT), value 0
Event: time 1456855230.528267, -------------- SYN_REPORT ------------
Event: time 1456855230.872269, type 4 (EV_MSC), code 4 (MSC_SCAN), value 90012
Event: time 1456855230.872269, type 1 (EV_KEY), code 273 (BTN_RIGHT), value 1

Then use evrouter to map the buttons by creating a file called ~/.evrouterrc with the following contents (you’d likely need to update the values).

"" "" any key/272 "XKey/Control_L"
"" "" any key/273 "XKey/Alt_L"

And then run evrouter

evrouter /dev/input/event16

Sites to help predict future trends

One of the challenges working as a programmer is keeping up with new technologies. Although many appear promising if you decide to spend the time to learn something new it needs to pay off in the long run.

There are two sites I primarily use to help decide, I consider both to be good leading indicators of the future success of a language/framework/library/etc.

All technologies will eventually go out of date, the challenge is picking ones that will hang around for a while.

Food For Thought

This post may seem a bit out of place on the blog and I guess that’s because it is. In a nutshell: I got sick, I learned how to eat and I got better. These are my current thoughts on food and nutrition. We’re all different, as always do what’s best for your snowflake of a body.

There’s always talk of low carb or high protein or zero fat or … but they’re missing the point. It’s not one versus the other it’s which of each.

We’ll start with fats. Coconut oil for high heat cooking and olive oil for low heat cooking. We’re starting to accept the myth that saturated fats are bad was just wrong. They’re stable and hold up well to high heat, if your oil is smoking throw it out.

As a questionable runner up I’ll mention Canola oil. It’s low in Omega-6 fats but it’s heavily processed. You get olive oil by squeezing the olives, the process for canola oil is a bit more complicated.

For protein, meat’s important but most of us eat too much of it. Organic makes a lot more sense here as you’re higher up the food chain but it can get expensive.

We’ve been ingrained with the belief that processed foods are bad, but the positive approach is to aim for high nutritional density. Kale gets it’s great reputation because it’s at the top when compared this way.

Eggs got a bad wrap, they truly are a super food. Most of the cholesterol in our blood is made by our body. A far more important indicator is the ratio between the types and densities of cholesterol.

I can always judge how well I’m eating when I’m standing at the checkout lane at the supermarket. The basic idea with shopping is to mostly buy from the perimeter of the store.

What we don’t see when we buy our food is all of the bugs in it. We’ve become a germ phobic society but only 10 percent of the cells in the body are human. I like the quote that antibiotics were the science of the 20th century while probiotics will be the science of the 21st century.

It’s good to eat your vegetables with meals raw, cooked and fermented. Raw sauerkraut and pickles are a great source of natural probiotics.

With fiber it’s important to note the difference between soluble and insoluble fiber, the former slowing you down while the latter speeds you up. Psyllium seed powder is a great natural form of soluble fiber.

Two common food triggers to watch out for are gluten and dairy. The best way to check for a sensitivity is to eliminate it for 30 days and then add it back for a few days in a row.

The trouble with gluten is more accurately an issue with Zonulin (sounds like a bad guy from a Superman comic) which can loosen the gut lining.

Most people can digest dairy when younger but many lose the ability as they get older. It’s akin to losing our hearing as we get older but digestive health and genetics plays a role.

Bone broth soup is one of the single best foods you can eat. Some frozen veg (brocoli, colifower, carrots, etc) boiled in broth and then pureed with a hand mixer makes a great soup. Maybe add a bit of coconut milk and some salt & pepper.

The future of web development is Laravel

PHP is an old friend, going back close to 15 years. It was the first language I used. Back then it was the obvious choice for web development if you were running Linux/Apache, it was free and it was popular.

Over the years other languages/frameworks have appeared which have definitely captured the “cool” factor. The two obvious ones are Ruby on Rails and Python/Django. It’s possible to argue that Ruby and Python are more aesthetically pleasing languages to code in but their real draws are the MVC implementations of Rails and Django.

From a business stand point PHP makes a lot of sense. The more recent versions are dramatically improved and it’s incredibly well supported. There are far more PHP developers which helps keep costs down and it scales. If it’s good enough for Facebook chances are it’s good enough for you.

The challenge has always been finding the right MVC framework. Laravel solves this problem. It provides a best-in-class MVC implementation for PHP.

Reading the tea leaves it’s clear that I’m not the only one who feels this way. This is from Google Trends and It feels good to be excited about PHP again.

As a side note, using puPHPet, Vagrant and VirtualBox to create virtual machines to play with Laravel makes me feel like a programming super hero with the power to create worlds.

A programmer’s attempt at marketing

I’ve always believed that if you create an amazing app people will find you. While I still think that’s true, what if you simply don’t have the time, resources or ground breaking idea to create an amazing app. If you’re just experimenting with a new framework you might be limited to creating just ok apps. Apps which may offer a novel experience but don’t have the same level of polish as apps by big name publishers.

This is where I found myself a few months ago. I’d like to share with you my successes and failures thus far. If you have suggestions for things to try in the future please post your suggestions in the comments below.

First a brief explanation of the app. It’s called Music Maker Pro and is available for 99 cents in the Apple App Store. It enables you to easily create music by tapping a few boxes. In an effort to increase awareness of the app I created a free browser-based version which you can try at

On to the traffic… the graph shows the number of new users per day over the past three months to both the free and paid versions. It can be roughly divided into four sections.


  • Paid advertising (blue) To get started I used a combination of AdMob and Facebook ads. While paying money definitely got me traffic the conversion rates were way too low for this approach to be profitable.
  • One big tweet (red) My next tactic was to try to get well-known people to spread the word. Scott Hanselman was kind enough (thanks again Scott!) to share the link on Twitter and Google+, the results speak for themselves.

  • Letting time do it’s thing (yellow) Here again the results speak for themselves. Doing nothing achieves nothing. I may have posted to the app’s Facebook group or sent some random emails but I clearly didn’t do anything to move the dial much.
  • The Chrome Web Store (green) I wasn’t expecting much but this has turned out be my best move to date. The app is now available here and so far has generated decent growth in traffic.

As I opened with, I think a key determinant of the stats is the app itself. While mine isn’t total crap it probably won’t win any design awards either. The competition in the app market is pretty intense. With the advent of in-app purchases, publishers can spend millions of dollars developing apps which they release for free.

Any time I read a random article on a developer’s download stats I’m always hoping to get a dollar amount. On average I sell about one or two apps a day. While it’s not a lot it pays for the server costs and definitely beats my last two mobile apps for which I’m still in the red :/

Secure password primer

More and more these days I’m getting “I was hacked… ignore my emails” emails from friends and family (I won’t get into the inherent paradox which exists here). I thought it might be helpful to write a short post explaining the rules to follow to help prevent this from happening.

  • It can’t be too simple
  • It needs to be unique

There are two main ways by which evildoers get your password: they try to guess it or they steal it. Choosing a complex password makes it far more difficult for your password to be guessed. Here’s a good site with instructions on choosing a password as well as a great xkcd comic on the subject.

The problem we’re now faced with is making sure it’s unique. Although you can probably trust Amazon to securely store your password the same may not be true of some other random site you use. If they get hacked (and they didn’t store your password encrypted) bad guys now have your email address and password and will try it on other sites. A good password is harder to remember than “1234” so it’s clearly a challenge to remember a unique password for every site you use.

Here are two ways around this problem: You can use a tool which will store your password for you such as lastpass. Although they offer browser plugins to make entering your password easier you should keep in mind that this can be inconvenient when using a friend’s computer or Safari on your iPhone. The other option (which is especially useful for sites you rarely check) is to use a random string of characters and simply use the “forgot my password” feature when you need to log into the site.

First post… hello world

Is this thing on…

So I finally did it, I started a blog. I guess this is just my way of trying to give something back. I’ve gotten very excited about Flex over the past year and I can’t tell you how many times a blog post has saved my ass.

The plan is simple, as I discover new things about Flex (which aren’t posted on a million other blogs) I’ll post it here.

Hope this blog helps you at some point…



%d bloggers like this: