Archive for May, 2008

Morrowind Mods

Friday, May 30th, 2008

By request I’m once again posting a list of Morrowind mods which I’m currently using. Before you start installing mods however, a quick caveat emptor. If you install a mod, then play for few days, decide you hate it and remove it, your saved games will probably become broken. Not all mods will break your save, but most will. So be careful and make sure you can live with a given mod before you invest to much time into a new character.

That said, here is the list. First off, the mods which will make all the characters in the game look healthy and anatomically correct rather than as sickly looking polygonal zombies of the original.

  1. Better Bodies - is a must have. It replaces body meshes and textures and removes the silly permanent underwear thing - so you can go streaking if you want to. The amount of nudity is configurable though, so if you are prudish, you can switch the underwear back on, and have nicely looking body models too.
  2. Better Heads - fixes the heads, so that they fit nicely with the Better Bodies mod. It also adds some better looking faces to the game. Another must have.
  3. World of Faces - adds even more face textures to the mix. All of them are playable. I highly recommend it.
  4. Westly’s Hedpacks - this dude Westly has very nice collections of faces and hair textures and meshes for various specific races. If you are planning to play a Redguard or an Orc I highly recommend grabbing an appropriate headpack.
  5. The Facepack Compilation - another great collection of faces. Since my current character is a wood elf, I actually applied the Elven Facepack and I was impressed with the sheer amount of different playable faces. Some were awful, but most were actually pretty decent.
  6. Better Beasts - better bodies, but for the beast races. It also gives you an option of using alternative humanoid meshes for the beasts (ie. normal legs).

Note the effects of headpacks/facepacks and World of Faces/Better Heads may overlap. So if you apply multiple of them, some of the NPC faces and playable faces may get overwritten more than once. Keep that in mind, if you can’t locate that really cool face you saw on the screenshot.

Next up I have couple of re-texturing mods. Actually it’s one big one and two small ones which may or may not be already bundled in the big one.

  1. Ultimate Textures Complete v2.0 - this is a huge bundle that replaces a lot of textures in the game with higher resolution copies. It really makes weapons and armors look prettier and gives the game a more polished look. I can’t recommend it enough.
  2. Real Stars and Real Moons - for the life of me, I can’t figure out whether or not these two are bundled with the Ultimate pack above. They might be. But if not, make sure you grab them. They make the night sky look absolutely breathtaking with very colorful stars, galaxies and big detailed multiple moons. Awesome stuff.

Last but not least are the misc mods. These really add some nice touches to the game. Be warned though, some of these may slow down the game, or be a bit unbalancing.

  1. Sabergirl’s Ecology Mod - very awesome mod which “corrects” the behavior of wild animals. Most of them will now peacefully graze and ignore you or decide to run away. It also adds few minor critters to the game such as deer, rabbits and etc. Best part - Cliffracers are no longer annoying. They now majestically float about the landscape and look cool instead of chasing after you. Some people thing this sort of mod unbalances the game - since it requires much less combat while traveling on foot. But I like it.
  2. Where are All Birds Going - another very cool, but minor touch. This mod adds small birds to the game. You can usually spot them high in the sky, or just swooping around. I don’t think you can actually harm them in any way (or at least I was unable to because they were to fast for me) but they really look cool.
  3. Cait’s Critters Unleashed - similarly to the birds mod, it adds domestic livestock to the game. So you will encounter chickens, pigs, goats, cows and other animals of this type wandering around inhabited settlements. The animation for these critters can sometimes be very resource intensive - I noticed small, but noticeable drops in frame rate when looking at bunch of chickens for example.

As a bonus, I’m posting a pic of my current character - a Bosmer Thief:

My Current Morrowind Character
click on the image for original size

Feel free to add your favorite mods in the comments. Screenshots of your favorite characters are also appreciated. :)

Cylons don’t know about SPOF

Thursday, May 29th, 2008

Back to my BSG complaints. Once again, I wanted to preface this post by saying that I’m bashing this show ONLY because I love it to death. I am a big BSG fan and as such I am allowed to nitpick and complain about silly shit. That said, on with the rant.

