On Secretly Terrible Engineers

http://techcrunch.com/2015/03/08/on-secretly-terrible-engineers/

Great article on the not-very-friendly way software development companies hire engineers.

The entire article is worth your time, my favourite part:

No one ever said, “Here is how we are going to bring your skills to the next level and ensure you will be quickly productive on our team.” The only answer I ever got was, “We expect every employee to be ready on day one.” What a scary proposition! Even McDonalds doesn’t expect its burger flippers to be ready from day one.

Also made me think about how companies that aim for excellence always keep training their employees even when they fear they may leave:

It may be the shortage of software developers worldwide or, like the article says, a “complete paranoia” that drives companies to ask the most convoluted questions to weed out the b-types and aim only to hire the best.

Independently, the attitude should be to hire competent people, and 30 minutes in front of a whiteboard with sweaty hands should not override years of experience.


Via my friend (and awesome software engineer) @jose_zap .

CEO-CFO conversation via @mikegstowe



Debugging Chrome for iOS

Recently I had a weird rendering problem that only happened on Chrome for iOS and needed access to developer tools (debugger, DOM inspector, etc).

I knew about Safari for Mac allowing you to debug via USB and I had read that this also worked with any app that used any UIWebView .

But for some reason it didn’t work for Chrome. So I kept looking and found weinre :

weinre is a debugger for web pages, like FireBug (for FireFox) and Web Inspector (for WebKit-based browsers), except it’s designed to work remotely, and in particular, to allow you debug web pages on a mobile device such as a phone.

The basic steps to get it working:

  1. Install it via node package manager:

    sudo npm -g install weinre

  2. Run it on the console:

    weinre --boundHost <IP ADDRESS OF THE WEB SERVER>

  3. Link the website you want to debug to weinre by adding this to the page

    <script src="http://<IP ADDRESS OF THE WEB SERVER>:8080/target/target-script-min.js"></script>

  4. Load weinre’s remote debugger on your browser at

    http://<IP ADDRESS OF THE WEB SERVER>:8080/client/

  5. Reload your website.

I used<IP ADDRESS OF THE WEB SERVER> everywhere, in my case it was the local IP of my development machine.

weinre worked nicely for me, and fast too. Can’t complain.

Now about the name:

weinre is WEb INspector REmote. Pronounced like the word “winery”. Or maybe like the word “weiner”. Who knows, really.

Yeah… naming things is hard.

The as! Operator

https://developer.apple.com/swift/blog/?id=23

Some changes in swift 1.2 for how conversions happen, the very golden rule is left at the end:

It may be easiest to remember the pattern for these operators in Swift as: ! implies “this might trap,” while ? indicates “this might be nil.”

These! and? can be confusing, specially coming from Objective C where sending a message to nil didn’t error out.

Are programming languages like jokes? If you have to explain them then…


Swift 1.2 and Xcode 6.3 beta

https://developer.apple.com/swift/blog/?id=22

I’ve been working on Shopper for a while and I’m mostly using Swift.

Development has been good, slower than it would be if I was using Objective C but I decided that didn’t matter.

These updates to the Swift language look nice and as I read them I wanted to update my code to use it. Apple makes it sound super simple:

To begin the migration, click the Edit menu, then choose Convert > To Swift 1.2…

Those ellipsis at the end make it a bit ominous. My position will probably be to test this migration to see what the impact would be and how much work it will generate and then revert the changes and keep working on the current version until 1.2 is on a stable build of Xcode that allows you to submit to the app store.



4+1 problems with the new Calgary CITYonline (online store)

I’ve been buying my Calgary public transit passes via the online store and recently they launched a new version called CITYonline. It looks ok, and it’s definitely a step up from the previous version. But in the 10 minutes that took me to register and buy next month’s pass I found some glaring usability and security problems .

First: you broke my browser

Disabling copy and paste is the new “right click is disabled” (so, 1997).

