Vim as IDE. Are you getting the wrong parts?
There are a lot of discussion about how to make Vim “an IDE”. Vim is a great text editor, but when we are developing, there are lots of extra tools that are very useful. Code completion. Easy navigation through files and classes. Source control integration. Syntax checking. Navigation that understand the semantics. Integrated debugger.
My problem with IDEs (and I have used a few over the years) is that they give you a lot of support, but at the cost of increasing the complexity. They are slow for a lot of common operations and they use a lot of resources. Code completion, the good kind that will allow you to get the types of a method, not just finish your words (which most of the time is trivial), is useful when developing on a static language, but since I program in Python is something that I can’t find good use of it. I just don’t use all that stuff, so I don’t feel I can justify to pay the price.
Another problem with IDEs is that they tend to be designed, by default, to the newbie. That’s not necessarily a bad thing, Vim is a pretty intimidating tool because is totally crazy for the rookie. But it generates a bloated environment to start with. If you open Eclipse, a popular IDE (and one I’ve used for some years), you’ll get a relatively small frame for the code, and a lot of extra stuff surrounding it. Logs, file navigation, class definition, a huge toolbar, maybe even a TO DO list…
For example, think about file navigation. Sure, it’s useful to move around. But it is used only at certain points in time. Most of the time, it’s just used as an entry point to code, and then the navigation can be achieved, either just moving around in the same file, by a referral from the code (like going to a method definition), or just searching on the whole project. In case you need to go to an specific file, you can then show the navigation window, or even better, search by filename. That only happens during small periods of time, so the rest of the time the window is just wasted space on screen. The same thing happen for a task list. It is useful to know the next step. But not while you’re working in one task.
Hey, it is possible to hide the navigation window, and display it only at the proper moment, to save space. I have done that. But it’s not there by default, so most of the people I know just keep it open “just in case, giving context”. They just get used to it, and don’t perceive it as a problem, But having half of your screen full of information that is irrelevant 95% of the time is a huge price to pay. And certainly not a good use of an IDE. The good parts of an IDE are things like automatic compilation and deployment, refactoring tools (not just renaming), debugging, help with the types in static languages, automatic generation of code, etc. Not showing everything, all the time.
Vim is a text editor, but it is also sort of a philosophy. It is not about showing stuff, but about having stuff available at the right moment, with a quick command. It is not just about using hjkl to move around and having an insert mode. It’s about being precise. It is difficult at first, because you can’t simply discover what are the available options, but it also pays off in terms of focus and clean environment. When programming, the most important part is to keep as few things into mind as possible. Keeping all relevant information, which is already enough, but nothing more than can distract you for the task. It is also about doing one thing, and not a hundred. I use other tools for things like source control and debugging. After all, we have the whole OS to work as our IDE.
I use a small number of plugins in Vim. When you learn a little about it, you find out that it’s amazing the number of features and stuff that can be achieved “out of the box”, and how little extra is actually needed to have a really productive environment. It’s just that we need to move from the usual “browse through menus” world that most of software uses, and devout some time to, well, study and learn. It’s really worth it.
These are the times of miracle and wonder

