Quick question to my readers: If you know a good way of highlighting the code in an email I’d like to do that. I notice that my code in the email is not marking up properly whereas it looks better on the site itself. I’m using a WordPress feed and the Prismatic plugin when I write the post. Has anyone already done this?
Yesterday I finished refactoring my support function. I am now going to look at the test itself to see if I can make it a little prettier, more readable, and more self documenting. Here it is right now:
Blech. When compared with my nice new refactored functions from yesterday, this definitely needs a makeover.
I think if I have a function to create the dictionary with named parameters… Hmm… well, need to consider that I have multiple items I want to feed to this dictionary. Kinda screaming for a new class if I want to do it with better names and such. How about I reuse the actual objects from the program side. I can still use AuditFieldChange objects, but wrap them into a function to create them. I’ll move my Dim statements for everything to the top. I can remove the “New” keywords since I’m already setting the variables to an existing element later.
Ok, that’s down to 8 lines although I don’t know if I like all the Dims at the top. I’ll think about that later. Right now, I just really want to take care of that giant long rambling Assert line at the end. How can I make that more compact?
I started like this, but it’s not helping. However the first boolean test looks like something I could reduce into a function with a much smaller name:
I moved on to this on the With line using a new helper function (once done, wouldn’t need the With statement). BUT, it’s still too long having to call 3 arguments.
So, I think I could just loop through the input dictionary and check the results dictionary in just one function call and that would be more succinct in the test. Looks like I’m out of time today though, so I’ll save it for tomorrow!