Get yarn to output emoji/icons on non-Mac platforms

By default, the cute magnifying glass, truck, link, etc., emoticons shown as a part of yarn‘s output in most samples only appears on OS X.

In recent versions of yarn, this can be forced on non-Mac by running:

yarn config set -- --emoji true

In most non-Mac terminals, the emojis display in monochrome.

Conversely, these icons can be disabled (on any platform) with yarn config set -- --emoji false.

A note on the martyrdom of Aaron Swartz

Just a quick note on the Aaron Swartz posts, which are still coming up near-daily on HN.

When there’s a mass shooting, many people point out that psychologists have recommended news stations avoid delivering any attention to the individual who committed the act. The main idea is to prevent copycats (though I guess there’s a secondary desire to deprive the assailant of any fame he thought he would gain).

There’s an obvious connection here. If we want to stop people from killing either each other or themselves, we shouldn’t martyrize people who distribute death, whether to self or others. Despite external pressures, Aaron Swartz holds the ultimate responsibility for what he did. And the message that’s getting sent is, “If you’re being persecuted and have minor notoriety among your peers, and you want to get talked about for months, and get laws named after yourself, or otherwise ‘die for the cause’, kill yourself. Make the sacrifice for the greater good. You’ll save others.”

Some would find that message problematic.

I understand that this subject has been replica cartier love bracelets taboo because of our affection for Swartz and his obvious mistreatment by the government, but the continued proliferation of posts glorifying and/or justifying Swartz’s action, and the particular annoyance inspired hermes h bracelet
by a U.S. Representative replica cartier from a tech-heavy sector attempting to play this event into an opportunity to pander, has finally provoked me into writing this post.

How Mojang and Minecraft Could Change the World

This article is draft quality and needs references and restructuring. It is pretty boring at the beginning, too long, and doesn’t really have a conclusion, for instance. I’m publishing it this way because I have a lot of other stuff to do and I don’t know when I’ll have time to polish, but I think this article can be helpful as-is in the interim. Please excuse the spotty quality.

Minecraft is an intriguing exploration game by Swedish game development company Mojang. In the last almost two years, Minecraft’s community has exploded via exposure on tech aggregators like reddit. Minecraft has always cost money, allowing the independent developer Notch to form Mojang and turn Minecraft into a full-time enterprise and hire additional developers.

Minecraft’s Current License

As I mentioned, Minecraft has been distributed under what is effectively an All Rights Reserved copyright license since its inception. However, as Minecraft’s community has grown and particularly because Minecraft’s main audience is the tech-savvy reddit crowd, which contains a disproportionate amount of software developers, interest in modifying and customizing the game has flourished.

Mojang does not distribute Minecraft’s source and does not allow redistribution of its files (despite Notch’s realistic viewpoint on software piracy). One Minecraft license allows one licensee to play.

The State of Minecraft Modding

Minecraft is written in Java, and that heritage has also played an important role in the modding community for two main reasons: first, Java is an accessible language frequently taught as an introduction to programming, and secondly, and most importantly, Java bytecode can be decompiled to meaningful and useful source code without much difficulty (like most bytecodes).

Mojang uses an obfuscator in an attempt to make decompilation of the distributed jars impractical, but the fine folks at the Minecraft Coder Pack provide a great infrastructure and service to the community in de-obfuscating the obfuscated code (decompilation results in the obfuscated codebase, and MCP contains patches that de-obfuscate and change variable back to meaningful names).

There is a large selection of mods for Minecraft that have been made primarily with this deobfuscated, decompiled source code, some of which are extremely impressive, especially considering the circumstances around the codebase, a complete lack of any official modding support, and the difficulty in working with decompiled, (de)-obfuscated Java.

The Minecraft protocol, interface, mapping format (which was originally contributed by a community member), and other fundamentals have been thoroughly documented despite its closed nature.

The Possibilities

As you can probably tell, a lot of people really like Minecraft, and are really interested in contributing to the project, even if it requires a totally absurd time commitment in order to reverse engineer an entire codebase of obfuscated Java. Mojang is doing a large disservice to themselves and the Minecraft community by maintaining these conditions.

