Strongly Emergent Blog

Computers, humans, and narrative

The Prisoner of Zend, Duh

It is surely not news to you that PHP is awful: there is a thriving sub-genre of tech blog posts about how very, very bad PHP is. It should tell you something about what a clown rodeo PHP is that even in the presence of Eevee’s magisterial “PHP: A Fractal Of Bad Design” article, so many of us feel compelled to contribute to the vast body of PHP-criticizing literature anyhow. For my part, even after acknowledging excellent works like “Fractal Of Bad Design,” man-of-mystery Pi’s “PHP is a low-level programming language at the wrong level,” and Watts Martin’s pungently-named “PHP is not an acceptable COBOL,” all written by pals who are smarter than I am, I still am called to add to the discourse. There are plenty of languages that one may dislike, and there are plenty of warts on any language one does like—and yet, PHP is sui generis in its terribleness.

Before starting in on my own complaints, I’m going to stop and acknowledge another rant: during Leonard Pierce’s delightfully funny and acerbic chronicle of hating Billy Joel, there is an aside that answers very well the question of why people hate PHP in a way that people almost never hate JavaScript, C++, or Visual Basic, deeply flawed languages all of them.

Just as one can argue that there were better World Series teams than the 1927 New York Yankees, one can argue that various performers have written worse songs than those produced from the depressingly fertile mind of Billy Joel. “Yummy Yummy Yummy,” to cite an older example, is certainly the product of a nightmarish hatred of all humanity, and arguably worse than any Billy Joel song. To cite a more recent example, “My Humps” offends the soul and mind in ways to which only the most cretinous songs by the Man from Hicksville can aspire. But while there are those who can honestly contend that the ‘27 Bronx Bombers were not the greatest of all World Series teams, no one—not even those who hate the Yankees with a soul-scorching fire, as do all right-thinking humans—can argue that they are not the best baseball franchise ever. The numbers simply speak for themselves. No other team has even remotely come close to topping their total number of world championships. Similarly, no other performer or group has ever had so many horrible songs become so successful on the charts as has Billy Joel. Others have been worse; others have been bigger. But no one has been bigger and badder at the same time than Billy Joel.

No one has been bigger and badder at the same time than PHP.

The things that make me most unhappy about PHP center around the fact that software development does not happen in a vacuum. Our choices as developers affect others, including our future selves. Most of the substance of the writeups that I’ve cited is devoted to PHP’s legion of failings as an abstract tool for computation: they’ve got that well-covered. What I want to focus on is PHP’s catastrophic badness as a participant in a living ecosystem of software projects, tools, and traffic (this is where I think Jeff Atwood deeply misjudged PHP). There are three broad areas of failure here:

  • PHP is the avatar of technical debt
  • The flagship PHP projects are bad examples
  • PHP’s flaws grievously pollute the commons

In all three of these areas, my beef is the effects that PHP-the-language and PHP projects have on the world around them. The ways in which PHP is broken as a tool for computation, lead directly to the ways in which the software written in PHP is broken as a tool for improving people’s lives.

The Avatar Of Technical Debt

One of the most visible ripple effects of PHP is the effect is has on maintenance programmers and on “consumers” of code. Even stipulating that the newest versions of PHP are tremendous improvements on PHP4, legacy code is still a thing in general, and PHP’s specific shape makes it more of a problem for PHP than in the general case. Because of the tremendous obstacles to setting up something like Python’s virtualenv or Ruby’s rbenv in the PHP world, the uptake of new versions of PHP is disproportionately impaired by the most out-of-date libraries or language features being used. “Past technical decisions making it harder to make the right technical decisions in the present” is pretty much the definition of technical debt.

The obstacles don’t have to be insurmountable to keep people from upgrading. It just has to have friction somewhere in the process. The difference between “easy enough that people can do it” and “easy enough that people do do it,” is significant. PHP is on the wrong side of that difference: breaking changes have been introduced in minor versions, for example. And the bigger the PHP codebase you’re maintaining, the slower your upgrades will be, because you have a ton of surface area to deal with and you can’t use something like virtualenv or rbenv to attempt an incremental update of either PHP itself or of any library or C module you may happen to be using. The cost of upgrading rises faster than with other languages because of this: you have fewer ways to escape dependency traps.

