Friday, November 20, 2009

SWAT Without Root User

Ubuntu and other debian based distros typically haven't got a root user on the system, since its expected that system administrator tasks happen through the sudo command.

SWAT however, by default, expects you to log in with the root user to make it possible to change any settings. A very nice discovery i found by googling a while, is that the actual user doesn't matter, as long as the user you log in as have write access to the samba configuration file.

Adding my own normal user to a new "admin" group, and giving that group write access to /etc/samba/smb.conf made everything work without creating a root user for the entire system.

Friday, July 3, 2009

The Problem Child

Getting the latest release of Item Assistant out the door has been problematic to say the least. The first published binary labeled v0.9.4 proved to be flawed in more ways than one.

After FunCom released the 18.1 patch to Anarchy Online, I had to completely re-implement the database extraction code. Before it was using an existing DLL by Faircom called CTreeStd.dll. Unfortunately the age of that DLL was showing and FunCom decided (wisely IMHO) it was time to move to something that supported a database size larger than 2 GB.

Re-implementing it wasn't really that hard, as I originally based it on mapped_file_source from the boost iostreams library, to map each of the data-files into memory at a turn, and extracting all relevant information. This turned out to be a shortlived solution, as bug reports started flooding in from Windows XP users. Apparently there are limitations in the older Windows kernel that prevent me from mapping a 1 GB file into memory at one go. So I went back to the drawing board, and implemented it all again, this time using the more classic approach of the std::ifstream. Since the "random" access I cause isn't really that random (I read all items in the sequence they are stored in the file) there was no noticable performance difference between the two solutions on my PC.

So just to sum up, here is the list of what has changed between v0.9.3 and the current v0.9.5:

  • Added support for the new database in v18.1.
  • The application is no longer using the registry to store its settings. Settings are stored in the ItemAssistant.conf file.
  • Enhanced item listing so the container column shows if an item is equipped, and at which tab-panel it is.
  • Added baloon warning popup when application is started after the AO client was started since this may lead to the database being out of sync.
  • Improved statusbar for the Inventory view.
  • The application will now remember which dimension you chose last time you changed dimension in either the find panel or the pattern matcher.
  • Added "Copy Item Name(s)" to the item context menu.
  • Bug Fix: Fixed weird encoding of ampersands in backpack names.
  • Bug Fix: Exporting all items from a toon should not put multiple quotes around the backpack names any more.
  • Bug Fix: Fixed buffer overflow with long backpack names.

Wednesday, June 17, 2009

TeamCity Build Agent on Vista

I had some problems getting my Windows Vista PC to run as a build agent for TeamCity. According to the documentation it should be a pretty straight forward installation procedure. However, after I had installed my new agent never showed up on the server waiting to be authorized as expected.

Examining the logs in the build agents directory, I found an error message:

Unable to ping agent Andromeda. Please check firewall on agent machine

(Andromeda is the name of the Vista PC)

Well, I tried turning off the firewall altogether without any effect.
As it turns out this is a problem due to the fact that the PC has multiple IP addresses and the agent starts listening to the "wrong" one by default. You can override the IP address by specifying it during the install procedure, or later by changing the config file.
Adding this line to the config file solved my problems:

ownAddress=192.168.90.79

After a short while the build agent showed up on the server, and after authorizing it, everything worked as expected. Hujja for TeamCity!

Thursday, May 14, 2009

Creative Translations

In the never ending stream of photos of bad/funny/inventive translations on the internet, I bring you all an example from my latest trip to Russia.


Although my Russian sucks, I think they are telling you to please not throw rubbish in the sink. Anyone know what a "bowlhole" is? I have never seen that word before (or since for that matter).

Monday, May 11, 2009

TeamCity, Ant & DITA

Over the last few days I have been trying to get a CI server (aka build server) up and running. After trying out both CruiseControl and CruiseControl.NET I landed on TeamCity since it is a bit simpler with a decent web GUI as well as being somewhat familiar from my work.

You can download TeamCity and try it out for yourself since they offer a free edition that supports up to 20 build configurations and 3 build agents.

One of the tasks I wished to accomplish in by CI server was to build the online help files (HTML) as well as the user manual (PDF). Having all the source material in DITA formatted XML files makes that pretty easy from the command line using the DITA Open Toolkit full easy install distribution. Getting it to run automatically from TeamCity proved to cost me some gray hairs though.

So as a note-to-self here is a short checklist of what to do after TeamCity has been installed:
  1. Download DITA and unzip it. (Ex in: C:\DITA-OT1.4.3)
  2. Create a new build configuration for you project, and set "Ant" as the "Build runner".
  3. "Ant Home" should be the ant folder in your DITA installation. (Ex: c:\DITA-OT1.4.3\tools\ant\)
  4. In "Additional Ant Command Line Options" input the classpath and any options for Ant or the DITA toolchain it spawns.
  5. Add DITA_DIR environment variable to the build configuration and set it to the folder you unzipped DITA to in step 1.
  6. Create a build.xml file for your targets and point TeamCity at it.
Note!
Setting the CLASSPATH environment variable had NO effect, neither had adding -classpath to the JVM command line options. Only adding it as a -cp option to the Ant command line did the trick. I did not find any mention of this in either DITA documentation or TeamCity documentation.
It might be obvious for someone more familiar with Ant, but for me it was a big hurdle I only discovered while (desperately) searching trought the Ant plugin configuration on my TeamCity server.

Monday, May 4, 2009

