Traffic Stats and Google Chrome

posted on 10/02/08 at 12:36:38 am by Joel Ross

Now that Google's new browser, Chrome, has been released for a month, I figured I'd take a look at my blog's statistics to see how it's affected overall browser stats. Even though it's only been a month, a few things jump out as interesting to me.

First, in the past month, over 7.5% of my traffic is now using Chrome. That's a pretty good number considering they are just getting into the browser business. If you could pick a market, and gain a 7.5% share in less than a month, you'd be crazy not to! But where is the market share coming from? Well, for me, Firefox is down 4% and IE is down over 5%! I find it surprising that a lot of the gain comes at the expense of IE. I guess IE users are looking for alternatives, but it's surprising that they haven't gone to Firefox.

So IE and Firefox dropped a total of 9%, but Chrome is only at 7.5%. Where did the rest go? Opera! My Opera traffic is up 50% - yeah, the percentage is still small, but that's a pretty big increase for a browser that's been around for a long time. I guess having a new browser show up helps people renew their interest in other browsers.

After doing the analysis against my blog, I decided to take a look at the stats for a more mainstream site - or rather a set of sites. I took a look at the Develomatic suite of sites: Tourneytopia, MyPlayoffs.com, Tourney Logic, and Pay It Square. My guess was that my traffic is a bit different, since it's a more technical audience. During the time when Chrome was released, we were running a US Open tennis tournament for The Tennis Channel on Tourneytopia, so the traffic was pretty good there, and definitely a different audience than my blog. What did I see? Well, Chrome visitors comprised less than 0.5% of traffic! Also, IE is still king (whereas Firefox is now my blog's number one browser) and Safari gets about double the amount of usage as on my blog.

So while Google Chrome seems to be taking hold in the geek world, it definitely has not caught fire in the mainstream world. I guess they're just behind the curve!

Tags: | | |

Categories: General


 

NFL Picks: 08-09 Week 3 Results and Week 4 Picks

posted on 09/25/08 at 08:00:00 pm by Joel Ross

The long national nightmare is over! Ok, so it wasn't national. It was mainly centered in Michigan. Either way, Matt Millen has been fired! Now, the question is who will be the replacement? And how long will it take to undo what Millen did? Anyway, on to last week's results.

  • Kansas City 14, Atlanta 38 (-5.5) (36.5 O/U)
  • Oakland 23, Buffalo 24 (-9.5) (36.5 O/U)
  • Tampa Bay 27, Chicago 24 (-3) (35.5 O/U)
  • Carolina 10, Minnesota 20 (-3.5) (37.5 O/U)
  • Miami* 38, New England 13 (-12.5) (36 O/U): Whoops! Maybe Belichick found the one position that he can't just plug anyone in.
  • Cincinnati* 23, New York Giants 26 (-13) (41.5 O/U)
  • Houston 12, Tennessee 31 (-5) (39 O/U):
  • Arizona 17, Washington 24 (-3) (42.5 O/U)
  • New Orleans 32, Denver 34 (-5.5) (51 O/U)
  • Detroit 13, San Francisco 31 (-4) (46.5 O/U): So Detroit's improving. They were only down 21-3 at half time, rather than the 21-0 of the last week. Of course, they didn't quite mount the comeback they did the week before either. Oh yeah - I heard that while everyone else went home for the bye week (yay! No loss this week!), Drew Stanton stuck around. Could Kitna be the first Millen aftershock victim?
  • St. Louis* 13, Seattle 37 (-9.5) (43.5 O/U)
  • Cleveland 10, Baltimore 28 (-2) (38.5 O/U)
  • Jacksonville 23, Indianapolis 21 (-5) (41.5 O/U)
  • Pittsburgh 6, Philadelphia 15 (-3.5) (44.5 O/U)
  • Dallas 27 (-3), Green Bay 16 (51.5 O/U)
  • New York Jets* 29, San Diego 48 (-9) (44 O/U): This was a good game. It's just too bad neither team brought their defensive squads with them. 77 combined points? San Diego hit the over/under by themselves!

Results Summary

  • Picks (this week / season): 11 - 5 / 29 - 18
  • Spread (this week / season ): 8 - 8 / 23 - 23
  • Over/Under (this week / season): 11 - 5 / 24 - 22

