Hiltmon

On walkabout in life and technology

Accessing SQL Server From OS X

Every once in a while I need to access a Microsoft SQL Server database from my Mac, usually to create a data migration script. In the past I used a commercial ODBC driver. But ODBC on OS X was deprecated ages ago.

In this post, I’ll talk about my current stack for accessing SQL Server databases via Ruby and Python and how to set it up. Note that I do not use homebrew, so these are all native installs.

You will need Xcode and the command line tools installed, which of course you already have.

FreeTDS

FreeTDS is a set of libraries that one can use from UNIX based systems to natively talk to SQL Server. Download it from their stable release link to your Downloads folder (current version 0.91 as of writing).

Then, to build and install it:

1
2
3
4
5
$ tar zxvf freetds-stable.tar
$ cd freetds-0.91
$ ./configure --prefix=/usr/local
$ make
$ sudo make install

To have FreeTDS default to the newer protocols for newer SQL servers, edit /usr/local/etc/freetds.conf and set:

1
2
3
[global]
# TDS protocol version
tds version = 7.1 # or 8.0

This works with SQL Server 2000, 2005 and 2008.

Ruby

You need the tiny_tds Ruby gem to access SQL Server via FreeTDS from Ruby. I had a lot of trouble getting this gem to build on OS X 10.8.4 with Ruby 1.9.3 under RVM until I figured out the parameters needed to make it work with my FreeTDS and Apple’s iconv library. Use the following rather long command:

1
$ gem install tiny_tds -- --with-iconv-include=/usr/include --with-iconv-lib=/usr/lib --with-freetds-include=/usr/local/include/freetds --with-freetds-lib=/usr/local/lib

This compiles the gem with Apple’s iconv lib and the FreeTDS we just installed.

After that, accessing a SQL Server database is easy. Here’s a script to dump a table or a query to a CSV file:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
require 'rubygems'
require 'tiny_tds'
require 'csv'

def write_csv(table, result)
  CSV.open("#{table}.csv", "wb") do |csv|
    result.each do |row|
      csv << row.values
    end
  end
end

def dump_table(table)
  puts "dump_table: #{table}"
  result = @client.execute("SELECT * FROM #{table}")
  write_csv table, result
end

def dump_query(table, query)
  puts "dump_query: #{table}"
  result = @client.execute(query)
  write_csv table, result
end

@client = TinyTds::Client.new(:username => 'username', :password => 'password', :host => '192.168.x.x', :database => 'database _name')

dump_table('table_name')
dump_query('table_name', "select * from table_name where date >= '2013-01-01'")

@client.close()

Python

For Python, I tried the pymssql language extension. Installing this was quite easy:

1
2
3
$ sudo easy_install pip
$ sudo pip install cython
$ sudo pip install pymssql

And in a simple script:

1
2
3
4
5
6
7
8
import pymssql
connection = pymssql.connect(host = r'192.168.x.y:1433', user = 'username', password = r'password', database = 'database_name')

cursor = connection.cursor()

cursor.execute('SELECT count(*) FROM table_name ')
for row in cursor:
    print row

Note the use of Python raw strings for the host and password.

Bonus Round: isql

If you are old school like me and want access to SQL Server from the command line, you really need the old isql command line. FreeTDS does have a tsql command to test access from the command line, but it is not fully featured.

But isql is part of ODBC which is deprecated. Oh, well, time to install unixODBC. It’s an oldie, but a goodie. Download from this link or the downloads page. Then:

1
2
3
$ ./configure --prefix=/usr/local
$ make
$ sudo make install

You also need to recompile FreeTDS with support for unixODBC, so go back to your FreeTDS folder and:

1
2
3
4
$ cd freetds-0.91
$ ./configure --prefix=/usr/local --with-tdsver=8.0 --with-unixodbc=/usr/local
$ make
$ sudo make install

Following the instructions at http://www.unixodbc.org/doc/FreeTDS.html, you need to register FreeTDS and create your first data source. My files look like this:

odbcinst.ini
1
2
3
4
[FreeTDS]
Description=v0.63 with protocol v8.0
Driver=/usr/local/lib/libtdsodbc.so
UsageCount=1

and

