-
May 5th, 2008

I wish, but more likely this is a measure of the reported encoding of Web pages based on their HTTP headers. And that would not be surprising. Let’s be real, it’s just a header that we all copy over and over just because it seems like the right thing to do. And most modern frameworks put it there for you, even when you’re serving ASCII text from a latin1 encoded database table. Still, A for effort.
Posted by Assaf
Filed in general
-
May 5th, 2008
There you go.
require 'rubygems'
require 'xmpp4r'
require 'xmpp4r/roster'
puts 'Connecting ...'
client = Jabber::Client.new(ARGV[0]).connect(’talk.google.com’)
client.auth(ARGV[1])
puts ‘Receiving’
roster = Jabber::Roster::Helper.new(client)
roster.add_presence_callback do |roster_item, old_presence, new_presence|
if new_presence
from = roster_item.iname || “#{new_presence.from.node}@#{new_presence.from.domain}”
if new_presence.status
puts “#{from}: #{new_presence.status}”
end
end
end
client.send(Jabber::Presence.new)
Thread.stop
client.close
Run from the command line:
$ ruby distwit.rb <jabber_id> <password>
Connecting …
Receiving
Andre Lewis: Away
Matthieu Riou: Enjoying a JavaOne couch
Matthieu Riou: Entertaining Assaf
Alexis Midon: hacking in a couch @community-one
Now just wait for your friends to status away using their IM client.
And don’t forget, please yo-yo the rrm.
Posted by Assaf
Filed in general, ruby
-
April 27th, 2008

Open SaaS. AllMyData is an online backup/storage solution that, at $5/month for unmetered storage sounds like a pretty good deal. That’s not what I want to talk about. Check out Tahoe, their open source secure distributed filesystem. You can grab the sources (lots of Python code, no surprise) and run your own storage grid, or share the backup load with friends, P2P. The part that interests me: you can rent the storage from AllMyData, but know exactly how they’re handling your data, security, availability and all.
This is an interesting marriage of SaaS of open source. Provide the service, and source code as a form of open disclosure. Hoping we’ll see more open disclosure SaaS in the future.
Pockets of resistance. As you know Microsoft is at odds with its customers regarding the future of XP. Come August you will no longer be able to purchase XP, except for this work around. If you purchase a computer running Vista Business/Premium, you can request a pre-installed downgrade to XP. Customers that want a working machine get XP installed at the factory, while Microsoft gets another “sale” of the pricey Vista Business/Premium edition, proving once and for all that there’s no demand for XP.
Never mind the smell, this is one clever business tactic of using customer’s best interest against them. Except for this nagging little quote: ”there are some pockets”. I’ve heard that once before, usually when a dictatorship runs at odds with its populace and has to fight those damn nagging pockets of resistance.
The thing about numbers. Part of the problem is “that software piracy had grown in April, impacting revenue.” I’m sure Microsoft has more accurate numbers to prove than my little, unscientific, baseless research. A quick torrent research finds 3093 results for Windows XP, and only 2071 results for Windows Vista. And of those Vista search results, second from the top is actually a torrent of Windows XP SP3. You can blame it on piracy, but when piracy is lukewarm, who do you blame it on then?
The cure for your PHP blues. I’m quoting out of context, but it’s more fun this way. Sun, once again, promises the JDK will be open sourced. This time, for real. After all, you can’t keep people waiting forever:
We’re trying to get Java into places it’s never been before … Linux developers, absent of an open-source Java, have been building applications with languages like C, C++, and PHP … What we can do is create Java programs and then run them on Linux.
Truly cool helmet. This one is for bike riders. When I last went shopping for a motorcycle helmet, all the good (and expensive) helmets came equipped with an ambient-sensitive setting that automatically switches between two modes: foggy and steamy. Now comes this marvel from Givi. A replaceable chinbar and vents for warm-day comfort, probably as close as you can get to an AC. And, not a first but still damn cool, a drop-down tinted visor for that jet fighter look and cure to the common sun blindness. No bulky D-ring either. WANT!
Picture, the ultimate iPhone unboxing.
Posted by Assaf
Filed in general
-
April 19th, 2008
My car insurance is handled by Geico, which means every six months I pay the premium, and a few weeks later get a check for the total sum of 400 US cents. First time that happened, I thought my premium was adjusted down and Geico was just returning the balance (it happens). Then the second time, and the third time, and eventually it clicked.
At some point in the past, owned to a few points on my license and a crazy premium to match my driving habits, I enrolled in Geico’s 6 payment plan. When you’re on a multi-payment plan, they charge an extra $4 on each individual payment.
Years ago my premium landed back on earth, and I stopped using the payment plan. (There’s another story there involving Progressive, and why I won’t use them ever again) I guess I’m still billed for the $4 payment plan luxury, but since I pay it all in one go, they refund me for the surcharge. Kind of annoying having to cash that check every six months (can’t they just use it as forward balance?)
Now for today’s little surprise. I made a change on my policy, bumping up the premium by $89.97. Everything went smoothly, and like clock work Geico e-mailed the new policy documents, along with an updated bill for the remaining balance. That comes to a total of $89.97, if I decide to pay once under the one-payment plan.
But what if I decide to pay once under the two-payment plan? That would be one payment of $93.37. How about one payment under the four-payment plan? Also $93.37. At least the six-payment plan offers the possibility for splitting the bill in two payments.
I sleep better at night knowing that some of my premium goes towards mailing checks to compensate customers for unnecessary charges.

