Wednesday, December 31, 2008

Attenborough interview


Ed Yong has an interesting interview with Sir David Attenborough, which worth a read if you enjoy his nature documentaries (and what discerning mind doesn't?).

The version of the Planet Earth documentary series available through Netflix here in the US differs from the version aired here by the Discovery Channel in 2007. The Netflix version has Attenborough narrating, and although the lines are probably identical to those said by Sigourney Weaver in the Discovery Channel version, the Attenborough version seems much serious and informative to me.

Nevertheless, on rewatching it I still consider Planet Earth to inferior to Attenborough's "Life" series of documentaries, or the Blue Planet series made by the people who later did Planet Earth. Planet Earth, despite some great footage, never seems to me to have the same level of focus or information content of these other series. The rapid changes in shots and scenes in Planet Earth make it seem like it was put together by someone with an attention deficit disorder, or that it was aimed at an audience whose attention span is measured in tens of seconds. But perhaps their is a niche for a wildlife documentary aimed at non-documentary watchers?

Anyway, Attenborough never ceases to amaze me. At the release of this years "Life in Cold Blood" series he was 82 years old and was still jaunting around the world into all sorts of inhostipatable environments. This year he is behind one of the BBC's Darwin "The Genius of Evolution" season (marking the 200th anniversary of the birth of Charles Darwin).

Monday, December 29, 2008

More Mac installing...

Spent some of the day setting up the new work Macbook. Firefox 3 instead of Safari. iTerm as an alternative to the Terminal. More importantly. I installed Xcode 3.1.2 from the Apple Developer Connection, gfortran direct from GNU itself, fink 0.9.0 from http://www.finkproject.org/, and then a whole bunch of fink packages installed tetex using FinkCommander.

For now I've decided against installing MacTex, despite it being a more up-to-date Texlive-based tex/latex distrbution than fink's tetex.

It looks like getting scipy installed will take some work (or at least more work than installing it on Fedora, "yum -y install scipy python-matplotlib ipython"), as its not available by default in fink.

Anyway, the most important set of software installation is now over with compilers on the system and access to installable unix tools through fink, so I should be able to continue at a more relaxed pace while starting to do actual work (at the very least, paper writing) on the laptop.

Sunday, December 28, 2008

Progress on setting the Mac up properly...

Enabled a root account:

In versions prior to 10.5 this could be done with NetInfo (part of the Apps/Utilities folder). Now this is done graphically using Directory Manager (not System Preferences/Accounts, as you might have assumed). Selected Edit->Enable Root User and enter a password.

Set up the locate database for the the locate command:

Become root or use sudo to execute the following command:
/usr/libexec/locate.updatedb

Ignore the warning about this being a security risk. Control over which directories to scan should be set in /etc/locate_rc, although Apple does not provide one by default. TODO: By default the locate database is only updated once a week. This should be changed to once a day. See the /etc/periodic/weekly directory.

Setting a fixed machine name:

The main ComputerName can be set/reset in System Preferences/Sharing. However this is not the same as the node name as you'd see executing "uname -n". As far I can determine the best way to set the machine name(s) is to use "scutil --set" to set the ComputerName, LocalHostName and HostName.

scutil --set ComputerName azathoth
scutil --set LocalHostName azathoth
scutil --set HostName azathoth

These changes are retained between successive boots of the machine.

Making Terminal and X11 appear by default in the dock:

Start either app the normal way from Finder. Their icon will appear in the dock. Right-click on their icon (if you have set up right click, otherwise control-click on the icon) and select "Keep in Dock" and/or "Open at Login".

Switch off xterm beeping:

Failure!

xset b off doesn't seem to work by default as /usr/X11/bin is not in the default path. Doing /usr/X11/bin/xset b off does work within the invoking xterm, but so far I have failed in preventing beeps on an automatic and system-wide basis.

Trying to create a user-specific .xinitrc, even one that invokes quartz-wm, does not work for me. In most cases X doesn't even start successfully, and if it does then the xterm it starts still invokes the bell. I am beginning to suspect that I may have to set it to use visual bell. Copying the system xinitrc from/usr/X11/lib/X11/xinitrc and modifying that doesn't seem to work either.

Focus Follows Mouse:

It appears to be impossible to get full focus follows mouse behaviour under OSX, which is incredibly backwards. However a very limited form of it is possible just for Terminal windows (and possibly xterms) by executing the following in a Terminal:

defaults write com.apple.Terminal FocusFollowsMouse -string yes

This works (after a small delay) in giving limited FFM in just the Terminal.

For xterms the following is claimed to work:

defaults write com.apple.x11 wm_ffm true

But this does not appear to work on my Macbook, with or without a -bool between the wm_ffm and the true. As I don't really intend to use a vanilla xterm for real work anyway I'm hoping this (and the copy/paste difficulties between X11 and OSX) limitation won't end up driving me crazy.

Friday, December 26, 2008

OS X, Fedora 10, KDE 4.1.2, XFCE

Still playing around with the new Macbook and OS X 10.5.6, getting used to the odd Mac key and the associated keyboard shortcuts.

Overall I'm quite impressed at the speed and slickness of the basic OS, as much as I try to avoid being impressed with eye-candy. The lack of "focus follows mouse" is a major pain, and copy/paste seems broken or tricky between X11 and non-X11 apps. The Terminal program is OK, less fancy than I was expecting based on word-of-mouth, although nicer than the lowest-common-denominator of the basic X11 xterm.

I was going to say the OS X Terminal is less capable than the KDE Konsole, but then I was rudely reminded last week that the KDE4 Konsole is less capable, and less configurable, than the KDE3 Konsole. Currently I'd say the OS X Terminal and KDE4's Konsole appear pretty comparable in capability and available configuration options at present.

I've complained before about KDE4 on Fedora 9, but had noted some progress and had hoped the version Fedora 10 shipped with would be further improved. Last week I upgraded my work back-up machine to Fedora 10, largely as a test, and experienced many of the same problems...

The Konsole no longer has a login shell "--ls" command line option. Transparency is still not available. Add an application laucher to the Plasma-based panel and dare to change the "Icon Settings" and its icon will be replaced with a question mark. Worse still, the changes you've made to the panel launcher have been propagated back to the main KDE menu, so don't make a mistake! As for trying to move icons around on the panel... it didn't appear to be possible at all (no right click, "Move" option anymore) and its seems other are as confused by this as I am, although here is the non-intuitive way to do it.

And its slowwwww. The price we pay for KDE trying to implement desktop graphical effects similar to OSX, I suppose.

Any, sick of the fuss, I ditched KDE4 on the Fedora 10 machine and switched to XFCE, and managed to quickly configure my desktop into looking something like KDE3.5 with nicely transparent terminals in less time that it took me to get the KDE4 Konsole to use a login shell.

One step forward and one step backwards, I suppose... Ah well.

Saturday, December 20, 2008

Bérubé reviews Sokal's "BEYOND THE HOAX: Science, Philosophy and Culture"

Michael Bérubé has an interesting review, dare we say critique, at the American Scientist of Alan Sokal's latest book "BEYOND THE HOAX: Science, Philosophy and Culture" (Amazon.com link)

Here is a snippet of the review to whet your appetite:
When some people hear the term Western science, they think first of Hiroshima, Agent Orange and the Union Carbide plant in Bhopal—and not, say, of the discovery of neutrino oscillation. This mordant skepticism about the benefits of Western science is then underlined by a dogmatic conviction that the Enlightenment was little more than a stalking horse for imperialism. As for why postmodern intellectuals would champion “local knowledges” and the “heterogeneity of language games” against the universalist aspirations of the Enlightenment, my sense is that when academic leftists in the humanities speak glowingly about “local knowledges,” they’re thinking of all the warm and fuzzy feelings we lefties have about “the local”—from our local independent bookstore to our local independent food co-op. These are good things by every measure (local and universal), but they seem to have obscured the fact that many of the world’s “local knowledges” are parochial, reactionary and/or theocratic. Likewise, the defense of the “heterogeneity of language games” has proceeded as if it is the moral equivalent of a defense of species diversity—when, in fact, it is morally neutral, agnostic with regard to the question of whether the language games of charlatans or fascists should be preserved alongside the language games of the indigenous peoples of the Americas.
However, while there is much that is good about Sokal's book, it is not all good. Bérubé does a good job of explaining to lay-people like me where Sokal (and Sam Harris, before him) has gone wrong.

[Update 12/26/08: Hopefully have corrected the weird font problems.]

Friday, December 19, 2008

New Macbook! (and Fallout 3)

My new work laptop arrived yesterday - a 13" 2.4 GHz Macbook. This is my first Mac ever, something of an experiment for me, so lets hope it goes well. So far I'm quite pleased with it, especially now that I've worked out how to right click using the touch pad and found how to add a terminal to the dock.

My old Lenovo Thinkpad X60, dual boot Fedora 8 and Windows XP, was (and still is) a good software development machine but was imperfect at its primary role of conference/travel laptop. On Windows the separate Lenovo and Windows wifi managers would often conflict with one another, although it worked once you'd found and killed one or the other. I'd bought the thing based on the fact that people at ThinkWiki had the wireless hardware working under Linux, but for whatever reason it would only work intermittently and often would disconnect from a wireless network it had managed to connect to. It even did this when I swapped the Intel a/b/g wireless internal card for an Atheros-based one that was supposed to work even better under linux. I spent a lot of time getting into old-school kernel patching and micro-code nonsense, before giving up trying to make wireless work robustly under linux. This was a pain at conferences, where wired ethernet connections are rarely provided.

And I never got sound working under Linux - a failure that rankles me considering I managed to hack sound into working on linux on every laptop I've ever had until the Thinkpad came along two years ago.

I'd originally chosen a dual-boot Windows/Linux combo (as opposed to pure Linux, which is what I did on previous laptops) because conferences had stopped letting you hook your own laptop up to the projector to give your presentation (which used to work fine under linux with OpenOffice for me and still does for departmental Seminars, apart from one memorable incident at a conference in the Canary Islands...).

Now all conferences have adopted a policy of transferring all talks to one of two-conference computers, usually one Windows and one Mac. This initially lead to font problems with talks saved in powerpoint format from OpenOffice Impress, although installing and using Microsoft web fonts under linux solves that problem. I added Windows to the Thinkpad X60 so I can load the ppt in powerpoint to check it. All good so far. This is almost foolproof, except when conference organizers put your powerpoint talk from a XP machine onto a Mac running powerpoint (or vice versa), at which point all hell breaks loose. This has happened to me only a few times, but it happens to some poor soul at every conference I go to.

So, sick of powerpoint's inability to work properly on both XP and Mac, and having to reboot out of a working environment (linux) to get into XP to check the presentation, I have decided to do all future talks in Keynote. Hence the Mac. And once I've unixified the Mac I should be able to do some decent work on the thing at the same time, no rebooting required. Wish me luck.

PS: Fallout 3 did not disappoint. An awesome game, with only minor flaws of an overly-low level cap and a rather abrupt termination to the main quest.

Friday, December 12, 2008

Unix Semaphores - A finite resource!

One of the things about unix-like operating systems is that you never learn them all - there is always something more that you didn't know about that some other unix-user will tell you about that you'd never heard of but is cool and/or useful nonetheless.

I've been using *nixes pretty much full time since 1994, and sys-adminning my own Linux boxes since 1996, and yet yesterday I learned something completely new.I was messing around stress-testing some Message Passing parallel code using MPICH on a shared memory system (couldn't be bother to mess around with going across the network and set up ssh keys for a simple test, OK), only to discover after some weird errors, that the ch_shmem system of MPICH relies on System V-style inter process communication, which in terms uses semaphores, of which each user is only allocated a small number (32 arrays or something silly). Interestingly, nothing else on my system appears to be using semaphores or message arrays.