odbc.ini
1
2
3
4
5
6
7
8
[TEST]
Driver=FreeTDS
Description=Test Database
Trace=No
Address=192.168.x.y
Port=1433
Database=database_name
TDS_Version=7.1

To see if this is working, use the osql tool:

1
$ osql -S TEST -U user_name -P password -I /usr/local/etc

You can then access this database using good old isql:

1
$ isql TEST user_name password

Note that you may need to put " characters around the password if there are special characters in it.

Commentary

It’s quite sad that the popular Open Source databases like MySQL, PostgreSQL and MongoDB all have wonderful, fast, easy to install, native libraries for OS X and Linux, but the big commercial databases like SQL Server and Oracle still require these unpleasant hacks, ancient deprecated libraries or worse, Java!

A lot of companies are moving their servers off Microsoft Windows and on to Linux, but they still need access to legacy data, and these hacks are just not that elegant or robust enough for true production use. Until these companies can migrate their databases off Microsoft and Oracle, they are going to have to live in transition and hope these hacks hold.

I think it’s in Microsoft and Oracle’s interest to release public libraries to access their databases from anywhere, including other platforms, in order to stay relevant and in the game.

Follow the author as @hiltmon on Twitter and @hiltmon on App.Net. Mute #xpost on one.

Horizons

When I was a child, my horizon was the building I was in, my home. I could reach out and touch my family and whomever wandered into the house.

As a teenager, I got a bicycle, and my horizon was the neighborhoods within cycling range. I could reach out and touch my friends in nearby neighborhoods. And I felt less constrained.

Later, I learned to drive, and my horizon grew to the city I was living in. I could reach out and meet people from any neighborhood in the city. And I felt less constrained.

And one day, I got on a plane and went to another city in another country, and my horizons expanded to the city I was visiting. I could reach out and touch people in other cities. And I felt even less constrained.

Technology pushed these horizons even further away. I got a telephone and my horizon was wherever I could call. I could live in one place and still talk to people in other places, as long as I had their number.

But when we got the Internet, our horizons ceased to exist. All constraints fell away. With the Internet, we can talk to anyone, anywhere on this planet at any time. We can reach out in seconds and touch them anywhere, even if we do not know them personally. And they can do the same with us.

I like having no more horizons. I like being able to sit in New York and share a virtual breakfast with my nephews in Sydney, chat about a Springsteen concert a friend is just leaving in Melbourne, see the new clothing my mate in Malta just purchased, discuss bourbon with a buddy in North Carolina, see the latest creation a chef friend made in Tokyo, discuss luggage and scotch with a person I have never met in Edinburgh, try out a new software product with another new friend in Wisconsin and collaborate on software with a new mate in Germany.

Its a wonderful connected world.

But our communities and institutions have not yet adapted to this new reality. They still reflect a local constrained horizon based on the limitations of paper mail delivery, slow trains or boats. On the mindset where reaching out could take days, weeks or even months. Where the impact of local affairs on individual’s horizons used to be strong, and where local affairs did not affect the horizons of others elsewhere.

But that is no longer true.

No longer is a demonstration in Turkey which affects my Turkish friend’s safety, a building collapse in Bangladesh that affects my local T-shirt shop, or a madman running North Korea that affects my family in Japan, no longer are these things that do not affect us elsewhere. The people impacted by those events in those places reach out and touch other people in other places who care about them. The ripples of these local events are felt globally.

Think about it. Almost nothing we buy these days is made locally. It’s made elsewhere, with components from even farther afield and shipped to us.

Almost no-one we reach out to these days is local. They live and work all over the globe, and yet we still interact with them every day as if they were close by.

So, if people and products are global, why do we still have to deal with artificial horizons created by these institutions? Borders, nationality, roaming, passports, different local rules, barriers and tariffs, localized politics and localized interests all combine to try to constrain our horizons, to recreate them. Because of these antiquated and artificial horizons, bigger picture issues do not get addressed. Global warming, global disease, global hunger, global access to education are all being ignored. We depend on globalness for our people and our products, but we have no way of dealing with global issues.