Overall, I'm not doing too bad with my picks. However, with the way payouts work, I'd still be down overall. You have to do seriously well with picks to make any money - something in the neighborhood of 70% correct with picks. I'm not quite there! Anyway, here's next weeks picks.

  • Atlanta vs. Carolina (-7) (39.5 O/U)
  • Cleveland vs. Cincinnati (-3.5) (44.5 O/U): Is it too early to call this game meaningless? I mean, to the people of Ohio, I'm sure it's a vital game, but will a win (or loss) have any playoff implications down the line? Label me skeptical.
  • Houston vs. Jacksonville (-7.5) (42 O/U)
  • Denver (-9.5) vs. Kansas City* (46.5 O/U): Denver could be a dominant team - if they had a defense anywhere as good as their offense.
  • San Francisco vs. New Orleans (-5.5) (48 O/U)
  • Arizona vs. New York Jets (-1.5) (45 O/U)
  • Green Bay vs. Tampa Bay (-1) (42.5 O/U)
  • Minnesota vs. Tennessee (-3) (36 O/U): Picking Tennessee worked out well last week. We'll try it again (plus it keeps James off my back!).
  • San Diego (-7.5) vs. Oakland (45.5 O/U)
  • Buffalo (-8) vs. St. Louis (42 O/U)
  • Washington* vs. Dallas (-11) (46 O/U)
  • Philadelphia (-3) vs. Chicago (41 O/U)
  • Baltimore vs. Pittsburgh (-6.5) (34.5 O/U)

Check back next week for results, and a new set of picks.

Tags: | |

Categories: Football


 

Building Your Idea Through Angel Investing

posted on 09/23/08 at 08:00:00 pm by Joel Ross

At the last GR Tech Lunch, we had Bill Klevin as our guest speaker. Bill runs DaVinci Capital, a small company in Grand Rapids focused on helping entrepreneurs secure funding to build their business. He mainly deals with Angel investors, particularly the Grand Angels. Well, at least until October, when he's moving to Wyoming and DaVinci will be closing their doors.

We had a pretty good turn out, and Bill did a great job of capturing everyone's attention in the room - so much so that he didn't get an opportunity to even eat his lunch. We kept him there for the majority of the hour and a half, and he did a great job explaining the process you'd go through and answering everyone's questions.

He laid out three things that are key to have before you even consider getting angel funding:

  • Solid management and domain expertise: When you're looking for angel funding, the most common reason is that your company isn't able to get traditional bank funding. You don't have historical company performance to go on. When you talk to angel investors, you're essentially selling yourself and your team. Being able to demonstrate that you have the right people in place will go a long way with investors.
  • 3 or 4 reference customers: The investors you talk to are going to be smart - they didn't get money by having no business sense. For the most part, they'll be able to tell if you have a realistic business plan or if you're just pretending. But there's one group who can tell if you have a solid business better than the investors can: customers. If customers are willing to pay money for what you're providing - especially a customer worth referencing - then you're much better off.
  • An exit strategy: This was one of the things I found most interesting. Angel investors will usually get less than 50% stake in the company - meaning that they will not have a majority interest, and thus, won't have a majority vote in the direction of the company. So before they put their money in your hands, they want to ensure that you're going to give them an out. Most angel investors are looking for a 3-5 year commitment, and then they want out. So what does out mean? Well, you have the option to buy them out, but that's not really easy to do - you want to put that money back into the company, not in investors' hands. Bank loan? Same situation. A bank won't give you money that's not going to be reinvested into the company. That doesn't make sense for them. Going public? Sure, that's an option, but highly unlikely to actually happen. So what are angel investors looking for? Well, they want to know who you're going to sell to! Ok, so not exactly who you will sell to, but they want an idea of the possibilities, because that's their best out.

Then he talked about the process to actually get in front of Angel investors, and what will happen after you get funding. There's a lot of up-front work to ensure that your business plan is solid, that you have good documentation of your company and it's predicted growth, and that you have a solid plan for how you will use the money. That process will take 6-8 weeks. Then you get in front of the investors for your presentation - where you get 15-20 minutes to pitch your idea. Then they'll either send you packing, or do further investigation.

