Kilg.us – Fantasy Stat Tracker …Tracker

A blog about the development of Kilg.us – The Fantasy Baseball Stat Tracker

Posts Tagged ‘dashboard’

Find Friends

Tuesday, May 11th, 2010

I jumped into the Find Friends section of Kilg.us this evening, planning to update the logic to auto-accept all friend requests to “Major League Baseball” (at present, I manually check the account daily and accept requests). Hitting the page, though, I encountered a Lucene search error, so that derailed my attention.

It looks like the search logic was getting confused when the page was sent an empty query (just clicking the “Find Friends” link rather than using the form on the Dashboard). This wasn’t happening a month or so ago when I set it up, so I’m guessing it has something to do with the size of the index that is being queried now.

Anyway, I updated the code to handle empty queries more gracefully. While testing that, I noticed an issue when requesting Friends that don’t have a name on their profile. When making the request, the prompt would ask if you wanted to request ” ” to be your friend. That isn’t very helpful. I updated that script to pull in the user’s email address if a name isn’t on the profile. Now when you ask someone to be your friend, you will either be prompted with their name or their email address. Much better.

In the process, my JavaScript errored out a couple times. This, unfortunately, means I requested to be friends with a couple people I don’t know. So if you got a random friend request from me, I won’t be offended if you decline!

Welcome to Kilg.us 2010!

Wednesday, March 17th, 2010

Welcome to the new release of Kilg.us  for the 2010 season! Most noticeable is a completely re-vamped visual theme. This theme will be ported over to the Kilg.us Tracker …Tracker in the coming days, but for now it just lives on Kilg.us.

Kilg.us home page

Kilg.us home page

Other 2010 additions include:

  • the industry friends search now utilizes Lucene for search intelligence
  • drag-and-drop players to and from your bench
  • the Zend framework is installed on the server and being used at various places on the site
  • the sign-up and log-in forms have been combined to offer a quicker, easier experience
  • you can select from a series of major league ballpark  images for your background
  • new user accounts default to a “public” state so everyone can find their friends when they sign-up
  • invite as many of your friends at once as you’d like
  • Kilg.us …Tracker updates pulled directly into your Dashboard

Each of these additions will be described in more detail in future posts. For now, please log-in, poke around, and enjoy the new Kilg.us!

As always, if you encounter problems, email me or comment on an appropriate post.

Managing Industries

Wednesday, March 17th, 2010

Kilg.us allows you to form industries with your friends so you can view eachother’s team and track one another’s stats. Here’s how it works.

Enter Your Info

After signing-up for a Kilg.us account, you’ll want to be sure to enter some of your personal information. By default, only your email address will be searchable on Kilg.us. To add more details, click “Manage my Settings” in the utility box at the top-right of any page. This will take you to a page on which you can enter your:

  • name
  • home town
  • home state
  • cell phone number

We recommend you include at least your full name. The other information will just make it that much easier for your friends to find you when they search.

Find Friends

Now that you’ve enter your information, go search for your friends! You can begin your search from your dashboard or by clicking “Find Friends” in your utility box.

In both places you’ll find a single search form in the right column. You can type any criteria into this field that you think might match your friend–his name, email address, phone number, home town, or home state. Kilg.us uses an open-source search engine called Lucene to try to find matches.

If matches are found, they will appear to the left of the search box. Once you find the friend you’re looking for, clicking on his name will start the process of adding him to your industry.

While Lucene is a pretty smart search, it’s not perfect. If your search terms don’t return a match, try changing them up a bit. In general, try to use more than 3 characters in a search and avoid punctuation.

What if you can’t find your friends?

It could be that you can’t find your friend because he isn’t signed-up for Kilg.us. If that might be the case, you can send an invitation! From your dashboard you just need to enter your friend’s name and email address to send an email invitation. In fact, you can invite as many of your friends as you’d like. If you want your whole league to try Kilg.us, invite them all at once!

Confirm Friends