Going back to the people I was in contact without horizons, many of them cannot just get on a plane and come and visit or live in New York. They need “permission” in terms of visas. Their mobile phone calls still go via their own countries even when they are not in them and the call is to down the road. Their money and buying power is different even though the products are exactly the same. These are all artificial, and unnecessary, horizons. On the Internet we’re all equal, in the physical world, we’re hemmed in.

As individuals we no longer have horizons, and this is wonderful. We can talk and share and care with anyone anywhere at any time. As a group, we need to find ways to eliminate the artificial ones. Then we can all gather to tackle the big issues the way we do now as local communities, just bigger, without horizons.

Follow the author as @hiltmon on Twitter and @hiltmon on App.Net. Mute #xpost on one.

Images from The Noun Project, including some by Louie McPherson, Mark McRory, and Catia G.

Sharing Reminder Lists

Looking for a quick and easy way to share reminders with other people? Here’s how we do it.

My wife and I share a Reminders.app list called Groceries that we check on the way home. If there is anything on the list, we pop into the shop and pick it up.

Reminders.app is an Apple app included in iOS and the Mac that enables you to create lists, set reminder dates or reminder locations. It syncs via iCloud so reminders on any device are automatically distributed to all your other devices.

But, did you know that you can also share reminder lists between accounts? That’s how we share our groceries list between our separate accounts.

To share a list, start by logging in to your iCloud account at www.icloud.com and click on Reminders.

If you need to create a new, shared list, click the + at the bottom-left and name the new list. I just created Shared List. You could also, of course, share an existing list.

Then, click on the circular icon to the right of the list name to open the sharing dialog. Type in the email address of another iCloud user, then click Done. Note: You need to use the same email that they use when setting up iCloud on their devices.

Apple then sends an email that invites that person to share the list. Once they accept, the icon on the sharing dialog next to their name turns green and the data appears on their devices.

Whenever you add or change something on this list, it will now replicate to all your devices and all of theirs too. They can change the list too, and you will see their updates on your devices.

Pretty cool, huh?

Follow the author as @hiltmon on Twitter and @hiltmon on App.Net. Mute #xpost on one.

Google Analytics for Status Board Server Edition

Google has finally deprecated their GAPI interface which this used to talk to Google Analytics, sorry folks, it will no longer work. See the New Google Analytics for Status Board Server Edition for an updated version.

Dropbox went down today, and I found out when my Status Board stopped updating. This spurred me on to migrate my Google Analytics for Status Board scripts from Ruby and Dropbox over to server based PHP. Huge thanks to Carl Franzon for the starter code.

Warning: This version of the scripts requires PHP v5.3. It also uses a hacked version of the Google GAPI library that runs against the Google v2.4 API. The current Google API is v3, but that requires complex OAuth2 access, which is a pain in the gazoot to implement. Expect Google to deprecate the old API, probably tomorrow and without notice.

Quick Install Instructions

  1. Download the statusboard.zip file.
  2. Expand it in the root of your web server. It creates a statusboard folder.
  3. Edit each of the analytics_*.php files with your login and password.
  4. The URL to use in Status Board is http://<your-domain>/statusboard/analytics_<file>.php, replacing <your-domain> with your server domain name, and <file> with one of views (graph), hourly (graph) or pages (table).

You should get something like this (Yes, my follower count is still tiny. Yes, I live in New York, but I still use Celsius for weather.):

Details

There are four files in the archive:

  • analytics_views.php to present a graph of Page views, Visitors and New Visits for the past week for a site.
  • analytics_hourly.php to present the same data over the last 24 hours.
  • analytics_pages.php to show the top pages today.
  • gapi.class.php is required to access Google Analytics, but this one has been hacked to use the v2.4 API.

For each of the analytics_*.php pages, change the first few lines with your own information:

1
2
3
4
5
6
define('ga_email','hiltmon@gmail.com');
define('ga_password','i_aint_sayin');
define('which_profile',0); // The first profile
define('days_to_report', 7); // No of days excluding today!
define('ga_title','Hiltmon.com Stats');
date_default_timezone_set('America/New_York');

If you have more than one Google Analytics profile (i.e. more than one site), you may need to change the profile, with 0 being the first profile in your list. I also recommend setting the timezone to your server timezone so that you don’t fill your web logs with PHP errors.

