My thoughts on Windows 7

I recently installed Windows 7 on my home PC, and thought I would share my observations with anyone who is interested.

For those of you who are unfamiliar with me, I’m primarily a Linux user, and go to pretty extreme efforts to use Linux for pretty much everything. On rare occasion however, I find it necessary to boot into windows for a work related reason (generally becuase of people using proprietary file formats that I can’t open in Linux, although this is getting rarer and rarer. More often I boot into Windows because I want to play video games.

I did my install thusly: I purchased a new 1TB hard drive for all things windows. It’s probably way more than I need, but I thought it would be nice to have the space to just install all my video games, and not worry about how much drive space I have. Hard drive space has become so bloody cheap. I then installed Win 7 on the new drive, and because Microsoft can’t imagine anyone using any OS besides theirs, I had to use a Linux rescue disk to reinstall grub on the mba. It’s a quick process, but it’s just typical Microsoft arrogance, and I had to dig around to find the rescue disk.

Of all the things I’m going to complain about, none of them are surprising. They are all the typical bitches I have about Microsoft, and about software developed for Microsoft OS’s. I see the failures as usually coming from one of two sources: 1) marketing to the least common denominator -> i.e. they try to make the software pleasant for dumb asses, as opposed to rewarding people who take the time to learn, or try to learn, how to use the tools efficiently. This leads to fundamentally inefficient and unwieldy tools… and 2) Sheer fucking arrogance.

Okay, so now I can boot into Win 7. One of the reasons I upgraded is I was gradually getting to the point where many of the drivers of software I want to use aren’t supported, or don’t work on XP. My laptop came with Vista, so I tried it out for a few weeks, but I got so fucking annoyed at, I just wiped the windows partition from my laptop altogether. It’s now a linux only box. I did try to install Win 7 on the laptop, but guess what! Win 7 can’t recognize my GeForce GO graphics card as Sony has apparently done something non-standard with it, and won’t support any OS other than Vista on that model. So I can use my graphics acceleration correctly under Linux, but not Windows 7. That is absolutely abysmal.

Okay, so what, my main gaming machine is desktop, so let’s install it on there. Apparently it recognized my Cre

ative Sound Blaster card, and downloaded some driver for it off the net (without asking me), and then crashed and burned, so I had to dig out the original install disk to get my sound card working. That’s par for the course with Microsoft products, so fuck it, what am I complaining about.

That’s my biggest bitch about Microsoft products: The usual litany of bullshit that they have been heaping on us for so long that most users just take it for granted and don’t even think to complain about it. Of course Microsoft still hasn’t figured out how to install an OS without rebooting multiple times. Of course Microsoft gets to decide when to reboot your computer by default. Of course some application developer can decide to just reboot your fucking machine for you after an install. Why the fuck would you want to make those kind of decisions yourself? It’s not like you were doing anything important when we rebooted right? Microsoft and the developer culture around Microsoft makes it basically impractical to try to do anything with your computer while installing or doing any kind of system administration. Fuckers.

But of course I expect all of that Bullshit. I even expect the computer to come pre set up with a bunch of fucking folders that I don’t want, organized in a way I don’t like. Microsoft would never dream of letting users set things the way they like. Microsoft knows how you should organaize your data better than you. What I had hoped would be corrected in Windows 7 over Vista, was the interminable waiting for the OS to do some trivial fucking function, like delete a folder, search for a file, or whatever. You know, the shit that should take about a millisecond for a computer to accomplish, that is part of your daily PC work? I can’t tell you how many times I had to sit and wait for mintues for Vista to delete, open, or move a folder.  It’s just fucking intrusive, and kills my productivity or enjoyment.  So how’d Microsoft do with all that?

Okay, I’ll grant, it seems a little better.  I’m not screaming in frustration as much as I was in Vista, but it’s still worse than XP.  So my grade for 7 is:  SAD.  It’s sad that the best Microsoft could do was to make the user experience for 7 half as bad as they had for Vista (by comparison to XP which is nothing to brag about either).  It’s sad that even though Microsoft works with all these hardware vendors, and these hardware vendors design and test their shit for windows systems, but it’s still faster to get my system set up in linux than in Windows.  It’s sad that people are raving about how great 7 is because it’s an improvement over Vista.  They need a better basis for comparison.

