Older blog entries for rbp (starting at number 8)

Giving away one Google Wave invite (or two)

[A quick note for the lazy: read at least the "But how?" section below. It explains what you need to do to qualify for the giveaway]

So, Google Wave is quickly reaching a stage of being actually useful for daily communication. I've used it for planning trips and dinner parties, coordinating server maintenance, doing collaborative translation and just generally chatting, with varying levels of success.

I got my invite to the sandbox (a developer preview, not integrated with the rest of Google's services) after attending Google Developer Day São Paulo. I played around for a while, but it was too unstable. A few weeks later it had improved considerably, so I started using it again. But too few people I knew were there, and its use as a communications tool was therefore obviously impaired.

A few weeks ago, then, Google promoted Wave to http://wave.google.com, and there was much rejoicing. As a sandbox user, I got an invite to it, and with it 8 more to give away. I distributed them to a few close friends, but ended up with one left!

And that's the one you might get :)


"But how?"

[updated about 1h after originally posting, to correct the rules]

Google Wave invite

It's really simple. After a long period of inactivity, I've resumed writing on isnomore.net. There are currently two posts (not counting this one): one about programming Python on the Android, and a recipe for Spaghetti alla Carbonara. So, access isnomore.net's RSS feed on Google Reader and pick the one you like best. Then "like" it (by clicking the proper button at the bottom of the appropriate post, on the Reader screen), and share this post (the one you're reading right now).

To make it clear: you should "like" one of the other two posts currently published ("Pushing up Python on Android" or "Spaghetti alla Carbonara"), and share this one ("Giving away one Google Wave invite (or two)"). You may also share and like others at will, but that's the minimum to qualify for the giveaway.

Important: if you "share" and "like" from someone's shared items, or some other address you might have (if you used to subscribe to this site's old feed, for instance), it won't show up on my count and I can't know you've done it! So the safest bet is to go straight to the feed on Google Reader and choose from there (like so). In any event, if you feel that there is any confusion, let me know.

Within three days (that is, on Saturday the 24th of October) I'll collect a list of the people who've liked any of the articles and pick one at random. If that person has also shared the article, they get the invite (otherwise, I'll just pick another one from the list, and so on). I'll post the results here on Saturday, and I'll also contact whoever was selected via their Google account (if you want me to use a different email, let me know in the comments or "Share with note" and leave a comment to that effect there).


"What if I share and like both articles?"

Well, you'll make me very happy, please do! But it won't improve your chances, I'm afraid.


"I already have a Wave account (or don't want one), but I'd like an invite for a friend"

Sure, no problem. If you are selected, just let me know the email to which I should send the invite.


"But I don't have a Google Reader account!"

Well, a Google Reader account is just a regular Google account. If you've never used Reader, just give it a try, it's really simple. If you don't have a Google account at all, you'll need one for Google Wave anyway, so you might as well create it now!


"If I'm picked, how long until I have a Google Wave account?"

That's not up to me. Google Wave invites actually mean Google will know that someone invited you when the time comes for them to offer a new round of accounts. But they don't say when that will happen, or even whether everyone on the current invite list will get an account on the next round. In practice, accounts have been handed out at a relatively high pace, but I can't be sure.

All I can promise is that I'll put your email address on my invitation list as soon as you confirm it.


"Wait, the title said or two!"

That's right. I might have an additional invite. It's a bit of a long story, but I can't be sure. So, if it turns out that I do, I'll pick two people. Otherwise, that's just one lucky winner :)


"But... But... I am your friend and didn't get an invite from you! I even asked on Twitter!"

Calm down, don't be offended. First of all, most of my invites went to the people with whom I exchanged the most emails and instant messages. Makes sense, right? Besides, some of the people to whom I had promised invites ended up not needing them (having received one by other means), so I didn't know from the start I still had invites left.

Finally, I specifically avoided giving them out to people asking around on Twitter (as opposed to asking me personally). Asking in broadcast mode meant that, by the time I invited you, someone else might have also done so. From my experience with the other people I've invited, multiple invites don't seem to make your account arrive any sooner. As Google Wave invites are currently somewhat scarce, that would be a waste of one, which would be a shame. And I want the highest number of people on Wave, the sooner the better.


"I have more questions! You can't predict and fake-quote them all!"

True. Leave me a comment!

And good luck! See you on the Wave :)