Why choose these technologies?

  • I chose to use PHP, which I intensely despise, because that’s the language most likely to be enabled on your web host. As it is on mine.

  • I used the GAPI library because it works without OAuth. For now.

If you’d prefer a more modern and robust approach, stick to the previous Ruby and Dropbox workflow at Google Analytics for Status Board.

Follow the author as @hiltmon on Twitter and @hiltmon on App.Net. Mute #xpost on one.

Sanity Saver - Ticks and Crosses

Sanity Savers are quick tips that help you stay sane when using your computer.

I often create point form lists of things, whether planning a post or a coding sprint or a client activity. And to keep track of which points in the list are done and which will not be done, or what is right and what is wrong, I like to use and symbols.

I use them so frequently and am so lazy that even typing ,,tick and ,,cross TextExpander expansions are too much effort.

So I made them hot keys using Keyboard Maestro. ⌃⌘= gives me a and ⌃⌘- gives a . Anywhere. Anytime.

Update: As per the comment from Jimmy Hartingdon below, change the macro to ‘Insert Text by Typing’ if you want the clipboard to remain unchanged.

✗ Cool
✓ Nerdy
✗ Fashionable
✓ Fun

Batsu (罰) is Japanese for the ✗ symbol, meaning “wrong”, as in wrong answer (Wikipedia).

Follow the author as @hiltmon on Twitter and @hiltmon on App.Net. Mute #xpost on one.

My Mac Indie Writing Workflow

Over the past few years, I have been writing more and more on my Mac, whether it be single blog posts, blog series, systems documentation, knowledge bases and other articles. The best part is that all the tools I use are indie developed from all over the world, are amazingly great and way better than their mainstream counterparts.

In this post, I want to share the tools I use to write and why I choose them.

TL:DR:

Planning: nvAlt / Mindnode Pro

Before I write anything, I jot down what I want to say. I use nvAlt by Elastic Threads / David Halter and Brett Terpstra. nvAlt is a markdown focussed fork of Notational Velocity by Zachary Schneirov, and is the tool I use to capture ideas.

These start out as bunch of confusing point-form thoughts that I have rattling around. By writing them down, I get a feel for what I am thinking, what I want to say and what will get written, in what order. By writing and reordering these, I usually find out the point I want to make (or whether there is no point, and the post idea dies there). I often surprise myself as I think I am going to write about one thing, and land up writing about something completely different.

For more complex articles, I sometimes build a mind-map using MindNode Pro by IdeasOnCanvas in Germany. I got this idea from Gabe Weatherhead / MacDrifter’s post on Michael Schechter’s Writer Workflow. This allows me to see the structure of the post and reorder the thoughts into a more intelligent structure and flow. I did not do this for earlier series of posts, but I think the articles I do create after mind-mapping turn out a lot better.

Drafting: Ulysses III

This is a new addition to my Mac writing toolkit. I used to draft posts in nvAlt but hated how my notes and ideas got mixed up with my drafts. When the point form summary is finished, I like to flesh out articles in draft. Then let them simmer for a while and revisit them. This one has been simmering for over a month. I usually have 10-12 open drafts going at a time, and many of them never get published.

Before switching to Ulysses III, I tried using a folder for Drafts wherein I placed my draft files and edited them using Byword. But then I got confused between the draft and the final post.

Fortunately, Ulysses III by The Soulmen GBR in Germany came out at that time and I fell in love with the look and feel of it. I can see all my drafts in the left hand file pane, and do all my writing in the right. I love the fonts and colors that they chose, I love the ease of sharing the document directly into Byword, their markdown format works great and the ability to jump between drafts with ease. Ulysses III still lacks features such as search that make it compete with bigger writing tools like Scrivener, but it fits my drafting needs perfectly.

Single Post: Byword

Since almost all my writing is a single, less than one thousand word article, I write the final post using Byword by MetaClassy in Portugal. Since adding Ulysses III, I now create the post using my command-line tools, tune the markdown meta-data headers and then paste in the markdown from Ulysses III to start working on the final copy.

I think Byword is the best distraction free markdown editor for plain old writing, supported with a lovely set of keyboard shortcuts, a great markdown implementation and a gorgeous default theme.

