Kilg.us – Fantasy Stat Tracker …Tracker

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

Posts Tagged ‘social networking’

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!

Indexing Users

Saturday, April 3rd, 2010

Earlier this Spring I changed the search function for finding friends and creating Industries. The biggest change was moving to a system that uses the Lucene search engine. Part of that engine requires that an index be built for the data to be searched. This was my first implementation of Lucene, so I didn’t have experience with maintaining that index of data. As it turns out, each time the data within the database changes, the index needs to be rebuilt to include all the correct information.

Initially, I wrote a short script to build the index. As more and more people signed-up for Kilg.us, though, the data became out of date because it wasn’t automatically re-indexing.

I have updated the processes for creating an account and changing user settings to display information publicly. Both processes now include a step that re-indexes user data. This should ensure that the user index is always up-to-date and all users with their information shared will be findable in the Find Friends search.

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.

Player Layer and Language

Tuesday, June 23rd, 2009

While clicking through my team stats today on Kilg.us, I noticed that the stats display layer seemed to be out of date. After a little investigation, I found that the XML feed for the stats had not been updated since June 16. A little more digging turned up what looks like a change in the way MLB is storing their data. The format of the data itself seems to be the same, but they moved its home on the server. After updating the path to the data, all seems to be well and cumulative stats are up-to-date again.

In other news, I resolved an issue that yesterday’s IE7 “fixes” introduced. In the mega-drop-down, the new JavaScript set a negative top-margin for IE browsers. Turns out IE8 is enough better than IE7 for this to be a problem. So that method has been updated to only apply the margin to Internet Explorer version 7.

And lastly, some new language throughout the site. The Account Info page now displays an alert message if the User’s profile is set to Public but they don’t have a first or last name defined. Obviously it is difficult to find people in a search if you can’t search on their name(s). The new language encourages the inclusion of a name to help other Users in their searches. The Account Info and Sign-up pages now also have note text added to the password sections indicating that passwords must be at least 6 characters long. Previously the only way to know this would be to enter a password that was too short and try to submit it. At that point an alert would pop-up identifying the shortcoming. Now the User is informed up front.

Kilg.us Joins Twitter

Monday, June 8th, 2009

You can now follow Kilg.us updates on Twitter. You can find Kilg.us at twitter.com/kilgusTracker

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.

Track MLB Teams

Monday, April 6th, 2009

I’ve set up a “Major League Baseball” Owner that owns all 30 major league teams. If you would like to track stats of your favorite team (or any other team, for that matter), I would recommend you add this Owner to your Industry and use his rosters. I’ve written a script to update all the major league teams’ rosters will all the official data from MLB so you don’t need to constantly tweak a team you’ve personally defined.

One draw-back right now: when I pulled all the players onto their teams I found that MLB was publishing data for every player that was in spring training. So most teams have between 80-100 players on their stats pages. I’m looking into ways to fine-tune the rosters so they only show 25-man active rosters, or at least 40-man rosters.

If you would like to add Major League Baseball to your industry, but don’t want all 30 teams exposed to your User, shoot an email to mlb [at] kilg.us with your name/email and the teams you would like to be able to view. I’ll set the permissions for you.

How Industries Work

Sunday, April 5th, 2009

Each User in Kilg.us can create an Industry. An Industry is a collection of other Owners whose teams the User can potentially view and who can potentially view the User’s teams. Industry members cannot edit or change one another’s teams in any way–they can only view them. All team management functionality remains the sole rhealm of the team’s Owner (the User who originally created the team).

To build an Industry, a User must search for other Owners and add them to his/her Industry. Before an Owner is added to another User’s Industry, the Owner must approve the addition.

Once Owners are associated through one-another’s Industries, the Owners can select which of their teams they wish to share with the other Owner. These viewing rights can be changed at any time by the User that owns the team.

All management of a User’s Industry is performed via the Dashboard: searching for and adding Owners, accessing other Owners teams, and changing viewing rights for teams.

Add an Owner to Your Industry

Sunday, April 5th, 2009

To add an owner to your Industry, you must first search for and locate the person you wish to add. On your dashboard is a form labeled “Find Industry Members.” This is the form you will use to locate owners to add to your industry.

The form allows you to search on first and last name, home town and state, email address, and cell phone number. You can enter as much or as little data into each field as you’d like. If you know the email address the person is using with Kilg.us, that will be the most reliable way to find them–Kilg.us requires every user to have a unique email address.

After entering your search criteria, click the “Find Owners” button. This will take you to the Find Owners results page. The Find Owners page lists all Kilg.us users that match your search criteria and have their profiles marked as public. Owners that are already part of your Industry will be grayed out. All the rest will have a plus sign next to their name. Clicking the plus sign will send a request to that Owner to allow you to join industries.

Once the request has been sent, a notification will show up on the other Owner’s dashboard alerting them to your request. If the Owner approves your request, you will be added to one another’s Industries. At that point, both you and the other Owner can select which teams you wish to share.

Select Teams for Industry Members to View

Sunday, April 5th, 2009

Once an Owner has been added to your Industry, you can select which of your teams that Owner can view. This is done using the Team Permissions page.

Access the Team Permissions page for an Owner by clicking on that Owner’s name from your Dashboard in the Industry section. This will bring you to a page that lists all the teams you own, along with “Hide” and “View” radio buttons for each team. To make a team viewable by the industry member, select the View radio button for that team.

Once you have made your selections, click the “Assign View Permissions” button. This will save your team viewing assignments to Kilg.us and reload the page. After the page reloads, you should still see your assignments properly selected.

The next time your industry friend logs-in to Kilg.us, they’ll see your teams (the ones you selected for them to view) on their dashboard.