31DaysOfOData

Announcing: The 31 Days of OData Blog Series

My friend and Microsoft Developer Evangelist Jeff Blankenburg has done 3 “31 days” blog extravaganzas (Silverlight, Windows Phone and now Windows Phone Mango). After talking to Jeff, I think I am crazy More »

Producing OData Screencast

OData Workshop Screencast–Producing OData Feeds

Previous Screencast — Introduction to Open Data Protocol Workshop Slidedeck — Producing OData Feeds More »

OData Protocol Screencast

OData Workshop Screencast – Introduction to Protocol

Workshop Slidedeck — Introduction to Open Data Protocol More »

Microsoft //BUILD Conference Webinar #3 – How Windows 8 / Metro will Impact Developers

Date: October 13, 2011

Time: 1:00-2:00 PM EST

Register Now! http://microsoftbuild3.eventbrite.com/

microsoftpic

Microsoft announced ground-breaking news at their BUILD conference in Anaheim, CA the week of September 12, 2011. While we can expect more news and details from the Windows 8 team in coming months.

What does this mean for developers? I agree with Microsoft’s Steven Sinofsky, President of Windows and Windows Live Division, when he said that there is a great opportunity for developers and designers in the new Windows 8 release. This new development opportunity starts with having over 500 million potential customers buying and using your new Windows 8 Metro applications. The key to this opportunity is to leverage the new Windows Runtime (WinRT) to build compelling energetic applications that allow consumers to be more productive with your innovations.

I attended the BUILD conference and many of the Windows 8 developers sessions regarding this exciting upcoming Windows release. In the third webinar in this four-part series, I will outline the new development platform coming from Redmond, explain the truth of what WinRT is and also show how to develop new Windows 8 Metro applications.

Microsoft //BUILD Conference Webinar #2– How Windows 8 / Metro will Affect Enterprise IT, and How You Can Prepare

Date: October 27, 2011

Time: 1:00-2:00 PM EST

Register Now! http://microsoftbuild2.eventbrite.com/

microsoftpicThis webinar has been rescheduled for October 27, 2011 at 1:00PM EST.

Windows 8 is a product that is initially both exhilarating and confusing. The Metro Style UI first experienced in Windows Phone 7 is at the forefront of Windows 8. It is fresh and inviting to the user while providing the information users need to keep up to date without drilling into applications.

On the server side there are also changes coming with the new announcements regarding Windows 8 Server. Windows Server 8 will allow IT shops and Enterprises to build and manage infrastructure for large multi-tenant Clouds, drastically increase scalability and reliability in the areas of Virtualization, Networking, Clustering and Storage, as well as have significant security improvements and enhancements.

I attended the BUILD conference and many of the Windows Server 8 sessions regarding this exciting upcoming Windows release. In the second webinar in this four-part series, I will provide an glimpse of what is coming for enterprise customers and Windows users as well as how internal IT and enterprise development teams can leverage the news coming from //BUILD about Windows 8 and Windows Server 8.

Microsoft //BUILD Conference Webinar #1– BUILD Conference Highlights: How Windows 8 / Metro is Revolutionary

Date: September 29, 2011

Time: 1:00-2:00 PM EST

Register Now! http://microsoftbuild1.eventbrite.com/

microsoftpicWindows 8 is a product that is initially both exhilarating and confusing. The Metro Style UI first experienced in Windows Phone 7 is at the forefront of Windows 8. It is fresh and inviting to the user while providing the information users need to keep up to date without drilling into applications.

On the other hand, we are all asking ourselves, “Where are my windows?” The truth is that Windows 8 and what was announced at the Microsoft BUILD conference the week of September 12 is intended to allow the Windows universe the ability to grow and innovate.

I attended the BUILD conference and many of the Windows 8 sessions regarding this exciting upcoming Windows release. In the first webinar in this four-part series, I will provide an overview of what was announced at the BUILD conference, present my insights and opinions on Windows 8 and demonstrate some of great features of Windows 8 that will allow people to understand the path upon which Microsoft is embarking .

Introducing the Microsoft //BUILD Conference Webinar Series

microsoftpicMicrosoft announced ground-breaking news at their BUILD conference in Anaheim, CA last week — an upcoming windows Platform refresh that will impact anyone who uses services or develops for the Windows platform. Windows 8 will feature a new, tablet-inspired interface called Metro, and an app-focused development environment. While we can expect more news and details from the Windows 8 team in coming months, Perficient has compiled details and analysis from one of our Microsoft experts.. me! I am a member of Perficient’s Microsoft Competency Center specializing in Application Architecture and Development, and he leads technical business development for Windows Azure.

