Monday, November 30, 2009

Vitualenv And Pip

I'm adapting to virtualenv and pip as part of my Python development environment. You use virtualenv to convert your development tree into a virtual Python environment, sandboxed from the rest of the system. You still run the system Python interpreter, but it finds modules installed in the virtualenv first. Basically, pip is a package manager which allows you to add and remove Python modules. But pip has one feature that sold me on the idea.

I mostly write command line utilities in Python. For the more complex commands, I usually write functional tests which required hard coding the executable path to ensure that tests run the correct command. In addition, you have to fiddle with the Python module search path to ensure the command's library modules can be found. It's not hard, but it is inelegant and not very portable.

The key feature is that pip can convert your development tree into a Python egg inside the virtualenv. The process installs the command under test into the virtualenv /bin directory and makes it's modules available in the normal Python search path. The tests can now safely execute the command without any special setup.

Yes, it seems like a small thing. But anything that makes the code simpler, is a good thing.

Sunday, November 29, 2009

Time Flies

Time flies when you are having fun. Unfortunately, time flies even when you are not having fun. Time flies no matter what you do. Whoever coined such a pointless phrase should be hung. I'll bet he was, too. People didn't put up with fools like we have to these days.

Saturday, November 28, 2009

Redmine Vs Trac

I installed Redmine to take it for a spin and my first impression was generally favourable. I'm a long time Trac user, but lately development on Trac seems to have slowed. I decided it was time to check out other options.

The one area where Redmine beats Trac hands down is the admin interface. By comparison Trac's admin interface was until recently a third party plugin which has now been incorporated into Trac itself. Even so, you will still need to edit the configuration file for some things, which hasn't been necessary in Redmine at all so far.

The other significant difference is that Redmine is multiproject. This has been been a long standing feature request on Trac, but it never designed to work that way. Converting Trac to be multiproject is possible, but it had to be forked (DrProject) and took a lot of work. In fact, DrProject has already been supplanted by Basie, so there is limit to what can be done with the existing Trac code base.

Redmine's issue tracker has one notable feature. You can enter time estimates and actual duration of work on each ticket, and display the information on a Gantt chart. Personally, I have no use for Gantt charts but I know managers love 'em, so that feature alone maybe enough to convince your boss to try Redmine.

I started a project using Redmine so that I can get long term impression. So far I haven't seen anything that I make me not use it. Oh, except maybe that it is written in Ruby. Sorry, I had to find something negative say...

Friday, November 27, 2009

F1 Returns To Montreal

It is a sign of the times that Bernie Ecclestone got less than he was asking for the 2009 race last year. That alone would put a smile on my face. Ecclestone doesn't back down very often.

It is great to have a Canadian Grand Prix back on the calender for 2010 at least. Hopefully they'll make the five year deal as well. Now if only we had a Canadian driver as well, or maybe even a Canadian team! That would be cool. OK, maybe I'm getting too ambitious.

The only annoying thing is, I still won't see the race live. Oh well, you can't have everything.

Thursday, November 26, 2009

Did You Notice?

I somehow missed that I've been blogging continuously for over year. It's not very impressive compared most other people, but in my case it might just be a minor miracle, considering my previous efforts were always so short lived. Sometimes I never got past one post!

Writing isn't the problem as I actually enjoy doing that, although it would help if I could type more accurately. The problem is a lack of material. I don't exactly lead a very interesting life, but I'm not wishing for one either. I find writing about technology to be the hardest because I rarely learn anything to such depth that I could write about it authoritatively.

I will try and keep this going. Who knows, maybe I can make another year.

Wednesday, November 25, 2009

Wave! What Is It Good For?

Absolutely nothing! Yes, I know it's just sad that I'm referencing Springsteen.

After lurking on a few Wave RPGs, I finally decided to try playing in one. I suspect that makes me one of the few people that has found something to do on Wave. Note carefully however, I didn't say it was a useful something.

People who expect technology to do useful things, are out of luck on Wave. That means that a lot of people are activating their accounts, logging in once, poking around a bit, concluding Wave is useless, and never ever logging in again.

I've concluded that Wave requires you to imagine a use for it, before it becomes useful. Seriously. That's so stupidly counter-intuitive that I reached a second conclusion:

