5 days Ago


OpenBSD takes on OpenSSL

Published by marco on in Technology

 Much of the Internet has been affected by the Heartbleed (Wikipedia) vulnerability in the widely used OpenSSL server-side software. The bug effectively allows anyone to collect random data from the memory of machines running the affected software, which was about 60% of encrypted sites worldwide. A massive cleanup effort ensued, but the vulnerability has been in the software for two years, so there’s no telling how much information was stolen in the interim.

The OpenSSL software is used not only to encrypt HTTPS connections to web servers but also to generate the certificates that undergird those connections as well as many PKIs. Since data could have been stolen over a period of two years, it should be assumed that certificates, usernames and passwords have been stolen as well. Pessimism is the only sure way.

In fact, any data that was loaded into memory on a server running a pre-Heartbleed version of the OpenSSL software is potentially compromised.

How to respond

So we should all generate new certificates, ensuring that the root certificate from which we generate has also been re-generated and is clean. We should also choose new passwords for all affected sites. I use LastPass to manage my passwords, which makes it much easier to use long, complicated and most importantly unique passwords. If you’re not already using a password manager, now would be a good time to start.

And this goes especially for those who tend to reuse their password on different sites. If one of those sites is cracked, then the hacker can use that same username/password combination on other popular sites and get into your stuff everywhere instead of just on the compromised site.

Forking OpenSSL

Though there are those who are blaming open-source software, we should instead blame ourselves for using software of unknown quality to run our most trusted connections. That the software was designed and built without the required quality controls is an entirely different issue.

An advantage of open-source software is that at least we can pinpoint exactly when a bug appeared. Another is that the entire codebase is available to all, so others can jump in and try to fix it. Sure, it would have been nice if the expert security programmers of the world had jumped in earlier, but better late than never.

The site OpenSSL Rampage follows the efforts of the OpenBSD team to refactor and modernize the OpenSSL codebase. They are documenting their progress live on Tumblr, which collects commit messages, tweets, blog posts and official security warnings that result from their investigations and fixes.

They are working on a fork and are making radical changes, so it’s unlikely that the changes will be taken up in the official OpenSSL fork but perhaps a new TLS/SSL tool will be available soon.

VMS and custom memory managers

The messages tell tales of support for extinct operating systems like VMS, whose continued support makes for much more complicated code to support current OSs. This complexity, in turn, hides further misuses of malloc as well as misuses of custom buffer-allocation schemes that the OpenSSL team came up with because malloc is too slow”. Sometimes memory is freed twice for good measure.

Lots o’ cruft

This is all sounds horrible and one wonders how the software ran at all. Don’t worry: the code base contains a tremendous amount of cruft that is never used. It is compiled and still included, but it acts as a cozy nest of code that is wrapped around the actual code.

There are vast swaths of script files that haven’t been used for years that can build versions of the software under compilers and with options that haven’t been seen on this planet since before .. well, since before Tumblr. For example, there’s no need to retain a forest of macros at the top of many header files for the Metrowerks compiler for PowerPC on OS9. No reason at all.

There are also incompatibly licensed components in regular use as well as those associated with components that don’t seem to be used anymore.

Modes and options and platforms: oh my!

There are compiler options for increasing resiliency that seem to work. Turning these off, however, yields an application that crashes immediately. There are clearly no tests for any of these modes. OpenSSL sounds like a classically grown system that has little in the way of code conventions, patterns or architecture. There seems to be no one who regularly cleans out and decides which code to keep and which to make obsolete.

Security professionals wrote this?

This is to say nothing of how their encryption algorithm actually works. There are tales on that web site of the developers desperately having tried to keep entropy high by mixing in the current time every once in a while. Or even mixing in bits of the private key.

A lack of discipline (or skill)

The current OpenSSL codebase seems to be a minefield for security reviewers or for reviewers of any kind. A codebase like this is also terrible for new developers, the onboarding of which you want to encourage in such a widely used, distributed, open-source project.

Instead, the current state of the code says: don’t touch, you don’t know what to change or remove because clearly the main developers don’t either. The last person who knew may have died or left the project years ago.

It’s clear that the code has not been reviewed in the way that it should be. Code on this level and for this purpose needs good developers/reviewers who constantly consider most of the following points during each review:

  • Correctness (does it do what it should? Does it do it in an acceptable way?)
  • Patterns (does this code invent its own way of doing things?)
  • Architecture (is this feature in the right module?)
  • Security implications
  • Performance
  • Memory leaks/management (as long as they’re still using C)
  • Supported modes/options/platforms
  • Third-party library usage/licensing
  • Automated tests (are there tests for the new feature or fix? Do existing tests still run?)
  • Comments/documentation (is the new code clear in what it does? Any tips for those who come after?)
  • Syntax (using braces can be important)

