usevim: For hjkl Wizards

Usevim is my new blog all about Vim. You can follow it on the usual social networks:

I've been collecting interesting Vim-related links for years, and I've wanted to launch a Vim blog for a long time.

The format is similar to DailyJS -- weekly plugin roundups and lots of original content. I'm currently publishing every Monday, Wednesday, and Friday.

Read More →

The Key to Android Domination

Where's Google's Android IDE? They have good Eclipse support which goes some way to competing with Apple's Xcode, but the experience of developing with Xcode is far more focused and arguably better.

I don't actually think developing a native Windows, Linux, and Mac OS IDE really fits with Google's approach -- they'd rather give developers the platform then get out of the way by allowing us to use our own tools. However, there's one huge pain point in iOS development that Google could attack to win over developers: the difficulty of getting your code running on your device.

The Developer's Experience

After downloading several gigabytes, then setting up the necessary certificates, a developer can finally run their first Hello World application on an iOS device. This represents a weakness in Apple's approach that could be exploited.

Read More →

A vim-friendly Mac Keyboard

I suspect the ultimate vim keyboard is the Happy Hacking Professional 2. The Control key placement is good for vim, tmux, and screen, and the removal of uncessary arrow and function keys appeals to me. However, it's $300, so I wondered if it's possible to hack the keyboard I already own into being a little bit more vim-friendly.

Swapping Modifier Keys

On a standard Apple keyboard the position of Control sucks. Fortunately, Apple gives us the ability to swap modifier keys around with no hacking at all.

Under System Preferences, Keyboard, Modifier Keys..., the Control and Caps Lock keys can be switched:

Read More →

Using Powerline with Mac OS

Powerline, Mac OS Style

vim-powerline by Kim Silkebækken is a great plugin, but it's a little bit tricky to get it looking right in Mac OS. I've tested it in both Snow Leopard and Lion and figured out how to get it working nicely.

Snow Leopard's Terminal application doesn't support 256 colours, so I started using iTerm2 instead. With a little bit of configuration it's functionality equivalent to Terminal, and offers tonnes of extras. Lion's Terminal is fine. Both need to report xterm-256color, so ensure this is set up in the Preferences pane. To get the cool UTF-8 fonts you'll need patched fonts. Nick Quaranto posted some suitable fonts here: vim-powerline patched fonts. I like "Menlo" myself.

Read More →

Build an IDE with tmux and vim

Screenshot of vim and tmux

A friend of mine had visited an office where the employees used tmux and vim to edit Ruby projects. He wanted to know why people would work with the console version of vim, considering the loss of the convenience of mouse input.

I actually find this a good way to work, for several reasons. Originally, using console vim forced me to learn vim's motion commands properly. Combined with touch typing, this opened up a range of powerful ways to jump around files and lines arguably more efficiently than by using a mouse.

Read More →

iOS 5 Redemption: ARC, UIAppearance, Blocks

iOS 5 redeems iOS development in my eyes through several new features. There are Objective-C changes, but also new APIs that make common tasks a lot easier. When Apple released the new SDK, I created a blank project to see what fundamental project organisation changes had been made, and the only major thing I noticed was the addition of Storyboards.

Unfortunately, Storyboards are not compatible with iOS 4. It may be possible to create a fork of a project with iOS 4 support that has a different UI, or to somehow conditionally use Storyboards. However, we all know how much hand-coded interface development is required for real iOS projects, so I can't see myself using Storyboards.

Automatic Reference Counting

Automatic Reference Counting implements automatic memory management for Objective-C objects and blocks, freeing the programmer from the need explicitly insert retains and releases. It does not provide a cycle collector; users must explicitly manage lifetime instead.

Read More →

Changing APIs and Package Managers

When I started programming there was a real ‘if it ain’t broke…’ mentality. At least, I think there was — this was in the 90s and I connected to the community through magazines, computer shops, and public domain disks (that’s disks with a ‘k’, as in floppy diskettes). I learned a lot of BASIC derivatives from magazines, and eventually picked up some books on C. Then I heard about K&R C at university and flipped through a copy at the library. I think one of my friends bought a copy, and I was envious because I couldn’t afford it at the time.

Then later on I started playing with Ruby, and there seemed to be a huge amount of experimentation and creativity within the community. I dimly recall trying to work my way through Japanese documentation and giving up, but I came back to it a few years later when a lot of English–speaking developers had jumped aboard. The creativity in the Ruby community seemed to solidify when _why became well known and cartoon foxes and meta–programming were everywhere.

Then I started working with Rails, and there was a new mentality of constantly refining and changing things, sometimes based purely on aesthetic preferences, but other times to genuinely improve APIs and libraries.

Read More →

Google+, Privacy and Engineering Consent

At dConstruct 2011, Don Norman gave a talk entitled Emotional Design for the World of Objects in which he said Google’s main product is us and the service they sell is advertising. The services Google make aren't just a way of getting eyes on adverts, but a way of gathering information about us to improve advertisement targeting. If this is true, where is the evidence? And what does it mean for social products like Google+?

It’s now possible to link Google accounts together, which can make the awkward necessity of using several Google accounts more manageable. I have Google Apps accounts for work and personal use, as well as an obligatory Gmail account for services the Apps accounts can’t yet access. I’ve linked these together to make it easier to switch between them. Does this mean I’m now represented as one person internally within Google?

Google’s Privacy Policy seems to indicate that this could be possible:

Read More →

Designing for Password Managers

1Password works so well because it isn't just a security product, but it changes the way we deal with with website logins. That is, we do things more securely and more easily when 1Password is around.- Looking ahead in security, AgileBits

I currently have 258 unique passwords. I'm not addicted to creating accounts on web services; I have multiple identities as a result of separating personal and professional concerns. Memorising 200+ unique passwords is never going to happen, so naturally I use a password manager.

Password managers are probably best kept offline but they basically all work the same way -- there's some form of local application that integrates with browsers through plugins or the operating system's built-in password management framework. That means password managers generally associate web form fields with credentials.

Read More →

Lessons From Two Lightweight Markup Parsers

stextile

stextile (License: MIT, npm: stextile) is a Textile parser for JavaScript. The lack of a good Textile implementation held me back from developing Pop. While researching the project I found some amazing Textile implementations. Possibly my favourite is RedCloth, which I remember from back when _why rewrote it with Ragel.

As I was desperate for something that would parse my articles, I created a straightforward parser using regular expressions. I wrote tests as I went so it wasn’t too painful.

This project made me aware of a few interesting uses of replace in JavaScript that I hadn't really thought about before.

Read More →