Here’s an example:  I go into my XP drive to copy some game same files over.  First folder I check, I’m told I don’t have the permissions to access that folder.  Do I want to get them?  Yeah I fucking want to get them.  Okay, I’m willing to grant that this might serve a security purpose.  For example  I have to log in as root to access someone else’s folder in Linux.  That’s a good idea.  But do I have to put in a root password?  No.  It’s just a waste of time.  But whatever.     The real problem is it took win 7 almost 2.5 minutes to get permission to access the folder.  Seriously, WTF? There’s no excuse for that.  If I were on the team responsible for that piece fo shit, I’d be ashamed to put it on my resume.  As I type this, I’m waiting nearly 20 minutes for CoD4 to install Microsoft DirectX for Windows.  Why?  How can this possibly take so long?  I decide that something must have gone wrong, so I click cancel, and lo and behold when I start CoD everything is ready to go.  It just hung for some damn reason.  While I’m discussing DirectX, why is it that something like 80% of the games I install install DirectX again.  Over and damn over, the same damn version of direct X.  Is it because the programmers are too laze to write code to check if DX is already installed?

Here’s another great example.  After my clean install and after one of the automatic reboots, I was surprised to find a Creative Sound Blaster logo on my screen, along with a promt whether or not I want to install drivers.  I’m thinking “Awesome”, until after several minutes the process crashes and reboots my computer.  Slightly miffed, I dig out the install disk for the drivers and try that:  BSOD.   Now let me say, that’s fucking pathetic.  BSOD on a driver install on an otherwise clean install of Windows?  WTF?  You assholes should be fucking ashamed of yourself.   So I go to Creative’s site to download the right drivers… lets see what happens… I better save this post in case it BSOD’s during install.  Several minutes for the driver install  (WHY?)… should I make a tee?  What if it reboots, I’ll miss the error message…  Joy!  Installation completed successfully.  It asks me if I want to restart now…  I decide to see if i can play CoD with sound or not, and will reboot only if necessary.  So I start CoD and it promts me to install Microsoft DirectX… Again?  Why?  WTF?  I actually RAN CoD just five minutes ago, and now I have install more DirectX stuff?  Probably some audio components…  But still now sound, so let’s reboot again.  How many reboots is that until I can actually play a game?  At least 5, and that’s not counting the BSOD’s.  Count them and it’s more like 10.  No wonder PC gaming is so much less popular than console gaming.

So I reboot, and then there’s a whole monitor covered with Creative marketing crap.  It tells me that I should check for updates.  But I just downloaded the drivers from Creative’s web site, surely they are up to date?  Well, let’s check.  It will surely come as no surprise to you that indeed there were critical updates for my drivers, which I had not 5 minutes ago downloaded from Creative’s site.  That this is no surprise tells you how much Microsoft’s Customers should better be called Microsoft’s Bitches.   And guess what I have to do as soon as the updates are installed?  Yeah, you got it, reboot again.

Another full screen marketing assault from Creative tells me I really ought to register my product.  What the fuck is my serial number?  Ignoring them I notice that Steam has finished downloading fallout 3, and I think “hey, I bet this’ll give me more to bitch about in my blog”, so try running that.  Guess what it has to do?  Yeah, that’s right, install direct X.  Then it has to install some other crap, and when it reaches “Microsoft .NET Framework 3.0 x86 Setup” it tells me I must use “Turn Windows Features on or off” in the Control Panel to install or configure Microsoft .NET Framework 3.0 x86″.

Anyways, I finally got it running well enough to play a game or two.  I have more issues with my soundblaster card on windows than i do in Linux.  So I gotta say, Windows is harder to get working than Linux.  Big day.

America’s lack of conservatives

My mother and aunt Herta called me last night. I forget how we got to it, but I was explaining to Herta how low taxes are here in Switzerland, and how much more the Swiss government provides with that money than the American government manages to provide despite a much higher tax rate. How big is the discrepancy? I have roughly %13 in withholdings, including all taxes and unemployment insurance. Switzerland has a private, but highly regulated medical insurance system (a lot like what Obama is trying to push through), so I do have additional health care costs, compared with other countries. That money pays for an incredibly stable and responsible government, which takes great pains to protect the air and water quality, provide an excellent education system with top class university educational available, virtually for free, for anyone willing to work for it. They have the best mass transit system I have ever seen anywhere. They do a commendable job protecting the environment. Crime is virtually non-existent and emergency systems and infrastructure are second to none.

So we got to talking about how this works so well, and I said I thought it was partly thanks to the excellent system, and partly thanks to the culture (which has its defects, but certainly contributes to the well functioning democracy). Herta made the comment that yes, the Swiss are very conservative, responsible voters. So I took a breath and said, well, yeah, that’s right, the Swiss are conservative in the sense of the english adjective, but not in the sense typically used in American politics.

