Categories
Projects

Saving a Non-Profit Six Figures a Year Using Squarespace, Airtable and Glitch.com

I swallowed hard.

I was staring at a four-gigabyte website dump. There was no documentation. There was no version control. Just thousands of PHP files across dozens of directories, plus a sprawling MySQL database.

What had I gotten myself into?

The files I was looking at comprised the website for EveryoneOn, a non-profit that connects low-income families with affordable internet access. We’d been working together for a few years, since ConnectHome in the Obama era when they approached me looking for leads on new web technology providers. Their existing contract web developer cost as much as an entire senior salary, and they wanted more affordable options.

I offered them a sweetheart deal with one goal: get them to a point of self-sufficiency. There are perverse incentives for a contract IT provider — it makes sense to increase complexity, making the client more dependent, ensuring future billings. I wanted to break that cycle.

But as I looked at the innards of their site, I wondered if I was in over my head.

Technical complexity

There was a reason EveryoneOn was paying thousands of dollars each month just to keep their website online.

This thing was complicated. Multiple IT providers were involved in its maintenance over the years. A monolithic database drove everything from WordPress content to site analytics to the API that let users search for affordable internet offers.

This wasn’t my first LAMP server, but getting everything up and working took a couple of weeks of troubleshooting. With no documentation, it was a matter of trial and error to figure out how to configure Apache and MySQL to work with the years of PHP layered all over the place.

This complexity had everyday costs for EveryoneOn’s staff, too. Many changes to the site and its content had to happen through their contractor. This made the process slow and limited the control they had over their web presence.

It took some work, but once the replacement server was in good shape, we switched the domain over. My next tasks: putting out the occasional fire and coming up with a better, simpler, cheaper technology strategy.

Other people’s servers

A tangle of interdependent services hosted on a single server meant a big component of EveryoneOn’s IT costs was having someone on-call to fix things when they broke. But if we could use technology hosted and maintained by third parties, we could offload that burden to them.

I argued that the more custom code EveryoneOn was responsible for, the more expensive their technology had to be. Yet, the tasks EveryoneOn needed their technology to accomplish were common:

  • Content management system for a website
  • Analytics and statistics about web usage and offer adoption
  • Structured data about internet offers

Having bespoke versions of all of these didn’t provide a lot of value, relative to the steep costs they imposed.

But if we could use off-the-shelf tools, it would be someone else’s job to keep them online, updated and secure. Instead of spending thousands of dollars a month, the organization’s fixed technology costs could be a few hundred dollars per year.

Best of all, because these products were built to sell to thousands or millions of users, they would be more accessible and intuitive than what we started with.

Here’s how we replaced a tangled soup of PHP and MySQL data with accessible, cost-effective third-party services:

Squarespace

Cost: $218/year

The heavily customized WordPress installation gave way to Squarespace. With 24/7 customer support and so many e-commerce customers using it every day, we knew we could rely on it to stay up and running. More than that, Squarespace has an easy-to-use editing interface for both text and page layout. Now, EveryoneOn could directly edit their website design whenever they wanted.

The other part about Squarespace I liked was its design constraints. A global styles palette keeps everyone’s pages consistent. Multiple people can build pages for the same site and the typography and colors will be the same across all of them. Any changes to those styles automatically propagate later on.

For an organization without an in-house graphic designer, these details mattered a lot. Leaving them with a website that steadily drifted away from professionalism and polish in its design would endanger their credibility and their mission. No amount of automation will protect you from an ugly site, but guardrails baked into the product can go a long way.

Google Analytics

Cost: Free

Meanwhile, a large subset of the custom analytics dashboard could be handled by Google Analytics. The basics of Google Analytics are pretty set-and-forget: make sure a script is included in your page header template. In Squarespace, you just paste your site ID into a settings field.

But Google Analytics can do more than passively track pageviews. You can also track events important to your users’ journey through a site by writing some custom JavaScript code. Alongside custom event tracking, it’s possible to attach additional “dimensions” of data unique to your web app. Between this and Google’s point-and-click custom report builder, you can assemble detailed reporting unique to your business needs. From there, Google does the heavy lifting of slicing a growing data set across whatever time periods and dimensions you’d like.

