JavaScript, We’ve Got to Talk.

I’ve been working at Jewelbots for the past year and a half, and my work has revolved around three main areas, our mobile companion app for the Jewelbot, the firmware for the Jewelbot, and the backend systems that span the two.

For the mobile app, I chose Ionic.  There were multiple reasons behind this, not the least of which is that it’s far cheaper and easier to develop one app in JavaScript than it is two develop two native applications, and I have never developed either a native iOS application or an Android application.

So Ionic it was.  I built out the underpinnings of the app, turned it over to our resident amazing designer (seriously, Vico is top notch), and began to work on the firmware.

And that was it, until I decided to come back to the app after 8 months of not touching it.  I tried to run the app:

grunt serve

and immediately saw:

Error: cannot find module 'osenv'

great. So after a quick Googling revealed my nodeJS environment was screwed up (remember: I haven’t touched anything since January, except to install minor updates to Mac OSX (Yosemite), I decided to uninstall node and reinstall it using Homebrew using:

brew install node4-lts

I didn’t use node 5 because at the time we were avoiding it due to breaking changes with Node5 and Ionic.

So I decided to do what any software developer would do. Ininstall and reinstall. During the uninstall/reinstall a different way cycle, I also fell prey to this npm bug, that added a few hours onto my work.

So after Node was deleted and installed again (this time from their website, not homebrew), I cd’d into my mobile app folder and ran:

npm install

Since we’re using npm-shrinkwrap, I fully expected everything to work. After all, it’s a fresh installation of node, a fresh installation of npm, and everything is shrinkwrapped and tied to specific versions. Right?


If you were around for the great left-pad debacle, you’re probably aware that before March of 2016, npm had no process of dealing with modules that were unpublished. They were just gone, and you were in trouble if you depended on them.  This was one of those cases, specifically with a module named “i”:

NOTE: 0.3.2 was accidentally unpublished from the server and npm doesn’t allow me to publish it back. Please upgrade to 0.3.3 (source)

Now even after dumping the dependency tree using npm ls (both global and local), I couldn’t find where i was being used, so I started a bisect approach, where I’d remove half the npm modules from the package.json and see if that caused it to work or fail.

After a little searching, I found out it is a dependency of a few things I used, but the one that turned out to be relevant was Ionic 1.3.
But I wasn’t using Ionic 1.3, I had Ionic 1.7.16 installed.  I verified that with

ionic -v

So what was going on?

It turns out, the answer was in my tooling.  I had installed the ionic-generator for yo, and the generator’s Gruntfile.js expected both ionic and cordova (and a few other packages) to be available in the local package folder. I could see this by opening up the Gruntfile and trying to see where it was looking for packages:

var cmd = path.resolve('./node_modules/cordova/bin', exec);


var script = path.resolve('./node_modules/ionic/bin/', 'ionic');

Of course, I had installed ionic locally to rid myself of this error (I didn’t understand the generator’s tooling at the time, and just wanted to get running), and later on as they diverged, it caused this issue for me.

So how do you fix it?

Well, I first thought that I should just tell grunt to look at the global locations for cordova and ionic, since their documentation states they should be installed globally.  Turns out that’s not easy to do in a platform-independent way.  I assume (coming from Python) that there are virtualenvs that make this whole process easier; but I can’t get a straight answer which one should be used or why.

After a little while of Googling, I found two ways to fix the issue. The first:

npm link <package>

causes npm to reference the global package as if it’s installed locally. It’s a symlink from the local install location to the global install location.

The second is to use resolve-up. It provides a way to use globs to search global install paths for a package.

This was all my fault. I did the following things wrong:

  • I didn’t understand the generator tooling enough to realize installing the same package globally and locally would cause an issue later on.
  • I didn’t realize that for node, a user running a command and a script running a command are executed in different contexts (even though I should have, right?) I may have the global ionic-cli when I type ionic, but my Gruntfile doesn’t; it doesn’t get the benefit of my PATH (why doesn’t it?)
  • I also didn’t realize that if you want to be absolutely certain the ground doesn’t shift beneath you, you should not only not have the same package installed globally and locally, but you should make sure you’re either using npm-shrinkwrap, or have your package.json pinned to specific versions, and hope they’re never un-published.

As a developer, I know intrinsically that this is all my fault. As a user, I have to ask why we don’t hold our tools to the same standard we hold other software?

Why doesn’t node or npm know you have the same package installed globally and locally, and warn you about it? Why doesn’t it it say, “Hey, instead of installing this locally, why don’t I link you to it?”  Or, why doesn’t node install with a virtualenvwrapper? Why isn’t that the default method for working with node modules?  If there is guidance from npm that all packages should be installed locally, but guidance from makers of CLIs that they should be installed globally; why hasn’t a third-way been worked out? Or is npm that third way?  Why don’t those CLIs (when creating a new project) automatically npm link themselves?

Most of all, why do beginners have to be experts on dependency management in order to get a project up and running?

I love the idea of npm, and I love the passion around the community. But there are certain things that should work out of the box, and dependencies are one of them.



Unboxing the PocketCHIP

One year ago, I backed The CHIP, the world’s first $9 computer. It arrived one month past its original ship date, which is impressive for a Kickstarter campaign.

Since this was the first consumer hardware project I’ve received a reward for, I was unsure as to what it’d look like when it arrived.

It arrived in an simple envelope:


with good box art inside:


From a production perspective, I wonder if the two-color box is cheaper to manufacture? It gives the box a retro-80s feel, which is a nice touch.  Here are the other sides of the box:

Special attention to the directions on the back:


Simple directions and it negates the need for an instruction booklet inside.

Opening up the box, a simple foldable cardboard wrapper held the PocketCHIP:


Opening the sticker-adhered flap produced my first look at the Pocket CHIP itself:


static adhesive covering for the LCD; but otherwise no frills. No USB, no note, nothing.

From a production perspective, the fewer parts, the more it reduces assembly costs and time for packaging, making it cheaper. An economical idea for a company running a Kickstarter.

From a consumer perspective, this is exactly what I’d expect from a Kickstarter delivered product.  It’s easy to be spoiled by glossy boxes or specially wrapped and adhered USB cables, but at the end of the day I’d rather have a launched Kickstarter than a high-finish package.

The CHIP team did a good job of balancing first impressions with physical cost constraints.

Holding the CHIP in my hand was… different than I expected it would be:

It is a Pocket item in name only; but has a nice translucent (plastic? poly something or other?) backing that makes it durable.  The angled back also makes it easier to hold in one hand — if you have large hands (Sorry, Donald).

The Pocket CHIP includes the CHIP itself (second image, above), a battery, an LCD, a keyboard, and a unibody case that holds everything together.  It hosts Debian 8; a custom OS UI, and a touchscreen.

Looking at the device, there are a few reasons why this case is extra special.  They put breakout pins for all the exposed pins; and they’ve even included the communication buses (I2C, SPI, UART) in case you want to include a peripheral.  I have a SPI LED Driver evaluation board sitting next to mine, so I may have to give that a try.

Turning on the PocketCHIP boots up the custom OS; a Debian Linux distro with a custom UI:


(after the tour, that is)


Pico-8 is a retro gaming platform that lets you write games in Lua.  You can also do normal Linux-y things, like drop down into the terminal:


or even browse files:


Out of the box, it was worth more than the $50 I paid for it; and I’m a bit surprised it’s selling for that low.  I would have expected the PocketCHIP to cost around $75 or so. Either way, it’s a great way to get a computer in your hand.

Next up for me is to program a demo that uses the full screen, and not just the 128×128 pixels given by the Pico-8 platform.

Quiz: Do you have a Remote Work Culture?

Just like 2016 will be the year of the Linux desktop, it’ll also be the year of the remote worker.

Only one of those sentences is true. Sorry, Linux.

I’ve talked about my experiences with remote working before, but I’ve never put down the criteria that differentiates a company that has remote workers with a company that has a remote work culture.    So here’s a quiz for you; tally your scores up, and we’ll talk about the results at the bottom.

3: this applies and in practice works 80% of the time or better
2: this applies contextually; and generally between 50-80% of the time
1: this applies less than half the time, if at all.


  1. Your office has the capability to host remote workers through video conferencing software or chat software.
  2. All policies regarding remote work, holidays, and ‘flex’ time are written down and accessible to all employees, even if they’re remote.
  3. Important information is disseminated in such a way that people who aren’t present won’t miss out: company persistent chat (like Slack or Hipchat), or email.
  4. Decision makers make an effort to wait to disseminate information until remote workers can video-conference in.
  5. Your office has persistent video conferencing software set up in your office; or your conference rooms contain a web cam and persistent video conferencing addresses (a dedicated Google Hangout)
  6. Remote workers are promoted or given raises at the same rate as in-office workers.
  7. You have a promotion plan in place for remote workers.
  8. You don’t ask remote workers to relocate to the main office.
  9. “Work/Life Balance” applies to everyone in your company, not just people you see day-to-day.
  10. Remote workers consistently say they feel “a part of” the company culture in feedback sessions.
  11. You have regular feedback sessions with all your employees, including your remote workers (1 on 1s, virtual coffee, etc).
  12. Meetings are always scheduled in advance. Impromptu meetings are rare.
  13. Remote workers know the hours of time per day they should be immediately available, and the hours they should be available within 15 minutes of contact.
  14. When there is a special event at the office, you also send something to your remote workers so they don’t feel left out (cake for the cake gods).
  15. If your remote workers came to you with an office culture issue; you’d take their issue seriously and work with them to resolve it, even if it meant changing company practices.
  16. “In office” employees consistently say they feel connected to remote workers; and there aren’t signs of a rift between the two groups
  17. At least once per month, remote workers pair program or work alongside their office counterparts on the same project together, at the same time (probably utilizing some sort of screen sharing software).

40+: You’re doing really well. Your remote culture is solid; and while there are things to work on, you’re in a good place.

25-39: You’ve got some work to do. Your remote workers may feel disconnected, or they may feel like they’re missing vital information.  Your office workers may also feel disconnected from your remote staff. Take a step back and have honest conversations with all parties. Remote work may not be for you, or you may need to double down on it.

<25: You don’t actually have remote employees, right?  If you do, they’re probably experiencing serious issues; and need your help to make them right. You may also have higher than standard turnover with your remote employees.


Special thanks to Brent Ozar (twitterblog) for reviewing this post.

What are some Alternatives to Parse?

Back when I was figuring out which MBaaS to use to power Jewelbots app backend a few months ago, I chose Parse.  Luckily, I included an entire write-up on all the MBaaS (Mobile Backend as a Service) providers I could find at the time.

Since listing the dead ones would be not useful, I’ll list only the ones that are “Alive”, plus new ones I’ve found.

I’m limiting my search to companies that provide a MBaaS and host it for you.

Provider Focus Cost/Month (startup) Status
AnyPresence Unclear Not Provided. Contact wall Alive
App42 Startup MBaaS + Managed Analytics $0-$99 Alive
Appcelerator Cloud MBaaS + App Platform SDK $39-$259 Alive
Apstrata Indie MBaaS <$800/month for Startup ($.08 per user) Alive
Buddy Enterprise MBaaS (unknown, they hide the service behind a “ContactWall”) Unknown (call for demo/pricing) Alive
Cloud Mine Enterprise MBaaS ContactWall (Call for pricing/demo) Alive
Feed Henry Enterprise MBaaS Unknown (ContactWall) Alive (Acquired by Redhat in Late 2014)
Firebase Startup MBaaS $0-$49 Alive
IKnode MBaaS $9/month Alive? – Last commit to their Repo June 2015.
Kii Enterprise MBaaS? (Unclear from their site) ContactWall – Call for Pricing/Demo Alive
Kinto Startup/Open Source MBaaS Free Alive
Kinvey Enterprise MBaaS $2000/month (Free for Startups) Alive
Kumulos Startup MBaaS $10/month based on “fair usage” (not defined) Alive
Windows Azure Mobile MBaaS Totally confusing Alive

Since we were always just using Parse for development, we’ll be moving our infrastructure to AWS; and will likely at least document (if not open source it) when it’s done.

Eight Months of Remote Work

Last time I did one of these, it was four months ago, and I mentioned this:

All conversations must be in a digital medium. Working with people who are in an office together means either all conversations have to go through Slack, or missing out on critical information.

Sounds easy, right?

It isn’t.

Missing information isn’t the only issue I’ve run into; and I was all prepared to write a blog post about it, until I found this blog post, on what affects remote workers the most.  In order from most to least:

Screen Shot 2015-11-17 at 9.56.17 AM.png

That blog post hit me right in the gut.  It’s exactly how I feel, with roughly the same mixture as the survey.

To help combat these issues for remote workers (right now, just me) we’ve had a “George Cam” (todo: change name when we hire more remote people) that we keep up in the office and I am able to interact with everyone over that.

It works. Ship it.

Except after a few months of this, we (ok, me, since I was the only one remote) noticed a few issues:

  1. Ambient noise is the enemy. In Open Office Floor Plans (like the current environment we’re in (not by choice)), the ambient noise combined with the built in microphone on the MacBook Pro means that unless my office-mates are facing the laptop, I have a hard time picking up what they’re saying. This causes me to miss some or all parts of a (probably important) conversation and have to ask those on the other end to repeat what they said.  If it’s annoying for me, I can only imagine how it feels for them.
  2. I need to see people. Non-verbal language accounts for 93% of all interactions. Since my camera points in the general direction of everyone (but most people’s faces and bodies are out of frame), I get a good shot of people’s hands… Which doesn’t help when I need to see their body language to discern what’s going on.
  3. Just like in real life, not all conversations should involve me. Sometimes, I awkwardly invite myself into things that aren’t actually for me.  It happened just yesterday; I heard two coworkers talking about an event one evening this week, and somehow assumed it had something to do with work; I wanted to make sure I was free that night / was there for it.  Since it wasn’t actually work related (and I wasn’t actually invited), that made that exchange a little awkward.  Again, this is something that wouldn’t happen if I were there, as body language would tell me I wasn’t invited (as would the fact that they’d probably wait until I walked away, which is hard to bet on when the person is remote).
  4. Being two-dimensional (I’m on a computer screen) means that it’s easy to forget I’m there (or not there), and sometimes I’ll miss important conversations because they happened spontaneously and I just happened to stand up and walk away right before or at that time.  If I were in the office, that wouldn’t happen, since it’s much harder to forget about a three-dimensional human being.

Since we have feedback sessions often, I’m able to bring up these issues, and here’s what we’ve done to address them:

  1. Get a good microphone, and place it in the middle of the group.  The difference is amazing. Now I can hear everyone talk to each other and talk during standup, instead of straining to listen because the Mic wasn’t in the middle of the action.
  2. Have personal hangouts when we need to have discussions; perhaps in a conference room.  The office cam is great for general chit-chat and one-off conversations, but not so good when I need to see the person who is talking to me.  The personal hangout allows me to read body language, and that’s really important.
  3. Write private messages to ask one person if the conversation that’s going on is personal or work related.  That’s a more subtle approach than blurting out, “There’s a party? When is it?”
  4. Have all important conversations go through Slack.  Of course, that doesn’t happen (would you expect 80% of your company that sat next to each other to slow down their conversation so they could type it?), but that’d be the only way to be sure I didn’t miss really important communications.   It’s not just about me. It’s about what works best for the entire team. Since the fix is harder than the work around, I do ask that they at least put a note about the conversation in chat and I can follow up when I’m back.

As I write this I’m heading to NYC to spend the next few days for some face time with the rest of Jewelbots.  So for the next few days, at least, I won’t be a remote worker.


Recently I had the occasion to start learning and writing firmware.  If you’re like me, you’ve spent most of your software career writing web applications in a high level language, and have never needed to worry about memory management, or space constraints, or even what data structure to use.

Ok, so I’m being a little facetious with that last one, but for most web applications, Big O notation simply doesn’t matter: Most data structures and algorithms are Good Enough.  In fact, you could throw a dart at any major data structure and it will perform adequately for most workloads1.

Big O CheatSheet

So this means Computer science classes are a waste of time, and we should all just start writing Web apps, right?

Well… no. Throughout the course of learning how to program hardware, I’ve encountered from very stark realities: Hardware is the honey badger of platforms. Whereas other platforms may be forgiving, or may let you get away with something that isn’t a “Best Practice”2, hardware simply does not care about your feelings and desires to launch software. You have 16KB of Ram, and 256Kb of ROM, and that’s it (and in SoC terms, that’s a lot). All those optimizations that we used to make fun of? Well now we’re doing them.

I wasn’t totally unprepared for this turn of events; I had been going through the Programming Pearls book for years3, and so my mind was open to the challenges of writing low level code.

But, nothing I’ve ever done professionally has really prepared me for this. I’ve worked on a few “Web Scale” projects, but mostly been able to optimize code without having to really do low level stuff. Since there’s a tradeoff to business for optimization, it’s always been a ‘good enough’ approach.

And that’s my fault.

The entire world around me is filled with answers, but I’ve never asked the right questions at the right time. Imagine how good at programming I would be if instead of taking apart the computer and put it together, I simply kept asking people “how can I program this?” Or imagine if instead of partying and wasting my college years playing Tribes, I had asked my professors what I would need to learn to build a compiler?

My father (a reporter and journalist) used to say, “It isn’t the man with the answers, it’s the man with the questions.”4

What if I had taken his advice sooner? Where would I be now?

I’m privileged to be able to work across the entire software stack, and working at a hardware startup has been extraordinary; but I can’t help but wonder what I’d be doing now if I had asked questions sooner in life. Would I have gone to MIT? Would I have fulfilled my potential sooner? Would I have understood what I wanted to do with my life sooner?

I’ll never know, of course, but, as they say: The second best time to plant a tree is right now.

If there’s one piece of advice I have for my 7 year old self, it’s: Ask ‘why’, and don’t stop until you’ve found the answer. And then find another question to ask.

1: “Most” meaning most, of course. If you work with Web Applications (or even most applications), your user base or data set just isn’t large enough to worry about this sort of stuff; you’ll generally find greater gains fixing things elsewhere. That isn’t to say it doesn’t matter at all, just that for most of us, it doesn’t matter most of the time. It’s like the Pareto principle, only less succinct.

2: Used un-ironically, for once.

3: Really, I keep picking it up, doing an exercise, and putting it down. It’s like Godel Escher Bach for me.

Pre-order your Jewelbots Today!

Yesterday the Jewelbots team hung out at Maker Faire NYC and took part in a panel titled “It takes a Village”, a look at how we use each of our diverse skillsets to build Jewelbots (spoiler alert, the Jewelbots team is awesome).  During that panel, we also announced the opening of the Jewelbots store, where you can pre-order your Jewelbot (and buy multiples!).

If you backed our Kickstarter, this is a chance to grab more; and if you missed out on our Kickstarter, this is your best chance to be part of one of the first production runs of Jewelbots (like anything else in the manufacturing world, it’s first come, first serve; and manufacturing can be cruel if you wait too long).

Another bonus for you (and for us): if you pre-order is that it has the potential to make the lead time shorter. It makes sense when you think about it; a manufacturer that is getting paid for 20,000 orders is going to place that at a higher priority than 5,000 orders.

Anyway, I’ve talked long enough; if you haven’t already, visit our Jewelbots store, and pre-order your Jewelbots today.

And if you think that Jewelbots aren’t your Jam, I give you five reasons to be excited about Jewelbots (even if you aren’t a girl).