Symbology and the big change

March 3rd, 2008

About three years ago , the guys from the OCC got togethter and decided to make changes to the way options are quoted by the market. For an example, The Mar 08 120.00 Puts have the symbol QAAOD while the Mar 08 125.00 puts have the symbol APVOE. So after a few years of work, they came up with this :


Mar 08 120.00 Puts
QAAOD -> AAPL080322P00120000
( AAPL 08 03 22 P 00120 000 )

Not really too difficult to figure out the coding on this system. There are a lot of details concerning things like FLEX options and stocks splits/mergers etc. The big change is due for July 2009, so a about a year and a half we will have to move over. The old symbols will be suppressed after that date.

What does this have to do with the price of tea in China? Not much ( but you can check the tea futures contract ) and not much to do with Raydo.

Internally, we already use the new structure. Just an input filter to change the old symbols into the new symbols. After the big change, we will just drop the filter.

Cross Compilation So Far

February 14th, 2008

    Arrgh. Cross compilation. Never an easy task. Well, it is not that bad except for Windows. Everything compiled the underlying Raydo library and almost every platform compiled the GUI. The only holdout was Solaris 10.

    I was a little negative in my last review of Solaris 10. I do like Solaris, I just think they do not have their stuff together. Solaris has always been geeky, and that influence shows. Sun is trying to make Solaris much more user friendly, but they are letting the geeks do it. Sure, they have the designers and such on the team, but the GUI does not feel ‘finished’. Oh, and they still include CDE ! Crazy stuff.

Platform GUI Raydo Lib
Solaris 10 No* Yes
Windows 2000 Chinese Yes Yes
Windows XP Yes Yes
OSX 10.5.1 Yes Yes
Fedora 8 Yes Yes
Ubuntu 7.10 “Gutsy Gibbon” Yes Yes

    The GUI on Solaris was a no go because wxWidgets would not compile out of the box. I have not spent that much time on it, but the underlying Raydo Lib does work, which means Solaris can work as a server for the system. When I get some time, I will go back and try to get the GUI to run with the Sun compiler.

    One thing about cross compilation is that on every platform except Sun, I compile with gcc.

Interface Ergonomics

February 12th, 2008

    I am a big believer in interface ergonomics. Let me define what I mean by ergonomics in an interface. An ergonomic interface is one where the user feels comfortable using the application. Where using the interface feels intuitive. Clean, consistent and productive interfaces get the GUI out of the way so the user can spend his time using the software. I think my time at Apple ( Macbook Air…drool…. ) years ago has forever changed my perception of how user interfaces should work.

I would like to share three of my favorite links.

    The first one, Ten Ways to Make More Humane Open Source Software has a big of a misleading title. Is should be something like “10 ways to not mess up your GUI”. It is a great article, and well worth taking a look.

    The second article The Rise of Interface Elegance in Open Source Software. This article is more about creeping featuritis and learning to say no.

    The last article The Luxury of Ignorance: An Open-Source Horror Story, is a bonus. Just a rant on how difficult some interfaces are and mentions “Aunt Tillie”.

Here is a great rule from Joel on Software on UI design.

A user interface is well-designed when the program behaves exactly how the user thought it would.

Happy Year of the Rat 4706 !

February 6th, 2008

2008 (or 4706 in the Chinese calendar) is the Year of the Rat using the Chinese calendar.


Three reasons Sun Sucks at OpenSolaris

February 4th, 2008

    They really do suck at marketing OpenSolaris. I don’t know how much they want to be in the Ubuntu / Fedora space. OpenSolaris has live disk ( finally ), so you can try it out.

    I spent a lot of time last week trying to get my application up and running. I did not spend time debugging or anything productive like that. I spent most of the time doing other things waiting for downloads.

    So, here is my first reason. The line between OpenSolaris and Sun seems to be as distinct as mud. You are bouncing back and forth between the two sites. One site for this, one sie for that.

    The second reason is the Sun Java Downloader is just evil. I never could get a complete download. My favorite error message was that I had completed too many successful downloads and would not let me download anymore. I guess for Sun, successful is zero. I finally downloaded the Indiana Developers Preview using bittorrent which is light years ahead of that Java thing.

    Finally , what is happening with Sun studio ? I download a copy of OpenSolaris and I have to go to Sun to get Sun Studio? Can’t you just admit that gcc is a good compiler and included it on the live CD.

    All that said, I really do wish to get my stuff running on OpenSolaris. Then again, I was really frustrated with Fedora a few years back. Redhat turned that around, and I think Sun will also.

    I added a link to Lawrence Scott’s blog. Not much there now, but I think he will start writing more.