I was present at the BUILD conference and attended many of the Windows 8 sessions regarding this exciting upcoming Windows release. Over the next four weeks, I will present my insights and opinions on Windows 8, and I will demonstrate some of the new features we can expect to see and how they will impact Microsoft developers, IT professionals, and end users who will be empowered by this great new technology.

Each Thursday starting on September 29 from 1:00 to 2:00PM EST, I will be hosting a webinar which will cover various take-aways from the BUILD conference. Each week’s webinar will be independent from the previous week’s, but in the end, will give attendees the knowledge and tools they will need to handle the next two years of Microsoft Windows planning and strategy during this exciting time in the technology world.

We will also feature valuable blog posts about the agenda and details for each webinar. Keep an eye on this blog for these important webinar announcements.

The following is the rundown for each webinar, as well as the registration link to sign up now and reserve your spot.

Fixing Windows Azure Training Kit with WP7 Mango Dev Tools

I am working on getting ready for a few weeks of Windows Azure training and going through the hands-on labs provided by the training kit. If you have the  Windows Phone Developer Tools 7.1 Beta (Mango) installed you will get an error in the dependency check for the Windows Phone 7 and The Cloud lab Setup Lab (see below):

SNAGHTML694bebe

When the Configuration Wizard is run to determine if all required software is installed, you will get an error when the wizard attempts to find the Windows Phone 7 Emulator.

SNAGHTML69ae023

The solution for this is to confirm that you have the emulator installed and then open the following file:

<Drive>\WAPTK\Labs\WindowsPhone7AndTheCloud\Source\Setup\Dependencies.dep

and edit the dependency check that calls CheckWp7Emulator.ps1 to be not enabled. Save the file and restart the Windows Phone 7 and The Cloud lab Setup Lab.

SNAGHTML6a46440

This will not perform the check for the Windows Phone 7 Emulator and the Config Wizard will complete and install all needed components.

SNAGHTML6a60e16

What Happens When You Know No One at a Conference? Day 1

I was selected to speak at the Semantic Technology Conference 2011 at the beginning of the year. I was happy and a little scared. I have my little circle of conferences I speak at and the people that attend those conferences are like myself. What would happen at a conference I would not know a single person and the attendees are not like myself regarding views and skills? This series of blogs will document my week here in San Francisco.

My talk at the conference is Wednesday afternoon and covers my introduction to OData material. I have it written, practiced and down. On the plane I read Scott Berkun’s book “Confessions of a Public Speaker” and I think I will be spending some time adapting it to this audience. Scott’s book is the best book I have read for public speakers. I highly recommend it for everyone to read. Even people that just speak at work in front of their co-workers will get a lot out of it.

Up early Sunday morning for my flight. The flight was OK coming to the conference. As the Airline gods usually do they placed a a-hole next to me that took as much arm space as he could and it was a nudging match for 4 hours. I now have a dim view of the world if this 20-something is the typical kid going to run the world when I am elderly.

Off the flight and on to the hotel. I love San Francisco and always enjoy the cab ride into the city. I get to the hotel and all is good. My room here is typical for a large cosmopolitan city: smaller with older hallways. The room has been upgraded recently so all is good. Also the conference this week will be in the same hotel so bonus not to have a long walk.

I relax for a while and go down shortly before 4:00PM to register for the conference and attend one of the 2 intro sessions before the Welcome reception at 5:00PM. I walk to the area to register and it is full of people chatting. I get my badge and walk around to see if maybe I can mingle and meet a few new people. No one seems to be open to meeting new people and everyone is chatting with other people. I get the clear idea that this is like most conference covering a specific technology: most people know each other through their online lives. OK I get the feeling that this might be more difficult than I thought. Does not help that I am deep down a very shy person when surrounded by new people. I have to keep pushing myself to overcome this childhood trait.

I go over to the hotel ballroom where the first session I will be attending is getting kicked off. The session is an introduction to Semantic Technologies. I wanted to attend this session to get a basis to start the week off. The presenter was very good and his information gives me a good feeling since I at least understood and know 80% of the points before coming here. I get a little better feeling.

