Writings

Technology, open source, personal essays, and everything that isn't climate.

Productivity Tip: Learn your tools

At the web design meetup the other day there was a bit of chat about editors afterwards which turned into a normal geek fest of poking fun at each other for our choices. One new truth that came out of this a good editor doesn't make someone more productive, but it does allow them to become more productive.

Vim vs Emacs

As an emacs guy, that can navigate around in vi reasonably, I've was always somewhat surprised that people actually use vi to program. But there are plenty of folks that hold that position, and are as equally surprised that I use emacs. Over the years I tried to look for some common thread. What makes someone choose one or the other, and hold to that choice so firmly. A few years ago I came around to the best predictor. With probably ~ 90% accuracy you can predict which editor a person will use based on what editor their mentor used when they first got serious about computers. People pick up the tools of their ancestors. What looks like free will is basically dictated by heredity.

So, that's how you figure out which one people use. So, which one is better? The answer to that is simple, whichever one you know the best.

Tools Require Skill

There is this naive assumption that using a "better" editor will make you more productive. The answer is, maybe, but don't stop there. If you aren't willing to put in the time to learn how your editor is configured, take time every month to learn a new trick with your editor, give up on either vim or emacs, and go back to gedit. Learning an editor well is going to mean learning how to do very complex activities with complex key strokes. There just aren't enough keys on the keyboard to be able to do what you want to do without combining them together.

Every couple of months I spend a bit of time to learn a few more emacs tricks. It's hard for me to even enumerate what these are, because they are just part of my normal workflow, like water. Buffer changing, remote editing, multi language buffers, integrated source management. I am also aware of other things I could be doing, which include interactive debugger control, which don't warrant the time and skill for me to set them up yet. But I know they are there, and I even know how I would get started in configuring them if I needed to.

Which also brings another point, if your tools themselves aren't extensible, you will be limited in your growth. I have never met a system that I like 100%, though I've met many which did 98% or 99% of what I wanted. This is one of the reasons I'm a really big fan of open source. Couple 98% complete with an easy way to extend it, plus open source so you can really understand what it is doing behind the scenes, and you've got a winning combination.

Become Better

tldr; - If you want to be a better programmer, spend a lot of time getting to know your editor.

If you are not already deeply invested in an editor, I'd heartily recommend emacs, fire it up, then hit "F1 t" or from the menus, Help -> Tutorial. It will walk you through an interactive tutorial of basic key commands, including detecting if your local installation has changed any of the keybindings and alerting you appropriately.

If you are already invested in an editor, commit to yourself that you'll take 1/2 a day a month, for the rest of 2011, and spend that time reading and learning about other capabilities of the editor you are using now. You'll be a better programmer for it by far by the end of the year.

Related: The switch from xemacs -> emacs · Ed is the standard text editor · OpenStack Emacs Tools

The Red Thinking Hat

Ed de Bono has published a number of interesting books on using what we seem to understand about the brain to force ourselves to be more creative and get out of ruts. Some of his training was included in a leadership class I took back in 2006. Among the various models for thinking about thinking he created, one is this idea of the Six Thinking Hats.

One of the things we learn from Western Classical teaching is that the road to the truth is through 2 sides arguing, and eventually the truth emerges. Our entire legal system is based on it. The problem is, this is actually a really poor way to get to consensus, because once people start arguing for a side they actually become more entrenched in the idea as it progresses.

The human mind is an interesting thing, we often decide something is good or bad from our gut, and then spin a complex set of justifications later. Justifications that come out on the fly about why a gut reaction is provably true in some way. Everyone does this to some degree. As with everything, it's easier to see this flaw in others, but watch yourself in a heated discussion next time. If you pay attention close enough, you'll see yourself doing it. We all have these reactions, that's part of being human.

But it's not part of being productive or moving forward. de Bono created a methodology for working with ideas with different colored hats. You tell everyone that now is the time for White Hat, which means facts only on the table. Black and Yellow are worst case and best case scenarios respectively. Green is for new idea generation, and Blue for wrapping things together. And then there is the Red hat. If what you are discussing has any level of contentiousness, it's really important to open up a time where everyone can express their feeling and gut reactions about it, not with a complex justification for those feelings, just the feelings themselves. I divorces the gut instincts from logical arguments, but it still lets everyone express them, and that can be useful data in making a decision.

Even if you are doing anything that formal, the Red Thinking Hat is an interesting model for realizing you are no longer in a conversation or debate that's going anywhere except round and round in circles on previous prejudices.

While de Bono wrote lots of books, including one specific to this, the book Serious Creativity, was the one most recommended to us by the instructor I had. I've used as a class refresher over the years, and it includes an introduction to the Six Thinking Hats, as well as much more about idea generation.

