Saturday, June 20, 2009

Time Waster: X-PHP-QUESTION - Yes, I did notice

Welcome to Time Waster article #1. Time Waster is going to be where I put weird little easter eggs as I find them. Either programming hiccups or weird software oddities that caused me to waste time. Today's Time Waster involves the PHP website itself. To participate, you will need Firefox with the Firebug plugin installed.


Visit the PHP website in Firefox.

Now, open up Firebug and you should see something like this:

Why, yes, I did notice
(Why, yes, I did notice.)

A few other people have noticed this. Looking at the source code for their site doesn't have any explanation for its existence. Someone on the PHP developer team thinks they are cute.

Friday, June 12, 2009

Bad Design: Windows Task Manager

I've decided that Windows Task Manager is ill-conceived, poorly designed, and extremely misleading. Especially the following:



Most people have seen the "Performance" tab and that memory usage chart. Charts have a more powerful influence than a bunch of numbers and statistics. Take a good look at the chart and answer one question: What is the user going to think?

Most users have no idea what a 'page file' is. But most can understand the terms 'memory' and 'CPU'. The chart is extremely misleading. The chart above this chart is 'CPU' usage. In terms of all the charts in Task Manager, that chart is the most useful.

Think in terms of the average user trying to figure out why the computer is extremely slow. Now, based on this image, what can you tell about the current system?

That is right - the average user cannot figure it out. This means Task Manager is poorly designed and is downright misleading. The user is mislead to believe that the page file chart = RAM usage. Additionally, there appears to the user to be plenty of RAM for programs (220MB), so that couldn't possibly be the problem.

In all actuality, RAM usage _IS_ the problem for why the computer is so slow. There is 1GB of physical RAM available to the computer, 1.6GB total is being used, 2.1GB was used at one point during the session, and 2.5GB was used sometime in the computer's past. The solution to this computer's woes is to chuck in more RAM. But the average user won't know that because Task Manager is not showing them useful information via the chart. Using the page file as a chart is a bad design decision. At least change colors showing critical cutoffs so the average user can decipher that RAM usage is the issue when hunting down the reason for why everything is so slow.

Monday, June 08, 2009

Maximum failure: PHP 6 deprecates short tags

I just discovered that PHP 6 is officially deprecating short tags. I'm sorry, but short tags are incredibly useful. They should be turned on for every server. They simplify coding dynamic actions within HTML. Plus, you get the added bonus of using:

<?=$x?>

Which is short for:

<?php echo $x; ?>

Compare: 7 characters vs. 17 characters. The latter is over twice the length, quite unreadable, and, from personal experience with large code bases, unmaintainable! Typing 'php echo' in every time I want to execute/display data that is hosted within the PHP engine is ridiculous. This is a step backwards going in the wrong direction.

The lame excuse for removing short tags is XML. PHP is for HTML, not XML.

I write PHP code quite regularly. Prior to PHP 5, PHP stunk. PHP 5 really changed my view of scripting languages. PHP 6 is going to ruin that view as we will return, once again, to the dark ages of software development. What really gets me is that someone made a decent recommendation and the PHP development team scoffed at the idea and one person even had the gall to suggest that syntax highlighting is all that is needed - let me point out that blind PHP programmers probably don't want to hear JAWS attempting to speak '<?php echo' over and over again and syntax highlighting is a useless recommendation to a blind programmer. I can imagine a small army of blind PHP programmers beating up the PHP developers (especially the one developer who made the recommendation to use syntax highlighting) while blaring an audio recording of JAWS speaking '<?php echo' over and over.

