Kilg.us – Fantasy Stat Tracker …Tracker

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

Posts Tagged ‘add player’

Goings-on

Friday, March 26th, 2010

I haven’t posted about any Kilg.us changes for a couple days, but there has been a little going on. In my defense, I started a “Road to the Show” career in MLB 2010 The Show, so I MIGHT have been spending a little more time honing by batting skills than publishing about Kilg.us changes.

On the fixes side, there were some issues around gathering players and adding them to Kilg.us. Those have been revised now, so any player on a 40-man roster should be showing up (and then some). If you don’t see someone that you want on your team, post a comment or let me know.

There is an outstanding issue with rookies, though. I think I’ve narrowed it to the stored procedure that saves player stats, but all rookie pitchers show a blank (no zeros, no stats, completely blank) stat line regardless of their performance. This is next on the list of things to fix.

Next up, when players were being collected from MLB.com, they were added to the official “Major League Baseball” owner’s teams if they didn’t currently exist on the appropriate roster. They weren’t, however, being removed from their previous team if they had been traded or were a free agent (rather than a rookie). This never seemed to come up last year, but there code I changed to fix the problem hasn’t been touched in nearly a year, so I’m not quite sure the root of the problem. Hopefully it is resolved going forward.

On that note, keep in mind that you can follow any MLB team’s stats by adding the owner “Major League Baseball” to your friends. That particular owner has all 30 teams with rosters that are automatically updated to have all the latest players.

Among new features for 2010, there are three more items I hope to get out by opening day (or very shortly thereafter):

  1. Apply the new theme to the …Tracker blog
  2. Implement Lucene for Add Player searches
  3. Create a Season-to-date view of a team’s stats (cumulative for the season, not respective of adds/removals during the year; this was a request from a Strat-o-matic owner–hopefully others will find use in it)

Opening Day is barely a week away!

Add Players to your Team

Wednesday, March 17th, 2010

Players are added and removed individually from each of your teams. Kilg.us doesn’t try to enforce any specific league rules for when players can be added or removed from teams. You can do so at any time.

Find a Player

To find a player to add to your roster, you must first navigate to your team page. Across just below your team’s name there is a series of links including “Add Player”. Clicking this link will take you to the page to search for and add a player.

On the Add Player screen you will see a group of search fields in the right column. As their labels describe, you can search for players based on first name, last name, and position.

Kilg.us doesn’t use Lucene search for player searching yet (it does for friend searching), but this functionality will be added later in 2010.

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

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

All of the search fields you direct string matches. This means they will find sub-strings within longer names, but won’t find variations on the terms you entered. So, a last-name search for “you” will return “Young” and “Youkilis” but not “Lyon”. If your search doesn’t return the player you were expecting, trying using a shorter string of characters.

Review a Player’s Stats

After you have some search results returned, you can check out the stats of the players in the list. Clicking on a player’s name will open a layer that shows the player’s picture, total season stats, and a link to the player’s MLB.com profile page.

Add Player page displaying Michael Young player layer

Add Player page displaying Michael Young player layer

Add a Player

To add a player to your team, click on the green “plus” sign (+) next to his name. This will bring up a prompt to confirm that you wish to add the player to your team. If you accept, the player will be added to your team. This is handled by an AJAX request which means the page won’t need to reload. A new prompt will appear once the player has been added.

You can add as many players to your team as you would like in this session.

Activating your Player

After being added to your team, your new player will be placed on your bench. This means his stats won’t be counted when your team’s stats are calculated. To activate the player, click the gray-bars handle to the left of the player’s name on your team page and drag him above the “Bench” bar. To return him to the bench, just drag and drop him below the “Bench” bar.

Players riding the pine on a Team page

Players riding the pine on a Team page

Remove a Player

If you have added a player to your team accidentally or just want to remove someone, you can do so at any time. On your team page, there is a red “X” icon on the right end of each player’s stat line. Clicking this icon will prompt you to confirm that you wish to remove the player from the team. If you confirm, the page will reload and the player will be removed.

