Drops Of Jupyter Notebooks: How To Keep Notes In The Information Age

Our digital world is so much more interactive than the paper one it has been replacing. That becomes very obvious in the features of Jupyter Notebooks. The point is to make your data beautiful, organized, interactive, and shareable. And you can do all of this with just a bit of simple coding.

We already leveraged computer power by moving from paper spreadsheets to digital spreadsheets, but they are limited. One thing I’ve seen over and over again — and occasionally been guilty of myself — is spreadsheet abuse. That is, using a spreadsheet program to do something I probably ought to write a program to do. For those times that you want something quick but want something more than a spreadsheet, you should check out Jupyter Notebooks. The system is most commonly associated with Python, but it isn’t Python-specific. There are over 100 languages supported — many community-developed. You can even install a C++ interpreter backend for it. Because of the client/server architecture, it is very simple to share notebooks with other users.

You can — in theory — use Jupyter for anything you could use Python for. In practice, it seems to get a lot of workout with people analyzing large data sets, doing machine learning, and similar tasks.

The Good: Simple, Powerful, Extensible

The idea is simple. Think of a Markdown-enabled web page that can connect to a backend (a kernel, in Jupyter-speak). The backend can run on your machine or remotely and will support some kind of language — often Python. The document has cells that line up vertically (like a single wide spreadsheet column). For example, here’s a simple notebook I created to explain how a bunch of sine waves add up to a square wave:

Continue reading “Drops Of Jupyter Notebooks: How To Keep Notes In The Information Age”

Building A Simple Python API For Internet Of Things Gadgets

It’s no secret that I rather enjoy connecting things to the Internet for fun and profit. One of the tricks I’ve learned along the way is to spin up simple APIs that can be used when prototyping a project. It’s easy to do, and simple to understand so I’m happy to share what has worked for me, using Web2Py as the example (with guest appearances from ESP8266 and NodeMCU).

Barring the times I’m just being silly, there are two reasons I might do this. Most commonly I’ll need to collect data from a device, typically to be stored for later analysis but occasionally to trigger some action on a server in the cloud. Less commonly, I’ll need a device to change its behavior based on instructions received via the Internet.

Etherscan is an example of an API that saves me a lot of work, letting me pull data from Ethereum using a variety of devices.

In the former case, my first option has always been to use IoT frameworks like Thingsboard or Ubidots to receive and display data. They have the advantage of being easy to use, and have rich features. They can even react to data and send instruction back to devices. In the latter case, I usually find myself using an application programming interface (API) – some service open on the Internet that my device can easily request data from, for example the weather, blockchain transactions, or new email notifications.

Occasionally, I end up with a type of data that requires processing or is not well structured for storage on these services, or else I need a device to request data that is private or that no one is presently offering. Most commonly, I need to change some parameter in a few connected devices without the trouble of finding them, opening all the cases, and reprogramming them all.

At these times it’s useful to be able to build simple, short-lived services that fill in these gaps during prototyping. Far from being a secure or consumer-ready product, we just need something we can try out to see if an idea is worth developing further. There are many valid ways to do this, but my first choice is Web2Py, a relatively easy to use open-source framework for developing web applications in Python. It supports both Python 2.7 and 3.0, although we’ll be using Python 3 today.

Continue reading “Building A Simple Python API For Internet Of Things Gadgets”

When Will Our Cars Finally Speak The Same Language? DSRC For Vehicles

At the turn of the 21st century, it became pretty clear that even our cars wouldn’t escape the Digital Revolution. Years before anyone even uttered the term “smartphone”, it seemed obvious that automobiles would not only become increasingly computer-laden, but they’d need a way to communicate with each other and the world around them. After all, the potential gains would be enormous. Imagine if all the cars on the road could tell what their peers were doing?

Forget about rear-end collisions; a car slamming on the brakes would broadcast its intention to stop and trigger a response in the vehicle behind it before the human occupants even realized what was happening. On the highway, vehicles could synchronize their cruise control systems, creating “flocks” of cars that moved in unison and maintained a safe distance from each other. You’d never need to stop to pay a toll, as your vehicle’s computer would communicate with the toll booth and deduct the money directly from your bank account. All of this, and more, would one day be possible. But only if a special low-latency vehicle to vehicle communication protocol could be developed, and only if it was mandated that all new cars integrate the technology.

Except of course, that never happened. While modern cars are brimming with sensors and computing power just as predicted, they operate in isolation from the other vehicles on the road. Despite this, a well-equipped car rolling off the lot today is capable of all the tricks promised to us by car magazines circa 1998, and some that even the most breathless of publications would have considered too fantastic to publish. Faced with the challenge of building increasingly “smart” vehicles, manufacturers developed their own individual approaches that don’t rely on an omnipresent vehicle to vehicle communication network. The automotive industry has embraced technology like radar, LiDAR, and computer vision, things which back in the 1990s would have been tantamount to saying cars in the future would avoid traffic jams by simply flying over them.

In light of all these advancements, you might be surprised to find that the seemingly antiquated concept of vehicle to vehicle communication originally proposed decades ago hasn’t gone the way of the cassette tape. There’s still a push to implement Dedicated Short-Range Communications (DSRC), a WiFi-derived protocol designed specifically for automotive applications which at this point has been a work in progress for over 20 years. Supporters believe DSRC still holds promise for reducing accidents, but opponents believe it’s a technology which has been superseded by more capable systems. To complicate matters, a valuable section of the radio spectrum reserved for DSRC by the Federal Communications Commission all the way back in 1999 still remains all but unused. So what exactly does DSRC offer, and do we really still need it as we approach the era of “self-driving” cars?

