Creating a Datasource with FreeTDS and unixODBC

In a couple of previous posts I’ve been working up to using Python to talk to SQL Server from Linux. There are a few moving parts involved so I’m documenting as I go.

Thus far I’ve done the following:
  1. Installed unixODBC
  2. Installed FreeTDS
  3. Installed pyodbc
  4. Installed pymssql
Note that pyodbc and pymssql accomplish the same thing in slightly different ways, and I’ll document both as I get those set up.
To put the first two items above in perspective, unixODBC provides the underpinnings for the ODBC API on Unix/Linux platforms. unixODBC does not, however, provide what you need to talk to specific databases. For that you need ODBC drivers for each database with which you wish to communicate, which is where FreeTDS comes in.
FreeTDS is an implementation of the Tabular Data Stream protocol, which is the protocol used by SQL Server (and Sybase), and FreeTDS includes ODBC libraries that you can install in unixODBC. So when you put these two pieces together, you can talk to SQL Server from Linux over ODBC.
If you were following along with the previous couple of posts at this point you’d have unixODBC and FreeTDS installed, but FreeTDS hasn’t yet been installed as a driver in unixODBC, which is what this post will cover. I found a lot of dated information out in the interwebs so hopefully this will bring things more up to date. Specifically I’m doing this on Ubuntu 12.04, so beware that the specifics of where things get installed on other distros might differ slightly (find | grep is your friend!).

Installation

Installation basically involves creating a template file for FreeTDS that we can read into unixODBC to install FreeTDS as an available ODBC driver, and then running odbcinst to install the FreeTDS driver in unixODBC.
  1. Open up a terminal and navigate to /etc/ODBCDatasources
  2. Using vim or whatever editor you prefer, create a new file. It can be called anything; I called mine tds.driver.template since that’s the name I saw someone use in another post about getting this set up.
  3. Type the following into the newly created file and save it:
    [FreeTDS]
    Description = FreeTDS v0.91
    Driver = /usr/local/lib/libtdsodbc.so
  4. Install the driver into unixODBC by running the following command:
    sudo odbcinst -i -d -f tds.driver.template
After running that final command you should see something like this:
odbcinst: Driver installed. Usage count increased to 1.
    Target directory is /etc
If you get an error — the one I ran into was “odbcinst: SQLInstallDriverEx failed with Invalid install path” — double-check everything and make sure to run the odbcinst command as root. I originally wasn’t doing sudo which is why I got the error I saw, but when I ran the command with sudo it went away and the driver was installed.
For an extra warm fuzzy you can have unixODBC list the installed drivers:
odbcinst -q -d

Creating a Datasource

As you might be familiar with from the ODBC of the Windows world, you can pre-define ODBC datasources to easily access the datasource via an alias instead of providing all the connection details when you wish to connect.
Let’s go ahead and create a datasource pointing to a SQL Server database so we have that in place for future use from Python.
Again in the /etc/ODBCDatasources directory, create a new file for your datasource. You can call the file whatever you want; I called mine dsn_foo
In that new file enter the following, adjusting according to the server and database to which you want to connect:
[foo]
Driver = FreeTDS
TDS_Version = 7.2
Description = My foo datasource
Server = my.sql.server
Port = 1433
Database = foo
Couple of points about the datasource configuration file:
  • [foo] at the top is the alias/datasource name by which you’ll refer to the datasource when you want to connect to it
  • Driver = FreeTDS is obviously referring to the FreeTDS driver alias that was created in unixODBC in the steps above
  • TDS_Version is dependent upon the version of SQL Server to which you’re connecting. 7 is for SQL 7, 7.1 is for SQL 2000, and 7.2 is for SQL 2005 and 2008.
  • Concerning the Server setting — I read some references to using Servername instead and providing the alias created in freetds.conf file, but other sources explicitly said NOT to use that. I stuck with Server and provided a host name since that works.
  • The rest of the settings are self-explanatory, but there’s a list of all the configuration options available in the FreeTDS User Guide. Note that some settings I’m using in my examples work even though they differ from what’s listed in the guide.
  • From my testing you cannot include the username and password in the datasource configuration file. Obviously that’s a balance of handy vs. security concerns anyway. Some examples show including it but according to my testing as well as the FreeTDS documentation you have to provide the username and password as part of the connection string as opposed to storing it in the configuration file.
