Stupid coding errors

I’ve been doing a lot of C# programming lately and for the life of me, I keep making the same dump coding error. Instead of doing this:

  if (objFoo.IsNew) 

I have been doing this:

  if (objFoo.IsNew = true) 

The thing is, I know that the second way is wrong and will lead to all kinds of bad results and yet I keep making the damn mistake!

It’s all of those years doing VB programming that’s got me screwed up.

Published by Jamie Todd Rubin

Jamie Todd Rubin writes fiction and nonfiction for a variety of publications including Analog, Clarkesworld, The Daily Beast, 99U, Daily Science Fiction, Lightspeed, InterGalactic Medicine Show, and several anthologies. He was featured in Lifehacker’s How I Work series. He has been blogging since 2005. By day, he manages software projects and occasionally writes code. He lives in Falls Church, Virginia with his wife and three children. Find him on Twitter at @jamietr.