Author: James R. Twine
-
Learn your history before you present yourself as an authority
When you read a book about something, you should be able to safely presume that the author is somewhat of an authority on the subject matter of the book. So when reading an e-book on C#, I was surprised to come across the following Author’s Note: Author’s Note: struct is not a new concept. In…
-
CString misuse #2
Here is another one: ///////////////////// LPCTSTR cpString = _T( “This was some string message…” ); // // Later On In Code… // CString str( cpString ); char cChar = str.GetAt( 0 ); ///////////////////// If you write code like this, stop now and back slowly away from the keyboard – You’re Doing It Wrong! The developer…
-
CString misuse #1
This is the first of many examples of ways to misuse and/or abuse MFC’s CString class. While this example (and following ones) are specific to MFC, they likely apply to all string classes (mutable or not). Here is the offending code: ///////////////////// CString str( “First Part Of Message\n” ); str = str + “Second Part…
-
You’re Doing it Wrong!
Having been inspired by the amount of photos on the internet showing various forms of spectacular failures (http://www.doingitwrong.com), ranging from failed bunny-hops to the most graceful faceplants, I thought that a coding-equivlent of it might be worth trying out. To that end, this section will cover little snippets of “wrong” code found in the wild.…
-
Sprint 2 – Stiff Steering and Hard Shifting
Problem: Stiff spinning steering modules and hard shifting between gears (Quick little story – while bringing this beast into its location, I fell and got pinned under it for a few minutes. It is amazing how much having your chest compressed effects your ability to call out for help! 🙂 OK – onto the next…
-
Punch-Out vertical foldover/overdraw
The Punch-out that I recently obtained has a monitor issue (a monitors issue, really). Both displays are bring drawn starting ~2″ from the bottom of the monitor, and the upper few inches are being overdrawn on the same horizontal plane. In other words, the beam is scanning left/right correctly but is starting too low and…
-
Punch-Out
Problem: Dead Purchased a Punch-Out in dead condition. Got it home, still dead. Rocking the game and/or whacking the sides a bit got a brief flash of light on it so I went in and reconnected all connectors. Game then came up right after that. A little adjustment to the micro-switch arms and the game is…
-
A death close to home…
This past Sunday evening (04/22/07) a teacher at my child’s daycare died from a stroke. Her name was Klara S. and she was a very nice woman and a kind soul. While on a prior contract, I had arranged to spend some time once a week with my kid while at daycare. Klara was one…