Posts Tagged ‘software’
Wednesday, July 9th, 2008
I downloaded a new Java tool today, called VisualVM which was released (version 1.0) yesterday and is going to ship with the SUN JDK starting with JDK 6 release 7.
This is a tool that allows you to view information about the java programs currently running on your computer (or a remote computer). It does not seem to provide as much information as JConsole or JManage, but it still gives the most essential information. Besides the tool is still pretty new (version 1.0), so I’m sure we will see lots of improvement in the near future.
Monitoring provides basic information about uptime, memory usage, threads and some other stuff:

The application also has a rudimentary profiler which allows you to see which methods are using cpu cycles, and which objects are hogging all the memory,

The program can also do a heap dump, allowing you to see the size and number of instances of each class. You can also inspect each and every object to view it’s variables and references:

The profiling part was pretty simple and would benefit from more work, but overall I’m pretty sure this tool(even though a bit low on features/information in it’s current state) will be a big hit, and a good entry to profiling and application management to many people.
A very nice feature I did not take a screenshot of is a visual timeline view of all the threads and which state they are in, very smooth
The software is also suppose to let you view core dumps, but did not get a chance to test this feature tonight.
Tags: computer, debug, heap, java, jdk, memory, profiling, programming, screenshot, software, sun, technology, timeline, uptime, visualvm
Posted in Computers, General, programming | No Comments »
Monday, May 12th, 2008
The last week I have been finishing up the online registration system for Nidarosilder, a local ferret show here in Trondheim that we are attending in early September.

The system runs on jsp and postgresql and allows user to register, then they receive a password they use to log in. When logged in they enter their name and other info, and can add up to 20 ferrets. Also my friend Anne who organizes the show has a admin page where she can see all users/ferrets, and sorted displays to make it easier to set up the different classes for the show.
Seeing that the ferret system was ready thursday, I got to spend most of this long weekend (Dont have to work monday 12th because of some religion thingy) on my Startrek game.
I debugged the Research system, and had some problems with the object serialization between the server and the client (ObjectOutputStream.writeUnshared() only writes the ROOT object unshared.. I learned that the hard way). I also made the client show a counter that counts to next game turn, a animation that shows while downloading map data, I implemented the Order system, and now it is possible to move a starship.
Below you can see a federation fleet moving to sector 3:7 (the yellow dots show the path)

Thursday 22. I will be going to Austria with the people from work, so maybe then I will have the time to implement the build system when there =)
Tags: debug, ferret, ferret show, game, java, jsp, path, postgresql, programming, screenshot, serialization, software, star trek, starship, trekwar, webpage
Posted in Computers, General, programming | No Comments »
Tuesday, April 8th, 2008
I’ve been using tomcat for quite a couple of years now..
But when making working on a registration page for a “ferret show“, I got so goddamn fed up with two things:
1) Each time I recompiled some of the background Java stuff (beans + database manager) I had to restart the server after recompiling
2) OFTEN after recompiling, for no frakking reason whatsoever. Tomcat would bitch about being unable to find the postgresql driver, even though it was in the common/lib as well as the webapps lib directory..
The second issue would sometimes take 5-10 minutes of removing the file, moving it back, restarting the server, removing work/tmp dirs, before it suddenly and miraculously worked again.. So I finally had it, and downloaded Resin and had it up and running in a few minutes.. Copied over the webapps, and now everything works nicely, and I never have to restart the webserver.
I’ve had some experience with Resin from my previous workplace, using the java php implementation and the JMS system. And Resin seems to be pretty nice, and switching from Tomcat to Resin only took a few minutes.. Did not tweak the config much and set up SSH, that will have to wait for the weekend
Tags: database, ferret show, java, javabean, postgresql, resin, server, software, ssh, technology, tomcat, webpage
Posted in Computers, General, programming | No Comments »
Tuesday, March 25th, 2008
After years of faithful service, I made the change from CVS to Subversion (SVN). I installed SVN on the server, and set up the SSH keys on my desktop and got up TortoiseSVN and SVN for eclipse. I used cvs2svn to copy over everything from CVS to SVN (which required about 1-2 hours of removing the Norwegian characters Æ Ø Å from filenames from misc. schoolwork). I like TortoiseSVN much more than TortoiseCVS, but I’ve had some problems with checking out stuff into eclipse. Seems like I have to check in everything as eclipse projects for it to work straight away. I notice that SVN seems a bit slower than CVS (when using it with SSH and pre-authenticated keys), if it becomes a problem then I’ll just install SVN on my windows desktop and mirror the repository on my server.
Tags: computer, cvs, cvs2svn, eclipse, programming, server, software, ssh, svn, technology, tortoisesvn
Posted in Computers, General, programming | No Comments »
Wednesday, January 30th, 2008
Today I completely finished the research system of my Star Trek game Trekwar.
Well, I still have to crawl trough memory alpha to get images for all the 65 technologies in the game. but all the code and the GUI is complete:

Next I will make the client download and display the new map / research view each time the server starts a new turn.
After that I will be working on the order system, and doing either the build order system (creating new buildings on planets), or the fleet order system (moving starships, giving attack/colonize orders, etc..). Still LOTS to do, and it feels good to have Research out of the way.
Tags: client, game, gui, java, planet, programming, research, screenshot, software, star trek, trekwar
Posted in Computers, Games, General, programming | No Comments »
Monday, January 28th, 2008
I was in Åre Sweden this weekend, on a company excursion by Betradar (where I’m starting work Friday).

