by Karl Bunyan

Programming, PHP, JavaScript, .Net, motorbikes, pubs, poker, football, news, restaurants and anything else


Wednesday, January 26, 2005

Religion in computing: Macs, Unix and death to Windows

I would have thought that if anywhere was going to be free from decisions based on faith rather than facts then it would be the world of IT. How wrong that seems to be. There seem to be a particular set of zealots in the computing world, especially around the internet, who have a reglious attachment to certain types of software or hardware. For most, this is usually a crusade against anything that is generally accepted by the mainstream, and therefore finds easy targets in big business. Current popular targets are:

  • Microsoft
  • Windows, in particlar
  • AOL

Set against this are a number of "white knights" which the IT "expert" thinks sets them above the "average" computer user. Popular flags to rally behind include:

  • Linus
  • Open source in general
  • Apple
  • Web standards (in reality, CSS-frenzy under the guise of web standards)

Apple are an interesting case in that they are a very big, very corporate business who are seen as the "little guys" purely in reflection to Microsoft.

The characteristics of the zealots are fairly easy to spot for the general utilitarian computer user. (In this case, a utilitarian computer user will make purchase decisions based on a lowest cost/hassle equation as long as the tool they are buying does the job.)

  • A desire to convert others to their cause
  • A desire to actively distribute any publicised flaw in any of the main "enemy" protagonists
  • A willingness to overlook the flaws in any of the systems or products to which they are emotionally attached.
  • Enthusiasm about new releases of a product range (whether containing new functionality or not)
  • A somewhat contradictory willingness to accept that previous versions of software were not completely satisfactory, but the latest version is, of course, nearly perfect.

The presence of these characteristics leaves me to take a conservative view of any new software that is recommended to me. As an example, if I hear "Outlook is rubbish, I'm using XXX now and it's loads better" I tend to give it a few weeks and listen out for the telltale "this spellcheck doesn't work that well", "how do you archive old posts?", "oh no, it's deleted some of my e-mails!" calls, and finally the "I'm going back to Outlook because it seems to work" before I make a change. In fact, looked at it this way, these zealots can make good beta testers for the rest of us, as long as you listen to what they *mean* rather than what they *say*.

Personally, I'm not a fan of Outlook, but I'd rather have my appointments and addresses on my handheld and phone than worry about an e-mail list that I rarely pay much attention to threading properly. I use Homesite (quite an old version) for most of my development work despite the fact that many others around me have gone from "Homesite's rubbish because..." ("it's Macromedia", I think they never say) to "PHP Edit is great..." to "PHP Edit doesn't work that well..." to "I've gone off PHP Edit", then rinse and repeat with the next IDE.

So, I'm going to stick with my bug-ridden, virus-vulnerable Windows XP and leave the latest "release build" of "Emporers New Clothes ver 0.99412.b" until people stop having to spend 2 days to get things to work before they're any use. If the Apple zealots want to pray at the shrine of Jobs, then they're welcome to, and if one day Mac's become as powerful for the price, as expandable, and have the same range of affordable software as a PC, and I can e-mail attachments to people without them going "WTF?" then I might buy one. (Incidentally, I used a Mac for three years before I even saw a PC.) Oh yes, and they have to get rid of the bouncy toolbar...

Link to this post


You can turn off the bounciness in that toolbar ;-)

posted by Anonymous Anonymous : March 18, 2005 7:50 PM

Post a Comment
Saturday, January 22, 2005

PHP 5 and the magic __toString() method

Working with PHP 5 I thought the 'magic' method __toString would be a really great way of substituting objects for simple data types. That seemed the whole point of good object oriented design, so I could change the way a piece of data worked without having to track down every call to it and change that. Unfortunately, it seems that __toString() is only called if used directly from an echo or print statement. Now: what is the point of that, really?

I can see that we don't want it called by default everywhere, otherwise there would never be a way to grab a reference to an object. But surely there are a large number of 'string only' functions that could invoke it? If I set up an object called $parameter with a method of __toString() and call it in code with echo "This is the value: " . $parameter then there really can't be much else I'm doing with it than using it as a string. If the toString() method isn't called then, why do we have it at all?

