Rush (2013)

IMDB plot:

The merciless 1970s rivalry between Formula One rivals James Hunt and Niki Lauda.

We can’t stop here, this is spoiler country. Also, I’ll keep jumping between reality and movie all the time, because this is based on real facts.

First disclaimer: I’m a Formula 1 fan. Second disclaimer: Even if you don’t like Formula 1, you may like this movie. Why? Because Formula 1 is just a background noise used to tell you a much larger story.

Going forward: The movie focus on the events in the 1976 season of Formula 1, when Niki Lauda fierce competition with James Hunt reached its apex. Who, you may ask? Sure, you can ask. And this is answered at two points in the movie: In the first 10 minutes and in the last 5, showing perfectly the changes each driver had in the curse of the season.

But the movie starts before the 1976 season. It shows both drivers starting on Formula 3, going to Formula 1 till the end of the 1976 season, when both had equipareted cars (as Hunt says in the movie), passing through Hunt downfall, his sudden luck in the very start of 1976 season, Lauda terrible accident in Nürburgring that year and what happened after that.

Acting is alright. I mean, Daniel Brühl did an absolutely killer job at Inglourious Basterds and although his presentation here isn’t at the same level, it isn’t bad either. Or maybe Lauda is really that taciturn, in which Daniel does a perfect impression. Chris Hemsworth is a weird case. I mean, it isn’t bad, but his lines feel a lot… unnatural in the whole. On the other hand, when the movie shows real images of Hunt, you can see that Hemsworth managed to capture all the manerisms in a nearly identical fashion.

Sadly, everyone else is mostly decorative. Olivia Wilde/Suzy Hunt nee Miller and Alexandra Maria Lara/Marlene Lauda are important to the plot — added aspects in the way both drivers changed their personalities and showing how different their lifestyles were — but they are in no way given enough focus.

On the other hand, I have to seriously compliment Ron Howard in the way he directed the movie, Hans Zimmer for the music and the whole sound editing team. And by that I mean the continuous use of different things to show the emotional state of the movie: the blurred vision of Lauda when he’s afraid and returning to his normal, confident self — in an scene that comically reminded me of “Days of Thunder” and “pilot narrowly escapes another tragedy and regains his full confidence clichè –; the muffling of track sounds (including the whole start up line roaring of engines) when the drivers close their helmets; the really really slow motion scenes in the very start of the Japan GP, the last one that would say if Lauda would win the championship or if Hunt would be crowded, showing the tension in the air; the engine pistons working first in slow motion and then slowly going into normal speed when Hunt goes back into his original, fighting self. All those make the movie simply great, by using other effects than simply camera or someone saying something.

(Just a small sidenote: Zimmer works is getting greater each movie he works on.)

Sure there is more drama than reality in the movie, but it doesn’t mean the story behind isn’t interesting and that the drama destroys the story — after all, this is not a biographical movie, but “based on real facts”. There is a whole scene about Hunt punching a reporter due an aggresive question about Lauda appearance post-accident which nobody can confirm it really happened, but people who knew Hunt said “Yeah, that is something he would do.” So, even if it is a drama “based on real facts”, there is too much ressoancen with real life that even if some situations really didn’t happen, at least it is something people who knew the real “actors” in this say “yeah, it could’ve happened.”

I can’t vouche the movie for the actors, but I can seriously recommend it based solely on the work of Howard, Zimmer and the sound team. So go watch it, it is worth.

Why You Shouldn’t Hate VirtualEnv and PIP

So a friend passed a link to me about Why [Someone] Hates Virtualenv and PIP.

Well, I also wrote my fair share of angry posts, but there is a lot of this that it is bothering me. Read it and then come back.

Back? Ok, let’s see…

Illusion of isolation

I think the argument is somewhat weak. What the author mentions in this section is basically “Virtualenv provides isolation for python things”, which basically is what the box says: “Virtual Python Environment builder”. I kinda understand that some people may confuse this as pure isolation but that is the same about complaining that people may use Word and think they can do math because it has tables.

But stop for a second and think: “Who would think Word can do math just because it says ‘Tables’ in the menus?” Well, there you have it. Seriously, if someone think virtualenv can provide a full isolation when the package clearly says “Python Environment”… well, they shouldn’t be coding anyway, right?

Full isolation

His point is on point: Yes, if you want full isolation, you’ll need another solution. He provides two, Vagrant and LXC (which stands for Linux
Containers). Thing is, a Vagrant environment is not an easy “5 seconds” process. Heck, it’s not even an easy “5 seconds” start process.

Vagrant, for those unaware, create a virtual machine, boots it, start a SSH session to it and provides a somewhat easy process to map a local directory to a directory inside your virtual machine. Vagrant provides a full isolation by creating a full operating system inside your operating system, based simply on a file (it’s Vagrantfile.rb, or something like that). But, again, it’s far from being a “5 second” process, creating or starting.