On top of this, PHP has enough gotchas, pitfalls, and required boilerplate that reading it carefully is difficult. You don’t need to read code like this all the time, but there are times when you absolutely will need to read code like this—the most benign example is when you pick up your own code that you haven’t worked with for a while, but you’ll also read code this way when you’re reviewing it in an appsec-centric state of mind. PHP makes this task harder, and so artificially increases the amount of technical debt you take on, whether you’re working with your own code or others’. Which version of PHP was this file written against? Does this function require a particular ini_set() invocation that could be clobbered elsewhere? Does this if-block behave correctly when the result of an expression is 0 instead of FALSE? Does all the code use === instead of ==? Does this function behave acceptably if one of its variables gets clobbered by a global?

Maintaining PHP code has too much friction for people to do so diligently in practice. This is why the “you can write FORTRAN in any language” rebuttal to criticisms of PHP is so utterly bankrupt: PHP does not just make it possible to write bad code, its quirks actively make it harder to write good code. One of Perl’s slogans is that the language “makes easy things easy and hard things possible.” PHP, as though coming from a mirror universe with a sinister goatee, makes easy things hard (behold the absolute train wreck of PHP’s comparison operators) and hard things impossible (largely because PHP is meant to die). In a perversion of good language design, a concise and readable piece of PHP is more likely to have bugs, not less. I call PHP the avatar of technical debt because using PHP at all is incurring tremendous technical debt that comes from this friction with libraries and ensuring good code. You can write good code in PHP—but it’s harder to know that you’ve written good code, the good code will be longer, and the cost of updating the language and libraries makes it harder to get good code into production.

Critically, this technical debt is almost always an externality: it is a cost that the person writing the code doesn’t have to pay. Instead, the cost is borne by future engineers and users who might as well be strangers. Beware of externalities! If you are not paying the real, full costs of your decisions, you will be led to make bad decisions. Because PHP fails to make the right thing easy, it tends to make the wrong thing the default—and the costs of dealing with the wrong thing are all too often externalized, whether that’s from a coder to their future self, from an engineer to a sysadmin, or from a vendor to the users of software.

Don’t Follow The Leader

When the question of PHP’s awfulness comes up, inevitably someone tries to use Wikipedia, Facebook, and WordPress as examples of PHP’s success. Even if you leave aside how that’s like saying that Harvard is an average American university, Wikipedia, Facebook, and WordPress all have significant problems that are directly attributable to their decision to use PHP! If you are not prepared to deal with those problems, then you had better not use PHP. The fact that Wikipedia, Facebook, and WordPress are all built on PHP is insufficient to demonstrate that you personally should use PHP for anything: you have to know more about how those projects work and the tradeoffs they made, to know if their use of PHP recommends PHP for your application.

Wikipedia is the easiest example to pick on here, because they provide all the damning evidence themselves. Go and check out a copy of the MediaWiki source code (I’m going to treat “Wikipedia” and “MediaWiki” as mostly synonymous here) and take a look at it. Reflect on how many engineer-hours it took to get the project to that state, and how many more hours are being requested. Reflect on the contents of their “Annoying Large Bugs” and “Annoying Little Bugs” pages. If you want to use Wikipedia as a role model, being blind to Wikipedia’s flaws is a terrible idea.

Because Wikipedia is such a high-profile target (huge PageRank points, huge repository of user-generated content, huge mindshare) there’s a steady record of vulnerabilities with MediaWiki. If you get into the plumbing of Wikipedia, get under the layer that just presents pages to visitors, get familiar with the greasy-handed wiki-gnomes, you’ll find all kinds of interesting infrastructure designed to cope with this. I wouldn’t like to see anyone argue that Wikipedia is a bad project. It’s a triumph of the open-source ethos, and an incalculably valuable community resource for the entire Internet-using population. But as an engineering project, you should be very careful about emulating it. You should make sure that you can invest proportionate engineer-hours into security and maintenance—and that you account for how a PHP-based project needs more of those hours.

Speaking of gigantic quantities of engineer-hours, there’s Facebook. Facebook is an even worse choice as an example of PHP’s success, because Facebook has effectively forked PHP. Look at their HipHop PHP project: it’s replacing the default PHP interpreter wholesale, and replacing Apache/mod_php as well. You shouldn’t use Facebook as evidence that your project should use PHP, because the way you use PHP is not like the way that Facebook uses PHP. Facebook basically ended up writing their own entire PHP toolchain! This is probably not the way you want to go for your project.