In the case of a series of posts, I write the whole thing in Scrivener. But I still come back to Byword to focus and finalize each individual article.

Byword is so much part of my blog writing flow that I have modified Octopress to launch new blank posts in Byword. I have made only one customization to Byword, I use the excellent Cousine font from Google web fonts.

Long Form Writing: Scrivener

Once I realize that a post is going to be a longer form series, I switch to writing in Scrivener by Literature and Latte in England. It is, by far, the best tool for writing any long-form documentation, whether they be books, theses, scripts, knowledge bases or series of posts.

Scrivener enables me to write freely, then reorganize the writing into the different articles in the series. I would never be able to look at and manipulate the structure of a larger document in any other tool. It also allows me to keep the research and reference material with the document. It seems that every time I launch Scrivener I learn something new. And I want to write more.

Article Review: Marked

One of the best ways to review your writing is to send it to an editor. But since I do not have one of those hanging around, I find it best to look at it in another form. I guess I become typo and grammar blind after a while in the same tool, plus I really do like to see the balance and flow of the article in its finished form.

For that, there is none better than Brett Terpstra’s Marked app. Best of all, it works with both Scrivener and Byword brilliantly. I have Marked open on the right of my screen with Scrivener or Byword on the left. As soon as I make changes in the document, Marked updates and displays it as it would appear on the blog. Not only that, it scrolls to the latest change to I don’t need to hunt to get back to my review position after correcting.

I am also starting to use Marked for more than just blog post previews, such as creating documents on letterhead.

Article Art: Acorn / Napkin

I use Adobe’s Photoshop or Illustrator to create original art, for example for my TimeToCall application, but I find them too heavy and slow for quick blog use. For article art, I grab some screenshots from my iPhone or Mac and use Acorn to composite, add text, resize, trim and export the final art for the blog. Acorn by Gus Mueller at Flying Meat is quick to launch, easy to use and very powerful without seeming heavy.

For annotated blog images, I seem to be using Napkin from Aged & Distilled in Canada by the great Guy English and Chris Parrish more and more to capture screen images and annotate, then finalize in Acorn. I love the ability in Napkin to create zoomed callouts to highlight key features.

All Indie Apps

Until I started planning this post, I had not even thought that all of these programs are products of brilliant small independent developers, not major corporations. All of these products are a delight to use, the best in their class in my (humble / correct) opinion, and enable terrific productivity. Not only that, but all have amazing competitors also created by indies, so if the indie tools I choose don’t work for you, there are plenty of other great indie products that will.

It’s a great time to be a Mac user and writer with all this wonderful indie software out there.

Now I just have to figure out which tools I like on the iPad for writing, I have too many installed.

Follow the author as @hiltmon on Twitter or @hiltmon on App.Net.

Letterhead - Markdown Style

So I get this request yesterday to send a document on letterhead. You all may remember letterheads from back in the day when companies had professional printers print their fancy logos on fancy paper that you then ran through the “good” laser printer that then went into matching fancy envelopes and someone stuck stamps on and mailed them.

I thought that letterheads went the way of the dodo about the same time fax machines and US Mail both died out. I was wrong. It turns out, sometimes to make something “official” (whatever the heck that means) you need it on letterhead. And since it’s 2013, a PDF version is acceptable.

Now I could have just dragged a logo into a Pages document, added the letterhead text, written the document, manually formatted it, PDF’d it and emailed it. But since I am probably going to do more of these, I decided to integrate letterheads into my regular Markdown process.

For this to work, I needed a markdown file for the document, a logo image and a stylesheet. I already have a logo and a CSS stylesheet for rendering Markdown in Marked, which I use to generate business documentation from Markdown source in my preferred business style for all my client engagements. Look and feel, covered.

So the only difference between a letterhead version of a document and a regular document is the logo, a silly header and a silly footer.

No problem, I created these with Markdown using a smidgen of HTML code and plonked them at the top and bottom of my document. I then saved them as TextExpander snippets for when I need them again.

Preview in Marked. Print to PDF. Sent. Easy as Pie.

