Wednesday, January 26, 2005

This is going to take a long time...

I am in the process of moving roughly 1.5 million lines of C code to C++ for several very specific reasons I can't mention here - not yet anyway. I'm off e-mail, web surfing, IM, blogging, and general reality for the next 3-4 weeks.

I expect that by the time I get back, I will have my fourth case of Carpal Tunnel Syndrome (CTS) in the past three years. Wish me luck and, uh, I hope it doesn't take much longer than that. I have already had enough setbacks, but this one could knock me out for a while.

Tuesday, January 18, 2005

Time for an update

What's hot? What's not?
Below is my list of recommended companies to do business with and those whom you should avoid like the plague. As a developer, you need computer equipment and software that simply works. I am always looking out for newer and more interesting technologies to add to my core recommended list. If you are a hardcore gamer, these recommendations are not for you. If you are searching for a good PC that won't break down, these can be for you but may be slightly out of your budget.

Recommended PC and/or hardware manufacturers:
Dell. I have yet to have a problem with Dell. Good solid hardware, but not the best for gaming. Spending less than $500 on a PC will get you in trouble, though (you get what you pay for).

IBM. Good hardware. Unfortunately, they shut down their PC division, so parts will be hard to find. Expensive.

Micron. Their memory chips are still top notch for those who need an upgrade to existing hardware.

ATI. NVidia has simply lost their edge - ATI is the way to go.

Intel. If it is AMD, you are asking for burned out motherboards and other trouble all the way. I know AMD has made strides to improve (and some people are fine with the possibility), but Intel chips have extra stuff on board to make sure that if it burns out it doesn't take the motherboard with it. It also has extra stuff on board to make sure the CPU doesn't burn out either. If the CPU goes, you'll have days of downtime where you can't write code. Time = money.

Blacklisted PC/hardware manufacturers:
HP. Poor technical support. Lousy hardware. Not nearly as bad as Sony, though.

Gateway. Off the permanent blacklist since 2004 and onto the regular blacklist. Amazing they are still in business.

eMachines. These guys have never been good at putting together a clean system that lasts more than 3 or 4 years...but they are cheap.