Most open-source projects have to struggle and bite and claw to generate interest adequate to get patches from more than one or two developers. Mojang is sitting on a golden opportunity to vastly improve their game, provide useful, marketable skills to individuals, and increase its profitability.

Minecraft should change immediately to a shared source model where each licensee receives a full copy of the game’s source code and is granted the right to share that code and any modifications thereto with other MC licensees. Think how much effort currently wasted on working around the program’s propreitary nature would be saved, and instead invested in under-the-hood improvements, new features, etc. Any Minecraft player knows that there is definitely a lot of room for improvement in Minecraft’s performance.

Minecraft should be developed in public on a site like GitHub, allowing users to track changes, fix bugs, test immediately, and generally providing all of the other benefits of an open development model. Minecraft’s community has already demonstrated its value, practically forcing a closed development environment wide open as far as can be done with the material Mojang provides; the expansive possibilities yielded to MC from an open development model should be obvious at this point.

An Industry Leader

Mojang also has the opportunity to secure for themselves an historic leadership position in software. By providing a thorough shared-source license, Mojang can demonstrate that giving your users source code can vastly improve your product, vastly improve your sales, and vastly improve the freedom and enjoyment of your customers. This is a very important lesson to teach.

The only defense left in the digital realm is entirely legal. Your programs will be distributed on pirate networks if there is any semblance of wide interest in them. Your programs will be disassembled, decompiled, cracked, and reverse-engineered until they can be used without restriction by interested parties. This is just a fact of wide dissemination of object code, and the only reason an informed individual (like the audience that you meet when reddit is your primary avenue of exposure) ever buys your software is because he thinks he should. As such, it should be painstakingly obvious that draconian DRM measures only further impede the sales of a product, as legitimate users are forced to obtain the content via pirate distribution if they are to be expected to use it in a normal and convenient manner.

So, what is gained by keeping your source close to chest? It certainly doesn’t change your sales numbers at all. A legitimate company won’t copy your source code in circumvention of a shared source license because they know that they’d immediately be sued and immediately lose in a blatant case of copyright infringement. Your users will just download your program for free on pirate networks anyway if it is more convenient for them to do so (except for a very small portion of users that do not want to violate copyright law and will therefore probably never even use your program, a net loss even if they would have paid $0 because it deprives potential word-of-mouth marketing, etc.).

There is no logic in this kind of fear. The Free Software methodology has set a precedent and created an impression that supplying your users with source means a complete depletion of meaningful revenue, but a shared source license can demonstrate that it’s in the best interest of every involved party to include source code with every application as long as the FSF’s so-called “freedom to help your neighbor” (i.e., the virtual elimination of traditional copyright privileges (also called copyleft), allowing unlimited distribution by anyone for any reason as long as source and a copy of the license is included) is taken out of equation. Mojang can become a great leader in establishing software freedom for a great many users by demonstrating by example the benefits of providing licensed users with source code and relying on legal remedies (the only realistic remedy for any pirate activity anymore) to ensure that sales remain intact.

With the vast interest in Minecraft, including interest by youth, Mojang can also lead the industry by switching to an open development model and tutoring interested contributors. Getting code included in a game like Minecraft in itself can be a huge motivator for a teen, especially if Mojang offers a small cash bounty for useful fixes, and with Mojang’s help there is potential to succor many-a-youth to a skillset that will allow them to provide utility to the world and a goodly supply of income for their (future and current) family.

Minecraft sales can also be expected to skyrocket as with Mojang’s cooperation, extensive new features can be added (Hammer-like object creator and internal scripting mechanisms, allowing users to craft a model and integrate all-new items into MC without heavy recoding, anyone?), the (many) performance issues can be addressed and enhanced, and so on.

With a community as fervent and committed as the community behind Minecraft, the possibilities really are tantalizing. I sincerely hope that Mojang embraces this great potential.

wm-read: bookmarklet to enhance readability on Wikimedia projects

