Technical Book Club: Code Complete - Programming into a Language
On one project I worked on, I ran into a problem that I immediately knew how to resolve, and it was going to be really easy to do. Unfortunately, the solution that I had for it was using regular expressions as they were implemented in Perl, and Visual Basic 6 didn’t quite have the same constructs. I ended up writing a class that would take a Perl style regular expression and execute it using VB. It saved me so much time that trying to find a solution using only the vocabulary of VB would have had me stumped on.
This doesn’t mean that this always works. Another project we worked on, the one that failed, did so in large part because the developer they put in charge of it was on vacation when the project started. Instead of being written in Java, which he wanted, it was started in VB.NET. He really wanted to program in Java, though, so he started implementing JavaBeans in VB.NET, despite the fact that he couldn’t really explain to anyone else on the team what they were. He just told us that they were a good thing. He ended up programming in one language, into another, and making it very difficult for anyone else on the team to really understand what he was doing.