Tuesday, May 22, 2007

Open Software

The terms Free Software and Open Source Software are cumbersome to use, especially when speaking with laity.

Free Software seems to often need an extra qualifier "free as in freedom" (as opposed to "free as in beer"). Without that qualifier, it can have a negative connotation, as people confuse it with Freeware, which is (was?) often thought of as something gratis, but of lesser function or quality than commercial offerings.

Open Source Software has the word "source" in the middle that needs extra explanation for many people. It would be much simpler to explain Open Software, without all the source (or sores, as Hani Suleiman would say). With the emergence of Open Source Hardware, where source can have a somewhat different meaning, I think Open Hardware would also be a better fit.

Simply open is good. And it can more easily include other qualities we've come to associate with, but what the words "open source" don't actually cover: open development, open processes, open attitude. It can include both Free Software and Open Source Software, and hopefully better associations with "open software" would form in people's heads, like: it's transparent, you can take it apart, modify it, distribute it and be part of it.

So, if you agree with me, lets start using the term open software from now on. :)

PS. Lets not even speak of alternatives like Free/Libre/Open-Source Software (but don't forget to FLOSS!)

Wednesday, November 22, 2006

Using OpenGL in SWT with Java 5

Following my last idea about an OSGi based game engine, I thought I'd start experimenting with various game engine stuff. So far, I've managed to get a bundle that has OpenGL binding working quite nicely. I used LWJGL, and created two bundles for it:
1) org.lwjgl -- the Java classes and source code is in this bundle.
2) org.lwjgl.win32 -- platform specific fragment for the above bundle, which has the Windows DLL-s and OSGi knows how to load them because I specified the Bundle-NativeCode header for them in the manifest.

I used the SWT OpenGL support to test this and after experimenting with some snippets, and copying some code from the famous NeHe OpenGL tutorials, I thought that since I was using Java 5, I could do the following:

import static org.lwjgl.opengl.GL11.*;

to import the static methods and lo and behold -- now I can paste the C code from NeHe tutorials into Java files without making any changes! :)

Now I'm getting the urge to start learning OpenGL again. I've already done some of the NeHe tutorials in C++, but I never really liked to write code in C or C++ that much.

Saturday, October 07, 2006

Idea: OSGi based game engine

There has been a little talk in the Eclipse related blogs about Eclipse's relationship with games. Which currently seems to be minimal. Here's an interesting idea for a new Eclipse Technology project: an OSGi-based game engine. It could be named EDGE for Eclipse Dynamic Game Engine. Another (sub-)project would add developement tools.

A project like this should define API/interfaces for sub-systems that are required by most game engines and create exemplary open source based implementations. There are some fine open source engines out there (there are others, but these are the ones I know about):
  • OGRE graphics engine. Someone else develops a Java wrapper for it
  • ODE physics engine. There seems to be a plethora physics engines out there lately, but I'm not sure how many are open source. I remember that ODE is one of them. It has a Java wrapper too
  • OpenAL 3D audio library. I think there are Java wrappers for this too, but you'll have to find the links yourself.
Maybe there are even pure Java solutions out there that are better to use in Java? I looked into game engines before I became a Java fan, so I'm not very aware how good the Java ones are.

Other things needed:
  • entity/actor system
  • a scripting language
  • the glue to hold it all together
  • 2D graphics engine (start simple)?
  • extensions for specific genres
There are efforts like this out there, like Yake (although I'm not very familiar with them), but we all know there is no other component platform like OSGi (+ Equinox) :)

Monday, December 19, 2005

Switching to Linux

Zerobot developement is slowing down for a few days while I'm switching my main desktop environment from Windows to Linux. Ubuntu is great IMHO, no matter what Linus Torvalds says about Gnome. I even got the ATI driver working on my AMD64 PC finally (that's mostly what kept me on windows so far). The switch isn't that hard if you've used to multi-platform applications anyway (Firefox, Thunderbird, Eclipse, OpenOffice). Importing all my thunderbird settings and emails meant copying a directory from a windows drive to the linux file system. For eclipse, I din't use the packages provided by Ubuntu, but downloaded the Sun Java VM and Eclipse from the official sites. The GJC version was incredibly slower and ate lots of more memory.

