Archive for December, 2008

Wandering the wonderful world of CSS and web development

Tuesday, December 30th, 2008

Well, I’ve spent the past three days or so redoing a website design using YUI CSS and jQuery. It’s been quite an adventure. A few things that I’ve learned:

IE 6 is pure hate. IE7.js and IE7.js are life savers, they add the required features to make full (or almost full) CSS usable with IE 6.

It’s easier to start with a blank slate and grab things from the current web page then shoe-horn the current page into YUI CSS.

Javascript based corner rounding is awesome if you’re lazy.

Upgrading a website in stages is the only sane way to do it.

Random Thoughts about algorithms

Tuesday, December 9th, 2008

Genetic Algorithms — selecting for diversity, would it be effective to select specifically for diversity in a genetic algorithm, along with higher fitness?

Spam — disliking non dictionary words. Would it be effective to add information a Bayesian spam filter on whether a word is in the dictionary to determine spamminess?

Intelligent Tutoring Systems

Friday, December 5th, 2008

One of the most difficult things with ITSes is actually getting the knowledge in the correct format so that the ITS can work. What may be a useful or interesting technique is using something akin to the Socratic method on the domain expert. So that the domain expert is asked definitions of things and elaborations so that the knowledge tree can be created.

One difficulty would be figuring out how to do this for more procedurally material and the relationships between topics, not just hierarchal categories or information about what aggregates are made up.

Perhaps creating a having the domain expert create a few scenarios before hand to highlight concepts and operations would also be useful.

Now, the other question is can the pedagagical structure for an ITS be automatically generated from this knowledge tree? Is that task easier to do in any way?

Learning Seminar, Engineering Challenge and Highschool Programming Contest Future

Friday, December 5th, 2008

I’m involved in a lot of Computer Science activities aimed at youngsters (Middle through Highschool). So far, I’ve generally used pre-existing tools with little modification to make them usable for our purposes. But, if I were to make modifications, here are some of the changes that I would make.

Java applet + Jython + RUR-PLE/Corewar

One of the hardest aspects of these activities is grading/judging the projects. If we can automate this part, it will make the effort involved during the activity a lot less.

Here’s the basic idea: The software consists of two arts an applet and a webserver to keep track of scores and allow for collaboration. This would be done through HTTP with Django or some such. The other part is a java applet run on the local system, this would run the actual activity and interact with the user.

The Activity: Robots

The users program ‘robots’ that have to complete tasks with constraints on their behavior. The robots are then automatically scored and end up in a competition ladder. Similar for core war, (perhaps we have a bracketed competition, multiple rounds)?

The robot game could be anything, solve a maze, pick up cookies, paint the floor. They’d probably end up programming it in a subset language (maybe pascal like?) that could have constraints on, for example, the number of instructions, or conditionals, or loops. We may also be able to use a subset of a language (Ruby, Python, Java?) that is in broad use.

Corewar would just be the classic game with a probably simplified assembly instruction set…possibly MIPS?

After a development period (potentially timed), we could display the runs on a big screen showing each person in the bracket.

Integrate an ITS

A Intelligent Tutoring System could be then added to this applet to guide the user through some preliminary projects. This would be a great way to gather observational data as well.

Python eToys -> pytoys

I’ve been thinking about my pyhton eToys clone idea a bit more. Here’s a basic scenario. A user starts off with a  a blank screen, the user then right clicks on the background and then selects the ‘new…’ menu choice. Then brings up a dialog that has the library of premade object such as text, rectangles, circles, buttons,  etc. The user selects a circle and the cursor is turned into a circle ready to be placed the user clicks on the background and the object is placed. After the object is placed the user right clicks on it and a menu pops up, the user selects ‘edit action’ and a special coding dialog shows up, in it is the code:

def action(self):
    |

where | is the cursor in the dialog. The user types self. and a code-completion pop up appears. The user types x and the code completion box does the usual thing and highlights x and contracts the user hits space and continues, writing

def action(self):
    self.x = 50

The user then clicks the “ok” button on the dialog and is brought back to the main screen. There is a button (probably at the top) that is a toggle, currently it is untoggled and says “Run” on it. The user clicks on it and the ball suddenly pops to position x. The user has run out of time, so they click the save button which pops up a dialog that allows them to select the name that they want to save this environment of. If they open that name later on, all the objects and all the code associated with them will be opened again and usable.

One feature I want to integrate is doctests for the little snippets of code that the user writes. This will be somewhat difficult for the individual methods that the user writes…I don’t know how to get around this problem at the moment. (Perhaps run the doctest in a context where the object exists and is bound to the name ’self’?)

Another problem is that pickles don’t support functions or classes, they have to be importable modules. Two solutions to this are just repeating the steps taken patching the  objects on file load (saving the method defining text in the save file) or using something more like the “Lightning Editor” for python, having all the code in a side window and a run button.

It looks like this part at least is less straightforward than I would’ve hoped…A good approach I just realized is saving the text to create the function (doing syntax checks on it live) and then exec’ing it and adding it to the object manually. I think this would cover everything.

Rent a coder for open source software improvement

Monday, December 1st, 2008

Coding Horror had a post today about the various websites that are out there for freelance programmers. It seems to be hit or miss based on whether projects succeed, although smaller projects with details specifications tend to do better.

Two pieces of opensource software that I use a lot, LyX and FreeMind, both lack active spell checkers. Currently LyX has a 2000 Euro bounty for active spell checking. There are preexisting spellcheckers for Java, so it would hopefully be relatively easy to add it to FreeMind. Regardless, I don’t really have the time to do this, so I wonder how effective it would be to try to out source this code to rentacoder or a service like it.