OpenGL vs Direct3D: Where are we on Windows? (Win32)

5 minute read

It’s almost weekend, and time for a lighthearted post on the two realtime 3D computer graphics libraries that are available on Windows in 2011: OpenGL and Direct3D. The reason I mention the year is simply because of the fact that two years from now, this information will be as untrue as the Wikipedia article* on this matter due to rapid hardware and software developments. But for now, let’s bash it out.

Read 1,091 more words...

Hurry Up, AMD

1 minute read

You’ve heard of Intel’s recent “Cougar Point” chipset screwup causing all motherboards for Sandy Bridge-based Core i7 processors to be pulled from the market until next month when new parts will appear. We’ve also all read the reviews that show the new i7 processors to be very fast and beating AMD’s current lineup in terms of performance. So where does AMD stand?

Read 316 more words...

BC42104: Variable ‘X’ is used before it has been assigned a value.

1 minute read

My dearest VB.NET programmers (and C# programmers up to a point), I once again have to inform you of one of my pet peeves. This is pretty much a follow-up to one of my previous posts, but more than two years after, I still work in projects from various online sources as well as professionally that are littered with the warnings about undefined variables:

Read 428 more words...

C Bitwise Operations Cheat Sheet

1 minute read

Operations Table

Operation Sample C Operator
AND 1001 AND 0101 = 0001 & (ampersand)
OR 1001 OR 0101 = 1101 | (pipe)
NOT NOT 1001 = 0110 ~ (tilde)
XOR 1001 XOR 1011 = 0010 ^ (caret)
LEFT-SHIFT LEFT-SHIFT 0001 BY 1 = 0010 <<
RIGHT-SHIFT RIGHT-SHIFT 1000 BY 1 = 0100 >>

C Assignment Operators

Operation Syntax Short For
AND X &= Y; X = X & Y;
OR X |= Y; X = X | Y;
XOR X ^= Y; X = X ^ Y;
LEFT-SHIFT X <<= Y; X = X << Y;
RIGHT-SHIFT X >>= Y; X = X >> Y;

Read 287 more words...

Five Quick Check-In Guidelines

1 minute read

If you work in a source controlled environment, these are the minimal guidelines that you’ll have to stick to for making your teammates’ lives a bit easier.

  1. Don’t Check-In Broken Code: More than often, you’ll pull down the latest version of a project from your repository only to find that the code won’t build. Please, don’t check-in code to the main project that doesn’t compile, even if you intend to pick up the slack the next day. However:
  2. Don’t Go Home Without a Check-In: Even though you shouldn’t check-in your broken code to the main branch, many source control systems have a way to branch a user’s changes and merge them back later. If you’re using Team Foundation Server, take a look at Shelve Sets.
  3. Use Check-In Comments: Always leave a descriptive comment of the work you’ve done when your check-in. Your teammates weren’t hired to analyze undocumented code, so that 500-line change across multiple files better have a comment.
  4. Check-In Association: If your source control system allows this type of integration, associate your check-in with a work item, bug, or help-desk ticket. If it does not, at least make a reference to the work item’s identifier in the comment section.
  5. Use Check-In Policies: Use check-in policies to ensure that all of the above things aren’t impeding your build if your source control system supports them. These policies make your life easier and disallow sneaky developers from checking-in their broken spaghetti code.

Share any tips you may have!

C Tutorial 01: Hello, World!

7 minute read

If you ask a programmer which programming language you should learn as your first, they’ll often prescribe you their personal favorite, often not considering if the language is supported on multiple platforms, easy to learn, exposing underlying system mechanics, and fully featured.

This post is the first of a series of tutorials intended to teach you the C programming language, an excellent first language because of the following reasons:

Read 1,667 more words...

CONFIRMED: Windows is going ARM

less than 1 minute read

Microsoft confirmed today at the 2011 CES that the next generation of the Windows operating system will indeed run on ARM processors, following wild rumors and speculation this past week.

Windows on ARM processors means that the operating system is now capable of running on a plethora of mobile devices, thus opening up an entirely new market segment for Microsoft. Is this the end of Windows Phone? Will Windows 8 be the new Microsoft mobile OS?

EDIT (01/06): Not much more info was released in last night’s keynote speech by Steve Ballmer. However, the implications of having the full-fledged Windows operating system on a mobile device such as a phone are tremendous. Android and iOS will have to pick up some speed to compete with the OS that has been in the making since 1985 and has excellent hardware and software support e.g.: multi-threading, scheduling, peripheral support, .NET Framework, WPF, Win32 API, etc., etc.

Thoughts on Sandy Bridge’s HD 3000 IGP

less than 1 minute read

Sandy Bridge is Intel’s new microarchitecture, slated for release in January of 2011. Sandy Bridge processors will effectively phase-out the current lineup of processors, based on the LGA 1366 socket, with processors fitting a brand new socket, LGA 2011.

While I understand the need for technology to move forward, and am an avid user of Intel CPUs myself, I can’t help but feel underwhelmed by the reviews, especially on the IGP (integrated graphics processor) front, the part that concerns me greatly.

The tech that Intel chose to use on the die is the HD 3000, and it’s little brother the HD 2000. Let’s hope it’s nothing like the GMA (Graphics Media Accelerator) X3000 and family, the scourge of the entire IGP world. Please, Intel, please.

Note: the continued body of this blog post was not archived, and is thus lost to the ages.

Creating a Window Wrapper Class: Redux

4 minute read

Okay, so I know you’re probably here because you searched for “window wrapper class” or something similar and expected the article that I use to host on Scriptionary that threw a bunch of C++ code at you for you to copy and paste. I regret to inform you that the article you were looking for has ceased to exist.

Sorry about that.

However, in its place I have for you this very post which will teach you how to accomplish creating such a wrapper all by yourself. I hope that is okay since all you really need to know is the how to create a window procedure that you can use with your custom class.

Read 1,043 more words...