Dear Calgary: people use copy and paste, they like it and rely on it. When the iPhone didn’t have copy and paste people complained.

So, why do you disable it?

If you are worried that your database will get filled with incorrect emails because of typos then check the SMTP response headers. Or just accept errors as a part of life, but don’t make your lives easier by dumping shit on your users.

Second: so many options

On any listing of products, Calgary chose to use a select input element (marked with the red arrows).

Select elements (combo boxes in corporate parlance) are meant to give the usersmore than one option to choose from.

Each of those select elements have only one option. There’s nothing to choose!

This is a small problem and can be solved easily, but still shows that the people who made the site didn’t know what they were doing.

Third: I say “Yes”, but I may mean “No”

When you create your account and confirm your email (more on that on the next problem) you are required to select a password, and a helpful message tells you that you have to use_at least_ 7 characters.

Then, I tried to use 44 using 1Password and noticed that it looked shorter than 44 characters.

We’ll it turns out they tell you to use at least 7 characters, but don’t tell you that you have a maximum of 20 available.

That’s a very bad usability problem, it’s like saying to your kid “yeah, go out and party all night and come whenever” and “forgetting” to tell them that you won’t open the door when they arrive at 3 in the morning =).

BTW: they do the same thing with emails, limiting them to 50 characters. The maximum length of an email address is actually 254 characters .

Fourth: here are the keys to my kingdom

Registering is a two step process in CITYonline:

  1. You write your name and email (no copy/pasting!)
  2. You receive a temporary password to your email.

When you go and login with said temporary password, it forces you to set a new password. Very safe.

And then they send you FRIGGIN’ PASSWORD TO YOUR EMAIL!!!

Never, ever send a password to the user’s email EVER!

  1. Email is not a secure enclosure.
  2. It potentially means that the City of calgary is storing the passwords in a readable way.

Good thing CITYonline doesn’t store your credit card information (or does it?).

Fouth plus one: the emails suck

This one is just a pet peeve.

The email I received from CITYonline has header image of 1029 pixels wide, this wreaks havoc with many email clients as you are forced to scroll back and forth to read the whole thing.

Just use an email template from the pro’s .


Shopper.app week 2

I’ll just say it: I barely worked on the app this week. I’ve been feeling ill and most of my evenings were spent either watching TV or studying for the citizenship test (I’m writing this as I wait for the test to begin).

Week 2: map/reduce in Swift

I did work on it a bit. Mostly reading and trying to figure out the syntax for closures in Swift to do map/reduce.

There are many different ways to write an Array.reduce; I like the succinct syntax of Swift but I think it allows succinctness to be taken to an extreme. For example doing a reduce to add up all elements can be this:

myArray.reduce(0, {$0 + $1})

That’s something you’ll need to re-understand every time you read it mostly because of those$ signs[1]. It also feels dirty coming from ObjectiveC where everything had names. Long names. I liked that.

You can also give names to$0 and$1 which is nicer:

myArray.reduce(0, {x,y in x + y;})

I also like that because operators in Swift are just functions you can pass it like this:myArray.reduce(0,+).

So, there are many levels of succinctness depending on the amount of hair you want to lose when it’s time to read the code again after some time.

Personally, I like the last one for one-liners but for more complex transformations I’m gonna go with this syntax:

myArray.reduce(0) { x,y in
    return x + y;
}

I’ve also used named functions instead of closures just to keep code readable.

myArray.reduce(0, addUpElements);

All this was explained with more details by Silviu Pop on this article: Higher Order Functions: Map, Filter, Reduce and more – Part 1 .


Back to work

I’m behind schedule by a week and need to catch up. I’ll be alone at home next week while Mary goes to The Grace Hopper conference so I’ll probably will get more time into this. Hopefully. Unless Netflix wins again[2].

Most of the work is run as automated unit tests which is good because it has allowed me to quickly prototype and change the way I structure and massage the data.