Microsoft mice. Microsoft used to make a really great mouse (the Intellimouse 3.0 USB dark grey on the sides). The newer version of the same mouse is manufactured poorly (buttons don't click, not as ergonomic, etc.). It is obvious that Microsoft is getting sloppy with making mice. Go with Logitech or some other company. Visit your local OfficeMax or Staples to try out a few.

AMD. AMD is still notorious for burning out multiple motherboards and creating frustrated users.

Permanent blacklisted PC/hardware manufacturer (10 year ban):
Sony - 10 year ban started in 2002 for absolutely abysmal Indian technical support outsourcing and unable to replace obviously busted hardware (CPU went bad). Ban will be reviewed in 2012, no exceptions. feeling the pressure yet?

Recommended software vendors:
Microsoft - Office 2003 with Service Pack 1, Visual Studio .NET 2003 Professional/Enterprise, Windows XP Professional with Service Pack 2.

Whole Tomato - Their Visual Assist .NET product rocks. Being without it is like being naked.

Scooter software - BeyondCompare. Very useful little utility.

Qualcomm - Eudora Light v3.0.6 - This little beauty is still the only e-mail client that can handle the influx of spam and is still free. It may be old, but it won't autoreply to spammers like Outlook will and I can create black hole accounts with it. This software is always being considered for replacement, but so far I haven't found anything (not even newer versions of Eudora). (And, yes, I have tried Thunderbird...when it can strip HTML from inbound messages and display flat, plain-text and only do bottom-posting, then I'll consider using it).

Notespad - A good solid text editor that can handle fairly large files. Has the Notepad look-and-feel, but geared for software developers. Good for making quick-and-dirty test programs where starting a new project to try an idea out would be way too difficult. 80% of my coding is done here, but most developers say they "need" syntax highlighting, which this doesn't offer. A good alternative at that point is Crimson Editor, but it can't handle huge 100MB+ files.

Borland - Builder X is actually intriguing. It has a bunch of different compilers they bundle together in a single package. The price is just about right too. Too bad they aren't offering the Intel compiler at their low-end range. Most developers have heard that Intel's compiler is blindingly good (including me), but have no budget to try it out.

Blacklisted software vendors:
LeadTools - Miserable product line for what it does. Most of their products have serious flaws that you have to work around by writing the routines correctly yourself.

The people who make BoundsChecker - They want to sell you their "complete solution" package. BoundsChecker is nice when it works, which it doesn't most of the time.

Permanent blacklisted software vendors (10 year ban):
Anyone distributing spyware and/or adware with their products. This includes, but not limited to, all major P2P vendors and a number of pop-up blocker development firms.

Saturday, January 15, 2005 the "I have just been positively wowed" sense.

Usually when I say, "wow," I refer to the negative sense of the word. This is most definitely a positive "wow."

Apple has recently slashed prices on their hardware. About a year ago I got a new PC, but at the same time I was seriously considering a Mac. All developers, look at this:

The Mac mini is visually impressive, but that isn't what counts. I have been saying for a long time that people won't move to Linux because it is unusable. Macintosh/Apple/whatever their name is today (such is the sad result of mergers - you can't figure out a company's name any more), has their sticky fingers all over making a usable OS. I would recommend Mac over Linux any day. I could care less about proprietary hardware - in fact, as a developer, it probably makes my life easier.

For developers, I have been eyeing the Mac for a really long time. It has one thing that every developer needs: Three OSes rolled into one without rebooting. On a Mac, I can get access to the proprietary Mac APIs (Mac OSX), some *NIX variant (BSD of some sort), AND Windows of all flavors (via VirtualPC). OSX is just as visually appealing as XP (although, I could do without bouncing, animated icons).

The Mac mini seems to be the perfect computer. It is 6.5 inches square. I just measured the top of my two computer full tower cases and it would fit quite comfortably there. It is interesting to note that you could stack these things like:

So, you could build an entire cluster of the Mac minis. Not sure what good that would do except for the "cool"/"sweetness" factor, but it wouldn't occupy very much space.

Now, I know PCs are available in that size as well, but you only get two OSes to choose from: Windows and some unusable *NIX flavor. 90% of the population using PCs have declared that Windows is more usable by putting their money where their mouth is. If you want to eat money, that's fine, but realize that it has been places I don't even want to talk about (some people use it as washable toilet paper - yeah, go chew on that one - think you can dig around my HTML).

Now, I'm not Windows bashing, but the next time you buy a computer, seriously consider the Mac Mini. I like how they allow you to pick what monitor, keyboard, and mouse you use. It offers plenty of firepower CPU-wise to compile code and type it into an editor. Unless you work with insanely huge projects, you probably don't spend much time compiling - so the extra cycles of a fancy-schmancy 3GHz PC are wasted.

Basically, for $500, you get the computer of your dreams (even comes with a reasonable ATI Radeon video card). It will take about a week to adapt to the minor changes between OSes (remember, the Windows UI stole from Mac). The only annoying thing about the Mini is the hard drive size. Let's see - my own code and data consumes roughly 13GB. I've got another 36GB in downloads (programs, applications, demos). If the OS uses 2GB and I like to play the occassional game that says it needs 5.5GB of space to play, I just ran out of space. I have approximately 300GB (.3TB) of space on my current hard drive. I need to be able to have lots of room to grow. So does every developer I know of. So, the best approach to this is to have a central, organized, global download repository. That eliminates 36GB of stuff and frees up about 20GB of space to play with on the default 40GB system. I can still utilize my .3TB storage system from the Mac via network shares. Pretty nifty.

Of course, if you are a hardcore gamer, don't get rid of that PC yet - all the good games are for Windows first and maybe for Mac later, so a KVM switch comes in nice and handy :)

Tuesday, January 11, 2005

I have returned...

Eons ago, in a day before my time, Douglas Macarthur once said that he would return. When he returned and set foot on one of the islands in the Philippines, he said that famous phrase, "I have returned." (Unfortunately for him, Ahnold Schwarzenegger's line "I'll be back" seems to have superceded "I shall return" in more recent times - I would wager that the difference makes for a good history test question).

In roughly the same way that Macarthur returned, Microsoft today dropped a bombshell on the anti-virus companies. In my automatic updates in-box resides something called the "Malicious Software Removal Tool," which will get installed before the next reboot in roughly 23 days from now. Microsoft is wisely being very careful as they cautiously step on anti-virus vendor's toes not even daring to call it an anti-virus tool.

Most people will not remember back to the Windows 3.x days as Microsoft was busy trying to define what the company would be and do. Back then, Win 3.x shipped with several tools that were eliminated when Win95 came out. One of those tools happened to be an anti-virus tool. Microsoft pulled out of that arena because they didn't feel it was profitable. Now they want back in. They recently bought out a spyware company and released their tool for free this week. This latest tool seems to be following that trend. All of this is being done in the name of "security," of course. Whatever. If "security" sells, Microsoft will buy, and their marketing department will turn it into a Flash animation.

The problem is that anti-virus vendors who aren't reading this blog right now will be left in the dark until it is too late. Let me point out that the same engine (code-wise) that drives anti-spyware applications is extremely similar in nature to the code one might write if they were making an anti-virus application. What the anti-virus vendors have failed to do is equate spyware with viruses. Microsoft has wanted to get back into the anti-virus arena since Win98 because it turns out that anti-virus software IS profitable. The problem is that they can't afford another anti-trust lawsuit with harsher punishments (the last one didn't do anything to them). So, what Microsoft has done is, in timeline order:

1) Declared that the company's theme is "security". Got marketing that message ASAP.
2) Waited to see if spyware would be equated to viruses.
3) Saw that no major anti-virus vendor declared spyware was a virus.
4) Released XP SP2 (Windows XP's Service Pack 2 contained a hint that Microsoft might be developing an anti-virus tool).
5) Sought a good anti-spyware vendor that might be willing to sell their engine.
6) Bought out said anti-spyware vendor.
7) Started experimentation with the engine to turn it into an anti-virus engine.
8) Released the anti-spyware product.
9) Released an anti-virus tool to test the waters.