LXC (which, again, and keep this in mind, stands for Linux Containers) provides something like Vagrant, but apparently using Linux internal
virtualization system to create such machines. Unfortunately, after installing, I tried to use it but it requires some “templates”, which it can’t download from anywhere (which Vagrant does: It has its list of available templates, so you just pass the URL and it will download and create the machines — although it’s kinda hard to have two different OSes as base system). So, let’s say, it’s Vagrant with the “10 second” create/start. The problem with LXC is that it is tied to Linux and, thus, it would require everything to use Linux. While Linux is a nice operating system and all (and I use it as my primary OS these days), Python is not tied to a single operating system and we need a solution that works everywhere. Virtualenv works on Linux; virtualenv works on OS X; virtualenv works even on Windows; LXC works on Linux; LXC doesn’t work on OS X; LXC doesn’t work on Windows.

(The fact that LXC is even suggested makes the solution even mor silly if you check the blog title and it says “platform-agnostic python developer”. How can you suggest a platform specific solution if you are a platform-agnostic developer?)

If you need full isolation, the only real solution is Vagrant. Which is slow, even if that provides a full operating system isolation, which is way more than virtualenv provides — and, most of the time, way more than you need.

I’ll steal the point here and bring something here: Virtualenv is a nice way to have two different apps running under the same server. You can wrap both under different WSGIs (uWSGI or Caussette), provide two different ports for each and make NGinx provide each in different URIs. How would you do that with Vagrant of LXC? Install a different
NGinx inside each and use a third outside your virtual machines as load balancer? Make the outside NGinx access each via different ports, losing all the benefits Linux provides when dealing with sockets in the same machine? Either solution is stupid and moronic, specially if your apps are small/have low access count and virtualenv provides the perfect isolation for such situations.

Virtualenv for deployment

Here I’ll admit my ignorance and say that the only type of Python deployments I ever did were deployments for web apps. And really, what we did was simply create a virtualenv and install the packages. New version? No problem, just install the package in the virtualenv. Done.

(Actually, I had one experience with desktop deployment even before virtualenv existed — or was so widely know as it is today — but I guess that doesn’t count.)

So… no, virtualenv is not for deployments. You can use for deployment, but it’s not its primary function.

Also, if you need external dependencies (like the mysql-devel packages to be able to compile python-mysql), neither Vagrant nor LXC will help you there. You would need to install those even there (even worst, you can forget that you are using one of those and create your databases inside the virtual engine and, if something goes wrong with your installation, the whole data will be gone — and it’s really easy to forget such configuration things.)

Virtualenv is full of messy hacks

The whole “hacks” here is that you get a full package of Python inside your virtualenv. Well, this is needed because there are slightly changes even in the python standard libraries and virtualenv can create an environment for any python version installed. Thus, the packages must follow.

The binary inside the virtualenv also get changed to reflect a lot of stuff. I’ll admit that some things are silly — not stupid — because things will break if you change your virtualenv directory. But hey, that’s your fault for messing with the environment (or would you say that Vagrant can gracefully recover if you change the virtual machine image filename?).

If you need to run a Virtualenv’d python app in a cron job you’ll need to pass the virtualenv initialization, yes. But so should you check if your Vagrant engine is running (unless you put your cron job inside the vagrant engine, but then you’ll need to make sure the configuration file reflects the creation of the cron job, or it will be lost forever if need to recreate the environment). The same goes to LXC. If you forgot to start the virtualenv, or starting the Vagrant machine or start the LXC container, all 3 would fail. The fact that you need to start your virtualenv before calling the script doesn’t make any worse the the other options.

On top of that, if you need to keep going into virtualenvs to run your scripts, you’d do what any sysadmin worth its salt would do: Create a script to start it. That’s what virtualenv wrapper do — heck, even I wrote something like that already.

bin/activate

Nope, bin/activate is not exciting. Neither is Vagrantfile. But both do a lot of things in the background — setting PATHs, defining environment variables — which you don’t want to worry about. The fact that active changes your prompt is not “exciting” but it is a nice informative measure to tell you “hey, you are in a virtualenv now”. Do you want to make bin/activate “exciting”? Install powerline then.

Since we are talking about those “this thing starts a virtual environment/engine”, do Vagrantfile change anything to tell you you are in a virtual machine? Nope. Unless your virtual machine is using a different prompt, you’ll never know you are in a virtual machine for start!

(You will see differences in the prompts, yes, but that’s because people who upload the images for Vagrant actually change the original images prompts to reflect that — after all, all you’re doing is SSHing to a virtual machine. Or do you think Vagrant does a wrapper around SSH to change the prompt?)

And, since we are talking about scripts that suck, let’s talk about Vagrantfile, which is the most stupid idea I ever had (sorry, I need to go to rant mode now). A Vagrantfile is, basically, a Ruby script, with access to all Ruby can provide. If you can’t see the damage that can be done with it — or the pure laziness of its developers, which didn’t even care about writing a proper configuration file — seriously man, give up coding, for the sake of everyone else.

–no-site-packages

See the answer above about “messy hacks”: There is a reason things get cluttered inside the virtualenv and that’s due the versioning of packages inside the virtualenv.

I don’t even think it’s worth discussing this.

PIP and virtualenv buddies

I don’t know how to respond this. At first, it seems the author has a personal vendetta with Ian Bicking, which makes the point about both going hand-to-hand moot. Actually, the same can be said about Werkzeug + Flask + Jinja: “Oh, look, they fit so perfectly together, I bet it’s because Armin Ronacher wants to promote his personal philosophy and workflows”. Yes, if I said something like that, a giant “WAT” would appears on the top of your head. Thing is, Werkzeug + Flask + Jinja work so fine together because the author knows each inside and out and it makes easier to make one fit into the other — and the same goes with PIP and virtualenv.

