My favourite scientists


There are many figures in science that are fascinating. Not only from the point of view of the importance of their discoveries, but also from the person behind the figure, as well as their times and common beliefs. For example, Isaac Newton is a complex and fascinating figure. He is without a doubt one of the greatest physics of all time, but he was also a difficult personality and made things like taking an effort in obscuring Robert Hooke research on gravitation.

But among all the scientists from the ages, there are two that I have a special kind of appreciation: Johannes Kepler and Richard Feynman. This appreciation is sightly related in both cases.

Beautiful models

Johannes Kepler

Johannes Kepler

Up to the 18th century, there were only six planets known, that had been known since ancient times. Mercury, Venus, Earth, Mars, Jupiter and Saturn. Of course, until the heliocentrism Earth wasn’t considered a planet, but at Kepler time, the fact that Earth was a planet just like the others, orbiting around the Sun was settling down. So, Kepler, who was a very religious man and studied previously theology, convinced himself that there should be a relationship between regular polygons and the different planets. And he worked hardly, adjusting his model to work with tridimensional polyhedra, the most significant Platonic solids. When ordered properly, the orbits of the planets, represented by spheres, will be engraved one after the other!

Just imagine what that model will mean for Kepler. You have a relatively simple model that shows the Solar system has a direct relationship with the five Platonic solids (tetrahedron, cube, octahedron, dodecahedron and icosahedron) which carried, for a long time, a deep philosophical meaning of perfection. And all is consistent with the astronomical data that was available at the time! Amazing! The model is beautiful to our eyes, but for Kepler I can only imagine that it has to be also wonderful and spiritual.

But, of course, reality is not what we want it to be. Later, Kepler worked with the astronomer Tycho Brahe, who had the best observatory of the world, and refine all the measurements and calculations. And, guess what? The numbers did not add up. There was an small, but consistent, deviation from the model. And the precious, perfect circles weren’t true.

Roll 2D8 to advance to the next planet

Roll 2D8 to advance to the next planet

Can you imagine how devastating that discovery had to be for Johannes? The model MADE SENSE. The model was PERFECT. And yet the real world measurements shows that it can’t be. There has been others, during history, that had faced this kind of challenge and hided the data, manipulated the numbers, or closed their eyes. Kepler did what he had to do. Be honest and modify his model. He didn’t make this with a smile. That was awful and disconcerting, and felt like a failure. Why ellipses? Why God did not design the Universe using circles? It took years to get to that conclusion. But he corrected his model using ellipses.

And that is now known as Kepler’s First Law of planetary movement: ”The orbit of every planet is an ellipse with the Sun at one of the two foci.”

And I think that has to be extremely hard, at a very personal level. And I admire him for being honest, not hiding the data, and being able to move on, even if he felt awful about that. I always keep in mind that properly measured real world data is paramount. And that hiding your failures under the carpet takes you nowhere.

The model itself, of course, is completely blown away the moment you add an extra planet, but it is still beautiful. I’d love to be able to buy one wooden Kepler model and have it on my desk. 

Atypical stereotype

Careful now, I'm making science

Careful now, I’m making science

I think that Richard Feynman is probably one of the most loved scientists among scientists and technical people, but, strangely, not so much for the general population. And it’s a shame, because the stereotype of the scientist is mostly based on Albert Einstein. Well, probably on an already stereotyped version of Einstein, You know, oblivious to mundane things; interested on very complex, indecipherable things; talking almost in riddles; locked up on his lab; long curly grey hair, etc… Don’t you laugh when a “scientist” on a movie says something totally cryptic to describe a simple phenomenon?

But Feynman was sort of the opposite of all those common misconceptions. He was an extremely vital, passionate man. He was funny. He find everything surrounding him fascinating. He travel extensively around the world. He was eloquent and an excellent teacher and communicator. He played bongos. He went to samba school in Brazil. He used to write physics equations on paper placemats on a topless bar. All of that while winning a Nobel Prize and being one of the best physicists of the 20th Century.

He was a truly fascinating man. We are fortunate to have a quite extensive record of interviews and books with his thoughts. I like specially his brief description of the key to science in this video, which is related to the story about Kepler.

He also said (about the Challenger disaster, as he played an important part on the commission that analysed the disaster)

For a successful technology, reality must take precedence over public relations, for nature cannot be fooled.

There are lots of videos on YouTube where Feynman talks about his views on the world. I would recommend watching them, they are very interesting.