Save that file, and then install the datasource in unixODBC:
sudo odbcinst -i -s -l -f dsn_foo
If it installs successfully in true *nix philosophy you’ll see nothing as a response to this action. If like me you like verifying things worked, you can list the datasources installed in unixODBC:
odbcinst -q -s
If you see your datasource listed, it’s installed.
You can also check out what unixODBC puts in its configuration file based on your installation by looking at /etc/odbc.ini

Testing the Datasource

The final step in this process is to run a query against the datasource to make sure everything’s working, and we’ll do that using the isql tool that’s included with unixODBC.
In a terminal run the following:
isql foo username password
In the command above foo is the datasource alias, and then as outlined above you do have to provide the username and password since they aren’t included in the datasource configuration itself.
If everything’s in order you’ll get a SQL> prompt and can run SQL statements against your database.
We’re getting closer to our final goal, running SQL statements against SQL Server from Python! I’ll cover that in my next post.

FreeTDS Quick Start

This is the first of a couple of follow-ups to my last post which covered how to install pyodbc on Ubuntu. The ultimate goal here is to be able to use Python (my new development weapon of choice) to communicate with SQL Server from GNU/Linux (specifically Ubuntu).

Part of this equation is to install FreeTDS, which is a set of C libraries that facilitate talking to SQL Server from Linux. I’m still wading through both pyodbc and pymssql but from what I can tell thus far both these solutions use (or can use) FreeTDS. (Random aside: if you’re familiar with jTDS that’s a Java implementation of FreeTDS. And another fun fact, TDS stands for “Tabular Data Stream,” which is the protocol used by the native SQL Server client from Microsoft.)

Installing and using FreeTDS is simple enough but I figured I’d take notes for my own reference and share in case they help anyone else wanting to set this up.

Installation

If you’re familiar with compiling and installing things from source on Linux there’s nothing new here, and if you’re not, this will show you just how easy this is.

First, download FreeTDS by clicking on the “stable release” link on the right-hand side of http://freetds.org, extract the tar file, and in a terminal, navigate to the directory to which the files were extracted.

Next, type the following three commands, hitting enter after each one:
./configure
make
sudo make install

You’ll see a ton of stuff being spit out to your terminal as you do this, but unless you see actual error messages that cause the execution of any of this to abort, that’s all there is to it.

You can test the installation and get some information about the compile settings, etc. by typing this in a terminal:
tsql -C

With FreeTDS installed, now you just need to add some information to a configuration file to provide details about the servers and databases to which you wish to connect.

Configuration

In your terminal, navigate to /usr/local/etc/ and in that directory you’ll see the file freetds.conf Open that file in vim or your favorite text editor (note that you need to open the file using sudo).

The file contains some global settings and a couple of sample server entries, and you’ll just be adding a new section to this config file.

At the bottom of the file add the following information, adjusting as appropriate with the connection information for your server and database.

[foo]
    host = my.sqlserver.com
    port = 1433
    tds version = 7.2

A few notes about these settings:

  • The [foo] in brackets at the top can be anything you want. That’s simply an alias for these configuration settings, and we’ll see how this is used in the “testing” section below.
  • The host is the host name or IP address of the server
  • The port is (obviously) the port number. By default SQL Server uses port 1433 but of course change accordingly if you’re running on a non-standard port or using a named instance (which under the covers is just a port).
  • The tds version setting is specific to the version of SQL Server (or Sybase) to which you’re connecting. Use 7.0 for SQL Server 7, 7.1 for SQL 2000, and 7.2 for SQL 2005 or 2008 (full details about TDS versions).

The FreeTDS docs have more details about the configuration file, including some additional settings you can include in the configuration file.

Testing

With your configuration file updated and saved, you can test your settings using the tsql utility that is installed as part of FreeTDS.

In a terminal enter the following:
tsql -S foo -U username -P password -D databasename

