Draconis Software Blog

Pulling Subversion Logs for a Single User

There are many times during a project where I use the svn log command in order to see what has changed and to get a feel for the pace of development. It's also great when you're dealing with clients; you're only one command away from telling an inquisitive client exactly who did what task and when they did them. However, svn log is missing one important feature -- the ability to filter by a particular username. When I asked in #svn on freenode, they suggested I use the --xml option and parse the resulting output.

The following is what I came up with. It's a ruby script that uses the delightful Hpricot gem to parse the xml. It takes one argument, the subversion username that you wish to retrieve the logs for. I hope that it's useful for someone else! You can curl it from http://pastie.textmate.org/197763.txt if that makes it easier, too.

RUBY:
  1. #!/usr/bin/ruby
  2. require 'rubygems'
  3. require 'hpricot'
  4.  
  5. username = ARGV[0]
  6. if username.nil? || username == ""
  7.   puts "Please specify the username to cull log entries for."
  8.   exit
  9. end
  10.  
  11. puts "Requesting SVN log, this may take a bit."
  12.  
  13. doc = IO.popen("svn log --xml") do |f|
  14.   Hpricot.XML(f)
  15. end
  16.  
  17. entries = doc.search("logentry").find_all do |entry|
  18.   (entry/"author").innerHTML == username
  19. end
  20.  
  21. entries.each do |entry|
  22.   revision = entry.attributes["revision"]
  23.   author = (entry/"author").innerHTML
  24.   date = (entry/"date").innerHTML
  25.   msg = (entry/"msg").innerHTML
  26.  
  27.   puts "r#{revision} - #{author}"
  28.   puts "#{date}"
  29.   puts "#{msg}"
  30.   puts "-"*80
  31. end

Web 2.0 & Death of the Network Engineer

GigaOM is running a great article today about the changing environment faced by network engineers - as high-performance, well-optimized Internet providers are becoming ubiquitous, and access to the Internet has approached commodity status, what is the relevance a network engineer plays in today's new economy? The article raises the question of a network engineer's place: is it primarily with the Internet service provider - ensuring service is available and customers have access (think a lineman for the telephone company) - or is there still a place for an experienced network engineer supporting a company's customer-facing operations? As the article says, service-oriented Internet companies, providing services to millions of users, may no longer need network engineers on their staff to support these operations.

To this CTO, knowing the details of his network and server infrastructure was like knowing the details of the local utility electricity grid – not required. Is this a bad thing, or proof that networking technologies have succeeded?

The question posed is this: do companies building Internet-oriented products, Web 2.0 service companies for instance, need network engineers to keep their systems running? Or does it make more sense to outsource these kinds of operations to a third party (for instance, hosting everything via a virtual server or other hosting provider)?

(Read the article)

The Great Free WiFi Debate

There’s been an interesting debate going on about free vs. pay-per-use WiFi that I’ve found intriguing: the idea is to draw customers into shops at times that normally wouldn’t see much action, but at issue is whether too many people are mooching off the free service and hurting the business. A number of people have likened it to the air conditioning incentive offered by movie theaters a number of years ago. Of course, I and most other customers would probably rather have it free, but I can certainly understand shop owner’s oppositions.

Every so often, I like to head out to a Starbucks (which costs a couple bucks for the TMobile service they provide, plus a Venti cup of whatever’s brewing) or a FreshCity (where it’s free), take my MacBook, and get some work done. I find it’s often good motivation when I pick up and move to some other place – different environs give me a nice motivational push. What’s your take? Do you think offering WiFi for free at Starbucks, Panera, FreshCity, McDonald’s, and other places would be harming or helpful?

(Read the article)

Our new phone system

Asterisk LogoSorry we haven't been updating the blog as often as we have been in the past – as always, things come up and stuff like this gets pushed to the side. But, as an update, I thought I'd talk about our new phone system today, and an introduction to how we got the Asterisk PBX up and running (I say introduction, because it's a long process that will no doubt span multiple postings).

A while back we decided we would like to build a new phone system for Draconis – something that could grow as our needs grow, and versatile enough that could keep up with us. Our first thought was to use the open source Asterisk PBX, and as a result, we began building a phone system around this remarkable project. I'm going to give an intro to what we decided to build, but getting Asterisk up and running (especially if you don't know a whole lot about phone systems) can be incredibly time-consuming. But, at least for us, it was also very fun.

(Read the article)

The tech behind OLPC

You've probably heard of the One Laptop Per Child organization first announced in Davos, Switzerland in 2005, and how the project has made some significant progress towards the $100 per laptop goal, first suggested by Oracle's Larry Elison. Currently, the organization plans to hit about $140 for the first iteration of the laptop, eventually reaching the $100 mark sometime around 2008. There's a lot of interesting technology behind the OLPC, with much of the concepts readily applicable to other IT-related industries, which I thought I'd explore today.

(Read the article)

Basic Journey of a Packet

There's an article up on SecurityFocus called "Basic journey of a packet". It gets into some of the details of TCP/IP and routing, and should prove a useful introduction to those not fully on what's happening behind the scenes. From the article:

Once an Internet application is invoked, a whole series of events takes place. This article will be a simple introduction to how a packet is created and the various devices it will travel through on the way to its destination. Having an understanding of just what happens between point A and point Z can be quite helpful in furthering your understanding of networking.

I think the article gives a good sense of how incredibly complex networking really is. At each layer from the physical to application there's an incredible amount of work going on, just to simply view a webpage. Networking is a good example of how powerful layers of abstraction can be. Each stage builds upon the last, while still creating an simpler interface for the next. It creates a sort of stack, with each stage being simpler and easier to use. At the bottom you have the physical layer, which would require a good deal of knowledge of physics and electronics to begin to comprehend. Yet once you get to the top you're dealing with something as simple as typing "www.google.com" into your browser and hitting go. Much of the technology we take for granted today works because of these kinds of abstractions.

The article also mentions the differences between networking and programming. I think for both network administrators and programmers it's very useful to have at least a passing understanding of what's happening at each stage, each layer of abstraction. Whether you're fixing a network problem or debugging a web application, you never know if you might be working with an application error or a broken ethernet link.