Posted by Assaf
Filed in general
-
April 16th, 2008
Speed is in the eye of the beholder. Rethinking the Progress Bar. If you can’t be fast, at least you can appear snappier with this simple mathematical slight of hand.
Worse than I thought. Looks like Google/Firefox released the lock on Rob Yates. That was fast. I did some research today, looking for a new (to me) car, and found out AutoWorld is also on probation. Blocked.
Putting the squeeze on malware is a good idea, I like it. But this one is going form 0-60 in no seconds. Is anyone on the Firefox team reading this? Please start small, give site owners time to adjust, and us users something to access in the meanwhile. I don’t like it when Firefox goes dark.
Connecting with the blogger generation. FeedBurner is running an ad campaign for a new blog that’s a teaser for an upcoming TV show (or movie, can’t tell). AdSense link: check. Blog with GMail address: check. Twitter and Facebook: check. YouTube video: not on the site, but a Google cache copy of the sight includes a couple. Brough to you by A&E.
I can has Shawarma? Last night’s food coma, brought to you by Wally’s Cafe in Emeryville. It’s a tiny diner, tucked behind a pub, run by the owner, and open late in an otherwise sleepy neighborhood. You just know it has to be good and cheap. Wrong. It was amazing. Best Mediterranean food I had in years, not to mention Lebanese, which is my favorite style. Did I mention how amazing it was?
Picture, from the inspiring tumblog Insomnio. (Via ffffound!)
Posted by Assaf
Filed in general, scrapi
-
April 15th, 2008

Go with the flow. If you need to check out what’s happening in Ruby land, check out RubyFlow, “a community driven Ruby links site”. (Via Ruby Inside)
Documented. Unfortunately I’m back to RDBMS land, but I’m really curious about StrokeDB. The short version:
StrokeDB is an embeddable distributed document database written in Ruby. It is schema-free, it scales infinitely, it even tracks revisions and perfectly integrates with Ruby applications.
Obviously this one will be compared to CouchDB, which now defines the category. Don’t. It has some interesting ideas that are easy to miss if you’re looking at why “this one is not like the other”. I hope to read more about its version control, the API has elegance to it and can easily resolve references, and there’s promise of a JavaScript port. I’m not sold on the embeddable aspect, I’d rather use a database that’s independent of the runtime language (once Derby, twice shy). But the API is compelling and native code will deal with performance issues.
Responsible monkeying. Sustainable development in Ruby: Introduction, Part I (inherit early, inherit often) and Part II (inject as little as necessary). Eh what? Just because you can monkey patch every piece of code doesn’t mean you should. Remember, you’d have to maintain it someday! Avdi Grimm explains how to do useful stuff with the mininum of collateral damage on future generations. I buy it. More sustainable development. Please.
Ruby.exe. Peter Cooper asks, Is Windows a First Class Platform for Ruby? From what I’ve seen, the Windows experience leaves much to be desired, though some of it is just the fact that Windows is, well, Windows. How many of you are using Windows to develop/deploy Ruby apps?
Untouchable. Google, not particularly fond of Ruby. Evidence no.2: Using Ruby with the Google Data APIs. (Evidence no.1 is lack of a client library) It’s the opposite of anything Ruby stands for: not simple, not elegant, and nowhere near DRY. By comparison, the Java documentation looks easier. But I’m sure there are no language sentiments at play here, just insufficient time to dig through RubyForge and find several pre-existing Google Data APIs.
Picture: LOLcats toy with Schrodinger. LOLcats win.
Posted by Assaf
Filed in general
-
April 14th, 2008

