Buenos Aires Places: Brew Bars

I felt like i had to post this, you know?. There are loooots of bars in Buenos Aires. But few of them actually have a great variety of beers. I spent most of my weekends, during the past ten years, finding the best places to go.

And it turns out… there is nothing like staying at home. Yeah, i might sound like an old man. But if you go to a bar, you cannot drive for two good reasons. The police might take your car, or even worse, you won’t be able to find a parking spot. Okay, that might sound backwards… but anyways.

If you still wanna go out to a brew pub, i’d like to recommend few of them…

  • Van Koning
    This one used to be my point of reunion for years. It’s a nice place, located in Las Cañitas, Belgrano. They have a wide variety of beers. It’s pretty expensive, though.
  • Buller
    They produce their own beers. Again, this is a very expensive place. But i dare to say, it’s worth every single penny. If you go there, ask them a Honey Beer. You won’t regret it.
  • Antares
    They’re sort of Buller’s competition. They match them in quality, and in price. The huge advantage they have is their locations. You can find an Antares righ there, in Las Cañitas (2 blocks away from Van Koning), and yet another one 3 blocks away from La Viruta. No surprise, this is the place i like the most.

 

Back to BitTorrent

Well… after MegaUpload was shut down, it’s been a hell of a nightmare to find a working filesharing service. Everyone is sooo afraid of the MPAA and RIAA, that they’re just closing the door. So… it’s time to get back to our roots.

YEAH!. I’m talking about P2P networks. I used to be a huge fan of BitTorrent, in the good old days where MegaUpload wasn’t even technically possible. It is in fact thanks to BitTorrent protocol that The Pirate Bay is still operative. Magnet links are, as far as i know, legal. Nobody can punish you for posting magnet links. In the end, it’s a GUID, right?.

So… i had to get back to BitTorrent. That was the easiest way to stop searching files that are just not there. The big question is… what is the best OSX Client for BitTorrent?.

Well, i’d like to recommend this one:

It’s called Transmission. Just click on the link, and get it for free. There are few tools that help you automate the download of torrents. I’ll post some of them in the next couple of days. Stay in sync!

 

Buenos Aires Places: La Viruta

After writing so much about iOS… Apps…. and other geeky stuff, i though it would be a good idea to write a little about one of the greatest places to visit… (whenever) you step by Buenos Aires.

Tango is one of the greatest assets that Argentina has. It’s an old fashioned musical genre. But let me tell you something you may not know. Dancing tango, actually, is one of the most fun things i’ve don in the past year (or so). It can get pretty technical, tricky, and difficult.

It is said that after a year of practice you actually get to grasp a little bit about this dance. There are many many places to watch tango (or even take lessons). But there is a particular place that has all the lights on. Yeah, i’m talking about La Viruta.

You can learn how to dance Rock’n Roll, Salsa, Tango, and even Milonga. They have a restaurant + bar, and i dare to say that it’s more fun than any other disco you might get to know.

I know exactly what you’re thinking. ‘This guy is oooold’. No. I’m not!.

NSMutableSet: Filtering Duplicate Elements

Suppose that your app has X amount cached objects. And suppose that there is a slight chance that.. since the backend doesn´t actually know what it is exactly that you have cached (and what you don´t have cached), it might send duplicates.

So… what do we do?. Shall we write a for routine checking dupes?. No way. There is a far more performant way to achieve this, and it requires less lines of code.

Steps…

  • Implement your own ‘isEquals’ and ‘hash’ methods, in your model object. For instance…
- (BOOL)isEqual:(id)object
{
    SomeClass* secondObject = (SomeClass*)object;
    return ([secondObject isKindOfClass:[self class]] && 
            [[secondObject id] isEqual:[self id]]);
}

- (NSUInteger)hash 
{
    return [_id hash];
}
  • Simply instantiate a NSMutableSet and add the cached objects plus the objects retrieved from the backend. If the set already has an object for any given ID, and you attempt to insert a new one… but with the same id, it´ll just not work.

So… no more filtering things by hand. NextSTEP’s code will do the trick, from now on!

Grand Central Dispatch: Perform Block After Delay

We have seen in a previous post the proper way to write a singleton, with the help of our good friend Grand Central Dispatch.

In this opportunity, i´d like to share a goodie i´ve learnt few days ago. I suppose many of you had problems with the following scenario. You have to perform a task, which is time consuming, and you need to place, onscreen, an Activity Indicator.

Although the Activity Indicator performs the animation on its own thread, you need to “spare some time” in the main thread for it to begin working. I mean… you can execute [indicator startAnimating] right away. But… if you don´t release the main thread, even for a short moment, surprise!. The spinner won´t work.

So… the common solution is to split that method into two parts, and execute ‘performSelector: withObject: afterDelay:’. That´s where GCD comes in.
We can do the exact same thing… but with blocks!!. That´s SO MUCH COOL…!

dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW,
                                        0.1f * NSEC_PER_SEC);

dispatch_after(popTime, dispatch_get_main_queue(), ^(void)
{
     // ...  Your code
});

Note: The delay, in this example, is of about 0.1 seconds.