Living with OpenSSL (for now)

It sounds like it is high time that someone does what the BSD team is doing. A spring cleaning can be very healthy for software, especially once it’s reached a certain age. That goes double for software that was blindly used by 60% of the encrypted web sites in the world.

It’s wonderful that OpenSSL exists. Without it, we wouldn’t be as encrypted as we are. But the apparent state of this code bespeaks of failure to manage on all levels. The developers of software like this must be better than this. They must be the best of the best, not just anyone who read about encryption on Wikipedia.

OpenSSL will be with us for a while. It may be crap code and it may lack automated tests, but it has been tested and used a lot, so it has earned a certain badge of reliability and predictability. The state of the code means only that future changes are riskier but not that the current software is not usable.

Knowing that the code is badly written should make everyone suspicious of patches—which we now know are likely to break something in that vast pile of C code—but not suspicious of the officially supported versions from Debian and Ubuntu (for example). Even if the developer team of OpenSSL doesn’t test a lot (or not automatically for all options, at any rate—they may just be testing the “happy path”), the major Linux distros do. So there’s that comfort, at least.


6 days Ago


Mixing your own SQL into Quino queries: part 2 of 2

Published by marco on in Programming

In the first installment, we covered the basics of mixing custom SQL with ORM-generated queries. We also took a look at a solution that uses direct ADO database access to perform arbitrarily complex queries.

In this installment, we will see more elegant techniques that make use of the CustomCommandText property of Quino queries. We’ll approach the desired solution in steps, proceeding from attempt #1 – attempt #5.

tl;dr: Skip to attempt #5 to see the final result without learning why it’s correct.

Attempt #1: Replacing the entire query with custom SQL

An application can assign the CustomCommandText property of any Quino query to override some of the generated SQL. In the example below, we override all of the text, so that Quino doesn’t generate any SQL at all. Instead, Quino is only responsible for sending the request to the database and materializing the objects based on the results.

public void TestExecuteCustomCommand()
  var people = Session.GetList<Person>();

  people.Query.CustomCommandText = new CustomCommandText
    Text = @"
FROM punchclock__person WHERE lastname = 'Rogers'"

  Assert.That(people.Count, Is.EqualTo(9));

This example solves two of the three problems outlined above:

  • It uses only a single query.
  • It will work with a remote application server (although it makes assumptions about the kind of SQL expected by the backing database on that server).
  • But it is even more fragile than the previous example as far as hard-coded SQL goes. You’ll note that the fields expected by the object-materializer have to be explicitly included in the correct order.

Let’s see if we can address the third issue by getting Quino to format the SELECT clause for us.

Attempt #2: Generating the SELECT clause

The following example uses the AccessToolkit of the IQueryableDatabase to format the list of properties obtained from the metadata for a Person. The application no longer makes assumptions about which properties are included in the select statement, what order they should be in or how to format them for the SQL expected by the database.