Sharing and Liking isnomore.net on Google Reader

Syndicated 2009-10-21 03:39:36 from Bits of rbp - isnomore.net

Spaghetti alla Carbonara

Carbonara is widely known as a simple recipe, but for the longest time it seemed a bit mysterious to me. I'd watch a friend mix a few ingredients together, in what seemed destined to become some sort of spaghetti omelet, only to be presented with a beautiful - and delicious - meal. Then one day I came across David Leite's recipe. It seemed simple enough. Well, it seemed short enough that it'd be simple. So I tried it.

And, well, it wasn't bad, but came out a bit clumpy and dry. So I tried again. And again. And read some very helpful comments on Leite's article. And found some variations of the recipe. And experimented a bit. So now I'm finally happy with my Carbonara, and hopefully you'll find it as easy and rewarding as I do! :)

Carbonara © alickel

I used to make it with bacon, which is ok but sort of overwhelms all other flavours in the dish. I've recently purchased some excellent pancetta and let me tell you, Carbonara just isn't the same without it. Actually, apparently Carbonara is supposed to be made with guanciale, but I haven't managed to lay my hands on some yet (But I will. I will). So use pancetta if you can, but don't let that stop you otherwise. Bacon is fine. Or try both and let me know if you can tell the difference. And do drop a line if you use guanciale!

Grated Pecorino © alickel

Another small but significant detail: I've found many recipes that use only Pecorino cheese. However, David Leite uses a 3-to-1 mix of Parmigiano-Reggiano (or Parmesan) and Pecorino. I usually cook Carbonara with Parmesan (it's more easily available around here), but the Parmesan/Pecorino mix is indeed more flavourful. However, I think using only Pecorino would, again, come out too strong and break the balance.

So let's get to it. The quantities are good for 3 people (or two, with repeats; at least that's how it goes around here). It takes about 30 minutes from start to finish, but allow a bit more on your first try.

 

Gear

  • 1 large pot for cooking the spaghetti
  • 1 large skillet or frying pan for the pancetta - and afterwards for mixing in the sauce and the spaghetti, so make sure it's big enough! Use a regular pan with the widest possible bottom, if you don't have a large skillet.
  • 1 mixing bowl
  • 1 measuring jar or similar container, good for at least 2 cups of water. One with a handle would be nice, so you can just dip it into the cooking pot
  • 1 sharp knife
  • 1 pair of tongs