The problem is, there is no real conservative political group in the United States, if we consider conservative to mean cautious, thinking far into the future, and making sober careful political decisions. American so-called conservatives, i.e. the Republican party, are dangerous radicals. Whenever the Republicans are in power they institute dangerous and radical social, political, environmental and economical changes, whose consequences often take many years to manifest. A real conservative would carefully weigh the merits and demerits of opening new territories for exploitation. A real conservative would have looked at the trends with oil production and the consequences of oil dependence and global climate change back in the seventies, and begun making plans. American so-called conservatives just say “deregulate!”, “drill baby drill”. The Republicans, who call themselves conservatives, essentially follow the greedy-algorithm, which basically consists of the “take the step which gives me the largest immediate gain”. This algorithm leads to dangerously unstable outcomes, both in computational science, and in real life.

Fedora 12: Configuring it like I like it.

Well, Fedora 12 is out. I use Fedora, because their target audience is people who would be inclined to, and be able to, contribute to free software. This means the target audience is more savy than the target audience for, for example, Ubuntu. I’m tired of OS’s aiming at the least common denominator. An OS that’s efficient for a skilled user differs from one that attempts to idiot proof things.

Of course there are a few steps needed to get Fedora working like I want it to. They are only slightly modified from my Fedora 11 steps:

  1. Fix the DNS lookup bug. On all the machines I administer, this manifests itself as massive dns lookup failures, with the effect that although you can ping an address, you don’t have any internet access (no web browser, no yum…). This answers the question: I have an internet connection, but I can’t use the web, WTF?
  2. Access to fusion.  Fusion provides all that useful stuff that’s not in the default fedora repo, like mplayer and codecs that might be subject to patents.
  3. Add MP3 support/get Amarok working.
  4. Get Flash working (people need their youtube).
  5. Graphics acceleration
  6. Add ntfs support.
  7. Disable physical file folders.
  8. Enable Ctl-Alt-Backspace
  9. Deal with the “my laptop hangs while booting bug” if applicable

1. Fix the DNS bug
Apparently there is a known bug, which mucks up the domain name lookup with certain ISP’s, of which bluewin (my ISP) is one. In the bug description the complaint is that you get unreliable name lookups, but in the case of bluewin (my isp), you get no successful lookups. A workaround is:

  1. Find out the network interfaces the machine has using the command “route -n”.
  2. Create a file: /etc/dhclient-< your network interface name here >.conf consisting of the line
    prepend domain-name-servers 127.0.0.1;
  3. Start dnsmasq (‘service dnsmasq start’).
  4. tell dnsmasq to start every time the computer does (‘chkconfig dnsmasq on’)
  5. restart the network connection (‘service NetworkManager restart’)

So on Sunny the Sony I want to get my wireless LAN working right on Bluewin. Running ‘route -n’ tells me my network interface is ‘wlan0’ (which I could have guessed). So I do the following (as root of course):

echo 'prepend domain-name-servers 127.0.0.1;'  >  /etc/dhclient-wlan0.conf
service dnsmasq start
chkconfig dnsmasq on
service NetworkManager restart

And presto, my internets work again. I don’t put it on this list, but at this point I run a ‘yum -y update’ to get the base install up to date.

2. Access to fusion:
Fusion is a merge of the largest existing repos, and means to be the extra repo for fedora, including (separate) free and non-free packages that Fedora is not able to ship of license or export regulations.  The following will get you both the free and non-free (as in freedom, not in cost) repo’s:
su -c 'rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm'

3. mp3 support.

I still use Amarok, which I am still unsure about recommending. I found Amarok 1 vastly superior to the alternatives however, so I’m hoping Amarok 2 eventually becomes awesome. In addition to Amarok, I want lame for when I rip my CD’s for my car mp3 player, mp3 support for Totem, etc. So I do the following:

yum -y install amarok lame* gstreamer-plugins-ugly xine-lib-extras-freeworld

And things seem to be running all right.

4. Get Flash (i.e. Youtube) working This solution comes from here
Go to  http://get.adobe.com/flashplayer/ , get YUM for Linux, and perform the install.  Then,
yum -y install flash-plugin libcurl
yum install nspluginwrapper.{i586,x86_64} alsa-plugins-pulseaudio.i586
rpm -ivh adobe-release-i386-1.0-1.noarch.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
5. Enable your 3d hardware acceleration.

While it’s possible to just download the nvidia installer and get things running, you’ll have to recompile the driver every time you update the kernel.  So it’s easier to use the fusion repository.  You’ll also have to disable the nouveau drivers, which prevent the kernel from loading the nvidia drivers.  This can be done by recreating the initrd, or by adding a command line option to the kernel.  I do the former with the following command:

mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img
dracut /boot/initramfs-$(uname -r).img $(uname -r)

It’s also necessary to lower the system protection so SElinux doesn’t stop the driver from loading:

setsebool -P allow_execstack on

Finally, you can install the drivers:

yum -y install kmod-nvidia-PAE

Obviously, if you aren’t using the PAE kernel, you’ll have to adjust. You also have to adjust the installed driver if you’re using a GeForce5 or older card. Details can be found here .

