miguel laginha blogs here

(mainly) geekish jibber-jabber

On Turning 30 • Cap Watkins

The Farnam Street

Since I began working as a software developer, I’ve always been an avid reader of both books and blogs that would help me technically. I started buying books and collecting RSS feeds on ruby / rails, then I broadened my interests to include frontend / design stuff and then topics outside computer science such as motivation, leadership, behavioural economics and phsycology. There are still lots of technical topics that I’d like to know more of and even experiment, but as I have become more of a team lead and taken on more professional responsability at my workplace, I’ve come to value my performance as someone who manages other people’s work and not as a software programmer myself.

So.. considering that I can’t read all of the Internet, I’ve gradually given up exploring the ruby weekly, python weekly, postgres weekly, HTML5 weekly and Sidebar newsletters, and I just settled for the Farnam Street blog, which I find fascinating. Besides being very active, it covers a lot of the topics I mentioned earlier plus some others such as sleep, decision making, neuroscience, etc. It meets my curiosity for knowing how I think and why I think and behave the way I do, and there are lots of quotations from books you can buy online, if you want to learn more. Overall, I think it is the right material for knowing yourself better and take better control of yourself, which translates directly on my daily life. Personal and professional.

I’d encourage you to give Farnam Street a shot.

Python development on Mavericks using fish shell

Lately I’ve been experimenting a bit with Python and several frameworks, mostly for getting up to speed and having fun. Most of my work no longer implies programming on a daily basis but I do miss it and sometimes I spend some of my free time programming because of that.

Usually, the first challenge is to setup the development environment. A sane one. Regarding the python ecosystem, that means using a version manager (such as py-env, that replaced pythonbrew), virtualenv and possibly virtualenvwrapper. All of this may be trivial using bash or even z-shell, but I’m using fish shell for a few months and I’d like to keep it that way. Plus, it’s a challenge.

So, here’s what I’ve found that works on mavericks:

First off, enable pyenv support on fish shell. There may be other ways to do so, but I’m currently using oh-my-fish, a clone of the popular oh-my-zsh. This project is easily installed and contains plugins you can enable by editing “~/.config/fish/config.fish“ to include the line:

set fish_plugins brew django pyenv python # other plugins

This sets the ground for pyenv to work nicely. Install py-env using homebrew:

brew install pyenv

From this point onwards, you may choose to install virtualenv manually or use pyenv-virtualenv, as suggested by the author. I’ve done this using homebrew again, using the latest development release:

brew install —HEAD pyenv-virtualenv

..and everything works, so far.

Personally, I find the pyenv / pyenv-virutalenv combo a bit confusing, because the virtualenvs aren’t totally scoped to python versions. For instance, you can’t create two virtualenvs with the same name, even if they “belong” to different python versions (say, 2.7.3 and 3.3.2). Also, if you type

pyenv versions

you get all python versions AND virtualenvs mixed. Example:

pyenv versions snapshot

If you want to use a virtualenv, you have to treat it as any other python version, using

pyenv local django # the same way you would type pyenv local 2.7.3

Confusing, right? Especially coming from rvm or rbenv. Anyway, it works!

I have also tried installing pyenv-virtualenvwrapper but couldn’t make it work :( I think that’s because virtualenvwrapper is not compatible with fish shell. Anyway, I’ve found an interesting project called virtualfish which seems to provide that functionality. I might give it a go sometime.

Well, I hope it helps!

How to be the Boss Your Team Deserves: Stop Coding!

Where do I stand?

From time to time I’m asked to update my resume, mainly for administrative reasons. I usually keep two versions of it: a personal one and formal HR-ready one. I even keep the latter in the Europass format, which I hate, just so that no one ever complains or suggests enhancements. The personal one however, is free-form. I have it in a pages document, barely formatted and a lot less corporat-y.

I do this because both versions have very different purposes and audiences. The HR version is intended to be included in formal applications to state-funded iniciatives and similar projects. My version exists because I feel the need to say what really matters about me. You know, who I am and what I do. Kind of an anti-pattern.

So if you’re wondering how different both versions are, the simple answer is: very. Indeed.

The formal resume lists facts. It is a set of raw facts including my education and past employees and a rather superficial technical snapshot. Also some nice acronyms and hiring managers buzzwords.

In the informal version of my resume I focus on what kind of person I am and what kind of worker / colleague I would be, if hired. I might not have a large technical description of my role but I think I convey important info nonetheless. I do say stuff such as:

I strongly believe in working smarter, not harder

I love crafting products no matter the technology I’m using, as long as it’s the right one for the job and open source

…which although might not be technically relevant (i.e. doesn’t say which technologies I’ve actually worked with), do say a lot about how I think and act (right?).

A new section I recently added takes this approach even further. I called it ‘stands’. Here’s the rationale: what choices do I make on a daily basis worth telling (even if just for fun)? I don’t think I came up with invaluable information but I find it interesting and refreshing. Plus, it’s got my name written all over it. Take a look and tell me what you think.

Safari over Chrome, Ruby over Python, homebrew over macports, editors over IDE’s, iOS over Android, coffee over tea, markdown over textile, trackpad over mouse, natural scrolling over classic scrolling, books over ebooks, Spotify over Rdio, Simplenote over Evernote, iTerm2 over Terminal, Latex over MS Word, HTML5 over Flash, Postgresql over MySQL, Ember.js over backbone.js.

Isn’t that a nice abstract :-)