On top of that, there are ways in which Facebook’s usage of PHP is dubious, or at least suggests that they would rather not be using PHP. Before the current version of HipHop, which is a VM that executes PHP, they were cross-compiling to C++. When “cross-compile to C++” makes your project less painful, that’s a bad sign. This loops back to the “avatar of technical debt” thing. Facebook at this point is trapped in PHP and making the best of it: they have a bigger PHP codebase to maintain, so they’re more trapped. They’re up to the point where they’re compiling PHP and doing static-analysis optimization on it—which is to say, they are doing original computer-science research, because PHP’s internals are that much of a mess.

WordPress is also not a good PHP role model: it’s gotten better over time, but the direction of its evolution is away from “blog” and towards “maximalist content management system,” which means expanding the attack surface. WordPress is actually less of a bad PHP role model than Wikipedia and Facebook: rather than being a giant application hosted and administered by Someone Else, WordPress is a PHP application that you can download, install, and investigate for yourself. They’ve invested a lot of effort in making that part easy.

Unfortunately, “easy PHP” is pretty much always “insecure PHP.” So WordPress has a long track record of nasty vulnerabilities. It’s also saddled with a reputation for spam—being the easy choice, a platform that you can set up yourself with no gatekeeper (compare to Movable Type, professionally hosted WordPress installations, or Blogger instances), it’s become the choice for people who want to automatically deploy large numbers of WordPress instances targeted to specific content/keyword niches. Then there’s the architecture matter: maybe this is just taste, but I find things like rewind_posts() inherently suspect (and there are unproven allegations of grotesque features lurking in the codebase). More substantially, there’s mutable global state lurking all over the place (on top of the distressing action-at-a-distance issues PHP inherently has—see Eevee’s writeup for more about that), the app buys into the “sanitize input” voodoo, and like most PHP apps, it requires a bunch of read-and-write access to its environment that a better app wouldn’t. This is part of the ongoing security problem WordPress faces—which leads us to talking about PHP’s role in software platforms and ecosystems.

The Superfund Site Of Programming Languages

At this point we need to get abstract for a minute. Part of why infosec is important is that we do not create, modify, or use software in isolation. We interact with software in a social context, in a technological context, in a networked context. Similar to how herd immunity in medicine means that the chance of catching a particular disease is unevenly distributed, software vulnerabilities are dangerous even to people who aren’t running the affected software. The most common thing that an attacker might do with a compromised machine is suborn its resources, using it to propagate further attacks (e.g. having it join a botnet). This is why it’s particularly dismaying that PHP is so big and so bad: even if I don’t run anything based on PHP myself (or based on its co-conspirator in suckitude, MySQL), PHP is still a problem for me.

The problem is severe, too. A security researcher finds that of sites vulnerable to password dumps, most are built on PHP. A remote-code-execution vulnerability in two of the most popular WordPress plugins is discovered—and the subsequent patches have an utterly dismal uptake rate. There are a multitude of PHP-based server control panels that have deeply disturbing security problems of grave severity. A search on GitHub reveals a multitude of PHP projects open to a trivial SQL injection attack. A bug in parsing URLs—surely an action that should be a core competency for a “web language”!—turns out to be implemented in the shoddiest way.

The popularity of apps like WordPress exacerbates the security problems: WordPress has become a platform as much as it is an app, and the difficult transition from app to platform, it has had trouble with. When you run WordPress, the potential problems are determined not by the worst code you wrote nor the worst code that the WP team wrote, but by the union of that code and the worst code that the authors of any plugin or theme you use wrote. There are a huge number of WordPress themes and plugins, and they can effectively run anything—my favorite example is RePress, which staples a web proxy onto the side of your blog for the use of folks in locales where services like Google and Wikipedia are blocked. WordPress is a particularly problematic example because its target audience is non-engineering users. Someone who sets up an instance of MediaWiki, Joomla, or Drupal faces a higher barrier to entry than a WordPress user, who is the beneficiary of vigorous and successful efforts to make WordPress accessible to a wide audience.