Notes about these flags and values:

  • The -S flag for the “server” is referring to the alias you created in the configuration file above.
  • -U is the user name and -P is the password for the database to which you wish to connect.
  • -D is the database name you wish to use after connecting to the server. If you don’t provide a database name, it will connect to the default database for the user.

After you connect successfully you should see this prompt:
1>

At that prompt you can enter and execute SQL statements against the database to which you connected.

More information about the tsql utility can be found on the “Confirm the install” page of the FreeTDS web site.

Errors and Troubleshooting

I personally didn’t run into any issues in setting up FreeTDS that couldn’t be chalked up to user error due to a lack of willingness to RTFM on my part.

That said, I just installed everything on a new machine this weekend and I do get an innocuous error after connecting to SQL Server:
Error 100 (severity 11):
    unrecognized msgno

At least I’m assuming it’s innocuous since everything seems to be working, and unfortunately I couldn’t find any additional information about this error (though admittedly I didn’t hit up the mailing list yet).

Getting More Information

FreeTDS is an extremely well-documented project, so be sure and take advantage of the User Guide, which has a wealth of information about using FreeTDS in various programming languages, troubleshooting, advanced configuration, and more.

That’s pretty much it for FreeTDS. Next time we’ll bring pyodbc and pymssql back into the picture and start running some queries against SQL Server using Python.

Installing pyodbc on Ubuntu

If like me you have to begrudgingly talk to SQL Server on occasion, but you want to do so from Python on Ubuntu, you’re in luck. As I’m finding is true with most things in the Python world there’s a module to suit your needs.

Where SQL Server is concerned there are actually two modules available, pyodbc and pymssql, and I’m going to try both of these out to compare and contrast. In theory pymssql should be faster since it doesn’t use ODBC, but pyodbc seemed as good a place as any to start.

Installation is simple enough in theory — download the source zip and run:
python setup.py build install

On Ubuntu, however, you may run into an error or two due to missing libraries. Thankfully this is also quite easy to fix.

The specific error I ran into was:
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]

The fix is to install the unixodbc libraries as well as the python-dev libraries:
sudo apt-get install unixodbc-dev unixodbc-bin unixodbc python-dev python2.7-dev

With those installed the build and install for pyodbc works.

Next up is actually using pyodbc to talk to SQL Server, so expect a follow-up post relatively soon.

Pidgin, SIPE, and Read Error on Ubutnu 12.04

I think I may have posted about this before but I couldn’t find it, so since I was doing a clean install of Ubuntu 12.04 on one of my laptops this weekend I figured I’d write it up again.

If you’re on Ubuntu 12.04, you use Pidgin (which you should — Empathy sucks), and you need to connect to MS Lync (formerly known as Office Communicator), thankfully you can simply install the SIPE plugin for Pidgin:
sudo apt-get install pidgin-sipe

In my case I also had to specify this as the User Agent to get it to connect:
UCCAPI/4.0.7577.314 OC/4.0.7577.314 (Microsoft Lync 2010)

There’s one additional wrinkle on Ubuntu 12.04, because even after installing the SIPE plugin and setting the user agent, you may see “Read error” when you try to connect.

You’re never alone on the Internet — other people have run into this too, and the solution is simple enough, but since I didn’t want to have to do that every time I launched Pidgin I put that in a bash script and changed the Pidgin launcher to point to this script.

You can put this anywhere so long as it’s executable, but here’s the script:
#!/bin/bash
export NSS_SSL_CBC_RANDOM_IV=0
pidgin

I feel like a bad nerd by admitting that I have no idea what that does and didn’t take the time to look into it since it solved my problem, but there’s the solution that works for me.

Notes on Practical Django Projects (Part 1)

I’m currently making my way through Practical Django Projects by James Bennett and thought I’d share some notes and errata as I go along. (Side note: If you want a paper copy of this book, it’s dirt cheap at abebooks.com; just make sure to get the second edition which was published in 2008).

I’ve done a small amount with Python here and there in the past (writing some scripts to handle very specific tasks or that used libraries available in Python that were better than what’s available in Java) and always really liked the language, but I haven’t ever looked into building webapps with Python until now.