Google probably doesn't know what Wave is good for either.

(This post was sponsored by the makers of the italic font style.)

Tuesday, November 24, 2009

Heads In The Sand

One part of the fee-for-carriage demands by Canadian broadcasters requires cable companies to block the feed from a US broadcaster, instead just replacing the US feed with one from the Canadian broadcaster. This will enable the Canadian broadcaster to schedule the show a different time, while keeping at least the same advertising revenue. Are these folks nuts?

So let's see... People see black screens when they tune in to a US TV channel. They start asking around. They discover they can get the show on the Internet. Nobody watches the show on the Canadian broadcaster. The broadcaster loses advertising revenue and goes out of business. And good riddance!

The people who run these companies must their heads buried the sand. It is obvious they don't have a clue about the options are available to average people.

Monday, November 23, 2009

How Do They Do That?

It is actually impressive how copyright holders are able to influence politicians to draft bad laws. The UK's Digital Economy bill is a great example. If this thing passes as is, ISPs would be required to forward notices of infringement to their customers and retain an anonymous list of the customers that received notices.

But it gets better! The rights holders can demand to see the list at any time and use it to get a court order that will reveal the actual customer information. Now isn't the the most perfect setup you've ever seen. Lets declare open season on suing a lot of Britons for non-commercial infringement.

While the bill is a long way for becoming law, the fact that it got drafted in the first place is far more worrisome and even a little terrifying. This Ars Technica artical looks the bill in more depth.

Sunday, November 22, 2009

Doctor Who: The Waters Of Mars

The best part of The Waters Of Mars wasn't the story, which was rather average Doctor Who fare, but watching the Doctor start down the slippery slope of megalomania. He has always been arrogant and self-righteous, but at the end you always knew that he had done the right thing. That was definitely not the case in The Waters Of Mars. The story ends with the ominous sound of the cloister bell, but this time the danger may be The Doctor himself.

Saturday, November 21, 2009

Sci-Fi And Technology

This article discusses the feedback between sci-fi and computer technology. The connection between near future sci-fi and computers actually seems valid, but in other areas of technology, not so much. Most sci-fi about space travel has been way off, for example. And this is only interplanetary, not interstellar travel that I'm talking about!

Look at 2001: A Space Odyssey. Large permanent space stations orbit the earth. Travel to and from the stations is routine. There is a fairly realistic long term deep space mission to Jupiter using a ship specially build for the project. Compare that to the proposed Mars mission which, even if it does happen, will be 30 years later and probably be less technologically advanced. The computer might be right though. ^_^

Of course the difference in complexity between computer technology and space travel is huge. But there is another more subtle difference. Computer technology is created by private companies that are motivated by profit. Space technology is still largely funded by governments motivated by... what? That is changing of course, but those private companies involved in space tech are still very young, and in some cases are using 60 year old technology.

Friday, November 20, 2009

Chrome OS

No, I'm not going to gush about how wonderful Chrome OS is. One, there is more than enough being written about it already. Two, I haven't tried it. Three, I don't really care enough to try it.

I believe that computers became truly powerful with the advent of with microcomputers. I don't mean powerful in terms of performance. The microcomputer gave individuals the power to use computers as they pleased and in the complete privacy of their homes. Before the microcomputer, what you were allowed to do on a computer was determined by the policies of the institution that owned the computers.

Chrome OS is leading us back to that world, and it make me a little sad. Yeah, I know I'm being overly dramatic, but I don't think that I am wrong either.

Thursday, November 19, 2009

Email Challenge

I'm trying to help a programmer remotely using only email. Whether this will work remains to be seen. In theory, it should work since I am only supposed to help him understand some high level concepts. He has already written most of the application but controlling hardware is proving a bit too much of a challenge, but I can tell he gets some of it. Just need to figure what he is not getting.

To be clear, I am hoping to avoid getting into his code at all, unless I absolutely have to. Looking at someone's code, in an unfamiliar language, on Windows no less, just doesn't seem very appealing for some reason. So, if the email help doesn't work I'll definitely try other channels first, before looking at his code. Yeah, I'm being very optimistic.

Wednesday, November 18, 2009

Personal Wave