It seems that this may be another case where PHP's lack of strong typing is severely limiting it's future development as a robust object oriented language and the __toString() implementation smacks of a half-implemented hack to me.

PHP 5 magic __toString() method on the Zend site

Link to this post

Post a Comment
Monday, January 17, 2005

Annoyed with 'modern' internet technology

I don't know if it's just me, but it seems that every innovation or change in working practice in the internet industry seems to result in tasks taking more work and costing more money.

CSS is a big gripe

Supposedly, with the introduction of standards and the death of Netscape as a popular browser, the development of websites was going to be much easier. We could just build to standards and CSS and everything would be fine. And of course, CSS separates style from content so it's so much cheaper to update a site. Except, it never is.

Instead, it seems to take a developer twice the time to build and test a CSS template and entail twice as much moaning. "Bloody IE 5 on the Mac" (hailed for its standards compliance by the self-proclaimed "Web Standards Project" when it was released) is a frequent cry heard around the office. Now, it seems, it's not standards compliant enough. And nor is Internet Explorer 6 because there are some features in CSS 2 that you can implement in Safari that we must have for this page blah blah blah. Or, of course, "we can't build that design in css because the technology doesn't work like tables". If they'd leave off the words "like tables" then I'd agree with that statement even more.

Caveat: I'm all for structured markup, but what replaces a hack has to be better than the hack itself. It's like inventing a paint-pot tin opener that opens paint-pots less efficiently than using a screwdriver, but using a screwdriver to open a paint pot isn't 'semantic'.

.Net is another big fat white elephant

"Object-oriented code reduces development time". Maybe that's true, but it seems to lead to hammers being used to crack walnuts. It recently took a developer I know with 5 years VB experience and 18 months of .Net experience nearly a day to build an e-mail form. (Just the back-end - the front-end had already been built, in about the same time in CSS, of course.) I'm pretty sure I could build an e-mail form in ASP or PHP in about 10 minutes. I could probably do one in Perl quicker than that, and I don't know Perl. (I do know .Net, so that shows something.)

Personally, as a programmer, I like C# a lot, but as a businessman it seems to take five times as long to write something relatively simple. I can't see how this is progress - okay, a PHP script might be a bit more buggy (although that depends to some degree on the programmer) but in all the time saved I think you could afford a lot of time for testers, and probably spend the same again fixing the bugs.

There are probably a dozen more "modern technologies" out there that could do with slagging off, but CSS and ASP.Net are getting on my nerves enough for now.

Link to this post

Post a Comment
Wednesday, January 05, 2005

BBC SPORT | Football | My Club | Tottenham Hotspur

Martin Jol certainly seems to be doing the business at Spurs. I don't know what it is, but he seems very well suited to the club and really keen to make some progress. It's obviously working as well with one of their best unbeaten stretches for some time.

Spurs news on the BBC

Spurs official website

Link to this post

Post a Comment
Monday, January 03, 2005

Rome: Total War. What a game!

