Skip to main content

Posts

Transparent PNG8 is THE Solution To IE6 Transparent PNG Woes...For Photoshop Users!

IF you know what you are doing, PNG8 can be THE answer to IE6's broken support for transparent PNGs. Ironically, the web is discovering PNG8 just as we are finally phasing out IE6. If you develop for the web occasionally, you know what a pain IE6 is. I'm currently working on a very hush-hush project (hence no blog posts lately) and it is almost the last time I have to ever support IE6. After these projects, I will never, ever, EVER have to look back (woohoo!). Background If you do a lot of web development, you know about all of the hacks in IE6 to introduce PNG transparency. My current favorite full-blown solution to 24-bit alhpa transparent PNGs in IE6 is DD_BelatedPNG . However, even that has problems and is still a hacky workaround for a problem that shouldn't have even existed for more than two minutes. The moment it was discovered, it should have been fixed. I initially dismissed this Transparent PNG8 approach because I wasn't going to spend $300 on a piece...

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

A Real "Green" Computer

I hate the phrase "green computing". Why? Because the more stuff we have, the less environmentally friendly we actually are. In other words, if you can afford a computer, you ain't green. That would mean you sitting in front of the computer screen reading this. Yes, go ahead and squirm. However, that doesn't mean I shouldn't be aware of the world around me and therefore try to be responsible with my resources. And with those resources, I realize that if I can cut costs drastically, that would be a huge help to my fellow man. So, I have one question for you: How many Watts does your computer draw from the wall? Don't know? Neither do I. And I leave my computer on all day and night. There are important things my computer has to do every single day (besides filtering through thousands of spam messages) that requires it to be powered up and running. Of course, this usage comes at another cost - the room the computer sits in has to be within a tolerable ...

What to do when a computer arrives.

This post is also known as "Your computer could be a chemistry experiment waiting to happen". In my previous post on how to buy a computer , I briefly covered what to do when you receive a new computer but focused much more heavily on the topic of how to actually go about buying a computer. In this post, I will cover what to do before you use the computer for the first time to make sure what was built and sent to you is actually a quality product. You spent good money, let's make sure that no one cut corners where they shouldn't have and that all the parts are indeed correct. This first part requires you to be static free. First, pull the computer out of the box. Now go touch a doorknob while grounded. Now, read the computer manual for opening up the box and follow the directions. Usually thumbscrews or screwless entry is used these days making it easy to open it up. Yes, it is scary, but opening the box won't void the warranty or service contract. The computer wo...