Monday, November 30, 2009

Hacker News Mashups

Update: This started as a musing about three Hacker News mashups - Hacker Newspaper, Hacker Top, and Hacker Hacker News - but has turned into a list of HN mashups. The list is long and growing. The HN community makes a lot of mashups.

Mobile apps and Chrome extensions.
Helvetica restyling.
hnvue / Remix HN - framesets version.
Ajax-y Real-time version.
Hacker News Twitter Feeds with Hashtag Metadata
Dave Winer's firehose approach.
Hacker News, automagically organized.
Hacker Newsers, a way to connect with other readers of the site locally.
Hacker Slide. Hacker News with a slider, showing the leaderboard's change over time.
Hacker Follow. It's like Twitter for Hacker News.
Alternative UI. Similar goal to Hacker Newspaper, but I believe with less background in typography.
Print version.
E-mail newsletter version.
Droid app.
iPad version.
iPhone app
Hacker Polls turns polls on Hacker News into graphs.
I don't even get what this one does, but it looks cool.
SearchYC adds search to Hacker News.
HN Summary summarizes links from HN (apparently only some, not sure what the selection criteria are).
Reddit users discussing the Hacker News Headline Generator
Reddit-like Collapsible Threads for Hacker News (bookmarklet)
Ruby library for accessing HN
HN Trends, data stored and charted
I used a hack to make arbitrary domains invisible on Hacker News for a while.
Simpler Hacker News for Greasemonkey/Greasekit
HN Books, a blatant affiliate marketing play. Maybe useful though.
Personalized version with Summify (not actually a hack per se).
hnsh - Hacker News Shell
HN Toolkit provides the same functionality as well as several other features.

Update: I should mention, Hacker Newspaper actually runs on a combination of Ruby and Python, and the Python component is a cool Hacker News mashup in its own right: HNRSS.

Original Post:

In April I built a Hacker News mashup called Hacker Newspaper. I did it because I was reading Hacker News every day and wanted a superior interface. Since that time, two things have happened: one is that I read Hacker News much less than I used to, including Hacker Newspaper; the other is that I have a much clearer idea what stories do well on Hacker News.

The Hacker Newspaper interface adds a visual hierarchy, in a newspaper style, to the Hacker News feed.

It uses this visual hierarchy to emphasize the popularity of stories.

Hacker Hacker News keeps the same essentially flat information hierarchy of Hacker News, but re-sorts the headlines (and prunes them) based on a Bayesian classifier tuned to exclude TechCrunch-y stories, and emphasize stories with technical content. I planned to create something similar, but never got around to it.

Hacker Top also keeps the flat information hierarchy, but gives you a command-line interface in the style of top. It has a default refresh rate of every three minutes, which I think would wreck my productivity, and a nice little syntax for specifying alternate values.

As I said, after switching to Hacker Newspaper, I started reading Hacker News less often, and I became more aware of which stories were most popular. Very often, the few stories I cared about never made it to the top "headline" in the interface, and it just drew my attention to how much the interests of the Hacker News community differ from my own interests. Also, the much greater ease of scanning headlines on Hacker Newspaper made me realize how low on content the average "issue" of Hacker Newspaper is for me.

I'm very curious what changes I might have experienced if I had switched to Hacker Hacker News or Hacker Top instead. I don't have time to run this experiment, but I'd be interested in the results if anybody ran it. It could be there's a strong argument here for building your own tools for consuming media.

Monday, November 23, 2009

Personal Git Punch Card Grapher

Say you like GitHub's punch card graphs, but you want more info. This hack, based on blatantly stolen code, allows you to generate punch card graphs from the command line.

Here's the command to generate these two punch cards, comparing commit activity in the past week on branch A to commit activity in the past week on branch B:

ruby timecard.rb . branch_a a && ruby timecard.rb . branch_b b

(Names changed, of course, but this command produces two pngs, a.png and b.png, and they show you the commits on branch_a and branch_b, respectively.)

Here's the code for it. I found some good code and hacked a few argument vector calls into it. (Comments in the gist can direct you to the original.) Command-line args control everything except the date of the earliest commit to consider. That's hard-coded: Monday the 16th at 3am.