If MPI crashes while running it fails to clean up the semaphore(s), and if you do this too many times you end up not being able to run anything that relies on semaphores, which causes much confusion if you didn't know about this stuff. Hence you need to run ipcs -s to see your semaphores (hopefully none, if your MPI program has finished running), and ipcrm -s to delete any improperly terminated semaphores. I'd never heard of these commands before, but they solved my problems.

Tuesday, December 2, 2008

dd, python, google charts and amazon cloud computing

The latest RedHat magazine has a neat little article mixing dd, python, the Google Charts API and virtual machines with Amazon's version of cloud computing - the aim is a pretty pedestrian rough benchmark of disk I/O, but as a mix of computing metaphors (classic *nix command line, modern interpreted language, Web 2.0, virtualization) it is noteworthy.

The National Resources Defense Council's flawed game console study

The SciAm blog from November 28th uncritically highlights a claim by the National Resources Defense Council that
video game systems are huge energy wasters, mostly because people (read: kids) tend to leave them on even when they're not using them.
[...]

Sony PlayStation 3 (which uses 150 Watts of energy) and Microsoft Xbox 360 (which uses 119 Watts) are the biggest offenders, while the Nintendo Wii draws less than 20 Watts, according to the NRDC report. The PlayStation 3 and Xbox 360 each if left on all the time [emphasis mine], consume more than 1,000 kilowatt-hours each year—equal to the annual energy use of two new refrigerators. The PlayStation 3, which can also be used as a high-definition video player, uses five times the power of a stand-alone Sony Blu-ray player to show the same movie.
There are a number of things about this report (PDF), or at least the popular reporting of it, that I consider flawed.
  1. As we've discussed twice before now [1, 2], the energy used to produce an electronic device is a non-negligible fraction of its total lifetime energy usage (the study I linked to before claims that production of a personal computer [which game consoles effectively are] accounts for ~80% of the total energy usage over its entire lifetime). Focusing solely on energy efficiency in use is a flawed metric to assess the net cost to the climate.
  2. The report chooses to highlight the energy cost associated with leaving the devices on all the time, with no power saving options selected. This is a maximum cost, but is it at all a realistic scenario? Their figure 1 shows that, according to their own calculations, the net energy use by users who switch their consoles off after use is typically ~10% of leaving it on all the time. Any Xbox 360 user knows that heat associated with use can lead to the Red Ring of Death - I certainly don't leave my Xbox on when I'm not using it. Their summary and the news reports all focus on the worst case scenario, without mentioning the equally plausible or more plausible scenario. Of course, one can't make a big fuss about game consoles being bad for the environment under the conscientious user scenario, can we?
  3. Any technologically savvy computer user knows that there is a difference between peak energy usage and idle energy usage. The report quotes power uses when active and idle in Table 3 (e.g. an average of 119 W for an Xbox 360 when active, 118 W when Idle). Unfortunately they redefine "Idle" when gaming to mean a game is running, but the user is not touching the controller - this is simply not realistic. Even if we assume people leave their consoles on all the time they certainly don't have games loaded and paused 24/7 365 days a year - I certainly don't. Any Xbox 360 user also is aware of the annoying whine associated with a spinning disk, which no one would put up with 24/7. Yet the NRDC study deliberately rejects manufacturers Idle power usage numbers (i.e. no disk inserted, no game running, what I consider to be a realistic scenario and akin to standard personal computer Idle power ratings) and states on p26 that "Some video game console manufacturers define Idle mode as a state during which there is no game disc inserted in the console. We believe that users are more likely to leave game discs in their consoles when they are left in Idle mode (a user who takes the time to eject the game disc would more likely just power down the console completely rather than leave it running) and have defined this mode accordingly."
  4. They did not themselves assess usage patterns - in Chapter 5 they quote a Nielsen Group study that finds that "on average, users who account for close to 75 percent of all playing time have their consoles on for an average of 5 hours and 45 minutes per day." This implies that the per console there is 7 hours 40 minutes play time per day. The NRDC study has footnote (p26) associated with the previous quote questioning the Nielsen numbers: "Nielsen’s statistics can be difficult to interpret because the time in Active mode reflects an average across only the days when the console was turned on, rather than a true daily average reflecting use across the entire time metered. It is likely, however, that many heavy users often have the console on every day. For all of these reasons, we built upon the information available and the following assumptions to complete the energy analysis. ... Many users are assumed to leave their video game consoles on when they are finished with a game, even when they go to sleep at night." [emphasis mine]. On p27 they absurdly claim that a Lawrence Berkely National Laboratory study of 60% of their computers being on overnight and over weekends somehow justifies their assumptions about game consoles. This is idiotic - a national laboratory where many computers are workstations that effectively have to be on 24/7 has nothing to do with home entertainment usage by children and young adults. My work machines are on 24/7 365, as they need to be, for example either they're running programs or I need access to the disks from home. My Xbox 360 is only on when I'm using it. Hidden in Endote 1 (p28) is the nugget of information that "Due to the absence of any studies, we based our calculations on the assumption that 50 percent of users leave their device on when they are finished playing a game or watching a movie."
  5. Items 2 and 3 raise very serious concerns in my mind about how the NRDC assessed (a) the fraction of users who leave their consoles on all the time, and (b) the net energy usage. It is obvious that if either of these aspects of the study is flawed then its conclusions are totally untrustworthy. In fact, both aspects are deeply flawed.