Unfortunately, that experience of easy-to-install software ends up recapitulating the experience of the Windows 9x era: it’s easy to install something that creates an opportunity for attackers, and not easy to tell ahead of time which things you install belong in that category. In WordPress’ case, some of its most high-profile plugins, like the TimThumb image resizer and the caching plugins discussed earlier (and by the way it speaks very poorly of WordPress that two of the most popular plugins are caching hacks attempting to work around WordPress’ run-time inefficiency), have seen remote-code-execution vulnerabilities that can be exploited at scale, by botnets—and which are particularly likely to succeed against users of WordPress whose blogs and their upkeep are not an every-waking-moment concern.

I worked with Magento professionally for a while, and one thing that gave me massive creepy-crawlies about it was that it has the same problem as WordPress in the form of a wild and problematic plugin ecosystem, but centered around an app that’s meant to be handling people’s credit-card information. “All the security of WordPress, but handles credit-card data!” does not inspire confidence. At least with eBay now running the show, there’s a good chance that Magento will have the budget to shape up security-wise.

If the problems I’ve been talking about only affected the people actually running that software, I’d care far less. It’s important that people have to some extent the right to make their own dang mistakes. But these things don’t happen in a vacuum. Every unpatched MediaWiki install sitting around, every forgotten WordPress instance, every homebrew app quietly chugging away, is susceptible to becoming part of a botnet and worsening the state of the entire Internet. Every machine that gets rooted, is another machine conducting attacks of one kind or another—and even if I run my own servers on the magical free-ponies language of sparkles and no security vulnerabilities ever, a legion of zombie PHP-running boxes can still just throw denial-of-service attacks my way until it doesn’t matter what I’m running.

This is why it matters that PHP is both big and bad: by being both ubiquitous and insecure, it pollutes the commons. It adds unncessary cost and friction to any project we undertake that’s connected to the Internet—that is to say, nearly everything. Every server that connects to the Internet has its attack surface artificially enlarged because PHP’s own attack surface is so vast. Programming doesn’t happen in a vacuum, it happens in an ecosystem—an ecosystem that PHP-based systems have a long and terrifying track record of dumping nuclear waste into.

Sean M

Sean M

I’m a Python web developer living in Arizona.

First Date With Ruby

Last night I took a notion into my head and wound up spending a solid few hours with Ruby. I’m happy with how that went! There’s some first-time-with-a-new-language friction, but nothing out of the ordinary. Here’s what I came up with, and afterwards, why I chose that and what I think it shows that I accomplished that.

This creates a new Liquid tag, {% music %}, which can be inserted in page templates. I added it to my footer.html after the byline, timestamp, and categories. The tag checks whether the post’s YAML front-matter has data for a musician and a track name. If the post has that data, the plugin attempts to create a link to the iTunes Store for the given track. With makeItunesTarget() it puts together a URL that is a query to the iTunes Store Search API, with getFromItunes() it loads the query URL and hands off the response to the standard library’s JSON parser, and with makeAnchorFromItunesData() it takes the first search result and generates text to use for an <a> tag and a URL to use for the tag’s href attribute (if you have an affiliate code for the iTunes store, it’ll be inserted). Finally, there’s a convenience function, getMusic(), that just composes the previous three.

Part of why this worked well is that it’s another project with limited scope: I had a specific objective in mind, so I was able to keep moving gradually towards it. However, that limited scope was a way of making progress towards the broad goal of “learn Ruby” and also took on the medium-scope goal of “learn the iTunes Store Search API.” As a practical matter, learning to work with other people’s APIs, whether they’re libraries, services, or daemons, is an important skill for a working programmer; toy projects that include cultivating that skill are good uses of my time. Learning new languages is also a career-long thing: for all the talk of Lisp being “the hundred-year language,” no-one now working as a programmer will be programming in just one language for the rest of their days. There are shell scripts and libraries and wrappers: there is a fragmented world that despite the friction of fragmentation, would not actually be better-served by a language monoculture. In addition, there are plenty of exciting things out there whose roots are in Ruby, so I was enthusiastic about picking up a smattering of Ruby.