Also, easy_install is not a solution. Easy_install do not have uninstall. Easy_install requires that you use an special option to record which files have been added/modified. PIP has none of those problems. And if you think “oh damn, this package isn’t needed anymore, better let it there” or “well, this package isn’t needed anymore, better destroy my virtualenv and create it again”, you’re doing package management wrong.

PIP builds from source

Anyone that had to deal with eggs know they sucked. Yes, they did. The whole concept of eggs is so broken that it’s being replaced (I think they new format is called “gears”, or something like that), but really, after so many installations, fuck binary installs of Python stuff.

The fact that PIP generate its install from the source is a good thing: It promotes a lot of clean storage of stuff, a proper setup.py for your project, a proper MANIFEST.in for your project, a proper project structure, a proper separation of each component and seriously, no freaking hacks to read non-python files inside your egg (try it, it’s terrible ’cause you need one behavior for development, when you have no eggs, and another when your project is packaged in one egg).

requirements.txt

PIP accepts a file as a list of requirements, yes, but you don’t need to name it “requirements.txt”; you can name it whatever you want. All you need to put in this file are the names of the packages your package/project requires. Just that. PIP does no magic over it.

The real magic happens when you read it inside your setup.py to provide the list of requirements to PIP/easy_install. And that’s it.

URIs as dependencies

Ok, semi-point. But it is not like "everyone is doing it, AMG!". Actually, I can’t remember any package that I used professionally (or even in my personal projects) that the author used an URI instead of the package name. Even in our projects, we always did create a company-wide PyPI with the company packages to deployment and as a cache for the official PyPI.

Can the fact that PIP accepts URIs be considered a problem? It can be abused, yes, but, as I put before, Vagrantfile can be abused in terrible ways, so maybe we should ban Vagrant too, right?

Actually, no. Vagrantfile, as stupid as it is, provides a lot of access to things that may be required when you’re creating your virtual machine, and so can URIs as requirements in that silly, stupid corner case.

But, again, no serious project uses URI in their requirements.

PIP freeze

Semi point again. I see a lot of people who go “I need this, and this, and this… Ok, everything here, let me create my requirements.txt by using pip freeze”, which is utterly wrong. But that doesn’t make “freeze” a bad option: It’s a pretty nice way to see what is installed in your environement. Or is “ls” a bad tool? Are stdin/stdout redirects a bad tool?

Conclusion

Dunno, some points are completely off the mark and the rest are semi-ok. I guess it was just a rant for the sake of ranting, nothing else.

It doesn’t mean virtualenv and pip don’t have their problems. But the fact that both are now part of the Python standard library may provide a cleaner implementation and a more tight implementation with the Python interpreter.

É Hora de Olhar pra Dentro

A Folha postou um vídeo do caos no metrô de São Paulo no dia da greve dos ônibus. É algo que a gente só imagina em filmes de catástrofe.

A questão é que, como sempre acontece quando aparece o caos, começam a culpar o governo.

Pessoas, acordem: Não foi o governo quem empurrou pessoas entre os vãos das escadas; não foi o governo que achou que sempre cabe mais um. Foi o próprio povo quem se enfiou no meio da baderna quando visivelmente não cabia mais ninguém; foi o próprio povo quem empurrou outras pessoas para entre os vãos das escadas; quem elevou um problema ao nível de caos foi o próprio povo.

Sim, sim, o governo gasta dinheiro desnecessariamente e trabalhadores de serviços essenciais — como o transporte público — não são valorizados e sim, justamente por ser um serviço essencial deveriam ser melhores remunerados. Mas isso não livra ninguém que aparece no vídeo da responsabilidade de respeitar o próximo, de perceber que naquele ponto em que forçar passar não vai resolver nada e que isso só iria piorar as coisas.

Se o povo não consegue respeitar o próprio povo, porque nossos representantes respeitariam?

(E, se estendermos um pouco, quantos motoristas de ônibus — o serviço essencial acima — respeitam os usuários do serviço?)

Políticos vão, políticos vem (e alguns ficam anos e anos, mas enfim), a sopa de letrinhas de partidos mudam, mas enquanto não começarmos nós mesmos com uma política de respeito entre nós, os políticos continuarão não respeitando a população — assim como não nos respeitamos.

Of Responsabilities

Yesterday, Mozilla Foundation announced that future versions of Firefox will have support for a DRM scheme called EME. By their own blog post — and by several news outlets around — it is not a decision they are happy with and feel they had to add to not force anyone to switch browsers.

(Just small note here: Yes, they don’t want people to switch browsers because that would mean less revenue for them, but at the same time, Firefox is one of the only major browsers that really cares about privacy and not just how their icon looks better in this version. Anyway…)

After the announcement, a lot of people start claiming some stuff like “hey, last CEO was called out for a lot less than this” and “we need a new ‘pure’ browser”.

Yeah, yeah, I get why you are angry. I just think your anger is misdirected.

