TransFS Blog / Archive RSS Feed

Archive for the ‘git’ Category

By josh

We use a lot of git submodules at TransFS.com. Nearly all of our rails plugins are installed via submodules, as is rails itself. This works very well for keeping multiple repositories synced up with each other……. when it works. The biggest problem with git submodules, in our experience, is that they don’t automatically stay synced up when you pull or checkout different branches. Consider this scenario:

  1. I make a change to our funnelcake plugin, and push that change to the github repo
  2. I then jump back to our main TransFS repo, and commit the updated funnel_cake submodule
  3. I push that change to the TransFS repo… and call it a day
  4. Later that day, one my fellow developers pulls the latest code from github
  5. He forgets to run “git submodule update”
  6. He codes away, commits, and pushes his changes back to github

Now we have a problem… because the latest changes from my colleague have bumped the funnel_cake submodule backwards to its previous state. So, even tho the funnel_cake repository has newer code in it, we’re pointing to the submodule commit hash with the older code.

The best trick we’ve found for solving this problem is simple: use a git alias for all pulls and checkouts. Here’s what I added to my .gitconfig:

[alias]
        pullup = !git pull && git submodule update && git status
        checkup = !sh -c 'git checkout $1 && git submodule update && git status' -

Now, I can run:

git pullup transfs

instead of:

git pull transfs

… I can ensure that my submodules will be updated properly (and also get a handy stat of the repo at the same time)

Same thing with:

git checkup new_fancy_branch

instead of:

git checkout new_fancy_branch

It seems to work well! Now if we could just get everyone to remember to use these commands…
Do you have any good tricks for avoiding these problems with git submodules?

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Reddit
  • Twitter

By josh

One feature that is lacking from Github is the ability to get a unique RSS feed of your project updates. They offer a firehose feed of all project updates that you follow/fork… but this isn’t very useful for keeping track of a specific project. The signal-to-noise ratio is just too high.

However, I was browsing the Github support site to log a ticket… and I came across this gem from the Github devs: FeedSifter.

FeedSifter is one of those extremely simple little web apps that is tremendously useful in the right circumstances. You can put in your firehose feed, and some filtering parameters, and FeedSifter will give you a new feed url with only those posts that match your filters.

Pretty cool! This is especially useful if you are using Github’s new Issue Tracking functionality… since they don’t yet offer a good way to keep up-to-date on issue changes.

At the rate Github moves… I’m sure it won’t be long until we have built-in, better ways to track project information. But in the meantime, Feedsifter does the trick.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Reddit
  • Twitter

By josh

One of the biggest problems we face at TransFS.com is that we have a fairly complicated customer conversion process.  This is something that we have been struggling with since we launched, and we are always looking for ways to improve and streamline the user experience.  We want to make it as easy as possible for visitors to become users, and for users to become converted customers.  More broadly: we want to make it as easy as possible for business owners to start an auction and save money on their credit card processing services.

With that goal in mind, we are constantly making improvements to various points in our “sales funnel”.  Removing steps in the process, cleaning up the UI, providing better information, or adding reminder emails… all of these are tremendously important in improving our conversion rates.

Equally important, however, is measuring the impact of the changes we make.  Most web analytics tools have some basic functionality for tracking “goals”, and Google Analytics even offers a funnel view of your data.  However, we have yet to see a web analytics solution that really offers us the granularity and control that we want.  It can be tricky to track events that are not tied to actual user pageviews, for one thing.  But more importantly, Google Analytics (and the others as well) don’t provide very good tools for diagramming the whole customer experience funnel, from beginning to end.

So, after months of wishing that we had a better solution for this problem… I finally bit the bullet and developed one in-house:  FunnelCake.  FunnelCake is a Rails 2.3 “engine” plugin, designed to drop seamlessly into an existing app and provide visitor & user tracking, analysis, and visualization.

It is very new… and we’re just beginning to test it out on our site, but I think that it has the potential to give us the data that we want, the way we want it.

There’s a ton of information in the FunnelCake ReadMe on Github, so I won’t go into the technical details here… but check it out and let me know if you like what you see.  I would love to get some opinions on how to make it better.  Even better… fork away and send me your changes!

An example of a sales funnel visualization with FunnelCake

An example of a sales funnel visualization with FunnelCake

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Reddit
  • Twitter

By josh

I recently began a new effort at TransFS that involves a good amount of Objective-C coding. Yes, we are working on an iPhone application… more on that soon, should be exciting.

As part of this new project, we need to be able to process transactions via Authorize.Net. In the rails world, there is an excellent plugin for processing credit card sales called ActiveMerchant. It is very mature and has support for nearly every kind of authorization gateway you could imagine. The plugin is open-source (of course), and is used by hundreds of production websites.

You can find the source repo here on Github via Shopify, who created it as an extraction from their in-house code. What an superb contribution they made to the community!

Unfortunately, the Objective-C and iPhone development community is still relatively young, and no such plugin (or Framework, as they are called in XCode-land) exists.

Enter ObjectiveMerchant

Today I’m announcing a new open source project, sponsored by TransFS.com, to port ActiveMerchant over to Objective-C. The project is already underway, and about a quarter of the code has been ported so far… but there is a long way to go still.

The goal is to create a reasonable facsimile of the ActiveMerchant code, replicating as much of the class structure and patterns as possible. If we succeed, then it should be very easy for someone who is familiar with the ActiveMerchant plugin to move over to iPhone development and get started with ObjectiveMerchant. Initially we’ll probably try to support the Authorize.Net and Paypal gateways, but it should be relatively easily to fill in the full list over time.

A key challenge in this project will be to develop good unit tests for the ObjectiveMerchant framework. I am hoping that I can write OCUnit tests based on the existing tests in ActiveMerchant, but the differences between the two testing frameworks might make that difficult. TDD is not nearly as prevalent in the XCode world, so this is trickier than I would like. Any suggestions on how to improve the testing of this new library would be greatly appreciated.

If you are interested in helping out with this effort… fork the repo and contribute!

I’ll be posting more info here as the project matures, and hopefully within a week or so it will be at a stage where I can show off some working payment authorizations. Until then, spread the word if you find this interesting… Thanks for reading!

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Reddit
  • Twitter

By josh

We at TransFS use git for our source control… and we love it.

Why? I could list a bunch of great reasons here, but you should visit whygitisbetterthanx.com instead.

However, if you aren’t using GitHub… then you aren’t really tapping into the power of open source git goodness. GitHub has changed the way open source software evolves, making collaboration and participation MUCH easier. Check out my profile if you like!

Lastly… I just discovered a handy git trick that I thought I’d share. Found on this nice cheatsheet:

Add the following to your ~/.gitconfig to get colored diffs and git status output in the console:

[color]
branch = auto
diff = auto
status = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan

Pretty cool!

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Reddit
  • Twitter