The letterhead document source in Markdown looks like this. Note that it contains my standard Markdown Metadata headers as well.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Title:          Sample Letterhead Document
Subtitle:
Project:        hiltmon.com
Author:         Hilton Lipschitz
Affiliation:    Noverse LLC
Web:            http://www.noverse.com
Date:           May 22, 2013

![](noverse-logo-160-40.png)
**Noverse LLC**  <span class="light">A New York Company</span>

# Sample Letterhead Document
22 May 2013

**Client Company Name**
Client Street Address
New York NY 10019

## RE: You need a letterhead?

Yadda yadda yadda.

More yadda yadda yadda.

<br/>
<br/>
<br/>
<br/>

**Hilton Lipschitz**
Noverse LLC
<span class="light"> **&middot;** +1 (917) 555-1234 **&middot;** www.noverse.com **&middot;** contact@noverse.com **&middot;** @noversellc</span>
<span class="light">--- My Office Street, City, State, Zip ---</span>

Notes on the markdown source:

  • There are two spaces after each line in the address and in the name block at the bottom. That way Markdown places them on different lines without creating paragraph gaps.
  • The <br/> lines are needed to create space for a signature which you used to use an instrument called a pen to scrawl your name in that space. For PDF letterheads, you can upload a signature image. But in this case, the recipient did not need the signature. “Official” but unsigned was weirdly fine too.
  • I like putting a subject at the top of things, such as in this case Sample Letterhead Document. In the 19th century, you used to put the title where the RE: You need a letterhead? is.

And the result, an “official” looking document while remaining in the Markdown Mindset. Sweet!

Follow the author as @hiltmon on Twitter and @hiltmon on App.Net. Mute #xpost on one.

The One-Person Product

Marco Arment, writing about David Karp, founder of Tumblr, in The One-Person Product. Not only is this piece well written, it is an amazing perspective of Tumblr from the inside. But, for me, the salient point and the highest praise in the piece goes to David Karp, the founder and visionary:

David has an impeccable sense of what’s best for Tumblr, and he doesn’t need anyone else telling him what’s best for the product. Many people, myself included, have tried to convince him to go different directions, and we’ve been proven wrong every time.

Tumblr is David, and David is Tumblr.

I don’t know of many founders (excluding Steve Jobs) whose people feel so strongly positive about their personality, vision, tenacity, forethought and skills to write something so wonderful like this. I do know a few, their vision is emerging brightly, and one day pieces like this will be written about them too.

However, I also know of many founders who love to think they are great visionaries, who think they are right all the time, who think they are the Jobs (and Karp’s) of this world and are most certainly not. They do not have the humility and laser focus needed for the product. They spend more of their time on making money, on self-promotion, in self-delusion and in making mysterious pronouncements that do not match reality, their business or their products. And their products and profits are showing the results of such a loss of true focus.

We can’t all be Steve Jobs or David Karp. But we sure can try to emulate their strengths.

Follow the author as @hiltmon on Twitter and @hiltmon on App.Net. Mute #xpost on one.

Is It Time to Change Tools?

To improve is to change; to be perfect is to change often.

Winston Churchill

Every once in a while I wonder if my programming tools, languages and platforms need to be changed. Maybe, just maybe, the software mix I use every day needs to be shaken up.

And then my mind starts spinning in circles.

As we all do, I find myself using the same languages and tools over and over again. The same programmer’s editor. The same color scheme and fonts. The same language for scripting. The same platform for web services. The same database. The same server applications.

I use them because they work. Actually, I really use them because I know them so well. They are proven, robust, easy for me to use, easy for me to deploy and easy for me to support. I have gone though the learning curves, fought with the quirks, dealt with the problems and emerged a master of these tools.

Spin.

But I sometimes do wonder: Is it time for a change? Maybe I do need to learn and master a new editor, new scheme, new language, new web platform, new database, new server, new everything.

The only way that we can live, is if we grow. The only way that we can grow is if we change. The only way that we can change is if we learn.

C Joybell C.

But the question then is which new things to learn and tackle? My programmer’s editor is still modern, fast and reliable. My scripting language is still popular and works great. The web platform I use is robust and has just been updated to a whole new version. And I switched to the database I use these days only three years ago.