You can always add a player back to your team by using the same process described above for adding a player.

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.

Bits and Pieces

Tuesday, May 12th, 2009

Updates to Kilg.us today:

  • Boxscore emails tomorrow morning should include team statistical totals.
  • Find Industry Members results page now identifies owners with a “pending” status (you can’t re-request an Industry now).
  • Add Players default state is updated so it lists all players instead of pulling in a seemingly random player.
  • Dashboard -> Industry “What’s This” link now opens a modal layer describing Industries and providing a link to the Tracker “social-networking” page instead of linking directly to that page.
  • Create Team and Change Team Name flows now encourage a 3 character minimum team name.

I’ll be out of town most of the next two weeks, so there probably won’t be many–if any–Kilg.us updates until late May.

Various Searching Updates

Sunday, April 26th, 2009

I added and changed some functionality in both of the search flows in Kilg.us: Find Owners and Add Players.

In the Find Owners section, I added a one-click method to add Major League Baseball Teams to your industry. As mentioned previously, the Major League Baseball Teams user was created to house all the 30 MLB teams. The teams include all the players that mlb.com has associated with each of the teams. Currently, this is 80-100 players per team. This week I hope to trim that down to some more manageable roster sizes (25- or 40-man rosters, hopefully).

The Add Players section has received some feedback lately about the confusion when using the Filter Position drop-down. This was expected when I updated the player search behavior a few weeks back (adding in paging). I’ve updated the player search to now accommodate for searches of names and positions simultaneously. Hopefully this will be more logical for new Users. As always, I welcome feedback–let me know if it is working better or worse for you.

Add Multiple Players per Page Load

Tuesday, April 7th, 2009

This evening I tweaked the Add Player page. Players are now added via AJAX, so you can add multiple players to your roster without needing to leave the page and navigate back.

When clicking the plus sign to add a player, you should be prompted with a confirmation dialog requesting that you confirm you wish to add the player to your roster. If you confirm that dialog, an AJAX request is made to add the player to your roster. Once the request has completed, another dialog will appear informing you that the player has been added. You can then proceed to add additional players to your roster.

Once you have finished adding players to your team, you will need to navigate back to the team page in order to see your updated roster and associated stats.

Two Days of Updates

Thursday, April 2nd, 2009

I quit working too late last night to post about the updates, so I’ll cover a couple days’ work now.

The biggest visible change was an update to the top site navigation. Previously, after logging-in, if you visited the home page or Tracker blog, there was no way to return to the system without logging-in again. Obviously, that was inconvenient. The home page and blog now both recognize an authenticated session and will display a new navigation link (that exists throughout the site now) to visit the Dashboard. This will get you back “into” Kilg.us without needing to log-in again.

The other big functional change is on the Add Player page. After receiving a report that adding a player was causing an alert in Firefox, I dug in to see what was happening. Unfortunately the alert was simply a slow script notice, not an actual error. What I ultimately determined was that the cumulative stat bubbles that I added the other day were causing an odd JQuery loop when the page is unloaded. Rather than trying to dig into JQuery to see what the problem was, I determined it could be alleviated by reducing the number of instances of the stat bubbles on the page. So the Add Player page now features pagination! Search results will be displayed 50 at a time with pagination links at the bottom of the page. This leads to quicker load times of the page, as well, so it seems like an improvement all-round.

Complicating the new Add Player pagination is the position filter. That filter literally filters down the players shown on the page, based on position.  All it really does is turn off the display of players that don’t match the filter. So, previously, changing the filter to a specific position would cause a display of all players at that position. Now, changing the filter will only show the players among the currently displayed 50 that match. This seems confusing to me, so I think I will need to re-write how it works.