Once you make an industry request, your friend will receive an email notifying them of the request. At that point, they will need to log-in to Kilg.us and accept your request before you can start viewing eachother’s teams.

When you get industry requests from friends, you will receive an email notification and will see an alert on your dashboard. You can accept or decline the request by clicking on the alert message on your dashboard.

Share Your Teams

Once the request is confirmed, you will see your friend in the right column of your dashboard. By clicking on your friend’s name you can select which of your team’s they can view. By default, they won’t get access to any. Keep in mind that sharing your team just allows your friend to view your stats. It doesn’t let them edit your roster in any way.

You can also change which of your friends’ teams show on your dashboard. This is managed through the “Select teams to Display” link in the middle of your dashboard. This page will list all the teams your friends have shared with you. You can pick whether to show or hide each one.

How it Works

Wednesday, March 17th, 2010

Kilg.us makes it simple to track major league baseball stats for your fantasy baseball team–or any other group of players you want to follow!

Step 1. Sign Up

The sign-up process is simple. From the homepage, start entering your desired username in the “user” field. If Kilg.us doesn’t recognize the username you enter, it will expose some additional fields for you to enter and confirm your password and your email address.

Form used to sign up for Kilg.us

Form used to sign up for Kilg.us

If Kilg.us recognizes the username you enter, you’ll need to try a new one–someone else is already the one you tried.

Step 2. Create a Team

After signing up you can create your first team. This couldn’t be easier! Click the “Create Team” link in the utility box at the top-right of your dashboard. This will take you to a page where you enter the name of your new team. That’s it!

We do recommend keeping team names between 3 and 24 characters, but you can enter as many as you need. We also would suggest that you don’t create multiple teams with the same name–it’ll make life harder for you when you are trying to track your stats.

Step 3. Add Players

Once your team is created, you’ll be taken to your team detail page. From there you click the “Add Player” link. This takes you to a page where you can search for players, view their season stats, and add them to your team!

Add Player page with result for a search on "Young"

Add Player page with result for a search on "Young"

You can add as many–or as few–players as you want.

Step 4. Track Stats!

Now you can track stats!

Team page

Team page

A snapshot of your team’s overall statistics will be pulled into your dashboard so you can review all your teams at once. Clicking through to a team page will show you the day’s stats for each player, as well as the team totals.

Scoreboard

Sunday, June 28th, 2009

One of the longest running requests of Kilg.us has been to include game progress information. I can definitely see the value in knowing whether the game your pitcher was pitching in is done yet or not (will there be a win coming or is it all over already?). This is a different kind of statistic than what Kilg.us otherwise collects, so it has been low on the priority list. As I got tired of stored procedures earlier today, though, it finally sounded like an appealing project.

The scoreboard is displayed across the top of the page in the banner area. It displays abbreviated linescores: team, runs, hits, errors, and inning (or “F” if Final). The banner area only has room for 8 scores at a time, so there are left and right arrows to slide the scoreboard side-to-side to view all games.

The first draft of the implementation pulls XML data from MLB each time a page is loaded that displays the scoreboard. Currently the Kilg.us homepage, your Dashboard, and all Team pages include the scoreboard. The data is collected from the XML, looped through, and populated into a list/table combination of mark-up. Some JQuery sets up click events on the arrow buttons when the page loads (if they are needed; if 8 or less games are occuring that day, no arrows will appear) and calculates how far the scoreboard needs to slide to display all games.

I only had time to perform a very quick testing on IE8, Safari, and Chrome (in addition to Firefox, on which all my development occurs) so if you experience any problems with your browser, please let me know.

More development will be ongoing with the scoreboard. I expect I will update the process to store the game scores so Kilg.us doesn’t need to continue pulling in game scores even after all game are done. It will function similar to how player stats are collected. It will first check if the XML feed has been updated. If not, it will pull data from the database. If so, it will update the database and use those stats.

iPhone Optimized Kilg.us Mobile

Tuesday, June 16th, 2009