Ingredients

  • A little olive oil, just enough for a few splashes on the skillet. I usually don't bother with extra-virgin, as it has a lower smoke point than standard olive oil.
  • 200g of pancetta
  • 3L of water
  • 250g of spaghetti (or, if you're feeling hungry, perhaps a bit more, say 2/3 of a 500g package)
  • 1 tablespoon of salt
  • 2 large eggs, plus two egg yolks
  • 1/4 cup of Pecorino cheese and 1/4 cup of Parmesan, grated and mixed together
  • Black pepper, to be ground on the spot

Preparation

Fill the cooking pot with water and put it to boil. Add 1 tablespoon of salt (at any point).

Pancetta © alickel

In the meantime, slice the pancetta in cubes. I like them larger, about 1.5 or 2cm on each side, but you can make them smaller if you like. I sometimes cut some of the fat out, but never all of it, since it helps grease the pan (and tastes damn good). Sprinkle a bit of olive oil of the frying pan, heat it on medium high and sautée the pancetta until it's crisp and the clinging fat is golden brown. Take it off the head and set the pancetta aside, but don't wash that frying pan yet!

On a mixing bowl, thoroughly mix two whole eggs, plus two egg yolks. Most recipes call for three eggs plus one yolk, but I found that the higher yolk-to-white ratio helps prevent clumping. Whisk in the 1/2 cup of grated cheese. Add the reserved pancetta as well, and mix everything together.

Back to the pot. Once the water is boiling, add the spaghetti and gently stir it to prevent sticking. After a few minutes (but before it's done), pick up 1/2 cup of the cooking water and slowly integrate it with the egg mix. This will also help prevent clumping, especially if your eggs had been kept in the fridge.

When the spaghetti is al dente, reserve an additional 1 and 1/2 cup of the cooking water, and drain the pasta. Put the frying pan on low heat and immediately add the spaghetti to it. Fold it once or twice to coat it with the oil that remained from frying the pancetta, and add the egg mix.

Now, here comes the crucial part. You want the egg mix to thicken into a creamy sauce, coating the spaghetti. Keep folding the spaghetti and gently stirring the sauce so that it doesn't stick to the bottom of the frying pan. If necessary, add some of the reserved cooking water. I usually end up adding about 1/2 cup (in addition to the 1/2 cup I had already whisked into the egg mix). Take that opportunity to grind some black pepper onto the spaghetti and mix it in.

Once you've reached the desired consistency, that's it! Take it off the heat and serve immediately. If you're serving on individual plates, grate some cheese (perhaps some of the Pecorino/Parmesan mix) and grind some more black pepper on the pasta. If you're serving on a bowl, leave the grated cheese and pepper grinder on the table for your guests. And make sure they use them!

Finally, although pasta is usually associated with wine, I find that Spaghetti alla Carbonara goes great with beer, especially with lighter ales.

Enjoy!

Carbonara

Syndicated 2009-10-19 14:10:41 from Bits of rbp - isnomore.net

Pushing up Python on Android

A few days ago, I put on the manliest voice I could muster and made an announcement to my wife: "Stand aside, woman! I am going to the gym!"

Needless to say, she was thoroughly unimpressed but somewhat amused when, half an hour later, she found me at the computer, programming.

Despite what she might tell you, I hadn't given up on exercising. You see, I had recently taken up the One Hundred Pushups, Two Hundred Situps and Two Hundred Squats programs. These involve a few sets of a varying number of repetitions each, with timed pauses between each one. So, for instance, on my first day I'd do 10 pushups, rest for 60 seconds, do 12 pushups, rest, 7 pushups, rest, 7 pushups, rest, and finally as many pushups as I can (but at least 9). These numbers of repetitions vary as you progress. My problem was keeping track of how many repetitions of which exercise to perform on any given day.

Now, there are nice PDFs with the whole exercise program on each site, but they're supposed to be printed. On paper. How low tech! Some people use spreadsheets, but... Meh. So I decided I should turn to my Android phone for help.

There is an iPhone app for One Hundred Pushups et al, and at first I considered writing an Android app to match. And I still do, but, of course, that's a full-on project, one that would definitely not be usable in time for me to exercise that night. So: pragmatic program, must be running in a very short time (my wife was laughing out loud, by then) and improve as need arises. This looks like a job for... Python!

Python is not (yet?) a first-class citizen on the Android, but it's a respectable second-class one, thanks to Damon Kohler and his Android Scripting Environment. ASE lets you run several interpreted languages on the Android, amongst them Python, Lua, Perl and JRuby. However, these are limited on what they can access on the Android API. More specifically, you can't build arbitrary user interfaces or create new activities (though you can invoke existing ones).

Still, having a Python interpreter on your mobile can be handy. I needed to input three sets of repetitions (one for each exercise program), and have Android let me know how many repetitions to do next, and for how long to rest between them. I'm still meddling with this code (trying to weigh making it better versus building a proper app versus actually, you know, exercising), this is just a quick hack I cooked up to get going, but it's growing on me. Anyway, here it is:

from time import sleep
import android

droid = android.Android()

# How long to rest between repetitions
rest = 60
# Warning before starting next round
wake = 10

# One line per exercise set, each number of repetitions separated by spaces
# For instance (pushups, situps, squats):
# 10 12 7 7 >=9
# 9 9 6 6 >=8
# 19 24 19 19 >=27
user_input = droid.getInput("Series", "Describe all repetition sets in your series:")
series = [i for i in user_input["result"].splitlines() if i.strip()]

def interval(theres_more=True, rest=rest, wake=wake):
    droid.makeToast("Rest for %d seconds..." % rest)
    sleep(rest - wake)

    if theres_more:
        droid.makeToast("Ready? %d seconds to start!" % wake)
        droid.vibrate(500)
    sleep(wake)

    if theres_more:
        droid.makeToast("Go!")
    droid.vibrate(3000)

for s in series:
    droid.getInput("New series!", "Ready?")
    sets = s.split()
    l = len(sets)
    for n, repetitions in enumerate(sets):
        droid.getInput(repetitions, '(press Ok when finished)')
        interval(theres_more=(n+1<l))

droid.makeToast("w00t! Congratulations!")

(you can also download it here)

As explained in the comments, it initially expects lines containing the number of repetitions on each set. So, if I'm undertaking pushups, situps and squats (respectively), I might input:

10 12 7 7 >=9
9 9 6 6 >=8
19 24 19 19 >=27

Of course, ">=9" is not a number, but the script will use whatever you input there as labels for prompting you to perform your repetitions.

You'll notice that the script uses getInput for displaying messages when it expects the user to press "Ok" (even though it doesn't expect any typed input at all). That's because, currently, getInput is the only graphical widget provided by the the Python proxy for the Android API. But more on that later.

So, try it out (if you're willing to exercise at all, or if you're just curious), and let me know what you think! Did it help you exercise?

Syndicated 2009-10-07 19:08:31 from Bits of rbp - isnomore.net

Bleeding hell, it's been a long time (more specifically, since a time when advogato didn't have password recovery)... "Update advogato" >> GTD.Inbox