Imagine this: there is this kid. The kid is bullied non-stop by richer kids, but he’s stoic. He takes the punchs like nothing. You root for the kid, because he never returns violence with violence. Then, one day, the kid kills himself. What happens?

1. You call the kid stupid for killing himself?

2. You go after the rich kids and show them what they did?

The right, moral answer is 2. The kid suffered enough and just saw no other exit. It was not a noble option (or smart, let’s say), but it was the only option he saw.

Now, that’s the same thing: Mozilla had to kill one of its morals because richer kids pushed something made to reduce your freedom just so you wouldn’t need to give up your other freedoms (privacy, for example).

And then people want full rampage on Mozilla for taking this decision.

A decision forced on them by richer kids.

Richer kids like Google, Microsoft, BBC and Netflix.

Now, there is absolutely no one going after Google for backing EME; there is no one saying “Microsoft, always fucking up with the user”; there is no one telling BBC to stick to news and stop messing with IT; there is no one willing to lose watching The Next Generation for the 11th time instead of supporting Netflix. Nope, everyone is against Mozilla decision.

Mozilla is not resposible for DRM on Firefox; Google, Microsoft, BBC and Netflix are.

So, if you’re pissed, go cancel your Microsoft account; delete your Gmail; forget about YouTube; stop getting your BBC news; cancel your Netflix account. Show the rich kids that you don’t accept their actions and don’t want to be around them anymore.

(But, in the end, it’s a lot easier to switch browsers than stop watching cat videos on the internet thanks to YouTube or watching your old series on Netflix. And, thus, it is easier to go after Mozilla than doing what’s right.)

Robocop (2014)

Classic IMDB Plot:

In 2028 Detroit, when Alex Murphy – a loving husband, father and good cop – is critically injured in the line of duty, the multinational conglomerate OmniCorp sees their chance for a part-man, part-robot police officer.

Classic warning about warnings: There may be.

No remake is without (deserved) controversy. Robocop, a remake of the 1987 classic is not immune to this, specially since the original is, in my humble opinion, one of the best science fiction movies around (and it ages gracefully too).

But there is one thing the original Robocop didn’t fully explore: If a cop dies and it’s turned into a cyborg, what happens to this family? How does the company threat him, as a person or as product?

There is one sequence in the original movie, about 15 minutes long, in which you can see things going around Robocop, but not Robocop himself: his first full activation, the walk around a couple of people — investors and scientist — his entrance in the police till, finally, you can see his full appearance — you can partly see it in a monitor after his full activation — at his recharge “chair”. All this just follow people seeing Robocop and their reactions, not Robocop himself, which is an amazing idea by Verhoeven.

But back to the point: Early in the movie — at least, after the point Murphy becomes Robocop — that things around seem to go around: His family is still there (a point missing in the first movie); the company is closely following him, pretty much as a product and not as a special clean up crew; his doctor is there, following him in every turn; and the company robot “puppeteer” is there too. And the interesting point is that each one see Robocop as a different thing: To his family, he’s still a man; to the company, a product; to the doctor, his most complex work, which may help others in the future; for the puppeteer, it’s just another robot.

All this could make an incredible history a la Deus Ex: Human Revolution but it seemed someone thought “In the original movie, the guy shoots a bandit in the balls! We need more violence! We need more action!” and then everything went down the drain.

In the end, Robocop seems to be pushed into two different directions at the same time, only to fall short in both: It’s action scenes are not impressive and the thoughtful part is not that smart.

Acting is alright, but not impressive, although I have to give props to Michael Keaton and Jackie Earle Haley. Michael Keaton plays the Omnicorp CEO, the guy behind the “product” Robocop. He really does a good job in being a dissimulate CEO, always thinking about the company and, well, acting on it (the usual Keaton weird acting really pays off here). Haley plays the puppeteer and he’s completely unemotional towards Robocop, as he’s towards his other robots; to him, Robocop is nothing but a robot that misbehaves.

Thing is, both are really competent and in character all the times.

The others, not so much, except for Samuel L. Jackson, which was given the job of a O’Reilly-like character, although not so good in hiding his agenda — actually, his agenda is shown in plain sight, which feels dumb as a bag of bricks. It seems they tried to throw the silliness of the TV shows in the original movie with a “Starship Troopers” propaganda in a single package, but it just reeks absurdity in so high level it simply drags the movie down.

Joel Kinnaman as Murphy/Robocop does a somewhat nice job in the later but not in the first. Surely, he didn’t have to go extremes like Peter Weller mostly ’cause we can see that robots today can do human-like movements instead of the factory-robot like we thought in 1987, but he manages to go full “I’m now more robot than man, so I have no facial expression” and “oh god, I lost my body, let me die”. But, again, when he’s full human, he’s not likable or anything like that.

Gary Oldman plays the doctor that turns Murphy into Robocop and you never know what he’s really thinking: Is he worried about the person inside the machine, is he worried about his job or is he thinking about the medical advances he’s making? He keeps going into those three non-stop, by in one scene seemingly protesting against some medical procedure and, just after that, almost killing all humanity in Murphy for the sake of his own job.

