PHP

Multiple themes, sort of

Oliver Brown
— This upcoming video may not be available to view yet.

To counteract the fact that I’m using Kubrick, the single most common Wordpress theme (by virtue of being the default) I’ve started to develop different themes for different categories. The first I’ve implemented is PHP which now has a different colour scheme and a different header image.

Multiple forms in ASP.NET

Oliver Brown
— This upcoming video may not be available to view yet.

I previously ranted that being unable to have two ASP controlled forms in a single ASP.NET page is a serious flaw. They may be a way round it though. I would assume that ASP.NET can’t output two “smart” forms (the ones with runat="server") on the same page but I’m pretty sure that there is nothing stopping a HTML page itself actually holding two of them. Of course that could be wrong.

Essentially all you have to do is load the extra forms using AJAX and I think everything will work.

(I’m working a on a page (not in ASP.NET) that has a table of data with a status column. Each column needed to have a drop down box letting you change the status. Since the number of statuses is large I decided to have a link that AJAXly changed into the dropdown box and a button when you clicked it. Of course you could click all the links and not submit any of the forms leaving you with a page that actually has a bout 30 forms on it.)

BackBase really pushing AJAX

Oliver Brown
— This upcoming video may not be available to view yet.

BackBase is another AJAX toolkit. This one is different though. It’s not really an AJAX toolkit, more a toolkit powered by JavaScript taking advantage of AJAX.

The clue is the price. Yes it has a price - $2000 to be exact. There is a “community edition” that is free for personal use though. Anyway, I don’t have time to run down all the features but basically it defines a whole new bunch of tags allowing you to create complicated content in a declarative HTML style way. These tags are then translated into proper XHTML on the fly by the back end JavaScript engine. Since the clever work is actually handled by the browser, you’re free to use whatever you like on the server (PHP, Ruby) including static HTML pages - outputting BXML is no different to outputting HTML. In fact BXML has a very ASP.NET feel to it and embedding BXML into an XHTML page along with ASP content could have the ultimate cleanness about it (syntax isn’t one of my complaints about ASP.NET).

It should be noted that Microsoft are working on Atlas which could be something very similar but I haven’t looked into it… It all seems very clever.

Language learning ideas - bringing it all together

Oliver Brown
— This upcoming video may not be available to view yet.

This post, like many of my others on the topic ramble a bit. You have been warned :P

Any regular readers I might have will know how much I like Pimsleur products for learning experience. I believe the basic idea can be greatly enhanced with computers. I did in fact try a short time ago but suffered from a lack of voice talent which is where speech synthesis could be useful.

Synthesised voices can be imported into the current system (which at the moment I wouldn’t be able to demonstrate since the voices need to be licensed if they are to be distributed) just by recording them to audio. This solution would allow maximum support since any browser with audio capabilities could use the system.

There is an advantage to using the IE plugin though (or any other system supporting SALT) - speech recognition. It should be entirely possible to actually have a browser based system that checks your pronunciation which would instantly make it better than any system out there.

Quite why none of the companies that create these synthetic voices have tried to develop a system like this I don’t know…

More stable server

Oliver Brown
— This upcoming video may not be available to view yet.

The server should now be up far more often.

I can’t work out why MySQL and/or Apache keep crashing so often so as an interim solution I’ve just written a PHP script that is run by the cron daemon that checks each if they are running as they should and restarts them if they’re not. Hopefully this means if the server is down it shouldn’t be for more than an hour.

Another interview

Oliver Brown
— This upcoming video may not be available to view yet.

Just as an update, the interview I had before had an odd outcome. It was a success but they didn’t have a position for me. In the meantime I got another interview with somewhere else.

Within three hours of the end of the interview I got an email offering me the job :D

It gets better: the following morning (less than 24 hours later) the original place call me and offer me that job too :D I took the second one.

Galaxia Ruby

Oliver Brown
— This upcoming video may not be available to view yet.

Okay, Galaxia on Rails would my be a more apt name for a version of Galaxia in Ruby on Rails. But Galaxia Ruby sounds better to non-programmers.

This follows the tradition I’ve been recently following of learning new languages by writing bits of Galaxia in them. There is a real possibility I might get a version out this time :P

This version may even have AJAXy goodness and things. But don’t hold your breath…

Books galore

Oliver Brown
— This upcoming video may not be available to view yet.

The advantage of having an imminent interview (and ultimately of having a job) is I can buy computer books without worrying so much about not having much money. They’re an investment you see…

I have an interview

Oliver Brown
— This upcoming video may not be available to view yet.

Woohoo, I have an interview.

Before they offered me a face-to-face interview they wanted to do a telephone interview first. This consisted of a series of technical questions I really wasn’t prepared for (“What’s the difference between an inner join and an outer join in SQL?”, “What are the restrictions on cookies?”, “What do the HTTP status codes 302 and 303 mean?”).

But since they offered me the interview I guess I did quite well :)

(On an unrelated note, “Woohoo” is not in the Google spellchecker database but “Whoop” is….)

jobs, interviews, web developer, PHP developer

Wordpress.com Themes

Oliver Brown
— This upcoming video may not be available to view yet.

For those of you who don’t know, Wordpress.com is a Blogger type service run by the creators of Wordpress based on Wordpress.

I have to warn you I have no experience using Wordpress.com, and these comments are based on what I’ve heard.

There have a been comments about how theme support in Wordpress.com is very limited since they obviously can’t let people run arbitrary PHP code. I’m not sure what they do let you do but there is a way that will give almost the power of normal Wordpress templates.

I got the idea from Wordpress referring to it’s template markup as tags (since they’re enclosed in <?php ... ?>). Why not actually use XML tags that correspond to the Wordpress functions? These simpler themes could be transformed into real themes for Wordpress that the user never sees. If they were parsed with regular expressions and went through a callback they could be vetted so only real Wordpress functions are let through. Although it would have to be done carefully for security, it should be fairly straightforward.

So for instance, instead of <?php the_author() ?> you’d have <wp:the_author />.