Modules, Packages and candy, oh my!

Tonight I gave a talk at QueensJS. It was my first time speaking there and it completes my trifecta of “borojs” speaking events. (I’ve now spoken at BrooklynJS, ManhattanJS and QueensJS!) I would have done it sooner but Sara wouldn’t let me until now.

The talk was on ES6 Modules and the brave new world popping up around them. It was also about how and why we tried to migrate PouchDB to use them and failed.

You can find the presentation on github, I used Deckset to present the markdown file and generate a PDF for download.

The Internet I wish we had: Making Toast

“Why is the light in the refrigerator purple? It looks like I’m making a breakfast for zombies!”

I grab the makings for a mushroom cheddar omelet. We’re running low on butter.  I say “Ok refrigerator” and then wait.. its display shows it’s thinking about what I said and then beeps an error tone at me. It writes out “unrecognized command”. This time I hit the listen button and say, “We’re running low on butter.” It shoots back, “Salted or unsalted?”, “Salted” I say. It beeps happily having understood that I want butter added to my shopping todo list. I hit the settings button, and follow the menus to “light”, “color” and set it back to “natural full spectrum”. The food glows a healthily once again.

I start cooking while my family runs around getting ready for work and school. I put the kettle on the stove for tea, I leave the frying pan heating up, put the toast in the toaster. A usual weekday morning. As the eggs are starting to firm, up the toaster in a loud shrill voice beeps three times that it’s done. It waits a few moments and beeps again, three times. I’m still working the eggs but the toaster doesn’t care. It wants me to walk over to it and hit “cancel” even though it’s done and there’s nothing to cancel. I glance in its direction and it flashes its LED display back at me in annoyance. “DONE” it reads and then beeps three times again. Something needs to be done about that toaster.

I go to put the eggs back into the fridge and the lights are purple again. What the hell? Must be one of the kids’ idea of a joke. “Hey Sara, can you grab me my debugging cable when you have a chance?” I serve breakfast and it’s devoured before I even get a chance to sit down. Everyone starts to head out, leaving me with hugs and kisses and dirty dishes. Sara hands me my debugging cable with her goodbye kiss and runs off to catch the bus. I clean up from breakfast and then get to work. That toaster has it coming.

A debugging cable isn’t much more than a USB host cable. One end plugs into my cell phone and the other is an octopus of different usb ports, mini, micro, A and B. The toaster is a little older too, so it has a micro usb port. Newer ones would just have the USB C ports with the nifty cables that you can plug in to either end and upside down. Remember when no matter which way you plugged in your cable it was wrong? Those days are almost long gone. I pull up the CodeCat app on my phone. I’m sure the toaster has an official app but the community keeps better track of these things. The app detects it’s plugged into a “SmartTek Heatmaster 1520” with stock firmware. It downloads the code from the toaster and opens it up. Boy this thing is a mess. I find where it keeps beeping but I can’t figure out why it keeps beeping, something must be calling the beep function over and over.  I hit the “community firmware” tab on CodeCat I bet someone has already solved this. It’s not a popular toaster oven but there are at least 3 firmwares with “STOP THE BEEPING” in their names so I hit the most popular one and view a diff.

It shows me where the firmware was changed to stop the beeping, and it also looks like they turned the toasting levels down a bit. That’s great! It used to be “kinda toasty”, “burnt”, “burnt to a crisp”, “fire hazard”,  and two more levels I’ve never dared to toast with. I wish they had said they fixed that in the docs but this is wonderful news. I hit install and it downloads into the toaster. I then test it with a nice piece of fresh sourdough. The bread turns golden brown and then a nice low “beep” happens once. The display reads “Thank You”.

Now for the fridge! Something keeps changing the settings, and I bet it’s a script written by someone who wants to paint their room black and purple. The fridge has its own display and is capable of user scripts. This lets us write a script that runs either in response to events or all the time. It also lets us fork the scripts that the fridge came with. When we first got the fridge I played around with it a bit, and modified the light script to slowly increase the brightness when you open the door and then flash it a few times if the door is left open more than 30 seconds. In all honestly I thought it was a gimmick at the time. But when I figured out how to bypass the fridge’s quaint todo app and have it send todos to a shared shopping list on phones, I was sold 100 times over. There’s not much more I want from my fridge. And thank god fridge companies stopped trying to automatically detect what’s in there and place orders for us. Those were dark days. I mean someone even tried to get RFID chips put in individual eggs. Crazy, right?