Airtable

Price: $12 per user per month (non-profit pricing)

Even with Google Analytics handling much of the site behavior stats, we still needed a database.

But more than that, we needed a tool that made data accessible. MySQL is arcane technology. Even its popular GUI, PHPMyAdmin, isn’t especially user-friendly. If you’re not a software developer, and if no one has bothered to write some code exposing the database content you want, the data may as well not exist.

Airtable changes the game considerably. It has all of the user-friendliness of spreadsheets, with all the technical benefits of a database. It’s easy for anyone to read, filter or edit Airtable content — even niceties like copy and paste work great.

Yet, as a database, fields are formatted, structured and validated. You can create relationships between records in different tables. Because of this, Airtable is even better than spreadsheets for easily setting up fields that lookup data automatically.

It’s by far one of my favorite pieces of modern software.

In Airtable, we had a tool that could store relationships between zip codes and relevant internet connectivity offers. It could store data about partner organizations, and display it on the website when relevant. It could even store real-time events also being sent to Google Analytics, letting EveryoneOn audit the data at the foundation of their reporting.

Because Airtable has an API.

Glitch

Price: Free

That brings me to Glitch. If you’d told me six months ago I was using Glitch for website infrastructure, I wouldn’t have believed you.

But while we had plenty of great new tools maintained by someone else, there was one snag: a small percentage of EveryoneOn’s web technology would still need custom, server-side code. Not thousands of files’-worth anymore, thankfully.

Still, the process that matched user zip codes to the internet offers available to them, then displayed the offers on a web page, was unique, and Squarespace offers no facility for server-side code. I fretted over this for a few months. My initial plan was a $5/month DigitalOcean instance to host the custom code.

This wasn’t ideal. The barrier to understanding how to administer something like that can be significant. The more complex their custom technology was, the more challenging and expensive it would be for EveryoneOn to make changes to it in the future. For so much of the website, I’d managed to find hosted tools that were accessible to many technology skill levels. I hated the thought of an inscrutable, hard-to-reach black box sneaking into the process after all.

Around this time, Glitch came out of beta. Having a look at its limitations, I realized it could more than handle EveryoneOn’s traffic needs. Glitch provides on-demand node.js sandboxes where you can write any server-side code you want. Even better, there’s built-in, automatic version control.

While I was a novice with node, it didn’t take long to build a replacement implementation of EveryoneOn’s offer API using Airtable as the storage mechanism. From there I built a few more Airtable wrappers for other data the organization needed to display on its website.

I was especially tickled when it came time to migrate their offer search widgets. These were PHP-based micro-pages that allowed third parties to embed EveryoneOn’s search into their own site. Using Express and the EJS templating package, it was quick work to build an emulator that served widgets at the appropriate .php URLs. So the implementation changed completely, from PHP to JavaScript, but the change was transparent to end users. No one had to make any updates to their pages.

What I found in Glitch was the perfect toolbox for adding custom functionality to a website. It’s easy to get started — you just click a button to create a new project. You don’t need to understand ssh or SFTP to make changes later on. You don’t need any special software. If you have a web browser, you can edit the code.

Which means that anyone who knows or can learn JavaScript can expand or enhance these services later on. With automatic version control, the sharp edges are dulled. If they break it, they can roll back to a known-working state no problem. Because of Glitch’s per-project sandbox model, each service is isolated. Breaking one doesn’t harm any others.

My one gripe with Glitch: I’d feel so much better if I could give them some money to ensure their long-term success. Cash for custom domain names, cash for higher service limits — hell, even a tip jar.

Still, Glitch allows you to easily export a project to GitHub. Worst case scenario, someone can dump out these projects and run them on a node server.

Long term effects

These services aren’t a 100% replacement of the beast we started with, but we were able to handle the vast majority of the old tasks using tools that are much easier to understand, and orders of magnitude cheaper. Annual fixed costs are down from six figures to under $1,000. While some custom code remains, it’s only around a dozen files, it’s well-documented, fully version-controlled, and editing is easy. A digital binder of documentation, hosted as a Google Sites wiki, provides an overview of all services, with explicit guidance on how to make changes. Best of all, there’s nothing for a future contractor to hold hostage. EveryoneOn directly controls every account that drives their web presence.