Abbie Cornish and John Paul Ruttan play the non-robotic part of the Murphy family. But… meh. Abbie feels pretty much like Rachael Taylor in the first transfomers: Just a pretty face that talks loud. And Ruttan is just a kid, so…

Basically, it’s all you have. Directing is hard to get, mostly because the script seems trapped into two corners and never knows where it wants to go. And no, I’m not saying this to protect José Padilha just because he’s also Brazilian: maybe it was his idea to push both sides at the same time.

In the end, this remake feels like a giant puzzle in which not one piece, but at least ten are missing.

My Take on Diablo 3: Reaper of Souls

Those who know me may remember how strongly I said that while “always online” was a Diablo 3 “feature”, I’d not buy it.

Well, I cave in and finally bought the game and its expansion, in a process that took roughly 2 days[1] due “security”.

The Good Parts

Since I’ll mirror a lot of criticism D3 pulled in the last years, I’ll start by the good points:

It’s pretty.

Screenshot002

Well, that’s it. It is on the most beautiful looking hack’n’slash games I ever played. Enemies appear to be part of the environment, while still looking like something not-environment. Hard to understand? Think this: There is one enemy that looks like a tree and, while it doesn’t move, it looks exactly like the other trees; but when it starts moving, it looks like a real enemy.

It’s gorgeous and well designed graphically. I can’t find a single problem with that.

The Bad Parts

The whole problem with D3 is everything else.

It’s a Matter of Scenary

While the game is beautiful, it severely lacks ambience. Grim Dawn (which I gave my took on it before), while looking good but not as beautiful, made me grip my mouse with so much force my thumb is still hurting. D3 music is lackluster and the sounds are not really “fuck, I’m not going there”. The whole atmosphere of D3 lacks a sense of urgency and “oh my god, the world is ending.”

Let me keep comparing D3 with Grim Dawn: In Grim Dawn, humans are in the brink of extinction, being crushed in the middle of two powerful races that see humans simply as tools. When you beat the first boss of the game, the whole village of survivors can’t believe you did
something like that — the idea of beating one of the powerful beings into submission is simply impossible and you did the impossible. In Diablo 3, killing bosses is mentioned as a matter-of-fact, like buying groceries or writing a blog post[2]. Heck, the very first fight you see one of the NPCs mention that he never saw someone fight like that. At the very beginning you are put in the shoes of the most powerful beings in the whole planet — which is exactly what Tyrael says in the end of the expansion.

Challenge Denied

The other problem with D3 is the “baby’s first hack’n’slash” mentality in skills and attributes. “Congratulations son, you got a level. Daddy will now give you a skill, ok? But daddy will give you a skill, not a skill point, ’cause you may break it.” and “Oh no son, those knobs are too hard to you, let daddy select which attributes you need next” are the most annoying facets of this mentally. While in Diablo 2 you could turn a class completely around, like a necromancer based on poison that requires a lot of strength, you absolutely can’t do anything like that in D3. Each class has a design and you can’t in any way, shape or form push them outside their design. Sure, sure, it makes easier to balance a game like this, but this causes another problem: lack of incentive to go forward.

For example, the poisonmancer (that’s how players called the necromancer-with-strength build) example above: you’re required to spent points in strength — an attribute that makes absolutely no sense for a class like the necromancer — because you’ll going melee with monsters and your poison dagger and you need the highest defensive gear possible, which can only be used if you have enough strength. So you keep that armour in your bags because it gives 100 more defence and you need only 3 more points in strength to use and you go around and around trying to kill everything just to gain XP to get those 3 damn points and… you get the picture. It’s the process of that last damn step in getting better to get even better that pushed you forward. And it usually involved in the need to push for just another level to get the 3 more points in intellect so that skill wouldn’t suck all your mana and then you get yet another piece of gear and so on…

(And I reckon this is basically the “carrot on a stick” mentality that Blizzard bought to World of Warcraft, and you can see that it works.)

Without the worry of picking skills or even designing your character the way you want, where the challenge was left? Well, Blizzard seems to have learned a thing or two with their costumers and decided that the best way of dealing with stuff is zerging: instead of going face to face against 1-6 enemies, you usually face 20 or 30 in a single combat. So… yeah, here is the thing to make you feel proud: you defeated 25 monsters without dying — in a game designed to throw 20 to 30 monsters in your face.

This problem is further shown in the start of the 5th act — part of the expansion — when you have to face single enemies at each corner: it is terribly dull and boring but hey, you were trained since the very start of the game that you’d face waves of mobs, in an almost-non-stop combat and you would think that maybe switching to single target skills would be better, but then again, you’ll just be waiting for waves of mobs soon and you never change your skills.

The zerging is also created another problem: while the skills are designed to fill small roles — single target damage, AoE damage, support, resource generation — you end up with always taking at least on one AoE to deal with those 20 to 30 monsters, one support skill for mitigating the damage from those 20 to 30 monsters, one resource generation to keep dealing with those 20 to 30 monsters and some assorted bunch of AoE when you have a lot of resources and your main AoE skill is in cooldown. This absolutely kills any chance of building anything else. Yes, build diversity would come from your decision to make a strong single-target character, or a support character, or even an AoE build, but due the design of encounters — which are also a shadow of the daddy-picks-your-skills design — you end up with very little variation of builds.