This started all when I was a kid. Well, not the exact model, but this is more iconic, isn’t it?
My first computer was a second hand ZX Spectrum+ This says a lot about my age, I guess. I got it from my uncle, who bought himself a more powerful computer. I really loved that computer, and used it for quite a long time. It seemed so magical that you could play a tape, which sounded weird, and load a game. There was also the possibility of program from the command line, which I tried, but I never “got” exactly how to get from very basic stuff to anywhere.
A few years later, and after the Spectrum was broken, I obtain a PC. At first without a sound card, so it was strangely silent compared to the computers of my friends. But the change to a hard drive, where the load times were almost instantaneous was astonishing. Yes, there were disks, but even load something from disk was extremely fast compared to the 15 minutes to load from tape. The usage of MS-DOS was also magical. Learning all the commands, messing around with configuration options (differences between extended and expanded memory) on autoexec.bat and config.sys and even changing port jumpers physically on the cards to resolve problems.
When Plug And Play arrived, at Windows 95, most of the pain seem to disappear and configuration worked fine most of the time. Also having multitask and a GUI was amazing. Around the same time I got my first experience with Internet. Suddenly, there was a way to obtain information not from disks (or CDs), but from a network. It was a slap in the face, and I immediately understood that it was going to be a basic part of the future, as it is today. I think that was obvious to any one interested in computers. It took a considerable amount of time to get to a position where it was something common, as it will be charged by time initially and it was expensive.
I started college and learn more interesting, wonderful stuff. For example, UNIX, a “new” (for me, at least) operative system that seem to have the crazy idea of being able to be used for more than a user at the same time. Or the understanding the internals of computers, which got me a lot of “aahhh, now I get it” moments from previous experiences. Including the programming part, which I discovered was much more powerful and interesting than the small scripts I did before.
When I started my first job, I developed for systems that were also computers, but weren’t shaped as a box, an screen and a keyboard. And that you can compile in a machine code for another. I also learned a lot about how powerful and productive was to use properly development tools like IDEs and the Unix command line.
After that, I spend a few years without working as developer, but when I came back, it looked like I missed stuff. Like how incredibly easier to use have Linux came to be, thanks to Ubuntu. So much, that after a problem updating my personal computer, I installed Ubuntu at home and never looked back to Windows (I use a Mac these days). But the thing that impressed me more, Virtual Machines. So you’re saying that I can run a full computer inside my computer? That’s amazing!
I also learned Python (and other scripting languages) and, coming from writing mostly C and C++, you can imagine how wonderfully productive it felt. It also have a really great environment, with modules to do anything that you can imagine. One of my first uses of it was to create an application on an Open Office spreadsheet, including dialogs to input information. I got so in love with Python that I decided to move my career around it.
I got really impressed with the iPad presentation. It really was (and is) a magical device I had dreamed a long time ago. I have an iPad, I use it every day and it is probably my favourite device that I ever owned.
The thing that surprises me it’s that I still have this sense of wonder, of enthusiasm after living all those things. I have seen a lot, but somehow, keep that kid inside me that is amazed by technology and how far have we come, and how the next thing is really great. It’s not easy to perceive on a day-by-day basis if you work in this field, but taking a look back, just as close as 5 years back, things were quite different from now in the lands of technology. The change has also been accelerated. Software, in particular, seems to have flourish in ways that seemed impossible. There are better tools to generate it, that make complex projects to be able to be achieved by small teams in very short amounts of time. I know, there are also complains about how exactly this technological progress is happening, and how 50 years ago we think we were going to be able to live in Mars and to wear jetpacks, but I think that having permanent access to the greatest library on our pockets on devices getting faster and more capable every year is not a small achievement. We live in the future.
I remember all this from time to time, when I am tempted to be cynical on new products, like I’m sure you’ve read these days related to iOS 7, PS4 and/or Xbox One. There seem to be a lot of people that put their best “not impressed” face for almost every new release, and that’s not a good thing. Of course, there are things that I’m not particularly like or am fond of, for example the iPad mini (an smaller iPad? I’d love a bigger one, maintain the weight), but I try to remember that there are people that will love all these things like I loved previous ones. I am not necessarily the ideal customer for everything, and I appreciate when a review is about describing the product and its strong and weak points and not that much about stating a (usually predetermined) opinion.
We are truly living in days of miracle and wonder since almost 26 years ago. I hope you’re enjoying the ride. I certainly am.
ffind is now available on PyPI
Remember ffind (A sane replacement for command line file search) module/script ? I’ve just pushed it to PyPI, so anyone interested in giving it a try can install it doing
pip install ffind
Brilliant!
As this was my first submission to PyPI, I’ve follow this guide. It has been quite simple, once it is prepared to use setup.py. And remember, the code is available on Github, so feel free to check it and contribute!
Notifications and emails
We all now that email, being a technology created a long time ago and developed organically into some sort of lingua franca of Internet persona and communications, has a series of problems. No easy ones. Manage the email is a problem of its own, and there are lots of articles about it on the Internet.
One of the most annoying is the notifications. We all receive too much email that are only reminders of something relatively interesting in a different app. That could be a new comment on a blog post, an update on LinkedIn, or even a new post on a forum (yep, that used to be a huge thing). GMail’s recent move to group together all notification email is a great example that this system is quite inefficient. It is difficult to find the balance between keep a user informed and not sending spam.
To increase the annoyance, notifications typically will be produced in bursts. There is some discussion in a blog, with 4 or 5 messages in an hour, then it stops for several hours, and then someone else post another comment, producing another couple of comments.
My impression is that any serious app that produces a significant number of notifications (not even very high, something like twice a week or more) and wants to show some respect to their uses should move to a notification system. Hey, Facebook has done it. Remember when Facebook used to send tons of mail everyday with new likes, friends and posts? They changed that to make a notification system in their page. That mean you can always close Facebook, and when coming back, you can easily go to everything since last time.
But, of course, Facebook is a special case, because most people keeps it open or at least check it regularly. Most of other apps that are not that frequently used needs to use email, or no one will check them.
So that’s the deal. Send only one email. One saying “You have new stuff on app X. go to this link to check your new notifications. No new email will be sent until you visit our page” And maybe send another reminder after a week (that can be disabled). This way, if I don’t want to go immediately to the page, no more spamy notifications are received. If I’m interested in the app, I’ll check every time I get that email, but the email is not spam. It allows a very interesting natural flow. And it also shows up respect for your users.
PD: Yes, I know that this is inspired by the way phpBB works, but in a more high level approach. Not sure why that way of doing stuff is not more common.
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
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.
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
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?
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! 😀 )
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 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.
Vim speed is not really the point

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.
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.
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:
Great female participation on PyCon US 2013
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!