Item 4 suggests that the NRDC did not use the Nielsen numbers (I must say I'd consider the Nielsen numbers to be suspiciously high, personally) at all, but simply assumed that 50% of all users leave their consoles on all the time. Note the phrasing of the quote in Item 4: first they assume that "heavy users" leave their consoles on all the time. Then they move from that to assuming all users leave their consoles on. As far as I can tell they did not measure actual power usage. Rather they took their (inaccurately high) "Idle" power numbers and multiplied up by the hours in a year and the number of consoles, and then multiplied by their made-up 50% figure. Assumption after assumption, and all unwarranted.

In summary I think its pretty clear that this study is fundamentally flawed. All assumptions appear to have been made to in order to achieve the result they want, and evidence to the contrary (realistic Idle power ratings using, estimated usage times from Nielsen) has been rejected without justification. The Endnote mentioned above is telling: although this is supposedly a study of the energy cost associated with console use they have no data of actual console usage, and rather than actually trying to find out they simply assume 50% of all consoles are left on all the time. If you're going to do a study why not actually try to find out as accurately as you can the numbers you need? Never mind the issue of the end-to-end energy usage (of personal computers, at least) being dominated by manufacture, not actual use.

I'd suspect that who ever wrote this "study" (deliberate use of sarcastic quotation marks) does not own a game console of their own, and has no training in hypothesis testing or scientific quantitative analysis. The lack of analytical skill or scientific rigor in this study astounds me.

This report reflects very badly on the NRDC and the Ecos consulting group who performed it. This feeds into the "computer games are bad and are making our children bad" narrative our sensationalist media loves to feed to us. Environmental groups should not resort to bogus studies in order to make the case for conserving - doing so weakens the cause and gives ammunition to the denialists and polluters. It also pisses off your potential allies, who don't want to associate with bumblers.

Furthermore, it ignores the big picture. Even if we accepted this flawed study, how significant is this energy waste compared to TVs, lights or other electronics being left on, or cars being idled in the morning to warm up? A decent study would place the numbers in context. This study would never pass any form of peer review - its terrible. I'm also annoyed at SciAm adopting the parroting-the-press-release school of journalism.

Finally the focus on consoles is blatantly a PR gimmick from the NRDC, timed for the holidays so they can get some media attention while picking on a group (gamers) that it is socially acceptable to pick on.

Energy conservation and reducing resource waste is not about consoles, it has to extend to all areas of life. Water, electricity, gas, food stuffs. If you haven't taught your child to turn off the light when he leaves the room then why expect him to turn off the TV, computer, or game console. Its about personal responsibility.
Without that a million studies, flawed or accurate, won't make an iota of a difference.

Monday, December 1, 2008

Electronic waste and Apple

Just when I'm thinking about replacing(*) my old work laptop (a Lenovo X60) for one of the new Apple Macbooks, Greenpeace trashes Apple for its inaccurate claims regarding how green its laptops are (Daily Tech article, Greenpeace report on Apple [PDF]).

As I've noted before there is much more to being green than just energy efficiency, so in this respect Apple's claims about being green are disingenuous at the very least.

However, if you take time to look at the Greenpeace ratings and their change over time its clear that of the main laptop manufactures are all pretty in the same general area - the electronics manufacturers scoring more highly tend to be more related to consumer electronics and cell-phones. And the real bad guys are Microsoft and Nintendo.

(*) Supplementing is perhaps a more accurate description, rather than replacing. The X60 is still a great ultraportable laptop that I do a lot of real work on, but for conferences and travel I'm hoping a Mac may be more practical.

Tuesday, November 25, 2008

No posting for a while, thanks to Fallout 3


I won't have much time for blogging for a while, as currently exploring the Capitol Wasteland is consuming
what spare time I have. After a slightly slow start Fallout 3 is rapidly becoming an engrossing experience, despite the annoyance of horizontal colors bands below the HUD that may signal problems with my Xbox 360's graphics processor.

Friday, November 21, 2008

Electronic waste

Scientific American online has a short article on e-waste - junked electronics such as old computers, televisions, iPods , and so on, which contain a variety of toxic heavy metals.
An investigation by the U.S. Government Accountability Office (GAO) earlier this year found that the EPA had "no plans and no timetable for developing the basic components of an enforcement strategy" to ensure proper disposal of harmful e-waste, which includes recycling components and safely handling and disposing of toxic materials, including lead, mercury and cadmium, despite having launched new e-waste guidelines in 2007 called "Responsible Recycling," or R2.

But the EPA's standard does nothing to prevent e-waste export or keep it out of landfills, nor does it offer any tracking of toxic components to ensure proper disposal. As it stands, the U.S. produces three million metric tons of the estimated 50 million metric tons of electronics garbage produced worldwide annually, according to EPA.
Often recycled e-waste is exported illegally (in ways that circumvent what rules exist) from the US to China or other developing world countries, where their citizens and children suffer from the resulting pollution.

Another interesting factoid from the article is that process of making a computer from the raw materials consumes about 4 times more energy than the computer itself will ever use.
At the same time, it takes 1.8 tons (1,630 kilograms) of raw materials and roughly 529 pounds (240 kilograms) of coal or other fossil fuels to manufacture every personal computer—81 percent of the energy an average unit will use in its lifetime, according to a study from United Nations University in Tokyo. By extending product life, such energy expenditure—as well as recycling issues—could be restrained.
Recycling old electronics in this country as a private individual is difficult - RadioShack and BestBuy will accept and safely dispose of (?) old batteries, including laptop batteries. Dell and Apple supposedly have programs to take back old electronics from you, but I'm not sure if they'll take anything or only their own products when you buy something new from them. Other than those examples I have yet to find a place that accepts broken computer electronics for recycling without charging you.

Monday, November 17, 2008

Review: Eschalon Book I


Eschalon Book 1 is a deliberately old-school computer role playing game produced by the indy studio Basilisk games, and available for Windows, Mac OS X and Linux. By old-school I mean turn-based, isometric, fixed camera, with strong textual elements, think of an intermediate between Legend of Zelda and Neverwinter Nights. If you liked those games, then for $19.95 Eschalon Book I might be worth your consideration.

Online reviews of the game can be found at the following sites:
http://www.shamusyoung.com/twentysidedtale/?p=1485
http://jayisgames.com/archives/2008/06/eschalon_book_1.php
http://www.2404.org/reviews/2881/Eschalon:-Book-I-Review
http://www.scorpia.com/?p=812

Overall, I quite enjoyed the game myself, although the first few hours were tough on the Ranger character I generated, as I soon ran out of arrows and the money needed to buy arrows. The strong element of random encounters in the game, while familiar from the pen and paper RPGs I used to play as a teenager, also made life difficult as I'd camp to try to heal wounds only to have camping lead to a random encounter that would cause me more wounds, and exhaust my meagre stock of healing potions and arrows. Reading the reviews shows that others also thought that the random encounters and early game money scarcity needed better play balancing.

Ultimately I got a bit tired of the grind - at one point I had to fight opponents with my fists as I'd broken my only dagger trying to open a sealed barrel (note to self: I should have RTFM before beginning playing, as it tells you to use cleaving or bludgeoning weapons on barrels and chests) and didn't feel like restarting with a swordsman or a magic user.


For the Linux version Basilisk had fixed the game exploits found in the Windows version, so I took matters into my own hands and used a hex editor on the same game file to give myself 45000 gold. After that, able to buy whatever I wanted, and all the arrows I needed, the game was actually a lot more fun.

I was finally able to take the time to notice the excellent audio(*) sound effect work (owls hooting as you walk through the woods, for example), and the prettiness of the level design given the limitations of the isometric engine.

I've previously mentioned I was giving Indy games a try, given my recent dissatisfaction with recent big-budget big-game studio games that given only a few hours game play for $60. Fully playing through Eschalon Book 1 took me about 25 hours (a little longer than the 20 hours some of its reviews mentioned, but for reasons I mentioned above), so at approximately $1 per hour its pretty cheap entertainment. While you won't get as much for that $20 as if bought a big-studio like NWN a few years after it came out, there is something to be said for supporting Indy game studios that do a decent job. Think of it as buying Organic food - maybe its better for the environment.

(*) One annoyance I experienced was occasional interference-like audio buzzing, but I'm not sure if this was intrinsic to the game or really a pulseaudio problem in Fedora 9.

The problem with the world today is... education


So sayeth the wise and (not learned) Right Reverend Patrick O'Donoghue, Bishop of Lancaster (thats in England, for you safely uneducated folks out there). From the Telegraph on November 16th:
Bishop O'Donoghue, who has recently published a report on how to renew Catholicism in Britain, argued that mass education has led to "sickness in the Church and wider society".

"What we have witnessed in Western societies since the end of the Second World War is the development of mass education on a scale unprecedented in human history - resulting in economic growth, scientific and technological advances, and the cultural and social enrichment of billions of people's lives," he said.

"However, every human endeavor has a dark side, due to original sin and concupiscence. In the case of education, we can see its distortion through the widespread dissemination of radical scepticism, positivism, utilitarianism and relativism.

"Taken together, these intellectual trends have resulted in a fragmented society that marginalizes God, with many people mistakenly thinking they can live happy and productive lives without him."
I suppose the Bishop feels that the marginalization of a mythical figure is too high a price to pay for the "cultural and social enrichment of billions of people's lives."

The Catholic Church clearly deserves more deep thinkers like Bishop O'Donoghue. With more men like him I'm sure the Church can make itself even more obviously irrelevant to society.

[Image: Jan Luyken. Burning. Engraving. XVII.]

Friday, November 14, 2008

Corn monoculture.

I'm glad I avoid fast food:
Americans spend >100 billion dollars on restaurant fast food each
year; fast food meals comprise a disproportionate amount of both
meat and calories within the U.S. diet. We used carbon and
nitrogen stable isotopes to infer the source of feed to meat
animals, the source of fat within fries, and the extent of fertilization
and confinement inherent to production. We sampled food
from McDonald’s, Burger King, and Wendy’s chains, purchasing
>480 servings of hamburgers, chicken sandwiches and fries within
geographically distributed U.S. cities: Los Angeles, San Francisco,
Denver, Detroit, Boston, and Baltimore. From the entire sample set
of beef and chicken, only 12 servings of beef had delta 13C < -21‰; for
these animals only was a food source other than corn possible. We
observed remarkably invariant values of delta 15N in both beef and
chicken, reflecting uniform confinement and exposure to heavily
fertilized feed for all animals. The delta 13C value of fries differed
significantly among restaurants indicating that the chains used
different protocols for deep-frying: Wendy’s clearly used only corn
oil, whereas McDonald’s and Burger King favored other vegetable
oils; this differed from ingredient reports. Our results highlighted
the overwhelming importance of corn agriculture within virtually
every aspect of fast food manufacture.

Hope Jahren and Rebecca A. Kraft, Carbon and nitrogen stable isotopes in fast food: Signatures of corn and confinement, PNAS 2008, November 10, 2008, doi: 10.1073/pnas.0809870105has more.
Effect Measure provides an interesting analysis of this work.

Every day I drive past on the Burger Kings the authors sampled from in Baltimore. Always wondered who ate there. Now I know. ;)

