Skip to main content

Posts

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

How to buy a computer

This blog entry isn't technically about software development, but every once in a while, we all need a shiny new computer. With all the latest overhyped buzz about the economy and gas prices (I've heard predictions that gas could easily be $10/gallon next summer - there is no "ceiling", but I've never deluded myself into thinking there was), if you are thinking about getting a new computer, it might be time to take that thought a tad more seriously. If gas prices skyrocket, then today's $3,000 PC could be $10,000 tomorrow. Maybe. Maybe not. Just a thought. At any rate, I'm not wanting to talk about the economy. What I want to talk about is the infamous question, "What computer do I need to buy?" I get asked this question frequently. There are a LOT of choices, so it is no wonder that people get confused and just want some guidance without being made to feel "dumb". Most people buy without thinking and then later regret the purchase. Th...

Adobe sucks

Let's say you walk into a store and you go to purchase a $100+ item. This item comes with one free bonus item that gets shipped later that the item you are buying is supposed to be used with. During checkout, the clerk sneaks in and scans an identical item through and you swipe your card and pay and go home without realizing what happened (let's say something distracted you). Both items are in tightly sealed containers. You get home and you realize that you bought two items. What would you do? Well, you would immediately return to the store with your receipt and ask for a refund for one of the items. Let's say you take both items back just to prove that you haven't used either one. The receipt also contains the exact date and time of purchase (well within 24 hours). The clerk can see that both items are sealed, have never been used, that the product they are supposed to be used with hasn't been delivered yet, and that the product is being returned within 24...