The C++ Way. Part 0.

I’ve decided to write a series of posts on what I call “The C++ Way” analogous to “The Ruby Way,” a book and philosophy of the Ruby Language. After programming in C++ for years, I still struggle to think in C++. I constantly ask myself “what would Bjarne (Stroustroup) do (WWBD)?” when attacking a programming… Continue reading The C++ Way. Part 0.

Singleton Madness

I’ve been spending the last few weeks trying to exorcise a pesky singleton class from EP Simulator. This is the Options class, which contains all the program options that are saved from session to session. There is only one set of Options, so I had naively made the class a singleton. Singletons being what they… Continue reading Singleton Madness

Emacs Tip of the Month

Want real shell mode in Emacs? Using M-x shell only gives terminal emulation, which sometimes doesn’t display things correctly and which, since it supports all Emacs key bindings, makes you do things like use M-p instead of C-p to bring up previous commands in the command buffer ring. Most of the time Shell mode is… Continue reading Emacs Tip of the Month

Stupid Bug

Having just spent the last several hours chasing down a weird bug, there is a sense of anticlimax having finally figured it out.  I have to say the debugger was less than useless in this matter: various functions mysteriously were not working, although identical code seemed to work elsewhere, variables were listed as “not in… Continue reading Stupid Bug

Plugging Away At EP Simulator

Just to show that I have been working on this project, here’s another screenshot which I posted at SourceForge. Source code is hosted at GitHub.  I expect to upload Windows and Linux binaries soon for download for those of you who aren’t into compiling source code.

On Namespaces — Again!

I have a thing about C++ namespaces, and this is yet another post on the topic. Oh well, so my life isn’t that exciting… Namespaces avoid polluting the global namespace with names that might conflict with each other. Classes similarly encapsulate method and data member names from the big bad cold outside global namespace, but… Continue reading On Namespaces — Again!