Kick-Ass 2 (2013)

IMDB plot:

Masked spoilers ahead.

I said that Kick Ass was a way to deconstruct what is a hero and, well, that kinda happens again, although it’s not the main focus.

So the city is now run by several masked vigilantes and Kick Ass decided to go under for awhile. Hit Girl is being coerced to stop fighting crime by her new dad (Marcus, Big Daddy friend in the previous movie), who wants her to live a normal life. But then Dave wants to be Kick Ass again and wants Hit Girl to come with him, but she doesn’t want because reasons and that’s where the story revolves around.
to
In a way, this is much more a “Hit Girl” than “Kick Ass” movie, with some sad sad scenes, like Hit Girl going bananas watching her first boy band video clip and a puking scene. But the story really revolves around Hit Girl and her “I promised I’d not fight again” vs “I was trained for this” conundrum, with Marcus acting as the pressure towards “normality” and Kick Ass towards “fight crime”.

So while it is still about deconstructing what makes a hero, it’s not Kick Ass who drives the idea, but Hit Girl.

But does it do a good job doing it? Actually, no. As I mentioned, some scenes are too damn silly, breaking the pace of the story too much, instead of focusing on Hit Girls choice.

Aaron Taylor-Johnson is still the same as the first movie, so if it was Ok in the first, he is still Ok. Chlöe Grace Moretz, which should be the primal focus of the movie, is put in some scenes that really mess with her acting — although I’d say better than Taylor-Johnson. Christopher Mintz-Plasse finally graduated from the whimpy school and plays a more insane/bad-ass character — but still somewhat silly. Jim Carrey plays an awesome part and you can barely say it’s him under that mask: No silly faces, no silly voices — actually, he plays the whole movie with a deeper voice, which impressed me.

In the end, I’d give it 5 heroes out of 10 villains.

Godzilla (2014)

IMDB plot:

The world’s most famous monster is pitted against malevolent creatures who, bolstered by humanity’s scientific arrogance, threaten our very existence.

Spoilers from the stone age ahead.

The big monster is back. And this time, in a version better than the 1998 version.

Although it isn’t hard to make a version better than the one from 1998.

Some facts are counted in a different way: Instead of being a by-product of the nuclear tests and nuclear shenanigans, Godzilla is actually a pre-historical creature that managed to survive in the deeps of the ocean, feeding from the core nuclear stuff, since the old days the whole planet had more nuclear energy floating around. And so are the other monsters in the movie.

Actually, that’s not quite like it: Godzilla is the “monster king” and the other monsters feed from nuclear energy. But the humans didn’t know what it was, so they let it feed from the energy of a nuclear reactor till it was too late. Now it’s up to Godzilla to save the day. And, sadly, I meant it.

Why it’s “sadly”? Because it uses the same old clichés all over again: The humans were too stupid to understand what it was and created their own enemy; the military is too stupid to hear when the scientist says it feeds from nuclear energy and decided to kill it with a nuclear strike. The story basically revolves around those clichés, over and over again. And let’s not forget the brave American soldier who forgoes a chance to see his family again to save the planet.

Clichés is not the only problem with the story. So the old monsters feed from nuclear energy, but for some reason Godzilla does not. He seems to feed from other monsters, so he was patiently waiting in the bottom of the sea till one of the other monsters wake up so he could eat again. Oh, and besides being a monster that never saw a human before, he seems awful nice to them: Here is Godzilla swimming across the ocean, with it’s “fins” out of the water like a shark and OH MY GOD, HE’S GOING TO HIT THE SHIP WHERE THE SCIENTIST IS AND oh, nevermind, he went under it. Why the fuck would Godzilla go under a ship when he has no idea what it is? Why does it care?

He cares because we need to care. Godzilla is not a dick to humans just to make the viewer care about it. The other monsters? Dicks. Destroy, kill, they don’t care, they are moooooonnnsssstersss. Godzilla is so nice that even after almost dying killing the other monsters, and in a mysterious teleportation from near the bay to the middle of the city, he goes back to the sea avoiding destroying any other buildings, even if that means taking some turns instead of a direct route. Because hey, Godzilla is the Canadian king of the monsters.