Finally, after months of development (also known as “inactivity”), Kilg.us now has a mobile-optimized verion: m.kilg.us! Currently Kilg.us Mobile only allows for tracking of stats–no account or team management. With a very simple interface you can log-in, view your dashboard–complete with summary stats for all teams, and track the stats of all your fantasy teams and players.

I currently only have an iPhone, so that is what the site is optimized for. If you have a Pre, Blackberry, or Android phone I would appreciate any feedback and screenshots you can send me of how the site is rendering and performing.

The interface is still undergoing some tweaking, but it is very minor and should not impact the current functionality. After I get a feel for how the mobile version of Kilg.us is performing, I’ll start to plan out the addition of more functionality. I’m not sure if the mobile site will ever be feature-complete, but I expect it will be moving in that direction.

Luckily the object-oriented architecture of Kilg.us made the mobile site painless to implement. I would guess it’s been less than 8 hours in development and most of that time has gone into fine-tuning the interface. Hopefully future additional functionality will be as simple to add!

Industry Emails

Monday, June 1st, 2009

Ever since Industries were added to Kilg.us, you may have noticed a little checkbox on your Account Information page labeled “Notify me by email of industry requests.” At the time, the addition of that checkbox was a preemptive step. As of tonight, it actually does something. When one Owner (requestor) requests an Industry with another Owner (requested), the requested will receive an email notifying them of the request if they have the box checked. The email includes direction and links for the requested to approve or deny the Industry request.

Up next will be an email notice to let a requestor know if their Industry request has been accepted. I expect that will probably find its way in sometime this week.

Drag-and-Drop

Sunday, May 31st, 2009

It is now possible to change the order in which your Kilg.us Industry teams display on your Dashboard and team-selection drop-down menu. Both displays use the same ordering. To change the order, click the “Select teams to Display” link from the “My Industry” section of your dashboard. This will open a page that lists all the teams your Industry friends have exposed for you to view. In addition to selecting to show or hide the teams, you can drag-and-drop to change the order of list. After making all the show/hide and ordering changes, click the “Save Display Selections” button to save your changes.

For a team to be visible on your Dashboard and team-selection drop-down, they must have the “Show” option selected. All teams (whether shown or not) can be re-ordered on the page, but only teams marked to Show will be visible to you elsewhere in Kilg.us.

The new drag-and-drop functionality is done using a JQuery plug-in–TableDnD. It should work across all modern browsers, but if you have any difficulty with it, please let me know.

In other developments, I tweaked the display of the Find Users page to utilize avatars and look more like the Owners list on the Dashboard. Doing so removed the “+” that used to be the activator to request an Owner join your Industry. You can now click anywhere (their avatar, name, email, etc.) on the Owner to make the request. There is still a confirmation dialog before the request is actually make so you won’t accidentally add people you don’t know to your Industry.

I also did some tuning to the logic behind the process of requesting Owners to join your Industry and the acceptance/denial flow thereafter.

Lastly, some style tweaks for all elements that use avatars and contain links. To identify hover-states, those elements will now display a gray border. The style uses the border-radius attributes from CSS3 that Webkit (Safari, Chrome) and Firefox make available. Those of you using less capable browsers (ie, IE) will have to suffer through square corners on your borders.

Housekeeping

Friday, May 29th, 2009

No new features on Kilg.us today, but hopefully the existing features are working a little better.

If you were online tracking your team tonight and had any Rangers or Athletics on your team, you may have noticed some odd behavior. It took a couple hours, but I think double-header stats should all be compiling correctly. I ended up working through a series of iterations over the process of collecting all the stats between games 1 and 2, adding them, and being sure not to collect stats over and over if they haven’t changed.

It was also pointed out this morning that, if a team didn’t have any players on it, errors would be thrown on the Dashboard and Team pages. That issue has been resolved. The issue manifested from an error in the team creation process. A team created with an apostrophe in it’s name would throw an error. The team would not be created and an empty, unusable team would be associated with the Owner. I deleted all those blank teams so if you used to have one on your Dashboard, hopefully it’s gone now. You can now create teams with apostrophes in their names.

