Showing posts with label ruby. Show all posts
Showing posts with label ruby. Show all posts

Thursday, April 2, 2015

Pouring Java

I've spent most of today working on some in-house tools for increasing productivity. I got tired of writing out boilerplate code for my Java classes, and using an IDE's class wizards was annoying me to no end, so I ended up writing a little command line utility which I call pour. Get it? You pour java...anyway...

I developed my little tool using Ruby, since it is so great for string manipulation, and easy file handling. Pour is short on features, but works exactly as I expect it to, and only outputs exactly what I want, and is far faster than any class wizard I've found.

I can specify a local template file to pour, and it will use it to create the classes, or, I can create a template in my home directory to use the template globally, or I can use the built-in template. I can specify to generate an entry point function, and I can specify a package. These few features turned a task that normally takes about 3 minutes, and turns it into about a 5 second task.

In addition, I set up gradle and grunt for a very simple auto-build workflow that allows me to focus on the code editing, and not on having to build the project, run tests, build the jar, and execute the program. I can just edit the code, save it, and my auto-build setup does the rest. Very fast workflow. I like it a lot, and I'm going to have to find a similar solution for my C++ development now, because this kicks major ass.


Sunday, March 15, 2015

Programming takes time

Pitch progress went to the back burner again as I spent most of today working on some in-house tools to help make my freelance art jobs go a bit easier. I've got a lot of stuff that needs to be done, and I haven't had the right tools to get the job done without a lot of trouble, hence the need for specialized tools.

Lots of Ruby scripting has taken place today. Far more than I had planned, and time just flew by. I'm maybe 30% done with the first of a set of tools, so it looks like Pitch will have to wait a bit longer. I wish I could clone myself and work on multiple projects simultaneously without worrying about if it were done or not.