Some of you may or may not remember my recent grumbling session titled Cylons Don’t Use Backups. I complained at length about the silliness of having an emergency resurrection system that has no failsafe and no backup. Some of you actually came up with really interesting explanations on why the system works the way it does. I especially liked Tino’s bit about consciousness being a set of quantum states that can be transmitted but not stored. In my mind, that actually makes sense so I’m sold on that theory.

I just watched the latest BSG episode “Guess What’s Coming to Dinner” and I want to cry. If you haven’t seen that episode, I will warn you that the rest of this post will be a bit spoilish, so you probably should stop reading now.

Let me tell you why do I feel like crying though. It’s because in this latest episode Cylons just revealed that their whole resurrection network is a SPOF system. Just after I came to terms with their rather irresponsible (in my mind) no-backup, no-failsafe scheme, they go and do something that is a 100 times less responsible. They build their whole system (which BTW is of the utmost importance for every living Cylon) with almost a criminal design flaw that would get most engineers fired on the spot.

Oh, yes. I should probably explain what a SPOF is to those of you who do not thing in acronyms. SPOF is short for Single Point of Failure. In engineering it can be defined as:

A component that, if it fails, will cause the entire system to go down.

In the episode “Guess What’s Coming to Dinner” the rebelling Cylons offer a mutually beneficial bargain to the Colonials. They will reveal the location of their “Central Resurrection Hub” in exchange for help in identifying the final 5 Cylon models. Here it is, in it’s full glory:

Cylon Resurrection Hub
image @copy; galacticabbs.com

The hub is the previously discussed “boxing functionality” where the Xena Warrior Princes er… Diana model is held in stasis. It is also central nexus of the Cylon resurrection network. We are told that once it is destroyed, all Cylons will lose their ability to resurrect. Yep, the whole seemingly distributed resurrection network with a dedicated R-ship attached to each fleet, has a single point of failure. This single space vessel coordinates resurrections for all Cylons in the universe - both the planet dwelling, as well as space borne. Yep, there is only ONE of these. How is it defended? Well, there are couple of base stars that seem to be floating around it, but a single Raptor patrol was able to jump in, take some pictures and jump away without anyone noticing. So their security seems to be rather lax at this point. Other than that, they just jump it from one location to another every once in a while to avoid detection.

My reaction:

FACEPALM.JPG

You’d think that there would be a local hub on Caprica for example. Or on some other planets. You would think there would be many of those all over the place - for example, one per occupied planet, and then few others for each major fleet. But no. There is one, and if it is destroyed, then the whole Cylon race instantly loses their immortality. I’m sorry, but WHAT THE FUCK IN HELL?

Let’s assume that the station is virtually indestructible. It is very well defended, and it jumps every few hours using complex patterns that make it almost impossible to track. Cylons may be confident that Colonials do not have the resources to take down this station. But what if it malfunctions? What if there is a fire on board? What if there is a problem with their communication equipment? In a station that size there is half a million things that may go wrong - and any of them can put the whole facility offline for anywhere from minutes, hours to even days. Are Cylon’s really this stupid? Do they actually enjoy gambling with their lives?

Did anyone actually read this script critically, or is everyone just to wrapped up in the BSG mysticism to actually worry about stuff like, I don’t know, logic, common sense and basic engineering principles? To me the Resurrection Hub is nothing more than a huge plot device. It is the ultimate prize. They had tho have something huge at stake, otherwise it would be out of character for Adm. Adama to agree to this uneasy truce between humans and rebel Clons. Too bad it is also laughably stupid.

No one builds mission critical systems this way. No one! Even if there is some strange reason (ie the quantum thing) that would require only a single hub of this type to be in operation, there is no reason why there should be only a single one in existence. They could easily build many hubs like this one - all of them identical in every aspect. But only one would be online at all times - others would act as backups, and/or decoys. In case of an attack or a malfunction the active hub would shut down and transfer control to one of it’s copies.

Then again, perhaps Cylon’s do not actually understand the resurrection technology at all. Perhaps there is only one Hub in existence because they do not know how to build another one. Perhaps they were created with an intentional design flaw, and they simply never were able to improve upon it. Perhaps they sort of know how to maintain the Hub and the R-ships but they are unable re-create this technology and lack knowledge to even reverse-engineer it. This would sort of fit pretty well with their religious zealotry.