There were no additional scripts but the modification time on my light script had been updated. I checked a diff and noticed almost every line had been modified, but only its whitespace? The fridge doesn’t support suppressing changes to spaces and tabs and only showing the actual code differences. So I plugged in my phone again (this time with USBC!) and pulled up CodeCat again. I found the lighting script again and had it show me only the code changes, no spaces this time. A new section had been hidden in the middle that would reset the color of the light every 7 minutes. Crafty. I copied it out and then reset the file to the previous version.

With the fridge fixed, I logged into my house’s command and control box. This is an old mini computer (about the size of my phone) that I had laying around and hooked up to the wifi. It primarily listens for all the switches and turns on the lights in whatever room you’re in. It can also listen for commands from your phone and it knows if we’re home or not and can turn on the porch light. Simple stuff. I add a new script for the switch in the kids’ bedroom, every 3rd time the light is turned on, and only if it hasn’t happened in the last 2 hours, flash the lights bright green for 30 seconds and then go back to purple or whatever. That will show them!

The kids haven’t really figured out about the house control as it’s not right in front of them like the fridge, and they’re still pretty young. I leave them with write access to the script so they can fix it if they figure it out. No point being completely mean. Time for work I suppose!

The Internet I wish we had: Texting

I hung up my phone and started typing. “Jason just called me, ideas for dinner before the movie?” and sent it to Sara. My phone know’s a lot about Sara and where she might be. It encrypted the message for her eyes only, indicated that the message will probably be delivered in midtown with a 70% confidence rating. After all it was 4pm on a Thursday, where else would she be?

My office runs a messages hub. It takes messages from nearby devices and puts them on the internet where they’re sent to hubs closer to their delivery locations. Midtown is full of hubs and even if it wasn’t there’s enough people in manhattan that it would only take a few extra seconds to go phone to phone.

My office’s hub took at look at the message and queried it’s routing database. It didn’t have a better idea of where Sara might be so it remembered mine and chose it’s favorite hub in midtown the one at Egyptian restaurant down the block. This hub has the best relationship with mine out of all the nearby hubs. It’s rarely overloaded, has a decent enough connection and it’s pretty close to Sara’s phone most of the time. It also knows my hub is in a similar situation when sending me messages.

The Egyptian restaurant’s hub broadcasts the message, it’s too far away from Sara’s phone for it to hear but a business man is walking near by. His phone picks up the message and sends it to everyone on the block. A woman at the far end had recently taken the elevator past Sara’s floor of the office and their phone had seen hers. Her phone relays it to the doorman of her building who’s still in range. The doorman always kept his phone plugged in and is in a perfect spot to relay messages. He doesn’t really know too much about the messaging app, other than it gives him some spending money at the end of the month and people are happier when he keeps it on.

Sara had tried to get reception to put in a hub, or at least keep the messaging app in “hub mode” on their phones. They’re plugged in, someone is almost always there and they’d help relay all the messages to the floor of the office. It would be great for everyone! Except one of the receptionists claimed it slowed down his phone. (Probably gave his online games some lag.) And the other one jacked up the price for each relay 100 times the market rate and everyone routed around him. He never made any money and turned it off. Their loss, they can keep paying for their service plans.

The doorman’s phone sends the message bouncing up the phones in the elevator cars until it hits someone walking across the office on the floor above who’s also in range of Sara.  Her phone receives the message with a “Beep Boop” The whole affair took 7 seconds and negligible battery life.

“I just left work. Swinging by comics, then I’ll head towards the theater. I had pizza for lunch, what did he say?”


Steam Heat

My home has radiators that are 70ish years old. I’m going to guess the air vents are 10-30 years old. It’s supposed to let the air out while the pipe fills with steam. Then and this is the important part, it stops letting anything out of the pipe and keeps the steam in the pipe. Some of our valves weren’t letting the air out, and some was letting everything out.


  1. It’s cold in my room
  2. Our boiler runs out of water too often
  3. Our windows take a constant bath from condensation

So lets fix some things.

This slideshow requires JavaScript.

The vents in the peanut butter jar were old, came with the house. They didn’t quite close when the steam hit them so they whistled a ton. So if you have a PB jar full of vents I recommend installing them at night so nobody is awake to hear them. The next day Sara drove me in the snow to spend a lot of money on valves from a store. I replaced the vents in my bedroom which were clogged. The air couldn’t escape so it couldn’t fill with steam. The one in the bathroom would never close, so while our bathroom was very warm, it also very damp. Notice the rust around the vent in the photo? That’s crazy. The last two had similar problems.

It’s so quiet! I love it! I hope my bedroom is warmer, I’ll find out. I can’t confirm it but I bet the house will heat a little faster, and my hunch is that the air will be much less humid.

I wish I could somehow measure the heat in the house vs outside, the time it takes to warm the house, the humidity, etc etc. Oh wait! I know how!