EARLY_MONDAY = 1258370000

If you fork this and add the ability to specify dates in a cleaner way, ping me, I think that would make this very handy.

Update: Gavin Stark forked and improved:

Thanks, this is really handy. I wrote something similar to parse my company's mail log to generate a punch card of when people check mail. VERY telling for some employees. ;-)

I added a few more features and use the chronic gem for date parsing:

Only real problem left is that the google chart API seems to barf if you have too many points on the graph. You get a 414 URI too large error if the URL is over 2000 or so bytes. I guess google giveth and taketh away.


Saturday, November 21, 2009

Holocaust Victim, 1700 Facebook Friends

A young boy in shorts and a white T-shirt, with black hair, dark eyes, and a mischievous grin - that is how Henio looks to his friends on his Facebook page.

"My name is Henio Zytomirski. I am seven-years-old. I live on 3 Szewska Street in Lublin," he writes on his profile. His birthday is March 25, 1933. He is no more than seven or eight years old. As a young Jewish boy, he was killed by the Nazis in a concentration camp.

Young Holocaust victim has over 1,700 friends on Facebook

Tuesday, November 17, 2009

"Your branch is ahead by X commits" - But It Isn't

If git tells you this, the solution is git fetch.

Basically, git loses track of its remotes from time to time, and git fetch refreshes its memory.

Thursday, November 12, 2009

Virtual Windows

Recently I bought a 24" iMac, instead of a MacBook Pro. I justified it to myself like this: in a few years, when it's out of date, a MacBook Pro becomes a doorstop, while an iMac becomes a wall-mountable TV.

Now the 27" iMacs are out, and I am definitely going to get one.

Now watch this video by Joi Ito. He talks about how Warcraft guilds leave TeamSpeak on all day, whether they're raiding or not, to keep in touch with their virtual tribe at all times.

Sound familiar?

Now let me tell you about my crazy parents. They were using Skype before I was. I don't get certain Internet cliches, like the perennial riddle of how to tell your mom what a web browser is. My mom's on Firefox. I don't get what the problem is there.

So: say for the sake of argument I go and get a 27" iMac any day now. I could mount the 24" on a wall in my apartment as planned. But what if I had two? I could take the other one to my parents' place, put it up on their wall, fire up Skype on both machines, open a call from one iMac to the other, set it on video, and leave it on video 24/7 for years. Throw away the keyboards and the mice and call it a wormhole in the fabric of spacetime, or a virtual window.

I'm not actually sure I'll do this. Those new 27" iMacs aren't cheap, I only have one 24", and of course 24/7 wouldn't really be 24/7. I don't need to see my parents gargle their mouthwash, for instance, and I'm sure you can think of plenty of times you might not want your parents peering in on your adult life.

But it doesn't have to be your parents, for that matter. This is just an example. The point is, as handy as Skype and a nice big screen are now, think how much handier they will become in a few years, when you've got them in such abundance that you're trying to figure out how to get rid of the extras. A technology really comes into its own when the street finds its own use for it.

Seriously, Skype has no clue what Skype actually is. Who wants to use the Internet to replicate the experience of a phone call? A virtual window's much more interesting. People have been telling stories about that for almost as long as people have been telling stories at all.

It's funny, though, because not even the cyberpunks wrote about this - not about the actual imminent reality of it. The time is very very near when we will be able to keep 24/7 virtual windows on each other. How tribal will that be? What will happen to the structure of our society? You can find a gazillion examples in the cyberpunk canon of lifecasters and reality stars, some of them dating before the advent of reality TV. Where do you find the group of friends who have been in the same room for thirty years together, despite travelling the world separately? That's a very near, very likely future. It's the inevitable result of a pair of very basic, well-entrenched technologies - IRC and the webcam.

One consequence: we're going to live longer. Researchers find strong family connections and community obligations as a basic characteristic in every community on Earth where people live an unusually long time. However, you can give "family connections" and "community obligations" a lot of different definitions, and that's what might transform society in unpredictable ways. Some of the definitions that will work are as yet undiscovered.

Internet Marketing: Yanik Silver = Meh