So, to sum up: You have no choice on skills or how to distribute your points, which gives you no challenge to look ahead (“get the damn 3 points in strength to use this armor”, “get enough skill points to open that mitigation skill”), so the game throws zerging to provide some challenge to you, which stifles build variation. Can you see that the whole problem with the game is the decision of hand holding design?

Anti Yamato Gun Design

There is a little anecdote about Space Battleship Yamato: If they have such powerful canons, why don’t they start firing them right out of the bat? Well, the reason is simply because they take too long to recharge and consume too much resources to fire. So starting with them out of the bat would mean that if there was a bigger challenge up ahead, they would not be ready for it.

Most games add a “yamato gun” skill: something with a long cooldown that requires a lot of resources which you’d use as a last resource because there may be something up ahead that may require more firepower.

D3 takes this completely away. The big resource, big damage skill daddy gave you earlier? Do not worry, it will get out of cooldown in less than 30 seconds and will take only 3 hits of your resource generation skill. So you never save it. With a monk, I keep using the most impressive skill (Seven Sided Strike), which does a lot of damage in a single target, just to kill annoying enemies that I could simply run to and kill with a single hit, but hey, super skill will get out of cooldown in less than 15 seconds and I just need to punch someone in the face again to gain enough resources for it, so fuck it, I’ll use it. In no moment whatsoever I had to run away from a boss to regain enough resources or wait for a cooldown.

Play Online With Yourself

Oh yeah, I’ll have to speak about the “always online” requirement. Oh yeah, I’ll repeat what everyone else said, so you’re free to skip this part of you’re already tired of this.

Still here? Good.

I can’t remember a game that plays with network as bad as D3. Even Guild Wars 2, which is a MMO, can handle lag spikes better than D3. More than once I was put there, damaging air, walking around with no mobs attacking me and then, suddenly, a huge pile of numbers flying off with random results — sometimes I killed the whole bunch of enemies, sometimes I was just dead. Even GW2 will try to figure out what’s going on for a while, using previous information, reducing the impact of the lag spike.

Not only that, but for a couple of weekends, Blizzard login servers have been been hammered by something and were really slow (this was a notice they put in the launcher). So the problem is not simply how my ISP, my modem, my wireless router and their connections work: The problem can be on Blizzard site and who the hell are you to tell them that they need to upgrade their connection?

But not to fret, I bet Mr Jay Wilson will pay from his own pocket to replace my house wiring — or even Blizzard wiring, or their ISP wiring. Actually, Jay Wilson, being such a nice guy, will replace the wiring everywhere to prove that internet problems don’t fly anymore.

Conclusion

Although I have given D3 just a single positive problem, I can’t say that the game is bad. It is not. The absolute summary of D3 is: It is pretty damn nice generic ARPG.

The problem with D3 is “what it could be”. Watching D3 in its state is like knowing this kid that can draw amazing paintings and, finding him years later, he dropped the paints and became a lawyer because his parents say so. You saw the potential years ago and now it seemed that it went all to waste.

The new ARPGs that appeared when D2 left without a successor prove that: Grim Dawn, Path of the Exile, even Torchlight proved that you can make a “smart man ARPG”. The sad fact is that Blizzard saw this ressurgence and decided to go the other way around: Instead of making you think, they took everything away and made a “ARPG for dummies”, with so much hand-holding that even their ideas of customization when down the drain.

Oh, and the fact that D3 is, today, one of the most expensive ARPGs around doesn’t help even a little bit.

[1] The whole process was convoluted as hell: First, I had to buy Diablo 3 for BRL 79.90 (there was this “amazing” promotion to buy both D3 and RoS for “only” 169.80 instead of 179.80, in which I believe was made by the guy responsible for the class balance). So first I bought D3 via “DineroMail”, a process that took 5 hours to be approved. Then, burned by the long delay, I tried to fill my Blizzard account with enough money to buy directly, thinking that since Blizzard talks directly to my card operator, I’d have to wait less. The whole process took 15 hours, then.

[2] … which brings another point: Why were the D3 designers so obsessed with Leoric? I mean, fuck it, I had to deal with him in Diablo 1, had to hear his stories — and kill him again — in Diablo 2 and now at least 50% of the first act goes around him again? I mean, seriously? I got it already that he got crazy when corrupted by Diablo, you don’t need to repeat it already for the damn third time! If I was curious on what happened to Leoric — or even who the hell was Leoric, for that matter — I could, I don’t know, search the internet, since the damn “always online” forces me to have one, right?

A CEO, a Browser and Civil Equality

This post is late. Not much late, but it is.

Today Brendan Eich stepped down as Mozilla CEO. Brendan Eich, for those who don’t know who he is one of the fathers of JavaScript and was Mozilla CTO for a long time. Also, he contributed to the “PROP-8″, a constitutional amendment to band same-sex marriage.

Now I don’t live in California or even in the USA, but I can understand why this can outrage some people.

And I’ll say some things that may make the same people outrage at me, so let me put this right here: I’m in favor of same-sex marriage only because it has absolutely nothing to do with a religious ceremony and everything to do with civil rights and how the law sees “couples”.

(And before some idiot comes commenting some stupid bullshit like “so are you in favor of a man marrying a tree?” I’d say “yes, if the tree is capable of signing the damn document, which it can, you stupid moron.”)

