Wednesday, March 26, 2008

Working in Hawaii

This week we are doing some integration testing with a company from Chicago. Testing went pretty smoothly and for the most part everything is working well. So we gave them a couple of days off. Must be nice to be "working" in Hawaii.

But I guess I should be thankful for what I have because I "work" in Hawaii as well.

Saturday, March 22, 2008

Flex Charting

I've started to use the Flex Charting package in my Flex application that I'm working on. You need to pay for the Charting license separately from Flex Builder, which sort of irritated me. I hate having to pay an additional fee on top of a package that I already bought. Especially since I though the Charting was included with Flex Builder. After testing out the charts for the past couple of weeks, it might be worth it.

I found that setting up the graph and pushing data to it is really really easy. And as with all the Flex components, it just looks nice. On the application I'm currently working on, I need to grab data points from a binary file and graph the results. The catch is that the chart is fairly small, around 400 pixels by 250 pixels and there will probably be a lot of data points. My concern would be that the chart would not be able to display the graph very well and the large data set would either not be handled very well or would look messy. As a test, I sent around 10,000 data points to the chart just to see what would happen.

This is about the size of the chart on my application. As you can see, the Flex Chart looks really good. Granted, that the data ended up with a very distinct pattern, but for the most part, that is what we will be expecting.

So this will probably be the last time you will see the Flex Charting Trial watermark on my graphs. We will be ordering Flex Builder 3 Professional next week.

Thursday, March 20, 2008

First Cut of Ruby

I wrote my first Ruby app yesterday. I've been meaning to do this for years but I finally did it....I was stuck at 87% for quite a while there.
Anyway, I like learning new things and like most people I find that if I use it to write an application that I am interested in, it makes learning a lot easier, more fun, and I think I learn more.
So here is an overview of my application and some things that I learned along the way. If anyone is interested in the code, leave a comment and I'll send or post it.

MLB Stat Scraper
The application basically grabs stats from a website and puts it into a text file. The reason that I wanted this was so that I would be able to look up preseason stats without having to be online. I could just print it out and take it with me. I would also not have to go to 30 team pages and cut and paste them all manually (it takes longer than you think).
I ended up using a Ruby HTML parser library called Hpricot to help me find the text that I was looking for. It worked really well once I figured out how to use RubyGems to install it. In retrospect, I didn't need Hpricot since the stats that I was looking for was placed between pre tags and was marked in such a way that I think I could have got the text with the standard Ruby libraries.
I also used JRuby instead of Ruby and that seemed to work fine as well. There were some snags when I was installing RubyGems and Hpricot for JRuby, but it all eventually worked.
I'll get into the reasons for JRuby in a later post.

Ruby Impressions
I'm liking Ruby. I need to understand how things work a whole lot better, but it did what I wanted with very minimal code. The bulk of the code was less than 20 lines and after getting everything installed it took maybe an hour or so of total time to write.

Tuesday, March 18, 2008

Book Lamp

One of the things that I am really interested in is searching. Mainly something that allows me to find what I want in a reliable way. Some of my future posts will elaborate on this some more, but for now, let me share something that I found via Digg.

Book Lamp is a service that is attempting to improve searching for books. For me, choosing a book is a very long and arduous process. Before the Internet, I would literally visit the bookstore and look over a book 5-6 times before I actually decided to buy it. Nowadays, I have started to borrow books from the library, but I still agonize over choosing the right book. I hated wasting money on a book I might not like and I also found that I hated wasting my time reading a book that I didn't like either (duh....but I really really hated it). I would spend hours looking on book recommendation sites and Amazon user ratings to find a book that I might like. Book Lamp seems like it could be the solution that I'm looking for.

BookLamp.org is a system for matching readers to books through an analysis of writing styles, similar to the way that Pandora.com matches music lovers to new music.

They use some sort of algorithms to analyze the authors writing styles. I believe the algorithms look at the actual text of the books. They then match this up with things that you like and offer a list of recommendations. Future versions will also include matching of story lines, probably genres, and maybe even character types to the search parameters. It will also allow you to customize your preferences and will have some self-learning capabilities. The point, for me, is that they are doing this in a cool scientific way that will hopefully give me the next book that I'm going to read. That's way cool!!!

Book Lamp is in the very early beta stages but I'm going to be watching what they do and will be participating in their forums. I'll report back on progress.....or better yet, check it out for yourself.

Monday, March 17, 2008

Baseball Draft 2008 part 1

This probably won't interest anyone, but i wanted to log it somewhere for future reference.
This is my draft recap from the first Fantasy Baseball draft for 2008.