Having gone through the process, I found one particular detail interesting that I didn't realize before: you wouldn't get funding from the group - it would be from just a handful of people that found your idea to be interesting. And in a lot of cases, you might end up getting funding from multiple angel investment groups. If you're looking for $1,500,000, you might get $50,000 from a few people, $100,000 from a few more, and it will slowly add up until you get the amount you need. That process usually takes another 6-8 weeks, so you're looking at about 3-4 months from the time you start to the time you have money. And once you have the money, you'll also put together a Board, where you'll update your investors on the current status, as well as have a sounding board to give you advice when you need it. The Board will usually consist of four or five people, so it probably won't include all of your investors. The good part of that is that you can lean on board members to give you advice and/or contacts when you need them.

Anyway, the lunch and information was great. I really enjoyed listening to Bill talk, and will be sad to see him leave the area. If you're in the Grand Rapids area, you should definitely come out for the next one! First Monday of every month.

Tags: |

Categories: General


 

So, What is Duck Typing?

posted on 09/21/08 at 09:19:28 pm by Joel Ross

I recently had a discussion with someone about duck typing, and my understanding of it was called into question. He's much smarter than I am, so I assumed he was right, but afterwards, I decided to do a little digging. I think I was right, but there's not a ton of information out there, so I'm going to lay out what I think Duck Typing is, and let you poke holes in it, and tell me where I'm wrong.

First, though, let's lay out the definition of Duck Typing. From the Wikipedia article:

duck typing is a style of dynamic typing in which an object's current set of methods and properties determines the valid semantics, rather than its inheritance from a particular class.

Or, as James Whitcomb Riley put it:

If it walks like a duck and quacks like a duck, I would call it a duck.

So what does that mean? From my understanding, it meant that as long as I pass something into a method and it supports the interface the method expects, than it'll work. For example, let's say I have the following method:

   1:  public void SendEmail(SmtpMailer mailer, string subject, string body)
   2:  {
   3:    mailer.SendMessage(subject, body);
   4:  }

This method relies on a concrete class - SmtpMailer. But what if I wanted to pass in a different class to this method? Well, the normal way to do this would be to create an interface, have SmtpMailer implement that interface, and change this method to work against an interface rather than a concrete implementation. But there's two potential downfalls of that approach. First, what if you don't have access to change the SmtpMailer class? You can't just add an interface to it, so the solution is the same, except you'd have to create an implementation of IMailer that adapts the SmtpMailer class to IMailer (a good design decision anyway). But what if this method isn't accessible for change? Then what? You could inherit from SmtpMailer and override the SendMail method, and pass in that class instead. And if both are inaccessible to you? Well, then you've got a lot of work to do to break this code apart.

All of that requires a lot of code to work around the issue. But with (my understanding of) duck typing, it's simple and requires no code changes to SendMail or the SmtpMailer class. All I have to do is have a class that satisfies the requirements of the SendEmail method. In other words, I can pass any class into this method, as long as it has a method called SendMessage that takes two strings as parameters. So, this would work:

   1:  public class InstantMessage
   2:  {
   3:    public void SendMessage(string subject, string body)
   4:    {
   5:      // Send subject and body via Instant Message
   6:    }
   7:  }

Now, my background is almost completely in statically typed languages, so to me, this is a pretty big paradigm shift. Maybe for those who are used to working in a dynamic language (like Ruby) on a regular basis, it's not that big of a deal. To me, it seems like a good way to deal with those tough-to-break dependencies.

Now, when I described the above as Duck Typing, I was told that wasn't actually what duck typing was. Here's how it was described to me. Essentially, a variable can change types based on the way it's assigned - like what JavaScript provides. You can declare a variable and use it like so:

   1:  var x = new Array();
   2:   
   3:  x[0] = "One";
   4:  x[1] = "two";
   5:  x[2] = "three";
   6:   
   7:  alert(x.length);

Calling length on x returns 3 - the length of the array. Because x is being used as an array, that's how the method responds. But since Javascript is dynamically typed, I can later repurpose x:

   1:  x = x.join("");
   2:  alert(x.length);

In this case, x (the same variable) acts like a string after the join call, so length will return 11 (the length of the joined string).

If the latter is actually duck typing, than there's no difference between duck typing and dynamic typing. But I don't think that's the case. What I've found seems to support what I'm saying, but I've also seen conflicting definitions. So I'm turning to people smarter than me to tell me what duck typing really is - you!

Tags: | |

Categories: Development


 

NFL Picks: 08-09 Week 2 Results and Week 3 Picks