If reverse engineering certain “sacred” technologies was forbidden by their religion then they wouldn’t do it for the same reason why some models refuse to search for the final 5 models. Maybe this is all part of a big plan set forth by their creators, or perhaps their god who may not actually be a divine being at all.

What do you think? Is the hub a plot device, or an arcane artifact that Cylons depend on, but do not understand?

Simultaneous Inventions and Patents

Wednesday, May 28th, 2008

Kevin Kelly recently wrote an interesting article he titled Simultaneous Invention. I highly recommend that you read it and draw your own conclusions, but if you are to lazy for that, I’m going to give you short summary and my un-informed commentary. The whole bit is essentially a commentary on Malcolm Gladwell’s article in the New Yorker which talks about a curious company called Intellectual Ventures which is essentially a patent mill. The company employs bunch of smart people with expertise in various scientific areas and pays them to sit in a room all day and brainstorm novel ideas. The best ones are fleshed out to the point where they are patentable and then submitted to the patent office. Their income comes from licensing these patents to various companies at competitive prices.

The whole business works because big inventions and discoveries usually happen simultaneously around the same time. The popular notion about scientific progress is that the great ideas are usually work of a single man - a genius of some sort, who comes up with a revolutionary concept ahead of his time, and then faces the hard task of trying to convince skeptical scientific society that his/her claims are correct. This is however far from truth. Much more often, scientific research is more like a race. In academia we call this getting scooped:

Scooped

An event when someone publishes a paper on the same exact topic you were working on is not uncommon - in fact it happens very often, especially in highly saturated fields. Unless your working on something really, really obscure or esoteric, you can get scooped. And few people hand out grant money of obscure stuff - so you can pretty much bet your sweet ass that most of your peers are working on very similar stuff at least half of the time. Gladwell shows that this very same pattern holds of all the big, revolutionary inventions and discoveries as well:

A hundred and forty-eight major scientific discoveries that fit the [simultaneous invention] pattern. Newton and Leibniz both discovered calculus. Charles Darwin and Alfred Russel Wallace both discovered evolution. Three mathematicians “invented” decimal fractions. Oxygen was discovered by Joseph Priestley, in Wiltshire, in 1774, and by Carl Wilhelm Scheele, in Uppsala, a year earlier. Color photography was invented at the same time by Charles Cros and by Louis Ducos du Hauron, in France. Logarithms were invented by John Napier and Henry Briggs in Britain, and by Joost Bürgi in Switzerland. “There were four independent discoveries of sunspots, all in 1611; namely, by Galileo in Italy, Scheiner in Germany, Fabricius in Holland and Harriott in England,” Ogburn and Thomas note, and they continue:

The law of the conservation of energy, so significant in science and philosophy, was formulated four times independently in 1847, by Joule, Thomson, Colding and Helmholz. They had been anticipated by Robert Mayer in 1842. There seem to have been at least six different inventors of the thermometer and no less than nine claimants of the invention of the telescope. Typewriting machines were invented simultaneously in England and in America by several individuals in these countries. The steamboat is claimed as the “exclusive” discovery of Fulton, Jouffroy, Rumsey, Stevens and Symmington.

Kevin Kelly points out that even the idea of running a patent mill is neither new, not unique. He points out that Walker Digital does exactly the same type of work as Intellectual Ventures. They both were funded independently around the same time - and thus fit the very same pattern of simultaneous invention. And if there are two successful companies like that, there might be more.

Which brings me to my point. Whenever we discuss software patents we usually preface our arguments by saying “while patents may work for other fields of science, computer science is different”… The above clearly illustrates that the patent system is not really working that great for the other fields of science either. It is essentially a race - and the only way to win it, is to patent early. There are whole companies that base their income on creating and licensing patents without implementations. Big companies know this game and they patent as soon as they can figure out something is patentable. Independent inventors however, have very little chance to compete in this race - especially if they are unfamiliar with the way it works.

This is goes double for business process and software patents. Right now people are patenting trends and methodologies. Anyone keeping an eye on the software industry can look at two emerging technologies and say - hey, if you put this two together you can really improve the way we do things now. Then someone goes ahead, files for a patent and instead of a net gain for everyone we now have a hundred of independent projects being put in legal jeopardy because they had the misfortune to notice a similar opportunity to improve their process using existing technology thing around the same time.

