Author Archives: Dan Siemon

Linux QoS API update

My Linux QoS library is coming along nicely. It took me a few days but I changed the whole API to be based on GObject. The main reason for this time consuming change is to make bindings to other languages easier. Primarly I am interested in Mono and Python bindings. As much as I love good old C I have no intention of building a GUI application with C if I don’t have to.

I am now buiding small apps that use the API and discovering the features that are needed but I didn’t think of before.

Everyone who develops software using free software libraries should take moment to thank the developers for thier time and hard work. Developing a sane API is hard.

Political Compass

Political Compass is an interesting site. It asks you to fill out a short questionnaire and then gives you a rating of where you stand on the political map. For reference the site also gives the values for some famous people like Hitler, Stallin and Ghandi.

My location according to this site is
Economic Left/Right: -4.38
Social Libertarian/Authoritarian: -5.85
which puts me in the same area as Ghandi. Since I don’t know that much about Ghandi’s politics I really don’t know what that means.

It’s probably not wise to take this thing too seriously but I would have thought myself to be much closer to Paul Martin than this graph shows. Also, I certainly do not think collectivism is the best way to run the economy but somehow I ended up towards that part of the scale.

Political map

Ironic

It’s particularly ironic that a few hours after I had posted my little rant on Police fund raising I discovered that the drivers side window had been smashed out of Karen’s car and the steering wheel ripped apart. Looks like some pretty stupid theives. It was around midnight when I noticed this. At ~05:00 I was awoken by the sound of another car window being smashed. I called the police. Hopefully they caught someone.

Update: Two other cars in the parking lot had windows smashed too. As far as I know none were actually stolen. Pretty lame thieves.

Police fund raising

Yesterday I got a call from the Police Association of Ontario. It was basically a telemarketing call as they were trying to raise funds. This really bothers me for a couple of reasons.

I always find it very intimidating when the police associations or the fire department equivalent call looking for money. As a society we definitely owe these people something. They are the reason why we have law and order (not the show) and good emergency response. However, they are also in a position that makes them very intimidating. What happens if I don’t give money to one of these groups? Does my name get put on a little list so next time I am speeding I get a ticket instead of a warning? Will the fire department be just a little bit slower getting to my house if there is a call? Sure, all of these ideas sound pretty far fetched. What if the person calling is not a hired sales droid but is an off duty police officer who lives down the street? Or a off duty fireman who recognizes the address on the emergency radio as the address of the person who was rude to him on the phone last night. Perhaps these feelings are more acute for me because I grew up in a small community where if the local departments did the calling these coincidences could easily come true. These feelings may not be based on any kind of logic but they do exist, at least for me. Personally, I have a lot harder time saying no to the police and fire department telemarketing fund raisers than I do any other group. In fact, yesterday might have been the first time I actually did say no to them and that’s because of my second point.

One of the reasons they were asking for donations is to lobby for law changes. The pitch went immediately to sex offenders. “Do you watch the news? Yes. Then you have heard about the recent problems in Brampton.” For those outside of Ontario he was referring to this. The nice tele-sales guy then preceded to explain that the laws are too lax and that criminals who are released just re-offend so the law should be changed to keep them in jail. Another example of the Police Association of Ontario’s politics can be found on their website; the little ‘Club fed’ logo. Obviously, they think the prison system is too easy on criminals. Police officers are given a special role by our society. The role of upholding the law. With this role comes respect and power. By using this position to raise funds and lobby for changes to the legal system they exert unfair influence on our society. It is not the role of the police to make laws, we have the elected officials and the judiciary to do that.

I’m sure the Police Association believes what they are doing is correct and it’s probably not illegal. Whether they realize it or not they abusing the power that their role in society gives them.

Linux QoS API

My wrapper library for the Linux QoS system is coming along nicely. Here are the function calls necessary to add a filter that matches the destination field in the IP header.

filt = classifier_u32_new();
classifier_u32_set_class(filt, class);
classifier_u32_set_priority(filt, 5);
classifier_u32_set_protocol(filt, IP);
classifier_u32_set_interface(filt, 3);
classifier_u32_add_match_ip_dst(filt, "x.x.x.x");
if (!qos_classifier_u32_add(con, filt)) {
	g_print("Adding filter failed.n");
}

I am now trying to figure out how to handle the representation of the currently installed filters and classes in the API. Somehow the application needs a represenation of these things so it can make changes. Since the structure of the qeueing disciplines, classes and filters is very much like a tree I think this may be the best way to go.

Course selection

It looks like I have pretty much got my fourth year Computer Science courses figured out.

CS325: Law in Computer Science
An examination of aspects of law and policy that relate to the creation, protection and implementation of software and hardware; attention is directed towards issues of current importance of which every computer scientist should be aware.

CS402: Distributed and Parallel Systems
Issues arising in distributed and parallel systems and applications; related architectures such as connection machines, shared memory multiprocessors.

CS413: Cryptography and Security
Survey of the principles and practise of cryptography and network security: classical cryptography, public-key cryptography and cryptographic protocols, network and system security.

CS444: Semantics of Programming Languages
Operational, denotational, and axiomatic semantics; lambda-calculus.

CS445: Analysis of Algorithms II
Parallel, distributed, probabilistic, and geometric algorithms; design and analysis; computational geometry; fractals and graphtals.

CS447: Compiler Theory
Syntax-directed translation; LR(k), LL(k), attribute grammars; code generation; optimization; compiler compilers; code generator generators.

CS457: Computer Networks II
Network layering, performance, management, modelling and simulation; faults and failures.

