Archive for the ‘applications’ tag
tracking investments with gnucash
I was pleasantly surprised when Amey took a pro-active step involving Linux. He configured GnuCash to track his investments. Not track as quite a lot of people do - using spreadsheets, but actual real-time tracking with updates of his stock prices at COB. This is as much a victory for open source software as for Indian markets. He has taken that small but significant step into a big world of IT enabled services. If only more people took that step.
After much scolding and persuading by a lot of people, I have enrolled into a Systematic Investment Plan. And there was no doubt I would be using GC to track all that stuff. In the GC options, was a name - AMFI. AMFI is an umbrella association for Mutual Funds in India. The reason it popped up in GC is it provides stocks related feeds which are used for real-time tracking.
As soon as I had my investment details, I followed Amey’s tips and set up my GC account to track my funds. Along the way, I had use a handy GC to QIF converter. Why? I was maintaining yearly accounts with seperate files for each year. Amey told me It would be a bear to track investments across seperate files, and I agreed. GC has no way to merge two account files but it can import two QIF files; hence the converter.
All in all, I stumbled a few times - I’m no guru at financial stuff. With GC and a few knowledgeable friends, I plan to make the journey a bit safer.
Flash on 64 bit Firefox
Understanding megacorps is difficult. Adobe refuses to release a Flash plugin for 64 bit browsers. Sun refuses to release a Java plugin for 64 bit browsers.
Don’t tell me it is not possible - the only reason I’m not using Gnash is it fails to play quite a lot of Flash files. It is still in development and works up to SWF 7; which means (I think) it can play files compatible with Flash 7. But, what about Flash 9? And Flash 8? Believe it or not, services like Youtube and applications like FusionCharts are quick to adopt the latest and greatest version of Flash out there. And Gnash is playing catch up.
So, I had two options; first was to install a 32 bit Firefox build - icky. Tried it for a few weeks - no go.
The second option was to install a 32 bit distro in a VM. It seemed like a good idea. I even got ready to install a bare bones, minimal Ubuntu with a lean and mean window manager, to speed up the VM a bit. Then I discovered (to my utter shock) that enabling network communication between the host and guest OSes and allowing both to access the net; while possible, was definitely not my cup of tea. I needed this to work because I wanted to test an application running FusionCharts - I needed the guest to access Apache running on my host.
Then happily, I discovered a third option - nspluginwrapper.
What this beauty does is put a wrapper on 32 bit plugins to allow them to be used by 64 bit browsers. All you have to do is install this package and then the Flash plugin - as shown here. But for some reason, Ubuntu’s repos have messed up with the MD5 sum for the Flash plugin. Result - the plugin doesn’t get installed.
Then, a guy who calls himself Kilz, came to the rescue - by providing a script and DEB packages to do the job. He is the man, absolutely! I looked through the thread and the bash script. Cleaned up the system - removed all previous Flash installs. Followed the commands in the script. And I was done.
But having to do all this sucks. How much effort does a 64 bit plugin take to develop?
Excel Fixation
A couple of weeks back, I came across an interesting task - convert a PMML file to human-comprehensible format. PMML stands for Predictive Model Markup Language. It uses XML to store its data. A plain XML file is always human-readable, but you can’t do much with it on screen, other than feed it to an XML-aware application.
My first response was to write a stylesheet for the file. That worked pretty well. I had the data stacked for display in proper tables. It was more comprehensible than looking at the XML file in say, a text editor or in a browser without the stylesheet. The hitch? Human-comprehensible means “should open in Excel, ready for action”. The pretty thing being displayed in the browser was obviously not what they wanted.
So, I blew off the dust on my Perl skills, pulled in two modules and dumped the PMML data into honest-to-goodness Excel-compatible BIFF. The big question (whose size increased in part because the code I was writing, while trivial, was frighteningly repetitive and I’m not a fast typist) was: why in the world would these guys insist on Excel?
Back in my BE days, numerical techniques was one of the most interesting subjects around for the just-born programmers. Approximating mathematical functions into arithmetic algorithms and fleshing them out with our newly learned skills in C and Matlab - slick. If you are in the number crunching profession, you can’t ask for much more powerful tools. But does anything beat the convenience of the “snap of the finger” processing that Excel provides? By “snap of the finger”, I mean operations like sum, sort, count, average, rounding off or approximating, filters, frequency distribution, elementary logic, stats and math functions and (the most important?) fetching data from all over the place using cell addresses and ranges. This is certainly not an exhaustive list, for I have seen these guys do a lot more.
I certainly don’t know the answer. Let’s say you have the data in a plain text file - CSV, TSV or whatever - even XML. Then you use whatever is your tool - C, Perl, Python, Octave, Matlab - to operate on the file and show the output - in as pretty a format as you want. I’m sure high-level languages like Python or tools like Octave can ease the pain for non-programmers. And of course, software like Octave make it easy to write out “snap of the finger” operations.
But the operative word is convenience. I’ll be deluding myself if I say all those tools are more convenient than Excel. And so, Excel wins. In spite of flaws in its formulas - try to multiply 850 by 77.1 in Excel 2007 - and security framework. Even though its spreadsheets (at least till recently) were limited to 65K rows. Sure, Office 2007 breaks that limit, but introduces OO-XML… end of story.
OK, so maybe, this is a childish tantrum - maybe spreadsheets are a good enough tool for their purpose. If they were in a *nix environment, they would be using OpenOffice.org Calc and I wouldn’t be writing this. So why am I pissed?
Because it hurts. Like your aesthetic senses would be hurt when you are confronted with crap masquerading as art. Like you would wince when you hear noise claiming to be music. XML is meant to be read by multiple applications - yes. But that hardly means you should open it in Excel 2003/2007 and claim to be working on an accurate representation of the XML file’s payload. Not unless you have a filter or translator plugged in.
As a web developer in training, I know that an XML file has to “interpreted” and its payload “translated” before it can be termed as useful. Excel users assume Excel knows how to do this already; for any XML file they load in it.
Excel doesn’t. Atleast not at the “snap of a finger”.
Eclipse Europa with PDT and EPIC
I don’t think anyone needs an introduction to Eclipse. I had been putting off its deployment on my home machine for the most trivial of reasons - laziness. Well, I installed it today.
First and foremost, I must say, go for the latest. No matter which Linux distribution you use (or OS for that matter), go for Eclipse 3.3, Europa, the latest version of Eclipse out there. I tried to install PDT on Eclipse 3.2, Callisto, which was smoothly installed via Synaptic. PDT requires WST 2.0.0. Callisto offered 1.5.0, I think. So, Europa is the only way to go.
If you are on a 64 bit system, go for the 64 bit builds from the downloads page. The page detects your OS and architecture, just in case you don’t care to check it yourself. At the very least, your Eclipse and JVM should be of the same architecture. Sun’s Java is preferred. I know. I kept trying to install a 32 bit Eclipse build on a 64 bit system with a 64 bit JVM. Typical case of PEBKAC.
Well, first, I put in Sun JDK 6. These three commands from the Eclipse page of the Community Ubuntu Documentation did the trick. Th last two commands ensure that, if you have more than one JVMs, Sun Java comes first.
sudo apt-get install sun-java6-jdk sudo update-java-alternatives --list sudo update-java-alternatives --set java-6-sun
Then, it was time to install the plugins - PDT (PHP), EPIC (Perl), QuantumDB (MySQL), JSEclipse (Javascript) and Subclipse (SVN). QuantumDB requires the JDBC driver for your choice of database. For the rest, dependencies are satisfied by Eclipse’s plugin installation utility. Just select the Europa Discovery site along with the plugin’s own update site. When the dependencies crop up, expand all the sections of the Discovery site. Then click the ‘Select Required’ button and the required dependencies get selected. Slick - the closest anything has ever got to the apt-get utility.
And you are all set to get more productive.
How can software be free?
I was accompanied part of the way home today by a colleague from Cartesian - that’s a sort of group company; linked with Direxions. Well, Cartesian’s top guy is also my HoD. This lady is a cheerful person minding her own business; and not minding minding others’ too. You know the type - you can get amused at them, exasperated with their cheerfulness but you can’t get angry with them. The missy is intelligent too, if you go by the stuff she does. I don’t see too many women in the crunchy numbers department.
Now the point is, the boys (and girls) at Cartesian are developing web apps. The missy asked me what ASP and PHP were. Succinctly, they are scripting languages - my answer. The next question was about MySQL. She had a problem with its interface. Well, that depends on what client you are using to do your job. A jargon gap (we are in different fields, after all) prevented me from explaining that to her. That can be fixed; I hope to do it tomorrow. Her next question floored me.
How can MySQL be free?
I’m using Linux since April 2003. I have been reading up on Free Software and Open Source since then. ESR’s essays. Followed a couple of mailing lists. Blogs by Linux users. Lots of stuff. I have “got” the theory - ideals, nuts-and-bolts - whatever - of free software and open source. I believe I understand why software should be free. And why quite a lot of it is free.
I’m basing my toolkit on LAMP - Linux, Apache, MySQL, PHP/Perl. I know their merits and demerits(!?). I know various tools, frameworks and applications that help me on the way. I can do a pitch for any of these to my colleagues (in Interactive) or to my boss or to a tech friend.
But how do I explain to the missy why she can use MySQL for free? As concisely as possible?
You see, missy, I subscribe to the belief that software should be free. Free as knowledge is free. Free as in freedom. Free as in mukt. That’s the way software was in the seventies and early eighties. Before IT became a money earner and the big corporations stepped in with patents and licenses. And there is an amazingly large group of people who share my belief. This group is large enough to give me a free operating system, a free web server, a free scripting language, a free database and a lot many more free software.
How does free software work if there is no money involved? Simple - we all help out. By participating in actual development, doing bug reporting, improving documentation, introducing the software to new guys and helping the new guys to get up and running; and in many other ways. Its co-operative. Collaborative. So long as you are willing to help out, to help yourself, to learn - the software and its community is there for you.
But why would anyone make software for free? It is not at all altruistic. Part of it is ego - we make this superb software.
Part of it is simple need. You got an itch? Scratch it!
The creators of Apache needed a good web server. They created Apache. A lot of people found that Apache also served their requirements and pitched in to help the original team. I use it too. Larry Wall wanted a scripting language good enough for his needs. He created Perl. Along with millions of other coders, I find Perl damn indispensable. Rasmus Lerdorf replaced a bunch of Perl scripts (that he used to maintain his website) with a better tool he created - PHP. Hopefully, you will be seeing a lot of PHP code in the comings days, missy!
Then how do companies like Red Hat and MySQL make profits? Why would people pay them if the software is free? They don’t! Selling software like it is a tangible, physical object is history. What people pay for is support. Service. The guarantee that a certified tech will be there to hear out your problems and solve them. If you want to skip out on that and instead depend on the community (like I do for all my free software), then the software is also economically free - muft.
Did I answer your question, missy?
3 responses