My main problem with Wave is not technical, but social. When I finally got some Wave invites to hand out, I naturally gave one to all my close friends. They are all geeks so one would think that they would be playing with the new shiny thing at least a little bit. But life away from the keyboard takes priority, so they really haven't been visiting Wave very much. Today was actually the first time I had a real time conversation on Wave with someone I know well. Weird that it took so long.

Tuesday, November 17, 2009

Cython

The topic for this month's PyGTA meeting was Cython. However, instead of a presentation we had a coding dojo session in which we tried to solve a problem using Cython. We certainly had fun, which is one goal of a coding dojo session, but we lost the plot at some point and didn't achieve most of the other goals.

Python has a peculiarity that doesn't occur in most other languages: there are often several competing libraries or frameworks that accomplish the same thing. Look at all the Python web frameworks, for example. Cython is another example of this phenomenon. Cython is similar to SWIG, ctypes, Boost.Python, and maybe even a few others. Each of these allows you write (or generate) wrappers for low level C/C++ functions in Python.

Python's mantra, "There is only one way to do it," applies only to the language itself and not to stuff written in Python. Now you know. ^_^

Monday, November 16, 2009

Chrome

I've been using the Google Chrome browser as a dedicated Wave client for about a week and have been very impressed. Chrome easily beats Firefox in memory usage and performance, which is most useful when using an oinker application like Wave.

However, I won't be switching to Chrome completely for my daily browsing needs, until essential functionality like NoScript are available. Once that happens, Firefox's days are numbered as the main web browser on Linux.

Sunday, November 15, 2009

Hey, What Can You Do?

This evening I was supposed to have a get together with some long time friends from my college days. Last night Dean, the one who was hosting the event, announced that a small customer project was taking loner that expected, and he may have to cancel the get together. Oh no! Sure enough at around noon today, we all got phone calls with the bad news that it was off. Sob! Well that was that, but what can you do? (I think Dean forgot to multiply by π. ^_^)

Obviously, we'll try an arrange it for another time. However, it is that time of year where schedules tend to get crunched by family commitments, etc., so I won't be surprised if we can't pull off.

Saturday, November 14, 2009

07-Ghost

07-Ghost is an interesting sci-fi anime that may not be to everyone's taste. First the main character, Teito Klein, is deeply introspective to the point of being annoying at times. During the early part of the series, Teito wears these slave chains which (I suppose) symbolize that he is enslaved by his own doubts and fears. At a crucial point in the story he breaks the chains, setting himself free. There is more like that, but you get the idea. ^_^

Despite all that, I enjoyed 07-Ghost. The story starts slow but the pace progressively quickens as more of Teito's past is revealed. There is one let down though, because even with 26 episodes, the story isn't finished yet. Although Teito has broken some of his chains, he is not completely free yet, and there is still much of his past that he doesn't remember.

Friday, November 13, 2009

Basquash!

I am usually not interested in sports anime, so I surprised myself by watching Basquash! all the way to the end. I guess if you mix in some sci-fi, I'll watch anything!

Basquash was actually better than I expected, despite the oversized product placement by the main sponsor, a well known sports footwear company. Basquash is actually three-on-three basketball that is played using giant mecha called bigfoots. The mecha needs shoes to maintain its footing so you can guess how the sponsor was convinced to climb aboard.

The story kept me interested because it changes from a basic sports tournament story into a "save the world from annihilation" story about half way through. It would be easy to botch such a radical transition but it was handled rather well. The other selling point is the main character, Dan JD, who undergoes a change in personality from angry and reckless to calm and thoughtful. As I mentioned before, the series is surprisingly better than you might expect.

Thursday, November 12, 2009

Intellectual Poppycock

This is old news but I decided to write about it after Remembrance Day.

The Royal Canadian Legion claims that the poppy symbol is its Intellectual Property. How is that possible? The symbol of the poppy existed before the Legion did? And of course, as is so common with IP rights, the Legion has taken a very heavy handed approach to enforcement. With all due respect to the Legion for all the good work they done, I think they are out to lunch on this matter.

Read this story about a bakery making a special order of poppy shaped cookies and tell me if it was not a worthy use of the poppy. Or this story about a peace movement using white versions of the poppy. Or this use of the poppy symbol. Instead of a "cease and desist," a letter noting that the symbol is trademarked, would have been sufficient. None of these activities were disrespecting the symbol at all.