6. Make the fat drive writeable, and add NTFS write support, so people can easily work with Windows.
For any fat partition, change the umask in fstab to 000. For NTFS support:

yum -y install ntfs-config.noarch
7. Disable “physical” file folders. This is the annoying behavior, default in gnome, that opens a new window for every folder that you open. Get rid of it by double clicking on a folder, and in the resulting window open edit->preferences->Behavior, and check the box for “Always open in browser windows”. There is a scriptable way to do this, so if someone wants to tell me, please do.
8. Enable ctl-alt-backspace.It always frustrates me when a distro moves away from supporting the power use to supporting the neophyte. I think there are plenty of neophyte oriented OS’s and distros around. I use Fedora instead of Ubuntu because Ubuntu aims too much at the dumb asses, and Fedora tends to support the people who want to learn and be efficient. Unfortunately the Fedora guys do make dumb-ass-friendly decisions, such as the decision to disable ctl-alt-backspace, which I find to be a very poor decision. Who hits this key sequence by accident? Anyway, to enable it in Fed 11 do System->Preferences->Keyboard, choose keyboard layout options and enable the checkbox for “key sequence to kill the x server”.
Fedora claims to be aimed at people who are willing and able to contribute to open source software.  I think people who fall into that category would prefer to have ctl-alt-backspace enabled by default.  What do you say guys?
9. Fix the tpm_tis bug
On several laptop models, including my Sony SZ750N, there is a bug which results in fedora seeming to hang at boot. In fact, it just boots very slowly, forcing me to wait about 6 minutes, occasionally putting out something to the effect of: “tpm_tis: 00:0a 1.2 TPM…” etc. etc. There’s a discussion of the bug here. The workaround is to add “tpm_tis.interrupts=0” to the kernel boot options (e.g. by editing grub.conf).

Java Gripes

I, for my sins, am now programming in Java. By now I have a lot of experience programming with a pretty large number of programming languages. Java, C++, C, Basic, Visual Basic, SQL, Python, Perl, php, Matlab, etc.

While I have to admit to having a prejudice against Java as YAPL (Yet Another Proprietary Language), I knew that in all likelihood I’d be working in it for some time, and I did my best to reserve judgement and find what is good in the language.

By now though, I think I’ve gotten good enough in Java to have an informed opinion. While Java has its strengths, and it could certainly be worse (it could be visual basic for example), I’m generally unhappy with it. I think the big problem I have with Java is it marketed to be used in application domains where it simply isn’t right choice. I suspect that for medium sized projects, free projects, projects which require a heavy network integration or should run as an applet, it’s probably a good language. For certain problems I would even believe that it’s the best choice.

But for large, complex projects, in particular projects in which you want to sell a binary and not sell a source code, forget it, Java’s a nightmare. But I don’t want to get into an encyclopaedic discourse of the ills of Java. I actually just want to use this forum to vent my frustrations with the language, and keep a kind of running diary as problems cross my mind. I suspect it will be useful when I need to explain to someone why I don’t care for a language. Normally when I get involved in such conversations my frustration is to palpable for me to explain my concerns lucidly: I’m to busy trying to get my head above the frust.

For today, let me just gripe about how Java has too many advocates. I suspect that this ill, along with most of Java’s ills, stem from the fact that java is owned by a corporation which expends a lot of money and energy trying to brand the language, generate a community, and in general get people feeling all tribal about being a Java programmer. Consider this blurb on the back of “Killer Game Programming in Java” which has on it’s back cover blurb “As a result [of poor documentation] Java has become a second-class citizen to C, C++, and assebly language when it comes to hardcore game programming. This book changes all that…”

Ugh. That’s just typical of the Java world. The book jacket isn’t trying to sell a book, it’s selling Java to a problem domain. The fact is Java isn’t the right choice for a “hardcore” game. My understanding of the term “hardcore gaming” is pretty much, by definition, to be “resource intensive”. That means efficiency and complexity (both algorithmic and code-complexity) are an issue, and that’s where Java just isn’t a good choice. Not only that, but games tend to be commercial undertakings, which means selling binaries and license management etc, which means obfuscation, which means you can’t break your code down properly into modular units and libraries. Generally if it’s really computationally intensive, you want to manage your own memory…

Now, I have to use Java for a 3D application. I have no choice. So I’m happy to have the book and I’m sure it will be useful to me. I’m also sure that there are a number of applications for which Java’s 3d apps are a good choice (smart phones, web apps, free software projects), but trying to convince the reader that the only thing keeping Java from being as good a platform as C++ and assembly is the documentation, well that’s just disingenuous shilling. The Java community is like the P.T. Barnum of programming communities.

Atheism and the holidays