Thursday, November 13, 2008

teTex -> TeXlive transition on Fedora 9

Practically every document I have written professionally since 1994 uses LaTeX, either old vanilla latex (tex -> dvi -> ps) or pdflatex (tex -> pdf), often with non-standard cls files (aastex.cls, mn2e.cls).

Ever since I noticed that Fedora 9 was replacing teTeX with TeXlive I've been dreading the transition, and have kept all my work machines on Fedora 8 rather than transition to Fedora 9. (The KDE4 transition also gave me additional reason to wait until the bugs are fixed.)

I finally got time yesterday to back-up all my papers from work to my home Fedora 9 test machine, and just for fun tried running the TeXlive versions of latex and pdflatex on some of my papers and proposals... and they all worked first time, no messing about or reinstalling of the astro cls files required.

My old cls files that were installed in the /usr/share/texmf tree had not been messed with, and the ls-R file had been automatically updated to include them.

I'm pleasantly surprised, given the prevalence of problems a "texlive tetex" google search reveals. Good job Fedora team!

Family Values

Why those elitist coastal liberals are all about true family values.

Wednesday, November 12, 2008

Funny

Funny pre-election predictions.

I'm quite pleased with myself: predicted Obama getting 367 EVs, whereas the current total is 365 EVs.

Tuesday, November 11, 2008

