Alcides Fonseca

40.197958, -8.408312

Trillions

The challenge of the next decade? Design for trillions. (via Pedro Custódio)

Unix in Scala

After the meme has started with a version of unix in 14 lines of Ruby, and an improvement for 13 lines by writing it in Python, I present you the same version of unix, ported to scala.

Note that this is not serious code. Just wanted to reduce one line in another language, and felt Scala would offer me the pattern matching I was looking for. I will also give haskell a try, but I don’t think I can reduce the number of lines due to the IO monadic thing.

And I’m sure I can reduce the number of lines in either python or ruby without making it look ugly, but I’ll leave that for those you want to learn those languages.

Beast Machines

Beast Machines is the sequel to Beast Wars, part of the Transformers franchiser. A small group of Maximals finds themselves in an empty Cybertron controlled by an evil Megatron and some new army robots. It’s their task to bring the technorganic balance to their planet.

This was a show I watched when I was a kid in saturday mornings, so I really feel nostalgic re-watching the show. And I really enjoy the humor in the show. Not as geek as Reboot’s, but just fine.

The Nerd Handbook

Your nerd has control issues. Your nerd lives in a monospaced typeface world. Whereas everyone else is traipsing around picking dazzling fonts to describe their world, your nerd has carefully selected a monospace typeface, which he avidly uses to manipulate the world deftly via a command line interface while the rest fumble around with a mouse.

A nice guide to understanding nerds (should be replaced by “geeks”, but I don’t want to be one of those annoying nerds that requires all the words to be exactly used). (via @relva)

Nerds are fucking funny. Your nerd spent a lot of his younger life being an outcast because of his strange affinity with the computer. This created a basic bitterness in his psyche that is the foundation for his humor. Now, combine this basic distrust of everything with your nerd’s other natural talents and you’ll realize that he sees humor is another game.

Cyrano de Bérgerac

Cyrano de Bérgerac is the 1990 movie about the homonymous play and features Gérard Depardieu.

I really like the movie, specially the rhymes by Cyrano. Even if it’s french and old, I really recommend it!

Perceiving Energy Consumption

In this week’s Interaction Designer Methodologies I was presented to STATIC!, a project that investigates design as a way of increasing people’s awareness of their energy consumption. This has a special interest for me, since I’ve already worked on a project in this field with ISA.

In Sweden, a law was passed that makes the use of Automatic meter reading mandatory. The STATIC! project used that data to produce some provocative objects. From “patterns on bathroom tiles”:“http://www.tii.se/static/disappearing.htm that disappear with too much water to” curtains that save the solar power and emit light in night”:http://www.tii.se/static/curtain.htm, they produced an interesting series of prototypes.

The Time magazine nominated this Flower Lamp for the Best Inventions of 2006.

Hardware Brands with their own OSes

A while ago my wife, the non-techie in our family and a Mac user, asked me: “How come Dell or Toshiba or Sony don’t make their own OS’s? I mean, if each brand had its own OS it would be better because the people that built the computers know the computers better than Microsoft.” — Minimal

The first time I read this I actually though it was a good idea. If each OS focus on that particular hardware the manufacture is selling, they would make it as stable as possible (think Apple). At least it would be the end of Bluescreens.

But that would become a problem for application developers: suddenly they don’t have the win/linux/mac problem, but rather win/linux/mac/dell/toshiba/lenovo/vaio/…. And using virtual machines like Java or .NET is not the solution because everyone appreciates native solutions (at least for the graphical user interface). Sure this could be improved and high-level languages like Python and Ruby could be used with different backends for the OS, but it’s the same as the current Java solution.

And then there is the drivers for peripherals. Linux (and Mac) users already suffer the problem of not having drivers for some devices, and if every brand had its own OS, I bet you could only buy Dell accessories for your Dell computer because that’s the drivers available.’

The best solution I see is to each one make a flavor of Linux and test the drivers to their specific hardware, so they can all run the same applications. They can choose between Gnome and KDE (and others) according to the computer specs, but as far as I know even those options are pretty compatible.

Learning by succeeding

Giles Bowlett on learning by succeeding or by failing.

Obviously, if you want to learn something, and the brain responds to failure without learning anything, but it responds to success by learning, then focusing on failure is not a good learning strategy.

To learn, all you have to do is succeed.

Notice what that doesn’t say. It doesn’t say what you have to succeed at.

And I like that There’s some powerful neuroscience supporting this and a great book which goes into exquisite detail.. Really interesting approach. I would conclude that I need to succeed at less important tasks in order to learn the total part. Like playing SuperMario or other games. You don’t need to master all the weapons and tricks on the first level.

