Another Stumbling Block.

I have a quite nice front end for the new program and I can do all sorts of good things from the desktop but it's slow and it holds up the computer while it does things, as you would expect.

What I didn't expect is that some things are so slow that they can actually time out and that's a problem for an automated tool.

I examined the potential of Python to be a cgi program and it can, very nicely as it turns out BUT.

I found that I cannot guarantee that the end user will have Python installed on their host computer.  Even if they do there is always the issue of which version is installed.

Back to the search for a cross platform solution which I can almost 100% guarantee will be on whatever hosting platform my potential client is using.

It came down to this...what is WordPress using?  Since this is to be a WordPress tool it does make sense that if I use the same languages that WordPress is using then they must have that installed on their host.

There is still an issue of versions but that can be addressed much more easily from the WordPress forum because they will be having the same issues with their blog installation.

So there you have it.  Python on the desktop and a combination of perl and php on the remote site.  I do have to check for versions and modify the code slightly to accommodate the variations but they are well known and there is lots of help in forums and the main sites for these issues.

Now if only I can get about 3 weeks of totally uninterrupted time to complete this I should have it all done by July.  Can't actually see that uninterrupted time in big enough blocks but I will hammer away at it until it's complete in any case.

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.

The Wonderful World of the Internet.

Also known as the Wild Wild Web.

I migrated the domain to here and the original contents were no longer relevant so I have a blank canvas to fill.

I really have no Idea what I'm going to end with here so I'll probably just rant a bit from time to time.

At the moment I am searching for a new programming language.  Since mostly the  programs I write are for my own personal use and I have no intention of ever doing programming for a boss I have the luxury of using a language I like rather than one the customer or boss wants me to use.

This exploration has, over a period of several years, led me to use RapidQ, XBasic, Euphoria, Adobe Air and several Java type programs.

I can and have used C, assembler, and other assorted monsters.  I really liked using Forth but found programming Windows GUIs an absolute pain in the backside.  Actually that's no different to most of the other languages I have used and that's why I liked RapidQ, XBasic and Euphoria.  They all have the ability to make the GUI interface quickly and easily.

Just add the code to make the buttons do stuff etc.  Adobe Air doesn't have that capability but because I have been building websites for years using PHP, HTML and Javascript I found AIR quite useful.

I was just settling in to creating a tool in AIR when I discovered that Adobe have made a pragmatic decision to not support AIR in old versions of Macs or any version of Linux.

I use Mint Linux so this curtailed my ability to keep my AIR platform current.  Bugger.

For a brief moment I considered moving back to the Windows world, but I got better.

Do you know how hard it is to find a genuine, easy to use, cross platform programming language?

I think I have found one that I can learn to like. REBOL.

I have only been playing with this for a short time, about a week, but it holds significant promise.

I'll let you know how it goes.  I have a couple of programs I want to get written rather quickly.  One I have already written in RapidQ and as a web based application so I know how I want that one to work.  The other I had about 2/3s done in AIR but have abandoned that in favour of doing it with REBOL.

I'll let you know.