90 years since the end of World War I

On the 11th hour of the 11th day of the 11th month of 1918 the Armistice between the Allies and the Central Powers came into effect and the Great War, the "war to end all wars," was over. Only a few veterans of WWI now remain to mark the commemoration ceremonies.

My grandfather on my mother's side served in WWI with the South African troops, and took part in the battle of Passchendaele (aka the Third Battle of Ypres). There he was captured by the Germans and spent the rest of the war in a prison camp, but was certainly better off than the 140000 Allied troops who died in that battle alone.

Friday, November 7, 2008

Volcano and eruption slideshow

Related to the Lusi mud volcano post from a few days ago, SciAm has a nice slide show of images related to volcanic eruptions.

Wednesday, November 5, 2008

Michael Crichton has died.

Michael Crichton has died at age 66, after a struggle with cancer. I loathed his writing, but I commiserate with his family over this sad news.

Tuesday, November 4, 2008

Okteta

Having previously complained about KDE4 on Fedora 9, it is only fair that I also mention something I like about it.

KDE 4.1 comes with Okteta, a gui-based Hex editor, and its pretty easy to use even for someone like me who has no experience with editing raw binary files (*). It turned out to be very useful when I need to alter some Eschalon Book 1 save game files (more on this in a later post).

Still, GUIs are only so useful, and I had to use the command line "cmp" utility to identify the bytes that differed between two different save game files before I could actually do anything useful with Okteta. Another cool command line tool I discovered for the first time: "xxd." Long live the all-powerful command line!

(*) No experience with messing around in binary of unknown format. Binary files with known formats are easy to deal with, you just write a program to process them.)

Do big studio computer games have less bang for buck these days?

Maybe I'm becoming old and jaded, but recently big budget games (PC or console) have been a bit of a disappointment to me.... $60 for <10 hours play time in a First Person Shooter (with maybe 2-3 times more the play time in an CRPG), and frustrating game-play seems the norm these days. I'd even have to buy a new PC to play some of the latest and greatest PC-only titles, as my trusty old Pentium 4 requires the obsolete AGP graphics. With less free time and spare cash (who could have thought that the rampant ideologically-driven deregulation of the financial markets might cause problems!) than I used to have its seems more important to find something decent to play...


After recent disappointments with NWN2 (and its expansion Mask of the Betrayer), Oblivion: Shivering Isles (Oblivion was good, but not as fun as Morrowind) and Star Wars: The Force Unleashed, and giving more money that I can really afford to the Democrats I've been looking for something where the emphasis is on fun and game-play, rather than graphics and movie-quality cut-scene work.

The original title of this post was going to be "Are big studio computer games less fun these days?" But what is fun? Certainly modern computer games, in particular those mentioned above, are graphically outstanding compared to games of even five years ago, let alone 10 or 15 years ago. Yet I remember getting a lot of enjoyment out of such graphically-primitive games such as Legend of Zelda, Civ 2, and X-Com: Terror from the Deep (probably my favorite games of all time). Basically the ingredients and mechanics of game play of different genres of computer games really haven't changed significantly over the same time, and its game play that counts for a lot in terms of enjoyment.

As I also spent vast amount of time playing those games - not only did they take a long time to master and play through, but they kept my attention for the ~100 hours I put into them. If a game is going to be shorter, then I expect to pay less for it. Or to put it another way (combining both fun and value) bang-for-buck is an element in my relative enjoyment of something.