posted on 09/18/08 at 08:00:00 pm by Joel Ross

During the pre-season, I wondered if the Packers were making the right decision about Favre. Yeah, long term, they knew it was time to move on, but short term, would they be better off with Favre this year, given that Aaron Rodgers has never started an NFL game? Well, if the first two games are any indication, Green Bay should be fine - both short term and long term!

Anyway, onto results. There's a new color this week - blue means the game was a push for the spread. And a game is missing, since the Ravens / Texans game was rescheduled for November.

  • Chicago 17, Carolina 20 (-3) (37 O/U)
  • Tennessee 24, Cincinnati 7 (-1) (37.5 O/U)
  • Green Bay 48 (-3), Detroit 25 (44.5 O/U): Detroit put up a heroic effort, coming back from being down huge at half time to take a 25-24 lead in the 4th quarter. Green Bay comes back, and kicks a field goal. Then, Kitna takes over! 2 interceptions later (including one returned for a TD), and the Lions are back to less than heroic. Good times!
  • Buffalo 20, Jacksonville 16 (-5.5) (37 O/U)
  • Oakland 23, Kansas City 8 (-3.5) (36 O/U)
  • Indianapolis 18 (-2.5), Minnesota 15 (43.5 O/U): I'm shocked that Indy is struggling like they are. I thought Manning would be able to comfortably be the best QB in the league with Brady out, but that hasn't been the case at all.
  • New York Giants 41 (-8.5), St. Louis* 13 (41.5 O/U)
  • New Orleans 24, Washington 29 (0) (42 O/U)
  • San Francisco 33, Seattle 30 (-7) (38 O/U)
  • Atlanta* 9, Tampa Bay 24 (-8) (38 O/U)
  • Miami 10, Arizona 31 (-6.5) (39 O/U)
  • San Diego 38 (-1.5), Denver 39 (45.5 O/U): The refs cost the Chargers the game, but it's hard to complain too much when you give up 39 points. Want to insulate yourself from dumb calls? Give yourself some buffer!
  • New England 19, New York Jets 10 (-1.5) (37 O/U)
  • Pittsburgh 10 (-6), Cleveland 6 (44.5 O/U)
  • Philadelphia 37, Dallas 41 (-7) (47 O/U): This was quite the game! Probably the best MNF game I've seen in a LONG time. Back and forth, with Philly losing out. I'm bitter about this one too - there were two instances of receivers either getting stopped at the goal line or, umm, throwing the ball away at the goal line (Leon Lett, anyone?). Had those converted, I would have won my fantasy game this week!

Results Summary

  • Picks (this week / season): 9 - 6 (60.00%) / 18 - 13 (58.06%)
  • Spread (this week / season): 5 - 9 (35.71%) / 15 - 15 (50.00%)
  • Over/Under (this week / season): 6 - 8 (42.86%) / 13 - 17 (43.33%)

As usual, I'm doing decent at picking games, while doing poorly against the spread and over / under. Oh well. Anyway, onto next week's games.

  • Kansas City vs. Atlanta (-5.5) (36.5 O/U)
  • Oakland vs. Buffalo (-9.5) (36.5 O/U)
  • Tampa Bay vs. Chicago (-3) (35.5 O/U)
  • Carolina vs. Minnesota (-3.5) (37.5 O/U)
  • Miami* vs. New England (-12.5) (36 O/U): New England is back up to being +10 point favorites. Maybe it's because it's Miami. We'll see if it sticks, but for now, I'm not convinced.
  • Cincinnati* vs. New York Giants (-13) (41.5 O/U)
  • Houston vs. Tennessee (-5) (39 O/U): I've caught flack for the past two weeks picking against the Titans (and I was ultimately wrong), so this week, I'll pick them, ensuring they will lose.
  • Arizona vs. Washington (-3) (42.5 O/U)
  • New Orleans vs. Denver (-5.5) (51 O/U)
  • Detroit vs. San Francisco (-4) (46.5 O/U)
  • St. Louis* vs. Seattle (-9.5) (43.5 O/U)
  • Cleveland vs. Baltimore (-2) (38.5 O/U)
  • Jacksonville vs. Indianapolis (-5) (41.5 O/U)
  • Pittsburgh vs. Philadelphia (-3.5) (44.5 O/U)
  • Dallas (-3) vs. Green Bay (51.5 O/U)
  • New York Jets* vs. San Diego (-9) (44 O/U)