CS490: Thesis
A project or research paper completed with minimal faculty supervision. An oral presentation plus a written submission will be required.

It was pretty hard to decide which courses to take this year. The first big decision was to take the courses necessary for the Four-year BSc Honours Computer Science degree instead of the Four-year Bsc Honours Computer Science with Software Engineering Specialization degree. Although the Software Engineering sounds a little more impressive it seems to me to be the easy way out. The courses required for the Software Engineering specialization look easier and less interesting to me. Worse, I would not be able to take many of the more theoretical courses I listed above.

After making the above decision I still had to decide between
CS338A: Computer Graphics I
Graphics primitives. The viewing pipeline; clipping and visibility problems. The graphical kernel system; picture generation and user interfaces.

and

CS444: Semantics of Programming Languages
Operational, denotational, and axiomatic semantics; lambda-calculus.

It was a choice between specializing more in programming languages or broadening my knowledge with the Computer Graphics course. This was a tough decision because I know very little about graphics and would like to know more. I chose CS444.

The second course decision was between
CS325: Law in Computer Science
An examination of aspects of law and policy that relate to the creation, protection and implementation of software and hardware; attention is directed towards issues of current importance of which every computer scientist should be aware.

and

CS413: Foundations of Computer Science II
Formal languages; recursive functions; abstract complexity; automaton models; array machines; systolic systems; cellular automata.

I decided on CS325 for a couple of reasons. First, I have become very interested in intellectual properly issues. Second, I don’t want the spring term to be too hard because a lot of time will be consumed by my thesis.

I do feel like I should be taking another mathematics course or two but there just isn’t room.

It should be a very interesting year. I wish it were possible to take every course in the Computer Science department. Also, I still have to decide which option credit to take. I’m thinking economics.

Now, I just need to decide whether or not I will do a masters next year.

Why images are bad links

Website images that simply contain text make very bad links. An example of this can be found on the CBC‘s website. Notice the navigation elements on the left side of the page are images. There are several reasons why this is a bad idea.

The most obvious reason is that these images do not adjust their size with the font settings of the viewing browser. Modern monitors can be set to very high resolutions that can make small images next to impossible to read. If these images had been normal text the browser would render them in scale with the rest of the text. This is especially important to people with eyesight problems who set their browser font to be very large.

Secondly, the text in these images cannot be searched. For example, if you are viewing a site with hundreds of image based links it is not possible to use the searching features of your browser to find links containing certain words. Of course, a real website is probably not going to have hundreds of image based links but the principle is the same and is closely related to my main reason for writing this article which comes next.

All Mozilla based web-browsers (Mozilla Navigator, Epiphany, Firefox, etc) allow the user to simply type the text and the browser will highlight the link that matches the text. The user can simply press enter to follow that link. I encourage everyone to try this out, it is a real time saver. With this feature well designed websites can be navigated without reaching for the mouse. Off hand I don’t know if there are non-Mozilla based web-browsers that have a feature similar to this.

There are many good reasons to use images on a website. Replacing the browsers text rendering is not one of them.

Canadian ISPs and Copyright

There is some very good news for Canadian ISPs on the Copyright war front today. In a unanimous decision the Supreme Court of Canada ruled that ISPs are not responsible for the content their customers download. CBC News has details here. If the court had made the opposite decision every ISP in Canada would have had to instantly become the content police despite the fact that this would have been next to impossible to accomplish technically.

A little bit of personal opinion now. In recent years parts of our society have been arguing for new laws to apply to the Internet. What these people fail to realize is that the Internet is not a new world. It is simply a faster, more efficient and capable way of communicating. More often than not current laws can be sanely applied to the Internet.

Should the phone company be responsible for it’s customers using the phone network to plan to illegal, Copyright infringing acts like copying thousands of CDs for sale on the street? Of course not. Should the transportation company that is hired to move these CDs between cities be responsible for the Copyright infringement? Of course not. So why would ISPs be responsible? ISPs simply move data packets from network node A to network node B. One of my favourite quotes fits this situation “We’re sysadmins. To us, data is a protocol-overhead.” ISPs do not want to look at your data.

As more and more of the old phone system moves to packet based networks (primarily IP and the Internet) we need to make sure that ISPs have no interest in watching who we are communicating with. Believe me, if ISPs could be held legally liable for what you download online they would watch every bit that leaves your computer.

Canadian Election

Well it looks like there will be a minority Liberal government in Canada this term. Considering the polls said the Conservatives might form a minority government the final numbers are pretty surprising. For anyone reading this outside of Canada the Liberals have held a strong majority in parliament for the last three terms.

Ontario, Canada’s largest province, is the traditional Liberal stronghold. Ontario elects ~1/3 of the seats in parliament so this support has translated into a lot of seats. There have been a few screw-ups in the government recently that have hurt the Liberals pretty badly. Combine this with the fact that the traditionally divided political right has united into one party this election could have spelled doom for the Liberals. Indeed, the polls showed that the Liberals and Conservatives were running neck and neck. Why were the pre-election polls so far out? Here is my little theory on what happened. Ontarians didn’t want to elect the Conservatives but they did want to punish the Liberals for their problems. So, some Ontarians told the pollsters that they were not going to vote Liberal but when the day finally came support fell on the traditional side. I am a strong Liberal supporter but at the start of the election I probably would have done the same. Besides, lying to pollsters is fun.

Canadian Copyright

I found a couple of interesting articles with respect to changes in Canadian Copyright law. It’s scary to see the Copyright battle start in Canada. As in the US it looks like the pro restriction groups are doing their best to make sure they dominate the process. The Star has two articles here and here. Both of these articles are written by Michael Geist.