So last week or something like that I blogged about an internet marketing guy who uses shareware and freeware to drive traffic for his affiliate programs, and soon after I blogged a tiny little code library to generate affiliate program blog ads. So I might as well admit it, I'm getting interested in this whole internet marketing thing.

It reminds me of the time right before I left San Francisco. It was before the dot-com crash. I had discovered that the only businesses making money online were porn sites, and I told all my friends that we should be making porn sites. Unfortunately, I wasn't a blogger back then, and I smoked a lot of pot, too, so I didn't really always present my ideas in the most coherent manner possible. For instance, I often left out the part that the only businesses making money online were porn sites, and jumped right to the conclusion, that we should all quit our jobs and make porn instead. The result: my friends were giving me some really weird looks for a while. I also learned a little bit about the importance of explaining every part of your idea, and the dangers of being taken too literally.

The dot-com crash has come and gone. However, the presence of VC money gives high-tech an ever-present "house of cards" feeling, for me at least, and I'm always wondering if our entire industry might just be BS, start to finish. So I like to investigate unusual avenues, and I do have to say, even though I abandoned that whole porn idea, a year after I started babbling about it, all my friends were on unemployment, and I was still working. (The dot-com crash hit hard.)

Anyway, I bring all this up because of a story in TechCrunch about what sounds like the most enjoyable blatant douchery any group of grown men ever indulged themselves in. Since a lot of my readers might also have seen this thing in TechCrunch, they might be thinking, "hey look, this internet marketing thing is something - TechCrunch is talking about it, Giles is talking about it, I mean this guy Yanik Silver is hanging out with Richard Branson!"

So yes, it's true, this guy is hanging out with Richard Branson, and I have to tell you, he also comes endorsed by this guy Dan Kennedy, who wrote a bunch of great books, but I can't endorse him. I bought one of his PDFs and it really just didn't seem to contain anything I couldn't have guessed. Not only that, it took real effort to get my refund, when I decided to do it (and I decided almost instantly). Dan Kennedy, in one of his books, says he lets his employees do everything they do any way they want, except for one thing: refunds are processed first, before anything else. I really wish Yanik Silver took the same approach. For a day or two I wondered if the money was coming back at all.

Tuesday, November 10, 2009

iGhost iRide iThe iWhip

Monday, November 9, 2009

Peepcode On jQuery Features Snippet Of My Music

Plus it looks awesome.

Saturday, November 7, 2009

Time Management: Two Pics, Two Books, One App

Lots of people are into David Allen's Getting Things Done. I discovered it in 1998, about ten years before it became a programmer fad, when it was a mail-order tape course that cost $100 instead of a best-seller on Amazon that cost $10. I liked the ideas, but in practice it was too complicated; there was no way in hell I was going to get from as disorganized as I was, to following a system that complicated, without becoming an organized person first. A system for becoming organized which requires you to already be organized in the first place was no use to me at all.

I've read a few books on time management since then, but they all seem to suck. These two books are the only two I've really liked:

No B.S. Time Management for Entrepreneurs (NO BS)

Time Management for System Administrators

Everything I'm doing now revolves around pen and paper (or felt-tipped marker and calendar). I've tried a lot of different software, including Things and RescueTime, but I only ever found one piece of time management software which was useful for me at all: Streaks.

However, even Streaks didn't really do it for me. I kept creating new calendars for all the new habits I wanted to cultivate - eat healthier food, work out every day, remember to wash the dishes, etc., etc. - and some of these things, I wanted weekly frequencies for, not daily. I couldn't solve the weekly problem with Streaks, and I solved the many habits problem with many calendars. Pretty soon I had more than 20 calendars, which was way more than Streaks was even designed to hold in memory, and performance nose-dived. So I bought a physical calendar and wrote on it.

It worked but it looked like crap. I soon upgraded to color.

Vertical lines represent weekly habits; horizontal lines represent daily habits. It's pretty great because you can see at a glance how you're doing. You can only track about ten daily habits with this, though.

