english

what I feel when I see someone using JPG when he should be using a PNG

Seriously, is that hard?

To discovery which file type you have to use for your image just follow these simple instructions in following priority order:

  1. Have text? Use PNG.
  2. Is a piece of art like a draw, a painting or a webcomic? Use PNG.
  3. It is… moving! Use GIF.
  4. Is a photo? Use JPG.
  5. Is not exactly a photo but contains photos (like people. trees and landscapes)? Use JPG.
  6. Is not a photo, does not contain a photo but I remain concerned about the size of my file despite the breakthrough in telecommunication speeds. Try PNG with indexed palette and Floyd–Steinberg color dithering.
  7. Nah, man. Use JPG but with all lower compression or higher quality options you may find.
  8. It’s nothing listed above! Sir, your problem is far away from the scope of these instructions.

Thank you.

Python, flatten a list

Surprisingly python doesn’t have a shortcut for flatten a list (more generally a list of lists of lists of…).

I made a simple implementation that doesn’t use recursion and tries to be written clearly.

I get a element from a “bad” list (a list that can have another lists). If the element is not a list we store in our flat list. If the element is still a list we deal with him later. The flat list always have elements that are not a list.
To preserve the original order we reverse the elements at the end.

The Fall (2006), Tarsem Singh

Cinema is about the ancient art of telling stories. Is about breaking the chains that hold our minds. Entertainment is good but is not good enough. We can do more and we can do better. The Fall (2006), from Tarsem Singh, is a movie that knows this. This is my kind of movie.

Roy Walker (Lee Pace) and Alexandria (Catinca Untaru)

The plot is about Alexandria, a injured girl recovering in the hospital when she meets another patient, Roy Walker, and he tells her fantasy histories. The difference of age between them creates a language gap that is very interesting and well explored in the movie as it uses a lot of symbolism. Going deeper in the language issue some dialogues between them were improvised and had an impact in the original history giving a layer of authenticity to the movie.

In terms of photography, every frame of the movie is a piece of art by itself. Here are some of them:

This is what I’m talking about

Faceless evil soldiers.

Colors and composition.

A perfectly good excuse for filming a elephant swimming.

Subtle tribute to Godfather. One of many tributes in the movie.

This scene reminded me of the Balinese monkey chant from Baraka (1992). Bonus: Avatar (2009) also did it.

A stop motion scene.

Almost every scene is breathtaking and probably was really hard to film.

Seems that they used …

… a lot of blue ink.

One of the many amazing scenes that lasted less than 1 second!

Wide shot.

In summary, it have all the ingredients to make a movie that I love:

  • Amazing photography.
  • A non-trivial plot. Doesn’t need to be really complex (though I like complex). In this case was a plot inside the plot.
  • Language and symbolism.
  • The struggle for (pick as many as you want): life, identity, purpose, love, and freedom.
  • Do not underestimate the mind and the imagination,
  • Good actors, good interpretation and when possible some improvisation.
  • Subtle references as an icing on the cake.

Cinema!

Go see this movie.

If you liked The Fall you may also like

Heroku on Ubuntu 11.04 (Natty Narwhal)

As root execute:

apt-get update
apt-get install build-essential ruby rails rubygems1.8
apt-get install ruby1.8-dev libopenssl-ruby

Chance PATH at /etc/environment:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/var/lib/gems/1.8/bin"

Update your current environment:

source /etc/environment

Install the Heroku gem:

sudo gem install heroku

Run Heroku authentication configuration:

heroku auth:login

Enter the credentials for your Heroku account.

Done!

Darth Vader Piñata

I saw this one in a supermarket in New York.

Memory Card Zoo SD Test

Adam Ulivi from Memory Card Zoo sent me a Samsung 8Gb micro SDHC class 4.

Memory Card Zoo

Seems like a regular SD card but they claim to be water proof, shock proof and magnet proof.

Memory Card Zoo

I ran a few tests using SD Tools for Android to compare it against the others cards I have around. The result:

The general raw output data collected from SD Tools:

Write Speed (Mb/s) Read speed (Mb/s)
SanDisk Class 4, 8Gb 4.1 11.7
Samsung Class 4, 8Gb 5.5 17.9
Patriot Class 10, 16Gb 8.1 20.1

I use the SanDisk in my Android and Patriot on my camera. It would be a good combo have a waterproof card on my waterproof camera but this sd card can not beat a class 10 card. I may change my cellphone’s memory card for this Samsung.
If you want to try to yourselft this or others models of Micro SD card visit their store. Thank you Adam!