Week 3?

Today (Oct 7) is already the middle of the week 3 so things are still piling up. Week 3 is about starting to do some UI work for basic things like shopping list creation and going shopping with it to start looking at real life data point (event if just for one user: me). I’m planning to go shopping today so that’s probably not gonna happen.

I’m sad and I’m hitting publish now.


  1. I come from a PHP background so$ in my code shouldn’t bother me but it does. Nowadays I prefer the$ in my pocket.

  2. I’ve been watching Bones, The Walking Dead and How I met your mother. I still have Dexter (no spoilers please).


I'm building a new app

When Apple showed us the Apple watch I decided I wanted to build an app for two reasons:

  1. I want to make something for it and see how it fares in an environment not as overcrowded as the iPhone App Store.

    I don’t think the Apple Watch will produce the same gold rush era like the one the iPhone produced. Or at least it won’t be as long. That’s why I want ot try to get an app in before it gets overcrowded.

  2. I want one.

    I’ve been considering getting a Fitbit for a while to track steps and see if I can get myself to walk and exercise more. But with the recall of the Fitbit force I put a hold on the purchase and waited to see what Apple did.

The app I’m building is not a new concept, especially not in the App Store: a shopping list app. But the idea I have on how to integrate it into the Apple Watch may be innovative and if I have it ready for launch day I’m sure it will be interesting.

Exactly the day I started working, Justin Jackson posted this tweet . It was very good timing!

The cold months are coming:

So that leaves three months. If you want to build your side-project, this is your window.

Here are a few steps you can take:

  1. It’s September 20th today, that means launch day would be December 20th. Envision what you’d like to launch on that day.

  2. Now open up your calendar. Work backwards from December 20th and schedule all the times you’ll work on your project. It’s best if you can make it regular weekly times: ie. Saturday mornings from 6am-10am, and Friday nights from 8pm-11pm.

  3. Create a landing page. Put only 4 things on it: a headline (that says who this is for, and what their pain is), a sub-headline (describing what you’re offering), an email sign-up box (for folks to get updates), and a launch date (December 20th!).

I’ve done the calendar part and and have split the work over the three months and I plan to publish a post a week describing some of the things I’m learning and doing. Which brings me to the next point…

I haven’t done the landing page yet and to be frank it intimidates me to do that. Maybe I will create it just for the sake of having a reference for people reading this posts documenting my progress.

For now, I’m sorry if the following is too vague.

Week 1

Week 1 was all about two things:

  1. Setting up the data model for creating lists, registering products and then marking products as picked in the store. I used Marco Arment’s FCModel which made things super simple. A lot easier than Core Data.
  2. Analyzing that data to estimate which products you should be buying soon. I didn’t get too far into this. Partly because I got busy mid week[1] and mostly because I’m still developing the idea of what data I want exactly.

There’s also a non product related goals I wanted to hit which was starting to write some of the code in Apple’s new Swift language.

I’d say I hit 80% of what I wanted to achieve.

I’m not sure if the app will be successful[2] or not but I’m committed to getting it done.


  1. I started to work out in the mornings before going in to my “J.O.B. job” which just made working in the evenings a harder choice to make. I’m also studying for my Canadian citizenship test so that’s taken some priority.

  2. For some people a million dollars a year business is a failure so that’s all relative.


The Dropbox terabyte conundrum

http://sixcolors.com/post/2014/09/the-dropbox-terabyte-conundrum/

I was discussing this the other day at work: my macbook has a 128GB drive so getting a 1TB of Dropbox capacity does nothing for me; one of my coworkers said he was happy with his Transporter setup. What he didn’t mention was that nifty Library thing:

But there’s also a folder called Transporter Library . (It’s not actually a folder, but a mounted file-share volume.) When you move items to Transporter Library, they are moved off of your device and into the Transporter’s personal cloud.

This is cool and may be the last nail in my intention of getting a Dropbox Pro account.