I may need to dispel one misconception that were floating around, though: There is this talk about the first fight being cut to some news. Well, yes, they cut, but you can see by the news that there was no fight at all: Godzilla tries to bite one of the monsters and the other monster just flies away. There is not fight and we don’t miss anything, except the news that moms are so busy being dicks to their young sons that they don’t seem to realize they are watching the news talking about someplace where their husbands are.

Acting can be completely ignored. Not because it the scripts demands so many stupid turns you can completely ignore the characters personalities.

Ken Watanabe is the only one who kills in his role, but only because he’s the only one not flip-flopping around.

Aaron Taylor-Johnson, for example, keeps flipping from the soldier who will ask to be re-enlisted just to get a ride back to the city where his family is to completely ignore the chance of seeing them again just to save the planet. Yes, yes, both are noble goals but he changes his mind and appears completely incoherent. Actually, if they completely removed his family (his wife by Elizabeth Olsen and his son by Carson Bolde), the story could actually be better. Even Bryan Cranson is misused and keeps some slightly flipflopping, although he’s consistently single-minded from start to end (which is not the end of the movie and ends his part in a very stupid scene).

Speaking of Carson, as the son of Aaron in the movie, he plays the classic “I’m a kid and I’m always sad because parents” role that makes his appearance completely annoying. By the middle of the movie, all I wanted was to punch him in the face. Again, I can’t blame the actor for this, but I put all the blame in the writers for writing his character this way.

It’s not that Godzilla is completely bad. The base plot, removing the whole military stuff and soldiers and family, isn’t that bad. The real fight scene, even if clipped around for showing what the humans are doing, is still good. Godzilla fire-laser is freaking awesome. The monsters design isn’t bad either. The whole problem is the length it takes to reach that point.

Personal opinion: I give it 2 buildings and half standing out of 5 after the final battle.

Let’s talk about depression…

So yesterday (11/Aug) we heard about Robin Williams death, which seems related to his depression problems. And, surely enough, a lot of posts on Twitter (at least, on my timeline) talking about “talk to someone about your mental problems” or “seek help” and, seriously, that doesn’t fly. At all.

Let’s talk a bit about it.

But who are you, anyway?

I’m a person who realized, after 2 years of therapy, that I lived depressed for a good 10+ years. No, nobody took me to it, I broke down one day and decided that maybe it was time to do something about it. No, I didn’t speak to anyone about it, partly because I didn’t know I was depressed and partly because that’s what depression do.

“Eternal debt of motivation”

So, for anyone that never suffered from depression, let me put this in an easy way: Depression is the complete lack of motivation. Sure, you’d look better with clean clothes, but you see no motivation to do it. You could get out of bed, but you do not see the reason why you should. You may feel hungry, but there is no motivation to eat. You could keep going on till things get better, but the motivation to keep breathing simply isn’t there.

That’s depression.

“But how you don’t get motivated to breath?” Well, you simply don’t. You don’t see the point of doing it anymore. I mean, yeah, you could wear clean clothes, but why would you when nobody notices? You could get out of bed, but there is nothing outside of it that seems worth doing so. You may feel hungry, but why eat when you don’t feel appreciated the way you are? Why keep going on when all this doesn’t seem to reward you in any way? Those are the things that come to a depressed mind.

(By the way, in case you didn’t realize yet, “keep breathing” is actually a nice way to describe something much deeper than simply “air goes in, air goes out, never a miscommunication.”)

The two types

There are two types of depression (maybe more, but I’ll describe the ones I know): Pathological and psychological.

Pathological depression is an imbalance in your brain chemicals and you simply can get pleasure from anything, because your body isn’t producing the endorphin and what-not-phins that activate the “feel good” parts of your brain. A psychiatrist is a professional that can recommend drugs to put your brain in balance again. And no, there is no single “if I take this, I’ll be happier” drug: It all depends on what kind of inbalance you have — hence why you need to see a psychiatrist.