I was lucky enough to get a copy of "Rome: Total War" ("RTW") for Christmas and, as an addict of "Medieval: Total War" ("MTW") I was too excited even to install it for a couple of hours. (Actually, I rushed to conquer Europe in the medieval game; I knew there'd be little chance of playing it for a while once I started on Rome.) I've really enjoyed Time Commanders on BBC2 and now the UKTV Documentary channel and could see the obvious improvements in graphics that RTW would have over MTW. Installing the game, even on a reasonably old Athlon 2000XP with a GeForce 5200 card, and the graphics seem to have improved on the television version.

What's really surprising, however, is the extra level of realism in the map mode. In a complete departure from MTW, armies don't occupy provinces (think of Risk or Diplomacy in the board game world) but have physical locations on a map. When armies clash, they have to do it very locally and the battlefield is a close match to the landscape that is shown on the large-scale map.

The battles are absolutely superb. They run at a much brisker pace than MTW: troops really can charge, cavalry can charge at a very fast speed. If you're not careful your armies can get into a lot of trouble very quickly. Attacking towns is also much more exciting as there really are streets and buildings to run through, making troops suited to an outside battle completely inappropriate to urban fighting. Siege weapons are also very impressive as you watch enemy troops being smashed across the landscape.

I've only made it part way through the game so far, having invaded most of Gaul (and vanquished them completely) and part of the way through Spain and Germania. The Britons have also decided to have a go, which is a BIG mistake! One of the problems with the gameplay in MTW was that once you reached a certain size of domination there were very few variations in gameplay. The battles got bigger, but that just made them longer and not necessarily harder. It was just a case of building more advanced troops and buildings and keeping the population happy as your expansion trundled on. This has obviously been thought about with Rome as you start off as one of 4 Roman factions (including the Senate) and are pretty much off conquering Europe whilst the other non-senate factions do the same in other directions, all as one big happy family. At some point, however, you get a bit too powerful and, in order to win the game, need to take on the Senate at which point it's Roman against Roman. This is going to be very interesting indeed: in the early stages of the game you tend to have a limited number of forces but, unlike MTW, they're pretty disciplined to start with and you can often fight off a rebel or barbarian army of twice the size, with some good generalship. Fighting against Romans, though, is going to mean some very hard battles.

There is also more of a focus on the individuals who make up your generals and governers, all shown within a family tree. These are in short supply so you need to guard them well and, during the early phases of the game, they cause some barrier to expansion (someone's got to run the place, after all). As a result, you pay more attention to their development than in Medieval. They also pick up more complex traits, including assistants ('Retinues') based on their capabilities. E.g. after some success with Assassins my faction leader has picked up a reputation as something of a ruthless killer.

It would be easy to go on about what's great about this game. So far as I have found, the parts of the gameplay that don't seem quite perfect are a) there's still a limit on the number of armies on the battlefield (I was hoping for a Time Commanders style 20,000 army but the limit isn't much higher than MTW was. 16 units in MTW, 20 in Rome.) and b) there are some qualities of cities that you can't really do anything about, especially 'Squalor' (to spell it properly). This seems to come about by itself despite attempts at installing sewers, public baths etc and contributes a large amount to a population's unhappiness. It may be historically accurate, but it's not very satisfying to not be able to run your city properly.

"Rome: Total War" is a total life-eater, and an immense achievement. I really don't see where they're going to go next with the franchise, so this one really needs to be bought now.

Rome: Total War official site

Rome: Total War strategy guide on Gamespy

Buy Rome: Total War on Amazon

Link to this post


Do you have any advice about which brick and mortar stores carry this game?

posted by Anonymous Steve Roman : March 09, 2005 11:17 AM

The last time I looked it was stocked by Game and you might also have luck with Virgin Megastores. I've seen it in the London stores anyway. If you're not in the UK, I wouldn't know.

posted by Blogger Karl Bunyan : March 09, 2005 11:33 AM

I love this game too!

Here are a couple of my strategies.

Some Early Game Strategies.


Wipe out the Gauls as fast as possible. The easiest way is with cavalry, and lots of it.. Make multiple armies and keep them big. Hire mercanaries whenever you can to fill the gaps in your lines. It doesn't take too long before you're making a lot of money, use it. Once the Gauls are on the run, build up another army to take out the Greeks/Macadonians.

Corinth is the most important city on the Map! Get it and get it fast! It has the Statue of Zeus, which gives +4 loyalty to all cities. Then right after that, go after Rhodes. The Colossus there gives you +40% Sea Trade. If you can get the Colossus and control a lot of the Greek cities then you'll be set because sea trade is the Julii's weak point. The idea early on is to get as many cities as possible and to start collecting money.


The benefit to the Brutii are their temples with their military bonus' (temple to mars). Use it 'cause you're going to need it! Taking on the Greek armies is daunting, but you have to take out greece fast! Then keep going, Macadon, Thrace, Dacia, Pontics and Armenia. Don't stop until you're knocking on Egypts door. The trick to taking out the Greeks well defended cities is infantry. Because of their hoplites, cavalry isn't very useful. Have some to circle behind but rely on heavier infantry units. With the Brutii take control of the Aegean and Adriatic Sea. Then continue and take control of the rest of the Mediterranean.