That is not to say pure economics (or buyer's remorse) is the sole determinant of fun (remember, game play counts), but I think it also a crucial part of the recipe. For example, a typical Hollywood big-budget movie (e.g. the latest Indiana Jones movie) might be more fun when rented through Netflix for a net cost of a few bucks, than if you went to the theatre and paid $9 + gas and parking to see it.

Personally, as far as games are concerned I think the paying less than or approximately equal to $1 per hour of first-time game play is great value (e.g. KOTOR, Morrowind, Oblivion), ~a few $ per hour decent (e.g. Far Cry, Half Life 2, Assassin's Creed), and more than $5 per hour (e.g. SW: TFU, Halo 3 single player) poor value for money.

So if my hypothesis is right, what types of games should be fun if I'm not liking the games produced by the current big game studios?

If game play is roughly the same, and graphics really aren't super important, and bang-for-buck is a factor, then games by small independent developers should be fun. They may be short, or lack graphical or play testing finesse, but they should be enjoyable. (The alternative is simply to purchase the big studio games about a year after they first came out, at which their reduction in price makes up for their imperfections.)

So instead of the big games studios, I'm going to give independent developers a chance. In particular developers who support multiple operating systems (I keep a Windows machine to play games on, but if I could play games on other OSs I would happily avoid the use of Windows).

Playgreenhouse.com is perhaps best known as the distributor of Penny Arcade's "On the Rain-Slick Precipice of Darkness", but it now has a few other games available, all for prices of $20 or less. To put my money where my mouth is I've purchased the old-school isometric CRPG Eschalon Book 1 (linux version) for the princely sum of $19.95.

I've spent about 10 hours playing so far, but will hold off on the full review for a while. In the mean time here are some reviews of the game (with screen-shots in some cases) of Eschalon Book 1, should you be interested in wasting a few minutes reading time:
http://www.shamusyoung.com/twentysidedtale/?p=1485
http://jayisgames.com/archives/2008/06/eschalon_book_1.php
http://www.2404.org/reviews/2881/Eschalon:-Book-I-Review
http://www.scorpia.com/?p=812

Oil drilling most likely cause of Indonesian mud volcano


The BBC reports that the majority of the scientists attending the American Association of Petroleum Geologists' meeting in Cape Town, South Africa, believe that a bore hole drilled by an oil company was most likely responsible for the creation of a mud volcano (Lusi) on the island of Java in 2006.

Since then the mud volcano has continued to spew mud, displacing tens of thousands of people, destroyed four villages and 25 factories, and is indirectly responsible for the death of 13 people. It may continue to erupt for decades.

The drilling company involved denies any responsibility, blaming instead a magnitude 6.3 earthquake 280km away.

You can read more about the Lusi volcano at Highly Allochthonous, with an update here.

I was tempted to title this post "Drill, Baby, Drill!" but encouraging stupidity is never wise.

[Image of Lusi mud volcano, credit: Durham University, found on this UC Berkeley press release regarding the Lusi volcano.]

[update 11/06/08: Highly Allochthonous was at the AAPG meeting and has a nice run down of the earthquake vs drilling talks at the Lusi debate.]

Monday, November 3, 2008

Spore: Unintelligent Design

One of the things that surprised me when reading the initial reviews of Spore (e.g. the gamespot Spore review) was how short the early cell-based, oceanic and land creature phases of the game were said to be. Indeed, the reviews found these early stages, despite their shortness, to be "not very interesting and [to wear] out its welcome quickly."

When the game was first announced several years ago it was exactly those early stages that seemed most interesting and most unique - the later two Civilization-like and Master of Orion-like phases sounded much more traditional and less unique. OK, I realize that as a scientist my interests may not be quite in tune with Joe Sixpack, but I'm pretty sure that you can make an interesting and informative game out of those cellular, oceanic and animal stages. After all, people bought and played Railroad Tycoon.

It now appears that the early stages were indeed going to be far more unique and innovative (cellular automata are indeed cool), but that some of the developers got cold feet and forced the rest to stick to more traditional gameplay. Read the story of the dumbing down of Spore at Pharyngula.

[Update 11/04/08: Carl Zimmer has quick piece up at The Loom on perceived scientific problems with Spore. This is not to say all games must adhere to strict scientific accuracy, merely that adopting features of reality might make for a more interesting and varied game. After all, almost every game these day uses the Havok engine to do some simple physics. At the very least realism aids immersion.]

Core i7 reviews beginning to appear.

Engadget summarizes the Intel Core i7 benchmarks and system reviews that are starting to appear.

I can't wait till they appear on Newegg.

Saturday, November 1, 2008

Still Alive

I'm still alive (Wisdom Teeth almost healed, thank you for asking). I haven't forgotten about the follow-up to the first part of my analysis of why Halo 3 wasn't as much fun (for me) as the original Halo: Combat Evolved, but have been too busy to finish editing the post (blogger really lacks a nice way of doing HTML tables).

Wednesday, October 22, 2008

Everything tastes like cloves


My coffee tastes like cloves, as does the banana bread and my strawberry yogurt I had for lunch. The icecream I had last night tastes like cloves, as did the Tilapia and boiled vegetables. I swill my mouth out with water, but that only makes the clove taste even more intense. I even smell like cloves (so I am told).

Currently I am recovering from having all my wisdom teeth removed on the 10th of this month. After developing dry socket over the weekend (worst pain ever, thank-you very much, and that is despite me taking heavy-duty prescription painkillers) my oral surgeon has packed the sockets where my impacted wisdom teeth once were with gauze soaked in Oil of Cloves.

Oil of Cloves is obtained from the clove plant, Syzygium aromaticum, in fact from pretty much any part of the clove plant. The only active ingredient is eugenol, and it and Oil of Cloves have some pretty weird and wonderful uses. It is basically the clove-like smell associated with going to the dentists, as it is a natural topical anaesthetic (hence it being stuffed in the gaping holes where my teeth once were). It is also present, at smaller concentrations, in Cinnamon, Nutmeg and Bay Leaves. But its also toxic when ingested in large amounts (lethal dose for humans is 3.7g/kg) and is used to euthanize fish, in addition to being used to polish and clean Samurai swords.

And it tastes horrible. Really quite nasty. Try spending every waking moment for several days tasting it - if it weren't for the fact that its saving me from indescribable agony I wouldn't put up with it. But as Molecule of the Day notes, eugenol is not that dissimilar in chemical structure from vanillin, and vanilla is one of my favorite flavors. Artificial vanilla flavoring used to be synthesized using eugenol as a starting point, although now different methods (in the 60's the predominant one was based on Canadian wood-pulp) are used (at least, thats what wikipedia claims).

To think I would never have known all this had it not been for those damn impacted wisdom teeth!

[Image of eugenol structure taken from the Molecule of the Day eugenol entry]

Who contributes most to the Linux kernel?

The latest Redhat magazine has an interesting aside on who contributes most to the Linux kernel. According to Greg Kroah-Hartman's (*) analysis, and as measured in raw number of patches the general community comes in first, with Redhat coming in second. Canonical, the commercial sponsor of the now popular Ubuntu (a spiffy modification of Debian) comes in 79th.

The overall largest contributions to Linux code come from individuals who have no apparent affiliation with any company, as Kroah-Hartman surmised by looking at their e-mail addresses. Red Hat came in second overall, with 11,846 patches.

By comparison, Canonical, the company behind Ubuntu Linux, is the 79th most active contributor, with 100 patches. Kroah-Hartman said that such behavior on the part of Canonical will be detrimental to the company and the Ubuntu distribution over time [emphasis mine].

“Then there are the distros that base themselves off of other distros, like Ubuntu and [Lance Davis’] CentOS. These distros have yet another layer between them and the original developers. Patches rarely, if ever, flow backwards into an upstream distro, and the developers are very unlikely to push their changes into the upstream packages as they don’t feel the need or don’t realize the issues involved as they rely on the upstream distro so tightly,” said Kroah-Hartman.

This is interesting, and not just as food for a meaningless distro-war. While I personally prefer Fedora to Ubuntu or Gentoo, I can recognize that as a distribution Ubuntu is pretty slick and well structured, and has done a lot to combat the myth that Linux is unfriendly and difficult. Ubuntu has been the most popular distribution according to distrowatch for several years. But somehow the heavy work on Ubuntu has not not flowed back into the kernel, at least as measured in patches. Why?

If forced to speculate without any evidence to support it I'd guess that much of the work on Ubuntu has been in terms of user-interface and applications, and not at the deeper level of the Linux kernel. Yet Redhat clearly feels the need to work very heavily at the kernel level. So this guess doesn't satisfactorily answer the question.

If anyone has a better hypothesis or insight, please let me know.

(*) Greg Kroah-Hartman works for Novell's SUSE labs division.

Mini-review: Star Wars: The Force Unleashed


My overly-long post criticizing Halo 3 now seems a little out of proportion. I finally got Star Wars: The Force Unleashed (Xbox 360 version) to cheer me up while I recovered from having my wisdom teeth out. Boy, that is really a game with fundamental problems.

I was aware of the less-than-ecstatic reviews by X-play and gamespot (following their rather over-hyped pre-launch coverage), but sometimes things that bug other people don't really end up being something that bothers you (e.g. I liked the repetitiveness of Assassin's Creed, because that stuff was fun for me and I liked doing it again and again).

Given my generation I have a soft spot for Star Wars and even Star Wars games, and ST: TFU is great... in parts. Visually, even story-wise it varies between good and great.

But every now and again I ended up spending two hours trying to jump over the same damn chasm, or gap between two bridges, in an endless loop of button-mashing frustration.

Dodgy auto-aim, check. The only enemy any near me is a purge trooper right in front of me, except the auto-aim has my force lightning zapping off at some crate at 90 degrees angle to where I'm looking. Try to throw something with the force, and half the time it wont go where you want.

Boss battles where the bosses are immune to half of your force powers - thats just nasty - but add in the suddenly fixed camera and quick-time events spoil what should be epic cinematic moments. I don't remember any of the awesome moves Starkiller is supposed to have performed killing the Bull Rancor or defeating Vader, because all my attention was focussed on the bottom of the screen looking for the next X, B, A, Y to appear.

And don't even talk to me about that stupid bit trying to pull the star destroyer out of the sky. Which also looked totally different to the preview trailer they produced a year or so ago. Yes, lets create a situation completely different to the rest of the game control-wise and not explain any of it at all. Another hour or so of frustrated load, struggle, die, load... etc before I gave up and searched the web on what to do.

Anyway, it did have enjoyable moments, but the flaws were real and significant. I can't imagine that play testers didn't point out the problem areas that broke the flow and immersion of what would otherwise have been a pretty spectacular (if short) game.

What now for Star Wars fans? Bioware has finally announced what was long suspected: A Star Wars MMORPG set in the time of the Old Republic. I love Bioware's RPGs, but an MMO? It appears Bioware has accepted that almost everyone will want to be either Jedi or Sith, but I wonder how well balanced this will work out to be in practice.

[ST: TFU image from the gamespot review of the game.]

Saturday, October 18, 2008

Replay: Halo 3

Why am I only replaying the Halo 3 campaign for only the second time now, almost a year after it came out? That is the question I'm asking myself. I can't remember how many times I replayed the original Xbox Halo campaign, but the number is probably near or over 10. I've replayed the (not quite as satisfying but still fun) Halo 2 campaign at least four or five times.

It is not that I'm spending significant amounts of time on the multi-player... yes, Halo/2/3 multi-player is certainly nicer than Counter Strike and with the right people playing (i.e. not teenagers) its engrossing fun for a while, but multi-player isn't my favorite game play style.

I've been a big Halo fan from the get-go. I got the original Xbox to play Halo. I bought the PC version of Halo and upgraded my PC in order to be able to play it. I got Halo 2 the day it came out, and thought it was a way more enjoyable game than the similarly-timed Half-Life 2. I bought the Xbox 360 specifically to be able to play Halo 3. So I'm kind of bugged that I find I'm not playing Halo 3 all the time. I played it when it came out and enjoyed it, deliberately ignoring the critics. But playing through the first three levels for the second time last night left me... empty. There is something in the original that isn't quite there in the Halo 3, but what is it?

From a superficial standpoint Halo 3 should beat the pants off of Halo. Graphics technology from 2007 compared to 2001-era graphics, in a machine with vastly more CPU and GPU power. Improved AI. Wider and cooler array of weapons and vehicles. And the same company is at the helm, this isn't just a quick retread by a different company working on a time-limit (you know I mean you Obsidian!). All of these things matter - and in their little way they do add to the fun. But the problems lies elsewhere, and is to big and too general to be papered over by superficial gimmicks like detachable mini-guns.

Its not that Halo 3 is bad game, or not fun, its just that some part of the gestalt is not quite right, not as good as the original Halo.

Let us go through the list of things I've considered and see if they stand up under scrutiny.
  1. Rushed and over-specified storyline, with
  2. Spotty and inconsistent voice acting.
  3. Play balance is off kilter for single player.
  4. Linear game-play and levels that lack the expansiveness and freedom of Halo.
Lets consider 1 and 2 today, and return to items 3 and 4 in a later post.

Voice Acting: Early in the game, Cortana's frequent apparitional interruptions of the Master Chief are both annoying and curiously flat emotionally. Lord Hood's various statements (voiced by Ron Perlman) are pretty flat and lifeless even when they are meant to be rousing calls to arms. Later in the game, e.g. when the Master Chief is rescuing Cortana from High Charity, Cortana's voice is over-dramatic. Is this the writing (some of the lines are pretty sophomoric), or the deliberate direction given to the voice actors?

Although this is annoying and somewhat immersion-breaking it doesn't really bring down the game play. There is some truly horrific voice acting in games (e.g. Bloodrayne 2) that are still fun.

Story line: The story line is a real weakness in Halo 3.

In the original (Halo: Combat Evolved) there was no back story, and the story and game-universe unfolded as we played: A beleaguered human race under attack by a federation of alien religious fanatics who could not be talked or reasoned with, a fleeing human ship finding, exploring and destroying a mysterious alien artifact: Halo. What the story didn't reveal itself was left up to the mind of the player to fill in. By not saying too much the writers of Halo made their imaginary universe seem more real.

By the time Halo 3 comes out the Halo franchise has been stuffed full of pulp novels and comic books. There is now an elaborate back story whose level of internal self-consistency and quality is decidedly non-uniform (too many cooks spoil the broth). The enemies (both Covenant and the Flood), now fleshed out by all the genre merchandising, speak better English and are much chattier. Rather than the implacable alien foes of Halo: CE we now have enemies who appear merely misunderstood, petulant, or had bad childhoods, or something. The Elites don't bat an eye at co-operating with the Humans, nor express a moment's regret at abandoning the only religion they've supposedly had for thousands of years? Its just not believable. Its cheesy.

As with Halo 2 the game tries to tell too much in one game. Halo 3 has the Master Chief returning to earth, dealing with the Prophet's invasion of Africa, activation of the portal to the true Ark, attack of the flood, visiting the Ark, invading and destroying High Charity, activation and destruction of the replacement Halo ring. It is way too rushed.

Now I understand the dramatic impact of driving the story fast: get to Truth before he activates the rings and wipes out all life in the galaxy. No time to dawdle around exploring one thing at a time. But that could have been accomplished better in a single environment, be it Earth or the second Halo (had they been sensible about not rushing things in Halo 2 either). Halo was cool because you got to explore, at your own pace, all the different environments afforded by a ringworld, and they were often wide open and non-linear (I'll discuss level design some more in the next post on Halo 3). One had variety within a unifying theme.

But the writers of Halo 2 and Halo 3 seem to have run out of imagination regarding the rings - instead we have Earth, the Ark, etc etc. Multiple epic image that are never well fleshed out before being abandoned for the next new thing. Coupled with the rushed pace of the story line, all we end up with is a blur of images (most of them painted on sky boxes) as we move the Master Chief along the fixed linear line imposed by the story from Earth to the Ark to High Charity to the new Halo...

So the quality of the story line is inferior in Halo 3 compared to Halo: CE. Is this enough to damn the game? After all, when you start to get picky there are few games who's story lines stand up to close inspection. Half-Life, Half-life 2 and its subsequent episodes are all entertaining, but are hardly masterpieces of writing or paragons of internal consistency. When I next post on Halo 3 I'll discuss what I think of play balance and level design in Halo 3 with respect to Halo.

Friday, October 17, 2008

Linux Journal covers number crunching with GPUs and scientific python

From a number cruncher's perspective the November 2008 issue of Linux Journal is actually quite interesting. In addition to an article on the petaflop Roadrunner supercomputer at LANL, there are two articles on number crunching with GPUs (one by Robert Farber, the other by Michael Wolfe) and one article on numpy/scipy by Joey Bernard.

Farber's article is really an advert for NVIDIA's CUDA, and unfortunately doesn't actually show any examples of doing something (this is something of a trend in LJ, as it seems to drift away from showing you how to actually code things and toward merely describing point-and-click mega-code-projects). Wolfe's article shows snippets of matrix multiplication using both CUDA and Brook, but is really more of a discussion about how to write a compiler that would automatically parallelize for GPGPU work.

Joey Bernard's article on numpy does try to scratch the surface with simple worked examples, including the use of matplotlib for plotting (or "ipython -pylab").

For a moment after reading his article I was terrified that I'd totally messed up using numpy in my python projects, as Bernard states that array multiplication in numpy (e.g. a3=a1*a2) is handled as a matrix multiplication!

However, its pretty easy to verify that unless you specifically created matrix objects (which his example did not do), then a1*a2 is an element-wise array multiplication.

To do matrix-like multiplication on numpy array objects you need to specifically do something like "a4=numpy.dot(a1,a2)" or "a5=numpy.mat(a1)*numpy.mat(a2)."

Anyway, I hope this issue is a sign that Linux Journal may get back to publishing more "hands-on" articles on general programming topics interspersed between all the Web 2.0 and database articles.

Wednesday, October 8, 2008

Less than impressed with KDE4

My first Linux window manager experience was with fvwm - a step up from twm but hardly fancy and barely, just barely, functional. I forget the names of the window managers we used on the Decs and Suns used back in the mid-90's, but they weren't particularly fancy either. Since then I've used fvwm2, early versions of Enlightenment, Gnome (version 1), KDE2 and KDE3.

And over the years there has generally been progress, and progress by definition is good. Progress until now, that is.

I switched to KDE after experiencing major dissatisfaction with Gnome 2, and now that KDE4 is out I'm contemplating switching window managers again. Only it can't be the latest version of Gnome, as I have that on a spare laptop and don't like that either.

My first experience of KDE4 was on Kubuntu 8.04, an upgrade from 7.10 on an old Dell Latitude C400. That didn't last long enough for me to get a taste of KDE4, as the machine started freezing for no obvious reason after relatively short uptimes. A wipe and fresh install of Fedora 8 with KDE3.5 and the laptop worked fine once again. Was it Ubuntu, or KDE4?

Upgrading my home desktop to Fedora 9 (with KDE4.0) was the first real experience I had with KDE 4 and I was not impressed. Yes - I've read the blogs that discuss the fundamental reasons for chucking out vast amounts of the KDE3 code and rewriting things like the panel from scratch. Maintainable, extensible code is good.

But when the panel clock widget can't even handle displaying seconds you begin to think of KDE4 as a major step backwards. For an application as simple as a clock the KDE4 folks failed to provide the same functionality as KDE3. How the hell did this happen?

As for adding a terminal launcher to the panel - what happened to "Add Application Launcher?" I can add a widget - there seem to be an large number of widgets, most of which are thoroughly useless - but I don't want a widget. It took at least 30 minutes of messing around to work out that items in the launch menu (Kickoff its called, replacing Kmenu), when right clicked on, give an option to add to the panel. But you can't click on the panel itself and add an application launcher from there, even though its (a) the way KDE2 and KDE3 worked and hence the way KDE users expect, and (b) the old was more intuitive.

Oh, and don't edit the launcher's setting because the terminal icon will disappear and be replaced with a question mark. Progress, I tell you.

And transparent Konsoles (terminals) - we used to have those. Except now we can't have that. Sure, we can make the whole window transparent, including the writing, but that makes the writing hard to read.

As for the new panel (Plasma), well, hum, I totally agree that the power to add widgets to the desktop as well as the panel really makes up for the major lack on control over the panel appearance and lack of old panel (kicker features). That's what Linux is all about. Eye candy. No one really uses it because it is (or used to be) more functional, that is just a lie we tell the Windoze fanboyz.

Yes, I'm being sarcastic.

Its enough to make you suspect that major parts of KDE4 were written by 13-year olds whose Ritalin or interest ran out before they'd finished coding even the most basic of applications.

Now I'm a patient kind of guy. KDE4 and Fedora 9 came out ages ago and I refrained from complaining because I expected these "bugs" to be ironed out. "Yes, all very unfortunate to roll out a product clearly not ready for prime time, and that is functionally inferior to its predecessor, but I'm sure it'll get better" I thought in my typical latte-sipping, elitist, East Coast liberal mode of thinking...

So I waited. And lo and behold, the clock widget now does seconds. Hallelujah Brother! Can I get an Amen? Except the damn Konsole launcher in the panel is now failing, and takes a minute or two to tell me "KDEInit: can not launch /usr/bin/konsole". Acting on a hunch I remove the --enable-transparency option and it works again... for now.

So KDE4 remains on probation as far as I'm concerned. I have a lot of experience invested in KDE, which I am loath to lose by switching to Enlightenment or XFCE, but I'm warning you KDE: Mess me around some more and it is over.

Monday, October 6, 2008

Anathem. You either get it or you don't.


If you know what this figure is, then I think you might like Neal Stephenson's Anathem. If you don't know what this is, or worse, know but don't think its cool, then you're not going to understand Anathem. Sadly PZ Myers is in the "I don't get it" camp.

The figure is of course Euclid's famous but overly complicated geometrical proof of the Pythagorean Theorem (the image from the Wolfram web page on this subject, which is worth reading).

Forget the later half of Anathem - its just an extended action scene - the real meat is in the first half and if you're not hooked by the dialectical discourse between Theors by half way through then you're not going to get it.

Anathem is a exploration of math, physics, and metaphysics, OK? Square root of two demonstrated by cutting cakes. Many-worlds interpretation of quantum mechanics. Platonic forms. Etc.

If you don't know much math, physics or metaphysics, you might not be able of appreciating it. The same way Cryptonomicon is best appreciated by people with *nix experience (and OSX doesn't count, apple dweebs!), Anathem is best appreciated by people similar to the Theors it describes.

Friday, October 3, 2008

Misology: You learn something new every day

Actually if you are a misologist you probably don't learn something new every day because you fear or hate reason, logic and knowledge. Not a good character trait in someone who has to run a country, but some people insisted on voting for the folksy ones.

I don't think I'd heard the term before today, but now I'm going to use it all the time.

Tuesday, September 30, 2008

Berube is back.

The Lord High Professor of Dangeral Studies has returned in time to lead us out of the economic meltdown. Thats right, Michael Berube has resumed blogging.

And if your name needs characters that aren't pure ASCII its just tough OK? Suck it up.

Saturday, September 27, 2008

Wiki vs Google Groups/Sites

For work reasons I've been looking at wikis, as for our international collaboration will need an electronic way of outlining what we're doing, discussing it, and uploading files/images and other such info (and we're not allowed to spend money on flying furriners over here). Oh, and it has to be private and secure...

I must say I hadn't realized how horribly messy and complicated wikis are to set up, or how many non-obvious capabilities and requirements you have with the various wiki options available.

I quickly decided that I didn't want a relational database at the back end, which narrowed the field nicely, before settling on what I hoped to be a relatively simple set of wiki software: the python-powered MoinMoin. Flat file back end and powered by python - it sounded ideal to me.

Five hours later I had a full test site up, but I can't say it was as easy as I'd have liked. Nor was the security and authorization stuff at all transparent (try reading this), in fact I had no idea of whether the test site was secure or not. And wiki syntax is terrible (non intuitive!). I'm amazed wikipedia works at all.

Luckily I then discovered Google Sites ("Create websites and secure group wikis") which I must say I'm very impressed with so far. Simple Google account password protection, revision history and alerts, semi-WYSIWYG editor, comments and attachments. Maybe not industrial strength but much simpler and easier to use. Maybe we'll end up using Google Groups instead, but still much much easier than setting up a localized CMS. Good job Google!

Friday, September 26, 2008

Game Piracy is not the reason your sales are bad

Wise words from a Stardock developer, who manage to have massive sales despite not putting copy protection on their games. Yes, game piracy (a) exists (I suppose, never felt the need myself), and (b) is bad, but thats not the reason why Crysis did so poorly, despite the BS some people talk.

Maybe I should run the full Dreadlords campaign on Gal Civ II while waiting for Fallout 3 to come out?

Wednesday, September 24, 2008

Anathem's ending?

I finished reading Anathem last night.

For the first 400 pages I thought this was the most intellectually interesting and stimulating book that Neal Stephenson has written to date, although I wonder whether someone not in the physical or mathematical sciences would find it so interesting. As a venue for a discussion on metaphysics its brilliantly written.

The ending? I'm a little confused by the last 100 pages, in particular the last 20 or so pages. Stephenson's endings to his book have always been the weakest part of his writing, so in perspective this is better than most of his endings. Maybe I'll have to read it again...