If you find yourself often reading long articles on Wikipedia, Wikisource, or other Wikimedia sites, you may appreciate this simple bookmarklet I put together.

It removes the sidebar from the document so that you can read without a big chunk of your screen being consumed by ominous gray.

To use this bookmarklet, drag this link to your bookmarks bar and click on it whenever you want to apply these transformations:


Here’s a couple of screenshots using today’s featured article (coincidentally, Utah-related), with the original on the left and the post-wm-read on the right:

Top of page diffMid-page comparison shot

I do not believe the bookmarklet to be of sufficient uniqueness to qualify for copyright protection. In case some person believes it qualifies for copyright protection, I hereby release it into the public domain and willfully revoke any copyright protection which may have been applicable.

That gray is not so bad when you’re reading a short article or just browsing through, but if you are trying to read a long piece it can definitely get irksome for horizontal space to be wasted like that.

Most readers probably already know about Arc90’s Readability,  a set of JS and CSS transformations that attempt to make articles more readable by removing cruft, sidebars, and headers and just leaving with you a page of readable text. I love Readability and use it often.

I have found, however, that most articles on Wikimedia projects flow better and are easier to comprehend in their original style … except for that big, wasteful sidebar. As such, Readability was not desirable in my case, especially since the articles I read on Wikisource have the original page breaks preserved, and Readability mangles these into the main body of the article, which is rather disruptive.

Writing a good job ad for a programmer

As a poor person, I have been perusing a lot of job ads recently and I’ve run into several major turn-offs over and over again. I don’t reply to ads that seems clueless because I have learned through sad experience that working somewhere lame is not an acceptable activity in life, and if an ad is clueless, it’s likely that the company behind it isn’t too hospitable to programmers, however well-intentioned that company might be. As such, I am writing a brief howto regarding job ads, designed to help you find and retain good programmers.

Avoid colloquialisms

The words “rockstar”, “ninja”, “guru”, and so forth are instant deductions. If the rest of your ad sounds pretty great, these words might be reluctantly overlooked, but in an average ad, they kill all potential of a reply.

Why should that be so? Don’t these ads demonstrate your company’s hip-funness? No, they don’t; they demonstrate that your company is an out-of-touch poser, trying to wow people into thinking you’re a good workplace with “unconventional” and evocative language, but programmers aren’t so easily fooled. If you want to prove that your company is cool, prove it by describing cool things about your company, like “free lunches” or “work when you want” or whatever good things your company does. If you’re a run-of-the-mill company that provides no special benefits to its employees, you probably should just focus on the coolness of the tech you use and other micro-desirabilities about the job you’re trying to fill.

Now, it’s bad when a company is using these words to conform to the norms (saw an ad today that said “…a rockstar (everyone else is using it, so we thought we would too)”), but it’s worse when a company actually means it and expects “rockstar” or “guru” performance of the candidate. In all cases where I’ve found this, the expectations have been completely unrealistic in way or another, whether it’s the expectation to hire “rockstars” with a salary of $50k or the expectation that “rockstars” can perform the work of five plebes. These expectations are unrealistic; it seems that people think programming can get done like magic if you just hire the right guy, but the fact is that substantive programming has been and always will be hard work, even for the geniuses among us, and it will take time to write programs, and your programs will have bugs, no matter how insistent your demands or how diligent your search for the mythical “rockstar”. And, supposing you could find a person like this, they aren’t going to sign on for the meager salary you’re offering.

This is also applicable to a lesser extent to the term “expert”; “expert” is so widely used that you can’t really take points away for it, but it’s not ideal, because almost any normal coder knows that the experts in a certain language are the ones writing the VMs and compilers and designing the language’s future, and in almost every case, you’ll never find such a programmer in your respondents. There’s nothing wrong with that, we can’t all be experts in everything; Guido van Rossum is an expert in Python, but (as far as I know) he’s not an expert in .NET. If you want a Java programmer, you just want someone who knows it well, not someone who would consider themselves an “expert” because if these people are serious and consider themselves experts and can’t point to several patches to a language runtime or compiler or some other substantive low-level work on the subject, they are more trouble than they’re worth.