I’m definitely fond of Ruby so far. Part of this is because I’m getting to the point where I’m seeing parallels with other languages and able to make good guesses about how a new language will behave. I was able to guess from reading source “oh okay, Ruby is one of the languages where the return value of a function, if not explicit, is the value of the last statement evaluated in its body,” was pleasantly surprised that it has the same tuple-packing return-multiple-values feature as Python, and noticed “oh hey neat, there’s a Scheme-like function!() naming convention for functions that mutate their parameters.” So that’s all good stuff.

Part of choosing Ruby, too, is that I’m currently blogulating via Octopress, which is built on Ruby. Most of why I chose it is that Wordpress is awful (on the axes I care about), but now that I’ve chosen it, I want to have a grasp of how it works. That means learning Ruby and tinkering—which I’m looking forward to.

As a supplemental note, if this stuff sounds to you like a good attitude for a programmer to have, you should hire me.

Sean M

Sean M

I’m a Python web developer living in Arizona.

Don’t Let Survivorship Bias Lie to You

In an interview recently, David Kirtley pointed out that in business school there’s this point made that if you interview rich people who have won the lottery, you might come to believe that playing the lottery is the only way to become rich. I thought that was interesting. One of the things I’m constantly trying to point out is that we’re not doing nearly enough to highlight both median and failure modes, because that’s where the real lessons lie. As for myself, I find message boards where new writers struggle to sell more than a few copies interesting, and where I harvest data about the low end.

Tobias Buckell is writing for writers—but as someone with both a writer-brain and an engineer-brain, I read him as someone talking about startups as well. Looking at the home-run billion-dollar-valuation startups will certainly tell you some things worth knowing, but it won’t and can’t tell you all the things worth knowing. There are also a lot of things worth knowing that you will only find out by becoming a student of failure.

This is part of what calls to me about Lean Startup stuff, about the developing startup-culture communal knowledge about how to best learn from failure and how to rapidly iterate such that you have a lot of relevant but non-terminal failures to learn from. Life is not all success, and one of the things that you have to do to set yourself up for earned success, is to learn from failure.

Sean M

Sean M

I’m a Python web developer living in Arizona.

Stories Mattering

One of the things that a startup needs is a story. Trust me (and Seth Godin), you desperately need a story. The fact that you need a story is a whole genre of blog post, but right now I’m here to share a very short anecdote about it.

Here is how you can tell that stories get into people’s heads: if you ask people, “Are vampires real?” they will answer No. But if you ask those same people “Can vampires can be killed with a wooden stake?” they will answer Yes. That is why stories matter.

(h/t to Fred Clark for the vampire question)

Brighid M

Brighid M

San Francisco, Lisp, motherhood.

JavaScript Rehab: GardenWeb

Today’s JavaScript Rehab patient is the GardenWeb forum. I’m going to use a thread about cleaning grout as an example. At the time of writing, here’s what it looks like:

"A screenshot of a thread on the GardenWeb forum."

My problem with this starts with their <noscript> block: it says “JavaScript must be enabled for the correct page display” and that’s a bad sign. It indicates that the people who wrote this code have grasped the wrong end of the stick. If your page does not display correctly without JavaScript, you have already failed. You might need to adjust your definition of “correctly” — for example, it’s difficult to define what it’s “correct” for Google Maps to do without JavaScript. But it’s not difficult for this site: it’s a dang discussion forum. Its purpose is to display text. This is something that the Web was able to do before JavaScript was even a twinkle in Brendan Eich’s eye.

I end up saying this a lot in the JavaScript Rehab context: if you can’t display text without JavaScript, you are a bad person and you should feel bad; also your keyboard should be taken away.

I won’t get too exercised over the clumsy prose of the message (“for the correct page display”? Ugh.): it just merits mentioning that if you’re going to run a forum, you should set a good example of prose and communication skills for your forum-dwellers. What I will say, is that the fact that the message is nearly unstyled, just a sentence that looks like it wandered in by accident, speaks poorly of the site owner’s attention to detail. A WHOIS query says that gardenweb.com has been registered since 1995, so it’s not like they just didn’t have time to get around to it (and judging by how often I see cgi-bin in their URLs, I’m betting that there’s a strong continuity between the 1995 version of the site and the 2013 version).