The project dramatically reduced the scope of custom code to maintain, while also bringing the number of servers to administer down to zero.

I don’t want this to be seen as a post bashing WordPress, or LAMP generally. Sometimes that’s the perfect combination of tools for a job.

But while running your own server was once the only way to solve these sorts of problems, we now have more options available. It’s exciting to see how a handful of hosted services can be composed to create a dynamic site that reports ample business intelligence, while still being user-friendly and cost-effective for a non-profit. Instead of needing an experienced system admin, now EveryoneOn can advance their web needs with student interns or volunteers — anyone willing to learn basic JavaScript.

While saving EveryoneOn some cash from their operating budget is a great start, they still need help getting more than 60 million people connected to high-speed internet at home. Kick them a few bucks to support their mission closing the digital divide.

Categories
Explainer

Inclusion is a captain’s job

How do you explain inclusion?

I was having dinner with a colleague who challenged me to frame this both succinctly and accessibly. This sprawled into a lengthy tangent on how your identity can completely change how you’re able to talk about inclusion. If only there was a way to establish common ground.

It reminded me: I had discovered a Rosetta Stone. Maybe you’ve heard of it.

This is adapted from a talk I gave at the 2016 Code2040 summit, first workshopped with the kind support of BrooklynJS.


We are on a strange and difficulty journey, we who build the internet. We explore a frontier of reach and impact unprecedented in human history.

It seems we can automate anything, as self-driving cars prowl our streets and unmanned drones harass the developing world. The power of automation and global communication is rife with surprises and unintended consequences. As the results of these advances impact the entire planet, it is just and appropriate to have broad representation among those building the future.

To do that, you need diversity. The only way to maintain a diverse culture is to build an inclusive workplace. Luckily, there’s a training series available on Netflix, right now.

Why Star Trek?

While it’s a fictional organization, Starfleet models some of the most profound inclusion challenges you can imagine. The United Federation of Planets is an interstellar government spread across 150 different civilizations.

Starfleet’s mission profile is diverse. It’s more than a spacefaring military—its work is scientific, diplomatic and exploratory.

With 150 different member worlds, countless more aliens besides, and a vast set of problems to solve, inclusion practice is non-negotiable. They either get it right or fail in their missions.

Let’s check out some examples.

Datalore (TNG S1E13)

Inclusion is not about being perfect, telepathic or omniscient.

Sometimes, inclusion is about accountability and communication.

In this scene, the crew of the Enterprise has just discovered that their android officer, Commander Data, has a brother. Data and Captain Picard are talking about what this discovery means.

Data is pretty marginalized at work. Not only is he the only android on his ship, he’s the only android in Starfleet. Until meeting his brother, Data was the only android of his type in the universe. So this is a sensitive, important moment for him.

All the reasons that marginalize Data also leave Picard unprepared for certain parts of this conversation. The captain is using the wrong pronouns and Data calls him on it. In an abundance of empathy, Picard immediately sees his misstep and apologizes. No defensiveness — in fact, Picard’s body language signals that he yields to Data’s point even before he speaks.

Part of why this works is trust. Not everyone is going to feel confident calling their leaders on a misstep around their identity. Leaders have to create an environment where their crewmates can speak up when this happens. If they don’t, it’s hard to correct things like this, and inclusion only gets harder from there.

Ensign Ro (TNG S5E3)

Other times, inclusion is about recognizing when the current policies aren’t enough to honor someone’s sense of identity.

Let’s meet Ensign Ro Laren.

Ro is a Bajoran. Her people have been colonized by brutal, murderous conquerers for the last hundred years. She’s not easy to get along with, but she has good reasons for the chip on her shoulder.

So, Riker doesn’t like her earring. But that earring is a source of pride in her culture, and a symbol of her faith. It represents part of who she is. You can see how unhappy she is about this.

Later, after Ro finishes her mission, she wants off the ship. Hell, she’s ready to leave Starfleet. But Picard sees her value and tries to persuade her to join his crew.