Curiously, Einstein is a good example of a scientists that wasn’t able to accept reality. He never totally accepted quantum physics. Don’t be too hard, Einstein still was awesome.

Bring in the code

But I also try to keep these premises in mind. As I said before, the world is not the way we like it to be, it’s the way it is.

And I find that is a reminder to have when I work. Software development is not usually about science, but about engineering. Related but not exactly the same thing.

We developers tend to develop love for our precious. Our favourite set of tools, frameworks, programming languages, operative systems, editor, etc… But specially our code, our modules, the ones that we have developed, as we have put ourselves on them. Most of the time, they are fine. There are lot of choices that are really a matter of taste.

But we should keep an eye on reality. Measure carefully to be sure when things stop bending and start breaking. Do not lie yourself with meaningless benchmarks, but with the best, stressful test that you can perform on your system. And when there are problems, and our failure is irrefutable, accept it and be able to move on.

It is not easy. I don’t like being wrong. It hurts. But it is the only honest solution. And I find wisdom in Feynman to know how to proceed and courage in Kepler to accept the results.

Only external comments allowed?


where_are_my_comments

No spoilers will be tolerated. Thanks.

I’m noticing that recently there are a lot of blogs out there that are not allowing comments.

I am not talking about specific subjects that could be controversial, and have the comments closed to avoid flame wars or trolls. But the total removal of comments, since the beginning. I must confess I don’t understand it, as my way of approaching a blog is not as a closed book, but a place where discussion can improve the original post. Sure, when the number of comments reaches a point, there can be lots of duplicated or low level comments. But I don’t think that a reason to not allowing any. That’s why there are moderation tools.

But, ok, let’s say that I get the idea that a blog post is something complete, and nothing needs to be added to it, as it clearly expresses an idea. In that case, why are there some blogs that, instead of having their own comment system, they are linking Hacker News as a way to encourage discussion? Well, Hacker News is awesome, the community is great and there are lots of interesting discussions there. I check it frequently. But there are problems with that.

First, that you don’t have any kind of control over it. For example, I like to know what are the comments from the original writer. Sure, you can explicitly say it, but it’s not evident. I also like avatars, they help me keeping track of people writing more than one comment or in more than one post. I also like trackbacks. Maybe you prefer those details in a different way, in the exact way that HN is making them. But you cannot decide it.

You also don’t “own” the comments in any way, so if HN decides at some point to delete old comments, you can’t do anything about that. You can’t move them. You are also not notified with new comments.

And finally, my impression is that Hacker News favours the “for new content only”, making people not commenting old posts. That is probably happening everywhere, sometimes I feel that is “not proper” to comment after a couple of days has passed, or if the post is old. With HN comments I think that is exacerbated.

Again, I love Hacker News. But I think that only allowing discussion there is giving away too much.

 

UPDATE: As someone stated on the comments, there are also comments on Hacker News. So feel free to comment here or there! (This blog post wouldn’t be complete without this! :-D )

I once was a non-tech entrepreneur


I’ve been thinking a lot about writing about this. Probably has been enough time to try to put it on a coherent story. I’m not going to saying specific names, though.

Owning a comic book shop, wearing a beard and not being, ahem, skinny enough will grant your some comparisons

Owning a comic book shop, wearing a beard and not being, ahem, “skinny enough” will raise some “hilarious” comparisons

So, around 7 years ago, I had the itch to start my own business. As you can see in this blog, I am a software developer, but at that time I had been working as a consultant, having some contact with the business and entrepreneurship world, so I somehow perceived that as a possibility.

As every other geek fellow, I had the dream of owning a comic book and related geek stuff shop. You now, the “Android’s Dungeon” kind of stuff, where you can buy comics, manga, boardgames, RPG games, action figures, etc… I was living in Toledo, Spain, which didn’t have any of these shops, so I though of that as an opportunity.

Also, some research on the Internet showed that there was a franchise expanding at that moment, which also encouraged me in the way that I could get some help (at a cost that seemed reasonable). They had a big online shop that had been working for some years and around 3 shops all over Spain, including one in the same location as the central warehouse. They were creating a network of shops to grow the business, and in a few months they was about 10 shops open. The idea was to operate as a central point of material for all the network, providing all the stuff to their network.

My idea wasn’t really about making a big business, but more like a self-employment / family business kind of thing. So, I give it a though, make some mental calculations, obtain a loan from the bank, and went for it! Brilliant! I must confess I was really excited.