Item Assistant v0.9.3

I have just released a new version of Item Assistant. This version fixes bugs, improves performance and cleans up/improves the GUI a bit.

From the changelog:
  • Added support for NPC trade-in quest rewards in the item tracking.
  • Now parsing the 18.0.1 database correctly.
  • Find panel now filters on dimension as well.
  • Added support for Xyphos.com for item stats/links.
  • The report in the Pattern Matcher now links to the loot table for the boss.
  • It is now possible to export all items (excluding backpacks) from a toon by right-clicking the toon name in the tree-view.
  • Improved performance when ripping the AODB.
  • Bug Fix: Identify view will now sort (right hand side list).
  • Bug Fix: Toonlist in the find-panel and pattern-matcher should now be sorted.
Check out the downloads page at sourceforge to grab a copy. This distribution also includes some DLLs that were missing from the previous version and should hopefully fix the problem some people have with it not starting up.

Saturday, April 25, 2009

Item Assistant Speedup

Ripping the AODB in Item Assistant have been greatly sped up in a recent subversion commit (#310) bringing the time it takes to rip the AODB down from 2:42 to about 1:25 (on my setup). Users with SSD drives are probably not getting a big boost, but you are all spoiled anyway :P

The code change simply tell SQLite to use a memory based journal while ripping, instead of the default file based journal by running the following command on the database:

PRAGMA journal_mode=MEMORY

The program is now probably using more memory while ripping, but since most people can spare 50-100 MB I don't think it will be a problem.

Monday, April 20, 2009

ERA Visual on CNN

For the last 4+ years I have been working at Epsis AS, a technology company focused on Integrated Operations in the Oil and Gas business. For much of that time I have been working on an application that is now in use by Chevron SJV.

CNN has posted an video about the application here and the effect it has had.

Tuesday, March 31, 2009

New Anarchy Online Item Database

A new item database for Anarchy Online has made it to the public. Still being developed, but is is already working quite nicely.

URL: http://www.xyphos.com

It is still missing things like item interpolation, but I'm guessing its not too far off into the future before its in there as well. Until then I will have to settle for Auno's site for that piece of functionality.

AO Item Assistant has been updated with support for the new site. I haven't removed the references to AOMainframe yet, but that project looks too dead to be resurrected. :(

Wednesday, March 4, 2009

Certified ScrumMaster

I have just completed a 2 day training to become a Certified Scrum Master. I attended Mike Cohn's course in Oslo and it was a very interesting experience. Although we have been using Scrum in our organization for some time now, it was very educational! Mike really knows what he is talking about!

Mike Cohn's blog.

The course I attended was organized by programutvikling.no.

Update: And now I even have a nice certificate on my office wall. :)

Monday, February 23, 2009

Item Assistant - Startup Issue

Some people are experiencing problems starting version 0.9.2 (and possibly earlier version of the 0.9 branch). It shows up as a Windows error message telling you the application failed to start because the configuration is wrong. Well.. what configuration? AOIA doesn't have a configuration!!

So after a bit of googling and reading up on side-by-side assemblies, it turns out the solution is pretty simple. To run it you need the Visual Studio 9.0 CRT DLLs installed on your system. If you don't have Visual Studio you can just grab the redist package from Microsoft and install that.

Future snapshots of the application will probably have the missing DLLs bundled in the ZIP file as a "private" assembly, like in this CodeProject article about Visual Studio 2005.

Friday, February 20, 2009

Item Assistant v0.9.2

I just uploaded a new snapshot of Item Assistant to the sourceforge page. This is the official v0.9.2 release.

You can see the forum for the official release notes.

This version has been tested with the recently released patch of Anarchy Online (v18.0.0) also know as "The Legacy of the Xan" booster pack.

For downloading go here.

Thursday, January 29, 2009

Cool Open Source Site

I stumbled over a cool site for open-source software development today. It has the wierd url ohloh.net and appears to be a social networking site based on open-source development.

Anyway, somebody had already registered my pet project, Item Assistant, and I diligently grabbed it and started to fill in details like SVN repository URLs etc. It then started generating some useful and interesting statistics about the project.

Anyway, its cool and you can check it out right here!

Item Assistant Inventory View Revamped!

Over the last weeks I have been refactoring the inventory view of Anarchy Online Item Assistant (AOIA) to a more traditional MVC pattern. I took the inspiration from the work I did with the identify view and made it a bit more general so it can be used to display an item-list of any search I create.

The main benefit, besides cleaner code, is that the inventory view now has a column that tells you where the backpack that has the item is located as well.

Sunday, January 11, 2009

Item Assistant Identify View

More updates to AOIA.

I have added a new view that lets you quickly locate items in your inventory that are convertable into a different item type.

In the list on the left you choose the target item, while on the right it will determine the un-converted items you have that match your selection and where they are located.



The list of items that are convertable and what they convert into, is manually entered by the developers into the database. There is currently no way for me to extract all tradeskill processes (I don't even know if they exist in the AO database at all or only exists serverside? Anyone?)

Friday, January 9, 2009

Dimension Support in Item Assistant

Work on AOIA never stands still.

Here is a small screenshot showing the new dimension support in the inventory character tree-view. RK1-Rk3 are added as default, while the "Unknown Dimension" contains characters you haven't logged in with the new version of AOIA yet. When you log in a toon its dimension is automatically detected.

More work remains though, as the find-panel, pattern-matcher and identify view all need to be able to restrict data retrieval to a single dimension.