Psychological depression is when even if your brain is still producing the chemicals in the right way, but you can get anything out of it. Yes, it is that weird. But simply things aren’t. You know when you eat too much chocolate ice-cream and suddenly it doesn’t taste as good anymore? Imagine it for everything. Except the part of “too much”. A psychologist usually may find what it is blocking your brain into taking pleasure of things; it’s a damn hard thing to do, because different things will work with different people.

By the way, my depression was psychological. Maybe that’s why I know more about it than pathological.

At some point of my life, friends recommended that I should talk to a psychiatrist and get some drugs. I simply refused because I thought “This thing changes the mood, so the mood isn’t mine, it’s the drug mood. In the end, whoever is talking to my friends again wouldn’t be me.” Yes, it is that weird: I preferred being sad than being happy with the feeling that I wasn’t me.

“Seek help”

One thing I mentioned before is that depression is the complete lack of motivation. So when you say “seek help”, your suggestion is completely moot because a depressed person lacks the motivation for everything, including seeking help. Personally, I think the change will come from inside: Either you will break down (that’s what happened to me) or depression will break you down (which sadly is what happened to Williams).

What happened for me to break myself up? Well, this is the hard part to tell, but I had planned everything for my “goodbye cruel world”. I studied the right way to do it, thought the way to make the less mess possible, had a schedule and… I saw Steve Jobs commencement speech. There is this part where he talks about reading “live every day like it was your last” (a phrase that never affected me) and changed it “If when I look at the mirror and think ‘If today was my last day, would I still do what I’m about to do today?’ and the answer is ‘No’ for too long, I know I should change something.” And that’s the point were I broke down: If that was my last day — which I planned to be — would I still do whatever I was about do? Things crystallized and I broke down. That moment, I really cried and decided I should seek help.

It was not because people talked about it. I had people mention over and over again that I seemed down, that my mood was visible and people were down because I was down. But nothing they said affected me. I had to break down on my own.

Also, still to let you understand depression and “lack of motivation”: I clearly remember that as tears rolled down, they reached that point on your chin that really itches, you know? Well, I didn’t care, I had no motivation to wipe them out; I let it itch.

“If I can’t tell them to seek help, what should I do?”

Buy6oUJIIAAcwdc

One thing I felt the whole time was that I, as a person, didn’t matter. I could simply disappear and nobody would notice. Or they would notice and didn’t care. Showing that you care, showing that person matters, helps. No, it doesn’t mean you should go to that person and say “You matter”. It doesn’t change the fact that even if you say it, the depressed doesn’t see how they matter.

Now if you phone the depressed and say “Hey, I was thinking: Could I go to your place with this movie and pizza and beer? I want to hear you funny quips about it.” or “Could I go to your place with pizza and beer?” and when they ask “Why?” simply answer “Because I like to spend time with you.” helps. It boosts their self-stem when someone cares about something they do naturally instead of keep pushing towards some absurd goal of being thin or have a model hair or be rich or any of those other things. “I’m here because you are you.” Simple like that.

Heck, even calling and saying “I was worried about you” may be enough. Someone that cares, will make someone feel like they matter…

But how do I know when someone is depressed and needs help?

Well, that’s the funny thing: You can’t. Some of us, depressed people (well, I’m kinda ex-depressed, but still), manage to hide it quite well. We could look like a normal person, make jokes and such and still hurt inside.

So what could you do at this point? Simple: Be nice to everyone. Tell your friends they matter because they are what they are. In the end, if the person was depressed, they will feel better; if they don’t… well, it never hurts being nice, does it?

Man of Tai Chi (2013)

IMDB Plot:

A young martial artist’s unparalleled Tai Chi skills land him in a highly lucrative underworld fight club.

Spoilers? Spoilers. Lightly, but spoilers.

