Questions not to hinge a C++ interview on

People love to chat about how to conduct a C++ interview on newsgroups.  Eventually these topics will shift into a discussion about what questions a candidate must know in order for them to get a hire from a particular interview.  Unfortunately these questions tend to be items like the following. What happens when you delete…

7

Learching: Definition to live search

Unfortunately when creating Live Search, the live team did not use a term which could easily be converted to a verb (i.e. google and google-ing).  The term "live searching" doesn’t really flow well in a hallway conversation nearly as well as google-ing.  I live searched that movie John was talking about … I considered for…

3

Where does the * go?

This is a more amusing than functional debate I enter into from time to time.  On a line where you declare a pointer type in C++, where should the * go?  Next to the type (i.e. Type* p1;) Next to the variable name  (i.e. Type *p1;) Who cares For the moment lets ignore #3 (after…

5

Comments

If only people spent as much time writing comments as they did speaking to the evils of comments.  Everything from useless, inaccurate, to many comments make code unreadable, you should code better … etc.  I haven’t ever looked at a piece of code and thought "wow, way too many comments" or "that code would be…

7

To name a tuple value: A or Item0?

One of the parts of a Tuple implementation for RantPack I struggled the most with was naming.  I tend to struggle with names quite a bit and there’s really no reason for it.  It’s a combination of pickiness and … well there’s really no good reason.  Pieces which can bother me range from Don’t like…

1

Code is not self documenting

Nothing revolutionary about that statement.  Yet I keep reading the opposite on various comment threads and message boards so I thought it a good idea to explore it again. Code is not self documenting. The "code is self document" argument often comes up when commenting conventions, patterns and overall usage is discussed.  People who are…

17

Outdated Comments are better than no Comments

While investigating our locking infrastructure a few days ago I ran across an odd comment.  I was looking at a particular usage of a lock and the comment said that "Using lock type X because we must pump messages here."  Contrarily the lock type being used most definitely did not allow message pumping.  After a…

4

Reserved words: Good for your sanity

Paul Vick posted a recent entry exploring the necessity, or lack there of, for having reserved words in a programming language.  It’s an interesting mental exercise to go through.  At the end you’ll realize that many reserved keywords aren’t needed from the perspective of the compiler.  This is part of the reason C# and VB…

2

What’s the purpose of this blog?

I’ve had a couple people ask me this question about my blog.  The simple answer is: to explore my adventures in code, coding, patterns and pretty much anything else related to programming.  I realize from a readers perspective my topics may appear somewhat random.  After all I post in C#,VB,C++ and Powershell with varying degrees…

0

Part of being a good programmer is learning not to trust yourself

… and to actively guard against yourself. Over the years I’ve found that I can be my own worst enemy when I code. Part of the problem stems from paranoia Early in my college days, a professor of mine, Jim Greenlee, instilled in me the virtue of paranoid programming. He taught an introduction to C…

8