Well, Switzerland just passed an anti-minaret initiative, which forbids the construction of new minarets in Switzerland.  It was a very dissappointing result.  Preliminary polls indicated that only 36 percent of Swiss favored such a law, which leads  me to believe that the racist, fear-mongering, irrational and emotion-based ad campaign was successful.  Members of the EU made public statements to the effect that ‘some issues shouldn’t be up to the people”, in other words, Switzerland suffers from an excess of Democracy.

Well, sometimes Democracy leads to poor results, but so does every other form of government.  Who decides what gets to go to the people?  Would Switzerland be better off with a top-down psuedo-democracy like the United States, where the corporations reign so supreme we’re struggling to impose some oversight on health insurance providers?  Nuts…

Now me, I’m almost okay with the minaret ban.  The only real problem is, it’s discriminatory.  The SVP claim that there is a need to  ban minarets because they symbolise political power of a religion.  I actually agree with that completely.  However, to be fair, we need a ban on all new religious towers.  Band the goddamn church towers I say.  I can’t tell you how many people I know who get awoken by goddamn church bells every weekend.

Bettina was so upset she started talking about moving to the states.  Well, if we ever fix our health care system, that might be something I would consider.  Certainly I don’t think such a ban would stand up in America, but that’s largely because we have such an undemocratic system of government, where the laws scarcely reflect the will of the people.    On the other hand, religious tolerance is a deeply engrained ideal in America, so perhaps a similar vote would turn out differently there.  I’m not entirely sure.

America does idolize religious tolerance and freedom.  You have the freedom to believe whatever you like, as long as you choose to believe some irrational bullshit based on some book written by a lunatic or a charlatan at least a hundred years ago.  It’s perfectly acceptable to believe that god screwed some virgin 2000 years ago, that the earth is only 4000 years old, that jesus actually lived in the states at some point and that the indians are the lost 13’th tribe of Israel.  But god forbid you believe in reproducibility and the evidence of your senses.  God forbid you believe in rational thought.  If you conclude that the idea of a cosmic father figure is kind of silly, well, apparently you’re as bad as Hitler in America’s eyes.

Think I’m exagerating?  Maybe.  The NYT has a nice article about secular humanists, who are conducting a billboard campaign.

“We don’t intend to rain on anyone’s parade, but secular people celebrate the holidays, too, and we’re just trying to reach out to our people,” said Roy Speckhardt, the executive director of the American Humanist Association. “To the degree that we are reaching out to the godly, it’s just to say that you can be good without god. So their atheist neighbor down the street shouldn’t be vilified as though he is immoral.”

There have been some interesting responses:

The head of the Catholic League linked secular humanists to figures like Hitler and the serial killer Jeffrey Dahmer. The publisher of “Santa Claus Is Coming to Town” complained about the signs. In Cincinnati, a billboard that said “Don’t believe in God? You’re Not Alone” had to be moved after the owner of the billboard property said he had received threats. In Moscow, Idaho, a sign that said “Good without God. Millions of humanists are” was vandalized twice in three weeks.

Man, so secular humanists are like Hitler and Jeffrey Dahmer. I found the following bit particularly humorous:

“It is the ultimate Grinch to suggest there is no God during a holiday where millions of people around the world celebrate the birth of Jesus Christ,” said Mathew D. Staver, founder and chairman of the Liberty Counsel, a conservative religious law firm, and dean of Liberty University School of Law in Lynchburg, Va. “It is insensitive and mean.”

I just want to mock the guy for using the word “Grinch” in such a dumb way, and to further mock him for working for the “Liberty University”, and being chairman of the “Liberty Council”. How very newspeak.

You know, as an atheist I’m constantly subjected to religious propaganda, in advertisements, in television shows and movies, at people’s weddings… recently I was at a wedding where the priest recited that verse that goes “and the lord god gave us dominion over the earth and all the animals and all the fish and the sea… be fruitful an multiply…”. Is there a more harmful belief in this day and age, than to think that we should dominate the planet, that we need more children? What we need is a little more respect for our fellow living creatures, rather than more dogma saying we’re somehow special and it’s okay for us to do whatever we like to the little fishies, as they are ours to do with as we see fit.

On the other hand, I’m encouraged that the percentage of Americans identifying themselves as having no religion has more than doubled since 1990. I think we can thank the religious right for giving religion such a bad name, and encouraging people to start thinking for themselves.

An open letter to Antonio Maria Costa

Antonia Maria Costa, the UN “Drug Czar”, has written a letter to the guardian asking “How many lives would have ben lost if we didn’t have controls on drugs”. It riled me up enough that I had to shoot off a response:

One has to wonder if Mr. Costa believes the nonsense he is promulgating, or he is simply performing his function as a propaganda minister for the prohibition industry to the best of his abilities. Both could reasonably be the case.

