Blog

Debian Developer Database Statistics

03.12.2006 at 13:02

I am currently writing a paper for school with the title "Free and OpenSource Software in Switzerland", therefore i am interested in the FOSS community here in Switzerland. So i decided to make some statistic out of the Debian Developer Database, below is my ruby script for that purpose. It basically just queries the webinterface via https and then parses the results and makes some statistics. I plan to set this number in relation to the population of the corresponding countries.

#!/usr/bin/env ruby

# requires libopenssl-ruby1.8
require 'net/https'

class DDDB #Debian Developer Database

private_class_method :new

public
	def self.get_developer_count(country = 'any')
		html = get_html_for_country(country)
		if html =~ /Number of entries matched: <b>([0-9]+)</b>/
			return $1.to_i
		end
		return 0;
	end

	def self.get_developers(country = 'any')
		q = '<font size=+1>(?:<a href="(.*?)">)?(.*?)?(?:</a>)?'
		q+= '</font> (uid=.*?login:</b></td><td> '
		q+= '<a href="mailto:([a-z0-9.@]+)"'
		html = get_html_for_country(country)
		html.scan /#{q}/m
	end
	
	def self.get_countries
		http = Net::HTTP.new("db.debian.org", 443)
		http.use_ssl = true
		http.start { |http|
			res = http.get('/') 
			res.body.scan /<option value="([a-z]{2})">(.*$)/
		}
	end

private
	@@data = {}

	def self.get_html_for_country(country)
		if !@@data.has_key? country 
			@@data[country] = get_html_for_query(
				"country=#{country == 'any' ? '' : country}"
			)
		end
		@@data[country];
	end

	def self.get_html_for_query(query)
		http = Net::HTTP.new("db.debian.org", 443)
		http.use_ssl = true
		http.start { |http|
			res = http.post(
				'/search.cgi', 
				"#{query}&dosearch=Search..."
			)
			return res.body
		}
	end
end

total = 0
data = {}

DDDB.get_countries().each do |code,country|
	count = DDDB.get_developer_count(code)
	if count > 0
		data[code] = { 'country' => country, 'count' => count }
		total += count
	end
end

print "Total Debian developers: ", DDDB.get_developer_count(), "n"
print "Total Debian developers with country specified: ", total, "n"

data.each_value do |entry|
	print entry['country'].ljust(35), entry['count'].to_s.rjust(5),' ',
		"%02.2f%" % (entry['count'].to_f*100/total), "n"
end

exit 0

DDDB.get_developers('ch').each { |www,name,mail|
	print name.ljust(35),(" <"+mail+"> ").ljust(35)
	print www if !www.nil?
	print "n"
}

Oh well after having written the above script, i actually found out that i simply could have queried the ldap directory directly. Sigh.

» read more » comments

Thanks SUN for open sourcing Java

13.11.2006 at 22:24

It would like to thank everyone who was involved in the open sourcing of Java, by choosing the GNU GPLv2 you made the right decision. Thanks all the Classpath and Kaffe hackers for their effort in building a free Java. Hopefully you will join the SUN engineers and create a whole new community.

Here is a quote from RMS which summarizes it quite nicely.

I think Sun has well, with this contribution have contributed more than any other company to the free software community in the form of software. It shows leadership. It's an example I hope others will follow.

This is a great day for the free and open source software community.

Marc

» read more » comments

Evaluating Free Software wxWidgets GUI Builders | Designers [Update]

10.08.2006 at 16:04

I am currently *trying* to write a cross platform gui frontend for qemu. I have chosen to use the C++ toolkit wxWidgets, mostly because it is written in C++ and therefore object oriented, other advantages are that on linux it uses gtk+ and it has good support for M$ Windows.

Since i don't want to mess around with basic things like the placement of the various gui elements, i looked around for a wxWidgets capable RAD tool. Below is a list with what i found so far.

After a _short_ evaluation my first impression is that wxglade is not quite there yet feature wise. wxDev-C++ is impressive but depends on Dev-C++ and is therefore only available on Windows. wxFormBuilder seems to be cross platform can generate both xml resource files and C++ source code which satisfies my needs.

So right know i think wxFormBuilder is my favorite but that could change once i start using it for a longer time.

Update

I found wxGuiBuilder which is quite neat, the main idea is to represent the GUI with a few simple relatively easy recognizable ascii symbols. The advantage is that there is no XML and no IDE needed in order to build a good gui.

Marc

» read more » comments

Mixing C and C++ Code in the Same Program

26.07.2006 at 10:06

I am currently trying to reuse an existing C-library from C++, since i am quite a newbie on this things i found the following article from the Sun Developer Network Mixing C and C++ Code in the Same Program quite interesting.

Marc

» read more » comments

picotux - the smallest Linux Computer in the World

28.06.2006 at 13:53

Today i came across a really fancy project / product, picotux - the smallest Linux Computer in the World.

This thing is apperantly build on top off uClinux and busybox. It connects it self to the outside world over RJ45 or a serial connector and can even serve as a simple web or telnet server.

See the technical page for further information.

Marc

» read more » comments

<< 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 >>