I think I finally get Go

So people tend to try to think about Go as a “C replacement” or a “C++ replacement” in the sense that it’s a substitute those languages. It isn’t that, but it still is a C replacement, it’s still a C++ replacement.

And they move on to talking about it replacing Python, and Ruby, and Java, in the same sense. It’s not that either.

What I’ve realized is that Go is setting itself up for being a new lingua franca for the toolchain. There’s a great deal of code in a given *nix distribution written in C simply because C is the portable language across *nixen. There’s also plenty of Bourne shell script, Perl, and in some distros Python. All of this stuff — written mostly with portability in mind, with performance a distant consideration — is ripe to be replaced with a language more modern than shell and Perl, more easily packaged than Python, better-performing than any of those, and safer and more featureful than C.

Docker is the exemplar of this — the kind of thing that would have been written as a handful of C binaries with Python or Perl support scripts without a question ten years ago.

And in this context, the things about Go that seem to suck become more understandable. Go’s rigid and SCM-based dependency system is pretty terrible, but it’s functional, and it’s simple, and thus it was easy just to shove into the language as a pragmatic decision. Similarly, the absence of generics, the inferior type system, the very concept of interface{} is obnoxious, but it also obviates a big long nasty argument about how to implement generics. I have been following Rust and I like Rust and I think it’s the Next Big Thing but because it’s trying to be the Next Big Thing every minor change takes endless aeons of hashing out and debating and documenting.

There’s nothing particularly revolutionary about Go, but it fits perfectly into a niche that’s been desperately waiting for something like it. It’s safer than C, it’s faster and easier to deploy than Python, but it has a lot of qualities that appeal to people who have worked in those languages. I can’t say I’ve loved working with Go (from a primarily Ruby background) but I am impressed by its pragmatism, and I think it’s going to be a staple language over the next decade because of that pragmatism.

Degenerate forms of the development process

The ideal picture of iterative software development is that of a small team of developers, designers, artists, etc. working directly with a client with the authority to make decisions and the personal investment to be involved.

There’s a lot of places where this picture doesn’t quite fit:

  • Most startups
  • Firms developing a product for the public
  • Firms developing a product on another firm’s behalf (subcontracting)

When a clear representative of the stakeholders’ needs is no longer available, the role of deciding what’s important ends up devolving upon a member of the team. This doesn’t have to be an official delegation — it simply requires that there be hard decisions to be made and that one person is recognized as being the go-to for resolving hard decisions.

This self-reinforcing, parasitic process is shaped by the day job of the person who makes the decisions. The general types are:

Engineer-driven development

Attractions:

  • Who’s going to be developing the thing, anyway?
  • Engineers are held in particularly high esteem due to the influences of popular tech culture.
  • Early startups are frequently engineer-driven, for reasons of expediency.

Risks:

  • Undercutting the requirements. A lot of programmers will focus on the most difficult part of the problem, seeing related details as best put off to another day. When those deferred ephemera come back up to the queue, it can be tempting to massage them into fitting best in to the Grand Plan.
  • Overextending the requirements. This actually can happen at the same time as the above problem, leading to the “you asked for a school bus, I gave you a jet fighter painted yellow” scenario.
  • The sheer visual panache and usability everyone associates with programmer-driven projects. See: Hacker News, Slashdot, vim, the command line arguments of find(1), the shallow grave where they disposed of the ‘n’ from umount

Manager-driven development

Attractions:

  • Well, who’s in charge around here anyway?
  • And who’s going to take the blame if things go wrong?

Risks:

  • Ruthless adherence to the release schedule. Managers tend to be personally responsible for their teams turning in work late or underdelivering. This can manifest in half-baked, wobbly releases or in perennially late ones.
  • Defensive interpretation of requirements. “It doesn’t say what currencies we need to support. How hard would it be to support… all of them? Now don’t give me that look.”

Designer-driven development

Attractions:

  • It’s a lot easier to get executives and clients alike to sign off on lush, colorful, comprehensible designs than big piles of user stories.
  • Design can be very fast, and once you’ve mocked up one screen you have the materials to do 10 more even faster. A proposal with a lot of mockups and a ton of wireframes is going to seem more concrete and credible.

Risks:

  • Pie-in-the-sky expectations. That lovely, concrete picture of a feature that can’t be implemented ends up sitting much too firmly in a client’s head.
  • Inflexible requirements. “The VP of so-and-so signed off on that design element, we can’t resize it.” “That bit of the design shows up on ten other screens, it can’t be changed here.”

Analyst-driven development

Attractions:

  • Someone who actually gets paid to do it gets to make the unfun decisions.

