The Right Focus

Too many times I see occasions where IT professionals are touting the newest technology, the latest tool, or the “cool” innovation.  Don’t get me wrong, I love new toys as much as the next guy, but I think all too often we focus on the cool at the expense of the important.  Innovation is vital to the success of our organization, but releasing the latest gadget is not always the best way to be innovative.  Sometimes using an existing tool in a new way, or to full potential, can provide the greatest innovation.

Lately I have determined that there are two areas where increased focus can lead to great things:

  1. Setting and meeting expectations
  2. Culture

When you set expectations, and then meet them, it provides a true opportunity to see where time is available, and where innovation may occur.  All too often we are reactive to the newest requested item.  Unlike some companies we have multiple technologies, tools, and customers we have to support.  It is easy to get lost in the “urgent” request/need.  When we set an expectation for how we handle “emergencies”, and how to manage projects, then we are able to be a proactive organization, not reactive.

Culture is more vital to the success of the IT organization than most people realize.  I have seen more traditional companies  scoff at tech companies who have a deep focus on culture.  In many cases these traditional organizations only see culture as a means to reduce pay or as a nice bonus.  What I have found is that focusing on the culture of the IT group provides a workplace where people are enthused about their work and feel empowered to make a difference.  Culture is not telecommuting, or time off, or even how projects are managed.  Culture is how we interact and work together to pursue a common goal.  It is how we empower employees to accomplish their work and feel a sense of ownership.

The new technology, the cool tools, are always fun and innovation can definitely come from something new.  I just see more and more that real innovation comes from the people you have and how you encourage their talents over any particular tool.

Presenting on Being a CIO

Recently I made a rather large transition in my career, I became a CIO. For years I have worked as a developer, team leader, and eventually Executive Director. When preparing to make the transition I did not think it would be tremendously different from my previous work. Although there are a lot of similarities, there are also a number of changes from my previous life.

In 3.5 weeks I will be speaking at the annual SEDUG conference about being a CIO in Higher Education. I hope to share information that might help others determine if they want to become a CIO, or how to better serve as a CIO in their organization.

When I think about the topics I want to cover, and how I want to present the information, I immediately think about a few topics:

  • Providing focus and leadership to your team
  • Three keys to success as an IT leader: collaboration, transparency, communication
  • Dealing with legacy decisions
  • Setting the right tone
  • Preparing to innovate

I am sure as the event approaches I will think of more topics to cover.  I am also sure that I will try to impart some of the great wisdom passed to me by amazing leaders and friends like Kevin Roberts (Abilene Christian University), Phil Komarny (Seaton Hill University), and David Kim (Central Piedmont Community College).

If you happen to be attending the SEDUG conference stop in and listen, heckle, question and we can all learn together.

Stripe Connect with Rauth and Django

I have been working on an application that needs to collect payments for multiple merchants.  After looking into various ways to accomplish this, I landed on Stripe and more specifically their Stripe Connect service.  Stripe Connect allows you to have access to your customer’s Stripe account in order to collect payment on their behalf.  You can then add convenience charges, and ensure that money does not transfer between multiple accounts but instead goes directly to the customer’s bank account.  All while still maintaing the flat transaction rate (2.9% per transaction as of this writing) with no monthly fee or merchant account requirement.

In order to use Stripe Connect a merchant must go through a Oauth 2.0 flow to authorize your service to access their  account.  On the Stripe website they show how to perform this basic authorization with urllib and requests.  This method works, but is a bit inefficient.  You will end up repeating things anytime you need to make an API call to Stripe or want to perform other actions.

Rauth (built on the awesome requests library) is a simple Oauth1, Oauth2 and Ofly consumer library.  It simplifies a number of the actions required to handle Oauth.  Getting rauth setup with Django and Stripe Connect is pretty easy.

Install Rauth

Initialize the Oauth2 Service

You will want to initialize an Oauth2 service for connecting to stripe.  You will want to set this up so that it is outside of a specific view but available to multiple views in your file.

There are other arguments you can pass to the service, these arguments provide the minimum required to make the connection and authorize via Stripe Connect.

Note: You should pull these values out into your settings file so that you are not hard coding client ids and secrets that may have to change at some point into your app.

Ask the User to Authorize you to use their Stripe account

Once you have configured the stripe service, you will need to generate a request to stripe to authorize your application.  This is a OAuth workflow that will be familiar if you have ever used Twitter of Facebook to authorize/login to another service.  To generate this request we will create a view that when called build’s a url with our client information requesting a authorization code.  The Rauth OAuth2Service will handle creating the authorization url and including your client_id and client_secret.