The league consists of 10 teams. Stat categories are R, HR, RBI, SB, AVG, OPS, W, K, ERA, WHIP.
And each roster consists of: C, 1B, 2B, 3B, SS, CI, MI, OF, OF, OF, OF, Util, SP, SP, SP, RP, RP, RP, P, P, P, BN, BN, BN, DL.

So this is how my draft went. I had the 10th pick.
1. (10) Matt Holliday OF
2. (11) Jimmy Rollins SS
3. (30) Álex Ríos OF
4. (31) Derek Jeter SS
5. (50) Nick Markakis OF
6. (51) Hunter Pence OF
7. (70) Scott Kazmir SP
8. (71) Adrián González 1B
9. (90) Chris Young SP
10. (91) Shane Victorino OF
11. (110) A.J. Burnett SP
12. (111) Matt Cain SP
13. (130) James Shields SP
14. (131) James Loney 1B
15. (150) Joakim Soria RP
16. (151) Josh Hamilton OF
17. (170) Plácido Polanco 2B
18. (171) George Sherrill RP
19. (190) Clay Buchholz SP
20. (191) Iván Rodríguez C
21. (210) Evan Longoria 3B
22. (211) Zack Greinke SP,RP
23. (230) Gil Meche SP
24. (231) Nate Robertson SP

Recap notes from the draft.
The overall strategy of the draft was to get a good Batting Average and get some quality middle tier pitching that maximized K/9.
I liked my first pick. I had Holliday in the top 5 so I was totally happy to get him at 10. I was projecting to get Ryan Howard with my first pick. I could have picked Howard next but Jimmy Rollins was still on the board and I figured it would be better to fill up a middle infield position and if Rollins can repeat his numbers from last season, the steals will make it all worth while.
Before the draft I had targeted a bunch of OF that I really wanted to get. I really wanted Alex Rios, who I think will move into the top 10 this year. Nick Markakis, who could move into All-Star status. Hunter Pence, Corey Hart, Josh Hamilton, Brad Hawpe, and possibly Shane Victorino (for the Hawaii connection and SB) were also on the list. As you can see I got most of the guys I wanted. Although at times I had to reach down my list to get them. But since I was picking at the end, I felt that I had to do that. I passed on Corey Hart, even though he went really late. Mostly since he seemed to be struggling during the pre-season. We'll see how that goes. I was really high on Josh Hamilton. I think he could deliver Ryan Howard type numbers....assuming he stays healthy.
I also got Derek Jeter. Not sure why I did that other than the fact that I've never had Jeter and I like him. If anything, his average should help. Polanco was also a guy that I wanted. I think he is really underrated and his batting average is just awesome.
Again this year, I'm weak in the corners. Maybe I'll get lucky and Evan Longoria can be another Ryan Braun. I doubt it, but one can only hope. I hope passing on Howard doesn't come back to bite me.
I got some of the Pitchers that I wanted. But I missed out on the "stud" pitchers. I really wanted Brandon Webb or CC Sabathia, but they went right before I was going to grab them (round 5/6 I think). Instead I waited and beefed up my offense and later gambled on Scott Kazmir and later AJ Burnett. AJ is the real question mark, he's capable of good numbers....again, if he can stay healthy. I really like Matt Cain and James Shields. I think they will be able to deliver above their draft picks. I also like Buchholz. He could be good.....or not but I was glad to get him where I did. Greinke, Meche, and Robertson also have some potential.
Pitching seemed to go quick in this draft. Maybe it was because I was focusing on Offense so much. There were several runs on Closers and I admit I got caught up in one of them. I was fully planning on punting on Saves.
So that was my first draft of the year. I'm happy with my team. I got a lot of guys that I wanted and who I like. My Offense should be solid. My Pitching is weak, but it has potential.

Sunday, March 16, 2008

How It's Made

For a while I was watching this show called How It's Made on the Discovery Channel. I always found it interesting to see how things were made, but this show wasn't able to hold my interest for very long. The music drove me insane, the narrator was boring, and most of the products they showed were very just plain stupid.

So anyway, I found this new show....Who Knew? With Marshall Brain. Same idea but done way better. Marshall is sort of a quirky guy and maybe not the best television personality out there. But so far, I've like the products he's picked and the way that things are explained.
And I guess I've been a fan of Marshall for a while....he is the creator of How Stuff Works. One of my all time favorite sites.
Anyway, if you are interested in this type of stuff....Who Knew? is on the National Geographic Channel.