Risks:

  • Prematurely curdled features. Ones that have spent so long being tweaked and revised and reconsidered that they have long since lost all resemblance to anything the customer needs.
  • Balsa-wood requirements. Analysts might have a crisis of authority when serving as an indirect representative of other people’s needs. This can result in a coherent, useful feature being molded into unrecognizable goo by developers, designers, management, the passing nosy sales associate…

Sales-driven development

Attractions:

  • You’re gonna make a ton of sales! For a little while!

Risks:

2142264-7796_full

So here I am again

I am notoriously terrible at keeping up on any kind of blog, even though I’m usually up to something. Before too long we’re going to be doing a group blog at work, and hopefully I’ll actually be able to stick to that under the ancient principle that it takes a measure of competition to get me off my ass.

Right now I’m working on a new game. I haven’t given up on the Christmas Hack, although at this point it looks like it’ll eventually be a Summer Hack or a Halloween Hack. It’s one of three ideas I’m really interested in right now.

The one I’m working on is much simpler: kind of an arcade game. I’m working on it in Ruby, using a simple game engine and the Chipmunk physics library. I’m doing everything I can to just focus on delivering a fun, enjoyable game.

The game is called Unfunky UFO.

Image

This screenshot is of my latest build, with debug visuals (the red boxes, which indicate collision shapes) enabled. The name is derived from a Parliament song on the legendary Mothership Connection album.

In Unfunky UFO, you control a wayward spaceship visiting Earth. You are low on biofuels, and need to accumulate enough to break orbit and set off toward home. Luckily, the planet below has a lot of cheerful, smiling, ambulatory fuel pods for you to pick up and convert into alien biodiesel with your trusty tractor beam.

Your ship is always moving; you spend a little fuel to change direction. The tractor beam only switches on when you’re close enough to the ground. When little dudes are caught in it, they slowly float up to the UFO, flailing wildly all the while. Collecting a little dude gains you golden points (trademark Tracy Jordan) and also fuel, to keep you from crashing. The trick is to limit the number of moves you need to make to pick up the most squishy, delicious humans in a row.

Each level has a finite number of humans (and probably cows and cars and such), and it’s possible to accidentally kill them by letting the tractor beam break. You can also smash into the ground. Later levels will have more complicated terrain to avoid, and probably faster, more evasive critters.

I’m developing this as a keyboard-controlled PC game, but my idea is mostly for mobile phones. You swipe over the UFO, and it jots off in that direction. To be honest, I originally conceived it when discussing Flappy Bird with some coworkers. I was fascinated by how the limited, frustrating controls of such a half-assed game led to it being appealing to players. Unfunky UFO is my attempt to make a simple, appealing game based around predictable but difficult controls, except hopefully with some more depth to it. I don’t intend to follow after the model of that highly profitable game, though. My intent is to port it (by hand, using the native APIs) to both Android and iOS, and release it for free. That’s about as much as I could reasonably expect for a game with graphics I made myself! What I want is the joy of having made a game, and the education of making it.

I do have ideas for a follow-up, it is true… but let’s see about getting this done first!

Repeating the ingredients list brings me merit

I’ve seen this ingredient list for Chicken McNuggets posted a number of times in the last few days, most recently here.

Ingredients: White Boneless Chicken, Water, Food Starch-Modified, Salt, Seasoning (Autolyzed Yeast Extract, Salt, Wheat Starch, Natural Flavoring [Botanical Source], Safflower Oil, Dextrose, Citric Acid), Sodium Phosphates, Natural Flavor (Botanical Source). Battered and Breaded with: Water, Enriched Flour (Bleached Wheat Flour, Niacin, Reduced Iron, Thiamin Mononitrate, Riboflavin, Folic Acid), Yellow Corn Flour, Bleached Wheat Flour, Food Starch-Modified, Salt, Leavening (Baking Soda, Sodium Acid Pyrophosphate, Sodium Aluminum Phosphate, Monocalcium Phosphate, Calcium Lactate), Spices, Wheat Starch, Dextrose, Corn Starch.

I’d like to mention at this point that I have never eaten a Chicken McNugget in my life and I haven’t been in a McDonald’s within my memory. I have absolutely no interest in defending the company or the industrial production of food. The problem I have is that the narrow obsession with things like the physical processes involved in the production of meat (“pink slime”, mechanically separated poultry) and the familiarity of ingredients. I see this as a focus on the symbolic purity of food — the ick factor — the privileging of traditional techniques over modern ones. It does absolutely nothing to make headway against the realities of industrial livestock production. People who sneer at a McNugget are perfectly happy to boast about the huge quantity of bacon they just ate, even if that bacon came from a factory-farmed pig who lived and died in torture.

So I’m going to go over this ingredients list item by item and explain what’s in it so I have something to point people at if I ever see this dumb thing again.

White Boneless Chicken, Water

I hope I don’t have to explain these.

Food Starch-Modified