Continue reading “When Will Our Cars Finally Speak The Same Language? DSRC For Vehicles”

The Woeful World Of Worldwide E-Waste

How large is the cache of discarded electronics in your home? They were once expensive and cherished items, but now they’re a question-mark for responsible disposal. I’m going to dig into this problem — which goes far beyond your collection of dead smartphones — as well as the issues of where this stuff ends up versus where it should end up. I’m even going to demystify the WEEE mark (that crossed out trashcan icon you’ve been noticing on your gadgets), talk about how much jumbo jets weigh, and touch on circular economies, in the pursuit of better understanding of the waste streams modern gadgets generate.

Our lives are encountering an increasing number of “how do I dispose of this [X]” moments, where X is piles of old batteries, LCDs, desktop towers, etc. This leads to relationship-testing piles of garbage potential in a garage or the bottom of a closet. Sometimes that old gear gets sold or donated. Sometimes there’s a handy e-waste campaign that swings through the neighborhood to scoop that pile up, and sometimes it eventually ends up in the trash wrapped in that dirty feeling that we did something wrong. We’ve all been there; it’s easy to discover that responsible disposal of our old electronics can be hard.

Fun fact: the average person who lives in the US generates 20 kg of e-waste annually (or about 44 freedom pounds). That’s not unique, in the UK it’s about 23 kg (that’s 23 in common kilograms), 24 kg for Denmark, and on and on. That’s quite a lot for an individual human, right? What makes up that much waste for one person? For that matter, what sorts of waste is tracked in the bogus sounding e-waste statistics you see bleated out in pleading Facebook posts? Unsurprisingly there are some common definitions. And the Very Serious People people at the World Economic Forum who bring you the definitions have some solutions to consider too.

We spend a lot of time figuring out how to build this stuff. Are we spending enough time planning for what to do with the gear once it falls out of favor? Let’s get to the bottom of this rubbish.
Continue reading “The Woeful World Of Worldwide E-Waste”

Bell Labs, Skunk Works, And The Crowd Sourcing Of Innovation

I’ve noticed that we hear a lot less from corporate research labs than we used to. They still exist, though. Sure, Bell Labs is owned by Nokia and there is still some hot research at IBM even though they quit publication of the fabled IBM Technical Disclosure Bulletin in 1998. But today innovation is more likely to come from a small company attracting venture capital than from an established company investing in research. Why is that? And should it be that way?

The Way We Were

There was a time when every big company had a significant research and development arm. Perhaps the most famous of these was Bell Labs. Although some inventions are inevitably disputed, Bell Labs can claim radio astronomy, the transistor, the laser, Unix, C, and C++ among other innovations. They also scored a total of nine Nobel prizes.

Bell Labs had one big advantage: for many years it was part of a highly profitable monopoly, so perhaps the drive to make money right away was less than at other labs. Also, I think, times were different and businesses often had the ability to look past the next quarter.

Continue reading “Bell Labs, Skunk Works, And The Crowd Sourcing Of Innovation”

Predicting Weather With The Internet Of Cars

Follow this train of thought: cars have sensors, cars are in frequent use over large areas, cars are the ultimate distributed sensor network for weather conditions.

Many years ago, as I wasted yet another chunk of my life sitting in the linear parking lot that was my morning commute, I mused that there had to be a way to prevent this madness. I thought: What if there was a way for the cars to tell each other where slowdowns are? This was long before smartphones, so it would have to be done the hard way. I imagined that each vehicle could have a small GPS receiver and a wireless transceiver of some sort, to send the vehicle’s current position to a central server, which would then send the aggregate speed data for each road back to the subscriber’s car. A small display would show you the hotspots and allow you to choose an alternate route. Genius! I had finally found my billion dollar idea.

Sadly, it was not to be. Seemingly days later, everyone on the planet had a GPS-equipped smartphone in his or her pocket, and the complex system I imagined was now easily implemented as software. Comically, one of the reasons I chose not to pursue my idea is that I didn’t think anyone would willingly let a company have access to their location information. Little did I know.

So it was with great interest that I read an article claiming that windshield wiper data from connected cars can be used to prevent floods. I honestly thought it was a joke at first, like something from a Monty Python sketch. But as I read through the article, I thought about that long-ago idea I had had, which amounted to a distributed sensor platform, might actually be useful for more than just detecting traffic jams.

Continue reading “Predicting Weather With The Internet Of Cars”

Airbus To Halt Production Of The A380; Goodbye To An Engineering Triumph

Eleven years ago, the Airbus A380 entered commercial service with Singapore Airlines. In the time since then it has become the queen of the skies. It’s a double-decker airliner, capable of flying 550 passengers eight thousand nautical miles. Some configurations of the A380 included private suites. Some had a shower. This is the epitome of luxury, a dream of flying with long-stemmed glasses, a movie, and a pleasant dream in mid-air.

Now, after the cancellation of A380 orders by Emirates, Airbus has announced it will end production of this massive, massive plane. No, it’s not the last flight of the Concorde, but it is the beginning of the end of an era. The biggest and most impressive planes just aren’t economical; it’s possible to fly three 787s across the globe for a single flight of an A380. The skies won’t fall silent, but soon the A380 will be no more.

Continue reading “Airbus To Halt Production Of The A380; Goodbye To An Engineering Triumph”