MattHicks.com

Programming on the Edge

Showing posts with label jgn. Show all posts
Showing posts with label jgn. Show all posts

Still Alive!

Published by Matt Hicks under , , , , , , , , , , on Saturday, May 01, 2010
Well, this is a great title for this post not only as it's the first blog post I've made here in seven months, but I've also had the song from Portal stuck in my head lately. :)

Looking at my blog it would be easy to classify me as MIA but I've actually been quite busy in the open-source and have even been blogging quite a bit lately, just not here, but I'll get to that in a minute.

First of all, my very basic last post talking about the entry-level learning I was doing with Scala was quite fitting as my last post as very shortly after that post I made a complete shift from Java to Scala programming. With this came the abandoning of lots of open-source projects I've either created (like jSeamless) or been a developer on (like jMonkeyEngine). I believe so strongly in Scala that I've shifted everything I possibly can to Scala.

Second, with the shift I've made to Scala and all the projects I've abandoned as a result, one new project has come to being that, in many ways, embodies much of the vision I've had for several projects I've left behind. That project is called "sgine" (Scala Engine). I've been developing on it for a while now and have made some major strides recently and finally wanted to make a re-appearance on my blog to hopefully start posting here again.

Now, at the beginning of this post I said that I've been blogging elsewhere. If you go to http://www.sgine.org you'll see that it's a blog filled up with posts regarding updates to the engine I've been developing. I'm really excited about this project and though many people have accused me of abandoning Java...and realistically that's pretty much what I've done...I haven't a regret for switching to Scala, it's such an incredibly powerful language and has renewed my vigor in programming. For anyone considering looking into a new language I cannot recommend it enough.

More Advanced Object Pooling

Published by Matt Hicks under , , , on Sunday, August 12, 2007
I generally post a message in my blog after I've already done it, but this time I'm trying something a bit different and posting the idea as a mechanism to draw it out.

In my jCommon project I have Object Pooling support already, but it's explicitly limited to the pooling itself. While developing Galaxies Beyond I'm finding there are some things that would be useful to support in the pooling that would simplify usability in application. Currently you simply get() for an object from the pool and it will create the object if it doesn't exist and hasn't reached the maximum number of objects allowed for that pool or return an object that is in the pool. This works fine in most scenarios, but for more advanced pooling I need to cleanup after an item has been returned to the pool and perhaps re-init certain things when they are actually pulled from the pool.

...okay, after I got done typing all that it dawned on me that I might have already written this before. Sure enough, ObjectPool in jCommon already has support for all of this. Perhaps this should be changed to "How sad is it when you write so much code you end up re-inventing the same ideas over and over again?", but what's particularly sad is I've done this on various occasions. In fact, I wrote similar functionality for ObjectPooling in jME before I remembered that I had already created the object pooling support in jCommon. What makes it even worse is that the code I wrote was better the first time.

I'm 28 years old and if my memory is this bad now, I can't imagine what I'll be like at 80. In my defense I will state that I write thousands of lines of code a week, so there is a LOT that can be forgotten. :)