The dead horse rebeaten to life – How governments keeps banks alive
So, once again it happens, local governments jumps the bandwagons to save big time banks who have done a crap job at making sound and good business. Once again we have people completely misbehaving, and in general doing bad business, getting their wallets lined with more money from the governments to save them.
Personally, I don’t have a belief in either [political] direction really, but I think that if we are going to make a sustainable planetarian (as opposed to the wordinternational, which always tend to exclude countries) economic system, we need to stop promoting the current scenario with promoted competition and then giving our friends (the loosers) prizes for doing bad choices. This is contra-productive in my humble opinion, and stagnates the market and the players in a bad circle.
We have two diametrically opposite choices planetarian economical systems — in reality, no we don’t have these choices, but to make what I believe is a sustainable planetarian system. I refuse to talk about global economy as we’ve already seen where that leads.
The problem
The world willingly entered (yes yes, I’m beating a dead horse as well) a global economic system during the 1990’s, the leaderships and right wing politicos of countries jumped the possibilities, while citizens and left wing politicos where slightly defiant and backwards, something normally attributed to right wing people. Either way, we entered the system, but only partially. Banks (swedbank, hypo real estate, fannie mae, et al) and global mega corporations (ibm, dell, coca cola company, disney, ford, nestle, et al) are using the possibilities to its fullest, they are no longer national entities, they are everywhere and anywhere and noone except themself has a decent window into the ins and outs of their economical structures. And no, no, no — Nasdaq, SEC, NYSEC, and none of the so called third parties have a decent looking glass into these kind of megacorps. In actuality — the ones who where in some part supposed to be our warrants against misbehaviour, where the ones misbehaving the worst in this round.
National governments and local governments are still living in the local economic system, they know part of what is happening, not even close to everything. They are still regarding banks and other megacorps as local entities, which does good for the locals, and which needs local support in bad times. For examples, look at Lehman brothers, Hypo Real Estate or SE-banken back in the days.
Are they really worthy of our [local] support? As it currently stands, the economical machinery doesn’t work. It’s out of sync with reality, fantasy sums of money are passing around every day in the forms of loans and 1’s and 0’s.
I will pull a weird example from a game I’ve played for quite some time, eve-online (It has it’s own problems, admittedly), to show how numbers can be misguiding. Recently, there’s been a gigantic war between two different factions — GBC and NC. Normally all “kills” are gathered on specific webpages for each alliance, GBC has several alliances, and NC has several alliances as well. Now looking at any one of those alliances killboards for a big battle, you always have the “local“, ie the alliance who owns the killboard, looking as if they came out as the winner of the battle. Now, go over to an alliance on the other side, it looks the same way, the “locals” where winning. In this case, you only get a partial overview of the fight — you get the losses of that specific alliance but none of the others, but since everyone from all alliances on one side are sharing the kills, all the kills are showing up on any one of the respective alliances killboard.
This [eve fights] alone is hard to get accurate numbers on unless you do some serious data aggregation and acquisition, now let’s try to get accurate numbers for a real life company operating in 50+ countries, especially if anyone at any level in that company has something to hide? And if the one who has something to hide, is the one who is supposed to be supervising the market?
Choices
The situation as it looks is untenable, we are currently fighting a fire with fire, and most likely moving problems from one place to another.
There are of course, several different choices imho, but to be perfectly logical, there are a few different changes that must be made.
Choice number one, go liberal. Do not engage in saving the different banks in financial crisis, let them be devoured by bad choices and the strong ones survive. The problem is, how do you make this work on a planetary level? Ie, if the banks in your region are not saved, they get a disadvantage in comparison to banks from regions which have regional support in bad times, hence putting darwinian rules out of the calculation. In other words, a planetary agreement must be reached for this to happen.
Choice number two, go all out socialistic, save the banks, but in return all the banks should either be run in such a way that their own proceeds will pay for either their own demise (Ie., make them pay for some kind of government run insurance, which must reach a zero result over a defined timeline), and also make the figureheads and CEO’s of financial institutions and banks personally responsible for what happens inside their organisation. Make it personally hurt whoever is responsible. This also requires quite a lot of unison between countries as to not provide too much leeway for any one of the banks around.
In summary, something needs to be done about this. Every 15-20 years or so we have another financial crisis due to more and more greed, and mostly it’s about the same type of people doing the same type of mistake over and over again.
Moving interface from Enterprise Architect to C include file
After writing this, i realized the output after this is almost 100% the same as I got from exporting the original class as a C header from Enterprise Architect, still putting this out there as it’s a nice regex. Cut n paste each function line from EA to the header file. format will be a bit screwed up, for example:
functionname(varname: vartype, varname2: vartype2): void
Begin with moving trailing return type to beginning:
:%s/^\(.*)\): \(\w\+\)$/\2 \1;/g
Get all varnames and vartypes into correct positions:
:%s/\(\w\+\): \(\w\+\)/\2 \1/g
All function declarations should now be fixed.
Dangling locks in the Subversion tree
I recently ran into another rather peculiar and interesting case with subversion. As I’ve already explained, I don’t have actual physical access to the subversion servers we are perusing for our project. We use TortoiseSVN for access to the repository on our local systems.
My boss was working with some excel and word files checked into the repository. He had template.xls locked as he was working in it, he decided to rename it to a template, so template.xlt it is (and checked in). After doing some more work, he decided this was a bad idea, so he changes it back to template.xls, and tries to check it back in again… no luck, it wont work.
15-20 minutes worth of investigation later, we found the problem. TortoiseSVN had been configured to always check “Keep Locks” on commit, hence the client kept the lock when he commited the template.xls deletion. To fix this problem, run svnadmin lslock and then svnadmin rmlock the file in question. Please note that this requires actual access to the physical subversion repository. Http or svnserve will not do in other words.
A step by step on how to cause the Dangling lock problem — All of the actions are done via TortoiseSVN interface:
- Create a repository.
- Check out the repository.
- Add a file to the repository, set the svn:needs-lock property.
- Commit the file.
- Lock the file.
- Change name of the file, and check the “Keep locks” checkbutton.
- Commit the changes.
- Change the filename back to the original filename.
- Commit the change. This step will fail.
This is a rather funny problem imho :-). We finally managed to get it fixed after contacting the IT department and sending them the command. 10 minutes to cause the problem, 20 minutes to analyze it, 20 hours to wait for the fix. Sometimes there should be less depth in organizations.
In windows, noone hears you scream
As you’ve all noticed, I’ve been working overtime with Windows as of late. I’m working in the embedded development industry, and wherever I turn, there is windows. To be honest, I don’t get this industry and why the hell they keep running in this environment. Most of the people I’ve met in the trade are brilliant minds and know what they are doing, but the business in general are very backwards refusing to let go of things.
Also, another reason for the entire trade being stuck in such a fashion is all the tools produced. You have a market catering to the same market with software and tools, developing for a single common development platform — Windows. And you have product lifetime to take into consideration…. There are still a bountiful of products out there that was developed before windows 3 was created.
All of this is creating a rather stagnant trade where it’s hard to get a move on, test new things, do something differently. Just take my last few weeks of working with subversion/trac/cruisecontrol on windows. Had I known just how much work I would be forced into just because someone else decided that we run it on Windows XP, I would have protested loudly.
I can’t simply get rid of this horrible abomination of an operating system in this trade, thats the sad but simple fact as of today. Sure, I’ve managed to get trac and cruisecontrol into the project, and we use subversion since before. But, I still need Windows for proprietary development environments, proprietary fileformats from customers, proprietary software from proprietary software companies, and so forth and so forth. And before you say anything, unfortunately I’m really stuck this time, proprietary IDE and compilers for weird hardware. Every time I touch an embedded project, it’s the same thing “oops, we gotta use this processor or that dohicky which requires software Y which requires Microsoft Windows”.
What’s just taken me 3 weeks in Windows — Basically, setting up subversion/svnsync/trac/cruisecontrol and some small work around that — was accomplished in that time, even though I did the same in less than 2 days just before in Linux. As we’re building for target via cruisecontrol, we where stuck with using Windows as the compilers where proprietary…
I’m a Unix person by soul, I love it, it’s natural to me, it’s my home. It’s where I come from! I feel like I’m screaming at this insanity asylum that is Windows, but nobody is listening to me. The entire Operating system is befuddled with incompetence, idiocy and bad design choices.
Site updates cont.
I thought I’d make an status update available, to let people know. The updates are still ongoing, and I am working on them. The new site is POSH, lots of CSS and div’s, and… well, to be honest, it scares the hell out of me. From the looks of it, microsoft has never even heard of W3C, as badly as internet explorer is behaving. Yes, I’m actually trying to make the site follow standards, and work even on Internet Explorer. Ok, I admit it, Explorer 6.0 is most likely screwed. Anyways, for those that wish to see the new design, take a look at this screenshot. Design is pretty much done. Will start working on the simple bits this week, databases and so forth.
Svnsync automatisation via Windows Scheduler
Filed under: Configuration Management, Development, Windows
Recently I’ve been setting up for a project, as you might have noticed, and one of the problems we ran into was the fact that we have a centralized subversion repository. We don’t have access to control or install anything on the actual server unfortunately, so hence we can’t install trac on that system, as previously explained. The solution is to sync the main subversion databases to the trac server as previously explained.
A secondary problem arising from this, is that we can’t actually change the hook files of the master repository. The solution to this, is to add a synchronizing scheduler. As I was stressed, and had no time to deal with this properly, I had to run with the Windows Scheduler of all horrible solutions. The following explains how to set it up.
Windows Scheduled synchronize Task
Warning! The windows scheduler does not start automatically when you reboot etc. If you do this, the task restarts at it’s start time, so if it’s set to run at 00.00 every day, and then every 5 minutes, it will restart and start running at 00.00, not as soon as the machine is started up again. This is pure evil.
A scheduled task is set up as follows, create a bat file (ie, c:projectssvnprojectsvnsync-project.bat):
svnsync synchronize http://localhost/svn/project –sync-username slaveuser –sync-password tjohej –source-password password
c:Python25Scriptstrac-admin.exe c:projectstracproject resync
The Second line unfortunately has to be done to resync the new changes with the trac database. After this, create a scheduled task in windows as follows:
- Go to start -> control panel -> scheduled tasks
- Click Add scheduled task
- Click Next
- Click Browse…
- Browse to your svnsync-project.bat file, as described above. Double click it.
- Set name (default is ok). Perform this task: Daily
- Click Next
- Start time: 00:00, Every day, Start date: today
- Fill in username/password to run it as.
- Select open advanced properties for this task. Click Finish.
- Go to tab Schedule. Choose Advanced.
- Click Repeat task, fill in Every 10 minutes, and click Time and fill in 23:59
- Click OK.
- Click OK
- Done.
This could most likely be done from cruisecontrol, but as stated, i’m stressed. I hate windows by now (at/cron is just sooo much nicer to handle).
Linux iMON pad remote controller with lirc
Introduction
In short, the SoundGraph iMON PAD that came with my SilverStone LC20 doesn’t work very well with the default ubuntu 8.04 installation. I’ve previously discussed how to get the VFD running, and am now turning my attention to the remote control and how to get it decently working in mythtv with lirc.
Let’s start by looking at the following image:
In short, red files are “main steps” which the “packets” flow from the remote control, and finally reaching lircd where they are converted from a binary stream into something intelligeble (with the help of the lircrc file, which specifies names for the different hex codes).
blue boxes are configuration files, green boxes are “users” of lircrc — ie, they will connect to lircd and receive all the updates from lircd as needed. Finally, magenta boxes are different things needed to build to get stuff running.
Installation
Everything will work out of the (ubuntu 8.04) box more or less, except for the big blobby nice mousepad on the remote control. That one is a mouse — sort of — and doesn’t work at all for me, your mileage may vary however (ie, it didn’t work for me, it might change fast)
Install Xorg, mythtv, mplayer, linux-kernel sources (needed later) and lirc via apt-get or your prefered frontend. Configure the packages, start xorg and make mythtvfrontend start from the .xinitrc if you so wish, and then start via the startx script, or rather make it start up as you feel most comfortable with. I’m an old fart and I like my startx.
Once all this is set up, all things should work, except the remote control, as already said. Most buttons will work, but not the big blobby knob (a.k.a. mousepad).
HACK
Well, it’s time to hack the horrible hack I guess. Download lirc-0.8.3 from www.lirc.org. Also, download the pad2keys patch from http://brakemeier.de/electronics/vdr/lirc-imon.html.
1. Unpack the lirc package.
2. Patch the lirc package with the pad2keys patch (it will most likely fail with some chunks, just look at the patch, and add the code manually, are you a hacker or not?!).
3. Configure and make the lirc package. Don’t install it.
4. run uname -r, note your kernel version (2.6.24-19-server for example).
5. run “locate lirc_imon.ko” (have you updated your locate database? man updatedb, hint hint). If there are more than one in the list showing up, find the one in /lib/modules//blah blah.
6. Copy lirc-0.8.3/drivers/lirc_imon/lirc_imon.ko to the file you found in step 5, and replace the old one.
7. Either reboot, or if you know how to rmmod lirc_imon.ko and modprobe the new one. This might fail if you followed my previous post on islcd=0 etc, if you did, remove that line again.
Don’t forget to edit your lircd.conf with the new IR codes from the brakemeyer.de webpage. Set PAD key’s to good values, such as this:
Up 0x690281B7
Right 0x688A81B7
Down 0x688291B7
Left 0x6A8281B7
Finally add them to your lircrc in a good way, such as this:
begin
prog = mythtv
button = Up
config = Up
delay = 2
repeat = 1
end
begin
prog = mythtv
button = Down
config = Down
delay = 2
repeat = 1
end
begin
prog = mythtv
button = Left
config = Left
delay = 2
repeat = 1
end
begin
prog = mythtv
button = Right
config = Right
delay = 2
repeat = 1
end
So, you’re now a hacker of immense proportions. Celebrate with some mead and grow a beard like the rest of the hackers ;-).
Trac on separate server from subversion
Filed under: Configuration Management, Windows
#!/bin/sh
SVNSYNC=/usr/local/bin/svnsync
$SVNSYNC synchronize URL_TO_MIRROR_REPO –username=svnsync –password=svnsyncpassword &
exit 0
Trac on windows
Trac is a rightfull bitch to install on win32 as it requires very specific version matching of packages. This is a long winded installation note with the more or less latest versions available as of this writing.
I’m hoping to get working on TortoiseSVN and Trac integration once this is done (ie, make tortoise automatically set variables etc sent in change notes, which can hence update the issue tracking systems in trac and so forth. The way of working is really really sweet imho, and I think it could be a really nice way of working. I’m just sad that I have to set all this serverstuff up on windows though.
Let’s begin with a list of all the installation files used:
WampServer2-APACHE229.exe
svn-win32-1.5.2.zip
mod_python-3.3.1.win32-py2.5-Apache2.2.exe
These packages should be fairly simple to get started with. Install them straight on, in the order mentioned.
Unsupported version control system “svn”
For an Apache server here’s the essentials:1. Copy bin/mod_dav_svn.so and bin/mod_authz_svn.so to the Apache modules directory.2. Add the Subversion/bin directory to the SYSTEM PATH.3. Edit the Apache configuration file (httpd.conf) and make the following changes:3a. Uncomment the following two lines:
#LoadModule dav_fs_module modules/mod_dav_fs.so#LoadModule dav_module modules/mod_dav.so3b. Add the following two lines to the end of the LoadModule section:LoadModule dav_svn_module modules/mod_dav_svn.soLoadModule authz_svn_module modules/mod_authz_svn.so3c. Add the following to end of the file.<location /svn>DAV svnSVNPath c:\projects\svn\testAuthType BasicAuthName “My Subversion repository”AuthUserFile “c:\projects\svn\test\conf\passwd” Require valid-user</location>
<location /mpinfo>
</location>
<Location /trac>
</Location>
Ubuntu 8.04 lirc_imon VFD’s
I got a silverstone LC20 chassi with a built in iMON vacuum fluorescent display (VFD) and IR remote control. I recently upgraded to Ubuntu 8.04 from 7.10 — yes I know, I am a bit late, but generally you don’t have to deal with kinks like this one when that happens.
Ubuntu 7.10 -> 8.04 changed the behaviour of the lirc_imon module pretty little, yet radically. The old default was to treat all iMON driven screens as VFD’s, but it now defaults to treat all iMON modules as LCD modules instead.
This results in tons of errors being pumped out (10’s-100’s per second), like this one:
Sep 9 21:35:00 fs1 kernel: [ 71.481262] /var/lib/dkms/lirc/0.8.3~pre1/build/drivers/lirc_imon/lirc_imon.c: lcd_write: invalid payload size: 32 (expecting 8)
Also, the VFD will not work. To make a long story short, to fix it, you need to tell the kernel module that the VFD is in fact a VFD and not a LCD, by giving the kernel module the option islcd=0. For example, in /etc/modprobe.d/options:
options lirc_imon islcd=0
I hope this helps anyone out there. I will soon try to have something together on getting the iMON PAD working properly. The basics was simple to get working, but the “mousepad” has been a general pain to get up and running properly.