On a non-visible vein, I’ve incorporated the functionality to allow Users to view other Users’ teams. This is a precursor to the social-stat-tracking concept I’ve been discussing. There is no interface to share your teams with other Users yet–the relationship has to be manually set in the database. There is a new relationship type, though. Originally a team only had one User related to it: the Owner who had total control to do anything with the team they wished. Now there is a Viewer User type. This User type can only view the team. They cannot change the team name, delete the team, add players, remove players, bench players, or change the team’s stats. I’m hoping to waste a good chunk of time this weekend working on social-stat-tracking. With a lot of luck, I’ll have something working by opening day.

On a reality-strikes front: the iPhone web app won’t be ready for opening day. Once life settles down a bit, I’ll try to get back to it later this Spring or Summer.

Add Player Stat Bubbles

Thursday, March 26th, 2009

A few refinement today centered around the live stats bubbles I implemented the other day. On the Team pages, I removed the title attribute from the massive tables on the page. Some browsers render that attribute as a tooltip when mousing over the element. With the introduction of the stat bubbles, this led to a lot more mouse-over, mouse-off, mouse-over actions which caused the tooltips to repeatedly redisplay. Perhaps a minor hit on accessibilty, but well worth it to remove the irritant for most users.
More substantially, I added the stats bubbles to the Add Player page. Now when you are looking for a player to add to your team, you’ll be able to reference his picture and season stats to help ensure you’re selecting the correct player. Throughout Kilg.us now, whenever you click on a player’s name, you’ll always get the same behavior: a stats bubble. Score one for usability!
On a global effort, I added some logic to the stat bubble code for batters to check if they have any at-bats by which to calculate their in-base percentage and slugging percentage. If the player has no at-bats, they will be given values of “.—” instead of the code throughing an error for trying to divide by zero.

Minor Refinements

Monday, March 2nd, 2009

Wow, it’s been a bit since any work was done on Kilg.us. I’ve been distracted with a woodworking project in my free time the last two weeks, so Kilg.us has been on the back burner. Tonight finally saw some revisions, though.

The first, based on some user feedback, was to add a player’s team to the Add a Player page. Although it seems a simple enough task, it actually required through a few hoops be jumped (is that proper English?). First, the data model had to be extended to include Team Names and Abbreviations. Second, the mechanism for collecting player data had to be updated to find the team information. I had that mechanism simply iterating through “player” nodes in the XML, but the team information is actually housed in a parent node, “team”, so that process had to be refined a bit. I haven’t had time to thoroughly test the new team information, but it should be working. Be aware that player information is collected on players who appeared in a given day’s games, so only players who played today will have team information right now. I’ll continue to update the player information the next couple days so we get everyone updated.

The second update this evening was simple house-cleaning I have been meaning to do since day one. On Team pages, players are now listed in a proper baseball positions order, rather than alphabetically by position. So 1B now follows C, CF follows LF, and so forth! Hopefully the stats pages will now look a little less awkward.

A couple upcoming considerations for functionality include being able to select which day’s stats you are viewing on a Team page (instead of just seeing the current day’s) and the ability to share teams amongst Users. Both suggestions came from user feedback. I’m actually thinking about taking the sharing of teams a step further to support a kind of social network allowing Users to create Industries of friendly Owners whose teams they can view and, if allowed, edit. It could definitely be a cool application and allow users to track all the teams in their leagues. But it will take a chunk of time to implement, so it might need to wait until later in the Summer. We’ll see…

How it Works

Tuesday, February 3rd, 2009

Today’s work continued to focus on improving the sign-up process. I included more instructional information in the form of a 4-step flow diagram on the home page which links to a new How it Works page. This new page walks through Signing Up, Creating a Team, Adding Players, Tracking Stats, and Selecting Stats. Hopefully the new thumbnail screenshots will make the application feel more accessible to potential Users and encourage them to join and offer feedback on the tool.

The biggest outcome of today’s work, though, was my renewed realization of how bad I suck at Photoshop. I’ve never been good at computer illustration and it’s painfully obvious. If anyone out there has a graphic thumb and wants to help on Kilg.us, shoot me a line.