Check back next week for the results and new picks.

Tags: | |

Categories: Football


 

CauseCast

posted on 09/11/08 at 08:00:00 pm by Joel Ross

The other night, I got an email from my cousin. We don't communicate as much as we probably should (my fault), but she will periodically send out emails talking about milestones in her life. That evening, it was about her latest project that launched that day: CauseCast.

What caught my interest was the fact that it's launch was planned around their presentation at the TechCrunch50. TechCrunch50 is a Silicon Valley conference aimed at looking at start-ups and helping them launch. While CauseCast didn't win, it's still a pretty cool honor to even be selected to present at the conference.

I honestly don't know much about CauseCast, as I hadn't even heard of it until I got the email. But it does sound like a cool idea - their idea is to highlight 10 non-profit companies a month, pairing them up with a figure of some sort to help with their cause. And since this is a Web 2.0 world, there's a social networking side thrown in as well.

Anyway, it's always cool to see what others are working on - especially when it's someone in your family. Shortly after this whole thing came about, I found out my cousin is also on Twitter, and since I'm a huge Twitter fan, maybe I'll actually be able to stay in touch now!

Tags: |

Categories: Software


 

NFL Picks: 08-09 Week 1 Results and Week 2 Picks

posted on 09/10/08 at 10:23:00 pm by Joel Ross

What a first week! Every year, it seems like at least one major player goes down and is either out for an extended period before returning, or is done for the year. This year, obviously, is no different. And the effects are eye opening. With Tom Brady done for the year, the Patriots go from a team who was routinely favored by 10+ points last year, to a team who's the underdog in week two - to the Jets no less!

Anyway, this year, rather than doing a results post and a picks post, I'm going to combine them into one. I'll start with my picks for the next week, and follow it up with results. So, with that, here's my picks for the week.

  • Chicago vs. Carolina (-3) (37 O/U)
  • Tennessee vs. Cincinnati (-1) (37.5 O/U)
  • Green Bay (-3) vs. Detroit (44.5 O/U)
  • Buffalo vs. Jacksonville (-5.5) (37 O/U)
  • Oakland vs. Kansas City (-3.5) (36 O/U)
  • Indianapolis (-2.5) vs. Minnesota (43.5 O/U)
  • New York Giants (-8.5) vs. St. Louis* (41.5 O/U)
  • New Orleans vs. Washington (0) (42 O/U)
  • San Francisco vs. Seattle (-7) (38 O/U)
  • Atlanta* vs. Tampa Bay (-8) (38 O/U)
  • Miami vs. Arizona (-6.5) (39 O/U)
  • San Diego (-1.5) vs. Denver (45.5 O/U)
  • Baltimore vs. Houston (-4.5) (37.5 O/U): Frankly, I'm surprised that Houston is this big of a favorite.
  • New England vs. New York Jets (-1.5) (37 O/U): I've already touched on this game, but it's still a little hard to believe that the Jets now have the best QB in the division.
  • Pittsburgh (-6) vs. Cleveland (44.5 O/U)
  • Philadelphia vs. Dallas (-7) (47 O/U)

Results had been a little complicated in the past, so I decided to simplify what I post a bit. Green indicates a correct pick. Red is wrong. My original pick is bold and * still indicates a cover of the spread, but an ultimate loss. At the bottom is a summary of how I did. I'm still tracking everything I tracked before, so I know how much money I would have won or lost if I actually bet, but there's not a whole lot of need to post that, I don't think.

  • Washington 6, New York Giants 17 (-3.5) (41 O/U)
  • Detroit 21 (-3), Atlanta 34 (41 O/U)
  • Cincinnati 10 (-1.5), Baltimore 17 (39 O/U)
  • Seattle 10, Buffalo 34 (0) (39 O/U)
  • New York Jets 20 (-3), Miami 14 (36 O/U)
  • Kansas City* 10, New England 17 (-16.5) (46 O/U)
  • Tampa Bay 20, New Orleans 24 (-3.5) (42.5 O/U)
  • St. Louis 3, Philadelphia 38 (-7.5) (44 O/U)
  • Houston 17, Pittsburgh 38 (-6.5) (43.5 O/U)
  • Jacksonville 10 (-3), Tennessee 17 (37 O/U)
  • Dallas 28 (-4.5), Cleveland 10 (49 O/U)
  • Carolina* 26, San Diego 24 (-9.5) (43 O/U)
  • Arizona 23 (-2.5), San Francisco 13 (41.5 O/U)
  • Chicago 29, Indianapolis 13 (-9.5) (44 O/U)
  • Minnesota 19, Green Bay 24 (-2.5) (38.5 O/U)
  • Denver 41 (-3), Oakland 14 (41.5 O/U)