This will return a temporary code that is used to request a permanent access_token for connecting to stripe on a user’s behalf.  The return URL is specified in your Stripe Application settings:


Request the Access_Token

Once the user has authorized your application you will receive a temporary code that is used to request the access_token.  This will be returned to the callback URL specified in your Stripe application settings.  You will then need to make a raw_token post request for the access_token (due to the nature of how Stripe Connect returns the access_token payload, we will need to use the Rauth get_raw_access_token() function):

You now have authorization to make transactions on your clients behalf with Stripe.  In the above example you would NOT return to the page the access_token but instead want to save it to the database so that you can utilize the code to make payments in the future.

There are other ways to accomplish this same thing using urllib and requests directly, but Rauth definitely makes it a lot easier.  Having the Rauth service is also quite useful for additional api calls in other views and services and if you intend to use any other OAuth service in your application.

I make no claims that I have done this the perfect way, but it works.  Feel free to recommend improvements and leave feedback.


Sublime Text 2, My Winner in the Text Editor War

Just like any other developer, I have a certain setup for my development tools. I like for applications to run in certain spaces on my Mac, with certain dimensions and very exact configuration options (I am still mad at Apple for removing the ability to have a tile grid of spaces).

When it came to my code editor of choice, for a number of years I was a TextMate user. Unfortunately TextMate has all but died. Yes, I know there is TextMate 2, and it is open source. Plainly, it has not lived up to my expectations. So as much as I hated I did not want to, I made the decision it was time to find a new editor.

I tried a number of different options including: TextMate 2, Sublime Text 2, Chocolat, MacVIM, Coda, and PyCharm. After a lot of trial and error it really came down to two options Vim or Sublime Text 2. Why? Both keep editing simple, have good command line options, great plugins and a huge community.

Sublime fit my style of development a bit better. I liked the simplicity of the key commands coupled with the integration to the console and the incredibly easy package management (using Janus with Vim definitely makes Vim easier, but Sublime still took the cake). I was able to use my old textmate snippets and color schemes, while having a great variety of additional options from the plugin community. It feels almost like they took the best elements of textmate and vim and created something even better. In fact the biggest feature that all other non-Vim text editors missed and that I LOVE about Vim, multi-pane windows, I could do with Sublime. This made the decision, Sublime was my new text editor.

My Sublime Setup

When I first started using Sublime I had no idea how to configure it beyond basic text editing. The key to really unlocking the power of Sublime is to install the Package Manger. Installing package manager is quite simple, on your keyboard hit CTRL + ` to open the console (the tic above the tab key with the tilda). Then paste the following code into the console that appears:

Now you have the Package manger available and can open it by simply using COMMAND + SHIFT + P and typing “Install Package”. Once opened you can scroll through the MANY packages available. Here are the packages I most commonly use and what they provide:

  • Djaneiro – This provides a number of great snippets for common template, model and view commands and syntax highlighting for Django apps.
  • jsFormat – JsFormat is a javascipt formatting plugin for Sublime Text 2. It uses the commandline/python-module javascript formatter from to format whole js or json files, or the selected portion(s).
  • Angular JS – I have started using AngularJS for many of my front-end projects. This plugin coupled with Batarang for Chrome makes angular development a lot easier. It provides auto-completion of core AngularJS directives, such as ng-repeat, ng-click, as well as any custom directives you create.
  • Markdown Preview – Preview your markdown files quickly in you web browser from sublime text.
  • Sidebar Enhancements – Makes significant improvements to managing files and folders from the sidebar.
  • Sublime Linter – This little plugin helps to make sure I follow Pep 8 while also ensuring I follow proper styles for JS and HTML files.
  • Sidebar Git – I use git, we all use git, this makes managing and using git a little easier from the sidebar.

I am sure as I continue to use Sublime I will add more plugins that make life easier and improve my overall editing experience. The great thing about the package manager is that you can browser the plugins, install a plugin, customize the plugin through a config file (just like vim) and easily delete it if it does not work for you. It really makes it easy to explore and see how I can better improve my development workflow.

At the end of the day, I may have chosen Sublime, but I also am not a fanatic. I believe strongly that you should use whatever improves your workflow the most and fits your development style.

Random thoughts about technology, higher education, travel and other things I find interesting.