They have to take Carthage and fast. It's a good idea to include Numidia and just sweep through. The large versatile Carthaginians and their elephants need to go up against your spearmen and large missle units, seige weapons. Use large seige weapons to flay their ranks apart. Sweep Sicily, Libya, Carthago, Caralis, Palma, then the Iberian peninsula. Navy here is the key. Control the Seas and especially wipe out the Carthage navy.

Mid Game Strategies

The most important thing after taking out your biggest enemies between 240 BC, through the Marius Reforms (which happens when you get your first large city) and on to 200BC is to keep the momentum going. The easiest way to do that is to keep the money flowing. Before you start serious expansion of your conquered cities you should have like 100,000 (I often times have 350,000) denari in the bank. Then you have to build things in your cities and keep them growing and happy. Since it costs as much in upkeep for the poor units (like peasants and town watch) as it does for heavier units, replace them!! Make good units in your major cities and move them to your outlying states. But when you do this move the units in massive armies. Learn from history, some of the biggest victories the Gaul and Goths had on Rome was setting up huge ambushes in narrow places where the Roman armies were split up. Keep your army together and drop off a few units per city. Then when you get attacked by a former ally (Germania in my case that I allowed to trade with me), you'll have the units to crush them. Keep your major cities productive even if they're losing money, it's OK, these are your industrial centers they can lose money.

Early on

1. Roads, Paved roads

2. Farms, Crop Rotation, Irragation

3. Port, Shipwrights, Dockyards

4. Trader, Market, Forum *Sewars and Public Baths as squalor reaches 3 or 4

5. Temples

6. Arena

7. Acadamies and highways (highways are for moving units as I haven't seen a big increase in trade from them and acadamies I only make in my capital. The acadamies give your generals a nice entourage but don't usually give you the diffeance between victory and defeat).

8. Then work on military on outlying cities. In your core cities, you may want to interject some military buildings as you go to make the cores of your armies. In medium cities early on I'll have one city making missle units (archery ranges) and another for cavalry (stables), usually as soon as the markets are built.

Since trade and city growth at this point is the most important make roads then market and then ports (with farms in the middle). Everything comes after. In a recently conquered city far from your core cities switch ports and roads as sea travel is easier than overland travel in those cities. I put temples before arenas because they affect more than one part of the city (temples to jupitar add to happiness and law). Keep people happy as the cities increase in size. The biggest factor to that is squalor. Keep a close eye on that. The other benefit to keeping people happy is you may be able to disband units before replacement troops get there and your people won't revolt (maybe wishful thinking but one can wish can't he?).

For cities and large cities

1. Aqueduct and City Plumbing. *Squalor is a huge threat to big cities

2. Temples and Parthenons

3. Irragation, Latfundium

4. Great Forum, Curia

5. Dockyards

6. Arena and Amphatheaters keep people happy especially in your out lying cities.

End Game

After about 200 BC and you've pissed off the Senate and they've cast you out, you have to attack Rome itself. The SPQR (senatus populusque romanus) controls the city of Rome. Take it out first! If you control (or subdue) the senate and the city of Rome, YOU ARE ROME! Then take out the large Brutii cities so they can't turn their military advantage on you (unless you're playing the Brutii in that case use your mititary advantage). Before going after some of the prizes over-seas, subdue the italian peninsula. Roman armies are quite varsatile so make sure you have a lot of different units to deal with new threats. These may just be the hardest battles you've faced, so be prepared. That being said, take them out fast! Take the italian cities and push hard to the rest of Rome. If you're playing the Julii or the Brutii and you don't have a large navy, you need one now. It may seem daunting to micro-manage at this point in the game and I'm sure you can win without doing a lot of it, but in my opinion it's essential. Keep disbanding old units and replacing them. Or throw them away by moving them to the front of an attack, but when a unit routs then it's more likely others around it will so I wouldn't recommend that. If a city can handle a higher tax rate do it! If you build temples and arenas and can raise the tax rates do it! The biggest problem I have is not having enough governers for every one of my big cities. Make sure on all of your border cities there is a very large garrison. More than likely you'll need it to keep the peace anyways but do it for the counter attack when almost everyone attacks you at the end. It will come eventually. Also make sure you have diplomats near the capital of potential enemies and in your border cities. Also another good strategy is having very good assasins near the borders. You can actually kill enemy family members! It's unlikely you'll be able to kill the faction leader or their heir but the others are fair game. And spy on all the cities you can, always.

