More Thoughts on Writing Programs.

Since my last post I successfully wrote one of the programs I mentioned using REBOL.

This is a seriously good language to develop in, particularly for the web as it was designed  as a network capable tool from the beginning.

I invested quite a bit of personal time in learning how to use this.  I am essentially a lazy programmer.  I don't sit down and do all the tutorials, exercises etc. to learn a new language.  No, that'll take too long and I want to do stuff now.

So what I usually do probably means I take longer to become proficient in the language but I feel like I'm making progress much faster - I'm probably not.

I just begin writing the program.  I write it a bit at a time and make sure I have something working before I write more.

For example, if I want to log into a website I'll firstly access the login page and display the source on the screen.  Now I know that is pretty simple but you would be surprised how difficult that can be with some languages.  REBOL was so easy with this that I was amazed. read http://www.brentmilne.com/wp-login.php is all it takes.

Anyway, I had this really nice program working.  Logging into websites, navigating around, filling in forms and submitting them, checking the results, handling errors, creating PDF reports and all manner of wonderful wizz-bang things and all was well in the world of Brent until...

I had done all this in a cgi script and I wanted a desktop front end for it.  I didn't want someone else's branding on the front end and REBOL didn't allow me to change that.

The solution is to write the front end in another language which was also cross-platform and could talk to the cgi script to pass information backwards and forwards.

Did I mention how hard it is to find a genuine cross-platform language which can be compiled to an executable file?

I finally settled on Python.

This is a language that I have been avoiding for years.  No I don't know why, I just have (to misquote Tony Abbott).

Anyway, progress was being made and a front end was built, it talked with the cgi script (written in REBOL) and all was well in the world of Brent until...

I needed to store the core cgi files somewhere - Amazon s3 cloud - and write a small cgi script to authenticate the user and move the files around.  I chose the server this site is hosted on and installed REBOL in the cgi-bin directory and hit an insurmountable brick wall.

This host is 64bit, REBOL is 32bit and never the twain shall meet.  Yes there are ways of getting 32bit programs to run on 64bit machines but specialised software packages need to be installed for that to work and they were not installed by default on the host.

Now I could talk to the host and probably get all this sorted out in time but I want to sell this tool.  I know that my target market for this tool are not geeks or technophiles so asking them to jump through hoops to use this will only result in the loss of customers so that is the real brick wall, not the 64bit thing.

What to do?  Yet again I begin the search for a cross-platform language to re-write this program in.

Did I mention how hard it is to find a genuine cross-platform language which can be compiled to an executable file?

I finally settled on Python.

Which was lucky because I had been using it for a while and was beginning to like it.  There are many similarities between Python and REBOL, much of the syntax is a comparable pattern e.g. print br.open("http://www.brentmilne.com/wp-login.php") will open and print out the login page - look familiar?

The other lucky thing was that I already had a front end written, mostly.

Because I had now had several months of delays I decided to re-write this tool as a purely desktop program rather than the hybrid I had been working on so I began doing just that.

Where am I now?  I have a tool which I am testing.  At this stage it's working pretty well so I have to set up some test sites so I can work it harder to see what bugs rear their ugly little heads for me to chop off.

Nearly ready to share with the Internet world, no one else will care and nor should they.

I think I should be ready inside a month, I'm only three months behind my original target but having to re-write the same program in different languages several times might be some justification for that.

I'll let you know when there is more to share.