So far I’m quite impressed. Having worked with Grails a little in the not-too-distant past I’m finding Django to be similar conceptually but a little simpler, and it seems to be extremely well thought-out and strike an excellent balance between forcing a convention on the developer and requiring just enough to configuration to maintain a lot of flexibility.

I’ll save a more thorough review of Django for a future date when I have it under my belt better, but for now I wanted to point out a stumbling block I hit due to a minor lack of specificity in the book.

For those of you even less familiar with Django than I am, Django operates on the concept of a high-level project and within that project are one or more applications. Conceptually this is similar to what other frameworks might call a module, or kinda-sorta-but-not-completely like a Grails plugin. The point is that Django projects are built of multiple modular building blocks, which is a really great way of organizing things.

On my machine I’m building all this stuff in a ~/djangoprojects directory, so inside there I have a cms directory for the simple CMS that you build as one of the projects in the book. So ~/djangoprojects/cms is the project directory, and inside that directory is a cms directory (so ~/djangoprojects/cms/cms) for the CMS application that is part of this project.

This is the way it should be, I believe, since you first run a script to create the project, then navigate into the project directory and run another script to create the first application that will make up the project. (If anyone with Django experience reads this and what I’m saying here isn’t accurate, I’d love to be corrected so I can learn.)

Beginning on page 43 you add a search system to the CMS, and following the modular convention you start things off by running the startapp script from the project directory.

On page 43 it reads:

So let’s make this into its own application. Go to your project [emphasis mine] directory and type the following command: 

python manage.py startapp search

The problem is the book gets the terminology a bit wrong (based on my understanding of the terminology thus far at any rate) and this leads to an error which took me a little time to track down, probably largely due to my newbness with Django.

As directed I went into my project directory and created the search application, which means I wound up with a cms directory and a search directory at the same level in the project (which again, I believe is how it’s supposed to be), so specificially I have these directories:
~/djangoprojects/cms/cms
~/djangoprojects/cms/search

Later you add a URL pattern to the project’s urls.py file to tell Django what URL route you want to use to hit the search application:
(r’^search/$’, ‘cms.search.views.search’)

When I ran the code, I was getting the error “ImportError at /search/ No module named search”

Note the path to the search application in the URL pattern above: cms.search.views.search

I probably should have noticed that right away since that indicates the search application would be inside the cms application, but since I created search in the project directory instead of the cms application directory, a simple change to the URL pattern to ommit the cms. at the beginning fixed the problem:
(r’^search/$’, ‘search.views.search’)

As I said above all of this could be my own misunderstanding, and maybe the cms and search applications aren’t supposed to be siblings, so if someone comments with a simple “you’re wrong” that’s a great way for me to learn. I did notice that Phil Gyford who was nice enough to put his completed source for the book online got it “right” so might just be me.

I’ll share more notes/thoughts as I make my way through the rest of this (so far) excellent book, and if you have questions about any of this or thoughts you’d like to share about Python and Django I’d love to hear them.

The ColdFusion/CFML Discussion: We’re Finally Getting Somewhere

I’m sure by now you’ve seen Joe Rinehart’s “Dear John” video to ColdFusion, and Mike Henke has a funny and I think (as I’ll explain in detail below) very pertinent response video.

I won’t rehash everything that’s been said there as well as in the various discussion outlets the past few days, but I did want to comment on the situation by saying this: after years of tiptoeing around I think we’re finally getting somewhere.

For me, I saw the writing on the wall for Adobe ColdFusion about 5 years ago, and I was already planning to jump ship at that point for numerous reasons. Many of my reasons were technical ones (and sadly haven’t changed in ColdFusion in 5 years), but another major reason was due to my firm belief in using free software whenever possible. All that combined with me doing a lot of open source work for a closed, proprietary platform led to cognitive dissonance I could no longer ignore.

Then in 2008 OpenBD was announced as a GPLv3-licensed fork of BlueDragon. This came at exactly the right moment for me because it meant I could keep using CFML but run it on a completely free software stack.

The release of OpenBD also addressed one of the other major issues I had with ColdFusion: After seeing how free software projects are run, the level of interaction between users and developers, the ability for community members to contribute and have a direct impact on the future of the project … none of that was true with ColdFusion. I simply couldn’t keeping using and supporting something that didn’t work this way.