It seems that corporate culture has infiltrated the Legion. Someone needs to mount a rescue mission to save the Legion from itself.

Wednesday, November 11, 2009

Remembrance Day

I wonder how many people actually pause and reflect on the significance of Remembrance Day. I'm sure most do not. The sacrifice of all soldiers, from the major conflicts of the twentieth century to the more recent loses in Afghanistan, must be remembered, not to glorify war but to encourage us to avoid it. It is a sad reality that we are no closer to this goal than we were a hundred years ago, and every soldier lost today serves to remind us of our failure.

Tuesday, November 10, 2009

BASH Programming

At the this month's GTALUG meeting, Chris F. A. Johnson gave a talk on BASH programming. Chris is one of our shell programming experts and is the author of Pro Bash Programming, so I knew the talk would be informative. While most of us write simple shell scripts for automate everyday tasks, Chris uses BASH for all his application development whether trivial or complex.

BASH never appealed to me as a general programming language for one reason only: it use too many special characters as syntactic sugar. It is the same reason I never took to Perl, TCL, and even Ruby. But that's just aesthetics and has nothing to do with the capabilities of the language. And, as Chris showed us tonight, BASH is plenty capable of doing everything that you might need for writing real world applications.

Monday, November 9, 2009

True Mazinger 26

I just watched the final episode of True Mazinger and it is the best mecha anime I've seen. The series is almost non-stop action but it is all tied together with a great story. The ending is simultaneously surprising, a little anti-climactic, and a damned good setup for the sequel. Don't you just hate it when when they do that. ^_^ But don't let that stop you. Even if you are not a mecha fan (and I don't count myself as one) this anime is worth a look.

Sunday, November 8, 2009

Fun With Alpha Waves

I'm starting to enjoy myself on Wave now. At first I couldn't find anything to do that kept me interested for very long, but finding the roleplaying waves gave me something to explore further. And, a few friends are finding their way on the system, and everything is better with good friends. But, this is alpha (maybe pre-alpha ^_^) software, so there are a few humorous quirks. Well, maybe not so humorous...

For example, once you add a person to a wave, you are stuck with them. That's right, you can't delete them. I discovered this after I accidentally added someone to a wave. Fortunately it was a scratch wave, and I know the person well, because any wave member can change that wave, including adding new members. Wave has no access control yet. After a while I decided to add others the wave and just turn it into a sandbox for all my friends to play in.

I decided to do that because of another funny flaw: you can't empty the trashcan so you can't delete a wave. It gets even more strange because waves in the trashcan are still "active" so bots can find and act on the junk waves. I discovered this little quirk when the DiceLink bot seemed have difficulty finding the correct character record sheet. I remembered I had stuck an older record sheet the trash, and when I tried to empty the trash: oops, there's no option to do that yet.

Although these are serious problems, I'm making light of them because Wave is still alpha software, so some things just won't work properly yet. Now if this had a 1.0 sticker on it, I'd be slightly less forgiving.

The astute reader will have realized that the problems are linked. You cannot delete the wave unless you can also delete a user from the wave. And deleting a user from a wave raises whole bunch of other questions. What do you do with all their blips in the wave? Do you just remove the wave from the user's inbox as well? And so on. Isn't software development wonderful?

Saturday, November 7, 2009

RPGs On Wave

Role playing games were an obvious choice for a bunch of geeks looking for something interesting to do on Google Wave. Out of necessity game play must use a text based narrative style since graphical extensions suitable for a tactical style game, are not available yet. I expect that will be one the first type of Wave extension to emerge once developers get into their stride.

The narrative style is interesting because you end up with complete story written collaboratively by the players. This is something you never got when playing around a table, unless someone recorded and transcribed the conversation. I've never met anyone who would volunteer for that job!

One method for formatting the narrative is described here, but even that is likely to change as everyone gains experience with medium. Hopefully the narrative style will continue after the graphical tools become available.

If you are on Wave, then this wave will get you started. If you do not have a Wave account, this Ars Technica article explains some of the difficulties.

Friday, November 6, 2009

