That Feeling of Liberation? It’s Git.
In the last few weeks, a few of us have been working on a project for Puppet involving several lines of concurrent development. We’ve relied extensively on the distributed nature of Git and the low cost of branching to facilitate this work. Throughout the process, I occasionally find myself pondering a few things:
- How do teams ever coordinate work effectively when their version control system lacks decent branching support?
- The ease with which commits can be sliced and diced and tossed about (merge, rebase, cherry-pick, and so on) is truly delightful
- It is not unreasonable to describe Git as “liberating” in this process: here is a tool with which the the logical layer (your commit histories) largely reflect reality, with which the engineer is unencumbered in his/her ability accomplish the task at hand, and from which the results’ cleanliness or messiness is the product of the engineering team’s cleanliness or messiness rather than a by-product of the tool’s deficiencies
The current process, in accordance with practices in use within the Puppet project itself, basically involves:
- One “canonical” branch in a particular repository, into which all work is merged by a single …
git
Messaging, Information, and Making Assertions About Stuff You Cannot See
My coworker/friend/distractobot Jon pointed me at this most interesting public HTML resource:
http://www.unlimitednovelty.com/2009/04/twitter-blaming-ruby-for-their-mistakes.html
We’ve done a fair amount of investigation in recent years of the free, open messaging field to try to identify the “best” free/open messaging solution. “Best” in quotes because, in software, the belief that one has found the “best” solution for given problem X often says a lot more about the person holding the belief than it says about the solution itself or problem X.
In a survey of messaging options done for a client last year, we determined (at that time) that ActiveMQ was likely a good solution for the client’s needs. For simple deployments/usage, setup is quite straightforward. There’s good cross-language client support (particularly thanks to native STOMP support). There’s positive feedback out in the community about ActiveMQ. It’s an active project that’s been making decent progress over the years. Etc.
But then the little horror stories pop up. You hear/read that ActiveMQ falls down in various situations. Without getting any visibility into the specifics, it’s impossible to know what the problem …
rails
OFFSET 0, FTW
A query I worked with the other day gave me a nice example of a useful PostgreSQL query planner trick. This query originally selected a few fields from a set of inner-joined tables, sorting by one particular field in descending order and limiting the results, like this:
SELECT <some stuff> FROM table_a INNER JOIN table_b ON (...)
INNER JOIN table_c ON (...) WHERE table_a.field1 = 'value'
ORDER BY table_a.field2 DESC LIMIT 20
The resulting query plan involved a bunch of index scans on the various tables, joined with nested loops, all based on a backward index scan of an index on the table_a.field2 column, looking for rows that matched the condition in the WHERE clause. PostgreSQL likes to choose backward index scans when there’s a LIMIT clause and it needs result sorted in reverse order, because although backward index scans can be fairly slow, they’re easy to interrupt when it finds enough rows to satisfy the LIMIT. In this case, it figured it could search backward through the index on table_a.field2 and quickly find 20 rows where table_a.field1 = ‘value’ is true. The problem was that it didn’t find enough rows as quickly as it thought it would.
One way …
postgres
Subverting Subversion for Fun and Profit
One of our clients recently discovered a bug in a little-used but vital portion of the admin functionality of their site. (Stay with me here…) After traditional debugging techniques failed on the code in question, it was time to look to the VCS for identifying the regression.
We fortunately had the code for their site in version control, which is obviously a big win. Unfortunately (for me, at least), the repository was stored in Subversion, which means that my bag o’ tricks was significantly diminished compared to my favorite VCS, git. After attempting to use ‘svn log/svn diff -c’ to help identify the culprit based on what I thought the issue might be, I realized that svn was just not up to the task.
Enter git-svn. Using git svn clone file://path/to/repository/trunk, I was able to acquire a git-ized version of the application’s repository. For this client, we use DevCamps exclusively, so the entire application stack is stored in the local directory and run locally, including apache instance and postgres cluster. These pieces are necessarily unversioned, and are ignored in the repository setup. I was able to stop all camp services in the old camp directory …
camps interchange git
On URL Shorteners and Selena FLOSSing
I just read an interesting article on the various downsides to URL shorteners. Let’s not break the Internet that way. I found the article on Hacker News, which I’d forgotten about—this is the Hacker News at Y Combinator, not the good ol’ but long-dead Hacker News Network formerly at hackernews.com.
In other news, our very own Selena Deckelmann appears in moving pictures at FLOSS Weekly 64! I haven’t even had time to watch it all yet.
open-source
Greg’s THREE talks at PostgreSQL Conference East this weekend
(Cross posted from my personal/postgres blog)
Greg Sabino Mullane will be presenting three talks at PostgreSQL Conference East this weekend in Philadelphia, at Drexel University. The talks are listed on the site, and here’s what he’ll be speaking about:
Bucardo
April 5, Sunday, 10amBucardo is a replication system for Postgres that uses triggers to asynchronously copy data from one server to many others (master-slave) or to exchange data between two servers (master-master). We’ll look at replication in general and where Bucardo fits in among other solutions, we’ll take a look at some of its features and use-cases, and discuss where it is going next. We’ll setup a running system along the way to demonstrate how it all works.
Monitoring Postgres with check_postgres.pl
April 4, Saturday, 2:30pmWhat should you monitor? And how? We’ll look at the sort of things you should care about when watching over your Postgres databases, as well as ways to graph and analyze metadata about about your database, with a focus on the check_postgres.pl script.
The Power of psql
April 4, Saturday 10:30amAll about everyone’s favorite Postgres utility, psql, the best command-line database interface, …
conference postgres bucardo
Google Base and Spree
Several clients I’ve worked with have integrated Google Base. I’ve always wondered how much Google Base actually impacts traffic without having access to the data.
After the recent development of a google base spree extension, we’ve been able to measure the significant impact of search engine traffic directly related to Google Base. The extension was installed for one of our Spree clients. See the data below:
Search engine traffic (y-axis is hits where the referring site was a search engine). Google Base was installed on March 24th.
Other referral traffic during the same time period (y-axis is hits where the referring site was not a search engine and traffic was not direct).
Although the extension is relatively simple and has room for improvement (missing product brands, product quantity), you can see how much traffic was impacted. Hopefully with future extension improvements, traffic will increase even more.
ecommerce spree
Rails and SEO advantages
In today’s climate, search engine optimization is a must to be competitive. Rails routing provides this advantage and much more.
Descriptive, content packed URLs afford your website better search rankings because they provide a clear context as to what the page is about. Using keywords in the filename goes even further. Under normal circumstances, without advanced configuration, a web page filename is rigid and fixed. This isn’t a problem in itself, except for that it doesn’t help with SEO one bit.
Having multiple URLs linking to the same page opens more doors to search engine crawlers. Generally, once indexed correctly, this means more access paths in to your site which in turn a result in a greater variety and volume of traffic.
Normally in most other programming languages, you would need to use an Apache rewrite rule to accomplish this. This rule will detect a digit in a file name and pass it along as a parameter to another dynamically generated page.
RewriteRule ^/.*([0-9]+).*$ /index.php?i=$1 [R=301,L]
This rule is definitely probably too greedy of a match, however, it serves to illustrate the point. With that rule in place, any request containing at least one number will be …
rails seo