I quickly switched over to OpenBD and haven’t looked back. We have a couple of ColdFusion 8 servers running some apps that don’t need much attention, but we moved the majority of our applications to OpenBD (99% without issue, despite anything you’ve heard about switching engines being difficult). As our legacy (and I do mean legacy — some of these apps are 10+ years old) ColdFusion apps need updates they’re moved to OpenBD, and all of our new development is done on OpenBD. We deploy our projects as WARs to Tomcat and life as a CFML developer has never been better.

I give you that background simply to point out that in my world, Adobe ColdFusion hasn’t had anything to do with my CFML development for a many years now, and I haven’t missed a thing. In fact I’ve gained a great deal, not just a faster engine with really compelling features Adobe CF still doesn’t have, but I’ve also been able to contribute directly to OpenBD in concrete ways with patches to the engine and building the admin console, not to mention the fantastic discussions on the OpenBD mailing list that lead directly to new features in the engine that are implemented in days, not years.

When I saw Joe’s video I realized I was watching it with the perspective of a disinterested bystander. He made some valid points, though as far as the installer goes “who cares” was my reaction since I think we’d all do very well to stop treating CF as if it’s an application server and treat it as what it is, which is a Java web application.

But honestly 99% of Joe’s complaints with CFML as a language are addressed in OpenBD and Railo. My reaction in a lot of cases was “they haven’t fixed that in CF yet?” but again, since I haven’t used the product for years now, it doesn’t impact me.

The major point I think Joe makes (and the one that Mike’s video makes at the end) that is tremendously pertinent to this discussion is the constant battle between “more stuff” — meaning new marquee features that demo well but don’t work for crap in the real world, or features no one cares about — vs. more, less marketing-friendly features like improved language syntax, removing the dead weight (which is hugely important), and other improvements the actual users of the product (i.e. the developers) want.

I’m glad this came up in this way because it gets to what I think is the heart of the matter: ColdFusion is a commercial product. How do you keep people buying commercial products year after year? By adding more “features.” We developers may think of better language syntax as a feature, but we’re not typically the ones with the checkbook, and == instead of eq doesn’t demo well to the suits with the money.

This is why ColdFusion is in the state it’s in, and is a great illustration of why when there’s a profit motive behind a software product of this type, you wind up with “features” that are bright and shiny and demo well to the people who don’t know any better, and you continue release after release after release to not get much in the way of the actual improvements developers need in order to keep using ColdFusion.

To be blunt, for a commercial product that’s been around for years ColdFusion should be much, much better than it is. The fact that it isn’t speaks volumes.

There’s a reason there are no other commercial products along the lines of ColdFusion in the world: because the market can’t support them. Allaire/Macromedia/Adobe got in early with enough customers to keep this going for a while longer, but there is a definite sense that they’re de-emphasizing CF as a product (I’ll stop short of saying they’re putting it out to pasture).

Based on discussions with other developers as well as my own recent experience, this “de-emphasis” is the story more and more people are hearing from Gartner these days. ColdFusion hasn’t fallen into the “Migrate” bucket of their “Invest/Maintain/Migrate” spectrum, but it’s getting there, and Gartner flat-out said on a call I was on just last week that they do not recommend starting new development on ColdFusion if you know it’s a strategic product you’re going to be maintaining long-term.

The bigger problem here is the increasing frustration of CFML developers. Once the community starts bleeding developers, impressing the suits or anything Gartner shows on a chart or graph won’t matter. If the suits can’t find anyone who knows the technology, and they’re hearing from analysts it’s not the way to go, they’ll move to something else. All the shiny new features in the world won’t fix that.

How this relates to the free software engines is also interesting, because the other engines have the albatross of Adobe CF compatibility around their necks. In many, many cases on the OpenBD side we look at how something works in Adobe CF and the only reaction a logical person could possibly have is “WTF,” and in other cases we have ideas for changes that would mean vast improvements in speed or functionality, but we’re saddled with remaining compatible with Adobe CF. It’s a continually frustrating fine line, and given the state of ColdFusion it’s one I’m personally seeing as less important to continue to walk.

