Kevin Nelson Marshall
Other entries:
« Almost back ...

It seems like I'm always tweaking or tinkering with something trying to get it just right. Today was no exception.

I started with a few little tweaks to Draftwizard.com and BotFu so that both should now correctly allow you to save your log in information in a cookie. The problem that I was having there was just that with the way I have PHP installed on my server, if you set a cookie from within a script the cookie will default to being in existance only for scripts within the same directory as the executing script.

Since I have taken to following what I call the Rails way of organizing directories, I was hitting problems having my cookie set within a 'account' sub directory while many of the games and things that want to use the cookie are in other directories like 'games'. In the end, it's a simple little fix where you can just state to set the cookie for all directories of this domain. Here's the simple code, the last bit "/" being the update I needed to apply:

// code to create a blahblah cookie with value kevin
// this cookie will expire in 7 days
set_cookie('blahblah', "kevin", time()+(60*60*24*7), "/")



After getting that little fix out of the way, I finally got around to doing a little more on the BotFu fight game and got what I consider version .90 ready. I even went so far as to start the first ever BotFu fight with my friend Heath and log the very first move (a perfectly executed REAR NAKED CHOKE).

However, he either has been too busy to fight back or doesn't have enough interest to help me test out the system. So I've been in 'waiting' mode most of the day to see if he responds with a move or not.

If he doesn't fight back soon, I'll have to wipe that fight and try to find someone else to help me test the first version of the fight game.

The next set of tweaks I applied was to my newest pet project, StoryRank.

I started by updating the Ruby indexing scripts to now include the 'description' value so that it's also searchable. This of course also meant updating the Ruby 'update ranking' index script and on the other end of search the actual Ruby script that executes the search. After all of those updates, I also had to update the PHP script that calls the Ruby search script and displays the results.

While doing all of those little search tweaks, I noticed something really interesting. The front end tweaks seem to take me at least twice as long as the code or logic tweaks. Adding in support for the new 'description' feild was pretty easy and quick for me, but getting the search results to display in a format I 'liked' was a process of many iterations. It wasn't hard as it's just playing with HTML, but since I'm not a designer I find myself second guessing my layouts all the time and trying lots of different options before I finally give in to one of the iterations (that I almost always feel is 'good enough for now' but plan to change when I get more time).

Anyway, while I was working on the search update bits, I also went ahead and re-implemented the indexing schedule so that items are now being added to the index once an hour. The ratings themselves are being updated once a day for now. I had turned these off recently as I worked through the blog crash details, so it will be interesting to see if having them back on causes any new problems!

Moving on. Once I finally got those few tweaks out of the way, I decided it was time to tinker with the StoryRank rating widget. So I added in support for changing the font and the font size used on the display side of the widget. Now I just need to document the details on the actual StoryRank web site so people know about the options and can start to use them.

In case you didn't notice from this very blog, I also updated the overall display of the ratings widget by combining the average rank with 'your rank' so that it's all a little more compact. JS-KIT does the same type of thing by default (they let you choose either the compact or the split version -- I'm only supporting one so far but might build out both eventually).

The big difference in their display from mine right now is that I'm still tied to the idea that I want to show you what you've already rated the item (if you have). They also allow you to change a few more display settings than I currently do (like star color and size). Eventually I'll probably allow that sort of thing too, but for now I'm more concerned with the functionality on the other end than I am on the display options for users since that's going to be the real difference between StoryRank and other ranking widgets.

Believe it or not, I also took a little time to build a new StoryRank widget that allows you to get a list of the top rated stories for a given base URL. The basic idea being that you can use it to show a list of your best rated stories (but really you could use it to show a list of any site's best rated stories that have stories rated in StoryRank).

I haven't had a chance to document the widget on StoryRank yet. However I did implement it here on BotFu already (look at the bottom of the sidebar and you should see my top 10 rated stories -- actually it's less than 10 right now because I haven't had 10 stories rated yet.

Since I had just implemented support for font and font size for ranking, I also built in those same features to this new widget (though I just use the defaults on this blog). Since this is a little bit different in functionality it also has a few different options like 'width' and 'stories'.

Eventually I'll document it all on StoryRank, but for now here's the code I'm currently using for my sidebar:

<script type="text/javascript">
var baseurl = "http://blog.botfu.com";
var stories = "10";
</script>
<script type="text/javascript" src="http://www.storyrank.com/top.php"></script>



It's pretty simple really, but I think it's a good start for some nice features down the road.

Since I've rambled on about all this for awhile now I guess I'll cut myself short here now. Besides, I'm getting too distracted watching updates on the Primaries to keep my thoughts flowing well enough to be understood!

posted by Kevin Marshall on 2008-02-05 00:00:00+00


Subscribe to my RSS feed »

BotFu feed with RSS reader

BotFu feed by Email


Search All Posts »


Kevin Marshall - Who's That?

I'm just your basic programmer. I can't spell to save my life, I'm not the greatest story teller, and I often ramble on about nothing. This blog showcases all of that!

If you're bored drop me an email at info at falicon.com or view my outdated resume.


Stalk Kevin on »

bit.ly
Delicious
Digg
Disqus
Facebook
Flickr
FriendFeed
Github
Last.fm
LinkedIn
StumbleUpon
Twitter (@falicon)

Archives by Category »

(28) Code »
(8) ColdFusion »
(15) Database »
(10) Factor »
(3) Falcons »
(321) General »
(13) JavaScript »
(18) Perl »
(17) PHP »
(20) Ruby »

Archives by Month »

(1) September 2010 »
(2) August 2010 »
(3) July 2010 »
(13) June 2010 »
(8) May 2010 »
(2) April 2010 »
(2) March 2010 »
(5) January 2010 »
(2) October 2009 »
(6) August 2009 »
(11) July 2009 »
(2) May 2009 »
(3) April 2009 »
(2) March 2009 »
(7) February 2009 »
(9) January 2009 »
(14) December 2008 »
(5) November 2008 »
(12) October 2008 »
(13) September 2008 »
(16) August 2008 »
(23) July 2008 »
(20) June 2008 »
(24) May 2008 »
(23) April 2008 »
(27) March 2008 »
(28) February 2008 »
(26) January 2008 »
(7) December 2007 »

Published Works »

Beginning Amazon's SimpleDB (Apress in dev.)
Pro Active Record (Apress 2007)
Web Services with Rails (O'Reilly 2006).

Contributed To »

Ruby Cookbook (O'Reilly 2006)
SQL Cookbook (O'Reilly 2005)
Various Reviews published in Computing Reviews

Free Code I've Created »

SimpleDB library in Python 3.0



This blog is powered by KickAssCode.