They can logically argue in court that an anti-spyware engine is the same thing as a anti-virus engine (which it is - most spyware tools are starting to use heuristics and signature files), so they just happened to have virus definitions to fix a problem users were having.

If I were an anti-virus vendor, I would start doing one of two things:

1) Find something else to do not related to anti-virus stuff.
2) Hook up with my anti-virus buddies and drop a train, I mean, anti-trust lawsuit onto Microsoft. (

I would NOT sit back and wait for Microsoft to develop a full-blown anti-virus tool. That would be stupid. I think most of the really smart people saw this day coming back at #1 (the rest saw it coming at #4 and if you saw it just today...). All the anti-virus vendors had to do to keep Microsoft out of the game was to add spyware to your virus definitions list, but now it is too late. Microsoft has invested in the technology and they are out. It is only a matter of time. Game over.

Monday, January 10, 2005

An interesting article on blogs

See the last page of that PDF.

The author discusses an important topic about bloggers. Basically, bloggers can control the results that come back from search engines. For those who have no idea what I am talking about, I am referring to SEO. No, this isn't someone who has decided to shorten their long name to three letters, but rather stands for Search Engine Optimization.

Most programmers are aware of things like Googlebombs and sites like that and generally think there isn't much to search engine optimization. Technically, there isn't. You want people to link to your site and they want you to link to theirs. A never ending battle of trying to get high quality and high quantity links to a website - and get spidered properly. The trick comes in knowing how each search engine algorithm works and what to do if it changes. Some people try underhanded methods to raise rankings. A Googlebomb, for instance, will get you above your competitor temporarily and then your listing will drop off the end of the earth one day when your competitor complains to Google about it.

So, what does this have to do with bloggers? Basically, blogs flood search engines with unnecessary junk. Especially Google. What will happen is you will be off blogging one day and not realize that a zillion people have decided that your article in your blog is worth linking to. The Googlebot will then come through and index your blog. 30 days later someone will run a search and find your blog and go to it and see that you have already wandered onto puppies or some other random topic. Basically, blogging hoses a search engine.

Why am I blogging then? Quite simple really. This blog is still very much technology-oriented. It has a _theme_. That theme will likely never change. If I want a different theme, I start a different blog. Therefore, this blog will be indexed by Google as a technology-related set of pages and therefore I won't be messing up the Google database, generally speaking since this blog is SEO'd for a specific theme (search engines operate on site themes). There could be instances where I am oblivious to messing up Google, but those should be few and far between.

Tuesday, January 04, 2005

Standard additions...

Okay, while I am not on the C/C++ committees, it has come to my attention over the more recent months and years that the core languages are simply not capable of handling modern devices - particularly dealing with PCs. If you search the archives of several of the many lists I subscribe to, you will frequently find programmers asking about how to use ANSI C/C++ to do:

1) Single keypress keyboard input.
2) Drawing graphics on the screen.
3) Printing to a printer.
4) Accessing USB devices (e.g. a scanner).
5) Responding to mouse movement.

Every single time, without fail, someone replies saying that these are not standard. I have, on occassion, jokingly made the suggestion that C was designed to output to a dot matrix or line printer. So, all of these discussions have me thinking about what to do. The result of all this thinking is that, because C is incapable of these things, people have to resort to using OS-level APIs. One of the major goals of C/C++ was to make it able to compile code for any platform. However, the ANSI standard is simply not cut out to handle devices that are portable to other platforms. Now, I realize embedded devices don't have the capability of a mouse, but think instead of the pen surface of a PDA as being a generic "coordinate input device". There are numerous scenarios where a "coordinate input device" would be useful even in an embedded environment. The keyboard is a "button device". A mouse button is a "button device". The screen (or a "window" in certain environments) is a "coordinate output device" (but can also be an input device). The printer is a "coordinate output device". For all intents and purposes, a "button device" could also be considered a "coordinate input device".