I didn’t wind up where I thought I was going to when I started writing this, but my main point as I state in the title of this post is this: we’re finally getting somewhere with the discussions. For far too many years there’s been nothing but infighting, people forming camps, alliances, cliques, etc. and getting behind one engine or another, all to our collective detriment. Ultimately that’s counterproductive and wastes the incredibly limited resources we have as a community.

We also need to stop beating around the bush. I’m as guilty of this as anyone simply because of the vitriol I’ve had thrown my way over the years, particularly immediately after I quit as an Adobe Community Professional and joined the OpenBD Steering Committee. You start asking yourself if it’s worth the hassle to say anything.

But if I can’t state my opinion on things as truthfully and hopefully respectfully (without watering things down to the point of being meaningless) without getting a purely emotional reaction from people who choose to stick their heads in the sand, that’s their problem, not mine. Just because I don’t share your opinion doesn’t mean I’m spreading FUD, or being nasty, or anything along those lines. We all need to realize that unless we can have these sorts of discussions without screaming at each other irrationally we aren’t going to make any progress.

Regardless of our engine of choice we can all benefit from improvements to the CFML language and the underlying and supporting technologies, and I’ll say flat-out here that I don’t see any of those sorts of innovations — the kinds of innovations we as developers need — coming from Adobe. They by definition have completely different motivations and to keep CF going they need to make decisions for what from my perspective are all the wrong reasons. You don’t wind up with something that’s good for developers that way.

Look around the development world. There is not a single product remaining in the world in the same basic category as ColdFusion that you have to buy. Prior to the free software engines coming along, unless you count .NET (which is a completely different, possibly more subtle argument), CFML was the only pay-to-play language out there. (And please don’t say “Websphere” or anything along those lines — that’s not the same type of product at all. Adobe convinced us for years that CF is an app server. It’s not, and they’ve been trying to fool people into thinking it is for far too long.)

I’ve been in the CFML world now for a very long time. I’ve been hearing the “but CF pays for itself!” arguments for 15 years now. I even believed those arguments at one point and you know what? It doesn’t matter. We lost. That ship has sailed. We would do ourselves and our community a huge favor by not pretending those tired old arguments are still worth the breath it takes to utter them.

People don’t pay for this stuff anymore, nor should they. There are far, far too many excellent free software solutions in the world — many of which are rolled right into Adobe ColdFusion, by the way — for us to keep thinking we have some sort of lock on productivity or amazing features or whatever the hell other arguments we used to use to try and convince the naysayers. If we’re still talking that same old crap, it’s quite clear we’re only trying to convince ourselves at this point.

That’s not to say it’s all doom and gloom. I wouldn’t still be here if I didn’t think CFML was a great technology. I wouldn’t be writing this blog post, or be spending time on the Open CFML Foundation, OpenBD, Open CF Summit, and all the other CFML-related things I do if I didn’t think the language was worth perpetuating (OK, saving).

The bottom line is this: painful as all of this may be to hear for some people, we’re finally — after years and years of ignoring our problems — getting somewhere. Regardless of the outcome of all these discussions and any casualties that may occur along the way, that’s only a good thing.

If you’re thinking about “leaving” CFML as Joe did I can’t say I blame you. There are a lot of great tools out there and it’s in your best interest as a developer to try them. Adding more tools to your toolbox only makes you more aware of the broader scope of the technology world which is a great way to expand your skills and your mind, not to mention make yourself more marketable.

I love Groovy and Grails, and still use Grails from time to time. I’d be lying if I said I hadn’t thought about switching to Grails full time. There’s a lot of great technologies out there and a lot of very compelling reasons to jump ship. Some days sticking with CFML seems downright irrational in the face of all the arguments to the contrary.

But, something keeps us in the CFML world. Any one of us is more than capable of learning another technology, but we stick around for some reason, and for me that reason is even after all I’ve seen in the technology world, CFML is still after all these years a great technology for web development, and it still stands up pretty respectably against anything that’s come along in the interim.

Could it use improvement? Sure. What couldn’t? And that’s kind of my point.