Related: Vacation and Books · Programming is Hard · Easier than Arguing

When is a number not a number

There is a standard Rookie mistake in website development when storing people's information. A phone number, looks like a number, so people think they can use an integer to store it. The problem is that integers, as implemented on most modern computer systems and environments, have a maximum value of 2147483647. The results of this:

Somewhere in Dallas, some poor bastard is wondering why his phone rings off the hook with calls for the Nevada Division of Mental Health & Developmental Services, the Jackson County Florida Chamber of Commerce, a yacht club in New York.....

It's even funnier because I've got a friend that ran into the same issue when working on a project as an undergraduate, it happens more often than you think.

Related: CAFE standard of 55mpg seem high? It's not the real number, and the real number is a lot more interesting. · I've got an Android in my pocket · A new "law" for information

Companies as Organisms

Over at Communication Nation:

It’s time to think about what companies really are, and to design with that in mind. Companies are not so much machines as complex, dynamic, growing systems. As they get larger, acquiring smaller companies, entering into joint ventures and partnerships, and expanding overseas, they become “systems of systems” that rival nation-states in scale and reach. So what happens if we rethink the modern company, if we stop thinking of it as a machine and start thinking of it as a complex, growing system? What happens if we think of it less like a machine and more like an organism? Or even better, what if we compared the company with other large, complex human systems, like, for example, the city?

There are some very good specific points in this article about how you make a successful organism like this.

Spaces need owners. Again, think of the city street: every business or building has an owner. The sidewalks have owners – typically every business at street level “polices” their stretch of sidewalk. And even the street has owners – the street sweeper, the cop on the beat. In the same way, make sure that every online space you create has someone positioned to take care of it, to keep it safe and clean.

This is something people most often get wrong. Communities are gardens, and only flourish with tending. I've seen way to many efforts fail because there was an assumption that someone else was going to take care of the community. Things without owners slowly rot. Things only get done when someone makes a decision to do it.

Thanks to Sacha Chua for the link.

Related: When Patents Attack · Employment Agreements vs. Open Source · The Mood of a Nation

3rd trick on dd-wrt on FIOS

As soon as I went to work the home network dropped off the internet, wouldn't you know it. It turns out that was the time the old lease ran out, and it wanted my router to ask for it again. As I'd configured it to static to deal with their lease issue, no such luck.

Fixing it when I got home taught me another lesson, it's actually really important to clone the MAC address as well of the old router. With the original MAC address in place I couldn't get a DHCP lease. With a clone of the FIOS router, all was good.

Related: The 2 tricks to installing your own dd-wrt router on FIOS · Open as a feature · To Fios or not to Fios?

Google Chrome 9 for Linux

I realized last night at our replacement MHVLUG dinner that I was the only one there who was still using Firefox on Linux. Everyone else was on the Chrome bandwagon. And that's where I thought it would stay, until Chrome 9 came out today.

Yes, Chrome is faster, and doesn't die on javascript randomly, but the thing that pushed me over the edge was the fact that Google bothered to support WebGL on Linux with the release. I loaded it up to test and found the WebGL demos ran with barely any CPU usage. Ok, I'm sold for now. It's my new default browser, and we'll see if it sticks this time.

Related: My own thoughts Google Chrome OS · Is Google+ just another Chrome? · Mobile Browsing with Addons

The 2 tricks to installing your own dd-wrt router on FIOS