Picard tries to understand Ro’s motivations — and he makes it clear that, even though she’s different, even though she’s difficult, he believes in her and wants to help her grow.

The captain recognizes that Ro is going out on a limb for him. If letting the earring slide is what’s necessary for her to feel proud and included on his ship, he’s happy to accommodate. The uniform rules are not more important than her workplace dignity.

The Sons of Mogh (DS9 S4E15)

Sometimes, inclusion is messy. Sometimes, you’re going to run aground of problems you never expected.

In this scene, Worf has tried and failed to kill his brother. While you or I might find that repugnant, his brother asked to be killed, to be spared a life of dishonor. In their culture, this is permitted.

All right. So Captain Sisko’s pissed.

He asks for an explanation. He gets one.

He’s not that impressed with what he’s hearing. But what happens by the end? Worf keeps his job, he’s not charged with anything. Sisko is able to be angry and set boundaries. But he still considers cultural context in responding to the situation, rather than blindly following a standard response.

Eye of the Needle (VOY S1E7)

Inclusion is also full of blindspots. There may be things that marginalize your crew that you don’t immediately realize.

Addressing those blindspots requires trust, especially since those marginalized may not feel comfortable speaking up themselves. Sometimes it falls to their crewmates, who may feel more secure discussing these problems with leadership. If leaders don’t have a strong, trusting relationship with enough of their crew, they won’t hear about problems, and they will snowball.

So Captain Janeway’s skeptical. But she listens. By the end, she’s clearly startled that she couldn’t recognize this problem herself. Kes, meanwhile, holds a firm line. To her, their artificially intelligent doctor, again, the only one of his kind on the ship, is a real person. Kes is not okay with any behavior that makes the Doctor feel like an outsider.

She persuades Janeway to investigate and make changes.

The tip of the iceberg

The Star Trek canon is about diversity, from the beginning. Finding ways to include people is a basic part of any captain’s job. There are hours and hours of this stuff buried and waiting for you on Netflix.

I love Star Trek as resource for finding models for these tough conversations. I hope you’ll find it useful through this lens as well.


Learn more:

Star Trek’s Uhura Reflects On MLK Encounter
Nichelle Nichols caused a sensation in the 1960s for her role as Lieutenant Uhura in the classic television series,…www.npr.org


This was lots of fun to do. Thanks Code2040!

Categories
Explainer

Intro to 21st century economics

Go beyond the money

The usual discussion of economics would have you believe it is the study of money. While money is surely essential to any economic conversation, it’s just an abstraction on top of the true interest of economics:

Energy scarcity.

Economics is the study of how scarce resources are allocated to keep us alive. The most scarce resource we know of is energy.

It begins out there

The universe is trying to kill you.

It’s just not trying all that hard.

A basic truth of physics is that any concentration of energy will, eventually, diffuse away. Your mug of hot cocoa will lose steam, the sun will burn itself out, and the universe will one day go cold.

You needn’t worry about the sun or the heat death of the universe. We’ll be long dead before those problems arrive. But the hot cocoa is a lot closer to home. It’s an object lesson. Just like the cocoa, one day soon you, too, will go cold.

The only question is when. You can push that date off further and further by adding and preserving energy within the biological system you call your body.

Spend too long in the cold, the energy in your body leaches out and you’re dead. Go too long without food, your body spends all its stored energy and you’re dead. Leave a disease unmanaged, your body expends all its energy managing a broken system and, eventually, you’re dead.

You get the point.

I don’t mean to be morbid. I only point this out to underscore the importance of economics — that is, our study and management of scarce energy. While economics is steeped in obscure terminology and inaccessible, complex theory, it’s just about as important as your own heartbeat.

Basics of energy economics

We live on a planet positioned around 93 million miles from a ball of hot plasma we call Sol. The sun accounts for 99.86% of the mass in our solar system. Most of that is hydrogen, which the sun converts into energy by a process called fusion.

Sol outputs so much energy, you and I don’t have a meaningful frame of reference for it. After all, this energy is enough to warm up a ball of water and dirt 93 million miles away.

For as long as humans have been alive, and much longer than that, this basic setup has powered economics on planet earth.