Rather than dumping CFML for another technology, I’d hope people would get fired up and start asking how they can help improve CFML. If you have ideas about what you’d like to see in CFML the free software engines would love to hear them, and you’ll be surprised at how quickly many of these ideas would happen. If you’re happy with Adobe CF, great. Keep using it. But if Adobe CF isn’t giving you what you need, you don’t need to wait for Adobe to make things happen.

There’s no technical reason why anything that’s done in any other technology (within reason of course) couldn’t be done with CFML. All we need are the voices to guide CFML’s future and the will to make it happen.

The Big Migration: Moving From a Verizon Droid Bionic to a Galaxy Nexus on Straight Talk

Definitely a superlative title for what actually is a pretty simple process, but I thought I’d document what I’m doing to dump my Verizon Droid Bionic and move to an unlocked Galaxy Nexus phone. I’ll spare you my complaints about Verizon and just summarize by saying they’re beyond overpriced and I don’t like all the evil crap they do.

What is relevant to this discussion is the fact that I am sick and tired of having my phone be controlled by a carrier. From not keeping up with new versions of Android to forcing applications on my phone that I don’t want and can’t delete, I’m done with it. “Famous last words” may apply here, but at this point I’ll state that I will never buy another phone from a carrier.

It’s worth it to pay the extra money for a phone (and in the case of the Nexus it’s only about $100 more than I paid for my abandoned Droid Bionic) and have more control over the phone as well as choice of carrier. (Relevant Lifehacker article on this topic if you want to learn more about how the carriers are the driving force behind Android fragmentation and stifle innovation every chance they get.)

But enough about all that — here’s specifically how I’m going about making this switch.

First, I ordered a Galaxy Nexus phone since it’s the best bet on being able to upgrade the phone continually and since it’s unlocked, I have a choice of carriers (within the limitations of the phone being GSM of course).

I’ll keep my review of the Nexus phone itself brief and simply say: awesome. Thin, light, beautiful screen, ships with Jelly Bean, extremely smooth, fast UI, no crappy carrier/Motorola customizations I don’t want — simply a fantastic, fantastic phone that’s so good it makes me mad I didn’t get one a long time ago.

Next step in the process — I ordered a SIM from Straight Talk. One of my many major gripes about Verizon is I was sick of paying for a ridiculously overpriced phone plan when I’m on Wi-Fi the majority of the time. Straight Talk offers an unlimited everything plan for $45/mo with no contract. You buy the SIM for $15 and give them a credit card number to bill you for the phone plan, and that’s it. I’m already saving over $100/mo simply by changing to Straight Talk.

Straight Talk SIMs are either AT&T or T-Mobile. You do not get to choose, they choose for you based on your area (and I assume other business-related factors). I wound up on AT&T which is fine — I have AT&T for my work iPhone and the signal is great in my area. If I were able to choose I would have chosen T-Mobile, but of course with an unlocked phone if I really don’t like what’s happening with AT&T and Straight Talk I can always switch. So far AT&T is working very well and I actually see a stronger signal on the Nexus than I do on my contracted iPhone.

Both the SIM and phone were delivered today, and setup was extremely simple. You follow the instructions that come with the SIM to activate it, which basically involves filling out a form on the Straight Talk web site and giving them your billing information, then stick the SIM in the phone. By the time I got the SIM into the phone and powered it on I was already able to make calls.

Note that when you activate your SIM you have the opportunity to port your existing number to Straight Talk. I didn’t do that because I have a slightly different plan in mind (see below).

Next, to use the data features in the phone you have to enter a new Access Point Name (APN). Here’s how you add a new APN on the Nexus:

  1. Open “Settings”
  2. Under Wireless & Networks, click on “More …”
  3. Click on “Mobile Networks”
  4. Click on “Access Point Names”
  5. Click the three vertical boxes on the bottom right of the screen to bring up the menu, and click on “New APN”
  6. Enter the information included with your SIM
  7. Reboot
