I know I’m late to the party, but this issue reported in Bootstrap has created quite a stir across the Interwebs and Twitterverse. Chants of “Down with Semicolons!” by the “JsHipsters” and of “LEARN 2 CODE NEWB” by the “JsVets,” though entertaining, aren’t really doing anyone in the community any good. [more] Let’s look at…
try-catch-FAIL
Category: <span>What NOT To Do</span>
Please stop over-using the var keyword
I just watched an excellent presentation by Jimmy Bogard on UI testing with ASP.NET MVC. While I really enjoyed the presentation and got a lot of really good ideas for how to improve how I work with MVC, I saw something that I really did not like: lots of var keywords. Here’s an example (recreated…
The additive nature of bad code
It really shouldn’t be a surprise, but I have recently witnessed firsthand how a little bad code sprinkled here-and-there quickly adds up to a lot of BAD code that’s painful to work with. That’s the scenario we’re facing now with our ASP.NET MVC application. Our team conducts peer reviews for every bug/feature, but we’ve still…
Please don’t listen to Joel Spolsky…
I’ve been debating whether or not I even wanted to touch Joel’s latest words of “wisdom”, but I finally decided that it’s just too damaging to ignore. The issue has been beat to death (my favorite, the truth, another take, etc.) and most of the good points have been covered, so I won’t get too…
How to build an MVC application WITH 200% MORE SUCK
Obligatory apology for lack of posting: yeah, life is sucking pretty hard right now. I have a paper due in two weeks, a 40-minute presentation on deep web crawling to give on Wednesday, a new .NET information retrieval application that has to be complete in about three weeks, a thesis that has to be defended…
What’s wrong with this code?
I just learned something new about C#. You can cast an array of any type to an array of objects, like so: 1: object[] oa = new string[] {"abc", "def", "ghi"}; 2: 3: //Will write ‘abc’ 4: Console.WriteLine(oa[0]); No compiler warnings, no runtime errors, everything is happy. You can then modify the array, like so:…
Code that makes you go ‘hmmmmmmm’…
Or, in my case, "AAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHH". Why would someone do this: DateTime.Parse("1/1/1998") Just… why?!? WHY?!?! KAAAAAAAAAAAAAAAAAHN!!! Also, for the record, "Start Date" definitely does NOT equal "StartDate". This is the problem with using magic strings in code. And yes, I’m behind on blogging. School is killing me. I seriously spent about 10 hours over the weekend…
It’s official: Joel Spolsky and Jeff Atwood do not understand testing (or math, apparently)
I have now listened to Stack Overflow Podcast #39, and things were indeed every bit as bad they seemed from the transcript that I linked yesterday. Before I dive in to a rant, let me prefix this by saying that I have been a fan of Joel on Software since I was an undergrad. I…
The pain and horror of hand-coded data access code
At my day job, we finally decided to cull out a couple of columns that were no longer needed in our database schema. We could have left them in, but since they were in a table that typically ends up with several hundred million rows, we thought it *might* actually save us some space in…
When good architectures go bad…
Today has not been a fun day. I have spent most of today and a large part of yesterday trying to fix a problem in our system. The problem seems very simple at first, and indeed we came up with a dozen or so ideas for solutions to the problem. In the end though, none…