public virtual void TestExecuteCustomCommandWithStandardSelect()
  var people = Session.GetList<Person>();

  var accessToolkit = DefaultDatabase.AccessToolkit;
  var properties = Person.Metadata.DefaultLoadGroup.Properties;
  var fields = properties.Select(accessToolkit.GetField);

  people.Query.CustomCommandText = new CustomCommandText
    Text = string.Format(
      @"SELECT ALL {0} FROM punchclock__person WHERE lastname = 'Rogers'",

  Assert.That(people.Count, Is.EqualTo(9));

This example fixes the problem with the previous one but introduces a new problem: it no longer works with a remote application because it assumes that the client-side driver is a database with an AccessToolkit. The next example addresses this problem.

Attempt #3: Using a hard-coded AccessToolkit

The version below uses a hard-coded AccessToolkit so that it doesn’t rely on the external data driver being a direct ADO database. It still makes an assumption about the database on the server but that is usually quite acceptable because the backing database for most applications rarely changes.[1]

public void TestCustomCommandWithPostgreSqlSelect()
  var people = Session.GetList<Person>();

  var accessToolkit = new PostgreSqlMetaDatabase().AccessToolkit;
  var properties = Person.Metadata.DefaultLoadGroup.Properties;
  var fields = properties.Select(accessToolkit.GetField);

  people.Query.CustomCommandText = new CustomCommandText
    Text = string.Format(
      @"SELECT ALL {0} FROM punchclock__person WHERE lastname = 'Rogers'",

  Assert.That(people.Count, Is.EqualTo(9));

We now have a version that satisfies all three conditions to a large degree. The application uses only a single query and the query works with both local databases and remoting servers. It still makes some assumptions about database-schema names (e.g. “punchclock__person” and “lastname”). Let’s see if we can clean up some of these as well.

Attempt #4: Replacing only the where clause

Instead of replacing the entire query text, an application can replace individual sections of the query, letting Quino fill in the rest of the query with its standard generated SQL. An application can append or prepend text to the generated SQL or replace it entirely. Because the condition for our query is so simple, the example below replaces the entire WHERE clause instead of adding to it.

public void TestCustomWhereExecution()
  var people = Session.GetList<Person>();

  people.Query.CustomCommandText = new CustomCommandText();
    "lastname = 'Rogers'"

  Assert.That(people.Count, Is.EqualTo(9));

That’s much nicer—still not perfect, but nice. The only remaining quibble is that the identifier lastname is still hard-coded. If the model changes in a way where that property is renamed or removed, this code will continue to compile but will fail at run-time. This is a not insignificant problem if your application ends up using these kinds of queries throughout its business logic.

Attempt #5: Replacing the where clause with generated field names

In order to fix this query and have a completely generic query that fails to compile should anything at all change in the model, we can mix in the technique that we used in attempts #2 and #3: using the AccessToolkit to format fields for SQL. To make the query 100% statically checked, we’ll also use the generated metadata—LastName—to indicate which property we want to format as SQL.

public void TestCustomWhereExecution()
  var people = Session.GetList<Person>();

  var accessToolkit = new PostgreSqlMetaDatabase().AccessToolkit;
  var lastNameField = accessToolkit.GetField(Person.MetaProperties.LastName);

  people.Query.CustomCommandText = new CustomCommandText();
    string.Format("{0} = 'Rogers'", lastNameField)

  Assert.That(people.Count, Is.EqualTo(9));

The query above satisfies all of the conditions we outlined above. it’s clear that the condition is quite simple and that real-world business logic will likely be much more complex. For those situations, the best approach is to fall back to using the direct ADO approach mixed with using Quino facilities like the AccessToolkit as much as possible to create a fully customized SQL text.

Many thanks to Urs for proofreading and suggestions on overall structure.

[1] If an application needs to be totally database-agnostic, then it will need to do some extra legwork that we won’t cover in this post.

1 week Ago


Mixing your own SQL into Quino queries: part 1 of 2

Published by marco on in Programming

The Quino ORM[1] manages all CrUD—Create, Update, Delete—operations for your application. This basic behavior is generally more than enough for standard user interfaces. When a user works with a single object in a window and saves it, there really isn’t that much to optimize.

Modeled methods

A more complex editing process may include several objects at once and perhaps trigger events that create additional auditing objects. Even in these cases, there are still only a handful of save operations to execute. To keep the architecture clean, an application is encouraged to model these higher-level operations with methods in the metadata (modeled methods).

The advantage to using modeled methods is that they can be executed in an application server as well as locally in the client. When an application uses a remote application server rather than a direct connection to a database, modeled methods are executed in the service layer and therefore have much less latency to the database.

When Quino’s query language isn’t enough

If an application needs even more optimization, then it may be necessary to write custom SQL—or even to use stored procedures to move the query into the database. Mixing SQL with an ORM can be a tricky business. It’s even more of a challenge with an ORM like that in Quino, which generates the database schema and shields the user from tables, fields and SQL syntax almost entirely.

What are the potential pitfalls when using custom query text (e.g. SQL) with Quino?

  • Schema element names: An application needs to figure out the names of database objects like table and columns. It would be best not to hard-code them so that when the model changes, the custom code will be automatically updated.
    • If the query is in a stored procedure, then the database may ensure that the code is updated or at least checked when the schema changes.[2]
    • If the query is in application code, then care can be taken to keep that query in-sync with the model
  • Materialization: In particular, the selected fields in a projection must match the expectations of the ORM exactly so that it can materialize the objects properly. We’ll see how to ensure this in examples below.

There are two approaches to executing custom code:

  • ADO: Get a reference to the underlying ADO infrastructure to execute queries directly without using Quino at all. With this approach, Quino can still help an application retrieve properly configured connections and commands.
  • CustomCommandText: An application commonly adds restrictions and sorts to the IQuery object using expressions, but can also add text directly to enhance or replace sections of the generated query.

All of the examples below are taken directly from the Quino test suite. Some variables—like DefaultDatabase—are provided by the Quino base testing classes but their purpose, types and implementation should be relatively obvious.

Using ADO directly

You can use the AdoDataConnectionTools to get the underlying ADO connection for a given Session so that any commands you execute are guaranteed to be executed in the same transactions as are already active on that session. If you use these tools, your ADO code will also automatically use the same connection parameters as the rest of your application without having to use hard-coded connection strings.

The first example shows a test from the Quino framework that shows how easy it is to combine results returned from another method into a standard Quino query.

public virtual void TestExecuteAdoDirectly()
  var ids = GetIds().ToList();
  var people = Session.GetList<Person>();

  people.Query.Where(Person.MetaProperties.Id, ExpressionOperator.In, ids);

  Assert.That(people.Count, Is.EqualTo(9));

The ADO-access code is hidden inside the call to GetIds(), the implementation for which is shown below. Your application can get the connection for a session as described above and then create commands using the same helper class. If you call CreateCommand() directly on the ADO connection, you’ll have a problem when running inside a transaction on SQL Server. The SQL Server ADO implementation requires that you assign the active transaction object to each command. Quino takes care of this bookkeeping for you if you use the helper method.

private IEnumerable<int> GetIds()
  using (var helper = AdoDataConnectionTools.GetAdoConnection(Session, "Name"))
    using (var command = helper.CreateCommand())
      command.AdoCommand.CommandText = 
        @"SELECT id FROM punchclock__person WHERE lastname = 'Rogers'";

      using (var reader = command.AdoCommand.ExecuteReader())
        while (reader.Read())
          yield return reader.GetInt32(0);

There are a few drawbacks to this approach:

  • Your application will make two queries instead of one.
  • The hard-coded SQL will break if you make model changes that affect those tables and fields.
  • The ADO approach only works if the application has a direct connection to the database. An application that uses ADO will not be able to switch to an application-server driver without modification.

In the second part, we will improve on this approach by using the CustomCommandText property of a Quino query. This will allow us to use only a single query. We will also improve maintainability by reducing the amount of code that isn’t checked by the compiler (e.g. the SQL text above).

Stay tuned for part 2, coming soon!

Many thanks to Urs for proofreading and suggestions on overall structure.

[1] This article uses features of Quino that will only become available in version 1.12. Almost all of the examples will also work in earlier versions but the AdoDataConnectionTools is not available until 1.12. The functionality of this class can, however, be back-ported if necessary.
[2] More likely, though, is that the Quino schema migration will be prevented from applying updates if there are custom stored procedures that use tables and columns that need to be changed.

Mixing your own SQL into Quino queries: part 1 of 2


Capsule Movie Reviews Vol.2014.3

Published by marco on in Art, Film & Literature
Gravity (2013)

I can only say what I thought of this movie based on the way that I saw it: in HD on a conventional screen at home. I can imagine that the experience was very different in 3D and on a giant screen with a kick-ass sound system. The only downside I can think of is that if the sound-leveling was the same in the theater, it would have been an ear-blistering experience. If you set the volume high enough to hear the occasional radio whispers, many other parts of the movie nearly blew you out of your chair—or caused the neighbors to call to yell at you that their kids can’t sleep.

Gravity stars George Clooney and Sandra Bullock in an unlikely in-space scenario. The inconsistencies abound in a movie that purports to make an effort to get things right. It’s ludicrous because space is big. Neil DeGrasse Tyson did a masterful job of listing plot holes on his Twitter account. Just to sum up the ones I noticed:

  • Once you’re locked to something in space, you will not “drift away”. Once the tether stopped Bullock and Clooney, there was no force causing them to continue to drift from the space station. None. The station was not rotating so centripetal force did not come into play.
  • It sure was convenient that the space in which they found themselves was so inordinately populated with other stuff: ISS, the shuttle and the Chinese station were all within a couple of hundred miles of each other and in sight lines.
  • An utterly untrained and self-admittedly terrible pilot uses landing thrusters to hit a target in space and match speed with it? With minor adjustments made by a fire extinguisher? Sure, why not.
  • Why doesn’t the fire extinguisher come soaring down on her head during one of the many, sudden momentum changes when she’s in the capsule?
  • Why is nothing tethered? And why is there literally no instinct to tether anything on her part? Especially when she’s so absolutely amazing at navigating the tight tunnels of the station at high speed without so much as nicking a knee or elbow?
  • Why in God’s name was a medical doctor doing a spacewalk? This is not in any way explained. Armageddon did a better job of explaining why the utterly unqualified were suited up.
  • I did not notice this one, but I love DeGrasse Tyson for noticing it: “Nearly all satellites orbit Earth west to east yet all satellite debris portrayed orbited east to west.”

It was an action movie, but I didn’t really get into Bullock as an action actress. I could not have cared less about her character because there was almost zero character development. Having her character tell me that she lost a child does not count as developing her character. A movie has to have a character that you root for and I honestly could not have cared less if she lived or died. I was actually pleasantly surprised to think that the movie would end with her turning off the oxygen in the Russian capsule (which Clooney kept calling the “Soyez). This would have been a delightfully an realistic existentialist ending. See Magic Mike below for how to end a movie.

Alas, she pulled herself up by her bootstraps, performed some utterly unbelievable miracles, forgave herself and learned to walk again. Yay for happy endings that confirm the ability of humans to overcome anything. Meh. I’m not leaving off a recommendation because the science was wrong, I’m leaving it off because I didn’t like the schmaltzy plot and I don’t have a giant 3D screen at home.

Real Steel (2011)
A film about the robot-boxing world of the future. Hugh Jackman plays a down-on-his-luck robot-boxer manager who was a strong, skilled and hard-headed boxer. In 2027, men no longer box; robots do. Jackman’s failures as a robot-boxer driver are only exceeded by his failures at gambling. Long story short, this is a Disney movie about a little robot fighting against a giant robot owned by a steely-eyed Russian lady—it’s like Rocky IV all over again. Hugh Jackman is good, as usual: he’s charming even though he’s an utterly useless idiot for much of the film, seemingly intent on self-destruction for reasons that are unclear. Evangeline Lilly plays a plucky boxing-manager’s daughter—the same who managed Jackman’s former career. After Jackman inexplicably and almost deliberately wastefully burns through a couple of expensive robots, his long-lost son joins him for the summer and discovers a long-buried, early-model robot at a junkyard. The little robot turns out to be plucky and trainable and hard-headed and ready to bite off a lot more than it can chew. Yadda yadda yadda. It was entertaining and well-made—and watching mechanical robots pound each other in the brainpan without any perceivable form of defense is much preferred over watching the same with humans. The boxing scenes are well-done and quite exciting. recommended.
Star Trek: Insurrection (1998)
The crew of Star Trek: The Next Generation end up in the middle of a dispute between a new race whose longevity is waning and the simple residents of a planet whose radiation imparts rejuvenatory effects on its few inhabitants. Thanks to corruption and misguided notions of charity, Star Fleet stands solidly behind the dying, but invading, race and feels that the few hundred inhabitants of the planet have no right to sit on a resource that has the potential to prolong millions if not billions of lives. They want to oust the inhabitants and let the other race in to research and develop the energy that is their Fountain of Youth. Picard and crew quite rightly see the inherent injustice of this and intervene on behalf of the residents, whom they’ve in the meantime befriended. Cue heroics and Star Trek-style badassery in which our favorite crew triumphs and simultaneously proves that Star Fleet and the “ancient” race never truly had a moral leg to stand on. Slow-paced as you would expect—and with battle scenes that are laughable by today’s sci-fi standards—but also rife with the expected philosophical and political discussions, into which parallels to modern-day issues and situations can easily be read, but which would in all likelihood be denied by the makers of the film, albeit with perhaps a sly smile and a wink. Recommended for fans of the genre.
Lolita (1997)

This film is lovingly narrated by Jeremy Irons, who also has the lead role. The film shows his character moving in with Lolita and her mother (played by Melanie Griffith) and slowing being pulled into Lolita’s orbit. Or rather, he is immediately smitten and she slowly pretends to seduce him. She is aware of her power over him, but toys with it casually, not even letting it take precedence over being a teenager. It’s lovingly filmed with a focus on the nubile young Lolita from the eye of the narrator. And Jeremy Irons is a wonderful narrator.

Lolita is young and obnoxious but the bloom only slowly comes off the rose for Humbert, as long as she’s banging him. The interview at the college—which turns out to be a prep school for débutantes—was quite funny and featured a zeugma, “Here at Beardsley Prep, we’re less concerned with Medieval dates than weekend ones.” Slowly, Lolita comes to be in total control, twisting him around by his predilections and his guilt about them. She irritates him deliberately and is deliberately obnoxious, knowing that her sexual favors allow her everything. When Humbert says, “You’re very young and I know it’s hard to imagine that people will try to take advantage of you,” it’s quite hard to keep a straight face.

The movie is a PSA for “do not date too young or too crazy and definitely not both”. He is her slave; he is in love. Whereas he does not try to break her at all, she definitely breaks him. Being an ephebophile is his only societal flaw; he is otherwise not capable of the brutality—psychological and otherwise—required to keep her under control. Spoiler alert: he can’t do so and she ends up running away with another “lover of nymphets”, with whom she comes to an unhappy end three years later. In the end, he has broken her and she’s only concerned with money and thinks nothing of performing for it. He has broken her because she is the only thing he ever loved and his touch twisted her into something base and stupid and unlovely. And still he loves her.

The power that Lolita acquired in her youth rewarded her, but it was a cheap substitute for what perhaps could have been. It is difficult to judge the potential of such a young creature: was her precocity indicative of an intelligence that would find other channels of expression later? Or was it the pinnacle of her cleverness, manipulating men bedazzled by her nubility? Nabakov argues that we will never know—because Humbert imposed himself into the situation, collapsing the quantum waveform, and dooming her to a life of dimmed prospects, where her imagination cannot reach farther than to think of which sugar daddy she will grace with her wiles—but not whether life could be lived without one.

Rien à Declarer (2011)

I saw this movie before, on a plane, in French with English subtitles. This time I watched the first part in French with German subtitles, but my viewing partner doesn’t understand much (any) French and the dialogue comes so quickly that she was reading the whole time. It’s still good in German but it loses something, I think. It’s an absolutely fantastic French comedy, an exemplar of the genre. My favorite joke:

“Q: Why does the Frenchman laugh 3 times when he hears a joke about Belgians?

“A: Once for when he hears it, once for when someone explains it to him and once again when he finally understands it.”

See the previous review for a short synopsis. Highly recommended.

Nighthawks (1981)
Instead of Carl Weathers, Sylvester Stallone teams up with Billy Dee Williams as New York City cops hunting terrorist Rutger Hauer. Stallone looks awesome and young in his beard, leather jacket and 70s-era shooter glasses. And Hauer, even so early[1], plays the perfect Euro-terrorist. When he’s finally cornered with his hostages on the Roosevelt Island gondola, one of the ladies says to him, “Please leave us alone; we’ve done nothing,” he haughtily responds with his characteristic smirk, “You must be very proud.” Wicked burn. Minutes later, he wastes her in front of Stallone to set an example—definitely not trying for the PG-rating. Although the film is far less gory than it would have been were it shot today, it has a more brutal sensibility than is common for action films these days. Stallone and Hauer spend a lot of time squinting menacingly into each other’s eyes, but it kind of works. Also, the pacing is more deliberate, the shots are far longer and there is no shaky cam. I’m kind of a sucker for this kind of action film, I guess. Recommended.
Blue Jasmine (2013)

This film is the 2013 installment of the long-running streak of yearly films by Woody Allen. Though there are flashes of Allen in Jasmine’s dialogues, this is a very thematically and artistically different film than many of his others. If you hadn’t told me it was a Woody Allen movie, I may never have guessed (whereas To Rome with Love, for example, was unmistakably Allen).

It stars Cate Blanchett as a former socialite-on-top-of-the-world whose husband’s crookedness she’d steadfastly ignored, all the while pretending that all she had was somehow deserved of someone of her talents, intellect and sensibilities. She moves in with her sister—both girls were adopted by the same parents, but from different families—and tries to put her life back together. In this, she does much better than expected, getting a menial job and persevering for more than a day. She continued to inhale pills (provenance and type unknown) as well as nearly limitless amounts of Stoli vodka.

In the end, she is unrepentant and bitter, convinced that the world is at fault for her downfall. Her husband was a criminal and a philanderer and an all-around immoral person. When she turns him in to the FBI out of spite, her son hates the mom rather than the dad, whose criminality is at the root of all of the family’s wealth but also its problems. The film is much, much, much darker than other Woody Allen movies, with no one really coming out on top in the end. Recommended.

Straw Dogs (2011)
The remake of the 1970s classic that starred Dustin Hoffman[2], but this time starring Kate Bosworth, James Marsden and Alexander Skarsgård. I watched it because of Skarsgård, who was so good in Generation Kill but he didn’t have a lot to work with in the role of the leader of a group of not-always-vaguely rapey misanthropes. The story is of Bosworth moving back to her hometown with her author-husband. Dominic Purcell stars as a mentally handicapped man who’s put upon by the town, especially the extremely alcoholic former coach, played well by James Woods. The town has a distinctly menacing and anti-intellectual and highly church-y vibe, to which the husband is all-but-oblivious. He was never destined to mix in well with the people of town but the coming disaster is hastened by his superiority. His wife doesn’t do nearly enough to fight of the attentions of the local XY-carriers, choosing instead to at-times revel in their attention. The film does more than play with the idea of a woman getting’ what’s comin’ to her. This will, of course, not end well. The actors are decent, but the plot is a bit too manipulative and undernourished for my taste. Hopefully, the original is better. Saw it in German. Not recommended.
Election (1999)
This is an absolute classic about a deceptively sociopathic and egotistical high-school student named Tracy Flick, played by Reese Witherspoon. Matthew Broderick plays a sad-sack teacher at her school named Jim McAllister. McAllister and Flick narrate much of the film along with Paul and Tammy Metzler, who run against Flick for the student-council presidency, all for their own reasons. McAllister’s life circles the drain with a pathetic attempt at an affair with his wife’s best friend (who also happens to be the wife of his own best friend, with whom he used to teach but who was thrown out of both the school and his own home when he was caught having an affair with Tracy). Witherspoon is penetratingly obnoxious and terrifying. Broderick is great as a loser who was happy with what he had, teaching ethics and morals and having none of either. Who will end up winning? Well, the one who wants it most—and understands the least of ethics. Will McAllister give up the last of his tenets in order to stop her? Will it be worth it? There are no good guys in the movie, but you’ll still feel that the wrong people won.
Black Snake Moan (2006)

Samuel L. Jackson plays Lazarus, a God-fearing full-time vegetable farmer and part-time blues guitarist whose wife has left him, Christina Ricci plays Rae, a caricature of the town slut whose reputation from high school follows, defines and leads her well into her twenties. She is psychologically unstable, at best, with a thirst for men—to be more precise, a very specific part of men—that is depicted as medically uncontrollable. Not that she doesn’t try to self-medicate: no pill or drink goes unconsumed in her presence. Justin Timberlake plays her boyfriend, who knows of her past and predilections but thinks that they are in the past and under control. No sooner does he set foot on a bus, headed forArmy boot camp, than Rae hops into bed with a former lover or three. It is made clear that these actions are out of her control and are to be considered fallout from the psychological trauma of having been regularly abused by her father (or step-father?) as a teenager.

Long story short, Lazarus takes up the Herculean task of trying to cure her of her smutty desires. It’s hard to tell how serious the movie takes itself—it seems to think it’s something more than just an excuse to show Ricci’s pretty little self be used and abused in various stages of dishabille. If the dishabille doesn’t sell you, then perhaps Jackson’s musical number near the middle of the film will make it worth your while. It’s quite haunting and well worth the ride. Timberlake returns at some point with his own bushel of psychological problems and mixes things up a bit. Saw it in German. Hard to recommend but it wasn’t as terrible as it may sound.

The Hobbit: The Desolation of Smaug (2013)

This is part two of a three-part homage to a three-hundred–page book. The last time I read it, I would definitely have called it a “children’s” book when compared with the sweeping mythos and breadth of the Fellowship of the Ring. The story of The Hobbit is of a decidedly non-adventurous member of a non-adventurous and nondescript race of miniature beings who live under hills, play in the sun and snack all day long. They are human-shaped rabbits, in other words.

The cast of the first film returns, joined by Evangeline Lilly as a pretty elf—not much of a stretch there—and Orlando Bloom as Legolas. Many arrows are loosed and much elvish fighting skill is on display as orc after orc after orc is dispatched by these two in their attempt to help the dwarves on their quest. There is a bit of confusion on that point, but the upshot is that that is what they end up doing. Gandalf is also back, especially good in a scene that reveals the Necromancer for what he truly is. Benedict Cumberbatch is almost unrecognizable as the voice of Smaug, a gigantic dragon who sits on a gigantic hoard and who is possessed of a gigantic ego.

The storyline of the book is enhanced by an escapade that traps the arrogant Smaug, if only temporarily. The smith-works of the dwarves below Erebor—the Lonely Mountain—are beautiful and of an imposing scale that beggars belief. Truly impressive visuals but the story, as with the first installment, is a bit threadbare in places, failing to cover up the fact that it’s been stretched over three films. Recommended for fans of the books or fans of big-budget action films, of which this is a more than passable exemplar.

Magic Mike (2012)
Channing Tatum stars as the eponymous hero, a self-styled entrepreneur who runs a car- and truck-detailing business as well as a roofing/contracting firm and playing the lead role in a male revue, stripping at night. His real passion is building one-of-a-kind furniture from found objects, but he barely finds time for that. He does find time for a decent amount of harmless partying and fun, usually with two or more companions at once, one of whom is an adventurous Olivia Munn. He meets and takes pity on a sad-sack named Adam, taking him under his wing and introducing him to the world of male revue. Adam’s sister—played by the sloe-eyed and quite pretty newcomer Cody Horn—is of a more sober bent. She hardly cracks a smile once throughout the movie although she is not immune to Tatum’s infectious humor and inestimable charm (like when he sees that she’s clearly irritated by Dallas’s drivel about his lifestyle and how people should raise kids, he follows her and asks if she wants him to get her Dallas’s number because he’s starting a life-coaching business and he can tell that she’d be interested). Dallas is played by Matthew McConaughey, in a role he was born to play. He comes full circle with the beginning of his career, often repeating “all right, all right, all right”—which he first uttered as David Wooderson in Richard Linklater’s Dazed and Confused. The role of Dallas is anyone’s best guess at what Wooderson would look like as a grown-up. Stephen Soderbergh did a great job and treated the material quite seriously. It was a funny, well-made movie with an absolutely perfect ending. While McConaughey is good, it’s Tatum who holds the film together. Recommended.

[1] In IMDb, it looks like this was Hauer’s first American movie—everything else before that was Dutch.
[2] I have that one in my list of thrillers to watch, but this one came on TV instead.

3 weeks Ago


Criminal Justice in the U.S.

Published by marco on in Public Policy & Politics

The article Theater of Justice by Molly Crabapple (VICE) is an article by an artist who also occasionally does courtroom sketches.

She tells of Cecily McMillan, who was beaten into a seizure by police offers and who two years later stands trial for assaulting a police officer, facing seven years in prison. The officer’s record of having beaten other suspects was deemed inadmissable.

Or there is the other recent case of a black woman who tried to stand her ground, as others have successfully done. She fired a warning shot into the air, killing no one, not even wounding anyone. These were the actions of “Marissa Alexander, a PhD and mom who [wanted to] stop her husband from beating her,” That’s not a good reason, is it? Are we even sure that her husband isn’t allowed to beat her in that state? And that’s not nearly as good a reason as the guy had who killed a boy in the back-seat of his SUV for playing music too loud. Not guilty! But Marissa’s going to go away for a long time for her transgression.

“[She] was offered three years as a plea deal for aggravated assault with a deadly weapon. She refused, knowing herself innocent. The judge sentenced her to 20 years. Now, she’s appealing. If she loses, the prosecutor wants to lock her up for 60.

“This is a “trial tax” you pay if you annoy the courts by insisting you are innocent.”

Who does this uppity woman think she is? Does she think she’s white? Rich? A citizen? A human being? Do not speak of justice in a system that produces hypocrisy on this scale. And the system does everything it can to make being poor or disadvantaged increase chances of prosecution dramatically.

We still have jury trials in the States; this means that non-professional, easily misled and nigh-constantly deluded undereducated head-cases are deciding your fate. Those are your peers. They can’t string two logical sentences together; what are the odds that they can wend their way through the facts of the case to come to a just conclusion? Nearly zero. What are the odds that they will decide your fate based on how you dress or act rather than evidence? Nearly certain.

“The poor, the brown, the trans – to juries, they’re guilty unless proven otherwise. Innocence is the absence of guilt. It is near impossible to prove a negative. […] If you’re too poor to afford bail, you arrive in court in chains. If you have no family to bring you a suit, you wear your prison jumpsuit.”

And people who haven’t yet been convicted are made to suffer beforehand. The unconvicted are left to stew behind bars because they can’t afford ridiculous bail. The homeless guy who was recently broiled to death in Riker’s Island because he couldn’t pay $2500 for bail on his charge of loitering was in jail for this reason. He was luckier than the homeless guy in the SouthWest U.S. who was executed by police officers for the same crime. Sure, those are anecdotes, but that doesn’t change the fact that “[…] the average defendant [is] a person of colour charged with a drug crime.” And more and more prisoners are going away for longer sentences; more and more people are taking years before they get their trial.

“Because the entire system would implode if everyone demanded a trial, prosecutors push plea bargains like restaurants hawking early bird specials. But instead of money, they’re haggling over life. If you’re too poor for a lawyer or have already spent months in jail because you can’t make bail, plea bargains can be irresistible. They account for 95 percent of felony convictions.”

As mentioned above, 95% just take the plea bargain in order to get some form of a life back. This is a life with a felony record and drastically reduced chances of making anything of yourself in a society that hates its ex-cons.

“Most trials resemble not grand dramas but factory farms. The raw material is a person. The product is a prisoner. Trials are deliberately dull. They move glacially, on state time rather than human time. If you hire your own lawyers – a necessity to have a chance of winning – you’ll blow through your life savings. As the cop cliché goes, “You can beat the rap, but you can’t beat the ride.””

If you don’t plea out, you lose your life savings and may still go to jail. If you do plea out, you lose all chance of ever making decent money again. You see? In America, you still have the freedom to choose.