Results Summary

  • Picks: 9 - 7 (56.25%) 
  • Spread: 10 - 6 (62.50%)
  • Over/Under: 7 - 9 (43.75%)

Check back next week for the results and another round of picks.

Tags: | |

Categories: Football


 

Moving into the Cloud

posted on 09/09/08 at 01:17:54 am by Joel Ross

I often wonder how much I rely on my laptop. And I'm not referring to development, but for the other things I do - email, twitter, IM, IRC, and RSS feeds. Or put another way, how much of a performance hit am I taking by running those things locally? My laptop has 3.325 GB of RAM (don't ask! I'm still bitter). After a normal day of usage, here's the memory usage of some of my "utility" applications:

  • Outlook: 374 MB
  • FeedDemon: 202 MB
  • Trillian: 51 MB
  • Twhirl: 104 MB

That's a total of 731 MB. In fairness, that includes paged memory, but still, that's a fair amount of memory. I did have to reboot today - I know Outlook and FeedDemon can get much higher than that when they've been running for a few days. So I started to see if I could move my utilities online - run them in a browser rather than a stand-alone client. There's no point in talking about twitter or the other social networking sites - those are pretty obvious, since they started online and it's only out of convenience that you move them offline. But even for the rest, it's not that hard to do, if you know the right tools.

Email

Email is probably the easiest one to move online - people have been doing online email forever. Email is inherently online. There are lots of options - for personal email, at least. I use Google Apps For Your Domain, and have been very happy with that decision since I switched. The more and more I use the Gmail interface, the more I like it - the keyboard shortcuts are intuitive and despite it being a web application, it actually responds quicker than Outlook sometimes. There are plenty of other online email systems out there - Yahoo and Live Mail are the two other large players I can think of right now, but pretty much every ISP and web host will provide some sort of online interface.

The challenging accounts to get online are the corporate ones. Luckily for me, RCM (and NuSoft before them) offers Outlook Web Access, so that was an easy one. For companies that don't offer an online interface, I'm not sure how you could handle it - I would NOT recommend blindly forwarding all email through another online account, such as Gmail, though.

IM / IRC

I've used Trillian since the days of the "IM Wars" - back when AIM would update their protocols on an almost daily basis, and Trillian would hurry to push out an update shortly afterwards. That was back in 2001, I think. I use it for instant messaging on MSN, AIM, Yahoo, Jabber (well, GTalk, actually), and RCM's LCS server.

Again, the easy part of moving these online are the large, public services. Meebo can handle ICQ, MSN, AIM, Yahoo,  Jabber and GTalk, so I'm set there. Meebo's interface is actually pretty good, and you can create an overall account that allows you to store preferences about your IM experience, as well as your different IM accounts. There's even a firefox add-in to show toast whenever you get an IM.

I also use Trillian to connect to IRC channels, and luckily, there's a solid web replacement for that as well. I first heard about Mibbit as a way to get around corporate firewalls that block the ports needed by IRC, but it's also a solid IRC client, even when you have the option of a desktop client. It's a lot like Meebo, in that you can create an account and store the different servers / rooms you access so you don't have to enter them every time.

About the only thing I think I'd miss by moving IM / IRC online is the logs - Trillian logs everything for me, so I can go back later and review. I'm not sure I could get that if I'm using an online system. That would prevent having discussions like this available for future reference.

RSS Feeds

I have never really liked the options for reading feeds online. I started with RSS feeds in RSS Bandit, moved to Newsgator Inbox, and eventually settled on FeedDemon. But I know I'm probably in the minority. Just based off of my FeedBurner stats more than 50% of my subscribers are reading this in a web browser - possibly even 75%. Google Reader and Bloglines are the two most popular options, but Newsgator also offers a decent online offering as well - and it integrates read status with FeedDemon.

So Now What?