Advanced Tactics

I haven't really talked all that much about the battles in particular, but I'll rectify that now. Later in the game when you're going up against really powerful armies, it's very important to have a balenced force and be able to deploy them properly. You can pause the game (P) and still give orders to your troops. This is an invaluable tool for the expert player. Remeber to keep spearmen at the flanks of your major infantry units, and especially if you have a large amount of infantry clustered together. Also keep your infantry together (a slightly spreadout line is fine but if there's an open spot that the enemy can pour through you have to tighten it up). Enemy cavalry units will go back and forth looking for weak spots in your line, don't leave one open! Keep spearmen together with your infanry. Resist the urge to send your spearmen after the enemy cavalry, the enemy cavalry can move faster than you and will open up weak spots. That being said use your cavalry and look for weak spots in an enemy formations. Smash quickly and get out. You do more damage in a quick smash than a long fight. Resist the urge to chase down all the routing units when they start running. When a unit panics and routs, it is more likely that another unit close by will also rout. When a unit starts running quickly smash a unit close by with cavalry and make it rout. Repeat as needed. (The only time I would say to go after a routing unit is for general (read family member) units. Kill those units!) Use seige as much as you can. Since they're slow and can't always go into cities, deploy then as close as possible and bombard the enemy as much as possible before moving in with infanrty. Always use heavy siege machines on groups of the enemy standing still and alway try to hit the generals unit with your heavy onagers or scorpions. Killing the general before the battle always helps. Rember that the Roman infantry WAS the army, cavalry and missle units were relegated as support troops, use them that way and you get the best successes. Agents should also play a large part of your strategy. Use diplomats a lot. They can bribe an army away from a small vulnerable city or bribe a city from the enemy. The only way to have enough governers in your empire is to bribe enemy family members to your side, do this as often as possible. If you've been following my advice and have a lot of money than it can be better to bribe a city than to attack it. For example if it is a small city and there are a lot of enemy units in it, it may cost you more in the long run (including rebuilding and retraining a large army that was devastated in the attack) to attack, than it would be to bribe the city, move your waiting troops in quell the city and move on. No waiting, go attack the next city. The only disadvantage to doing this is you don't get to enslave the populous of that city. Which leads me to another idea I had. Early on in the game the most important thing to do is to make sure your cities are growing as fast as they can. If you're quickly taking out the Gauls for example, your main cities should be expanding fairly quickly, but it can be quicker. Since only cities with governers recieve their cut of slaves from a captured city, move governers out of some of your cities temporarily before taking out a city, enslave the populous (sending a population bonus only to the city(ies) with a governer), and move all the other governers back. This results in a huge bonus to your core cities. The only thing is to watch you're not growing too fast to keep up with building the right buildings. Also keep well trained assasins and spys with your large armies. Amd more than one of each. If an enemy spy is in a city, you probably won't be able to get your own spy in there. So send an assasin to deal with the spy and any family members he has a good chance to kill (and do this way in advance of your invasion), then send in your spy. You get to see exactly what you'll be getting and what you'll be up against. You may even get to open the gates for your army. If you kill off a family member, it'll be easier to attack the city (the generals heavy cavalry bodyguards won't be there) and easier (cheaper) to bribe if you so desire.

posted by Anonymous Anonymous : May 17, 2005 6:27 AM

Post a Comment


Current Posts

Other links

Change the background image