It works like this:

  1. Unimaginable quantities of energy leave Sol
  2. Plants on earth absorb part of that energy in the form of light. Light energy sustains the plants and allows them to grow
  3. Animals come along and eat the plants. Chemical energy sustains the animals and allows them to grow
  4. We eat the plants and animals

Simple, right? Plants and animals are self-sustaining energy storage devices. Ecosystems are biological power plants, fueled by the sun.

Unique among other life on earth, humans are able to make plans and share them with others. Humans have been harvesting energy from ecosystems for over a hundred thousand years. Most of this time was spent in a process of hunting and foraging inside of existing systems.

Bands of humans would roam the Earth’s fertile countrysides in search of tasty ecosystems, moving from place to place as circumstances and scarcity demanded.

But ten thousand years ago, something changed.

Imposing order

Over time, humans discovered that they could build their own simple ecosystems. This event is often called the agricultural revolution. It fundamentally changed human society — and thus, economics.

Under agriculture, land was seeded with valuable plants and animals. This stock was carefully tended by humans. Instead of roaming, humans found the land that was most productive for farming and stayed there year after year.

This led to the first permanent settlements — villages, towns and cities.

Through farming, predictable energy could be harnessed from the sun, leading to the growth of populations who build agricultural settlements. Farming also allowed for free time to enjoy leisure and perform experiments. It necessitated tools for working the fields and tracking inventories.

Newly abundant energy opened the doors to technological and cultural advancement. Math and writing emerged as critical early systems for managing the agricultural revolution, forming the foundation of everything we think of as civilization even thousands of years later.

Resulting chaos

While human-accesible energy in the agricultural age was much more abundant than in the past, scarcity still reigned. For one thing, the earth’s surface is 75% water. Of the 25% that’s land, only a fraction is actually usable for agriculture. Factors like elevation, access to water, soil fertility, and overall climate make a huge difference in the agricultural value of any given scrap of land.

While conflict afflicts all animals, agriculture pushed humanity to perfect war and politics.

Farming laid the foundation for accomplishing all other work, from mining to pottery to painting. Without a strong agricultural base to feed your population, nothing else was possible.

While always dressed in various flavors of principle and ideology, war has always been about settling beefs with force. Those beefs are invariably rooted in who gets access to what scarce resource, and under what terms. Ideology was, and remains, a useful means of a creating an other, whose destruction and resource plunder was justified by strangeness of values and culture.

Because agriculture was so essential to power, it also became the first center of labor injustices. The prosperity of farming was not always shared fairly with those who tended the fields. Indeed, in the United States alone, trillions of dollars in value was created through the forced labor of African slaves. These individuals had no individual liberty. These humans were held as property because they had no political power and their service to agriculture had the potential to create extraordinary wealth.

Colonialism was also rooted in agricultural exploitation. Colonies were founded on land that was especially fertile, with no consideration paid to indigenous peoples whose use of that land went back generations.

Even gendered oppression, still rife in the 21st century, has an agricultural basis. Humans were labor power, and women were the source of all humans. Thus, controlling women’s lives through laws, culture and social taboos was essential to controlling the production of agricultural labor power.

Next episode

Tending to our energy needs has completely shaped human culture.

And that was even before the steam engine. With that invention, humanity discovered an extraordinary new direction of converting energy into work. To serve this innovation, we started pulling more and more fossil fuels out of the ground.

With the coupling of an old energy source to a new tool to harness it, technological innovation exploded. We call this the industrial revolution.

But was this really a new fuel source? Whether coal, petroleum or natural gas, fossil fuels are the result of ancient plant and animal life. They’re the sun again, stored and concentrated beneath the earth’s surface.

Just like agriculture, fossil fuels are rooted in scarcity. They’re not evenly distributed. They’re not always easy to discover or extract. And unlike plants, once we use up fossil fuels, they’re gone. One day, we’ll run out.

Still, the energy multiplier of engines and fuels sent humanity hurtling to all new frontiers. While humans can’t directly consume fossil fuels, they’ve nonetheless completely altered agriculture. Machines have automated much of the hard labor necessary to farming. In 1900, 41% of US labor was dedicated to farms. By 2000, that had dropped to just 2%.

