Ahhhhhhhhhhhhhhh!!!!!!!!

Almost no one who reads this is a programmer of any kind, so this will mean very little to you. But I just have to say that I spent the last 2-1/2 hours trying to debug a type problem in a C# .NET application I am working on. I added a cool feature that allowed a table of dates to be edited inline from the browser, but when the date was submitted to the database, I kept getting an exception indicating that the string could not be converted to a datetime. I tried different approaches. I made little tweaks. I scoured the InterWeb. Nothing was working and yet I was confident that the value I was passing was a datetime value.

I was about to give up and go to lunch when a stray thought struck me. Maybe the value is a datetime, but maybe the parameter which I am setting using the value is not a datetime. I checked, and sure enough that was it. Someone, in the hours of frustration, I had swapped the order of two lines of code. That was all that was wrong and all of my frustration and fruitless attempts were for naught, if only I had recognized this change 2 hours ago.

I’m going to lunch now…

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.