XML seems to be the pervasive reason. I personally dislike XML and wish it would go away (I also wish Ruby, Perl, and Python would go away too - all three are equally terrible languages - and, yes, I've used them all). I've used XML enough to know that it is a terrible storage mechanism for any data. JSON is better but still not perfect. The PHP serialize() function gets even closer but is a language-specific solution. XML is hereby a lame excuse for not coming up with an alternate short tag strategy.

If XML is sooo important, then simply recognize the sequence of characters '<?xml ' and ignore it. It is already invalid PHP code, so fix the problem transparently. Oh the horror! Three lines of code at most is all that is needed. This whole issue is over a data storage format that isn't commonly output by PHP, is a terrible storage format to begin with, and is over the two starting characters at the very beginning of the storage format. Most people DO NOT EVEN USE XML in the first place! Requiring '<?php echo ' every time output is needed from within the PHP engine in HTML is a surefire way to tick people off. Especially when they learn that the reasoning is the two measly characters at the start of a XML document.

Good grief. I can't believe I'm having to tell the PHP developers how to write software. I'm now going to start tagging posts with "maximum failure" for areas where programmers have failed spectacularly to see the simple solution to a problem. End-users (PHP programmers) want short tags in PHP, the PHP developers see a singlular issue with XML and proceed to blow the whole thing out of proportion, and there is an easy fix (see previous paragraph) that allows both camps to be happy - it is as simple as that.

I'm hoping that as soon as PHP 6 comes out of its internal development cycle and becomes the official release, there will be a significant (read: massive) backlash in the short tag department. In other words, I'm hoping the PHP developers will be forced to add short tags back in and undeprecate them. The only reason there hasn't been a huge backlash already is because: No one knows they are already deprecated, deprecated functionality is rarely enforced, and people are too lazy to rewrite code that works just fine. So, I have one question:

Can the PHP internal developers mailing list handle a million programmers dropping by and asking the same question over and over and over and over and over and over again?

Edit: To date I've rejected all comments to this post. People are attacking me personally and completely ignoring both the purpose of this post and this blog as a whole. This is my rant blog - a place to let off steam - if you don't like it, then don't comment and simply leave. Sheesh.

Monday, March 16, 2009

unsigned long long long long long int

Congratulations! You've encountered one of the more hair-brained stupid schemes of the past century. There is no way in ANSI C/C++ to say, "I want X bits of storage for this integer."

Your initial thought might be, "Wait a minute, that can't be right...right?" Let us look at the various data types available to an ANSI C/C++ programmer:

char
int
float
double
struct/class/template/union
pointer

A 'char' lets us declare a single byte. A byte is 8 bits...or is it? CHAR_BIT (in limits.h) is typically defined as 8 bits (and the Standard requires it to be defined as a _minimum_ of 8). However, it could be defined as 9 and there has been some hardware where it is defined as 32. Additionally, it is up to each compiler to decide whether just saying 'char' is signed or unsigned.

Thankfully 'float' and 'double' use the IEEE floating point standard. Edit: Due to some response, I should clarify: Every compiler I have ever used (and I've used quite a few) relies on IEEE floating point for float and double. However, the ANSI C/C++ Standard does not require IEEE floating point to be used (it just happens to be convienently used basically everywhere).

The struct/class/template/union are not technically 'data types' but more of a grouping mechanism to group logical chunks of data types (and data) together.

Pointers can point at any of the other data types.

Now that I've worked through all the other types, we are left with 'int'. People first get their first taste of this problem when they discuss sizeof(int) on the various forums out there. They learn quickly about 'short', 'long', 'signed' and 'unsigned'. Below is a chart of what the ANSI C/C++ Standard says is the _minimum_ number of bits for each type of 'int':

short int - 16
signed short int - 16
unsigned short int - 16
int - 16
signed int - 16
unsigned int - 16
long int - 32
signed long int - 32
unsigned long int - 32
long long int - 64
signed long long int - 64
unsigned long long int - 64

Those are the minimum number of bits. Each compiler author chooses what various forms of sizeof(int) are in terms of bits. So, some compilers are 16. Some are 32. Some are 64. And there are even a couple compilers that define sizeof(int) as 24 bits. It varies so widely.

The 'long long' type was added so that 64-bit hardware could be programmed for in C/C++. And, to accommodate this hacky extension of C/C++, you use the printf()-family format specifier %lld, %lli, or %llu to display the integer.

So, now here is a question to ponder: What happens when native 256-bit data types show up in hardware? Are we going to create more hacky accommodations and sit all day writing 'unsigned long long long long int/%llllu'? What happens if some popular compiler vendor decides that 'unsigned long long long long int' is 384 bits? Or are we going to start mixing 'short's and 'long's - 'unsigned long long short long int'? How much longer will this "minimum number of bits" foolishness continue? The lack of being able to declare how many bits/bytes we need for integer representation is silly and only going to get sillier as int sizes get larger.

Someone will point out bitfields. I hereby point any such someones at the numerous issues surrounding bitfields. Bitfields are typically restricted to the size of an 'unsigned int', have poorer performance (compared to doing the same things they do yourself), are only available
inside 'struct's, etc. They are a modest solution, but hardly workable in the long run.

'int' (implicitly 'signed') and 'unsigned int' should be all we need and should mean, "I don't care how many bits there are for this integer and trust the compiler to generate enough bits for the target platform for most common operations." That is - 32 bits for 32-bit platforms, 64
bits for 64-bit platforms, etc. For specific declarations where we need exact bit sizes and refined control, I'd like to see something like:

int@64 x, y;

To declare a couple of 64-bit signed integers. The '@' is illegal C/C++ right now (i.e. won't compile if you try it) but would be a pretty good candidate.

For printf() and similar routines, %@64i seems like it could work well enough. The '@' symbol also avoids existing printf() "extensions" such as multilingual parameter support. This suggested approach would make things more readable and this approach also allows us to get rid of the near-worthless 'short' and 'long' keywords from the language.

I'm definitely agreeable to restrictions on such an addition to the language such as "implementations may choose to place a limit on the value after the '@'". And such limits could be "multiple of 8" or "power of 2" or "between 1 and 256 inclusive" (or a combination). For where a compiler has restrictions and does not necessarily provide native support, it should be possible to do something like this:

#if !native(int@512)
typedef __Int512Handler int@512;
#endif

int@512 x, y;

The 'native' preprocessor keyword would mean, "If the compiler supports this type natively" (the above example means, 'If the compiler does NOT support this type natively'). The above example would allow printf() to assume that the value passed in will be of the specific class if the @value falls out of range of native values. The class would provide the necessary logic to handle all normal integer operations.

Even with the above, the compiler author should still be able to put restrictions on what can be declared. Let's say the compiler author only wants to support "integers that are multiples of 8 and powers of 2 up to 512 bits" and the hardware only supports everything in that range up to 64-bits natively, then the author only has to define 128, 256, and 512 bit support. As each platform comes into existence, native support can be added and, in the event older native elements disappear (e.g. 16-bit), support can be relegated to a class. Old code would just simply need to be recompiled for the new hardware.

Sadly, though, the ANSI C/C++ committees aren't likely to ever see this suggestion. So, we will likely end up writing 'unsigned long long long long short long long long short short long int' in the not too distant future.


Edit: Someone pointed out stdint.h to me. I feel slightly embarrassed for not knowing about this BUT implementations are only required to provide definitions for types that the hardware and compiler supports. My approach does something similar EXCEPT it allows us to get rid of a potential plague before it becomes quite troublesome: 'short' and 'long'. The whole point of this post is that we are using 'short' and 'long' for something they are NOT intended to be used for - to define integers of specific bit-lengths and if we keep on going like this, it will come back around to haunt us later. stdint.h is definitely a good starting point but we need to get rid of 'short' and 'long' in favor of a more generic approach.

"Hair-brained stupid schemes" is a great phrase.

Saturday, March 14, 2009

Into the Deep Fryer

I've ranted before about the poor quality of today's constructed components. I have another rant today that isn't really computer related but still interesting nonetheless.

Back in the day when IBM reigned supreme, they came up with a piece of "big iron" that still runs much of the financial world. Most people will recognize the following instantly: AS/400.

What crossed your mind when I said that? "Old" and "Ancient" come to the forefront of my mind. But are immediately followed by the words and phrases, "Reliable", "Solid", "Well-built", "Well-engineered".

Now think about today's software and hardware. Do you think the same things about reliability, being solid, well-built, and well-engineered? Probably not. This is a plague in our world and it boils down one simple truth: People don't care deeply about their jobs today. And that lack of caring results in slipshod, poor quality design and construction. Worse, people don't take responsibility for their lack of care when something really bad happens. Even worse, we have laws in some cases where people who fail at life can simply point at the law and say, "Well, the law says we have to do that, so we did........and therefore I'm not at fault."

And this brings me to deep fryers. "Haha" jokes aside (yes, I realize I could do a number of humorous bits here), a deep fryer is a pretty dangerous piece of equipment. You have to be responsible to own and operate one. You've got a heating element that can melt and/or set fire to virtually anything, really hot oil flying everywhere capable of inflicting 3rd degree (or worse) burns and/or starting grease fires, and typically some (usually flimsy) electrical cable that gets feedback from the heating element and gets rather hot too (electrical fire anyone?)

I'm looking for a deep fryer at the moment and, while I'm not too terribly shocked because I know no one cares about their day job to actually make a quality deep fryer, I am a bit shocked at what I am finding. I decided to go on to Amazon.com to look at deep fryers. I am a bit old-school I guess because all the deep fryers I've worked with in the past reach a nice toasty 375 degrees Fahrenheit. Anything less than that will cause whatever you put into the fryer to soak up the oil. Now here's something you probably didn't know: Fried foods can actually be healthier than baked foods, but only if the oil is hot enough and recovers quickly after putting the food in. The reason why it is healthier is because it won't absorb the oil and the oil will burn off the fat during the cooking process leaving you with a nice, lean dish that is moist and tastes great. 375F is the recommended temperature, but 400F is the ideal initial temperature because the temperature will drop rapidly upon putting the food in (about 50 degrees in a matter of seconds). Anything lower than 375 will cause the food to absorb the oil and keep the fat intact, which is worse (healthwise) than if you baked whatever you were trying to fry. Additionally, vegetable oil is healthier for you than any other type of oil (e.g. peanut oil is really bad for you).

It took me looking through about 20 different fryers to finally find one without a 1-star review stating "the unit doesn't get above 325F and takes an hour to get even that high". I've never owned a fryer that didn't get up to 400F. We can blame the stupid "safety" laws for this dumb and, ironically, unsafe engineering decision. Many of the "modern" deep fryers I found on Amazon.com apparently have to be plugged in for an hour just to reach the low temperature of 325F. Most people will leave the fryer unattended during that time - great for small, curious children and the nearby hospital burn center!

Some of the fryers made now have "magnetic cords". I guess some engineer saw the Apple laptop cable and thought, "Hmm...I can do that for our new deep fryer. It will be a cool feature." The reviews on such fryers reveals that it is not only a bad design decision, it is a dangerous design decision. People end up burning themselves trying to keep the cable plugged into the unit or use electrical tape to keep it in place, which has a fairly low melting temperature - ah, I love the smell of burnt electrical tape in the morning! Great fire hazard for the whole family! Hospital burn units love this "feature" too.

Now here's a doozy: T-Fal FR7008002 Ultimate EZ Clean Pro-Fryer - check out the 1-star reviews on that one. Apparently the automatic oil filtering/cleaner feature on that unit is flawed in a serious way. Hot oil is bad enough inside any deep fryer. This deep fryer apparently leaks hot oil everywhere even during cooking. 325F oil. And this unit apparently only reaches 325F despite saying 375F. It makes a mess and melts your kitchen (I feel sorry for the one poor soul who had this shoddy device destroy their perfectly good kitchen on first use). Additionally, this amazing, disaster creating device can be yours for only $117.49. That's right folks. For only $120, you can turn your beautiful kitchen into a disaster! And likely set it on fire in the process.

Surprisingly, the cable on the deep fryer (you know, that thing connecting the fryer to the wall) has not changed in the past two decades. What is the whole point of an electrical ground on sockets if the engineer isn't going to design for it? Deep fryer electrical cords get hot enough to melt themselves. For only $49.95, you too can have an electrical fire!

The only "innovations" deep fryer technology has made in the past four decades is the grease splatter "window" (tiny glass cover), which gets so covered in grease you can't tell if it is done without pulling up the lid. The other "innovation" is the charcoal filter, which traps most of the odor produced by the frying oil. That is the good part. The downside is the filters have to be replaced and are hard to find and sometimes expensive. It might make more sense (and be a lot cheaper) to use a grease trap (wire mesh screen) and stick some regular charcoal on top of that. Just saying.


Okay, now that I've covered all the bad issues with today's "modern" deep fryer. The main issue boils down to what I mentioned before: Shoddy construction due to people not caring deeply for their job. So, let me, a software developer, tell you, Mr. Deep Fryer Engineer, how to do your job.

First, scrap your existing design because it more than likely sucks. See Amazon.com 1-star and 2-star reviews for why your design sucks.

Let's start with the base. It needs to be solid, stable, and capable of supporting 15 pounds of metal. The heating element should be at least a good three inches off the ground. The base should be made of a material capable of absorbing, drawing away, and dissipating the heat so it doesn't melt countertops. Take a serious look at computer processor and graphics processor cooling technology. They've got to keep super hot processors from frying themselves. A similar approach could be used to keep the base super cool while keeping the main reservoir hot.

Based on what I've read, the heating element needs to be capable of handling and drawing 1800W of power. Don't skimp here and use quality components. Some places are using cheap-o heating elements and then creating lame excuses in the documentation later with stuff like, "Don't use shortening with this deep fryer." Make this full-on awesome. Test the heck out of this thing to make sure it reaches temperatures in excess of 400F easily (450F would be great) and does so as quickly as possible. It should be capable of withstanding its own heat for a solid year (i.e. you leave this plugged in for a solid year and doesn't burn itself out before even considering going to market with it).

The heating element should be tied to a controllable thermostat. Dials are time-tested and proven. Digital is not. Less things to go wrong = more awesome (and less likely of a fire breaking out). The thermostat should be accurate to within a degree and stay that way over thousands of uses.

A thermometer capable of taking the heat. None of this "when the light goes out so that you can no longer tell that the unit is on in the first place" or "when the unit beeps at you through digital technology" junk. Let the user see for themselves that the temperature is correct.

The cord should basically be one of those bright orange power cords you find in the hardware store. You know the kind: Grounded, three prong cable that is a good solid 1/4" thick and can take a licking and keep on ticking. Made of material capable of withstanding the temperatures and not melting and shorting itself out...and if it does, it is grounded so you don't start an electrical fire.

The main reservoir should be made of roughly 15 pounds of steel (let's assume for frying up to 1.5 pounds at a time). If your deep fryer doesn't have 15 pounds of steel, you are skimping. 15 pounds will keep the oil hot and have quicker recovery and it has the added bonus of not going anywhere very fast (e.g. small children with the insatiable desire to land themselves in a hospital burn unit). Okay, maybe 15 pounds is a bit much and maybe not steel (Cast iron is harder to keep clean and tends to rust too easily though), but you get the idea. Heavy enough it isn't going anywhere when a small child tugs at the cable and holds enough heat to recover the oil temperature very quickly when the hot food is put in.

Grease trap flip cover. I don't have the foggiest idea why engineers use glass covers. And plastic and heat never mix (plus melted plastic in your food probably causes cancer). Metal mesh grease traps are, IMO, much more reliable and you can still see the food. This grease trap should extend and arch down instead of just barely covering the top (as most engineers who design one are prone to do). There should be a handle. Rubber would be okay but that might melt given the heat conductivity of metal and the high temperatures involved. Maybe a way to quickly snap-on attach and detach the handle (push button on the handle to lock/unlock?), but you deep fryer engineers are likely to screw that up, so just forget I mentioned it. Rely on oven mitts or really fast fingers, I guess.

Test all of this stuff for a solid year before going to market. No part should break, bend, or die on the prototype model. It should be left turned on 24/7/365 @ 375F with fresh oil several times daily. If you can pass that test, you are ready for the consumer market. Consumers are tired of stuff that breaks.

Now for a few features I want to see that you'll likely screw up.

Rapid cooling system. A spiral around the outer edge that acts like a hose (open at both ends). You put the deep fryer in one half of a sink and insert one end of a metal tube into the upper part of the spiral and hold a funnel-like end under cold running water in the other half of the sink. The two ends can be connected by some sort of flexible heat-resistant plastic. No water touches the oil and yet the container cools very quickly. The talented individual may use a large spoon to stir the oil to help it cool more evenly. Maybe create an attachment for the funnel end so that the user doesn't have to hold it but it stays under the faucet and above the upper end of the spiral (otherwise you'll be fighting gravity). The $.02 hack is a couple twist ties to tie the funnel end to the running faucet. I'm sure you can come up with something far more professional. This, however, is probably a feature that will make your brain explode trying to understand it. So, don't bother implementing it because you are likely to screw it up.

Easy oil emptying and filtration system. Some engineer already screwed this feature up (see the T-Fal link above). You can simply avoid their costly mistake by following this simple idea instead: A siphon. That's right! I'm referring to the ancient (several thousand years old), time-proven, stable concept that works! Except for one little problem: As a deep fryer engineer with numerous past mistakes and doesn't test your products, you are likely to screw this up too. The easiest solution is to provide the user with TWO of the metal, flexible plastic, funnel devices except this one will have the funnel facing the tube, have a filter, be sealed, and possibly be a lot skinnier. So, if you perfect the first feature above, you have a decent chance of getting this one right too. Cooling comes before emptying out the oil anyway, so this is a logical expansion. Don't skimp on this and do something funky with the first tube combination (e.g. a reversible funnel). Deliver two complete sets of tubes and accessories to the customer.


Once you have completed all of the above, hammered out all the bugs, and have zero complaints on Amazon.com, then and ONLY then should you consider adding more features beyond what I've listed.

Rhetorical: Why do I keep having to come up with what should be blatantly obvious? Why the heck am I designing your deep fryer for you? Isn't this your job? Then do your job already and I won't have to tell the world how lousy you do your job.

Deep Fryer without any 1-star complaints

Which is the best thing I've found so far. It took me a lot of digging around to find that one particular device. I looked at over 20 different deep fryers with 4+ star ratings on Amazon.com before finding that one. This tells me that Deep Fryer engineers don't care about their jobs and users don't bother taking the time to measure oil temperature and then wonder why everything comes out soggy (but the same people were giving it 4/5 star ratings anyway, ruining Amazon.com's rating system from the high-level perspective). It comes the closest to what I described and, according to an Internet post I found elsewhere, reaches 375F easily, thanks to the 1800W heating element. According to Amazon.com, and I'm not surprised, the digital components falter (digital = some embedded software/hardware engineers were involved = shame on you for making junky software/hardware). For hardware like this, analog is still where it is at folks.

And now, my dear programmer types who are reading this, make sure your software is quality. It has been said, "code like the next person who will maintain it is a serial killer who knows where you live." "Eat your own dog food." Use your own Deep Fryers.

Perhaps we should deep fry the Deep Fryer engineers? Into the Deep Fryer you go!
(More jokes could ensue, but I figure that is plenty).

Saturday, February 21, 2009

Habits of video game designers...

I always enjoy a good video game. I don't get a whole lot of time to play them but when I do, I tend to enjoy playing them. My reason for playing video games is to relax and enjoy the game. Mostly to relax though. Relieve stress. That sort of thing.

I'm going to simultaneously review three different games I've played over the past few months in regards to how they SHOULD have been developed. The three games are Bioshock, Assassin's Creed, and Crysis. There are LOTS of spoilers if you haven't played them. I tried to not ruin the final bosses though.

Which brings me to my first point: If you are designing a video game and the person playing the game selects the "Easy" difficulty, it should be nearly impossible to die. Nothing is more frustrating than waiting for a game to reload the last saved game for the 10th time just because the character died again....on Easy. I'm not the greatest gamer in the world, but I'd like to think I am better than average. However, I am the sort of player who enjoys sneaking around and getting headshots through covert means. In that department, Assassin's Creed offered me the most satisfaction. Being able to just walk around, use the from-behind-knife-stab-kill and then nonchalantly walk away into the shadows before the target hit the ground was definitely entertaining. Bioshock and Crysis offered no such options. Ironically, Crysis was a military strategy-esque game and, from my perspective, the most elite units in the U.S. forces are SEALs - and they don't run around like idiots. They do things covertly - so I figured that was the best way to play Crysis. I found that the only way to beat Crysis was to essentially run around like an idiot. Until I did that, I died on "Easy" so many times it was silly. You can't sneak around Crysis and expect to win without dying a zillion times.

Also in this vein, I play on "Easy" for several reasons: The enemies are supposedly easier to beat. It gives me plenty of time to get used to the controls. And - I get to enjoy the environments the designers created. What is the point of playing a game if you beat it in 3 hours? I like to take my time - LOTS of time. All three games took me at least 40-80 hours to beat. I like to walk up to the trees or climb to a high mountain and just pause and look around. Most gamers out there on forums are all along the lines of, "I spent $50 and beat the game in 5 hours". Not only is that an insult to game designers everywhere, it is a waste of perfectly good money.

Now onto the next issue: All the latest games seem to go from completely normal (or at least plausible) to really bizarre just so there can be a final boss. Obviously games aren't meant to be realistic, but I didn't see Assassin's Creed's ending coming. It was completely normal right up to the final boss but then all the laws of reality suddenly went out the window.

Bioshock also had an equally weird ending - the designers at least kept the whole game bizarre so you at least knew the final boss was going to be odd. But from the first sight, it was obvious to me that the main character and the final boss were in two completely different leagues (even on "Easy"), so my character shouldn't have even survived the first round of the Adam fight.

The first Crysis boss should have basically torn apart the front half of the aircraft carrier I was on or at least sank the whole thing just from its own weight - especially since the ship was already taking on water. The final Crysis boss could have just simply squashed the aircraft carrier and instantly sank it by landing on it. Sometimes I wonder if game designers do this in a meeting: "Let's create a game engine with real physics and then throw both the physics engine AND logic out the window at the end of the game........ Awesome!"

Nest issue: Level loading. I will keep saying this until someone pays attention! Game programmers - start loading the next level while playing the previous level! This, of course, requires cooperation with the designers - some sort of waypoint/trigger to begin loading the next level. If you can't do that, then please, please, please load some sort of wireframe overview of the level and load the textures for the level as you go. I refuse to accept that such as I described is impossible. Bioshock was the worst in terms of level loading times. It used to be that games loaded instantly or it was assumed something was wrong with the game and the reset button on the computer was pressed. It should be possible to load a level instantly without a splash screen. Just do it.

Next issue: Hardware adaptation. Game designers seem to absolutely love pumping as many texels into models as possible. Programmers, conversely, love putting as many of the latest graphics card features into the game (shadows, blur, HDR, etc.). Fine, but don't make me guess which feature/setting is causing my framerate to drop to 1 fps. Bioshock and Assassin's Creed were fine - in fact, my hardware was capable of running the game smoothly at maximum settings and did not require restarting the game to get them (and I was also able to run them both at desktop resolution). Crysis, on the other hand, basically required restarting the game whenever I tweaked the settings, which I had to do several times. For the final aircraft carrier deck scenes, I had to turn several options to Low just to be able to play the game - looked really bad too. I now understand the Crysis supercomputer "jokes" I've read plenty about on the Internet. The Crysis game engine leaves something to be desired in terms of performance (poorly written). I was able to, however, play almost the entire game with the default settings - right up to the aircraft carrier deck scenes. However, even that was insufficient at times (occasional lag). Most users won't even understand most of the settings in the settings panel any more (they have weird, technical names) and even fewer understand which features/settings will affect performance the most because each game is different.

So here is a great solution to this problem: Create an frames per second range selection and automatically adapt the quality settings accordingly. So, let's say I'm willing to accept framerates from 15fps to 30fps under non-battle conditions and 23fps to 50fps under battle conditions. Basically, this means that the game should track the frames per second at all times and whether or not the main character is under attack or about to be under attack. It would also be extremely useful for the game engine to know how difficult processing the scene through the hardware will be. What this should boil down to is a threshold system. If the framerate falls below or rises above specifically set conditions by the user, automatically adapt the game settings starting with the most expensive settings and working down to least expensive. Crysis, however, didn't handle setting changes very well (caused weird flickering to take place requiring a game restart), so care obviously needs to be taken in the programming (the other two games seemed to handle most changes just fine). Obviously, quality setting changes will cause most games to pause...BUT it would be very useful if such changes could be phased in (like the level pre-loading idea). Unless, of course, the game is lagging so badly that the player is getting less than 5fps - then pausing while drastically altering the settings would be better instead of staggering the changes.

The user should also be able to configure how long the framerate has to be outside the range before actually doing anything. In my experience, noticeable framerate drops typically only last a brief time (a half second or so and then the game continues for another half hour without problems - no point in altering settings at that point just to have them altered again a few seconds later).

The user should also be able to configure the settings thresholds for online play as well. Single-player lag is fine by me but multiplayer lag is not good at all. I don't play online very much though. Too many 12 year olds with foul mouths if you know what I mean.

Next issue: Stop with the NVidia stuff. I'm sorry, but I've used enough NVidia hardware to know that I can generally get a better video card for the same price with ATI. While NVidia is generally ahead of the curve, ATI cards are cheaper for the same performance as NVidia. Used to be a NVidia fanboy too. So, the switch to ATI was basically an ego-bruiser but way easier on the bank account and I was able to afford decent video cards. NVidia hardware runs hotter than ATI hardware too. All three games were pushing the NVidia brand for no particularly good reason (I doubt Crysis really runs well on ANY hardware where you spent less than $8,000 USD - I built my own system for $1,500 and Crysis is the only modern game I can't max. the settings out on). Also, the drivers for NVidia are written by programmers who clearly don't know much about authoring software - what good is awesome hardware if the software (driver) is causing the OS to BSOD every time you go to play a game? Never had any stability issues with ATI - meaning they have better programmers and QA personnel who know how to author a stable software driver.

Next issue: Foul language. Bioshock and Crysis (especially the latter) have foul language throughout the game. Assassin's Creed was pleasant in this regard. Users should have the option to turn off the foul language and multiple voice recordings should also exist. I'm tired of foul language being in everything ranging from games to movies to people. The English language is diverse, rich, and powerful enough to avoid dropping four letter words every few minutes. Show some class when designing games. Thank you.

Next issue: Game startup screens that I can't skip. All three games had them. Bioshock and Assassin's Creed were the worst. I understand companies want to have their logos displayed. Fine. Display your logos the first time I fire up the game. You can even force me to look at them the first time. But after that, let me press ESC to jump to the main menu. If you absolutely have to show me logos, why not display them right at the beginning of the game itself? I'm not talking about the intro. screen, I'm talking about an overlay of sorts in-game at the beginning.

Next issue: Vehicle controls. This is pretty much a Crysis-specific thing but both Bioshock and Assassin's Creed had "vehicles" too. When you are in a lumbering, hard-to-control vehicle, it helps to know what in the world you are stuck on. The specific vehicle I'm thinking of is the tank in Crysis. I died so many times because I got stuck on a little bush it wasn't funny; it was incredibly frustrating (it was a tank, for crying out loud - tanks can flatten pretty much anything - sheesh). Going third-person in a tank would be silly though - third person worked well for Assassin's Creed, wouldn't work for a tank in Crysis since there is a battle still going on around you. I should have been able to press a key (say, Ctrl) and be able to quickly glance around without having to rotate the main weapon.

Next issue: Equal distance from start to finish for each level. Game designers seem to put a ton of effort into the first few levels, make them highly polished, extensive, and creative but then give up on later levels. Occasionally I get stuck in a game and go view a walkthrough. I don't immediately view walkthroughs - I only do that after dying 30 times and trying every strategy I can think of. Usually the solution is obvious. What I typically discover is that I am close to 1/3rd of the way through the game. I usually think, "Wow, this is a pretty long game if I'm only 1/3rd of the way there." I usually stop after using a walkthrough just to give my brain time to think about strategy so I won't have to use the walkthrough again. Assassin's Creed was the most balanced of the three games - but only because of the issue I will cover last. Each level was of roughly the same length in terms of time taken to complete. Crysis was the worst - I literally finished the last two-thirds of the game in 8 hours - a fraction of the time it took to complete the first third.

Next issue: Hurrying the plot along or not providing a good enough "memory". I've said before I like to take my time in games. Crysis was the worst in hurrying the plot along and Bioshock was the worst in regards to knowing where to go next for the plot to continue. There was always someone in Crysis yelling, "Come on, we don't have all day." There were times in Bioshock where I was supposed to find things without a directional arrow (which was fine, but did get tedious wandering everywhere). There were also times in Crysis where the HUD stopped showing where to go next, but it was rare. If I were to stop playing during those times and returned a week later...would I remember where I left off? Assassin's Creed's plot was fairly obvious but dull.

Next issue: Linearity. This has been repeated so many times by so many people, it is ridiculous. There is only one game ending to almost every game made. Replay value of one-game-ending games = zero. The only reason I replayed Half-Life 2: Episode Two a while back was to get the Garden Gnome Achievement. I got it but it was the most hideously difficult achievement ever.

Supposedly one of the absolute best games ever is a game called Chrono Trigger (unfortunately not for PC). The graphics were bad, the gameplay repetitive, and the story was not the greatest (but was also heart rending in some spots), but what made it special was that there were 13, yes thirteen!, different endings. You could choose to meet the final boss at basically any point of the game. For the singular reason of 13 different endings to the game is why it shows up on "Top 10" games-of-all-time lists...every...single...time. There was supposedly only one ultimate path to the game though. I'd love to play a first-person shooter where you get to make several choices and each choice has consequences later on in terms of what levels you get to play, people you meet, stuff that gets said, and the number of endings that can happen. Supposedly Mass Effect is like that but limited and still supposedly ends up having just one ending.

Next issue: Achievements should be possible to get without having to pull hair wondering what you missed (particularly for the "find these 50+ things" hunts). I mentioned HL2: Episode Two, but Assassin's Creed also had an achievement system as well. I like the concept just because they are sheer fun to get when you get them (usually I have some sly smile on my face) but you should be able to select the achievement(s) you will be attempting to get - that way you don't miss them - perhaps directional arrows/reminders. It would take the fun out of some achievements by doing that, but you could collect all the flags in Assassin's Creed much more easily. Or know that the garden gnome fell out of the car for the millionth time (which begs the question - surely the designers KNEW of that issue and could have designed a working trunk).

Next issue: Limited weapons. This is related to the final issue but if you are a gamer, you know exactly what I'm talking about. Assassin's Creed was actually pretty good about weapon selection, but some Greek Fire (or a bit of flint) could have been nice for a "create a diversion" Challenge.

Bioshock came in second place. The Plasmids were interesting but expensive and I ended up setting everything on fire most of the time since ice didn't drop items and the rest were lame. I ended up just shooting Big Daddies with the RPGs and didn't really care for killing the little sisters (even though I could have gotten more Adam for it). Most gamers tend to settle into a groove once we know some specific approach works well. Upgrading weapons was useful but not many choices were given (the game brochure prides itself in how you can custom upgrade and make enemies do things they wouldn't do otherwise). Your average Joe-schmoe RPG game has more weapon customization options than Bioshock. The camera "weapon" was an inconvenience. In order to get some Plasmids and upgrades, you had to take pictures - and the best time to take them was in the middle of a firefight.

But Crysis was the worst. Ironically, you could hold nearly unlimited ammo but only two weapons. The RPGs were even more annoying - why you couldn't carry more ammo was silly. You also had to bend over and pick up all the ammo. Kind of a nice touch at the beginning, but got tedious really fast. There should have been a "Maximum Magnetism" mode. The main character was basically made of metal. I only used grenades one time in the entire game. I find grenades annoying unless they are of the explode-on-contact-when-fired-from-a-projectile-weapon type. Grenades are usually lobbed around corners in real life with a known threat inside - a feat that is VERY difficult to accomplish in games (especially since grenades in games are never as powerful as they should be). The general solution most games use is to face the enemy, throw the grenade, get out of the way, and then hope you get lucky. During which time you could have already killed them and moved on.

Even more annoying was the TAC cannon. I was pretty annoyed with the game by the time I reached the TAC cannon since my weapons had been taken away from me for the second or third time (I like to build up an arsenal when ammo for each one is limited - taking all my weapons and ammo away annoys me). Then I got somewhat excited by the prospect of being able to fire nukes from a cannon. Then I discovered you could only fire nukes at an enemy that previously got more powerful when a nuke was fired at it, absorbing the nuclear energy. That was a pretty serious plot hole there BUT I was willing to overlook that as long as I could fire nukes at anything. It turned out that I could only fire it at the final boss, which, according to the plot hole, should have been able to absorb the energy of the nuke. Plus the final boss was ridiculously easy. I didn't mind too much about that though. It looks like the end of the game was given significantly less creative license and there are glaring storyline oddities/inconsistencies/plot holes that make it seem like it went through multiple iterations without proper quality assurance and beta testing (e.g. the island "shield" on the display expands BEFORE the nuke hits and then does the same expansion animation AFTER the nuke hits. Also, the Gauss cannon is an energy weapon - which should have had the effect of making the enemy stronger).

Final issue: Repetitiveness. I tire quickly of games that become overly repetitive. Bioshock was the worst in this regard. Close to the end of the game I swore that if I heard "Welcome to the Circus of Valuuuuuuuuuues" one more time I was going to find and put my fist through the person's face who vocalized that for the vending machines found liberally throughout the game. Actually, I was ready to do that after the second time I heard it. The ONLY interesting vending machine in the game was the one that delivered a live grenade at your feet for free (can't beat that price tag!). That one was fun. Not as fun as throwing bunnies into a spinning fan on a vehicle destined for a cliff dive, but still fun. (Can you name the game I just referenced in that last sentence?) It is the little things that make a "good" game "great".

Crysis was repetitive in that it was shoot bad guys, wait for health to replenish itself, pick up ammo off the ground, repeat. Or, die, try something else, repeat. The only "cool" weapon in the game was the Gauss cannon and the occasional RPG. Everything else got boring really fast. The vocals in the game, "Maiximum [whatever]" were cool but equally repetitive. I left it on "Maximum Armor" most of the time since it was a pain to change the settings. Every reviewer of Crysis seems to complain about the "temple's" lack of gravity making the controls harder to use. Maybe on consoles but the PC was nice and smooth AND offered relief in an otherwise dull set of repetitions. The vehicles, on the other hand, were impossible to control on the PC and I got very tired of my tank blowing up for the stupidest reasons. The ground-to-air fights were also fun breaks in the monotony (although at the end of the game, everything flew). But, for a first-person shooter, it was better than most games of the genre. I liked the bosses at the end but bosses are really what keeps games interesting because otherwise it is the same thing over and over again. So there should have been some mini bosses to help balance things out. I did like the changing terrain and day/night cycles though.

Assassin's Creed was the second worst in terms of repetitiveness. I got VERY tired of climbing buildings to each and every lookout location and saving citizens by starting massive, bloody battles (some of those battles took a while and, when I was done, I'd look around and people were running around screaming at the massacre of at least 25 corpses - which should have likely drawn the ire of even those people). Then I'd have to run off to the next "save the citizen" battle. I also wanted to find the people who created that annoying woman, the one who would constantly get in the way saying, "Please sir, just a little coin. I'm hungry and starving..."; find the programmer, designer, and voice actor responsible for that and put my fist through their faces. I couldn't shove her out of the way, I didn't have any money, and killing her reduced my health and created a mess because she was a "civilian". The things I most enjoyed in that game were the various Challenges - in particular the Silent Assassin and Merchant Challenges. They offered the necessary diversion from an otherwise repetitive game. I did like climbing on the walls too, but that got tedious when it involved the eagle nests and the scenery didn't really change all that much. I would have liked a bit more variety - such as a "find the missing brick(s) needed to reach this birds nest" Challenge or a "Where's Waldo" Challenge or a "follow this person" Challenge or a "this Challenge is the basis for unlocking another Challenge [or two]" Challenge. The eagle eyes concept was cool but WAY underutilized. I used it once at the beginning and once at the end but otherwise didn't need it nor found it very useful. I didn't really care for the end of each level. I simply secretly stabbed the guy and then ended up having to run around each level for a while. One level I literally was running around non-stop for a good hour-and-a-half before I was finally able to stop. The only thing good about Assassin's Creed's repetitiveness is that each level was roughly the same length and thus took about the same amount of time to complete. An assassin is supposed to blend in (more or less). The main character stuck out like a sore thumb in his outfit. It would have been interesting to have participated in the evils consuming the land prior to carrying out the assignment. Get to know each target on a personal level by working with them, thus making it harder to complete each assignment but easier to gain the trust of the target beforehand. Lots of possibilities this game did not explore. The absolute ending leaves you hanging, though, so perhaps Assassin's Creed II will correct these problems and create an immersive and less-redundant experience. The problem with a sequel is there is basically no room for a clever past life like this game was. A past life experience will be difficult to pull off convincingly. More than likely, the present will be focused on (and probably do more with the eagle eyes), which will likely be riddled with plot holes. Surprisingly, right up to the final boss, there were few to no plot holes in this game (with the sole exception of the beginning where you come back to life without ever receiving a solid explanation). Of the three games, this had the best, most complete game storyline I've played through in a really long time.



If you are a game designer who worked on any of these games, you should know that I still enjoyed the games but they could have been a LOT better. Graphics are good in all the games but good plot consistency, a solid, emotional storyline, immersiveness, and not annoying gamers (especially PC gamers) should also be at the top of the list.

Consider adding me to your external beta testing team for your next game. I've played thousands of PC games ranging from Sopwith and Striker to Monkey Island I-IV to Total Annihilation (STILL the best RTS game ever) to Narbacular Drop (Portal's predecessor, Portal was made by the same indie team) to the latest and greatest. I'm also a software developer and have developed my own games (mostly for ancient handheld devices) - so I know how difficult making a video game actually is.

Saturday, January 03, 2009

Too Many LEDs

I was having a conversation yesterday with someone and we somehow managed to get onto the topic of LEDs and how there are too many of them. I wholeheartedly agreed because I've been getting annoyed lately at how bright everything is when the lights are turned off at night.

This morning I walked around the place before I turned anything on. I could see my way clearly everywhere. Whatever happened to all the fun we used to have with being able to stub our toes on something in the dark? Light Emitting Diodes. Pff. Whatever.

I counted them before turning anything on: 47 LEDs all either steadily on or going blinkety-blink in the dark. No one is looking at them. In terms of brightness at night, the bright blue and bright white LEDs are the worst (i.e. they output too much light). Green falls behind at a close second and red is last. I'm sure there are other colors and maybe different perceptions of how bright they actually are but all this light is wholly unnecessary. Especially since this wastes continuous electricity (47 * 30 to 60 mW = 1.4 to 2.8 Watts of continuous draw - not a whole lot, but it does add up) AND I'm pretty sure they also disturb sleep. Yup, I wouldn't be surprised to find some study that LEDs are the single greatest cause of sleep deprivation.

What are LEDs on all our devices good for anyway? One-glance diagnostic purposes. Now let me ask all you users: How often do you actually need to look at a device's diagnostic lights? Probably a few times per day for a phone but almost never for most other devices. The worst offenders - in order of offenses: My USB thumbdrive (a steady bright-blue fade in, fade out), Qwest DSL modem (I recently switched away from Comcast - a story for another time), a D-Link router, VOIP box, and the Ethernet connection in the back of the computer.

It really isn't hard to fix this problem: Add a button on the device that turns on the lights for a few seconds and then they - here's a shocker - turn off again. What a brilliant idea! Too bad I didn't think of it first: Wristwatches do this already. Engineers: Go steal, er, "borrow" the necessary technology from those who make wristwatches.

I swear Internet-connected components are the worst in terms of the quantity and annoyingness of their use of LEDs. Internet component engineers use the brightest LEDs possible and then make them blink incessantly. When was the last time you actually needed to look at the LEDs on those devices? Exactly. You can't remember. Neither can I.