The session ends and we all head to the hallway for the Welcome reception. Very nice with a good selection of beer and wine. I grab a beer and start walking around. Once again I get the distinct feeling that for most people this is a gathering event where everyone knows a good deal of people. I feel like I did 7 years ago attending my first Day of .NET and Code Camp. I make myself say hello to the closest person also alone. I am glad I did. I meet a very interesting gentleman from Singapore that manages a technology planning group for the country and also is using Semantic technologies to help solve some data issues for their organization. We have a friendly conversation. #1 new person met and I did not get laughed at. Getting better.

Slipped up to the hotel room to call the family and tell my kids good night before they start their last week of school. I also chat with my wife and get caught up from the baseball games I missed earlier in the day.

The Speaker Reception is next and I head back down to the ballrooms in the hotel for the real test of the day. Having been in many speaker dinners and gatherings this will be hard. First most speakers at events know each other. You think .NET is a small circle of thought leaders try Semantic Technologies. I grab another beer and walk around. I meet a few people and small talk but I know I am on the outside of the circle and this is not the place to try to wedge into conversations. People are catching up with others they only interact on the Web. I drink my beer and decide to go back upstairs to get some work done in my room before bed.

Overall the first day was exactly what I expected, me walking around getting my bearings to the vibe of the event and watching people interact. I am really an outsider here. Most people here are in the open source or Java space. We will see the day 2 brings when the full day comes.

A Great Short Story From My 10 Year Old Son — RUNAWAY

By: Spencer Woodruff

“Japan is fighting the rebels with no success. They have asked help from many countries but they have declined. Everyone is evacuating Tokyo after the attack of Kyoto. Boats have been transporting people to…”

Click. As I walked in my mom turned the TV off.

“Edwin, we need to leave” said my mom with concern in her voice.

Boom!

Something exploded downstairs in our apartment building. Then I heard a high pitched scream.

“Go” said my mom.

I sprinted out of my apartment building and raced down the stairs. Sweat was going down my face. Screams were everywhere. The screams were driving me crazy.

The next thing I knew me and my mom were surrounded by many men with guns in their hands.

The men started talking in a different language and took my mom down the stairs. Tears were rolling down my cheeks.

“Come with me” said a man in the back.

A man with big muscles walked up and took me by the neck. The thing that stood out the most was that he had a big scar on his face. He took me out of the building and threw me in a truck. When I opened my eyes I saw children of all ages. They were many about my age.

Then the truck started moving and I started to think about my mom. I wondered if she was being taken to the same place I was going. Or if they killed her.

We stopped and I heard the truck door slam. Then I heard two men talking and then the other truck door. The sun burned my eyes. The big man motioned us to get out of the truck.

When I stepped out of the truck a man with a ski mask put metal clamps on my arms and neck. When the hot sticky metal was clamped around my neck it was hard to breath. We walked until we went up to a metal gate. Around it were many other men with ski masks and guns. The man who took us out of the truck started talking to the man in the center of the gate. They started talking and the man who drove us started to turn around. At that very second the man with the ski mask took out a gun and shot the man.

The man was on the ground motionless. The dark blood was becoming a pool around him. The man spoke his language and a different man with a mask started to take all the kids through the gate.

As we walked further and further I saw an old factory. But through the broken glass were more men with guns. As we got closer to the building I got more scared of what was inside. Then the man in the front of the line started talking and everyone stopped moving.

People started sitting down and the men started to pass out pieces of bread. We ate the bread and got up again. When we got to the building the men with masks took kids to different parts of the building. A man took me to a part where many kids were working with gunpowder, making bullets, and guns. I looked in the corner and another man was cutting off a Childs finger. The man took us into a different room and he handed tools to make clothes. Masks, shirts, shoes you name it we were working on.

As I was making my fourth pair of shoes a bell rang. The other kids lined up and a man with a mask took a hatch in the floor and opened it. All the kids went down the hatch into pitch darkness. I went in the line and looked in the hatch. There was a little light but not much.

As I walked down the hatch I heard boys talking about something.

“We just need one to escape” said a boy with curly blonde hair.

“How? There’s no way out except the front door” said a boy on his right. “We won’t step a foot out the door with so many guards” he said again.

I walked over and went on the left of the boy with blonde hair.

“Hi, I’m Edwin” I said nervously.

“Hi, I’m Martin and that’s Jason” said the boy with blonde hair.

“Where do we sleep?” I asked Martin.

“Are you new here?” he said.

“Just got in today” I said.

“Find a spot anywhere, nobody gets a pillow or anything” said Jason.