With the setup out of the way my Nexus is working great with a new phone number, and of course since all my contacts, etc. are associated with my Google account all that stuff magically appeared on the new phone.
I made the conscious decision not to port my number to Straight Talk. Instead, when I’m ready to cancel my Verizon account (and pay the punitive early termination fee — good riddance) I’m going to port my current cell phone number to Google Voice.
Why am I doing that? Again, it’s all about gaining more flexibility and control. Once my cell phone number is a Google Voice number I can change plans, phones, etc. underneath that and never again hassle with porting numbers between carriers. The abstraction of having the phone number not tied to a specific device will be quite nice, and then I can take full advantage of all Google Voice has to offer.
If you follow me on Google+ you know that I’m also a huge fan of Republic Wireless. I’m on one of the beta waves for Republic Wireless and am still very enthusiastic about what they’re doing (anything that disrupts the wireless industry is a good thing), so I will still be getting a phone from them when my wave comes up. Yes, I’m a gadget junkie, but I also want to support what they’re doing, and if it works exceptionally well since the Nexus is unlocked and I have no contract with a carrier, I can simply cancel my Straight Talk account and sell the Nexus on Swappa. There’s that flexibility coming into play again!
Hope that helps give people who’ve been considering this sort of switch more information to help with the decision making process.

TeraCopy: Unbelievably Great Windows File Copy Replacement

I don’t use Windows often but when I do, one of my major complaints is how absolutely abysmal the file copying process is, particularly when copying a large number of files, and especially when network resources are involved.

I suppose given how much it annoys me I should have looked into it sooner, but I was looking at the 2012 Lifehacker Pack for Windows which is a list of “must have” applications and utilities for Windows (they have lists for Linux, Android, and that fruit-related company’s junk as well), and one of the items in the Windows list is a utility called TeraCopy.

In short, if you ever have to use Windows go download TeraCopy right now. It replaces the native and horrendously crappy Windows file copy process, but it works so much faster and better it quite literally put a huge grin on my face (and I never smile while using Windows).

Not only is it lightning fast, but it lets you pause and resume copy operations and — GET THIS — logs all the copy operations that fail. This is fantastic because the native Windows copy process often chokes for no reason (or at least it doesn’t share the reason) and you have no way of knowing where it failed or what got copied and what didn’t, so you basically have to start over.

Enough gushing, just go grab TeraCopy right now and dramatically improve the Windows file copying part of your life.

Prerequisites for CFML on Tomcat Deep Dive at cf.Objective()

I just added the prerequisites for the Tomcat Deep Dive I’m doing at cf.Objective() this year to the session description page, but figured I’d summarize here as well in case people don’t notice it over there.

This is designed as a “bring your own laptop” session and we’ll actually be installing and configuring Tomcat, multiple CFML engines, and web server connectivity in the session, but it would be VERY helpful if you grab all the downloads ahead of time since the wireless can be sketchy at conferences. Also some of the downloads are large and that will not only eat up bandwidth but many hotels cut off downloads after they hit a certain size.

So here’s the short list:

  • Java. Not just the stuff that ships with ColdFusion if you already have that installed, but a plain old JDK. (Don’t worry, it won’t conflict with anything ColdFusion-specific you already have installed.) Java 7 should work but to be safe grab the latest Java 6 (which at the moment is 1.6.0_32).
  • Apache Tomcat version 7. Grab the .tar.gz for GNU/Linux or OS X, or the appropriate .zip for Windows. I’d say don’t grab the service installer for Windows for these purposes, but if you want to install Tomcat as a service on your machine that’s fine too.
  • OpenBD. Grab the “J2EE Standard WAR” (any version)
  • Railo. Grab the “Railo Custom – WAR Archive” (any version)
  • ColdFusion. Anything version 8 or above will work (probably even older versions), including the CF 10 Beta, but main point here is you need the actual ColdFusion installer. So if you have ColdFusion installed on your machine already and don’t have the installer, that won’t work. To use ColdFusion in this context you’ll be running the installer and generating a WAR file (and feel free to generate the WAR file ahead of time if you already know how to do this).
  • Apache Web Server, or if you’re on Windows with IIS 7 we’ll go over that as well. I won’t be discussing IIS 6, both because it’s horrendously more painful than 7 and also because it’s ancient. Note that Apache runs on any platform so even if you’re on Windows, or if you’re on Windows with IIS 6, grab Apache.
Hope to see you there! It’s going to be a lot of fun. Well, geek fun anyway.