I wanted to buy ten or fifteen calendars and put them all up on a wall, one calendar per habit, to make it much easier to read, but you can really only buy 2009 calendars in 2009 if it's January. The calendar publishing industry is so insane about promoting new releases that they make the car industry, which will have people buying 2011 model cars by June 2010, look reasonable. I realize I'm raising this complaint in November, but I started looking in August.

Anyway, come 2010, I might go for a wall of calendars. I've reserved wall space for at least ten calendars, just in case, but I might go for something simpler instead. I have some other ideas that might work better. I'd like to go into more detail, but I only have nine more minutes budgeted for this, and I have to take an unscheduled leak.

Full disclosure: The Amazon links in this post are affiliate links, which pay small sales commisions.

Thursday, November 5, 2009

New Ads By Ruby Row

My blog's now sporting ads from Ruby Row, an ad network which also sponsors blogs by Thoughtbot, Jamis Buck, Geoffrey Grosenbach, Obie Fernandez, and loads of other great programmers. Cool beans.

Wednesday, November 4, 2009

Training Your Inner Monkey

Training monkeys on a two-choice visual task, researchers found that the animals’ brains kept track of recent successes and failures. A correct answer had impressive effects: it improved neural processing and sent the monkeys’ performance soaring in the next trial. But if a monkey made a mistake in one trial, even after mastering the task, it performed around chance level in the next trial — in other words, it was thrown off by mistakes instead of learning from them.

“Success has a much greater influence on the brain than failure,” says Massachusetts Institute of Technology neuroscientist Earl Miller, who led the research. He believes the findings apply to many aspects of daily life in which failures are left unpunished but achieve­ments are rewarded in one way or another—such as when your teammates cheer your strikes at the bowling lane. The pleasurable feeling that comes with the successes is brought about by a surge in the neurotransmitter dopamine. By telling brain cells when they have struck gold, the chemical apparently signals them to keep doing whatever they did that led to success. As for failures, Miller says, we might do well to pay more attention to them, consciously encouraging our brain to learn a little more from failure than it would by default.

A nice little article, but guess what? The article's conclusion is ridiculous:

Success has a much greater influence on the brain than failure...we might do well to pay more attention to [failures], consciously encouraging our brain to learn a little more from failure than it would by default.

That's some of the worst logic I've ever seen. To find worse logic than that, you have to get a teenager to read Plato. "You learn more from success than failure; therefore, pay more attention to failure." Or to rephrase again, "Your brain is bad at a particular type of activity; invest more of your energy and time in that activity."

Obviously, if you want to learn something, and the brain responds to failure without learning anything, but it responds to success by learning, then focusing on failure is not a good learning strategy.

But what should you do? Does this mean that, if you don't score a home run the first time at bat, then the people who do will learn more than you, and be at a huge advantage the next time you compete with them?

Yes, it does.

So if you don't score a home run your first time at bat, you're doomed?


The reason why not:

To learn, all you have to do is succeed.

Notice what that doesn't say. It doesn't say what you have to succeed at.

Let's say you're a tennis player. Somebody beats you at tennis. You revamp your tennis practice to focus on the tiny details of how you play. Why? Because you might not be able to win the games you want, but if you set yourself a tiny goal to win at serving, or to win at backhand form, or to win at aiming the ball, you can win there, and every time you win, you learn.

There's some powerful neuroscience supporting this and a great book which goes into exquisite detail. I have a blog post coming about that book. I'm aiming for tomorrow. It's a hell of a book, though, and it deserves more writing than I have time to finish at the moment, so for now I'm just going to leave you in suspense about it.

Watch Out For The Torpedoes

Cory Doctorow damns every torpedo. If there's a law he disagrees with, its proponents are insane, or morons, or evil, and usually all three. If there's a book he likes, it's an amazing work of genius, untarnished by a single flaw. It makes buying books off recommendations on BoingBoing an insane crapshoot: every book is a work of staggering genius, yet only one out of three turns out to be any good. I often wish his praise was more specific.

Here's Doctorow damning the torpedoes in another way:

Every writer has a FAQ—Frequently Awkward Question—or two, and for me, it’s this one: “How is it possible to work as a science fiction writer, predicting the future, when everything is changing so quickly? Aren’t you afraid that actual events will overtake the events you’ve described?”

