Sublime QuickNewFile

I wrote a small Sublime Text plugin, QuickNewFile. It tries to mimic the Atom editor’s method of creating new files: show an input box for the filename, create the file. This flips Sublime’s method of creating a blank buffer and later saving it. I found Atom’s worked better for me, and it was about the only thing I missed from Atom when I switched back to Sublime.

The basic features:

  • Can be used to open existing or create new files.
  • Initial directory used is the directory of current active file, falling back to project root then home directory.
  • Tab-based auto-complete for directory. Hit tab multiple times to cycle results.
  • Will create missing directory in the folder tree as needed.

It’s not on Package Control, but it’s simple to clone the repo to your Packages folder (see the readme).

Read More…

There is no Technical Debt

There is no “technical debt”, there are only badly-implemented features.

Perhaps the situation isn’t that bad. Even so, each time I see the phrase technical debt used in a discussion, I fear something bad is about to happen – or be justified. Somehow, a fairly dicey decision is about to be turned into a solid, objective decision by means of applying terminology.

Compare and contrast:

  1. “The team will need to implement this in an unscalable and badly tested fashion in order to meet that deadline.”
  2. “The team will need to take on some technical debt to meet that deadline.”

The first correctly identifies that risks are being taken on that may cause problems later. The second papers over this with some jargon which implies an objective evaluation has taken place over a well-understood problem space. Likely, nothing of the sort has happened.

Read More…

Alfred: Folders & Projects → Sublime, Xcode, IDEA

I often find myself following a pattern: open Terminal, cd to a folder, then use the subl or open command to open the folder in Sublime or Xcode.

I figured that I must be able to use Alfred to shortcut this particular workflow. Low and behold, it’s pretty simple. I thought I’d need to write some code, but Alfred’s Workflow feature has everything you need built-in.

This does mean that, before starting, you need to buy Alfred’s Powerpack. This allows you to use Workflows, which are needed for this shortcut.

Read More…

It’s not just the company, but also the Haven

One of the better and more concise arguments against tax havens, appealing to something other than anger at corporations:

Tax havens should be illegal in international law. They are patently unfair. […] They bear few of the costs of the modern nation state, while sucking those states dry of the revenue needed to sustain them.

Simon Jenkins, in the Guardian.

Anti-Patterns in Security #1: Disabling Paste for Passwords

A recent security anti-pattern I’ve found is websites containing code to disable pasting into password fields. As far as I can make out, this is one of the most brutally effective ways of encouraging users to create insecure passwords.

With many backfiring policies, I can see some benefits; this one is rare in that I see zero benefits to the approach.

You’ll have some jQuery that looks like this:

$("#newPassword").bind('cut copy paste', function(event) {
  event.preventDefault();
});

So you’ll come to generate your long, secure password using 1Password or whatever, then come to paste it in and – bam! – nothing happens. Instead, you’re forced to transcribe it one character at a time. It’s enough to make you resort to pAssword1.

Read More…