I went through this exercise, and ultimately only stuck with one of the options - I have removed my personal email from Outlook, and solely use the Gmail interface. Other than that, I've settled back into my old ways. But I at least know I have the option, and if I had to, I could move online in a heartbeat - the online stuff is all set up. It's just a matter of pulling the trigger and moving to it. It's also nice to be able to sit down at a different computer and know that I have the ability to get at the information I want to be able to get at. But at least for now, I'll stick to the thick clients.

Categories: General, Software


 

NFL Picks: 08-09 Week 1

posted on 09/04/08 at 06:00:00 pm by Joel Ross

For those new to the blog since January, come Fall, I change gears a bit. One of the things I've done every year since I started this blog is post my weekly picks. Then, after the games are played, I post the results, and the whole cycle starts over. I'm not sure how many people actually read my picks or care who I pick, but I'm going to continue the tradition. This year though, I think I'll trim it back a bit, and make it only one post per week, rather than the usual two.

I'm in two fantasy leagues this year, which should give me something interesting to follow for just about every game. For the record, the team I pick is in bold. If there's a * next to the team, that means I picked them to cover the spread, but ultimately lose. The over/under pick is also in bold.

Anyway, on to the picks for the first week of the 2008-2009 NFL season.

  • Washington vs. New York Giants (-3.5) (41 O/U)
  • Detroit (-3) vs. Atlanta (41 O/U): Detroit has to be one of the best teams in the league every year - during the pre-season! Too bad that doesn't translate into regular season success!
  • Cincinnati (-1.5) vs. Baltimore (39 O/U)
  • Seattle vs. Buffalo (0) (39 O/U)
  • New York Jets (-3) vs. Miami (36 O/U)
  • Kansas City* vs. New England (-16.5) (46 O/U): Last year, New England routinely had 10+ point spreads (including every playoff game), and I kept waiting for them to crumble. For the most part, they never did. I guess this year is expected to more of the same!
  • Tampa Bay vs. New Orleans (-3.5) (42.5 O/U)
  • St. Louis vs. Philadelphia (-7.5) (44 O/U)
  • Houston vs. Pittsburgh (-6.5) (43.5 O/U)
  • Jacksonville (-3) vs. Tennessee (37 O/U)
  • Dallas (-4.5) vs. Cleveland (49 O/U)
  • Carolina* vs. San Diego (-9.5) (43 O/U)
  • Arizona (-2.5) vs. San Francisco (41.5 O/U)
  • Chicago vs. Indianapolis (-9.5) (44 O/U)
  • Minnesota vs. Green Bay (-2.5) (38.5 O/U)
  • Denver (-3) vs. Oakland (41.5 O/U)

I'm very excited for this season to get going! I can't wait for Thursday night. Anyway, check back next week to see how I did - I'll post a summary, along with the picks for the following week.

Tags: | |

Categories: Football


 

Getting Rid Of Config Files with Fluent NHibernate

posted on 09/03/08 at 07:00:00 pm by Joel Ross

When I first looked at NHibernate, the biggest issue I had with it was the configuration files - they looked long, confusing and error-prone. Well, as evidenced by a previous post, I got over that, and did it anyway.

But just because I figured it out doesn't mean I was happy with it, or that it's still not error prone. Luckily, there's a solution: Fluent NHibernate. I'm not sure why it's called that, other than it has a fluent interface, but it's goal is to allow you to programmatically specify NHibernate configurations.

From my previous post, here was my config for my Team class:

   1:  <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="CP.Models" namespace="CP.Models">
   2:    <class name="CP.Models.Team" table="Teams">
   3:      <id name="TeamId" column="TeamId" type="Int32" unsaved-value="0">
   4:        <generator class="native" />
   5:      </id>
   6:      <property name="Abbreviation" column="Abbreviation" type="string" length="50" not-null="false" />
   7:      <property name="Location" column="Location" type="string" length="50" not-null="false" />
   8:      <property name="NickName" column="NickName" type="string" length="50" not-null="false" />
   9:    </class>
  10:  </hibernate-mapping>

This is embedded in my DLLs, and it's just text. Hitting F5 doesn't do anything to verify this is correct. That's the problem Fluent NHibernate looks to solve. So I added the references to my Models class, and created a few mapping classes. Here's what the TeamMap class looks like:

   1:  public class TeamMap : ClassMap<Team>
   2:  {
   3:    public TeamMap()
   4:    {
   5:      TableName = "cpTeams";
   6:      Id(x => x.TeamId).GeneratedBy.Native();
   7:      Map(x => x.Abbreviation);
   8:      Map(x => x.Location);
   9:      Map(x => x.NickName);
  10:    }
  11:  }

