Home » 2014 » May

DRY Programming

DRYToday I thought I’d talk to you about the programming principle known as DRY.  As you may know, DRY stands for “Don’t Repeat Yourself” and it shows up in a lot more places than you might expect.  Even when you try really, really hard to not repeat yourself, you end up repeating yourself.  You repeat yourself even when you think you aren’t.  Lots of people repeat themselves.  Do you know of any?

Ok.  I think you get the point.  Just like it is silly for me to repeat myself over and over again, it is silly for you to write the same code, or perform the same steps, over and over again.

Continue reading “DRY Programming”

TDD Saves Time – A Story

TDDSavesTime_AStoryI recently had an experience writing code that proved to me, once again, that using Test Driven Development really is faster than the way I have been working.

You will remember a couple of weeks ago I presented a strategy for creating test scenarios where we need to test storing data to a database from a web page.  Well, recently, I had a chance to use that strategy.

Continue reading “TDD Saves Time – A Story”

Treat Warnings As Errors

TreatWarningsAsErrorsI used to ignore warnings when I compiled my code.  Most of the time they never caused any problems and I was able to run my code.  But recently I’ve gotten pickier about my code.  One area I’ve gotten more picky about is compiler warnings.

Any code that I have direct control over now compiles cleanly.  No errors and no warnings.  This past week I found a perfect example of why.

Continue reading “Treat Warnings As Errors”

EXT DataBound CheckboxGroup

CheckBoxGroupToday I’ve decided to post a control I created for EXTjs that might be useful to you.  The problem I was running into was that I had a group of checkbox controls that all needed to be set based on if a record exist in the database or not.  If the record is there, the box should be checked.  If it isn’t there, it shouldn’t be checked.

Further, if the user checks a box, it should add a corresponding record into the database.

Continue reading “EXT DataBound CheckboxGroup”