I finally got around to installing my own wireless router on my FIOS network, a Linksys e2100L with dd-wrt installed on it. After the router is setup (that's beyond the scope of this post) there are 2 tricks to make this work.

First, Verizon FIOS gives out really long dhcp leases, and doesn't want to give them up. So you need to not only clone the MAC address for your router, but actually set it to the ip addresses that your old router was given. I'm told that after about 2 weeks you'll be able to start using DHCP again, but you can't for the switch over.

Secondly, you have to set the upstream MTU. Presumably Verizon is doing some VLAN tagging, which would explain why your IP addresses can jump all over the place after a major network change on their side. 1496 should be a safe value, and it looked like it worked, but I left mine down at 1450, for no good reason other than superstition. This was the trick I was missing before, and since I've been dealing with bizarre networking issues at work recently the idea was still floating around in my brain.

It's now working, and my port forwarding is setup enough that I can do any fixes I need remotely via vpn.

Related: 3rd trick on dd-wrt on FIOS · Open as a feature · To Fios or not to Fios?

Happy Imbolic

Ever wonder where Groundhog day comes from? Notice that it's about 1/2 way to Spring?

We are now halfway between the Winter Solstice (December 21) and the Vernal or Spring Equinox (March 20).  It's called a cross-quarter day is known as Imbolc (or some variation of that spelling) in the Celtic world  It's also a modern Neopagan celebration and part of the Wheel of the Year. Imbolc is most commonly celebrated on February 2 (same as Groundhog Day and Candlemas on the Christian calendar) but it actually occurs, according to the position of the Sun on the ecliptic, at 11:20 pm EST on Thursday, February 3 this year. This cross-quarter day has been known since antiquity - a 5,000 year-old Neolithic passage tomb at the Hill of Tara in County Meath, Ireland has an alignment with sunrise on Imbolc.  The word Imbolc comes from the Celtic i mbolg or "in the belly" referring to pregnant ewes who soon give birth to spring lambs.  It was viewed as the start of spring (even though snow may yet be on the ground), a time for weather prognostication, and to watch for animals emerging from their winter dens (sound familiar?  Groundhog Day has its roots in similar Germanic pagan beliefs).

Read the rest over at Hudson Valley Geologist.

Related: Winter arrives... finally · Astronomy makes a good winter hobby · For love of cross country skiing

Planets, Planets everywhere

The Kepler mission dumped another 3 months worth of data into the public yesterday, which brings their candidate planet list up to 1200 right now. It's clear by the rate of finding candidates vs. confirmations, that most of the confirmations of real planets here are going to come from other teams. What's most important is the density of these signals. This represents 1/400th of the sky, and is proving out that planets are everywhere, and are vastly more varied than we ever imagined.

Kepler uses planetary transits to see there is something there, so it can only detect solar systems whose disc is pointed right at us.

This means that they are only able to find a small fraction of the the possible systems out there, which makes the number of candidates even more impressive.

As you keep slicing that data down they eventually got to this slide:

Kepler candidate planets overview

Yes, that's 54 candidates which exist in a temperature range that could be habitable. While one might dismiss the giants for a moment, remember that they could very well have moons that were earth sized, which would put those moons in the habitable zone. I've got to imagine the race is on big time to get confirmation on these targets.

Kepler habitable zone candidates

Lastly, they had a new confirmed solar system, with 6 planets, all within the orbit of Venus.

Kepler confirmed 6-planet system

These 6 planets are all in the super earth category, which makes some of them definitely rocky.

Kepler planet candidates

All in all some really impressive stuff. You can learn lots more about all of it at the Keppler Mission site, where they've also got some great videos on how this all works.

Related: Where have all the planets gone? · Know your exo-planets · 7 exo-planet system

Weekend Drupaling

I had a quite productive weekend working on the Poughkeepsie Farm Project site, and learned a lot of useful things about Drupal in the process.

Content Profiles

I now understand why core profiles are going away in Drupal 7, because they really do suck. All the flexibility and features that you get used to with custom content types and views go away when you are working on profiles. This became an issue as we were trying to create a Board of Directors page that was built dynamically from user accounts, and actually wanted to expose a draggable view to let people order lists of users manual (alphabetic sort wasn't quite what we were looking for). I managed to convert over to content profiles, and life got a lot better. The results are here 🔗💀.

Epublish

This weekend we pushed out the first newsletter 🔗💀 in the new format using the epublish module. I've been working with Susan (executive director) and Jane (newsletter editor) for the last month to get this right. There is a lot of initial investment here on all sides as I had to make a few code changes to get this to work well for us, and a lot of theming. It's especially tricky as we're trying to make an HTML email look basically just like the page people see, even though they go through entirely different templates and theme paths, and html support in email clients is far less intelligent than in browsers.

I also managed to collect and submit my patches upstream, so I feel like a good little open source citizen there.

Recipes

Recipes submission 🔗💀 and indexing are now live on the site, using the really well put together recipe module. I had to build a slightly clever hack to list relevant recipes from the produce pages. I'm still trying to figure out the best way to get epublish and recipes to play nicely together, because right now they don't. They both do slightly funny hacking with the body field and what's in it, which is going to require patching one or both to get the display we want.

Events

The events infrastructure on the site is now using a local calendar instead of just loading from Google Calendar. This lets us have a google calendar compatible feed. As well as having our event links go to content in our site instead of loosing the user on a Google Calendar page. There are still a few kinks to work out here, but overall this is going pretty well.

All of these have been in the works for the bulk of January, and it's great to get this stuff coming to fruition. Looking forward to how these are received by the membership. Now I've just got to make a few front page changes and we've got to pull together the volunteer opportunity database, and the main backend work for the 2011 season will be accomplished.

Related: Weekend hacking... much progress · Getting my head around Drupal: mhvlug.org version 4 a detailed guide · Revitalizing a software project