I said bye to my new friends and found a spot at the end of the wall. Once the guard shut the light off I kept on thinking about a lot. I wondered where my mom was, where I am at, who these people are, and why am I here.

After about an hour of thinking about that I fell asleep. That night I had a dream that I was at my house with my mom and that this whole thing was a bad dream. That’s when I woke up. The first thing I saw were a group of girls giggling and a group of boys surrounding each other. That’s when the hatch opened and a man fired a bullet in the air. Everybody got up and headed toward the hatch. Once I got in line a boy about four times my size threw me on the ground.

I got up, anger growing in side of me. I punched him in the face and he got me right back. That’s when a man came in and took us both to the corner of the room.

“That’s your last straw Davis, you’re going upstairs” said the man.

“Please don’t bring me up” said the boy.

He grabbed the boy and went up the hatch.

I sat against the wall and it broke. Inside the wall there was a small door. I sat and looked amazed and then turned the knob and saw there was a tunnel. The cobwebs were bigger than me. I walked and walked and heard voices above me.

“Omen, we can’t keep all these kids if we’re going to D.C. It’s just going to slow us down. We should just kill them and get more in D.C.” said a man with a very deep voice.

“We don’t have enough weapons, well never make it” said a different man with a light voice.

“Omen it’s your choice” said a woman.

“We will stay for 1 more week. By then we will overpower them and the President will be dead” said a man.

I heard a door open and a man walked in.

“We’ll never beat the American army. We need a plan to distract them” said the man who walked in.

The room fell silent. I sat waiting for the answer.

“The Vice President, Jimmy Clanton will be in New York Friday only for two days. He is staying at the Ritz room 7B. I have a team of highly trained professionals going and taking him hostage” said the man.

“Good, kill Clanton on Saturday night. The president will be dead by then” said a man.

I was too scared to move. After I knew everybody was gone I went further in the tunnel. After about a few minutes I found a door. The tunnel went so far I couldn’t even see the factory anymore. I was about to leave when I remembered Martin and Jason and all the other kids.

I made up my mind and was going to help the kids. It took about an hour until I got back to the little room and all the kids were sleeping. I shut the door and made a loud banging noise on the concrete wall. Everybody looked at me and I was nervous.

“Everybody if you want get out of here follow me” I said.

Everybody got up and I opened the door. I led everybody in to the tunnel and they were on their way to freedom. When they were halfway in the tunnel we heard gunfire and a child screamed.

“Run” I shouted.

I started sprinting as fast as I could. Then I saw the door on the side of the tunnel. I opened it and dived out. I sat there staring at the door. Then Martin appeared out of the door.

“Where are we?” asked Martin.

I didn’t even notice where we were I just wanted someone to come out of the door.

“I don’t know” I said even though I hadn’t even turned around.

When I turned around we were in a burnt down house in the woods. I stood up and looked around.

“We have to leave now” I said.

I started to run out of the house when the knob started turning. I knew I only had a few seconds before I would die so I went behind a tree.

“Matt, is there anybody here?” said one of the men I heard in the room.

Then I heard footsteps coming toward me. I stepped in front of the tree and punched the guy in the face. I tackled him and took a branch and hit him many times. After a few hits Martin tackled me.

“What are you doing?” I yelled at him.

He punched me so I hit him with my branch and he fell unconscious.

I got up and ran through the woods. After an hour of running I reached a big city. The second I took a foot into it I knew it was D.C.

“Spare change?” said a man on my left.

“Sorry” I said.

I looked to my right and saw the White House. I ran as fast as I could towards the door. I reached for the handle but a man in a tuxedo and sunglasses stopped me.

“Can’t go in this way” said the man.

As I turned around, I saw an open air vent.

“Ok” I lied.

I waited until the man was gone then went in the air vent and crawled inside. I crawled until I saw the President in his office. I opened the vent and told him everything.

How to find MSSQL Database Table Columns that look like Foreign Keys but have no Constraints

After asking around and getting a few suggestions on how to do an automated search for SQL Server tables that have columns that look like foreign keys but do not have constraints on the columns. Here is the SQL statement for this search:

SELECT sys.tables.name AS TableName, sys.columns.name AS ColumnName
from sys.columns, sys.tables
where sys.columns.object_id = sys.tables.object_id AND
    sys.columns.name like '%id' and sys.columns.name not IN
    (SELECT
      COL_NAME(fc.parent_object_id,
        fc.parent_column_id) AS name
    FROM sys.foreign_keys AS f
     INNER JOIN sys.foreign_key_columns AS fc
     ON f.OBJECT_ID = fc.constraint_object_id)