I’ll use my Nest! Unfortunately they don’t seem to make it easy to use the data. Looks like I may have to get clever.


This story is best read while listening to this.

Rick was driving north on I-95, he had to find an uplink or this whole trip had been for nothing. “Rose, scan the vehicles ahead.” His onboard computer sprang into action attempting to connect to internal networks of each and every car on the road around him. “No joy” she responded. All the cars either were too outdated to allow wireless access or detected their connection attempt and shut it down before they could get in. Rick sped past the cars in front of him, he had to find what he was looking for and these cars weren’t going to help.

It had been three long weeks since he had access to the ‘hub. Way too long for any self respecting keyboard cowboy. Back in 2017 when the loss of net neutrality caused the global collapse the internet as we knew it, all of the east coast had lost their uplinks to the internet. The Silicon Valley was the only place where you could get a reliable public connection and nobody dared to go there anymore. The internet wasn’t dead it was just hard to get to. Large corporations had the only uplinks and provided their own cell and wifi coverage to only their most elite customers. Having cast off the chains of debt and credit cards Rick was not considered an “Elite” customer. As a result it was hard to get online, and he had code to push.

Three quick “BEEP BEEP BEEP” sounded over the music, Rose flashed all the HUD’s alarms. His modified 6LOWPAN radio had picked up packets from a speed trap up ahead. He toggled back on his transponder and slowed down to the regulation 75 MPH. 6LOWPAN was supposed to be the savior of the net, allowing us to put all our devices online in distributed low power mesh networks. At one point you could send packets from New York to Boston via the ip6 mesh. The powers that be had different plans however. Private security had taken over the spectrum. Civilians quickly lost access to private low power networks and if you ran your own you were accused of interfering with national security and shut down.

Once he was sure he was clear of the trap Rick switched off the transponder and increased to hunting speed. This made him invisible to the EZPass speed checkpoints that littered the highway every few miles. They’d have no idea how fast he was going. It randomized his UUID whenever he switched it back on and appeared to be just another vehicle on the road. This got him past tolls and checkpoints. Even in this day and age it took the government a few weeks to even notice anything was out of the ordinary. Any tickets they would want to issue ended up in someone else’s inbox.

“Pay Dirt!” Rose exclaimed. A Fung Wah bus was up ahead and it had a connection to the net! Fung Wah had long since been shut down, but their buses still drove the roads. Their drivers were able to pick up the buses on the cheap after the company went bankrupt and had organized their own routes free of oversight and regulation. It was pretty lucrative. Luckily the bus’s uplink hardware was valuable enough that it remained in service and if you rode the bus you could use it to connect to your own systems. Someone on this bus had it activated and was using it right now!

Rick pulled up alongside the bus in the driver’s blind spot. If the driver or the passenger noticed him, either in real life or cyberspace, he’d be shutdown, reported and locked out from all uplinks until he could cycle his hardware address and that took weeks. Rose started the connection attempt. It was almost too easy. He had his 128 bit address in no time at all, and routes to all the backbones populated almost instantly. It was never this easy. The passenger on the bus either had no security or had seen him coming miles away. “Fuck it, git push.. wha!?” Rick was cut off by a squeal of sound. The whole car shuddered and the smell of magic blue smoke sifted into his nostrils. The safety circuits kicked in and the car drifted slowly to the side of the highway. It stopped, dead. What happened! Had been back hacked? “Rose!”

After what seemed like an eternity Rick was able to get the car to spring back to life. It took flashing the firmware in his starter circuits twice to get the engine running. Rose had detected the hack and shut everything down before the hacker on the Fung Wah bus could get too far. The navigation and scanning circuits were toast however. Not only were they hacked but the hacker had decided to pump emergency current into their subsystems and destroy $30,000 worth of equipment. Rose and the rest of his systems were fine. He could drive. And he better leave before any private security showed up to see why he stopped.

That was close but he couldn’t give up.

“You wont believe this” Rose piped up. It had been two hours and they had almost reached their destination. Rick had feared they wouldn’t be able to push any code tonight. “It’s a MEGABUS”. MEGABUS had been one of the few companies to survive the collapse. Every bus had power and material hookups at every luxury leather seat, and most importantly a corporate uplink connection active 24/7 for use by all passengers. Rick wasn’t going to mess around this time. He killed his lights and activated stealth mode. Rose picked up and identified packets from all 36 of the passengers on the megabus. Most were encrypted but one was downloading a ton of data. Mostly facebook, twitter and netflix. Streaming video on the east coast!? Gluttonous. This guy wouldn’t notice a little extra bandwidth. Rose cloned his MAC and carefully connected to the bus. Connections to twitter and the hub were successful. “I’m in” she reported. “Alright, easy now. cd johnny-five, git push origin master.” Rose connected via SSH to github and started pushing binary blobs of robot control data. “Eta 137 seconds” she reported. Rick decided to tweet.