Finally, when approving an Industry request, a 404 error (page not found) was reported. Turns out a typo had found it’s way into the path to the script. That has been fixed. I had noticed no new industries in the last couple days, though, so apologies to anyone else who encountered the 404 error in the last couple days.

If you encounter any errors or unexpect behavior while you’re using Kilg.us, please shoot me an email with a description so I can get it fixed up. Thanks to everyone who helped identify the bugs today!

Double Headers and Postponements (and more avatars)

Tuesday, May 26th, 2009

As I noted last week, making Kilg.us handle double-headers and postponements better was a priority for this week. After doing some fun work with avatars yesterday, I dug back into the guts of the app today. Kilg.us now checks for two games worth of stats for each player, each day. There is a particular pattern for the URL to gather a player’s stats, so the stat gathering process now checks for that pattern for both “_1” and “_2” games (games 1 and 2 of a double-header, respectively).

Checking for the second game is handled in the same manner as checking for the first game: first we check if the file exists, then we check if it was updated since we last collected it, then (if the previous two conditions pass) we collect the data. Hopefully this means we won’t see a noticeable slow-down in the performance of Kilg.us gathering stats.

At this point, all I can verify is that the code doesn’t break with the new additions. We’ll have to wait for an actual double-header before we know if the additions actually work or not. I know the Rangers have one on Friday, so I’ll be paying close attention to see how things go. Please be fore-warned, though: if something is wrong with my updates, it will become apparent on Friday. If I notice any peculiarities, I’ll post a note here on the Tracker describing what is happening.

Postponements

Postponements have been another pain-point for some users. In scanning the data coming from MLB, I believe when there is a postponement the data for players involved in the game are removed from the server. If this is true, the recent effort to schedule regular checks on player stats should, theoretically, address this issue. When stats are checked early in the morning, Kilg.us should notice that stats for any player involved in a postponed game are missing and correspondingly clear out that player’s day. This probably will happen before boxscore emails are sent, but likely won’t occur immediately after a postponement is called.

If I am wrong and MLB does not remove the data for players involved in a postponement, I’ll need to add some further logic. The Linescore file for each game notes if there is a postponement, but it is done through a text field so I’ll need to extensively research all the possible terms they could be using (postponed, postponement, cancelled, delayed, delay, etc.) before I can start checking for them. Because that will be significant work, I’m going to put off that effort until I’ve verified whether the previous described mechanism is working. Should it not be, please bear with me.

Avatars

Last night I posted briefly on the addition of avatars for Users and Teams in kilg.us. To elaborate a litte, the avatars are used exclusively on the Dashboard at this point and consist of a pre-defined set of images. My goal with the avatars is to help make Kilg.us more scannable. I think the first step (the dashboard) has been successful. I hope to pull those avatars into other areas of the application where they could be helpful. Activities around finding, approving, and defining permissions for other Owners in Industries are an obvious opportunity.

To implement avatars I added a table (to store the default Kilg.us images) and a couple of columns (to associate avatar filenames with Users and Teams) to the Kilg.us database. This structure will allow me to define avatars that any User can choose from (basically, those you see as options right now) and allow for Users to upload their own avatars without exposing them for other people to use. Until I build-out the file upload and image manipulation mechanisms, the only options for avatars will be those I draw and add. Once those mechanisms are built, you’ll be able to upload your own avatars.

The biggest obstacle to being able to use your own avatars is the image manipulation that will need to be done when files are uploaded. Kilg.us is using two sizes of avatars: 48×48 pixel images for Users/Owners and 32×32 pixel images for Teams. For the sake of consistency, all uploaded images will need to be re-sized to fit the proper dimensions. I think I should be able to handle that with manipulations and masks using ImageMagick. It is not something I’ve done before, though, so I imagine a fair bit of trial-and-error.