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 Mon, 02/09/2009 - 18:25
So today I used my first function closure in Python. I had always wondered why/how someone would use them, but today after reading an article earlier this morning I ran across a place to use them while coding this evening. Here we go:
Submitted by nathanieltroutman on Fri, 02/06/2009 - 14:39
One thing that I don't like about the way iTunes handles things is thats not multi-computer friendly. I have my desktop running windows, my macbook and my iPhone. And I want the music on them to be the same, all three of them. Now before today, and really I should have googled this before today, I had always just been faced with the "Do you want to sync with this computer? Doing so will erase all the files currently on the device." message which I clearly didn't want to do. Then today, after finally googling the problem I came across the answer.
Submitted by nathanieltroutman on Mon, 02/02/2009 - 17:00
In one of my research projects we have a set of points on a two dimensional plane that when given a single point from that set we want to be able to know who its "neighbors" are. For our work we have the mesonet stations spread across the state of Okalhoma and we want to be able to select the neighboring stations. There are a couple of methods that are intuitive but require setting a parameter, something I'm not fond of. Also we have the concept of multiple levels of neighbors, so my first neighbors, my second neighbors and so on.
Submitted by nathanieltroutman on Thu, 01/29/2009 - 23:38
Every so often I try to write some code in MatLab instead of my beloved Python, it generally turns into a marathon even of trying to get MatLab to do what I know how to make Python do in a couple of lines. One thing that I am missing right now is Python's sort and the ability to pass it in a key function that will be used in sorting an array.
Submitted by nathanieltroutman on Mon, 12/15/2008 - 12:56
The Fall semester of 2008 I started my masters at the University of Oklahoma. My first project which has dovetailed with a class and my work as a graduate research assitant has been a study of brittleness in spatio-temporal relational probability trees. Expect to see my class paper up here soon.
So a year and half later I finally put up my class paper.
Submitted by nathanieltroutman on Thu, 12/11/2008 - 10:37
So I've run across the issu of tabs vs spaces again and have decided to put in my two cents. A nice overview of the topics is given here, but I disagree with is final conclusion. The topic actually consists of three points:
Submitted by nathanieltroutman on Mon, 11/24/2008 - 11:40
Python has a really cool feature called decorators. Which allow you to wrap functions around other functions in a clean way. The classic example would be the @trace decorator which would let us do this:
print 'Hello %s!' % name
Submitted by nathanieltroutman on Fri, 11/21/2008 - 09:54
I've been working on a project, a game fight simulator, where I want to watch the value of a variable, say the players health, in a GUI. The tricky part is I really don't want to couple the game logic to the GUI. I want to be able to simply have self.health -= damage be reflected in the GUI with out putting GUI code in the same function. Enter aspect oriented programming (AOP). Now python doesn't have a serious AOP module like Java and its AspectJ or Ruby and AspectR. So no AspectP or PyAspect will save us here.
Submitted by nathanieltroutman on Mon, 11/17/2008 - 13:50
So MatLab can be cool at times, and at others rather annoying. So the big deal with matlab is everything should be matrix or vector operations, yet they don't make this particullarly easy, especially those of us who learned to program in other languages that like for-loops. My big grip at the moment is the contour plotting function. It's just annoying. They assume, wrongly, that the only things people contour are multi-valued functions, such as f(x,y). Now this is great, some people do that.