This is much, much better, because now any change in our model (renaming properties, etc.) or a misspelling in our mapping is caught by the compiler. Not only that, but if we're smart about how we make our changes and use a refactoring tool, the mapping gets updated automatically for us. Also, it lets us specify things in one place instead of two. I don't have to spell out the types of each property - it's looking at the entity, so it knows the type already.

But the question still remained for me - can I do the complicated stuff for mapping properties. The answer is yes. Here's the class to map my Game class, which has a few relationships (explained in the previous post):

   1:  public class GameMap : ClassMap<Game>
   2:  {
   3:    public GameMap()
   4:    {
   5:      TableName = "cpGames";
   6:      Id(x => x.GameId).GeneratedBy.Native();
   7:      References(x => x.Week).WithForeignKey("WeekId").Cascade.All().FetchType.Join();
   8:      References(x => x.HomeTeam).WithForeignKey("HomeTeamId").Cascade.All().FetchType.Join();
   9:      References(x => x.AwayTeam).WithForeignKey("AwayTeamId").Cascade.All().FetchType.Join();
  10:      References(x => x.Season).WithForeignKey("SeasonId").Cascade.All().FetchType.Join();
  11:    }
  12:  }

Now, here is where I had an issue. The "WithForeignKey" method doesn't seem to work. It looked for the property name + "_id" to be the field name in the database, and I don't use underscores in my columns. That call should have overridden the conventions used, but it didn't.

After a quick call for help on twitter, I found my answer in the source for Fluent NHibernate. There are conventions that handle how properties and references are mapped to columns when you don't explicitly state them. Turns out it's fairly easy to change those conventions, and you don't even have to change the source of Fluent NHibernate, which is nice. I'll show that, but it's part of the overall configuration for NHibernate. This is in my NHibernateHelper class from the other post:

   1:  public class NHibernateHelper
   2:  {
   3:    private static ISessionFactory _sessionFactory;
   4:    private static ISessionFactory SessionFactory
   5:    {
   6:      get
   7:      {
   8:        if (_sessionFactory == null)
   9:        {
  10:          var configuration = MsSqlConfiguration
  11:            .MsSql2005
  12:            .ConnectionString.Is("server=(local);Initial Catalog=CP;User Id=sa;Password=;")
  13:            .ShowSql()
  14:            .ConfigureProperties(new Configuration());
  15:        
  16:          var persistenceModel = new PersistenceModel();
  17:   
  18:          persistenceModel.Conventions.GetForeignKeyName = (prop => prop.Name + "Id");
  19:          persistenceModel.Conventions.GetForeignKeyNameOfParent = (prop => prop.Name + "Id");
  20:          persistenceModel.addMappingsFromAssembly(
  21:         Assembly.Load(Assembly.GetExecutingAssembly().FullName));
  22:          persistenceModel.Configure(configuration);
  23:   
  24:          _sessionFactory = configuration.BuildSessionFactory();
  25:        }
  26:        return _sessionFactory;
  27:      }
  28:    }
  29:   
  30:    public static ISession OpenSession()
  31:    {
  32:      return SessionFactory.OpenSession();
  33:    }
  34:  }

This is a big change from my last sample. Part of the reason for that is that I've also eliminated the need to have a hibernate.cfg.xml file - it's all part of the above code. Most of the hibernate.cfg.xml elimination code was borrowed from a post on the NHibernate FAQ blog, but one thing that caught me up a bit was that you don't actually call configuration.Configure() any more, since that looks for the hibernate.cfg.xml file, and will throw an error. Now you call ConfigureProperties() passing in a configuration (line 14). Lines 18 and 19 is where I change the conventions used by Fluent NHibernate from looking for HomeTeam_id to HomeTeamId. The rest is pretty similar to the previous example.

After doing this, I was able to eliminate all of my NHibernate-specific XML files, and everything worked as it did before. All in all, it took about an hour to switch it all over. Not bad, considering what I'm gaining in maintainability down the line.

Categories: Development, Software, C#


 

<< 1 ... 3 4 5 6 7 8 9 10 11 12 13 ... 124 >>