What really gets me cranky, though, is that by and large the site does “the correct page display” without JavaScript enabled. What it doesn’t correctly display is advertising. In the screenshot above, a little poking at the page source reveals that the big blank space on the right is intended as space for advertising. So what the message at the top of the page is actually saying, is “we’re trying to BS you into enabling JavaScript because a page that gives you just the content that you actually want to see, is to us a broken page.” Fuck that.

GardenWeb, you are JavaScript addicts. Go to rehab.



This post is part of an ongoing series — please read the first JavaScript Rehab post to see why I get so cranky about JavaScript.

Sean M

Sean M

I’m a Python web developer living in Arizona.

Weekend Project: affiliate.el

Since I’m searching for a new job (check out my CV on Stack Overflow Careers!), I’ve been trying to gin up little personal projects and to extract what publishable code I can from my work projects. The first result of this is affiliate.el. It’s a small project - very small - but it has virtues that I think make it a good component of a GitHub portfolio.

First, the smallness is advantage: it is a project with a small, well-defined scope. That’s important. Projects with a large scope are prone to taking a long time, and projects with a poorly-defined scope are almost by definition a bad idea (making a note that fail-fast rapid-iteration work is a totally reasonable thing). The scope of this project is “automatically turn Amazon/iTunes URLs in text into affiliate links by extending emacs.” I chose that because I do the great majority of my writing (including this post) in emacs, and because I am involved in Amazon and Apple’s affiliate-links programs (because I like extra coffee money once in a while just as well as the next person). Choosing scope carefully is important for projects that are intended to accomplish a goal (as opposed to projects where the point is to learn about the problem space, such as the Clojure thing I’m messing with) — and in professional life, the norm is for projects to be goal-focused.

The other reason that smallness is an advantage is that affiliate.el is small enough for someone else to sit down, read, and fully understand in one sitting. I want to make it easy for this hypothetical code reviewer to get a grasp on what I’ve created. To that end, this project also demonstrates “behold, I write friendly code: there are clear docstrings, there is an approachable readme, and the commit messages are concise and helpful.” I think that this is an important skill for an engineer to have too, because coding work happens in a social context. Your ability to explain your work to other engineers - and to others in general - is crucial to its value being recognized. So I want to show with this project “I can make my code accessible to others.”

Of course, those virtues only really shine in the context of good solid working code. This too I think the project demonstrates: concise, workmanlike, idiomatic elisp with a suite of unit tests. This code is well-formed for its environment: it uses built-in emacs features such as customize and provide like a good citizen of its ecosystem, it doesn’t re-invent any wheels or require any esoteric libraries, and it uses unit tests to make demonstrate and hew to the requirements for input and output. It is not heroic code, it’s just solid, humble, functional code.

There probably aren’t very many people to whom this little emacs module is useful as executable code, but I’m fine with that as long as it’s useful for saying something about its creator. Especially if that thing is “hire this person.”

Sean M

Sean M

I’m a Python web developer living in Arizona.

On Hammers

Part of why I ended up buying more into developer-oriented skills and tasks than sysadmin-oriented ones, and especially why I want to stay away from the Windows world, is that running large networks and/or systems sucks. It’s terrible. Mind you, the problems I’ve chosen are also terrible, but they’re a flavor of terrible that’s more palatable to me. I can deal with the kind of terrible that I’ve chosen.

In contrast, running an Active Directory domain with a thousand users is the kind of terrible that is like hitting yourself in the forehead with a hammer.

Then you have a bunch of Windows administration tools, an ecosystem of them, and their entire business model is finding people who are running large networks and selling them soft rubber pads for the business end of the hammer. Then you have Active Directory/Exchange consultants, whose business is to solemnly tell people to hit themselves with the blunt side of the hammer, not the claw side.

Over in the open-source world things are much better — which is to say, you can choose for yourself which side of the hammer to hit yourself with. You could even choose to hit yourself with the handle! Oh, and you have to worry about compatibility issues between the head, the handle, and the grip, but you can set up your own Red Hat-certified forge to make sure that you always have compatible heads.

Also, I hear Microsoft just introduced a new licensing system where you’re charged by the foot-pound.

Sean M

Sean M

I’m a Python web developer living in Arizona.

Challenged