But back to topic: After Eich was appointed CEO, a huge discussion about someone against civil liberties going to lead the company that talks a lot about “freedom” and “open to all”. I can understand that.

The reaction from his appointment was so huge that Mozilla co-founder Mitchell Baker posted about separating personal opinions and company opinions, which Eich himself addressed too, without saying he was sorry about funding the PROP-8 legislation.

And, to be honest, I get that: I bet my company board of directors are all in favor of a right-wing government, while I’m a pro-left-center government. My personal opinion do not reflect my working posture (and yes, I reckon both are not in the same level, but still…)

There is a huge discussion at Ars Technica when OkCupid warned Firefox users and I must say they raised very valid points (which is what made me write this blog post).

Some points were way over the head, like claiming PROP8 was against their very human rights, like it would burn them in sticks for staying with their same-sex partners. Again, this is a civil right — a right that should be recognized by the government — but Eich voted against it. Eich wouldn’t personally go to those people houses and slap bibles to their faces till they fall in love with someone else (of the opposite sex, that is). And Eich has been way less loud than, say, Orson Scott Card, someone that makes me regret even reading his books.

On the other hand, this kind of religious bullshit should stop and people should be free to be recognized as a couple with whatever person they love. Even as a straight guy I can see that those kind of people would not stop once they ban same-sex marriage: they would ban people using long beards because it’s a sign of another religion (which is completely bullshit) then ban computer games because someone else told them “it is evil work” (which is utterly bullshit).

In the end, as always, people said that you should boycott Firefox. And that’s where my moral compass got all confused.

You see, there are some companies around here that sponsor TV shows that I absolutely despise, which I believe does nothing good; I hate with all my strengths companies that market themselves as a product to “real fanatics for soccer/football” when you see those same fanatics hitting people with metal bars only because they root for the other team[1] and, because of this, I refuse to buy any of their products. So, if I’m against someone that tries to take civil freedom from other people, how could I still use their browser?

Is not that Eich would even dictate the behaviour of Firefox, for any chance. Some of the comments mention that Obama (again, not my president, but a president of a country, nonetheless) also was against same-sex marriage but, mid mandate, was in favor of it. You can claim whatever political maneuver you want, but as a president of a democratic republic, Obama is force to go with whatever the people of his country want. As per Eich post, I’d expect that he too would not enforce his personal views over Mozilla and Firefox.

Still the problem persist: How could I still use something that would give money to someone to sponsor things I believe are the opposite I want to see in the world?

But Eich stepped down, so now I’m not in a moral conflict between a browser by a company with a CEO that doesn’t believe in equal rights and a browser by a company that is effectively trying to block the free internet for everyone.

[1] Seriously, if you work for a marketing company that does this kind of bullshit and don’t know what the fuck a “fanatic” is and how hitting someone with a metal bar IS fanatiscism, go put a bullet on your head. Seriously.

Apple, Let’s Talk About “Explicit” and “Implicit”

Dear Apple,

I’m one of the guys who goes around saying “Apple API is one of the easiest GUI APIs I ever used”. Even when people complain about Objective-C, I point that since everything is a canvas, you can extended every component in any imaginable way.

I also get why Table Views go under the Navigation Bar, Tool Bar and Status Bar: To give the user the impression that the application stretches over all the screen instead of a small space in the middle.

But there is one thing I learnt with Python: Explicit is better than Implicit.

When you automatically add the default padding to an element dragged in the storyboard, I can see the padding in the Size inspector; when I set a relationship between two elements, I can see the constraint in the same Size inspector.

But when I drag a Table View to my View Controller and it automagically gets a padding to go under the navigation bar and there is nowhere to see this, then we have a problem.

When a UITableView is the first subview of the main view, it magically gets a padding; this is shown nowhere.

When a UITableView is the first subview of the main view, it magically gets a padding; this is shown nowhere (except in the storyboard, which makes you think you suddenly got a table header).

The same view as before, but the UITableView is not the first subview anymore; the padding disappears.

The same view as before, but the UITableView is not the first subview anymore; the padding disappears.

Things shouldn’t be like this. Sure, there is some obscure documentation saying “Hey, if your Table View is the first subview of a view, it will magically get a padding on the top”, but that is a total bullshit. What if I, somehow, want to keep some logical order that requires an element just below the navigation bar but my table view should still get the padding? What if I need a bigger padding, then?

This thing should never be magical. It should be a flag, a value, even a freaking constraint, but not a damn magical positional setting which is not obvious at first glance.

Seriously Apple, this is the kind of bullshit that ruins our relationship…

My Take on Banished

There are several games that take you on the role of some immortal mayor/governor/president/emperor in the quest to create the greatest city ever (Civilization, SimCity and Anno being the greater exponents of this line). Even iOS games like Townsmen put you in that role.

In all those games, you have to focus on resources: You need to “capture” that iron mine in order to build iron weapons; you need workers to get the iron from the mine and bring it to your town to build said weapons; you need some farm to keep your workers alive so they can mine your iron and so on.

But none of those really focus on workers. Workers are nothing more than some easy-to-get resource, in which you usually build a house and wait till workers popup. And they keep going till someone kills them.