Customized dunks

As some of you might know, I am really crazy about old school shoes. I’ve owned dunks, air force 1s, chucks, superstars and a few more, and the ones I like the most were the nike dunks.

Today I found out a blog where a guy posts his latest creations: fully customized dunks with themes. If you like them (I really do!) check his online shop where you can buy most of them for £180, or just request one pair.

Japanese Simplicity

A central aesthetic principle in Japan is simplicity, but it is different from simplicity in the West. Let me explain the difference by comparing cooking knives. The knives made by the German company, Henckel, for example, are well crafted and easy to use because they are highly ergonomic. The thumb automatically finds its place when you grab the knife.

Japanese cooks who have special skills prefer knives without any ergonomic shape. A flat handle is not seen as raw or poorly crafted. On the contrary, its perfect plainness is meant to say, “You can use me whichever way suits your skills.” The Japanese knife adapts to the cook’s skill (not to the cook’s thumb). This is, in a nutshell, Japanese simplicity.

Kenya Hara on Japanese Aesthetics

Stockholm congestion solution

Found this in the end of a TED video. Of course it’s an IBM self-promotion, but if it works, yey! More cities should think about it.

nginx + passenger + django

I am currently in the process of migrating all the websites I have running on this VPS from apache2 to nginx. The Apache2+passenger bundle was working really fine, except for some unknown slowness with redmine, but I wanted to try another httpd and I’ve heard a lot of nginx, and passenger guys added support for it a while ago.

Since nginx doesn’t support loadable modules, I had to compile it with all the modules I might need in a near future, so the following instructions also include the http_push_module.

When testing this wiki in the nginx server, it was always serving the homepage for whatever URL I asked for. After two sessions digging into the nginx, passenger and django internals, and doing a few tests, I found out the problem:

Nginx provides Passenger a REQUEST_URI instead of the PATH_INFO header that django processes to route the request. Since PEP 333 requires a PATH_INFO header, I had to correct the problem in one of the two other. I ended up fixing it Passenger, since it’s the one responsible for the WSGI interface.

So even if you had already installed passenger, just add those two lines , and it should support Django straight away.

1 while debugging, the tmp/restart.txt trick didn’t work for wsgi, so I used a sudo killall -9 python since it was the only python process running.

Surrogates

Surrogates is just like I, Robot if you just replace Will Smith with Bruce Willis and if humans just stay at home remote controlling the robots.

The movie is acceptable, but totally predictable. And like many others, they suppose that in 20 years there is only one aspect in our civilization that changes, something that I find hard to happen.

Good Will Hunting

Good Will Hunting is a movie about Will Hunting, a troubled kid that happens to be a genius when it comes to logic problems.

A mathematics professor finds him, and wants to give him the change of being successful. But the kid’s mental problems make him having to ask for the help of his old roommate who is an underachieved in this field. Oh, and there is some love in the mix (as it had to be). Awesome movie!

Linus on Complexity

You know what the most complex piece of engineering known to man in the whole solar system is?

Guess what – it’s not Linux, it’s not Solaris, and it’s not your car.

It’s you. And me.

And think about how you and me actually came about – not through any complex design.

Right. “sheer luck”.

Well, sheer luck, AND:


  • free availability and crosspollination through sharing of “source code”, although biologists call it DNA.

  • a rather unforgiving user environment, that happily replaces bad versions of us with better working versions and thus culls the herd (biologists often call this “survival of the fittest”)

  • massive undirected parallel development (“trial and error”)

I’m deadly serious: we humans have never been able to replicate something more complicated than what we ourselves are, yet natural selection did it without even thinking.

Don’t underestimate the power of survival of the fittest.

Read this awesome thread on linux design, complexity, dna, life, and the mysteries of the universe.

Web Zeroes

This season is full of nice shows for me ( Simpsons, House, Heroes1, The Big Bang Theory, Two and Half Men, Lie to Me, The New Adventures of Old Christine, FlashForward2, The Mentalist, StarWars: Clone Wars and Stargate Universe3) but none of them air on Wednesday, so to fill in with Web Zeroes.

It’s a 10 minutes long video podcast where three internet geeks try to get rich and famous in the Internet. Each episode a different approach.

It’s not something amazing, but acceptable enough to watch on boring wednesdays :)

1 It sucks. Big time. Don’t ask.

2 I give it 5 more episodes, and I’ll give up.

3 Same as above.