This is corn starch or some other plant starch that has been processed in some way. It might be chemical processing, but what you get in the end is basically just one or another form of sugar.

Salt, Seasoning (Autolyzed Yeast Extract, Salt, Wheat Starch, Natural Flavoring [Botanical Source], Safflower Oil, Dextrose, Citric Acid), Sodium Phosphates, Natural Flavor (Botanical Source)

This is basically seasoning salt, but: autolyzed yeast extract is just brewer’s yeast (a leftover from beer brewing) with a lot of salt. It’s sold under brand names like Marmite and Vegemite. It has a lot of glutamic acid, which is what imparts the “umami” or richness flavor to foods like mushrooms, meat, etc.

People frequently claim that autolyzed yeast extract is just MSG under another name. To an extent, they’re right: they’re both glutamate sources. The reason this isn’t a problem is because there’s nothing wrong with MSG, either.

Salt is salt. Wheat starch is wheat starch. The natural flavorings are just spices of one type or another. Oil is oil. Dextrose is a type of sugar, probably added to fill out whatever powder mixture they’re mixing into the meat. Citric acid is a preservative and it makes things taste tart; it’s ubiquitous in food preparation, and is sold to bakers as “sour salt” (and has been for ages).

Battered and Breaded with: Water, Enriched Flour (Bleached Wheat Flour, Niacin, Reduced Iron, Thiamin Mononitrate, Riboflavin, Folic Acid)

This is flour, with micronutrients added so that poor people who eat a lot of white bread don’t get deficiency illness.

Yellow Corn Flour, Bleached Wheat Flour

Bleached wheat flour = cake flour.

Food Starch-Modified, Salt, Leavening (Baking Soda, Sodium Acid Pyrophosphate, Sodium Aluminum Phosphate, Monocalcium Phosphate, Calcium Lactate)

This is baking soda and baking powder. Baking powder is where people who like to freak out about food merit really get to shine, because baking powder tends to consist of chemicals with interesting names, and most of those chemicals have industrial uses. So they get to say “chicken mcnuggets contain SODIUM ACID PYROPHOSPHATE, which is a CHEMICAL also used in TANNING LEATHER and OIL WELL DRILLING.” Which is true! And also meaningless.

I’m not going to go down each of these, but feel free to look them up. They’re all in baking powder. Every one of these is likely to have been in your grandma’s zucchini bread. Also, calcium lactate is what forms the crystals in hard cheese.

Spices, Wheat Starch, Dextrose, Corn Starch.

And with this terrifying litany of unspeakable industrial effluents, the ingredient list ends.

The only thing on this entire list which is likely to be the product of modern, highly sophisticated food science is the modified starch, which is there mostly to control moisture and affect the texture. Nothing else even begins to be scary.

2014

To new friends made, old friends remade, and friends we will never see again

This year I have made new friends and have had new colleagues to work with. I would like to make more.

This year I have rekindled friendships that had been faltering. I would like to do this more.

Some of my friends have done wonderful things this year. I am so proud of them all.

This year I have lost a very dear friend. Tonight I am toasting his memory. I hope not to lose any more friends for a very long time.

To our flaws

I have overindulged this year. I have allowed myself to become insular and lazy, even more than I have in the past. I need to do better.

This year I have struggled with depression and anxiety, as I have every year of my life. I have taken steps to make it better, but I still have a long way to go. I owe it to myself and to my friends to keep working at it.

This year I have been too angry and bitter. I have forgotten to love and respect my fellow human beings. I have looked down on people for not knowing what I know. I need to be more humble and respectful.

To our achievements

This year I finished a painful, long-term project at work. We remade our product. It should have been easier, it should have been faster, but now it is done.

Since then, we have continued to build upon that work. Processes that were new and painful a year ago are swift and painless now. There is still a lot of work to be done, but I have confidence that it will be successful. And I know I have a place in that.

I am better at what I do today than I was a year ago.

To our ambitions

This year I want to learn more about my life’s work. I want to become a better programmer. I want to widen my experience and to deepen my familiarity.

I want to get out more, I want to listen more, I want to talk more when I have something to say, I want to be less afraid of my body and my mind and my failings.

I want to be better at what I do a year from now than I am today.

To things best forgotten

This year I cut a tie that should have been cut long since. I feel the absence every day, but I have to accept the absence and then, in time, to forget it.

There are things I could have done better this year. Words I could have said better. Thoughts I could have thought better. The pain belongs to 2013 now, and the lessons belong to the future.

To the future

Here’s to full hearts and full bellies.

Here’s to fewer guns and more butter.

Here’s to more ice and more fish in the oceans.

Here’s to the self-evident truth that all people are born equal, and to the retirement of kings, gods, and tyrants.

Here’s to a healthier, happier, more prosperous new year.