Our minds cannot repel logic of that magnitude!
Posts tagged Current Point
Newest Project – The Code Beautification Utility
Jan 24th
Okay, so most of you are going to laugh at me for how this story goes, but I have to tell it because it speaks worlds about what kind of person I am. So the other day I’m at work and I’m trying to debug some problems with a ColdFusion Flex component. The only problem is that this component is over 600 lines of code long and, due to the immense amount of changes, there was absolutely no formatting of the code at all. It was probably my worst excuse for code to date; tabs were non-existent, code wasn’t indented properly – if any at all. Needless to say, I was very irritated at this and needed to do something about it. So what do I do? I start fixing the code myself, line by line, properly indenting code.
That trek did not last very long. I got to around line 80, realized that it was a futile attempt, scratched it, and went to get my lunch. Now I’m the kind of person who likes to eat at my desk, and continue doing some sort of work. So here’s where I got the idea – I’ll write a utility during my lunch break to format code. Voila! The Code Beautification Utility, or CBU for short, was born.
In a mere 43 minutes (what I consider to be record-breaking time or damn close to) I wrote a simple, yet somewhat effective, code formatter using my weapon of choice – C# of course!. At the current point, it only understands ColdFusion files (cfc and cfm) and HTML files. However, it understands the languages based off of embedded XML files – so it’s language knowledge can be easily expanded. Now for all of you GUI fans out there, I have some bad news for you – it’s a command line program, sorry. However, a GUI can be easily written for it, and I will probably do so. The output from the program also is very simple – if you decide to let it recursively fix all files in a directory, it doesn’t give you any indication as to it’s progress. Not yet, at least. You can pass just a single file to it as well, if you’re only looking to fix one file as I was.
And so, in a nutshell, there is my newest project and utility which I will be slowly expanding upon in the upcoming weeks. Hopefully relatively soon it will be a fully functional and stable utility. Check the project out in my project repository here.