So, what is “Man of Tai Chi” about? It’s about fights. Done. Let’s move on.

Ok, ok, I’ll do a review of it.

First, you have this guy, which is the main guy, right? He is learning tai chi with an old master — and hey, looks like he’s the only student the master has! — but he can’t control himself and reach the balance thought in tai chi. So against his master teachings, he decides to delve into the world of fights and, using tai chi, beats the shit out of other martial style fighters. And then this evil guy, who kills people for not following his orders finds him and recruits the man of tai chi (cue to Peter Griffin saying “LOOK! HE SAID IT! HE SAID IT!” here) to fight his dirt fighting club for lots of money and the chance to finally keep fighting without restrictions.

And then there is the usual “cops are trying to get him” and then the final “bad guy dies in the end” clichés all over the place. But hey, would you expect some deep story behind it, in a fighting movie?

Since this is a fighting movie, the main character is not the people you see in the screen, but the fights themselves. And the fights are damn boring. Oh, they are impressive movement wise, but so it is ballet. Actually, I think ballet may beat the fight scenes here: It’s a bunch of “I make you do a flip, you make me do a flip” movements over and over again. There is no feeling of impact, and the man of tai chi is always the little/thin guy and he always gets his ass kicked first then gets angry and then beats the other guy. Always.

In his prime, Jackie Chan made better fight scenes than any scene in this movie. Just saying…

And then you have the final scene, when Keanu channels Neo again. The bad guy finally fights the man of tai chi! And it is as boring as before. I mean, at some point I believed Tiger — let’s name the man, shall we? — would channel the tai chi girl from “Shaolin Soccer” and do some very small movements and stop the bad guy with little effort. But no, he again starts losing, then again gets angry and beats the crap of his opponent guy again. As I said, it’s the same fight over and over again, just change a kick for a punch and there you have it.

And I won’t mention that before the final fight you have a shitton of “I fight you!” from Tiger and another shitton of “You own me a live.” from Keanu. Over and over again, till your ears are bleeding from hearing that. It doesn’t even matter that the whole movie Tiger only spoke in Chinese, now he has to talk in English.

Speaking of speaking, the language of the movie is another weird stuff. At some point the chief of police is congratulating the cop who managed to convince Tiger to work with the police to get the bad guy all in Chinese, at which she answers with a “Thank you”. I shit you not, they can’t even keep the same language in discussions in one language, they keep switching between English and Chinese all the time.

Keanu Reeves as the bad guy was a semi-surprise. I mean, I was expecting some wood performance from him, but there are scenes in which he simply kills it — and then, mid scene, does a wood performance. In the first encounter with the man of tai chi, I was thinking “Whoa, Keanu interpretation has really impr-” and then he delivers the most woodened phrase ever. I was almost believing this guy was bad for being bad and then… blam, feeling dead.

Tiger Hu Chen does a modest job being the man of tai chi. I mean, ok, he can jump, he does all the acrobatics, that’s ok. But you don’t see him getting “angrier”, he just starts punching harder. There is no visual indication he’s angrier, just after a few punches you see “oh, he went super-sayajin” and shit.

All the other characters are just throw aways. Karen Mok, as the restless cop who wants to break the ring of fights — the one that says “thank you” mid conversation — does seem restless in breaking the ring of fights but doesn’t look like some fragile girl who needs to be saved all the time, like any western movie. But that kind of posture is common in eastern movies, so…

Basically you have this movie that it is a fight movie but the fight scenes are unimpressive. And the story is cliché ridden with absolutely no plot twists (actually, there is one, but it’s very hinted before it finally appears you can’t basically not consider a twist at all).

So, basically, after watching this, you’ll go all Keanu and repeat “You own me 2 hours of life” over and over again.

The Amazing Spider-Man 2 (2014)

IMDB Plot:

Peter Parker runs the gauntlet as the mysterious company Oscorp sends up a slew of super villains against him, impacting his life.

Usual spoiler alert.

