One of the web sites I have been working on needed a news ticker, the project manager had mentioned it would be a small task to fit in at the end, everything was being supplied by a 3rd party.
But no, all the 3rd party was suppling was an RSS feed, I had to build the ticker. Sounded easy, just some javascript to get and process the RSS then some string manipulation to get a scrolling ticker.
RSS feeds contain items, each having title,description and link, in the ticker the title would be bold and both the title and the description would be an html link.
This is where things started to get interesting, for a text scrolling ticker you simple show X number of characters, removing one from the beginning and adding one on the end to obtain scrolling effect, but with html you had to preserve not only a emboldened title but the correct anchor link. I had a debug output area that showed the mess of HTML the browser was working with to produce what appears to be a simple scrolling message.
Then I find IE will not allow you to click on the scrolling message (firefox worked fine), so I had to add a system to pause the message when the mouse hovered over it, not a problem, but what was a problem was restarting the scroll when the mouse was removed.
Got that sorted, then someone mentions that the scroll is very jerky what with swapping single characters in and out, so I build a pixel scrolling system that just buffers the whole text by eight pixels to zero before allowing the next character to appear.
Then I find that when the emboldened title is showing the message takes up more space so I have to build in factoring system.
Then I have to build an XML proxy system to allow the local Java script to see the 3rd party's web server and build all sorts of redundancy.
Such a simple idea ended up taking the best part of two days (I had to work on other stuff at the same time).
In lighter news I am planning on installing seti@home and distributed.net clients soon.
|