That’s not what Banished do. Banished focus solely in the workers and their lifetimes.

2014-03-02_00003

The interface is as spartan as you could get — pretty much what your new followers have now. On easy, you fortunately start with a barn to store goods, a stockpile of goods and houses for all your families; on medium, no houses and just a cart with food. And I still didn’t had the guts to try it on hard.

In this situation, you need to start providing some facilities for your people: Houses if you’re on hard, then some food generating facility, then some route of clothing or tools creation, then some roads to connect all those, then maybe some trading facility…

So far, it looks pretty much like any other town-creation game, right?

Well, here’s the twist: Building more houses does not mean more workers. When you put a house, you actually create a place for a family: a man and a woman (and hey, that’s the game saying what’s a family, not me — although I’ve seen families with just a man and his son). And, after a while, a family will have a child.

2014-02-21_00002

Children are little resource suckers that take food and produce absolutely nothing. But you need them ’cause, at some point, the mother and the father will get too old and just die.

2014-02-21_00005

And that’s the cycle you have to manage: Create houses, manage families, wait till they have kids, wait till the kids are old enough to work, wait till they create new families, wait till the old people die, try to move young adults to do the jobs of the dead…

Oh, not only that, but when you create some resource-creation facility, it just don’t simply sparkle to life and start producing resources: You need to allocate your adults to produce said resources.

2014-02-21_00004

“Laborer” is pretty much a person that doesn’t have a job, so they keep moving around, transferring resources from barns and stockpiles to houses (yes, houses have their little stockpile of food and wood and clothing, so people don’t need to keep walking back and forth — unless they are at work and feel hungry, in which they will do all the way from work to their houses to get fed), transferring resources from resource-creation facilities to barns and stockpiles and so on. Once a specialized worked dies (either of old age, crushed by a rock, mauled by a warthog, giving birth or some natural disaster) a laborer will take their place.

So there is this constant “I need more children so later I’ll have more workers, but I need workers now to keep the children fed and train them and OH GOD, WHY DON’T YOU GROW FASTER, YOU LITTLE RESOURCE-SUCKING-FUCKERS?!?” and “Gawd dammit, another worked died”. The balance between keeping laborers for when someone dies, trying to keep your workers alive, fed and warm, so they can produce resources to make more workers is very very very thin and keeps the constant “Ok, just a few more minutes so I get enough workers for this and then I’m going to bed” that goes for hours and hours.

Although the game sucks you into it — in a good way — there are some things that really aren’t helpful.

For example: Remember when I said that you have to wait for families to have children, wait till children grow up and then wait till they create their own families? Well, that’s the first problem: The constant waiting makes the game feel so sloooow it becomes kinda boring if you play in normal speed. I am, on easy, playing constantly at 10x the normal speed (fortunately, the game have a speed control). This is partly what sucks you in, and partly what will annoy the fuck of you (but, then again, if they removed the cycle, the whole game would lose its appeal).

The other problem is the spartanness of the interface. Sure it allows seeing a lot around so you know where would be a good place to build a farm or an orchard or were simply send your laborers to collect stone, but it makes harder to see how many resources you already have, for that quick “Damn, my firewood resources is slowly going down, maybe I need more woodcutters”, if you have too many laborers and can move them to more specialized work and even when people die, which mean you’ll have, maybe, to move some specialized worker back to laboring, in case someone else dies. That’s why most of the screenshots here have those 3 windows open all the time: without them, it’s pretty hard to keep track of all of this. Sure, you have the option to open those windows, but the fact that you have to open them irks me a bit.

On the other hand, you can’t call the game ugly (maybe not “pretty”, but seriously not ugly).

2014-03-01_00001

With all that, do I recommend Banished? If you like games about building stuff that give a different focus than other games and keep you on the edge of your chair (well, at least, till everything runs smoothly, you have a shitload of food, a shitload of tools, a shitload of warm clothes and a shitload of laborers), it certainly it is a good game.

Auto-virtualenv, now with more magic

Following yesterday’s post about Auto-virtualenv trick, today I managed to fix the issue of “auto-virtualenv loses the virtualenv if you go into a subdirectory of the directory with the .venv“.

The only change is the _venv_cd function. All the other alias still remain the same.

function _upwards_search {
    venv=""
    curdir=`pwd`

    while [[ `pwd` != '/' ]]; do
        if [ -f ./.venv ]; then
            venv=`cat ./.venv`
            break
        fi
        cd ..
    done

    cd $curdir
    echo $venv;
}

function _venv_cd { 
    if [ ! -f $PWD/$1 -a "$VIRTUAL_ENV." != "."  ]; then 
        deactivate
    fi;
    \cd $1
    venv=$(_upwards_search)
    if [ -n "$venv" ]; then 
        venv $venv 
    fi
}
alias cd=_venv_cd

Next step: remove all this stuff from my .bashrc, move to a single file which can be easily sourced inside your on .bashrc and drop it in a repository somewhere.

NOTE: Apparently, there is something wrong with the test for empty venv. Hold down your horses for a sec.

NOTE 2: Ok, problem solved. Also, the repository is now live at https://bitbucket.org/juliobiason/auto-virtualenv.