I’m hunting for a new job right now: that’s always a tricky thing, and it’s easy for it to make me nervous. I’m in that bootstrapped/self-taught bind where my skillset and résumé look weird to the corporate world - I taught myself Python and then fell in love with Emacs Lisp, especially its overlap with Common Lisp; I’m proficient with both of those and speak JavaScript at the high-school Spanish level. I’m also reading up on Objective-C, have brushed up against Ruby a few times, grasp the basics of Perl, have put together a cohesive LaTeX document, think of Git as a basic requirement of a serious project, and can run basic SQL queries. I have a GitHub profile that I’m gradually adding code to, and this blog where I’m getting back into the habit of article-length writing. I am, in other words, an engineer entirely capable of finding their own ass with both hands.

“That’s nice,” said my management-track pal. “What do you want to do? Where do you want to work in particular — what kind of work do you want to do — what are you doing to do for them?”

That takes some more thought. I’m just far enough along to be conscious of the green-engineer fallacy of wanting to work with a language instead of wanting to work on a project, so I can’t say something as facile as “I want a Lisp job!”; similarly, while I identify with Bay Area startup culture pretty strongly, “I want to work at a startup!” isn’t going to cut it either. Those are features I want a job to have, not the job itself.

So in response to my friend’s challenge, here are three specific jobs I’d like to do.

  • Work on the Unix toolchain for Apple: new releases of OS X show up with new terminal utilities, and the intersection of Unix beard and Apple fan makes this a job I’d love to do.

  • Work on the API team at Stripe or Square: these are two of my favorite startups, and I think that payments are a hugely important place to apply the lever of technology. Unevenly distributed information and bad liquidity are two longstanding problems: with a smartphone in everyone’s pocket, radical improvements in our solutions to these problems are possible, and Square and Stripe are doing awesome work on that. I’d want to work on the API team to make the services that Stripe and Square provide as language-agnostic as possible - the intersection of mission and language-diversity makes this a job I’d love to do.

  • Work on open data and developer relations for CalTrain, Golden Gate Transit, MUNI, and the Bay’s other transit agencies. “Which transit vehicles are where, and where will they be next?” is a question that people want answers to so badly that they more or less inflicted an API on MUNI. I’m a cyclist and a public transit rider; I think that better mass-transit is good for everyone, and the interesting benefits that the transit agencies themselves could derive from good data, make this a job I’d love to do.

The nice thing about this exercise is that it reveals that there are a lot of interesting challenges in the world, even when you filter it down to “software engineering jobs in the Bay Area.” I’m going to keep looking, but I’m grateful to my friend for pushing me towards this exercise. Meantime, if you’re reading this and you’re willing to take a chance on a bootstrapped afficionado-of-weird-languages hacker who wants to help change the world, you should check out my résumé.

Sean M

Sean M

I’m a Python web developer living in Arizona.

Twitter’s Bickering Design

Today I was reminded of Mike Monteiro’s note on Twitter vs. Google+ stream design via MG Siegler’s response. They gave me words for something that bothers me about Twitter’s interaction design — or rather, a feature of Twitter that I think leads people to make dumb choices. Statements all look the same. My link to an adorable kitty has the same visual weight as my serious summary of a political position, my off-the-cuff oversimplification of something I earnestly believe, or my cranky nitpicking reply to something you said.

Now, this is not to say that users should be able to control that visual weight. Part of why MySpace sucked is that people could present their stuff any old way, which led to a de facto shouting contest. Similarly, the “urgent” flag in email is useless because very few people have the same rubric about when to apply it and it’s trivial for a few antisocial idiots to make the signal impossible to rely on.

However, we also — everyone is subject to this — tend to read everything on Twitter in the same register, because it’s visually alike. Normally “oh, you can’t read tone on the Internet” is a canard. You can read tone just fine when someone who can actually write tone is trying to convey is, and conveying it is a learnable skill. Twitter, though, has a combination of constraints (length and visual weight) that makes it very easy for readers to read “I disagree with this portion of your argument and here’s a link about why” as “you are so wrong, you’re an awful person and also you smell funny.”

I try to use this to keep myself from getting into arguments on Twitter. It is a great medium for some things. Longform conversations — nope! I’m jazzed about my Branch invite, I hope that that or Medium builds something interesting on top of Twitter (assuming that Twitter consents to let someone build; lately they seem to be more interested in killing off all the good things about the service).