ORDER BY sys.tables.name
Thanks to Denny Cherry and Buck Woody for the pointers.

How to customize the DataServiceContext model generated from an OData feed

After spending some time recently doing performance improvement on my Windows Phone 7 application Baseball History and also updating the Baseball Stats OData feed to include 2010 season data, I wanted to get back and find ways to improve how I develop on WP7. Since I found that using ViewModels for each Entity already generated in the DataServiceContext model was causing the performance issues, I had to find a way to incorporate the calculations I had in the old ViewModels. After looking at the DataServiceContext class, I saw it was a partial class. I then thought that was the best way to extend and add my baseball calculations to the entity model without the fear of getting my code overwritten the next time the DataServiceContext is generated.

The following at the types of calculations I had to perform since my Baseball Stats OData feed does not have these as entity properties:

  • Batting Average
  • Slugging Percentage
  • On Base Percentage
  • Total bases
  • ERA
  • WHIP

You can add your own partial class to live side by side of your generated DataServiceContext file. Here is an example of my partial classes for my WP7 Baseball History app. Very easy but not really a known feature of the generated code from DataSvcUtil.exe.

Code Snippet
  1. using System;
  2. namespace BaseballStats.Model
  3. {
  4.     public partial class Player : global::System.ComponentModel.INotifyPropertyChanged
  5.     {
  6.         public string nameFull
  7.         {
  8.             get
  9.             {
  10.                 return string.Format("{0}, {1}", this._nameLast, this._nameFirst);
  11.             }
  12.         }
  13.     }
  14.  
  15.     public partial class BattingTotals : global::System.ComponentModel.INotifyPropertyChanged
  16.     {
  17.         public int? TB
  18.         {
  19.             get
  20.             {
  21.                 //(Total hits – 2b -3b – HR) + (2b x 2) + (3b x 3) + (HR x 4).
  22.                 int? hits = this._H;
  23.                 int? dbl = this._Dbl;
  24.                 int? tpl = this._Tpl;
  25.                 int? hr = this._HR;
  26.  
  27.                 return (hits – (dbl + tpl + hr)) + (dbl * 2) + (tpl * 3) + (hr * 4);
  28.             }
  29.         }
  30.  
  31.         public double BA
  32.         {
  33.             get
  34.             {
  35.                 double ba = Convert.ToDouble(this._H) / Convert.ToDouble(this._AB);
  36.                 return Math.Round(ba, 3);
  37.             }
  38.         }
  39.  
  40.         public double SLG
  41.         {
  42.             get
  43.             {
  44.                 double slg = Convert.ToDouble(this.TB) / Convert.ToDouble(this._AB);
  45.                 return Math.Round(slg, 3);
  46.             }
  47.         }
  48.  
  49.         public double OBP
  50.         {
  51.             get
  52.             {
  53.                 //157 hits + 75 BB + 5 HBP / 500 AB + 75 BB + 5 HBP + 4 SF
  54.                 double obp = (Convert.ToDouble((this._H) + Convert.ToDouble(this._BB) + Convert.ToDouble(this._HPB)) / Convert.ToDouble((this._AB) + Convert.ToDouble(this._BB) + Convert.ToDouble(this._HPB) + Convert.ToDouble(this._SF)));
  55.                 return Math.Round(obp, 3);
  56.             }
  57.         }
  58.     }
  59.  
  60.     public partial class PitchingTotals : global::System.ComponentModel.INotifyPropertyChanged
  61.     {
  62.         public double? ERA
  63.         {
  64.             get
  65.             {
  66.                 double era = (Convert.ToDouble(this._ER) * 9) / (Convert.ToDouble(this._IPouts) / 3);
  67.                 return Math.Round(era, 2);
  68.             }
  69.         }
  70.  
  71.         public double? WHIP
  72.         {
  73.             get
  74.             {
  75.                 //WHIP = (Walks + Hits) / Innings Pitched (IP)
  76.                 double whip = (Convert.ToDouble(this._BB) + Convert.ToDouble(this._H)) / (Convert.ToDouble(this._IPouts) / 3);
  77.                 return Math.Round(whip, 2);
  78.             }
  79.         }
  80.     }
  81.  
  82.     public partial class Batting : global::System.ComponentModel.INotifyPropertyChanged
  83.     {
  84.         public int? TB
  85.         {
  86.             get
  87.             {
  88.                 //(Total hits – 2b -3b – HR) + (2b x 2) + (3b x 3) + (HR x 4).
  89.                 short? hits = this._H;
  90.                 short? dbl = this._Dbl;
  91.                 short? tpl = this._Tpl;
  92.                 short? hr = this._HR;
  93.  
  94.                 return (hits – (dbl + tpl + hr)) + (dbl * 2) + (tpl * 3) + (hr * 4);
  95.             }
  96.         }
  97.  
  98.         public double BA
  99.         {
  100.             get
  101.             {
  102.                 double ba = Convert.ToDouble(this._H) / Convert.ToDouble(this._AB);
  103.                 return Math.Round(ba, 3);
  104.             }
  105.         }
  106.  
  107.         public double SLG
  108.         {
  109.             get
  110.             {
  111.                 double slg = Convert.ToDouble(this.TB) / Convert.ToDouble(this._AB);
  112.                 return Math.Round(slg, 3);
  113.             }
  114.         }
  115.  
  116.         public double OBP
  117.         {
  118.             get
  119.             {
  120.                 //157 hits + 75 BB + 5 HBP / 500 AB + 75 BB + 5 HBP + 4 SF
  121.                 double obp = Convert.ToDouble((this._H) + Convert.ToDouble(this._BB) + Convert.ToDouble(this._HBP)) / Convert.ToDouble((this._AB) + Convert.ToDouble(this._BB) + Convert.ToDouble(this._HBP) + Convert.ToDouble(this._SF));
  122.                 return Math.Round(obp, 3);
  123.             }
  124.         }
  125.     }
  126.  
  127.     public partial class Pitching : global::System.ComponentModel.INotifyPropertyChanged
  128.     {
  129.         public double? WHIP
  130.         {
  131.             get
  132.             {
  133.                 //WHIP = (Walks + Hits) / Innings Pitched (IP)
  134.                 double whip = (Convert.ToDouble(this._BB) + Convert.ToDouble(this._H)) / (Convert.ToDouble(this._IPouts) / 3);
  135.                 return Math.Round(whip, 2);
  136.             }
  137.         }
  138.     }
  139.  
  140.     public partial class Team : global::System.ComponentModel.INotifyPropertyChanged
  141.     {
  142.         public int? TB
  143.         {
  144.             get
  145.             {
  146.                 //(Total hits – 2b -3b – HR) + (2b x 2) + (3b x 3) + (HR x 4).
  147.                 short? hits = this._H;
  148.                 short? dbl = this._Dbl;
  149.                 short? tpl = this._Tpl;
  150.                 short? hr = this._HR;
  151.  
  152.                 return (hits – (dbl + tpl + hr)) + (dbl * 2) + (tpl * 3) + (hr * 4);
  153.             }
  154.         }
  155.  
  156.         public double BA
  157.         {
  158.             get
  159.             {
  160.                 double ba = Convert.ToDouble(this._H) / Convert.ToDouble(this._AB);
  161.                 return Math.Round(ba, 3);
  162.             }
  163.         }
  164.  
  165.         public double SLG
  166.         {
  167.             get
  168.             {
  169.                 double slg = Convert.ToDouble(this.TB) / Convert.ToDouble(this._AB);
  170.                 return Math.Round(slg, 3);
  171.             }
  172.         }
  173.  
  174.         public double OBP
  175.         {
  176.             get
  177.             {
  178.                 //157 hits + 75 BB + 5 HBP / 500 AB + 75 BB + 5 HBP + 4 SF
  179.                 double obp = (Convert.ToDouble((this._H) + Convert.ToDouble(this._BB) + Convert.ToDouble(this._HBP)) / Convert.ToDouble((this._AB) + Convert.ToDouble(this._BB) + Convert.ToDouble(this._HBP) + Convert.ToDouble(this._SF)));
  180.                 return Math.Round(obp, 3);
  181.             }
  182.         }
  183.  
  184.         public double? WHIP
  185.         {
  186.             get
  187.             {
  188.                 //WHIP = (Walks + Hits) / Innings Pitched (IP)
  189.                 double whip = (Convert.ToDouble(this._BB) + Convert.ToDouble(this._H)) / (Convert.ToDouble(this._IPouts) / 3);
  190.                 return Math.Round(whip, 2);
  191.             }
  192.         }
  193.     }
  194. }

Dogfood Conference — Breaking Down “Data Silos” with the Open Data Protocol Slide Deck

Powered by WordPress | Designed by: Email Search