Twinkle me Twitter. If you’re on Twitter and got a broken-in iPhone, check out Twinkle. You’ll want to install this one. Compared with MobileTwitter and m.twitter.com, it’s the better client of the three. It does pictures (so does MobileTwitter).
Here’s the kick: besides being the best client, it also knows where you’re twitting from, and can grab statuses from anyone in a 1-50 miles radius. Now, that’s mobile. And counting the traffic report that showed up when I first played with it, relevant.
Git cheat. Git link roundups seems to be all the rage nowdays. Here’s a couple that will come in handy. The Git cheatsheet (download, print, stick to cubicle wall). And if you’re using cheat (aren’t you?):
cheat git
cheat gitsvn
This will be big. I finally took the time to look over the Passenger architecture (aka mod_rails). For large scale deployment I still prefer reverse proxy, but for shared hosting, this one is a killer. Finally, Rails has a solution for those who can’t afford a dedicated host.
This will take a bit longer. Ditz is a Ruby-based distributed bug tracking system. The basic premise is keeping all issues logged in the same repository as the source code. That means you can work on issues the same way you work on code, locally, and along different branches. There’s a others out there, Ditz seems to be the only one making forward progress.
In the cloud. So we have Software as a Service. But not everything can ride on pre-existing code, which is why we also have Platform as a Service. I was just happy to stop there, but no, we also need to thin of the Do-Evil crowed. Yes, Crimeware as a Service. With that in mind, I already started planning my Halloween costume: Assaf as a Service. I’m sketchy on the details, but I do know it will involve clouds of some sorts.
Posted by Assaf
Filed in general
-
April 13th, 2008

Anyone seen this before?
It popped up when I followed a link from a comment left on this blog. Firefox would not let me see the site, not even view source. I have to say, it’s a great way to protect users from potential phishing, scamming and malware.
Not this nosy blogger, though. Something didn’t sit right, so I used wget and peeked at the source. Seems benign to me. The post references my talk about read consistency databases, CouchDB and Google AppEngine. Doesn’t look like the dumb stuff you find on spam/scam blogs (and I get a lot of these trackbacks).
Firefox suggest the site is marked as malware by Google. Indeed, a search on the author name returned 95 links to that blog, all of which are marked with:
This site may harm your computer.
A LinkedIn search finds the author is a Senior Programmer at IBM. So I opened the blog in Safari and started reading. JSON this, Atom that, OpenID, Java, comments and good technical discussion all around. Actually a good blog all around, nothing malicious.
I don’t know what tripped the Google Homeland Security system, but I see no evidence of foul play, just a false positive.
I contacted the author, let’s see what comes out of this.
Update: Turns out this is a known problem:
Currently, many sites that are the subject of Google’s warnings have been the victims of a malicious hacking attack, in which code linking directly to badware through exploits was inserted onto an otherwise innocent, but poorly secured, website. In other cases, a website with no intention to distribute badware hosts content (such as ads or hit counters) provided by a third party, and can inadvertently distribute badware through that content. If you are confused about why your site has a Google warning, then there are strong odds that your site has experienced one of the above situations.
At the very least they do attempt to made contact:
Google makes a good faith effort to contact the owners and administrators of sites with Google search warnings. Google sends emails to potential site owner addresses such as webmaster@domain.com Google also notifies site owners with Webmaster Tools accounts.
Update 2: This is getting better. AutoWorld is now blocked for the very same reason (I’m researching my next car).
Posted by Assaf
Filed in general
-
April 11th, 2008