Postscript: the image in Monteiro’s post is a dead link, but I grabbed it from archive.org and here it is on imgur.

Brighid M

Brighid M

San Francisco, Lisp, motherhood.

The Bittersweet Rise of Tumblr

I knew in an abstract sense that Tumblr was big: this many millions of users, that many millions of unique impressions, a polished mobile app, a path to — holy blap! — actually making money. This isn’t the same as getting a visceral impression of Tumblr being big, which is what happened to me recently. I learned all of these things in the space of a day or two:

  • Professional despicable person Rupert Murdoch has a Tumblr now - I guess it’s to complement his Twitter account.

  • You can just wander into the middle of a week-long argument in which two to four participants are quarreling, at that interesting register of polite people debating firmly-held beliefs energetically, about Marx, Žižek, and the efficacy of Lacanian psychoanalysis in enacting the revolutionary program.

  • Tumblr’s robust support for animated GIFs is a critical competitive advantage, and its privacy controls are “worse” than Facebook’s, but make its users much happier.

I am nothing remotely resembling an early observer of Tumblr. I know it through things like the Tragedy Series and industry-specific reaction gif blogs. It’s fascinating, though, to have the sudden realization of “wow, this is kinda big.” A particular interest for me is the way Tumblr enables fandom and the particular brand of subversive-here, disappointingly-banal-there, remix culture that fandom loves. There are infinite Homestuck fanblogs, there are animated gifs from virtually all the good TV of the past decade, and there are enough Texts From Last Night mash-ups to choke a horse. It reminds me very strongly of LiveJournal in LJ’s own days in the sun, going from being this weird little thing that was very personal and fandom-oriented to suddenly being Big. I have no idea where things are going, but considering how deeply vile Facebook is and how deeply determined Dick Costolo to make Twitter suck, I have to hope that Tumblr makes both of them eat dirt.

Brighid M

Brighid M

San Francisco, Lisp, motherhood.

JavaScript Rehab: Whose Convenience Are We Talking About Here?

Here’s an antipattern that I see way too often: “please enable JavaScript for this site.” There are several levels of badness with this — I’m going to start with JavaScript itself.

JavaScript is actually pretty great: Brendan Eich’s problem child has many good parts and people are building genuinely astonishing things with it (recent favorite: Infinite Gangnam Style). You can do anything in JavaScript, just like Atwood foretold!

That’s the problem!

Despite the heroic efforts of browser-building folks, JavaScript is getting closer and closer to being equivalent to just downloading code and running it. That’s a bad thing. That gave us the 90s and the Bush years’ legacy of viruses and botnets, of exploit after exploit. In addition to its many wonderful properties, JavaScript is also a gift to malware authors everywhere, a category that includes 90% of the analytics companies I’ve ever seen.

If running JS is not already equivalent to running arbitrary code on your machine, you would be prudent to treat it like it will soon become so and install NoScript or your browser’s equivalent.

Meantime, I see too many web developers who are drooling addicts to using JS for everything, who treat running JS on a user’s machine as their natural-born right. This is deeply not the case. It’s not hard to earn the privilege of running JS - you just have to make a value proposition! “Please enable JavaScript” is not a value proposition, it’s an admission of laziness (or an admission that some pointy-haired boss is in charge).

There are many things you can only do in JavaScript. Having JavaScript in your toolkit, as a web developer, is indispensable. But you also must know when you don’t need JavaScript, and to go without it when you don’t need it. If you can’t display text without JavaScript, if you can’t construct hyperlinks without JavaScript, if you can’t display images without JavaScript, you’re a bad person and you should feel bad.

On top of this, there’s the fact that a great deal of the JavaScript out there is designed for tracking, analyzing, and identifying users — you know, the sort of thing that makes Richard Stallman break out in hives. I am not against analytics — I am against users being simply mugged for that information. If the information has value, you don’t get it for free, analytics companies.

“JavaScript Rehab” is going to be a series of notes, added to when I happen upon sites like this, that names people who are addicted to JavaScript and encourages them to break the habit. I will also insult them, because over-using JavaScript is easy to avoid and the messages that tell you to enable it are usually condescending and dishonest.

Sean M

Sean M

I’m a Python web developer living in Arizona.