At work we are finally converting to a platform where I can use PDO and MSSQL at the same time. This means we are moving to a windows server. I know against standards but I am a PHP developer not a .net while I could learn .net and probably pick it up quickly, it is far quicker just to stick with what I know. So with this move it means I can move to Laravel.

I love Laravel, but I love that it can easily implement testing in an automated way. On our biggest project and my daily life at work it would be great so I don't break things down the line by changing or adding new features. So this is a big win for me. Not to mention that I get to work with Laravel on a daily basis.

My biggest problem with TDD (Test Driven Development) is that it is very difficult for me to implement in terms of here's the answer how do I get to it. I'll be honest most of the time I'm given a problem, here's the data, now make that data create the solution to the problem. Almost 100% of the time I have no idea what the data will look like much less what it is supposed to look like in the first place.

You'll say that I don't know the business that well. Yes, I don't. We are a rent to own company. I know every little about the workings of everyday things. I learn something new everyday about what we do and don't do and I'm cosntantly asking questions to better understand the problem. Which isn't a problem in itself, but the idea of knowing what my output should look like is something that I'm not going to say I grasph 100% of the time.

I mean I do know what the answer is, but not how to massage said data into the right data. So how can I write tests for a report I'm writing when I don't know exactly what's it's going to look like in the end. A simplified version of the problem is. I need to get a % difference from some set of statistics. Sure the answer is going to I mock up a decimal or percent and yay, it's working.

But that doesn't test the calculation was done correctly.

But I think I might have figured out how to do some of this. Today I was rewriting our existing website and creating our by Zip code store locator. I wanted to use the Repository pattern for this simple site so that I could learn it for the big project down the line that will need rewriting. I kept the DRY principles in mind. I didn't want to rewrite code. I think I'm starting to implement SOLID programming - specifically the Singlular Responsibility Principle but I think by using this method I'm working mostly within the SOLID principle.

Granted I didn't do TDD more like BDD.

Dragon Hunting

Published on September 30, 2015

First Public Writing

Published on September 30, 2015