Raydo-Announce Mailing List

January 31st, 2008

    I have set up a mailing list for announcements. A low volume list, so it won’t clog you mailbox. I think MAYBE once a month. Drop me an email and I will put you on the list. info @ raydo.com

CMake

January 24th, 2008

I am testing out changing the build system to CMake. I want to make building Raydo as simple as possible. Right now I use make, which is not the friendliest way to build things. By using CMake, I can supply , for example, Visual C project file.

So to summarize:
Open Source
  Supports basically every UNIX, MS Windows (MSVC, Borland, cygwin, mingw) and Mac OS X
  Can generate Makefiles and *projects* for KDevelop3, MSVC 6,7, XCode
  Has no other dependencies except for a C++ compiler

So I will be able to supply Windows guys with project files.

Raydo.ORG

January 19th, 2008

Ok, so I have Raydo.org now. This will be the mailing list site eventully. I don’t know when I will get it up and running , so for now, keep sending emails directly to my email account.

More Pthreads-win32 madness

January 14th, 2008

    So I was dorking around this weekend with the threading model on Raydo. Mainly benchmarking the granularity of the threads. For what I normally do , everything seems fine, equities, futures, blah, blah,blah. Until I started simulating a market maker carrying tons of options quotes on his/her book. The old model started to have a ‘lag’ that I was not happy about. So I started benchmarking a finer/coarser grained threading models.

    I am using pthreads which run on real ( POSIX ) systems, and Pthreads-win32 for that other operating system. So I am looking through the pthreads documentation for pthreads read / write locks , in the Linux/Mac/rest of the world documentation, I see this.

To prevent writer starvation, writers are favored over readers.

Which is nice, and IMHO, the way reader/writer locks should be. However for Windows, I see this lovely pearl of wisdom,

Pthreads-win32 does not prefer either writers or readers in acquiring the lock – all threads enter a single prioritised FIFO queue. While this may not be optimally efficient for some applications, it does ensure that one type does not starve the other.

    Argh ! “optimally efficient”? How about sucks? I do not want a fresh tick quote to come in, and have 20 readers in the queue before the writer reading a stale tick quote. I want the writer bumped to the front of the queue, dump the new tick in, and have the readers read the new data. Another reason I don’t like windows.

    Pthreads is just a wrapper around Win32 threads, and from what I am reading, Win32 does not really support multi-read, single-write (MRSW) lock that does not have problems with writer starvation. ( In NT they have an undocumented lock, which I guess is only for some nefarious MS usage.) So don’t quote me on the Win32 API. I am not a Win32 API guy, but it seems the Win32 API has a problem with writer starvation in reader/writer locks. Please correct me if I am wrong.

    Whatever model I use, when running a lot of reader / writer threads, I think I will have not have the warm fuzzies using Pthreads.

[Update] Just changed the object model a little bit, and everything is back to goodness. I did learn something about the Win32 API along the way that I did not want to know.

French & Chinese support in Raydo

January 11th, 2008

    Well, support for the GUI anyway. Command line stuff is still going to be command line stuff. For that you want it to be english. ( Have you ever tried Chinese on the command line ? )

    I am supporting French and Traditional Chinese first, because those are two of the languages that I can read/write. ( Besides English of course. )

    I originally tried using .po files for translation. That was OK, but not great. It is the supported method for wxWidgets, but that does not mean it is a great method. .po files are based on gettext, and gettext is “sub optimal”. Feel free to translate “sub optimal” as ’sucks’.

    So today, I went with a dynamic translation engine. The translations are defined at runtime using a C++ class. What is special about defining translations at runtime ?

               Plugins.

    When you define plugins, without a run time engine, you cannot add translations without editing the translation file for the entire app. So here is an example, say you write a plugin to pull the 13 week range on an equity. In chinese (HK) , that would be 13週波幅. How many people would want to edit a .po file that would get overwritten by the next update of the software? No one of course.

    By moving the plugin translations to the plugin definition file, we can get UTF8 translations that will not get overwritten by new updates. Coolness.