There was only 30 seconds left when the MEGABUS driver noticed him and pulled hard to the right narrowly missing Rick as he slammed on the breaks. “We’re losing signal!” Rose yelled out as the bus sped away. 20 Seconds! Rick sped up, this time right behind the bus. It slammed on it’s breaks, and broke off towards an exit. Rose quickly deduced the situation “The Fung Wah hacker must have reported us to all uplinks in the area, they knew we were there from the second we pulled up!” Rick yanked on the wheel and slammed the pedal. Even if it meant leaving the safety of the highway he wasn’t going to drop this connection. 5 seconds left! He pulled ahead of the bus and slammed on his breaks. Time for some of the your own medicine! The buses safety circuits kicked in and the bus slammed on it’s brakes skidding to a halt before tapping Rose’s bumper. It would need a visual inspection before it was allowed to drive again. “Git push complete.”

Rick sped off into the night.

Bosty by Richard Cox

The One Place to Hang Out

I’ve been making my way through this presentation by Maciej Cegłowski

Some kinds of services are just crying out for decentralization. Fifty years from now, people will be shocked that we had one social network that all seven billion people on the planet were expected to join.

Imagine if there was only one bar in Düsseldorf, or all of Germany, and if you wanted to hang out with your friends, you had to go there. And when you did, there were cameras everywhere, and microphones, and you were constantly being interrupted by people selling you stuff. That’s the situation that obtains with Facebook today.

Surveillance as a business model is the only thing that makes a site like Facebook possible.

All the parts

Yesterday at JSConf 2014 we had a nodebots event. (We also had noderockets, nodeboats and nodecopters.) One of my favorite bots is below.

laserbot 2


We have a lot of different parts here.

Facebook sponsored the entire event. So props to them for making it happen.


I’m still hunting down the maker to get more info, but it blows my mind how simple it was to put all the different parts together.


Our Two Visions

I’ve been doing a lot of outward thinking* lately about Wizard Development’s vision. “Vision” means a lot of things to a lot of people, so I should specify. To me it means the general principles and goals by which everyone in our company should guide their actions. I believe that, in general, everyone is a nice person and will try to act accordingly. However, having specific and clear goals will help everyone work together. Here are Wizard’s:

Outward Vision: To help small businesses’ dreams come true by building tools and applications which allow them to be more impactful in their business.

Inward Vision: To teach ourselves and each other to be the best developers we can be, and for our company to be a model of how we’d like our industry to operate.

People are solving problems all around us all the time. Small businesses are usually local and employ our friends and neighbors. By meeting the needs of their community small businesses  strengthen them. By moving their operations out of clunky tools (like Excel and email) and into custom applications, we enable them to do a lot more with a lot less. This should, in turn, benefit the communities they serve.

I speak a lot about wanting a diverse team. When I first explored starting Wizard Development, I wanted to hire a small and diverse team of senior developers so we could hit the ground running and tackle gigantic, complex problems. When you have a diversity of people, you get a diversity of ideas and ultimately that leads to a stronger team, stronger products, and just maybe stronger people. Unfortunately, diversity in senior developer roles barely exists. Software development has abysmal numbers in the categories of age, sex and race. This means that in order to get that senior team, I’m going to need to hire a diverse team of junior developers and help them grow.

I don’t think I could do this without the help of my developer community. These people, many of whom I’ve worked with professionally and in Open Source software, have become my friends. A lot of them run events with the goal to educate and empower. Some of them have become amazing teachers. Others spend all their time solving problems for all our benefits. I want to link you to some of these people’s work, but they have so many projects I don’t know where to start. Most importantly we share some common values: Teaching, Learning, Inclusivity, and Acceptance.  I’ve already tapped a few of these wonderful people to help Wizard grow in both our business and our training. I can’t wait to see how we can start giving back.

And so I’m putting my money where my mouth is and hiring a diverse junior team. My partner Sara just graduated from the Flatiron School’s Brooklyn Web Development Fellowship (BK-000). During her 5 month course she introduced me to the brightest minds I’ve ever met. The Fellowship did the hard part of diversifying the industry –  they selected a class of students with a population representative of New York and gave them a fundamental understanding of computer science and web development. I had the luxury of watching them learn and seeing their curriculum, and I’m excited. They graduated two days ago and they are now entering our industry. My first job offers are going out to them.

I’m really looking forward to refining these two visions as we work together. =)


* It’s when I think about something and tell everyone about it, over and over.