US labor, freed from the yoke of the farm, expanded into myriad other industries, from manufacturing finished goods to entertainment to finance. Still, this labor surplus hasn’t been without its downsides. Black communities, disenfranchised by hundreds of years of economic theft, find their young men disproportionately incarcerated. As the need for labor shrinks, populations turn to more and more desperate means of survival.

Money == survival credits

Money is an abstraction on top of the chain of energy conversion between the sun and you. Because that chain is filled with inefficiencies, risk and adverse politics, there’s not always enough money — enough survival — to go around.

Which makes survival a struggle. We use money to access the basics necessary to maintain our own energy supply. Food, shelter and clothing are all essential to keeping our systems running. They all cost money.

It gets complex, too, because there are so many systems layered between ourselves and our means of survival in the 21st century. For example: it’s not just that clothes keep energy from leaching out of our bodies. They also signal to others whether or not we should be allowed to participate in the systems of survival themselves.

Thus, it’s a lot easier to get more money if you already have some. If you don’t, breaking the cycle of resource scarcity is a lot more challenging. It’s expensive to be poor.

An energy efficiency revolution

100 years after the agricultural revolution, humanity sped up even more.

In the 1970’s, the microprocessor changed everything about how work could be done. Packed with systems of logic, computer chips made information processing a completely automatic affair. Chips could sort data, communicate between systems, and even direct the efforts of robotic manufacturing.

Chips allowed energy to be converted into work in a way we’d never seen before. Look what happened.

via EPI

With this incredible automation of labor, it became possible for a small number of people to keep and hold a vast chunk of economic output. While later policies further contributed to wage stagnation, it is the microprocessor that’s the longest lever in creating 21st century wealth inequality. With more and more industrial processes reducible to something that can be handled by a computer — that is, an object whose entire output can owned — the need to share in wealth creation with other humans continues to shrink.

Indeed, the most reliably lucrative career direction in the 2010’s has been the work of directing microprocessors to do the bidding of humans. Scarce access to the skills necessary for computer programming has limited the pool of people able to participate in that industry. With scarce labor on one side and enormous riches on the other, many software developers enjoy a uniquely powerful negotiating position that leads to generous pay and often favorable working conditions.

For now.

Surviving until the greatest revolution

Exiting energy poverty will be the greatest revolution humanity has ever seen. As more of the sun is harnessed, as new physics is pioneered, we will find energy abundant enough to meet the survival needs of more and more people.

With energy abundance will come, far down the road, the opportunity for a shared prosperity, safety and global peace like we have never known.

Until that door is opened, though, we still have to get by. In a life of energy scarcity, the most important strategy is continually building processes for yourself that multiply finite resources to keep you alive.

While making money through selling labor as a software developer is often provided as an ideal means of economic mobility, that strategy doesn’t go far enough. The most powerful survival tool today is owning a business that’s run with microprocessors.

Successful digital businesses efficiently convert ideas into software that solves problems. In exchange for solving people’s problems, people exchange some of their survival credits. If you can give customers a better use of their finite energy by freeing up some of their time and effort, they’ll gladly cut you in on some of the resulting survival surplus.

That’s not a bad deal. It’s a deal that lets you build wealth as you sleep.

So if you want to get by in the 21st century, don’t stop at being a software engineer. Be a digital business engineer. Build a system that blends software and understanding people’s needs into a machine that helps you and your customers win. That’s the play. That’s how you build the most bulletproof protection against an uncertain future.

That’s what I’d do, anyway.


Learn more:

Sapiens: A Brief History of Humankind
This book is a cheat guide for the basic workings of our civilization.www.amazon.com

Labor and Monopoly Capital: The Degradation of Work in the Twentieth Century
Everything that ever bothered you about the workplace, explained.www.amazon.com

The Role Cotton Played in the 1800s Economy
By the 1860’s, the value of the slaves was “roughly three times greater than the total amount invested in banks.” www.pbs.org


Credits:

Iconography courtesy The Noun Project.

Polymer by Chameleon Design

Leaf by Yi Chen

Man by Lisa Staudinger

Bison by Jeff Cont

Microbes by Sergey Demushkin