He posts the question

How many lives would have been lost if we didn’t have controls on drugs?

and goes on to discuss the current policy of drug prohibition as though “control”, “prohibition”, and “regulation” were synonymous. They are, of course, not. We have systems of control in place for the regulation of of alcohol and tobacco, both of which are significantly more dangerous and more addictive than many drugs which are currently prohibited my most nations (for example Cannabis, LSD, Ecstasy). By comparing the effect of regulation of alcohol against the effect of prohibition of alcohol, we can easily see that we protect our citizenry better through regulation than we do through prohibition. Regulation results in less crime, less overdose, less underage use, in short more control than does prohibition.

The current prohibitionist policies and irrational assessments of drug harm result in a situation that is quite simply out of control, and this is what we in the “legalization chorus” object to. Or does Mr. Costa wish to make the claim that things are in control in, say, Mexico? Or the United States for that matter?

How many lives would have been saved if our children had been obtaining honest information about the relative harms of drugs, rather than dishonest propaganda? How many lives would have been saved if our addicts (I am writing as an American here) could have gotten treatment and counselling for their problems instead of getting labelled as a criminal and ostracised as a criminal? How many lives would have been saved if clean needles were freely available? How many lives have been lost in botched drug raids, in drug violence?

The facts, Mr. Costa, speak against you, and your rhetoric and word-play is too weak to obscure them. Of course we need controls on harmful substances. We in the chorus are not asking you to stop controlling potentially harmful substances. We are asking out governments to regulate them. We simply want sane and rational regulation, rather than jingoistic prohibition.

Exit strategies for the war on drugs, part1: Framing the discussion

I am gradually of the opinion that drug-policy reform is now a sure thing, and the discussion will need to shift to alternative policies.  This is the first in a multi-part series, in which I prattle on about what comes next after the war on drugs.  This post attempts to formulate a useful basis for the discussion of the subject.

The Guardian has an excellent article: Prohibition’s failed. Time for a new drugs policy. The first line sums it up perfectly “http://www.guardian.co.uk/commentisfree/2009/sep/06/editorial-drugs-policy-latin-america”.

It’s clear that the debate now needs to be about what comes next.   We’ve created a stupid war against the citizenry our own country.  It’s completely fucking up our civil liberties, and in fact the entire premise is completely unconstitutional. Argentina’s government has realized this, and if we lived in a healthier democracy, we would have figured out the same thing by now. The good news is we seem to be getting there, so the time for figuring out an exit strategy would seem to be now.

The issues aren’t simple. We have a monstrous police-state machinery in place. We have to pull out the troops and integrate them back into society, and provide them with counselling to reintegrate them into normal society. While this should be an easy sell, as there is a peace-dividend (reduced spending on law-enforcement and prisons, improved civil liberties, reduced crime…) the drug-warriors don’t want to give up sucking at the government teat, and form a powerful lobby. The most difficult question of course is “okay, prohibition doesn’t work, what now?”.

Unfortunately, the people who should be working on this are still too afraid to admit prohibition has failed.  While they get up to speed, the most productive discussions in this arena are taking place online, in in the periphery of other discussions. I’d like to discuss the issue more directly.

Goals:

So, let’s identify some (hopefully) uncontroversial goals, by which we can judge whether a drug policy is working or not.

  • minimize addiction rates.
  • minimize overdose deaths.
  • protect children and uninformed consumers.
  • minimize crime (e.g. junkies stealing to get their ‘fix’)

There are other effects which are more difficult to quantify, such as health impacts (cancer and such) and effects on productivity. While these are worth considering, I think it’s a reasonable approach to consider them second-order effects. Once we have a policy which optimizes the easily measured first-order effects, we can worry about the second order ones. The key thing to keep in mind here is prohibition is a nightmarish failure, regardless of which effects you consider. It doesn’t accomplish any of the desired effects. The results of prohibition are so disastrously bad, that complete deregulation might end up working just as well, without the enormous cost (socially and economically) of funding the war.

An error the drug warriors make is framing the discussion in terms of “zero-tolerance”.   They want to completely eliminate all drug use.  What the last 100 years has shown is that that won’t happen. You can keep spending more money, you can keep use the constitution as toilet paper after shitting on people’s civil rights, you can get more and more violent and intolerant, you can impose increasingly draconian laws, and people will still use drugs. The figures are there.  It takes enormous cognitive dissonance to deny them, so let’s stop doing

There remains of course the question of how much we are willing to pay to achieve those goals. I suspect that the people who are so willing to spend billions on the drug war, will be less willing to spend the same billions on counselling, care, rehabilitation, education, and maintenance programs. Fortunately, the drug war has been so damned expensive, anything we come up with likely be much more effective at a greatly reduced financial cost.  This will allow us to frame all such harm reduction spending in terms of savings over the prohibitionist approach.