Ok, so this is the second part of the best Spiderman reboot so far. And this movie is a complete roller coaster.

So, the story is simply: Peter Parker is in conflict about the promise he made to Stacy father and his love for her. And there are still bad guys around. And this mess develops the story. Sure, sure, there are enemies and the Parkers story, but the whole point of the movie revolves around Peter conflict — as usual.

Ok, that’s cheesy, I know. But in a way it shows the dilemma Peter has to face in his whole story outside the movies: Keep being Spiderman or stay with the girl he loves? What if she dies just because he’s Spiderman? (This lates devolves into a relationship with someone that can withstand danger herself, but we are not there yet.)

The enemy, this time, is Electro. Yeah, yeah, Green Goblin is there too, but the fight starts and ends in 5 minutes. Even if the fight scene is impressive enough, showing Spiderman thinking as a spider in battle (you know, web and stuff), it goes too fast to make a scratch in the movie. And it ends in the most silly way possible — the battle, it is; its reflexes still go to the most touching moment of the movie.

But thing is, as I said before, the whole movie is a continuous roller coaster. You have some interesting exposition, the story pace picks up and then… it drops down to two bad guys talking about something it was heavily hinted before. It goes from the Parkers running away from some mysterious danger and then drops down to some very slow talk. And on, and on, and on. There are lots of lost opportunities simply because the pacing goes up and down all the time. Surely reducing the slow parts would make a shorter movie, but that would mean that you could give some characters more exposition, or maybe make a battle between Spiderman and the Green Goblin longer and more interesting. But no, speed up, speed down, speed up, speed down, on and on and on.

There is, maybe, and overabundance of slow motion scenes, mostly to show Spiderman spider-sense working, in the way he can foresee what will happen and stop/control the outcome. You know, like dance around machine gun bullets. Yes, it does a good impression of showing how he can do this kind of stuff, but it gets tiring after a while.

Andrew Garfield still is the best Spiderman there was, so far. It lacks a lot of the lose tongue Spidey shows everywhere (cartoon and comics) but still does a fine job. His prime is the very end of the movie, when he has to face the thing he only feared so far (and that I heavily hinted already, but I’m not going to say it). The whole movie he does an OK-job, but in the very end, in that scene, after that, he simply kills it.

Emma Stone do a nice job this time being the quirky girlfriend of Spiderman, Stacy. He does a nice job but… dunno I think her eyes are kinda weird. But in the end, when you need to care the most about her — because of that scene I mentioned before — she appears the most beautiful creature in this whole planet.

Jamie Foxx as Electro is… weird. He doesn’t look like the Electro in the cartoon and his blueness looks very weird, at first. Later, when he controls his powers better, and gets himself a suit, then it looks really terrifying. But the character himself is like “OH, I’M SO POWERFUL, YOU ALL WILL BOW BEFORE ME!” and then, out of the blue, “Would you be my friend?” Yes yes, mentally unstable, but the personality jumps are as breaking as the story pace.

Still related to Electro — but not directly to Jamie acting — is the most perfect use of dubstep ever in a movie, mostly because it sounds like a tesla coil and Electro uses electricity and then you get what I mean. And, again, it’s a job from Hanz Zimmer, although I can’t say it is as impressive as his work on Rush, but still a nice mix of music and sound and scene in a single package (the music and sound part beats his work in Man of Steel, though).

There is Dane DeHaan as Harry Osborn appears only to make way to the very short Goblin fight mentioned before and as a bridge to the next movie. But yeah, the way he twists his face as the Goblin makes him the perfect choice for the role.

In the end, is still a good movie (well, above average, at least), and I must admit that, at some points, I had to speed it up because too much bullshit — which probably means who saw the movie in the cinemas probably had a bad time. But still above-average/good and a nice time waster if you have 2 hours and 15 minutes to spare.

PS: There are some very important characters hinted in the movie, like Alistair Smythe and Felicia (possibly Hardy). But they do nothing in the whole movie and probably will only be used in the next movie.

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.