Tuesday, February 27, 2007

Web CGI idears

I bumped into AT who was building a CGI interface in C++ and complaing over the extra 800k the C++ cgilib adds to each CGI script.

I suggested the idea of doing a Ruby on rails with C. I have two suggestions

1. An XML/HTML document format that mixes HTML with C code like this ( filemycgi.XCGI )


[HTML]
[TITLE] HELLO [/TITLE]
{bODY]
[TABLE]
[% int i ; for( i = 0 ; i < 100 ; i++ ) { !%]
[T-D] [!% printf("%d i"); !%]
[ !% } // NEXT !%]
[/TABLE]
[/HTML]



each CGI would then be run through COMPILER which would take the HTML and embed it as printf()s into a c source code file then pass the C file to gcc with a small library. producing the mycgi.exe or a.out. This way when you run the CGI you get a high speed response and a pre compiled language. Even the CGI source can be removed to make the code work.

The system would come with a number of libaries that would make working with a database and other files work. Possibly even a template re-writing system.

2. Second and slightly diffrent idea.
Have a pre-adaptive system. In essance you set up a watcher that scans the file system/database/time/ to pre-build html files then write them out to disk.

It would work like this. In your watcher file.

Database "urbanist" on localhost with user 'watcher' and password 'bobo' has trigger 'triggerone'
change to table products -> doreformatproducts.watcher ;

Database "urbanist" on localhost with user 'watcher' and password 'bobo' has trigger 'triggerTwo'
change to table users
-> donewuser.watcher < { (select * from users where time > last_time } ;
-> last_time = getimeseconds() ;

file template.css hashchanges -> doformatproducts.watcher ; // this generates producs.html

// touched is any ateration.

file products.html touched -> email( "sheep@mywerbsite.com" , products rechanged ) ;
// backward changes sidebar.html depends upon template
file sidebar.html <-( directory /usr/web/html/www/mysite/folders changes ) dosidebar // generates sidebar.html

file sidebar.html touched -> ssh it to sheep@website.com:password // moves it to website on outside firewall.

change can have multiple dependaces and multiple actions
// time acts like
time every day at 1:00am -> doformatproducts.watcher ; // update products once per day.
time every week -> doformatproducts.watcher ; email("me@myself.com" , "products changed " ) ;

so conceptually a combination of cron,triggers and file updates with make.

Saturday, February 24, 2007

odd proxy thought of the day.

Another couple of times my machine has been hanging to display the page while it gets an image from an avertising server ( hint store them locally guys).

I just had the idea of a local proxy server ( possibly a permachine proxy or local grou better ) this would look for requests or adverts and banners. The concept would be to replace these with calls you make up special banners for you. For example you might find an avert repalced with 'bob you have a meeting in 20mins'. Or info on your disk usage ( 2 years 3 months until hard drive is full or Email from ruth arrived in 10 mins.

I quite like this combined with the RCA products avertsing features for things you already own.
'Want to make you images look older look for sepia in your copy of Photoshop'.

I've already had thoguhts on a local P2P proxy. Everytime you machine asks for an image or static page the UDP request goes out to the local network to see if anyone has it. This way people share cache space with out complex proxys.

Perhaps you could combine this with a web only style suggestions 'you looked at this and you might want to think about that web page that someone else looked at at the same time'.

Finally you could also include the southhampton addtion of suggested links. That is it looks at the content and adds links to enhance the content ( although there should be something that does that statically for all web pages ).

Wednesday, February 21, 2007

Cool idea of the day - Aura.

I was talking to Paul about the marks from Reactable We talked about what would happen if you had a badge or tee shirt with that one. I came up with the idea of a 'magic' mirror. A large TV monitor showing the feed back from a Camera acting like a mirror. The mirror feed back would be augmented by text boxes showing either events or post it notes surrounding you like an Aura. IF there where two people looking in the mirror you could see each others notes but also you would be able to 'give' a note to someone else.

So for example you walk down an corridor and see your self in the mirror as you approach. The Reactable software spots your badge/teeshirt/handbag/tattoo and surround you image with calander reminders. You bump into some one and tell them about this lecture you are going to later. You can wave your hand in the air or touch the screen and use it to drop a copy of the note/meeting into your friend/colleges aura. Then as your friend walks away the note floats away with him.

Definitely something where a large shared public (ish) display would work. Naturally you would have to only leave public notes up on the screen or make them more general.

Friday, February 16, 2007

Programming Languages.

We where talking about M151 - new course indevelopment at the open u. I said I think there are programmers out there that want to keep abreasts about new languages out there. Supose somene says I've been to three interviews and they want t to know If I could program in a language called Flubble* where can I go to learn that ?' What I found intreasting was that three people asked me later on what this Flubble lanauge was... (so I told them I just made it up )

*I just invented this on the spot as an example.

On the subject of languages. things I would like to see in language X


override void mymethodthing( int x | ( x > 0 :"no negative array arguments ") | , Object o | o != null && o.valid() )
{
//being method
}



this would mean that when someone called this method like this
thing. mymethodthing( -3 , this ) ; // this is the calling line.

that is the line | ( x > 0 :"no negative array arguments ") | is an assert sayign the first integer argument is non negative.

there would be a COMPILE TIME error or a RUNTIME error on the calling line ( not the sub routine ). After all the subroutine interface clearly states the limits of the method/function and you have just crossed the line. the problem is with the calling code not the method ( which has clearly stated the assumtions). May be more asserts could be used to augment code generation. More programming concepts later.

Monday, February 12, 2007

Using Ruby on Rails for Web Development on Mac OS X

Using Ruby on Rails for Web Development on Mac OS X I'm always looking for a new language to check out.
I also wanted a language that better integrates a database ( or some kind of shared information store ) and webpages. I was sitting in my office when I heard the Head of Department singing the praises of Ruby on rails saying how quickly you can make interative sites with it. It was a day of meetings today so I only had a chance to scope out the language when I got home. Firstly it is preinstalled on the latest version of the mac OS ( good sign ). It’s the kind of language lisp would have been if someone had defined a reasonable interface for it (closures but generally objects + methods ). I did like the way you can add new methods to pre-existing classes ( loved it in objective C too).

So I might play with it on my work mac when I need to get something webby working on the Mac @ work.

zooming interface - first mulitple person demo.

First demo of the tablet to HCI group.

I think it went pretty well a fair amount of useful input ( try using colour) could you use this to look at large who-knows-who data sets. Could you use the zooming to control unfolding a to-do interface.

I spent most of the morning try to get the demo working but the PC has problems with running the video projector AND the externa VGA big screen. I think we need a second monitor.

The VC is coming to visit in march and it looks like the tablet is on display.

Need to come up with better second screen interface.

Tuesday, February 6, 2007

Where Am I

I have created an online calendar showing where I expect to be here.
WhereAmI I wonder if anyone will have a look.

Monday, February 5, 2007

SIMILE | Timeline

SIMILE | Timeline I was looking to see if anyone had done a kind of wiki time line of history and found this wondeful bit of code. Lovelyinterface nice and slidy.

makes you want to build a personal calendar or something.