Having identified a set of goals which I hope we can all agree on, let us consider what will be needed to implement a sane drug policy.  It’s my conviction that a good drug policy will involve the following components.

  1. Rational evaluation of drug harm.
  2. Honest drug education.
  3. Honest drug scheduling (a rational classification system).
  4. A sane handling of the respective classes of drugs.
  5. Reality based assessment of policy effects.
  6. More power to states and communities for deciding drug policies.

Each of these points is non-trivial, and will require some discussion.  Thus they will be the subject of future posts.

Some might disagree with necessity of a drug scheduling system at all, and would advocate regulating all drugs like we do alcohol.  While I see some merits to such an extremely libratarian approach,  I would argue against pursuing such a goal for the following reasons:  It’s unrealistic in today’s political climate, it’s too rapid and extreme a change, and I suspect such a policy might be nearly as harmful as the current policy.  If it’s not clear to me, it’s going to be extremely unpalatable for the average citizen.

Keeping the classification system allows to handle the approach in a more reasonable and rationed manner.  We can agree to pursue a policy that accomplished the stated goals, and analyse each drug case by case, based on a rational assessment of its relative harm, made by qualified medical researchers. It also allows us to separate the questions “do we need drug policy reform”, and “what is a good drug policy for drug X”.  The answer to the former question is simple, the answer to the latter is, in some cases, rather difficult.  For example, I am torn on what constitutes a good policy for Heroin or Crack (I do know that current American policies are the wrong answer, but I’m not sure heroin and crack bars are the right answer).

Conclusion and caveats:

To successfully advocate for drug policy reform, I think keeping the above goals in mind is extremely useful.  It provides a concrete, uncontroversial framework for evaluating the failure of current policy, and provides some useful indications for steps in a positive direction.  There may be additional goals which are useful to bring into the discussion, but in the terrible situation we currently find ourselves in, we should strive to work toward unifying, uncontroversial goals.  Once these are acheived, we can open up more controversial, difficult discussions, such as “what right does the government have telling me what I can put in my body anyway”, or the ethical merits of a drug-free lifestyle versus the spiritual benefits of psychotropic drugs.

Advocacy anti-patterns


A few years ago it became quite trendy to attempt to isolate succesful patterns in solving certain recurrent programming problems. Not long thereafter, it became clear that it was useful to identify identify harmful anti-patterns which frequently impede or halt the success of a project. Just as studying such anti-patterns can help the success of a software-engineering project, studying anti-patterns in human behaviour can help us be more successful in our attempts at social-engineering. Among the social issues for which I advocate I have noticed several such anti-patterns, which I will attempt to identify and describe.

The purpose of studying anti-patterns is self-analysis, not to provide a convenient vocabulary for attack within an advocacy group.  Indeed, in-fighting and splintering within an advocacy group is the mother of all advocacy anti-patterns.   I called it the “People’s front of Judea” pattern, and will write about it at a future date.

That said, a  comment at www.stopthedrugwar.org inspired me to write out the first few. The context is this: An editorial was posted discussing how illegal cannabis cultivation is destroying the ecology of our national parks. The article was specifically addressing the impact on Crystal Cave, but the problem is a general one. This is one of the negative consequences of cannabis prohibition, and will disappear once prohibition is repealed. A reader, ( primus) made a comment to the effect that “hey, we should try and get the Sierra club involved in this issue.”, a good point, and useful from an advocacy point of view, as it suggests an approach to bring more people into the cause.

Another reader (“James G”) replies:

I am more than sorry to inform you Primus that with the exception of our public lands,”thank God we do have those, for now” this world is not ours,”the common home of humanity,as it should be” but the” private property” of a small percentage of the human population who thouraghly believe they should be able do anything with their private property they see fit even if the rest of us is harmed.You must understand that these people are in favor of freedom and human wellbeing only to the extent that they can profit directly from such virtues.When freedom and the wellbeing of the 90 plus percent of humanity that does not belong to the ownership class threatens the power and or profits of the elite those virtues are cast aside in favor of totalitarian and facistic acts which insure that the masses never taste real freedom and wellbeing.

The facts are quite clear;the elite will first destroy humanity and the natural enviroment with their arsenals of nukes and biochemical weopons before they will loose or sucsede power to whom power rightfully belongs”,that is the people”.

Indeed this is not our world but the private property of the elite.This is why we now live in an age when a person can be incarcerated for the personal use of a plant ,”in the name of protecting the public wellbeing” while ultra wealthy manufactorers of the most deadly of weopons,”even nukes” walk scott free and enjoy the best life has to offer,all at our expence. It is really quite insane,but yet we still call it civilization !