I went looking for the Rails repository yesterday, and aimlessly browsing around, discovered that Victor maintains a fork of Buildr on github. And so I caved in. I blame it on peer pressure, cool kids, but mostly on tools that I need and just can’t find anywhere else. I finally sudo port install git +svn, fetched and switched from hg to git.
I still much prefer Mercurial. I develop, so really what I need is an rsynch that can handle branching and merging, not a lot to ask for. I’m not, and never will be, in the business of Source Control Provisioning, Management & Administration, so I appreciate anything that aims for small and simple. Git … well, there are 138 command line tools to choose from, some of which are multi-tools in their own right, so you tell me.
So why Git? A couple of reasons. First, Apache is all SVN all the time. I tried hg + svn, I kept at it for a few weeks, but eventually through some branching and merging lost the .hg repository. That was a failed experiment. Git-svn looks like a clear winner, doing almost all that I expect it to do, aside from renaming all svn tasks to something else (did I mention usability is a non-feature?)
Then there’s Github. Wonderful. In so many ways. How can you not fall in love with a social network that has syntax highlighting? And though I couldn’t care less for yet another social anything, this one is damn useful and productive. You won’t find anything like that outside of Gitland.
It’s only between first git svn fetch and dcommit that I discovered Github just had its official launch. Congratulations. It’s the thing I always wanted, just didn’t know how much.
So 24 hours after switching, here’s what my bash history reads like:
~/work/buildr $ history|awk '{print $2}'|sort|uniq -c|sort -rn|head
232 spec
50 rake
32 sudo
29 git
19 svn
19 cd
18 gem
17 ls
9 irb
8 vim
Here’s Bill de hÓra who started it, and Chris Adams who identified it as the meme du geek. Make of it what you will.
Posted by Assaf
Filed in general
-
April 6th, 2008

Freedom to choose. If this was true, it would be big:
At first blush, that’s a radical notion any right-thinking CTO would dismiss out of hand. But not so fast: IT shouldn’t dictate what computers and handhelds users get — and perhaps IT shouldn’t manage them, either. That’s the conclusion some IT organizations are reaching, or at least investigating.
Of course it’s already happening. It’s how open source creeps into the enterprise bypassing the budget committee, how SaaS inflitrates the MS/Siebel/Oracle strong holds, and why we’re seeing Macs and iPhones crop up in unexpected places. What to expect? Less Windows, less Lotus Notes/Exchange, less anything you wouldn’t pay for with your credit card. Less software licenses all around, giving way to support contracts and monthly usage bills. The new way of doing software is selling dinners, not kitchens.
Was that an earthquake? Let’s say you wanted to predict earthquakes. First thing you’ll need: seismographs. How much would it cost to place those seismographs at large density around major faults? For the Quake-Catcher Network, the answer is $0. Just distribute software to people who can run it on their notebooks using the built-in accelerometers to detect earth movements. Briliant.
Sometimes, you’ve to to make a call. Dave Caolo on the data usage of the iPhone:
There are other options on that screen, like “View my minutes,” which I usually check when I pay my bill. As of right now, I’m looking at 1300 roll over minutes. This can only mean one thing:
I rarely use my iPhone as a phone.
I’m also racking up roll over minutes, using the iPhone for everything but making phone calls. Last year I cancelled my land line, but before that, I used it exclusively for dial-up (DSL is just a fancy name for dial-up). So I have a different take: it’s only a true mobile phone when you can use it for data, and occasionally voice.
Who’s influencing you? According to a new study:
Of more than 1,100 adults polled in December, nearly 80% said they were very or somewhat more likely to consider buying products recommended by real-world friends and family, while only 23% reported being very or somewhat likely to consider a product pushed by “well-known bloggers.”
Accroding to my non-scientific, sample-of-one, anecdotal research, nearly 80% of those “friend and family” recommendations are one or two degree of separation removed from an influencer. The problem with this study is not the data collected or its statistical analysis, but blatant ignorance for human behavior. We have a strong need to believe we’re not operating under any source of influence. If you want to know, don’t ask, observe. (Via ReadWriteWeb, which also falls for this trap)
Three cheers to WP 2.5. Just upgraded to WordPress 2.5. (Disclosure: a couple of influencers I trust told me to) It’s a definite improvement over 2.3, especially for writing and managing comments. I’m now hooked on the new full-screen editor.
The UI is much improved, but still has some way to go. Joen Asmussen has an excellent writeup the usability issues with 2.5, and worth reading if you’re intersted in Web app usability (not just for WP).
Above, the perfect gift to the person who has everything: Betamax to HD-DVD convertor.
Posted by Assaf
Filed in general
« Older posts
|
|