So I already have three linux systems: coyote running on a Pentium 200 with no hard disk, booted from a floppy, shares the ADSL connection to my local network. Ubuntu 5.10 32-bit running on my old computer. And my new computer is dual boot -- WinXP and Ubuntu 5.10 64-bit. I think it will stay that way for I will still need Windows for playing games.

There's one thing I'd like to do before going full throttle with Zerobot developement: set up a server that not only shares the internet connection, but also acts as Apache, MySQL, file & print server + Bugzilla + CVS / SVN + phpBB2. Otherwise I have to keep synchronizing multiple desktop systems to provide up-to-date versions these services. I have a 450MHz Celeron that I could use for this, but I think I'll probably need to get a new hard drive for it. I'm planning on installing OpenSuSE 10.0 on it.

Wednesday, August 31, 2005

Mavenising

I just realised again how great Maven is. I wanted to get back to working on JSimpleton, the bot that allows forum users to play old text adventure games cooperatively. I haven't touched the project for months and since I last did have gotten a new computer and didn't have any of the numerous Jakarta and other open source libraries any more, and have switched Eclipse versions from 3.0.1 to 3.1. Thankfully I had used Maven as my build tool and Eclipse as my IDE. After importing the old project directories into Eclipse, installing and configuring Maven and the Eclipse Mevenide (Maven IDE -- why Mevenide?) plugin from the update site, I only had to run the POM synchronization and build the project with Maven once to have all my classpath dependencies in the IDE resolved and the project built properly. Ok, so there were more issues than that, but they were my fault entirely.

Sometimes I don't think Maven is that great though -- I've wasted many an hour trying to make it build complex J2EE projects exactly how I want. Maybe I'm just not used to it.

Friday, May 20, 2005

Faces, Eclipsed

After developing a JSF application for a few weeks, I have now been in contact with some negative aspects of MyFaces (and/or the JSF spec) as well. I knew that would happen, but some of it really surprised me. For example, there is no easy way to temporarily turn off form validation and not break the entire lifecycle without rewriting many parts of the JSF implementation. In the end I had to implement custom validation methods for forms, that get executed only when needed. Thankfully our project doesn't require lots of form validation.

***

During the last couple of weeks, I've started using Eclipse Web Tools in a small project. It's currently very buggy, but it seems on the path to total awesomeness and I think the time is not far when almost everyone and their neighbours dog will be using Eclipse or a derived product for Java web application developement. There's simply no point in using a commercial IDE, when a free one can do all the same things, if not more. I use IDEA at work, and while it looks and feels better, it seems like Eclipse is catching up fast with features, and its Refactoring functionality is arguably already better than IDEA's.
I also learned about some cool Eclipse productivity features that I hadn't noticed so far, thanks to the Planet Eclipse site. Should read the help more.

Thursday, May 19, 2005

Waxy

I've become addicted to waxy.org/links. It's a daily updated mini-blog containing lots of great links with one-line comments.

Go get your daily dose.

Tuesday, April 26, 2005

My Java Faces

At work we use a lot of Java libraries from The Apache Software Foundation. Last week we took a look at MyFaces, which is an implementation of the Java Server Faces specification with some added components that make life easier. While the inner workings of it are still not entirely clear to me, the current impression is that it's like Swing over HTTP. We've started using it in a new project, and it allows us to do some things very quickly, which is good because we're on a tight schedule.

I really like the MyFaces extensions to JSF -- with their help, some complex user interfaces components can be built very easily. I was able to wrap our own generic Data Transfer Object in a very simple DataModel subclass and use it in a MyFaces component that can render sortable tables easily. That required another custom class to implement the sorting, which delegated it to a Data Access Object, and the actual sorting was done in SQL.

Sunday, April 17, 2005

Bots and pipe dreams

I actually suspected this blog would turn out to be something that I will rarely update. Perhaps I should let people know about it, which might very well motivate me to continue. Anyway, on with the post that has been gathering dust as a draft, for weeks I think.

When the Playstation 2 I borrowed broke down, I had to find something else to do with my free hours. That something should have been learning to use the Source SDK but alas, I have spent very little time with that.

