Skip to main content

Posts

Showing posts from 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.) 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 .

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

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 r

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

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 constru

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

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. Esp

Why Unicode stinks

Happy New Year! Cliché, but awesome nonetheless. I hereby resolve to blog more. Nah. Scratch that. Who keeps their New Year's resolutions anyway? My family recently discovered that my grandmother, for instance, had a diary that she started every January in the early 1940's and the farthest she ever got was June (about mid-1940's - after that it looks like she permanently gave up). Anyway, onto the actual topic of discussion. What follows is a summary - it isn't accurate, but that won't really matter too much. A byte, for all intents and purposes of this discussion, is 8 "bits". A "bit" is a 0 or a 1. 8 bits offers 256 combinations (2^8 = 256). The smallest logical unit that can be used in a computer program is a byte. A computer screen is made up of a whole bunch of pixels, typically arranged in a 4:3 ratio (e.g. 800x600). With that knowledge and assuming you were designing a computer, how would you display a letter of the alphabet to the user? T