So, just leave out all the colloquialisms. If you’re looking for a good programmer, say something like “Looking for a Good PHP Programmer”, “Must be good at PHP”, etc.

Act like a normal person

Programmers hate pandering. Write your ad in prose and seem like a person well-informed on development. Keep things simple; as programmers know all too well, complexity is a death knell. When you bring a candidate in for an interview, don’t be stuffy or overly “corporate”; just relax and talk with the guy, because you’re a person, and he’s a person, and you’re all just people, and that’s all there is to it, there is no reason to bring other things in.

Don’t gush on and on about your mission statement or other silly things in the ad or interview, just be straightforward; instead of corporate-speak “We provide a cacophony of solutions to help businesses around the world pervade their markets”, try “We sell a few marketing-related services to businesses”. It’s simple, to the point, and you don’t look like a corporate drones.

Programmers spend all day with logic and if you do something illogical they will notice and resent it. Policies that exist for no reason and other corporate trademarks like big-wording prospective clients to death to make them think you’re smart is anathema.

Offer a decent salary

Around here, most people seem to think that software developers aren’t worth any more than $45,000/yr. It’s hard to find jobs that offer more; there are some senior-level positions, but by and large, the majority of ad are going to seriously lowball their targets. I guess that they must be getting some respondents that way, but it’s not a good way; you’ll get people too desperate to care or too ignorant to know that their work is worth much more, and these aren’t the serious professionals you’d want running the infrastructure that supports your business.

Just think about the responsibility and power that your programmers hold. You need to make sure you get trustworthy and experienced professionals in there; they have access to all of your customer data, both stored in databases and at point-of-entry, including credit cards and passwords. In most cases, they have access to all of your sales data and can tell the performance of the company with a simple SQL query. In some cases, they may have access to salaries, SSNs, and other confidential employee data. It is their job not only to safeguard the integrity, security, and usability of this data, but also to write the programs that use it. That is a lot of power. I don’t know what it is, but a lot of businessmen seem oblivious to that. There is no reasonable way to keep a programmer out of these databases and systems.

As such, it’s pretty important to keep your programmers happy. Programming is serious and complex business. When a programmer with business and domain knowledge quits, you lose a lot; it takes several months for competent programmers to get to know your systems very well. Programmers should be both feared and honored.

What does that $45k salary say, and what do you think you’re getting away with? Most professionals can find much better salaries, so what does that leave you with when you offer $45k? And do you trust those people with these responsibilities?

Don’t be a recruiter

Recruiters are almost universally clueless. They have little education and they don’t understand any of the technical fields into which they pump candidates. I’ve seen many come from Robert Half and friends who pass the little trivia exams they give before they send you out and are absolutely useless on the job. These people come in because people who don’t understand programming can’t tell which programmers can actually sit down and write some programs and which memorized a few simple syntax rules and survive by globs of copy-pasted functions.

I never respond to recruiters anymore, ever. They always bring you in for an interview and it never leads anywhere because they can’t tell what anything is or means, all they can do is compare resumes. These comparisons have, with one exception, resulted in completely non-sensible matches in my case specifically. In short, recruiters a giant waste of time for everyone involved; the candidates they provide can rarely perform the actual work that needs to be done and the programmers that respond are usually spammed and dragged through a lot of useless crap to no benefit.

Just don’t use recruiters.


Here’s an example “good” job ad, which I’ve just made up.

My name is Jeff Cook. I run a company called Deseret Technology that provides general IT consulting services, primarily custom development. We need an experienced .NET developer and prefer experience with ASP.NET MVC. We are offering [some decent rate]. Please contact me at [email] and we’ll talk about it.

Here are some awesome things about our company: everyone carpools in a giant blimp that picks you up at your house every morning, there are fresh tacos under all the keyboards, our employees have all types of haircuts, and we are just some pretty smart dudes.

See? Not so hard. The answer lies in simplicity; it’s just basics, really. Be smart and everything will work out great.