Here you will find a collection of things I've worked on or found interesting and worthwhile to post. There is some poetry and other written works, as well as projects and programming thoughts/ideas/tips.
Submitted by nathanieltroutman on Sat, 03/19/2011 - 16:42
The other day at work I was working on a project where I would be creating lots of small strings. And by a lot, I mean a lot, on the order of 100s of millions. So, I was wondering what is the most efficient way to deal with using StringBuilder. Building the strings would require dumping the contents of the builders. There are three methods, reallocating a new string builder each time, using sb.setLength(0), or sb.delete(0, sb.length()). Being the empirical scientist that I am, I figured the only way to determine which is the fastest is to profile it.
Submitted by nathanieltroutman on Thu, 10/07/2010 - 13:08
So I've been playing around the past few days with writing a simple 3D game. I can't tell you much about . . . sorry. I started off in Java using OpenGL. Things went fairly well considering 3D engines are not my strong suit and its a lot of learning. (And yes I looked at JME, but decided against it). Anyways, I decide that I'd try my hand at using XNA, which meant porting what I had from Java to C#. (I have this delusion of releasing it as an indie game one day on the 360). While porting I ran across my code where I used packed ints.
Submitted by nathanieltroutman on Thu, 09/16/2010 - 11:37
I've been flipping through the second edition of the "PHP Cookbook" by O'Reilly to see if there are any new tricks I can learn. I've worked with PHP quite a bit from small projects hacking Durpal to much larger ones such as a library management system, but there are always new things to learn.
Submitted by nathanieltroutman on Thu, 09/09/2010 - 15:46
Today I wanted to go through my downloads folder and clean things up a bit. I have a lot of random pdfs in that folder with random names like "fulltext(1).pdf" and "fultext(9).pdf" (thanks IEEE eXplorer, or was that ACM) and others with equally informative names like "S1350482701003061a.pdf". Clearly these simply won't do. What should the filename be? Well the paper/documents title of course! If you open up the pdf and copy the title of the paper you can't paste it as the filename as it might have have undesirable characters in it, especially new lines.
Submitted by nathanieltroutman on Tue, 08/24/2010 - 08:54
In mid July 2010 I defended my thesis. The defense was followed by a rush to get my thesis revised and submitted by July 31. After the mad dash, a committee member that had more revisions than all the other four combined, and barely getting that member to sign in time, I finally printed my thesis and had it submitted to the graduate college. And yes, you read that correctly, I had five committee members on my ms committee.
Submitted by nathanieltroutman on Thu, 04/15/2010 - 23:11
This little program lets you create a bargraph of the number of results returned by a google search when replacing a small part each time. For example if you use
Google Query: how to get better at <x>
Search Terms: starcarft 2; kissing; cooking; robbing a bank; becoming cowboy neal
It will plot the number of results returned by a google search when <x> is replaced by each search term. This means it would plot the number of results for each of "how to get better at starcraft 2", "how to get better at kissing", "how to get better at cooking" ....
This was inspired by several XKCD comic strips like Numbers and Dangers. Of course, the numbers don't quite match up with the comics.
Submitted by nathanieltroutman on Thu, 04/08/2010 - 12:38
Occasionally one has to jump through a lot of hoops and do some pretty bizzare and unorthadox things when coding. Especially when working with multiple versions of libraries. At work all of our iMacs were recently upgraded to Snow Leopard and Python 2.6 and libraries isntalled (all in 64-bit). Its nice to upgrade . . . when it doesn't break things. Unfortunately during the upgrade numpy 1.4 was installed. Now this was only unfortunate because the super computer we also need to run on has numpy 1.3 which won't unpickle objects pickled with numpy 1.4.
Submitted by nathanieltroutman on Sat, 03/13/2010 - 15:36
I use matplotlib fairly frequently in my research, it rocks. However, the fact that the MacOSX backed doesn't let me use 'Cmd-Q' to close things down is annoying. So my solution is a combination of pycario and preview with a little AppleScript through in for fun. I program in Eclipse with PyDev, however I run my python programs exclusively from iTerm. Hence, I'm used to cmd-tabbing back and forth between iterm and eclipse. However, when I run a program that opens up a gui, such doing "pylab.show()" things get annoying.