I don't remember what exactly gave me the idea, but I started writing the foundations of a Java program that could communicate with various web sites and other internet resources, such as forums, search sites, e-mail, dictionaries, blogs etc. I had, or perhaps still have, vague ideas of creating an AI bot that could pass as a human internet user and be useful to real people in some way. My current plans have scaled down a bit...

I started with a vBulletin forum interface, but then got stuck. I had no idea what exact functions the bot would have. As a quick distraction, I wrote a very simple console application for browsing vBulletin forums. I tried it out on a couple of forum sites, but it only seemed interesting for a little while.

Then I revealed my coder's block at Idle Thumbs and asked for suggestions on what the bot should do. Jake Rodkin came up with the idea of people playing interactive fiction (otherwise known as text adventure games) cooperatively on the forums. I liked the idea and soon had a somewhat functioning Zork I running on the Idle Thumbs forums. The "bot" communicated with a DOS version of Zork, which I found quite lacking both in performance and security. Being a layman when it comes to IF, I only found out that there were lots of interpreters for the Infocom games after a short discussion with Jake about how he would like to put the bot to use. I found some open source Java Z-Machines, like Zax, Zplet and Zinc.

Zinc seemed the most recent (possibly even alive) and flexible, and I decided to go with that. After hours of reading the Zinc source code, I finally realized that I was looking in all the wrong places -- an unused import threw me off, until I decided to let Eclipse organize the imports. I was then able to extract just the Z virtual machine and modify it's wrapper to suit my own needs. After some more hours of input/output hassles, I finally saw my error in thinking and got it working well enough for what I needed, if not the most efficiently. I have still a lot to learn about multithreaded programming.

Since then, I think the bot has evolved quite well, and is more and more starting to resemble something that could be called a bot instead of a set of small, disposable applications. It now supports TADS 2 games as well as the Z-code games, handles exceptions better and can be run as a service/daemon on many platforms (tested on Windows XP and Mandrake Linux). At the moment I'm busy with getting the code as stable as I can, and release the initial version to the Idle Thumbs staff, who will put it to use on their forums.

Friday, February 11, 2005

On sit-coms

In his blog entry ("The Secret of Success", 10.02.2005) about American sit-coms, Yahtzee says the reason they suck is breaking a set of rules that British ones follow precisely. I might agree with half of what he said, but the other half is bullshit. I suspect it's due to him having a very particular taste and being quite British.

Firstly, Friends != Horrible Shit. Sure, it has kind of turned into a soap opera, but almost every fucking episode IS funny. Compliance with an arbitrary set of rules does not define the funniness of something. Something is simply funny or not, although that can be quite subjective. The quality of the humour in Friends is way above that of the standard American sit-com. To see that, there's no need to analyse it's success or break it down into a set of rules -- it should be obvious to anyone who has watched even a few episodes.

Secondly, Seinfeld is way above Not Too Shabby. You can simply tell that from the various contexts it is often referenced in. The jokes are often quite unique, compared to other sit-coms. Or even if they aren't, they sure fooled me. For example, google for "Costanza principle" and download the powerpoint file "Strangling Legacy Code", then search for "Costanza" in the file again. It shows how a joke from one the episodes can apply to solving a real-life software engineering problem.

The others that Yahtzee mentioned I pretty much agree with. But my point is that there are more kinds of comedy than the British variety, and it can be equally good. Usually I prefer British humour as well, though.

The one thing about sit-coms (American or not) that bothers me is the laugh track. What the fuck is that good for? I don't need to be told if something is funny or not, I can figure it out by myself. The only sensible reason for the laugh track I can think of would follow this logic. They say laughter is both healthy and contaiguous, therefore more laughter should mean a healthier population (which would be good, if the Earth wasn't overpopulated).

Thursday, February 03, 2005

Welcome and goodnight

Welcome! For some reason I don't completely comprehend, I decided to open a blog. The blogging business has been fairly unfamiliar to me; I don't even know how it's customary to begin them, I'll just keep it short and say whatever pops into my head. My main reason for starting this is that I want to have a place where I can vent or write down my thoughts about something I'm obsessing about that would be too long for a forum post. The topics I'm going to cover here will probably mostly relate to software developement, video games and ETC.

Goodnight for now,
Villane