CPU Usage

I miss not having a multiprocessor (multicore these days) system.

While tracking down why a 720p video suddenly started losing audio sync, I discovered that Firefox was using excessive amounts of CPU. I had a Google Wave tab open so I closed that first since it is only beta (alpha?) software. Firefox's CPU usage dropped noticeably but it was still excessive. Next I closed the tab with the Google I/O conference key note videos. That did the trick. So lesson for the day is: don't open a page with ten embedded flash videos, watch one video, and then leave the tab open all day.

Unless you have multiprocessor system of course, then you want to keep all the CPUs busy. ^_^

Thursday, November 5, 2009

UPS Failure

During a brief power outage today, I discovered the hard way that one UPS was no longer working. Only after a self test did it reveal that the battery needs to be replaced. This strikes me a being a poor design for a UPS. Well, it is a cheap UPS so I suppose, "You get what you paid for it." I guess I should have been testing each UPS regularly and not assumed they would indicate a problem automatically. Assuming is bad.

Wednesday, November 4, 2009

ACTA

The negotiations for the Anti-Counterfeiting Trade Agreement (ACTA) have resumed at a meeting in Seoul, and is being covered here, here, here, and a boatload of other places. It is hard to get accurate information since the negotiations are not public and the physical documents are all water marked and traceable. That's just for trade negotiations, I remind you.

However, there are always some leaks and, if accurate, the power this agreement would give to corporations is terrifying. Any country that agrees to this treaty would be giving up all control over their internal copyright policy. The negotiations include wonderful provisions to criminalize non-commercial infringement, to disconnect Internet service of infringers, and other nasty, nasty stuff. Yeah, ACTA is getting real scary now.

I don't understand why Canada is still participating this clusterfuck pretending to be trade negotiations. We just completed public consultations on copyright reform and Industry Minister Tony Clement has stated that Canadian copyright laws satisfy all our international commitments. If he can acknowledge that, why is Canada is still involved in ACTA? Something stinks dear reader, and it has the fetid aroma of lying politicians.

Tuesday, November 3, 2009

A2f2a

There's a new site, a2f2a.com, that is trying to get artists and fans talking to each other without the middle men, who have an agenda that is not in the best interests of either artists or fans. The founders of a2f2a.com are well known and credible: Billy Bragg and Jon Newton of p2pnet.net. A2f2a.com is very new but the most interesting discussion so far is here.

The main problem will be is getting other signed artists to join the debate because they may not be able go against the record company. Bragg is the only well known artist who is posting under his own name, so I wonder how bridges he has set on fire with this. The success of a2f2a.com depends on getting more artists involved, but it won't be easy. The fans are already well represented and Bragg could use some help!

Monday, November 2, 2009

F1 Abu Dhabi

Thank you Mark Webber and Jenson Button for giving us a thrilling end to the season. The last couple of laps were just brilliant. I bet Bernie Ecclestone wishes he could arrange every race to end like that!

The Webber-Button duel made the race worth watching. It always seemed like potential fights would develop but they would peter out one reason or another. Vettel looked like he might have to fight Hamilton for the lead, but then Hamilton retired with a brake problem which handed Vettel the lead. On the other hand, if Hamilton had had a trouble free race, he might well have been untouchable anyway; his qualifying performance was awesome!

I don't have an opinion of the new Abu Dhabi circuit yet but the drivers seem to like it, which is the only opinion that really matters. The pit lane exit tunnel is interesting but a bridge would have been better, as spectators would be able to see the cars from the grandstands. And the poor marshals stuck in the tunnel would have seen more racing!

Well, it was an amazing season but I'm already wondering about next year. Several teams seemed poised to start next season well, which means we may have much closer racing that ever before. We can only hope! I haven't been this fired up over Formula 1 in maybe 10 years. The 2009 season was a real game changer for a sport which had become a little too predictable.

Sunday, November 1, 2009

Not Keeping Up

Obviously I am not keeping up with the electronics hobby scene when an item such as the Arduino passes me by. <sigh> It is ancient too, dating way back to 2005. I wish that I could claim senility or some other medical condition, but it is more likely that I simply had a brain fart when the Arduino first appeared. Read the executive summary on Wikipedia.