They had rented a large cabin (250 m2), and around 20′ish employees hang out there from Friday to Sunday. I got to meet some of my soon to be coworkers, and I made some progress on my Star Trek Game (Which has kinda been stuck in development hell for the last two years).
Unlike some of my previous code that I have written, coming back to Trekwars (second rewrite I might add) was very pleasant, good planning and Object Oriented Design seems to have paid off
I was able to implement the tick/turn system, and did some GUI work on the galaxy view, and halfway implemented the system view and research view. I also worked a bit on the order system, so given a few more hours of development I think I could actually move fleets of ships around
Still much work to be done until the game is anywhere near playable
- Starship pathing algorithm and order system
- Server data limiting (The client receives a big map ‘the galaxy’ from the server, currently it sends EVERYTHING, but this will have to be changed so that users cant cheat by reading “secret” data. Also by making a custom user copy the server will enable fog of war, and “distort” information in far away areas where sensor strength/resolution is low)
- Sensor coverage algorithm (got it worked out on paper somewhere)
- Planet Build systems (halfway done)
- Combat resolution (ship to ship + ground combat)
- Colonization and Starbases + Listening posts construction
- Social tools (ingame mail + chat)
- Natural phenomena (black holes, neutron stars, nebula, wormholes, etc..)
It was really fun working on the game again, and hopefully I wont shelve it for so long again. Here are some screenshots showing the GUI stuff done this weekend.
Galaxy view – shows the map with systems and starships

Star system map – Shows details about a star system, panel to build new structures/ships is not implemented yet. BTW those are temporary planet pictures that I drew in ms paint with my laptop touchpad this weekend, I actually think they are kind of cute 

Research View – Only just started this, so it just show your current research tree err.. stack 

Tags: betradar, game, gui, java, programming, screenshot, snow, software, star trek, sweden, swing, trekwar, Work
Posted in Computers, Games, General, programming, Work | No Comments »
Tuesday, November 20th, 2007
While most of this weekend was well spent playing Crysis, I actually managed to get a bit of programming done. At work we usually work on several projects a day and we have to keep track of the hours we use on each project so that customers are billed correctly.. and at the end of the day it can get pretty hard remembering what you did and how long it took you to do it.
So i made this little Java application called TimeTrack that pops up every 45 minutes (or whatever you ask it to) and asks me what I’m doing. This should make it easier to write up my hours every Monday morning

It was also kinda therapeutic to work on a small program where I get to design everything, and there is no changing requirement specification and I can finish the program and put it behind me (well maybe I’ll throw in a few quick fixes). Anyway.. I’m going to continue my Halflife 2 install and try out Portal
Tags: code, crysis, gaming, half life 2, java, portal, programming, screenshot, software, timetrack
Posted in Computers, General, programming, Work | No Comments »
Friday, November 16th, 2007
I got my new computer set up now, with two XFX 8800GTS in SLI, and imagine my horror when Crysis refused to install:
Error 1335. The cabinet file ‘Object~1.cab’ required for
this installation is corrupt and cannot be used. This
could indicate a network error, an error reading from
the CD-ROM, or a problem with this package
I tried installing it 3 times and then I gave up, asuming the DVD was damaged. I played Call of Duty 4 for a few hours (pretty neat campaign so far).
Then I tried googleling the error message and found out I’m not the only one who had this problem.
I tried the simplest of the solution first (disabling my AVG antivirus software) and hey presto, Crysis installed without problems
Tags: antivirus, call of duty, computer, crash, crysis, dvd, game, google, software
Posted in Computers, Games, General | No Comments »
Wednesday, October 24th, 2007
Today I finished up the project from yesterday (A applet for testing the bandwidth to our server).
I spent most of yesterday trying to figure out why the upload speed always where 20 times higher than the download speed, I tought it was a bug but now I’m convinced it’s some evil setup in the firewall that throttles the speed like this.
Here is the result

I also generated a 1 mb testfile on the server to test download speed using “dd if=/dev/urandom of=testfile bs=1024 count=1024″ 
In this random file there are 16x smiley faces, 9x sad faces, an asian smiley with a missing ear [‘_’ and a vampire :-[

also the word “UNiX” appears.. spooky.. It’s not the complete works of Shakespeare, but then again I didn’t have any monkeys.
Tags: applet, java, programming, software, statistics, Work
Posted in Computers, General, programming, Work | No Comments »
Thursday, August 23rd, 2007
I was updating the SendSMS program I wrote, and instead of a JTable I wanted the list of messages sent to display in a better looking and more intuitive way. I decided to just use a JLabel and use html for displaying the sent messages:

I had the JLabel in a JPanel with GridLayout(1,1), and the Panel inside the JScrollPane. The JScrollPane always have vertical but never horizontal scrollbars.
The following problem arose: When the message got to long, it would not wrap, and end of message would disappear to the right.
The solution is simple: set the Width of the JPanel with the label to be roughly the size of the application window..
That did the trick, now however the scrollbar never updates when the Label gets very tall.
Apparently you cant just set just width for the Panel, you also have to set height.. again the solution is simple, set the height of the panel to be the height of the JLabel.
However since the JLabel is inside the JScrollPane (at least, I think that is the cause) the getSize and getPrefferedSize will return only the visible height of the JLabel. It took some playing around with but finally got it working by using the getMaximumSize.. NOTE: dont use the width from getMaximumSize() cause it is ridiculously large
the code:
historyPanel.setPreferredSize(new Dimension(historyScrollPane.getViewport().getSize().width, historyLabel.getMaximumSize().height));
Now I just have to find out if that way of getting the components height works the same across different platforms
Tags: code, gridlayout, html, java, jlabel, jpanel, jscrollpane, jtable, programming, screenshot, scrollbar, sms, software, swing, technology
Posted in Computers, General, programming | No Comments »