Continue reading

Vim speed is not really the point


500px-Vimlogo.svg

I am a Vim user. And a Vim fan.

I was fiddling around for some time, you know, just knowing the basics, because it is convenient to do small changes on servers without having to worry about installing anything. Just the basics, insert mode, some search, save,

and a couple more things. Then, around two years ago, I decided to give it a try as my main editor, after watching a presentation of a co-worker (my boss, actually) about how to use Vim (he has been using Vim for around 20 years)

At the beginning, it is quite difficult, to be honest. You have to relearn everything about editors. But I was doing OK after one or two weeks, so I kept using it. I was also forcing myself into improving my usage, reading about it and learning tricks…

Then, after a while of using it and read a lot of instructional material (I cannot recommend “Practical Vim” by Drew Neil strongly enough. It’s a FANTASTIC book), everything started to make sense. Let’s be serious, the problem with Vim is not exactly that is “difficult” per se, it’s that it is so alien to any other text edition experience, that you have to forget everything that you know about how to edit text. That’s why I don’t agree that the Vim learning curve is a myth. Because, when we first heard of Vim, we already have 10+ years of using things like Word, NotePad or Gmail to write text. We need time to assimilate how to edit text “the Vim way”. And that takes time to assimilate, as your muscular memory works against you.

And, yes, the Vim way is awesome. But it is awesome not for the reason that usually someone will think at the start. There is the perception that Vim is awesome because is fast. It is not.

Continue reading

80 chars per line is great


Probably the most controversial part of PEP 8 is the limit of 80 characters per line. Well, is actually 79 chars, but I’ll use 80 chars because is a round number and the way everybody referes to it.

Capture all the experience

Capture all the experience

There are a lot of companies where the standard seems to be “PEP8, except for the 80 chars line restriction”. On GitHub projects, which in general follow PEP8 (it seems to be a very strong consensus), that’s typically not found. In explicit code guidelines, the restriction could be increased (100, 120) or even removed at all. The usual reason for that is stating that we are not programming in VT100 terminals any more, and we have big, high-resolution screens. This is true, but I’ve found that that limitation, combined with the use of whitespace in Python, makes the code much more compact and readable.

It seems that, naturally, Python code tends to occupy around 35-60 characters (without indentation). Longer lines than that are much less frequent. Having suddenly a line much longer than the rest feels strange and somehow ugly. Also, having the mandatory indentation whitespace increase the line width is a good visual way of minimising the nested loops in your code and suggesting, in a subtle way, to refactor anything that is indented more than about four times.

For example, compare this:

Continue reading

Great female participation on PyCon US 2013


This picture is AMAZING

This picture is AMAZING

I have read that around 20% of PyCon attendees were women. I’m sure I’ve seen it on more places I can’t find at the moment, but is at least here.

This is fantastic news, a great success for the PyCon, the Python community, and specially groups like PyLadies and Lady Coders. The opening statements of Jesse Nollan is a must see.

As I have previously expressed some concerns in this blog about whether requiring a Code of Conduct is the best approach, I’d like to say that I was wrong and it seems that had a positive impact. The CoC is also currently under review, and I’m sure it will be improved. It has also been used with great care, as the PyCon blog shows, which is also something to kudos.

There has also been special programming tracks for kids, which is awesome.

Of course, that is not the end of the road, and there is still much to do, but it is very encouraging. Keep on the good track!

Say NO to web pages adapted to iOS


I really really don’t understand why there are people that think it’s “better” to replace a perfectly good web look and feel for a stupid “adaptation” to iOS with sliding pages and different layout.

I mean, c’mon, If your page does not have a good design to start with, why not changing that? For both web clients and iOS devices. I remember when there the wordpress plugin for iOS was activated by default and all the blogs changed totally their appearance for a kind of “magazine” that, yes it looked good, but was much more difficult to read.
I get to have a responsive design to adapt the web to some sizes (like a mobile device), but changing fundamentally how your site looks and is designed is totally pointless…

There is one thing that is even worse. Apps that wraps a web site, removing all the functionality of the web browser for a stupid and independent, limited app. And even worse, they will constantly will bother you with reminders to download and install a pointless app.

No, just don’t. It is totally stupid. Work on your web page, get a great design, and make easy for the people wanting to read it, well, easy. After all they’re the ones interested in you….

PD: I think the Android ecosystem is similar. The same applies.