Apathy of Despair

These three paragraphs can be summarised as “Dude, don’t even try and do anything because everything is so shitty you can’t possibly make it better.”. I like to call this “Apathy of despair.“.

Successful advocacy relies on people being engaged and working actively to a certain goal. People are motivated to work towards social change when they 1) see that there is a problem, and 2) have some hope that the situation can be improved. One often runs into people who start off claiming that there is no problem (apathy of denial). If one confronts these people with sufficient evidence to the contrary they move directly to despair (apathy through despair). What these two states have in common is a lack of action or effort. I get the impression the apathetic individual simply doesn’t want to take responsibility for their role society, and just wants to skate through without making an effort. Some accomplish this abdication of effort through naivite, and others through cynicism, but the result is basically the same.

The overwhelming journey

Laziness is not the only path to the apathy-of-despair. In James case, I believe he arrived there through a pattern of thinking that deserves its own anti-pattern, which I’ll call the “overwhelming journey”.  (I can’t think of a better name yet, but please feel free to make suggestions). The overwhelming journey occurs when an individual sees the problems involved, but can’t see the path to improvement.  They have forgotten that “the journey of a thousand miles begins with single step”.   They may be frustrated because they have forgotten that social change takes time, and is difficult.  Perhaps their frustrations with the problems they perceive leads them to an angry state of mind, and so they are unable to calmly and rationally analyse the problem and possible solutions.  The get wrapped in a ranting, raving, rabid froth.

Some additional gripes

James’ post suffers from some additional anti-patterns, which are difficult to point out in a kindly manner.  He rants and raves about the “elite”, “fascistic act” etc.  Basically he’s falling into the “grand conspiracy” AAP (which is a close corollary to the tinfoil hat AAP).   This kind of thing dilutes a movements credibility, and drives away potentially useful collaborators.

In the end, James post encourages prohibition-repeal advocates to give up and stop giving a shit, and drives people who are undecided on the issue away.

Exporting emacs org-mode html, ain’t sed grand.

I’ve recently begun using emacs org-mode, and I quite like it.  I do a lot of my writing, some of which might finally end up here on my blog, in org-mode these days.  For a lot of my applications it’s a perfect overlay on plain text documents.  I can export what I’ve written as html or latex, which is fantastic.

What’s less fantastic, is when I want to cut and paste the html output here to my WordPress blog.  Unfortunately org-mode puts in linefeeds between paragraph elements, and for some reason wordpress maintains these, resulting in incorrect word wrapping.  So I want a way to remove the the linefeeds between paragraph elements.

This was just a little bit beyond my capabilities with SED, and I’m often telling myself self, you should really learn how to use sed and regex terms better . So I thought bugger it, let’s figure out how to do this. So I whipped out the excellent book “sed&awk” from O’Reilly.

As someone who has only used sed for banal substitutions, I had to learn the following:

  • “:whatever” can be used to create a label.  There are two commands that allow you to utilize these lables: “b” creates a branch, while “t” jumps to a label if a successful substitution has been made on the currently addressed line.
  • “N” is needed to join two lines, since sed normally works on a one-line-at-a-time fashion.

With these two tidbits, and a basic understanding of how sed operates, we can construct the desired script.

:top
/

/ {:loop N s/\n/ / /<\/p>/{P;D;btop} bloop}

In one line the command looks like this:

 sed ':top;/<p>/{:loop;N;s/\n/ /;/<\/p>/{P;D;btop};bloop}'

If you’re like me, it’s not immediately clear what’s going on here, so let’s break it down:

  • First we create a label with “:top”.
  • “/<p>/” tells sed to look for the paragraph block tag.  The next ‘line’ of the script will be called after this tag is found.
  • The curly braces “{}” group a set of commands, so upon encountering the paragraph tag, it executes the contents of these brackets.   In the brackets:
    • Create a new label “:loop”.
    • “N” creates a multiline pattern space by reading the next line of input, and appending it to the contents of the pattern space.
    • “s/\n/ /”: substitute a space for the line feed.
    • “/<\/p>/{P;D;btop}”:  If sed encounters an end of paragraph tag, it executes “P;D;btop”, which (P) prints the contents of the multiline pattern space, (D) deletes it, and (btop) creates a branch(b) and goes to the label(top).   It’s a little like “if (<p>) goto top”.
    • “bloop” (b) branch and goto label(loop).

So as long as no closing tag (</p>) is found, we have a loop that keeps adding new lines to the multiline pattern buffer, and substituting spaces for linefeeds.  When the closing tag (</p>) is found, the loop goes back up to the “top” label.  That loop makes sure all of the  paragraph sections get handled.

So that’s it.  If anyone knows a more elegant solution to this, I’d be glad to here about it.