Sunday, October 31, 2010

Content manifesto and the art of software releases

This is a blog, and an extremely typical one - I update when I feel like it and am able, and the main folks who may read this are those who I directly send the link to. Occasionally random people may find their way here and partially read an entry and then go on their way.

This is all fair, and likely largely unchangeable. Sites that meet with more success tend to have regular updates, original content, all that good stuff. And whatever I do, it is unlikely to be as compelling as blogs where people are able to sink a lot of time and always have something new so people will actually follow and subscribe to them.

But (and here is the manifesto part), I do want to at least pledge something. That something is that I will update at least weekly, targeting Sunday as "publish" day, with a new entry that contains original writing, original code, or both.

That's still not regular enough to really take off, but hopefully enough for people to consider checking that once a week (or adding to their feed reader). And while I will still link to places, I intend for every entry to have enough writing (and not just blockquotes/references) to have something that you can't just read elsewhere. There are better aggregation sites out there, so I don't want to just maintain a list of interesting links.

So, much like Conan O'Brien Show Zero, this entry you are reading now is "attempt 0" at what it is describing. What does it have to do with software releases? Simple - just like websites, software should evolve and update in a consistent and sensible fashion. Stale software will lose users just like stale blogs lose readers - just look at Internet Explorer relative to Firefox, Chrome, et al.

In fact, with "webapps" the line between website and application is blurred. The problem is exacerbated by the lack of versioning in webapps - when you use Gmail, you use Gmail. If Gmail changes something in the left nav, you now have a new left nav - you can't just say "I want Gmail 1.2 and not 1.3", while traditional installed software lets you do that (modulo security patches, but those tend to be maintained a bit longer).

So now we are left trying to balance evolution and avoiding staleness with having stability and backwards compatibility for more conservative users. There is no silver bullet here, it's arguably unrealistic to say that old versions should always be maintained, but it's also unrealistic to say that you should just push everything out the door and force the user to cope.

I would cautiously offer the following guidelines ("commandments" if you will), generalized so they apply to blogs/site content, webapps, and even traditional software.

  1. Create new things (content/features) proactively, not reactively.
  2. Maintain what you have and mimic content/features from others as needed (reactively, not proactively).
  3. Support for the old should be proportional to the new change.
#1 means you need to take initiative - if creating content, do so originally and not just by linking to others. If creating applications, come up with your own ideas and designs and don't just copy what others do. This will keep your users interested (positive retention).

But #2 means you still need to follow others and keep what you have going. This should be a second priority to #1 ("be a leader not a follower" or some such nonsense), but it is important nonetheless. You won't come up with every innovative feature or good writeup, so you still need to pay attention to others and refer to them as appropriate (essentially as your users demand). This will avoid making your users unhappy by feeling like they've lost something (avoid attrition/negative retention).

#3 is the guideline for how to balance #1 and #2, and is related to user demand. If you do some new work (content or features) that is considered significant, then afterwards you should take some serious time to relate it and ground it in the established. Listen to your users, maintain what they care about and maybe even roll back things that lead to complaints (or for content, just make sure you place it in a greater context). If you don't you stand the risk of going off too far on your own - an aimless leader is not a leader at all.

So, that's it - thanks for reading. To practice what I preach, I will revisit the above and refine it over time, so watch for that and please give any feedback. As I said, this is not a silver bullet for success - but it is intended as guidelines against common failures I have seen in original creation, both content and software. Hopefully they make sense, and I at least will try to follow them here.

Come back at (roughly) the same time net week for another entry! Every week will either be me posting some update to a project (with fresh code in the repository) or some software-ish writeup like this. Thanks for reading!

Sunday, October 24, 2010

When you gaze long into a Yo Dawg...

...the Yo Dawg will gaze back into you.

The preceding link is to a 65-deep recursive "Yo Dawg yo-yo" meme, generated by the Yo Dawg Generator. For a more complete experience, you can scroll through the depths 0-65 (this page is ~10mb to load).

What exactly is this? Once upon a time there was the Xzibit Yo Dawg meme, and the people of the internet were amused. Then somebody came up with the clever idea of making the meme about a yo-yo and a dog:

Original "Yo Dawg yo-yo" meme


And the people of the internet were again amused. But this was not enough, and somebody came up with the further idea of sticking the yo-yo/dog meme on a yo-yo:

Yo Dawg/Inception Face off

And the people of the internet were confused/amused (for a good explanation, see this Reddit comment). But then, I came along and asked "why stop there?"

And so, I present to you the fruit of the Yo Dawg Generator:
Yo dawg, we herd you like yo-yos and yo-yo Yo Dawg yo-yo Yo Dawg yo-yo Yo Dawg yo-yo Yo Dawg yo-yo Yo Dawg Yo Dawgs so we put the yo-yo Yo Dawg yo-yo Yo Dawg yo-yo Yo Dawg yo-yo Yo Dawg yo-yo Yo Dawg yo-yo Yo Dawg in a yo-yo so you can yo-yo yo' yo-yo Yo Dawg yo-yo Yo Dawg yo-yo Yo Dawg yo-yo Yo Dawg yo-yo Yo Dawg yo-yo Yo Dawg while you yo-yo yo' Yo Dawg yo-yo Yo Dawg yo-yo Yo Dawg yo-yo Yo Dawg yo-yo Yo Dawg yo-yo Yo Dawg yo-yo Yo Dawg yo-yo dawg while yo' yo-yo Yo Dawg yo-yo Yo Dawg yo-yo Yo Dawg yo-yo Yo Dawg yo-yo Yo Dawg yo-yo Yo Dawg yo-yo dawg yo-yos, dawg.
Mind you, that's only to depth 5. At depth 0, it perfectly reproduces the "Inception Face-Off" version of the meme (e.g. the one with DiCaprio above). The version I linked to at the opening was 65 deep, and you can run it as deep as you want, though if you're generating images rather than text it does run out of space in the 60s.

"But that's just gibberish!" you must be thinking. Well, yes, but if you want you can translate the output into something slightly more intelligible. Here is the same depth "clarified":
Yo dawg, we herd you like yo-yos and an Xzibit meme featuring a yo-yo toy about an Xzibit meme featuring a yo-yo toy about an Xzibit meme featuring a yo-yo toy about an Xzibit meme featuring a yo-yo toy about an Xzibit meme featuring a yo-yo toy about the Xzibit meme so we put the Xzibit meme featuring a yo-yo Xzibit meme featuring a yo-yo Xzibit meme featuring a yo-yo Xzibit meme featuring a yo-yo Xzibit meme featuring a yo-yo Xzibit meme featuring a yo-yo in a yo-yo so you can yo-yo yo' Xzibit meme featuring a yo-yo Xzibit meme featuring a yo-yo Xzibit meme featuring a yo-yo Xzibit meme featuring a yo-yo Xzibit meme featuring a yo-yo Xzibit meme featuring a yo-yo while you yo-yo yo' dog featured on an Xzibit meme yo-yo on an Xzibit meme yo-yo on an Xzibit meme yo-yo on an Xzibit meme yo-yo on an Xzibit meme yo-yo on an Xzibit meme yo-yo on an Xzibit meme yo-yo while yo' dog on a yo-yo in an Xzibit meme about yo-yos in an Xzibit meme about yo-yos in an Xzibit meme about yo-yos in an Xzibit meme about yo-yos in an Xzibit meme about yo-yos in an Xzibit meme about yo-yos yo-yos, dawg.
"Well now it's too easy to understand!" you probably aren't thinking, but I'll pretend you are. Why then there's the obfuscation option, which removes that pesky punctuation and capitalization to make all the "yos" the same:
YO DAWG, WE HERD YO LIKE YO YOS AND YO YO YO DAWG YO YO YO DAWG YO YO YO DAWG YO YO YO DAWG YO YO YO DAWG YO DAWGS SO WE PUT THE YO YO YO DAWG YO YO YO DAWG YO YO YO DAWG YO YO YO DAWG YO YO YO DAWG YO YO YO DAWG IN A YO YO SO YO CAN YO YO YO YO YO YO DAWG YO YO YO DAWG YO YO YO DAWG YO YO YO DAWG YO YO YO DAWG YO YO YO DAWG WHILE YO YO YO YO YO DAWG YO YO YO DAWG YO YO YO DAWG YO YO YO DAWG YO YO YO DAWG YO YO YO DAWG YO YO YO DAWG YO YO DAWG WHILE YO YO YO YO DAWG YO YO YO DAWG YO YO YO DAWG YO YO YO DAWG YO YO YO DAWG YO YO YO DAWG YO YO DAWG YO YOS, DAWG.
But wait, there's more! The Yo Dawg Generator also creates pictures, admittedly some room for improvement here but they're at least as functional as most Xzibit meme pictures. To wit:

"Yo Dawg yo-yo" to depth 5

And there you have it - a rather silly extension of a rather silly thing. I've actually come up with a whole todo list for future development, so if you're at least half as amused by this as I am check it out. The Yo Dawg Generator is written in Python and licensed under the GPL v3 with the source hosted at Google Code.

Thanks for reading, dawg.

New projects at Soycode!

I've uploaded three, yes three, new(ish) projects! All have functional source code, and expect to hear more about all of them shortly.

Yo Dawg Generator is a tool that generates recursive "Yo Dawg Yo-Yo" text/pictures to arbitrary depth. It was inspired by the various semi-recursive Xzibit memes that have been featured on Reddit and elsewhere. Of my projects, it's frankly the only one I'd expect to potentially interest folks (since it is about memes after all), so expect to hear more about it shortly.

Soystats (for which I still need a name) is a "command line" browser-based math/statistics tool. Extensible and potentially useful to geeks like me, or anyone who is on a random computer wishing they had R installed but instead just have a web browser.

RNM (Random Note Maker/RNM is Not Music) is my most ambitious project, or at least the one I care the most about. It's also in the least advanced state, at present it's just a "lyrics" generator/reciter.

That's all for now, but expect more updates on all of these shortly. Thanks for reading!

Friday, October 22, 2010

Quick but not dirty?

A fine write up on "Taco Bell" programming. What does that mean?
Every item on the menu at Taco Bell is just a different configuration of roughly eight ingredients. With this simple periodic table of meat and produce, the company pulled down $1.9 billion last year. ... Taco Bell Programming is about developers knowing enough about Ops (and Unix in general) so that they don't overthink things, and arrive at simple, scalable solutions.
The general argument is that every line of code you write is actually a liability, as it's another line to understand and maintain in the future. The more functionality you get with the fewer lines of code, the better - and I think that modulo readability, that makes a lot of sense.

As an example, the author offers this snippet as a way to manage a web crawler:
find crawl_dir/ -type f -print0 | xargs -n1 -0 -P32 ./process
It works, but it's dense - much like regular expressions. And like regular expressions, I view this sort of coding as a great way to get things working, but a slight fallacy if you think it will also be significantly easier to manage. You're still compressing the same concepts in fewer lines, and as a result this single line may be harder for somebody to update than a 10 or 20 line script that does the same thing.

Of course, it all really depends on who the "somebody" is - if you're a regular expression veteran, you can hack around on those just fine. If you grok xargs and awk and sed and tr and ..., then shell hacking will by definition be something you'll do and probably enjoy.

So what's the best way? I'm left with the banal tautology that all generalizations are false - this writeup makes an excellent argument in favor of using the standard Unix toolchain, and I agree strongly that any programmer would be well served to understand the stack on which they program.

But I also took a brief Python course where the instructor stated his goal as causing us to never write another shell script. In his view, Python had an adequately low entry barrier (in terms of boilerplate, documentation, etc.) but substantially higher readability than shell scripts, not to mention portability (Python is Python, but bash != tcsh != zsh != ...).

I guess I'm left to conclude with an even more banal tautology that hard work is hard, and there is no shortcut. There is, of course, good design, and a big part of good design is using tools appropriate for your job. Sometimes that's the toolchain, sometimes that's assembly - it really just depends on what you're doing and why.

Monday, October 18, 2010

Steve Jobs needs a dictionary

Via Phandroid.
“We await to see if iPhone or Android was the winner in most recent quarter. Google loves to characterize Android as open and iPhone as closed. We see this disingenuous and clouding the difference.
“The first thing we think of when we hear open is Windows, which is available on a lot of devices."
...
“Even if Google was right and the real issue was closed vs open, it’s worth remembering open doesn’t always win. Look at PlaysForSure. Even Microsoft finally abandoned this open strategy in favor of copying Apple’s integrated approach with the Zune, leaving their OEMs empty-handed."
It is true that Android is fragmented and iOS is not - that is a natural consequence of openness, in the true sense of the word, and in my mind it's worth it for a phone that won't censor you with spellchecking.