I think the major problem here is that the committee failed to realize that not only could they differentiate between a hosted environment and a non-hosted environment, they could also differentiate between a hosted environment with support for attached devices and a hosted environment without such support. So, how would someone go about defining a device extension standard that supports my idea of generic devices? Well, the first thing to do is add a set of functions to the standard that support the idea. My first rough stab at the prototypes would look something roughly like:

DEVLIST *devlistopen(const char *devicetype);
char *devlistread(DEVLIST *dlp, size_t device);
int devlistclose(DEVLIST *dlp);
DEV *devopen(DEVLIST *dlp, size_t device, void *openinfo);
int devread(DEV *dp, void *readinfo);
int devwrite(DEV *dp, void *writeinfo);
int devclose(DEV *dp);

That's pretty much it. Now you are thinking, "What in the world are those void pointers doing there?!" This is the beautiful part. At this point, ANSI hands off the responsibility of defining the openinfo, readinfo, and writeinfo data types and structures along with device types to another organization. So, say you come up with a new device for USB (let's say you invent the scanner) and want to get it standardized so C/C++ programmers can use it with ANSI-standard functions. The organization will assign your device with a generic device type and you pick a name for your brand of the device type using their online database. Then, you work with the organization to come up with a standard set of openinfo, readinfo, and writeinfo structures that are suitable for any PC scanner device to use. You will note that this method only allows for a single structure for each call. If you need another structure, you actually have two differing types of devices (e.g. mouse movement versus mouse buttons) and therefore require two separate interactions with the organization. The best part of this is that ANSI can leave themselves out of this end of things.

The only remaining issue is determining how to get your device into the compiler. Most compiler writers will likely develop some sort of plug-in style architecture for the device developers to utilize (e.g. DLLs for Windows-based compilers). As a programmer, all you will care about is making code and have it work the first time it compiles. Something like this might be used for determining the coordinate position of the mouse:

PC_MOUSEMOVE_openinfo pmo;
PC_MOUSEMOVE_readinfo pmr;
DEV *dp;

dlp = devlistopen("PC_MOUSEMOVE");
if (dlp != NULL)
dp = devopen(dlp, 0, &pmo);
if (dp != NULL)
devread(dp, &pmr);
printf("Current mouse coordinates: %li, %li\n", pmr.x, pmr.y);

ANSI C/C++ only recognizes four devices: Files, stdin, stdout, and stderr. The concept of monitors, printers, scanners, telephones, modems, audio devices, video cards, the Internet (e.g. sockets), and even memory (in some respects) are all non-standard. All I ask for is a handful of functions to be added to the standard for hosted implementations that support the concept of devices.

See what I'm trying to get at here? There are only ANSI-standard calls being made (assuming you can imagine it as part of the standard - humor me if you can't). If ANSI doesn't want concepts like mice and keyboards in the standard, that's fine, but they need to give the rest of us a way to extend the standard that is acceptable by the standard.

Monday, January 03, 2005

The English language.

"i am having TreeCtrl which have check box can any body tell me how to get check box click event or
what iwan to do is to select the child notes when theparent node is selected???
can any oyd help me????????????"

The English language is a rich language. Please do not misuse it. As programmers who participate in the art of writing code (it is an art) and the science of writing code (it is a science) know how important it is to have detailed and complete comments. Their comments in programming forums should be of equal value.

I found the above paragraph on a random forum. I'm sure Google will turn up where it came from, but realize that the topic of this is not about where the source is, but to use it as a mere example of the broad problem that plagues programmers. Programmers simply don't know how to write in English. If they can't write good English, they will be lousy commenters and therefore lousy programmers - no matter how good their coding skills are. They are good at the science part - the logical thinking. They are lousy at the art part - the creative writing. In school, 50% is a failing grade. In the business world, less than 100% is a failing grade. Any programmer who fails to see this is a lousy programmer.

Since the English language is a rich and bountiful language, I will now kindly step on everyone's phalanges. If you can write well, stop making abominations of the language that hurt my eyes like the above. If you can't write well, just stop communicating in writing. Start developing technology that allows you to communicate in your native tongue instead.

Seriously - stop writing the above garbage. Start communicating with the world in a way we English-speaking people can understand. No one knows what you mean grammatically by "i am having TreeCtrl". You might be developing a TreeCtrl or instead of a baby, you are giving birth to a TreeCtrl. The former is more likely, but the phrase 'i am having' being used before a proper noun is typically in reference to bearing a child (or having visitors come to your house - some might think the latter is worse if they are the out-laws). The English-speaking world is therefore grossed out that you are bearing a TreeCtrl in your womb. Hopefully it doesn't take more than 9 months to develop.