Four posts, all from 2000. Ok, we can all see where this is heading. I officially pronounce this advogato blog dead. There should be more frequent posts at http://isnomore.net/blog

Ok, a bit late for that, but oh well...

Everything happened at Comdex: I lost my luggage on the plane to Chicago, the booth wasn't ready, the other girl from Conectiva that went there had trouble with her reservation at the hotel... But, when we finally got things ready, it went ok. All that trouble kept me busy with solving problems and less with enjoying he show, but I think it was a positive experience...

I'm almost on my way to Comdex Sprint (Chicago - USA)!
Last week I was asked on wednesday if I'd be available to go to the US the next saturday, for CA World and stay there until Comdex. Wow! Can I pack first? ;)
Then they (Conectiva HQ) told me someone else would go to CA, but I'd still go to Comdex. Cool :)
It seems I'm going tomorrow night. Yes, I still don't know.

See you at Comdex :)

Well, LinuxSP once again rises from the dead. But this time I've made it clear that I don't currently have time to organize events. And some people seem to have taken it to their responsability! That's great. It's the same people that usually help, but it's still something. Let's see how things go. Personally, I'll help as much as I can (it wasn't an excuse, I really don't have the time) and hope everything works out. If the event (probably a demo day) fades and doesn't happen, some action will have to be taken or no one will take us seriously...

Ah, isn't it good to be publicly accused of misusing trust of others in other to obtain personal gain....
http://pontobr.org/noticia.php3m?nid=594. Anyway, I've been unable to write a long message on LinuxSP and now seems to be the time (actually, long after the time). I'll finish it and post it today or tomorrow....

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!