It’s a fresh-scrubbed, earnest kind of question, and the asker pays the compliment of casting you as Wise Prognosticator in the bargain, but I think it’s junk. Science fiction writers don’t predict the future (except accidentally), but if they’re very good, they may manage to predict the present.

Like many science fiction authors working today, Doctorow isn't telling us anything that William Gibson hasn't said before, and better - and if you don't believe me, check out Doctorow's post on Gibson saying this back in 2007. One of the superiorities in Gibson's way of putting it: he doesn't deny that science fiction is also good at predicting the future. Doctorow damned that torpedo, saying it only ever happens by accident.

Doctorow says:

Orwell didn’t worry about a future dominated by the view-screens from 1984, he worried about a present in which technology was changing the balance of power, creating opportunities for the state to enforce its power over individuals at ever-more-granular levels.

Gibson said, two years before:

1984 is a powerful book precisely because Orwell didn't have to make a lot of shit up. He had Nazi Germany and the Soviet Union under Stalin as models for what he was doing. He only had to dress it up a little bit, sort of pile it up in a certain way to say, "this is the future."

But the reason it's powerful is that it resonates of history. It doesn't resonate back from the future, it resonates out of modern history. And the power with which it resonates is directly contingent on the sort of point-for-point mimesis, like sort of point-for-point realism, in terms of what we know happened.

Note the absence of any sweeping generality equating the ability to predict the future with some kind of random luck. To quote the article Doctorow linked to in 2007:

Gibson's elaborate vision of the internet - before it existed - and Reality TV - before it existed - has led many to call his work prophetic.

Since Gibson owes a lot of his success to his prescience, you're not going to see him writing off that vision as luck. It could have been just luck, but when you check out the sheer literary density of Gibson's interview, you'll understand why I opt for a different explanation. I think Gibson thought hard about the future, and came to conclusions which were correct.

Doctorow's assertion that predicting the future is only a matter of luck would come off as a lot more plausible, and a lot more respectful of his peers in science fiction, if he (like Gibson) had an actual track record of successful and accurate predictions. I also find it hard to believe that he ever even hears this alleged Frequently Awkward Question in the first place. His last book, Little Brother, was set only a few years in the future, and his current book, Makers, appears to either follow the same model or to be set in the present.

On top of that, I don't think anybody even thinks of Doctorow as a science fiction author at all. I think of him as a blogger, and most other people I know (who have heard of him) think of him the same way. Long story short, I'm calling shenangians on this nonsense. Doctorow's posted a Cliff's Notes rewrite of a great William Gibson interview. Rewriting Gibson is like rewriting Hemingway or Shakespeare. Don't waste your time. Just read the interview.

Sunday, November 1, 2009

Blog Ads: Experiment On GitHub

From the Readme:

I wrote this to generate ads on my blog. It's a lazy Sunday morning hack, finished before 10am, and that includes all the time I spent tweaking the ad text and choosing the sites to link to.

The way to use it is simple: choose affiliate programs to promote, write an ad, and hard-code all the data in the generator script. (Obviously there are more elegant ways to do that part, but this is still less than 50 lines of code.) Run the generator script, and then copy/paste the output into a widget in the sidebar on your blog. Boom, you have ads.

Now instead of Google paying you three cents every time somebody clicks a link, you have some independent business paying you $20 or $50 every time somebody buys something. The win here isn't just the money, it's also the ethics. You were supporting a corporation; now you're supporting independent business. You were selling meaningless clicks; now you're bringing someone actual customers. It doesn't hurt that the earnings potential is orders of magnitude better, but the win is pure ethics win.

Epic Graffiti Artist DAIM On Skinizi

I can't tell you how thrilled I am about this.

The German graffiti artist DAIM is known for pieces with three-dimensional styles so realistic, people driving by in their cars have thought the shapes coming out of the walls were real.

He's one of a growing number of graffiti artists receiving recognition in the formal art world.

His new skins on Skinizi fit on iPods, iPhones, MacBooks, MacBook Pros, non-Apple hardware, netbooks, PSPs, and all kinds of nifty gadgets.