Jobs' argument on tablet size (7" being too close to a phone, 10" being substantially more useful) is more legitimate, though the problem with 10" and 1.5 lbs is at that point having a netbook with a keyboard may often be better for many uses (though not as stylish).

But this truly absurd "open" nonsense just reeks of Microsoft FUD - even worse, really, as it's a bit better done.

UPDATE: Andy Rubin's take via Twitter:
the definition of open: "mkdir android ; cd android ; repo init -u git://android.git.kernel.org/platform/manifest.git ; repo sync ; make"

Instant, five minute graduate course in coding theory

A tale of Alice, Bob, and pocket calculators.

Coding theorists are concerned with two things. Firstly and most importantly they are concerned with the private lives of two people called Alice and Bob. In theory papers, whenever a coding theorist wants to describe a transaction between two parties he doesn't call then A and B. No. For some longstanding traditional reason he calls them Alice and Bob. 
Now there are hundreds of papers written about Alice and Bob. Over the years Alice and Bob have tried to defraud insurance companies, they've played poker for high stakes by mail, and they've exchanged secret messages over tapped telephones. 
If we put together all the little details from here and there, snippets from lots of papers, we get a fascinating picture of their lives. This may be the first time a definitive biography of Alice and Bob has been given.
...
Science has marched ahead so fast that we take for granted the most incredible technological developments. Magnetrons, which were a closely guarded secret during the 1939-45 war are now part of every microwave cooker. And made in Japan. When I was a child, space travel was science fiction. Yet today, advance is so rapid that even the astronauts who set foot on the moon in 1969 had never seen a digital watch. Nor a pocket calculator. 
Pocket calculators! Now there's something. They're so complicated! I have a calculator which has sines, cosines, tangents, logarithms, hyperbolic functions and multiple nested parentheses. You can program it in Fortran, Algol, Basic, Pascal, Forth, Fifth and Sixth, ADA and Carruthers. It will factorize primes for you. At present it's working on the Halting Problem. 
It translates from one language to another. From German to Spanish. From Macedonian to Esperanto. From Cantonese to Greek. Or from American to English. 
It is, in fact, a multiprocessor system. There are 22 Transputers in there. Sometimes they organize a game of football between them. 
It has a full color, wraparound wide screen, liquid crystal, three-dimensional holographic display. It's called HoloChromaCinePhotoRamaScope.
Its audio facilities include Dolby Digital Decaphonic surround sound. On the way here I watched "The Labyrinth" on it. 
It also has synthetic speech and a voice recognition system. I often talk to it. I tell it my problems. Sometimes it psychoanalyses me. It has me figured as paranoid. But that's just because it keeps getting at me. But don't get me wrong - it can be very user friendly. In fact you can program precisely HOW user friendly you want it is to be on a scale from ONE to TEN.
There's much more where that came from, probably takes slightly more than five minutes to read but well worth it. It's definitely amusing (whenever a word looks funny and you don't recognize it, look it up as he's probably making a clever reference), and even a bit informative. Technology is pretty incredible when you think about it.

Sunday, October 17, 2010

Blog redesign

As you may notice, this blog now looks quite a bit different. I had two main goals in this redesign - firstly, to make it a bit more distinctive (e.g. less generic, more memorable). I'm still being lazy and using templates, as after all I'm not a graphic designer, but I'm trying to customize a bit more and hopefully create something that folks remember and don't mind looking at.

My second goal is, well, "monetization" - put more precisely, I wanted to improve the ads while keeping things tasteful and unobtrusive. Basically, you should notice the ads and as time passes they should become increasingly relevant (you may even click one if you want), but the ads shouldn't be so obnoxious as to interfere with your experience (content should be consumable, ads should be ignorable/blockable, etc.).

Hopefully I've succeeded to some degree on both counts - please, give me feedback if you have any. I'm particularly concerned about the latter issue (ads), as, well, ads can easily be obnoxious. But, I do think ads can be tolerable if done right, and if this place actually starts generating any income then I'll be more justified sinking time into it.

So, I hope you like what you see, and if you like the sorts of projects I work on and share please continue to visit and support this site. Thanks for reading!