Software : Andrew wrestles with source code
Updated: 18/03/2002; 3:13:50 PM.

 

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.

 
 

Tuesday, 12 February 2002

Portfolio is a simple, data intensive, application to track the reducing value of my stock market portfolio.

If I have but one gift in life, it is to instantly reduce the attraction and value of any instrument on a financial market by buying some of it. To further compound this tale of woe I like to daily remind myself of my reducing nominal value.

What this actually means in English is that I like to keep track of the value of my shares. To date I have done this in a spreadsheet. Every day I open up my spreadsheet, I then open up Mozilla and navigate to My Yahoo! I then transpose the share prices from the portfolios section (as provided by Yahoo! Finance) into the spreadsheet and update all of the links on a summary worksheet to produce a single figure showing me how much my investments have lost me. This is a labour intensive process that computers were designed to simplify. Hence this application.

I want to be able to specify my shares by exchange. I've got some Australian and some US shares so currency awareness is required. I want to record how much I paid for my shares and keep a record of their value over time. I need to be able to record stock split. I want to have the ability to record dividends, in either cash or 're-investment' shares. I want to automate the acquisition of prices. I'm only really interested in closing prices but I do not want to restrict other people to only one price sample a day.

When Kevin posted the announcement of his stockprice SOAP client to the PythonCard mailing list the penny dropped and I realised that I had at my disposal all of the tools necessary to create this application. The storage will be supplied by Oracle, which I have running on Windows2000 on my laptop. The application will be written in PythonCard, it will talk to the database using cx_Oracle and may even use some native wxPython. I should be able to build a working application fairly quickly and easily and then tinker with the storage interface to my hearts content.


2:28:47 PM    

Today my topic is persistence in object oriented languages. In a vain attempt to get someone (anyone) to link to this Radio blog I making this category a notepad of my experiments to add persistence to PythonCard.

My first task is to build an application that talks to a relational database. Hey, I've done that already. dbBrowser is a sample that ships with PythonCard. Tick one.

My second task is to integrate the relational storage with events in the framework. The purpose here is to make the storage as transparent as possible. dbBrowser is read only and doesn't address this issue. The code is modular though, with different modules for the different 'flavours' of database that it talks to.

For this step I'm going to stick to a single database and concentrate on keeping the application data model seperate from the persistence mechanism. In other words, if I do this correctly you should be able to swap out the database and replace it with another without changing any of the application code, as well as using the persistence mechanism with any PythonCard application. Of course, if I do it really well you should be able to replace the relational database with any other form of storage, in particular ZODB or shelve. I'm leaving them out of it until I have a working model with a relational database. I'm also leaving them alone for now because other people are working on object storage in PythonCard. Hopefully we will all progress together and be able to join our efforts in the near future.

For step two I will need to build another application. Luckily, I've got one in mind. I've even got a relational data model to go with it. In my next post I'll try and explain my sample application.


1:07:03 PM    


© Copyright 2002 Andy Todd.



Click here to visit the Radio UserLand website.

 


February 2002
Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28    
Jan   Mar