When we are talking about genuine inventions, we can summarize that more than one researcher will discover them around the same time. But when we talk about patenting methods, or processes the chance of simultaneous discovery grows exponentially, if not faster. And I’m talking about actual valid patents which have no prior art (since IMHO more than 90% of software patents usually is just thinly disguised old technology that existed since the 80’s). Take a thousand computer scientists, present them with the same problem, and look at what they come up. While their solutions will vary greatly in implementation details, complexity, and presentation conceptually they should be an overwhelmingly great amount of overlap. They will likely use the same algorithms, same design patterns, model their data in similar way and use very similar design paradigms. If one of these scientists would patent his software, majority of the remaining 999 scientists would be found infringing.

Software patents are silly thing. The sooner we understand this, the better for the software industry as a whole.

Metaprogramming in PHP

Tuesday, May 27th, 2008

Not so long ago I wrote about few meta programming tricks in Javascript. These are really powerful programming techniques that let you create elegant frameworks with generic code that adapts to your needs at runtime. But Javascript is not the only language that can accomplish stuff like that. You can use pretty much the same tricks in PHP. Yes, you heard me right - the ugly cousin of Perl, and the most hated and most used server side language can do this stuff.

Let me start this with a real life problem which was very often pointed out as a flaw in PHP 4. As you can remember, in PHP 4 you defined a constructor of a class like this:

class Foo
{
   function Foo()
   {
      // initialize
   }
}

In other words construction was a function with the same name as a class. PHP 5 introduced new constructor semantics:

class Foo
{
   function __construct()
   {
      // initialize
   }
}

This was done to solve a problem that most PHP developers always had issues with - namely how to call the constructor of a parent, if you don’t know it’s name. In PHP 5 it is easy:

class Foo extends Bar
{
   function __construct()
   {
      // do something
      parent::__construct();
   }
}

Easy, peasey! How do we do that in PHP 4? Well, we either hard code it or use a little bit of meta programming:

class Foo extends Bar
{
   function Foo()
   {
      $parent_name = get_parent_class();
      parent::$parent_name();
   }
}

What would be the problem with simply hard-coding parent::Bar() here? Think about what will happen when you create subclass of Foo. SubFoo class will try to call function Bar() which does not exist in Foo. The way we route around this issue is utilization of variable functions. Let me try to make it clearer by using a much simpler example:

function foo() { echo "Hello World!"; }
 
$my_string = "foo";
 
$my_string(); // outputs Hello World!

In other worrds, if you put a set of parenthesis after a variable, PHP will try to evaluate that variable and use it as a function name. It works in similar way to the PHP method call_user_func which lets you pass in a string representation of a function name, and have it called for you. And since you can generate that string on the fly, it makes for some interesting programming techniques. For example you can create a nifty function like this one:

function foobar($my_class_name, $my_method_name)
{
   if(class_exists($my_class_name))
   {
      $my_object = new $my_class_name();
 
      if(method_exists($my_object, $my_method_name))
         $my_object->$my_method();
   }
}

This function takes two strings. One is a name of a class, and one is a name of a method. It then initializes the class if one exists, and then calls an instance method of that class specified by name. You can pass any class and any method name, and if they are correct, the method will be executed.

There is also something called variable variables that may often come in handy. For example consider the following:

$foo = 'bar'; 
$$foo = 'baz'; 
 
echo $bar;   // outputs baz
echo $$foo; // also outputs bas

The contents of $foo are evaluated prior to assignment in $$foo so it dynamically becomes $bar on runtime. Combine that with variable functions and you got yourself a whole arsenal of meta programming weapons. An if that’s not enough for you then there is eval - a function that takes a string and tries to evaluate it as PHP code. Eval has it’s own little quirks though, and may cause somewhat unique issues. For example, code that is built dynamically by concatenating strings is notoriously hard to debug. It also won’t be properly highlighted by the IDE, and it which makes properly formating and escaping it will be difficult. So it probably deserves it’s own post.

I won’t deny it - PHP is not the prettiest language, and the lack of namespaces in it’s function library makes for some colorful naming patterns. But it wouldn’t be so prevalent and so popular if it didn’t have a lot of power underneath the hood.