söndag 23 november 2008

Build components

After a weekend of work, I finally got myself a build component that I'm semi-pleased with, for C and C++ projects, using Subversion. Most likely works for any other lower level programming language as well.

First off, structure. Each component is it's own BTT(Branches, Tags, Trunk)-root, residing in a Project_Modules directory in subversion. Each component contains an inc, src, test and a stubs directory. Rationale for the BTT-root is that, with a separate BTT-root for each component we can raise the version of each separate component without having to raise it for the entire project.

The Project directory resides on the same level as Project_Modules, and is empty, only containing the subversion property externals pointing to the trunks of the Components in Project_Modules. Rationale for this is to have a simple place to checkout the entire project. It's a bit dangerous when working with branches, and requires a little bit extra care so one doesnt write into the trunk out of mistake. Possibly block everyone but a specific user to write in the trunks and have that CM person do all the branching/merging. It is time consuming however.

It looks something like this:
  • Project_Modules
    • Component1
      • inc
      • src
      • test
      • stubs
    • Component2
      • inc
      • src
      • test
      • stubs
  • Project
Inc directory is the public interface of the component towards the other components. Src directory contains the actual code of the component. Test contains unit tests (personally, i create a new directory for each new unit test file). Stubs contains the stubs of my own component. Ie, Component1/stubs will contain stubs for the functions in Component1. Rationale being that 95% of the time, we want to stub another component in the same way, instead of keeping stubs of a component in 10 different components, we keep it in one place.

lördag 22 november 2008

Criminalized generation

So, IPRED is coming to this country, Swedens government is forcing it into effect. Even though there has been quite heavy resistance and a lot of people don't like it. I agree. It's a complete nutjob of a law. Before moving on, let me state that I am here discussing the Swedish implementation of the law. This is even further going than the original EU directive COM(2006)0168. The best part is, they just "softened it". Ie, it was even worse from the beginning.

As has already been said by thousands of others, but it can't be said enough times. The law moves the burden of the police work from the (almost) objective police to the absolutely partial owners themself. Let's consider this: We have for centuries had a police force because they are objective. They deal with criminals and they should hopefully not take sides for either part in a case, it's left to the court to do this.

With IPRED, the entire burden of investigating a crime is moved to the plaintiff. The plaintiff (in this case, the intellectual property owner) or someone working for the plaintiff, finds someone downloading a piece that they "own". They then move on to demanding the name and contact information of that person from the Internet Service Provider (ISP) of the Internet address of that specific downloader. Current law does not tell the ISP that it has to comply with the demand. IPRED does. The plaintiff can now move on to the next step below.

The plaintiff are then free to send monetary demands to the "defender", who will find out about the problem with the monetary demand. The monetary demand is formed as "pay us money or we draw you in front of a court and you will loose a lot more". Basically, you will have a gigantic mass of people just paying out of freight "who knows, maybe my kids/spouse/visitor did download that song on my computer?". Or how about framing someone you don't like, it's not gonna be hard, trust me. Don't like your neighbour, go download a free program and hack him, then set up a bittorrent client to keep downloading/uploading from their computer.

Now, this is the basic argument people have against this new law. Unfortunately, it has been cobbled together by retards and rather IQ-free people and been compromised by to such a degree that it's no longer coherent. One of the sideeffects of this law is that it will become illegal to buy an application or download a open source application and then run on your own computer. The same plaintiff above could sue every single owner of a Microsoft Windows Vista license (for example) if they can find a instance where Vista steps on their patent.

This comes to mind, when one reads IPRED:

When the Nazis came for the communists,
I remained silent;
I was not a communist.
When they locked up the social democrats,
I remained silent;
I was not a social democrat.
When they came for the trade unionists,
I did not speak out;
I was not a trade unionist.
When they came for the Jews,
I remained silent;
I was not a Jew.
When they came for me,
there was no one left to speak out.