Spin.

So maybe I don’t need to change. The languages and tools I use these days are still at or near the top of their game. A glance at the competitive space for each area shows a few promising new technologies, a few stable similarly aged technologies and a bunch of older ones, but none stand out as “the next big thing” yet.

Spin.

But I don’t want to miss or be late for “next big thing” wave. And I fortunately do have the time to learn new stuff. But what to learn? What to change?

And what to change to?

Change Simply for the Sake of Change Is an Abdication of Leadership.

John Luke Jr

Is change for the sake of changing good or no good? John Luke Jr believes it is not good, a sign of bad leadership. Freek Vermeulen, Phanish Puranam, and Ranjay Gulati in the Harvard Business Review’s Change for Change’s Sake disagree, they view it as a good thing, a sign of good leadership. Both great sources of advice, and yet completely contradictory. Not helping!

Spin.

Maybe, thinking more on it, I need a real arguable reason to change? A stand-out “this is amazing and much better than what I use” reason to change?

Looking back, it was arguable need that caused me to switch from stagnating Perl to growing Ruby years ago. From Apache to Nginx to get more workers and throughput on the same hardware. From ASP.Net to Ruby on Rails for platform independence and development speed. From MySQL to PostgreSQL for better write performance and large data management.

Spin.

But what if I change and land up with the “wrong” platform? Marco Arment wrote about his trusty PHP when looking to make his own change:

The fear of making the “wrong” choice actually makes the familiar, mastered PHP more attractive.

Spin.

Or, maybe it’s not tools, just a timing issue? Is it time for the next change? Even though there seems to be no reason to do so just yet. Do I need to shake things up a bit right now?

I honestly don’t know.

In this specific case, maybe T. Bert Lance is right (even though I do not believe this maxim):

If it ain't broke, don't fix it.

Thomas Bertram Lance

Spin.

And so the thinking, spinning and search continues.

Until I find the “right” new things for me, I’ll stick with what I have. But I’ll keep looking, keep checking things out.

My next project will be a trusty Rails project on a trusty Linux platform using my trusty Nginx setup against trusty PostgreSQL. And my next script will still be in trusty Ruby. And I’ll still program it all using trusty TextMate 2 with my familiar CombinedCasts theme.

Follow the author as @hiltmon on Twitter and @hiltmon on App.Net. Mute #xpost on one.

Every 'the Best Programmers Editor' Review

I read a lot of programmer’s editor reviews and see a lot of arguments about which is best. Yet, essentially, they all do the same thing, help you program the way you want to. So here is my review of your favorite programmer’s editor for the Mac.

Choose your Editor: TextMate 2 | Sublime Text 2 | BBEdit | Chocolat | Vim | Emacs

My EDITOR Review

EDITOR is by far the best programmer's editor ever.

Me Now

Here’s why.

EDITOR contains all the basic features you would expect from a good programmer’s editor, such as syntax highlighting, code folding, block selection, brace matching, and support for almost every programming language out there. It also supports multiple file encodings, different line ending conventions and, of course, has multi-level undo.

You can save and use your own code snippets within EDITOR. And you can create and run your own macros in EDITOR to increase your efficiency. And one of the best features is that there is an extensive library of bundles on the internet to extend EDITOR’s feature set to do anything imaginable.

EDITOR is blazingly fast to load and use. Much faster than any IDE. Plain text and regex search and replace are but a keystroke away and very quick. And navigating between files in a project or within a file is simple.

The UI is streamlined and does not get in your way. Which makes EDITOR a beautifully simple product. Of course, you can customize the font, spacing and theme to your desire.

Like all such tools though, there is a learning curve. There are only a few keystrokes a beginner needs to learn to get going. But once you have mastered EDITOR extensive keyboard shortcuts, you can do anything in it without reaching for the mouse.

Look, I am most productive in EDITOR. All the commands and features I need are available at a keystroke. And I have the muscle-memory to ensure that I can program at peak efficiency when I use EDITOR.

So I highly recommend you use EDITOR as your primary programmer’s editor. I cannot imagine programming without it.

Follow the author as @hiltmon on Twitter and @hiltmon on App.Net. Mute #xpost on one.