<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Fear and Loathing</title><link>https://weblogs.asp.net:443/bsimser/</link><description>Gonzo blogging from the Annie Leibovitz of the software development world.</description><item><title>Power Outage Maps from Around the World</title><link>https://weblogs.asp.net:443/bsimser/outagemaps</link><description>&lt;p&gt;&lt;img src="https://aspblogs.blob.core.windows.net:443/media/bsimser/outagemaps/fortisalberta%20ppo%2010%202017.png" alt="Planned Outages from FortisAlberta" /&gt;&lt;/p&gt;
&lt;p&gt;Whew. It's been a &lt;em&gt;long&lt;/em&gt; time since I blogged but I think it's fine time to get back into it and this seemed to be a useful start.&lt;/p&gt;
&lt;p&gt;My job for the last few years has been in the electrical industry, specifically dealing with electrical distribution for Alberta in Canada. A few years back I came across a list published by Edward Vielmetti that listed power outage maps for all 50 states and other countries. Since I built it, I contributed my own map for FortisAlberta to the list. The original list has since gone by the wayside so I rescued it from the &lt;a href="https://web.archive.org/"&gt;Wayback Machine&lt;/a&gt; and will continue to maintain it here. Feel free to &lt;a href="mailto:bsimser@shaw.ca?subject=outage maps"&gt;email me&lt;/a&gt; with updates, questions, ideas, small marsupials, credit card numbers, etc. As I find time I will update the images and information as best I can.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;IMPORTANT!!&lt;/strong&gt; The last version I could get of this content from the Internet was from May of 2016 and the last update to that version of the list was from May of 2015. So this information is terribly out of date. Phone numbers, links, and information here has not been updated yet. Please do not use this for emergency reference. Always refer to your local authorities and resources for the latest information during a power outage.
&lt;p&gt;The list is known to be incomplete, but the list from Wikipedia (&lt;a href="https://web.archive.org/web/20160522055845/http://en.wikipedia.org/wiki/Outage_management_system" target="_self"&gt;outage management system&lt;/a&gt;) is also incomplete. To be overly comprehensive, if there are screen captures that I can gather, I will; they will not be current when you look at them, but I will time and date stamp them as best I can.&lt;/p&gt;
&lt;p&gt;Wherever possible, I&amp;#39;m also capturing service area or service territory maps, mobile device apps, high capacity transmission interconnection maps, media contact information, regulatory agencies, and regional coordinating bodies.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Updates&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;May 7, 2015.&amp;#0160;&lt;/strong&gt;Updates to Texas, including Coserv (Denton County TX).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;November 2, 2014.&amp;#0160;&lt;/strong&gt;Updates to Maine, due to winter storms there; added Maine Public Utilities Commission map. Added load shedding page for Eskom (South Africa) and PGCB (Bangladesh) after large scale power outage in both countires. Added NB Power (New Brunswick, Canada), no maps.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;August 1, 2014.&amp;#0160;&lt;/strong&gt;Updated Fortis Alberta.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;March 13-14, 2014.&amp;#0160;&lt;/strong&gt;Updated Maine, Maryland, Virginia.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;February 11, 2014.&amp;#0160;&lt;/strong&gt;Added Sawnee EMC in Georgia north of Atlanta.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;December 21, 2013.&amp;#0160;&lt;/strong&gt;Reviewing Texas. Added load graph from ERCOT, map for San Bernard Electric Cooperative, map for AEP Texas, entry for Sam Houston Electric Cooperative, map for Austin Electric.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;October 4, 2013. &lt;/strong&gt;Added South Dakota Rural Electric Association map during early season winter storm Atlas. Update Progress Energy Florida to reflect merger with Duke Energy. Added map for Gulf Power (Florida), Mississippi Power. Still no map for Alabama Power. Preparations for TS Karen in the Gulf. Updates to Arizona, Saskatchewan, PEI.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;July 10, 2013&lt;/strong&gt;. Updated Twitter account for Arizona Public Service, added central Arizona&amp;#39;s Salt River Project; also updates for the Toronto, Ontario, Canada area.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;June 13, 2013. &lt;/strong&gt;Added new maps from the Southern Company for Georgia Power. No map available for Alabama Power and Gulf Power, also Southern Company utilities.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;October 26-29, 2012. &lt;/strong&gt;Updates for Hurricane Sandy. Con Edison (NYC) has a new link to their storm center. Updated PEPCO media relations contact. Add Delmarva Power mobile apps. Update PSEG twitter. Add NSTAR (Massachusetts).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;August 28, 2012 &lt;/strong&gt;updates several Louisiana electric cooperatives in advance of &lt;a href="https://web.archive.org/web/20160522055845/http://classic.wunderground.com/tropical/at201209.disc.html" target="_self"&gt;Hurricane Isaac&lt;/a&gt;, as well as details for Mississippi Power. Quick link: &lt;a href="https://web.archive.org/web/20160522055845/http://viewoutage.entergy.com/la.aspx" target="_self"&gt;Entergy Storm Center&lt;/a&gt;&amp;#0160;(New Orleans + much of Louisiana). News coverage: &lt;a href="https://web.archive.org/web/20160522055845/http://www.wwltv.com/" target="_self"&gt;WWL-TV&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;July 10, 2012 &lt;/strong&gt;updates Alberta after AESO initiates rolling blackouts on EPCOR in response to extreme heat and power plants going offline.&amp;#0160;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;June 25, 2012&lt;/strong&gt; has additional Florida updates for Tropical Storm Debby.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;May 27, 2012&lt;/strong&gt;&amp;#0160;has updates from Florida for Tropical Storm Beryl, including new information in Jacksonville, Florida (JEA), Tampa Florida (TECO / Tampa Electric), and updated for Clay Electric (Gainesville).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;May 14-16, 2012 &lt;/strong&gt;notes visits from &lt;a href="https://web.archive.org/web/20160522055845/http://survivalblog.com/2012/05/odds-n-sods-2236.html" target="_self"&gt;SurvivalBlog (thanks for the link)&lt;/a&gt; and an update of Progress Energy&amp;#39;s map for North and South Carolina; maps also added for Vermont (CVPS), eastern Washington (Avista), metro Atlanta (GreyStone), Colorado Springs Utilities, Duke Energy (Indiana) and an entry for Wyoming (Rocky Mountain Power).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;April 30, 2012&lt;/strong&gt; adds a Twitter feed for Oklahoma Gas and Electric (@OGandE). Some of the OG&amp;amp;E maps render at weird sizes in the Chrome browser I&amp;#39;m using.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;April 15, 2012&lt;/strong&gt;&amp;#0160;adds Kansas City Power and Light&amp;#39;s map, powered by Obvient Strategies (now a division of Ventyx).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;January 12, 2012&lt;/strong&gt; adds the service alert map from Puget Sound Energy, which serves Washington State. This map is only activated in severe weather; PSE reported 220,000 homes without service due to heavy snowfall.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;November 30 - December 1, 2011&lt;/strong&gt; looks at the Santa Ana winds that are affecting California (&lt;a href="https://web.archive.org/web/20160522055845/http://latimesblogs.latimes.com/lanow/2011/11/high-winds-could-wreak-havoic-on-los-angeles-wednesday-night-.html" target="_self"&gt;LA Times&lt;/a&gt;), causing power outages and a risk of fires. An &lt;a href="https://web.archive.org/web/20160522055845/http://www.ladwpnews.com/go/doc/1475/1249671/" target="_self"&gt;LADWP storm outage map at 6:00 p.m. December 1, 2011&lt;/a&gt; shows widespread outages affecting about 118,000 of that utility&amp;#39;s 1.4 million customers. Outages in Utah (no maps) and New Mexico are also blamed on high winds.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;November 15, 2011&lt;/strong&gt; looks at Ohio and Texas.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;November 11-12, 2011&lt;/strong&gt; adds media contacts and maps for Duke Energy in North Carolina. I&amp;#39;m also working to incorporate a set of international outage information for telco and internet services, which doesn&amp;#39;t neatly fit the state-by-state organization of the power grid. If you are in western Massachusetts, a WMECO ratepayer has built their own outage page suitable for even very dumb mobile phones.&lt;/p&gt;
&lt;p&gt;A &lt;strong&gt;November 9, 2011&lt;/strong&gt; update starts to collect &lt;strong&gt;media contact pages&lt;/strong&gt;, especially for utility companies that do not currently publish maps, and I&amp;#39;m looking at Alaska, Michigan, Washington, and Wisconsin.&lt;/p&gt;
&lt;p&gt;A &lt;strong&gt;November 7, 2011&lt;/strong&gt; update adds PSE&amp;amp;G in New Jersey and RG&amp;amp;E in Rochester, NY, and updates several maps in Oklahoma.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;October 30, 2011&lt;/strong&gt; &amp;quot;Snowtober&amp;quot; update includes hits to the power grid from the snowstorm .&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;September 9, 2011&lt;/strong&gt; updates focus on southern California and Arizona, where a widespread power outage occured when the&amp;#0160;North Gila – Hassayampa 500 kV transmission line near Yuma, Ariz went off line; maps added include the SDGE outage map, a 2003 map of high capacity California interconnects, and a map of utility service areas in California.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;September 6, 2011&lt;/strong&gt; updates include new KML (GeoRSS) thematic maps for ConEdison (NY), Pepco (DC), Progress Energy (NC/SC), Delmarva (DE/MD) and Atlantic City Electric (NJ), via Google Crisis Response, plus a new map for Allegheny Power.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;August 25 and 29, 2011&lt;/strong&gt; updates includes nine new maps along the US east coast, covering power outages due to Hurricane Irene.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Warning&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Don&amp;#39;t touch a downed wire. If you don&amp;#39;t know who to call to report an emergency associated with a power outage, call 911. Avoid dire mofo.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;United States. &lt;/strong&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://powerquality.eaton.com/blackouttracker/default.asp" target="_self"&gt;Eaton Blackout Tracker&lt;/a&gt;. Aggregated information about power outages, their causes, and the relative impact of each one; not real time.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015391392028970b-pi"&gt;&lt;img alt="Eaton-blackout-tracker" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015391392028970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015391392028970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Eaton-blackout-tracker"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;United States&lt;/strong&gt; (Midwest): &lt;a href="https://web.archive.org/web/20160522055845/https://www.midwestiso.org/" target="_self"&gt;Midwest ISO&lt;/a&gt;. Regional coordination of wholesale power transfers in Michigan, Indiana, Illinois, Missouri, Iowa, Minnesota and Manitoba. &lt;a href="https://web.archive.org/web/20160522055845/https://www.midwestiso.org/MarketsOperations/RealTimeMarketData/Pages/LMPContourMap.aspx" target="_self"&gt;Midwest ISO Real Time Locational Marginal Price Contour Map.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01543547dc37970c-pi"&gt;&lt;img alt="Midwest-iso-lmp-map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01543547dc37970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01543547dc37970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Midwest-iso-lmp-map"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;strong&gt;United States&lt;/strong&gt; (14 western states). &lt;a href="https://web.archive.org/web/20160522055845/http://www.wecc.biz/" target="_self"&gt;Western Electricity Coordinating Council&lt;/a&gt;.&amp;#0160;&lt;span style="color: #000000;"&gt;The &lt;a href="https://web.archive.org/web/20160522055845/http://www.wecc.biz/library/Pages/Interconnection%20Maps.aspx" target="_self"&gt;Principal Transmission Map and the Planned Facilities Map&lt;/a&gt; are available to WECC members only or&amp;#0160;on receipt of approval from WECC’s Manager of Planning Services.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000;"&gt;&lt;strong&gt;United States&lt;/strong&gt; (Northwest). &amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/http://www.nwcouncil.org/maps/power/Default.asp" target="_self"&gt;Northwest Council: Power Generation in the Northwest&lt;/a&gt; map&amp;#0160;shows&amp;#0160;&amp;#0160;top power producers in each category, or those producing more than 25mw.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000;"&gt; &lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015393f1369e970b-pi"&gt;&lt;img alt="Picture 21" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015393f1369e970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015393f1369e970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 21"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alabama: &lt;/strong&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://www.alabamapower.com/storm/home.asp" target="_self"&gt;Alabama Power storm center&lt;/a&gt; (no maps). Alabama Power makes maps for internal use; here&amp;#39;s how they do it, in a &lt;a href="https://web.archive.org/web/20160522055845/http://proceedings.esri.com/library/userconf/egug2009/papers/monday/how_graphic_representation_of_outages_at_al_power_made_simple.pdf" target="_self"&gt;2009 ESRI user group presentation&lt;/a&gt;. A Southern Company. Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/alabamapower" target="_self"&gt;alabamapower&lt;/a&gt;. Facebook: &lt;a href="https://web.archive.org/web/20160522055845/https://www.facebook.com/AlabamaPower" target="_self"&gt;AlabamaPower&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alabama&lt;/strong&gt; (Dothan): &lt;a href="https://web.archive.org/web/20160522055845/http://216.47.203.35/OMSWebMap/Map/OMSWebMap.htm" target="_self"&gt;Wiregrass Electric Cooperative Outage Map&lt;/a&gt;. Map requires Silverlight plugin. The &lt;a href="https://web.archive.org/web/20160522055845/https://play.google.com/store/apps/details?id=com.wiregrass.smartapps" target="_self"&gt;WEC Android app&lt;/a&gt; also has outage information for mobile devices.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef016305b6b80e970d-pi"&gt;&lt;img alt="Picture 28" class="asset  asset-image at-xid-6a00d8341c4f1a53ef016305b6b80e970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef016305b6b80e970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 28"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;strong&gt;Alabama&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.caec.coop/customer-service/current-outages.html" target="_self"&gt;CAEC Outage Viewer&lt;/a&gt;. Call&amp;#0160;1-800-619-5460 to report an outage or dangerous condition.&amp;#0160;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alaska&lt;/strong&gt; (statewide): &lt;a href="https://web.archive.org/web/20160522055845/http://www.alaskapower.org/" target="_self"&gt;Alaska Power Association&lt;/a&gt;. Statewide electric utility trade association. Member and public relations:&amp;#0160;907-771-5711.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alaska&lt;/strong&gt; (Juneau): &lt;a href="https://web.archive.org/web/20160522055845/http://www.aelp.com/outages/outage_log.htm" target="_self"&gt;Alaska Electric Light and Power outage log&lt;/a&gt;. Detailed reporting of each outage incident, with the cause, location and duration noted. Juneau is not connected to a larger power grid. No map. Please call 1-888-434-9844 if you experience an outage&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alaska&lt;/strong&gt; (Anchorage): &lt;a href="https://web.archive.org/web/20160522055845/http://www.mlandp.com/" target="_self"&gt;Municipal Light and Power&lt;/a&gt; (no maps). To report an outage, call 907-&lt;strong&gt;&lt;span style="color: #000099;"&gt;279-7671&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Arizona&lt;/strong&gt; (Phoenix). &lt;a href="https://web.archive.org/web/20160522055845/http://www.aps.com/en/globalservices/outagecenter/Pages/home.aspx" target="_self"&gt;Arizona Public Service (APS) Outage Center&lt;/a&gt;&amp;#0160;(no maps). Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/apsfyi" target="_self"&gt;apsFYI&lt;/a&gt;. Facebook: &lt;a href="https://web.archive.org/web/20160522055845/https://www.facebook.com/apsfyi"&gt;apsfyi&lt;/a&gt;. Call 855-OUTAGES to report an outage.&lt;/p&gt;
&lt;p&gt;c&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Arizona&lt;/strong&gt; (Central Arizona). &lt;a href="https://web.archive.org/web/20160522055845/https://myaccount.srpnet.com/publicoutagemap/" target="_self"&gt;Salt River Project Public Outage Map&lt;/a&gt;. (requires Silverlight) Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/srpconnect" target="_self"&gt;srpconnect&lt;/a&gt;. &amp;#0160;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Arizona&lt;/strong&gt; (Tucson). &lt;a href="https://web.archive.org/web/20160522055845/http://www.tep.com/" target="_self"&gt;Tucson Electric Power&lt;/a&gt; (no outage center, no maps). Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/TEPOutageInfo" target="_self"&gt;TEPOutageInfo&lt;/a&gt;. Updated October 5, 2013.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Arizona&lt;/strong&gt; (Southern - Pima, Santa Cruz counties, excluding&amp;#0160;Tucson): &lt;a href="https://web.archive.org/web/20160522055845/http://www.trico.coop/" target="_self"&gt;TRICO Electric Coop&lt;/a&gt;. No maps.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Arizona&lt;/strong&gt; (Southern, Western - Santa Cruz, Mohave County):&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/https://www.uesaz.com/" target="_self"&gt;Unisource Energy&lt;/a&gt;&amp;#0160;(No maps). Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/UESPowerOutages" target="_self"&gt;UESPowerOutages&lt;/a&gt;. Updated October 5, 2013.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Arkansas&lt;/strong&gt; (Little Rock). &lt;a href="https://web.archive.org/web/20160522055845/http://viewoutage.entergy.com/ar.aspx" target="_self"&gt;Entergy Storm Center&lt;/a&gt;. In addition to showing customer level problems, Entergy Arkansas also shows lines that are de-energized in its distribution system. Mobile access via the &lt;a href="https://web.archive.org/web/20160522055845/http://www.entergy.com/app/" target="_self"&gt;Entergy App&lt;/a&gt;&amp;#0160;(iPhone).&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e891e3144970d-pi"&gt;&lt;img alt="Picture 22" class="asset  asset-image at-xid-6a00d8341c4f1a53ef014e891e3144970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e891e3144970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 22"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Arkansas&lt;/strong&gt; (Fayetteville, Texarkana). &lt;a href="https://web.archive.org/web/20160522055845/https://www.swepco.com/outages/" target="_self"&gt;SWEPCO Outages and Problems&lt;/a&gt;. Twitter: &lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/swepconews" target="_self"&gt;@swepconews&lt;/a&gt;. Facebook: &lt;a href="https://web.archive.org/web/20160522055845/https://www.facebook.com/SWEPCO" target="_self"&gt;Southwestern Electric Power Company - SWEPCO&lt;/a&gt;.&amp;#0160;Please report safety hazards by calling 1-888-218-3919.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01538f5b58bb970b-pi"&gt;&lt;img alt="Picture 46" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01538f5b58bb970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01538f5b58bb970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 46"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;strong&gt;Arkansas&lt;/strong&gt; (Northwest): &lt;a href="https://web.archive.org/web/20160522055845/https://www.empiredistrict.com/Outages/Default.aspx" target="_self"&gt;Empire District Electric Company Power Outage Map&lt;/a&gt;. See the Missouri entry for Empire for a map; only a few customers are served in Arkansas.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;California&lt;/strong&gt; (entire state). &lt;a href="https://web.archive.org/web/20160522055845/http://www.caiso.com/" target="_self"&gt;California Independent System Operator&lt;/a&gt; (no maps). Power grid coordination among utilities at the wholesale level. Graph of &lt;a href="https://web.archive.org/web/20160522055845/http://www.caiso.com/Pages/TodaysOutlook.aspx" target="_self"&gt;aggregate California actual and forecast electric supply and demand&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01543547d2f5970c-pi"&gt;&lt;img alt="Today's-Outlook-Details" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01543547d2f5970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01543547d2f5970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Today's-Outlook-Details"/&gt;&lt;/a&gt; &lt;strong&gt;&amp;#0160;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;California&lt;/strong&gt; (statewide). &lt;a href="https://web.archive.org/web/20160522055845/http://www.energy.ca.gov/maps/index.html" target="_self"&gt;California Energy Commission Energy Maps of California&lt;/a&gt;. Detailed statewide maps, including this map of &lt;a href="https://web.archive.org/web/20160522055845/http://www.energy.ca.gov/maps/serviceareas/electric_service_areas.html" target="_self"&gt;California electric utility service areas&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01539174dc93970b-pi"&gt;&lt;img alt="California_electric_service_areas" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01539174dc93970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01539174dc93970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="California_electric_service_areas"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;California&lt;/strong&gt;.&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/http://certs.lbl.gov/" target="_self"&gt;Consortium of Electric Reliability Technology Solutions&lt;/a&gt;. Research into grid reliability and stability, hosted at Lawrence Berkeley Laboratories. &lt;a href="https://web.archive.org/web/20160522055845/http://certs.lbl.gov/pdf/ca-grid-plan.pdf" target="_self"&gt;2003 California power grid study&lt;/a&gt;&amp;#0160;includes this map.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01543547fde5970c-pi"&gt;&lt;img alt="2003-California-EHV-transmission-interconnections" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01543547fde5970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01543547fde5970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="2003-California-EHV-transmission-interconnections"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;strong&gt;California&lt;/strong&gt; (far north). &lt;a href="https://web.archive.org/web/20160522055845/http://www.pacificpower.net/ed/po/coi.html" target="_self"&gt;Pacific Power Outage Information For California&lt;/a&gt;&amp;#0160;(no maps).&amp;#0160;To report an outage or if you do not see your outage listed and would like an update, call us anytime toll free at&amp;#0160;&lt;strong&gt;1-877-508-5088&lt;/strong&gt;&lt;strong&gt;. &lt;/strong&gt;&lt;span style="font-size: 12px; font-weight: bold;"&gt;To improve service to you, we are working to enhance our online outage information to include interactive maps in the future. (as of December 2011)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;California&lt;/strong&gt; (San Francisco). &lt;a href="https://web.archive.org/web/20160522055845/http://www.pge.com/myhome/customerservice/energystatus/outagemap/" target="_self"&gt;PG&amp;amp;E Outage Map&lt;/a&gt;. Twitter:&amp;#0160;@&lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/#!/PGE4Me" target="_self"&gt;PGE4Me&lt;/a&gt;&amp;#0160;. If you need to report an outage, please call 1-800-743-5002.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01538f11ca9d970b-pi"&gt;&lt;img alt="California-pge" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01538f11ca9d970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01538f11ca9d970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="California-pge"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;California&lt;/strong&gt; (Los Angeles). Los Angeles Department of Water and Power.&amp;#0160;For real-time outage information, please call us anytime at 1-800-DIAL DWP. Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/ladwp" target="_self"&gt;LADWP&lt;/a&gt; . News updates: &lt;a href="https://web.archive.org/web/20160522055845/http://www.ladwpnews.com/" target="_self"&gt;LADWPNews.com&lt;/a&gt;. No interactive map tracker for the general public. The map below was produced in response to the December 1, 2011 Santa Ana winds and shows over 114,000 customers without power in LA.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015393dfd7be970b-pi"&gt;&lt;img alt="StormOutageMap_2011-6kpm" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015393dfd7be970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015393dfd7be970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="StormOutageMap_2011-6kpm"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;California&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.sce.com/poweroutagecenter/poweroutagecenter.htm" target="_self"&gt;Southern California Edison Outage Center&lt;/a&gt;, &lt;a href="https://web.archive.org/web/20160522055845/http://www.sce.com/AOC_Outagemap/OutageMap.html" target="_self"&gt;Outage Maps&lt;/a&gt;&amp;#0160;(new), &lt;a href="https://web.archive.org/web/20160522055845/http://www.sce.com/AOC_Outagemap/OutageListView.html" target="_self"&gt;Outage List View&lt;/a&gt; (suitable for mobile use). Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/SCE" target="_self"&gt;SCE&lt;/a&gt;. Facebook: &lt;a href="https://web.archive.org/web/20160522055845/http://facebook.com/SCE" target="_self"&gt;SCE&lt;/a&gt;. If your electricity stays off for longer than a few minutes, call 800-611-1911. [Updated 3/12/14.]&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015434fccc05970c-pi"&gt;&lt;img alt="Socal-edison-outage-map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015434fccc05970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015434fccc05970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Socal-edison-outage-map"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;strong&gt;California&lt;/strong&gt; (San Diego) &lt;a href="https://web.archive.org/web/20160522055845/http://sdge.com/outages/outageMap.shtml" target="_self"&gt;SDGE Outage Map&lt;/a&gt;. Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/#!/sdge" target="_self"&gt;SDGE&lt;/a&gt;&amp;#0160;. Call&amp;#0160;800-411-7343. Area code 619.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01543547473e970c-pi"&gt;&lt;img alt="Sdge-outage_4_32_43" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01543547473e970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01543547473e970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Sdge-outage_4_32_43"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Colorado&lt;/strong&gt; (Denver).&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/http://www.xcelenergy.com/Outages" target="_self"&gt;Xcel Energy Outage Map&lt;/a&gt;. To report an outage, call&amp;#0160;1-800-895-1999. Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/XcelEnergyCO"&gt;XcelEnergyCO&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e894e9936970d-pi"&gt;&lt;img alt="Picture 47" class="asset  asset-image at-xid-6a00d8341c4f1a53ef014e894e9936970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e894e9936970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 47"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;strong&gt;Colorado&lt;/strong&gt; (Colorado Springs). &lt;a href="https://web.archive.org/web/20160522055845/https://www.csu.org/pages/outages-emergencies.aspx" target="_self"&gt;Colorado Springs Utilities Electric Outage Map&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;bhe&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Connecticut&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.cl-p.com/outage/OutageMap.aspx" target="_self"&gt;Connecticut Light and Power Outage Map&lt;/a&gt;. Table of &lt;a href="https://web.archive.org/web/20160522055845/http://www.cl-p.com/outage/mobile.aspx" target="_self"&gt;Connecticut Light and Power Outages&lt;/a&gt; (text, formatted for mobile phone). Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/#!/CTLightandPower"&gt;CTLightandPower&lt;/a&gt;. Call&amp;#0160;800-286-2000. [Confirmed 10/27/12]&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e89085472970d-pi"&gt;&lt;img alt="Picture 11" class="asset  asset-image at-xid-6a00d8341c4f1a53ef014e89085472970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e89085472970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 11"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Connecticut&lt;/strong&gt; (New Haven). &lt;a href="https://web.archive.org/web/20160522055845/http://www.uinet.com/" target="_self"&gt;United Illuminating Outage Map&lt;/a&gt;. Call 800.722.5584.&amp;#0160;Twitter:&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/#!/unitedillum"&gt;@unitedillum&lt;/a&gt;&amp;#0160;[Confirmed 10/27/12]&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef017d3d0bc672970c-pi"&gt;&lt;img alt="Picture 50" class="asset  asset-image at-xid-6a00d8341c4f1a53ef017d3d0bc672970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef017d3d0bc672970c-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Picture 50"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Delaware&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.delmarva.com/home/emergency/maps/stormcenter/" target="_self"&gt;Delmarva Power Outage Map.&lt;/a&gt;&amp;#0160;&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/http://www.delmarva.com/home/emergency/maps/stormcenter/data/thematic/current/thematic_areas.xml" target="_self"&gt;Delmarva Thematic Areas Map&lt;/a&gt;&amp;#0160;(KML). Twitter: &lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/#!/DelmarvaConnect" target="_self"&gt;DelmarvaConnect&lt;/a&gt;. The &lt;a href="https://web.archive.org/web/20160522055845/http://delmarva.com/home/emergency/mobileapp/default.aspx" target="_self"&gt;Delmarva Power mobile apps&lt;/a&gt;&amp;#0160;include support for iOS, Android, and Blackberry. [Updated 10/27/12]&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e8af05174970d-pi"&gt;&lt;img alt="Delmarva-power-outage-map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef014e8af05174970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e8af05174970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Delmarva-power-outage-map"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Florida&lt;/strong&gt; (Southern, Miami, Tampa). &lt;a href="https://web.archive.org/web/20160522055845/http://www.fplmaps.com/" target="_self"&gt;Florida Power and Light FPL Power Tracker&lt;/a&gt;. Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/insidefpl" target="_self"&gt;insidefpl&lt;/a&gt;. Report an outage:&amp;#0160;1-800-468-8243.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e8af045dc970d-pi"&gt;&lt;img alt="Fpl-florida-power-light-power-tracker" class="asset  asset-image at-xid-6a00d8341c4f1a53ef014e8af045dc970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e8af045dc970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Fpl-florida-power-light-power-tracker"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Florida&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/https://www.progress-energy.com/app/outagemaps/florida.aspx" target="_self"&gt;Progress Energy Florida Outage Map.&lt;/a&gt;&amp;#0160;Twitter: &lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/#!/progressenergy" target="_self"&gt;@progressenergy&lt;/a&gt;, &lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/progenergyfl"&gt;@ProgEnergyFL&lt;/a&gt;. Facebook: &lt;a href="https://web.archive.org/web/20160522055845/https://www.facebook.com/ProgressEnergyFlorida" target="_self"&gt;Progress Energy Florida&lt;/a&gt;. Call&amp;#0160;(800) 228-8485 with outage reports, or use the &lt;a href="https://web.archive.org/web/20160522055845/https://www.progress-energy.com/app/outageentry/default.aspx" target="_self"&gt;Progress Energy outage reporting tool&lt;/a&gt; to report online. Map below shows damage due to Tropical Storm Debby; it is updated 4 times a day. Progress Energy &lt;a href="https://web.archive.org/web/20160522055845/http://www.duke-energy.com/corporate-merger/" target="_self"&gt;merged&lt;/a&gt; with Duke Energy in 2012; though the Twitter account is still listed on the Duke Energy site, it appears to be down. Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/dukeenergy" target="_self"&gt;dukeenergy&lt;/a&gt; , @&lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/dukeenergystorm" target="_self"&gt;dukeenergystorm&lt;/a&gt; .&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef016767dc1a5b970b-pi"&gt;&lt;img alt="Progress-energy-ts-debby" class="asset  asset-image at-xid-6a00d8341c4f1a53ef016767dc1a5b970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef016767dc1a5b970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Progress-energy-ts-debby"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt; &lt;br/&gt;&lt;strong&gt;Florida&lt;/strong&gt; (Orlando). &lt;a href="https://web.archive.org/web/20160522055845/http://gis.ouc.com/outagemap/" target="_self"&gt;Orlando Utilities Commission Outage Map&lt;/a&gt;.&amp;#0160;&amp;#0160;If you need to report an outage, call the&amp;#0160;&lt;strong&gt;Emergency Service Hotline&lt;/strong&gt;&amp;#0160;at&amp;#0160;&lt;strong&gt;407.823.9150&lt;/strong&gt;&amp;#0160;(24 hours) in Orlando/Orange County and&amp;#0160;&lt;strong&gt;407.892.2210&lt;/strong&gt;&amp;#0160;(24 hours) in St. Cloud/Osceola County.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affc84a18970c-pi"&gt;&lt;img alt="Screen shot 2013-10-04 at 11.14.20 PM" class="asset  asset-image at-xid-6a00d8341c4f1a53ef019affc84a18970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affc84a18970c-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Screen shot 2013-10-04 at 11.14.20 PM"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Florida&lt;/strong&gt; (Northern, Gainesville). &lt;a href="https://web.archive.org/web/20160522055845/http://outagemap.clayelectric.com/" target="_self"&gt;Clay Electric Cooperative Outage Map.&lt;/a&gt;&amp;#0160;A Touchstone Energy Cooperative. Outage map shows diamond-shaped outage grid, plus a per-county report showing the percentage of customers out in each area. Call 1-888-434-9844 to report an outage.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef016305e5e8e7970d-pi"&gt;&lt;img alt="Clay-Electric-Florida-Outage-Map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef016305e5e8e7970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef016305e5e8e7970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Clay-Electric-Florida-Outage-Map"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt; &lt;br/&gt;&lt;strong&gt;Florida&lt;/strong&gt; (Jacksonville). &lt;a href="https://web.archive.org/web/20160522055845/https://jea.com/Outage_Info.aspx" target="_self"&gt;JEA Outage Info&lt;/a&gt;. To report a problem, call&amp;#0160;(800) 683-5542. Twitter: &lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/#!/NewsfromJEA" target="_self"&gt;@NewsfromJEA&lt;/a&gt;. News media coverage includes &lt;a href="https://web.archive.org/web/20160522055845/https://www.facebook.com/WOKVNews" target="_self"&gt;WOKV News/Talk 690 AM (Facebook).&lt;/a&gt;, &lt;a href="https://web.archive.org/web/20160522055845/http://www.wokv.com/" target="_self"&gt;WOKV.COM&lt;/a&gt;, newspaper&amp;#0160;Florida Times-Union at &lt;a href="https://web.archive.org/web/20160522055845/http://jacksonville.com/" target="_self"&gt;Jacksonville.com&lt;/a&gt;.&amp;#0160;&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef016766d962bb970b-pi"&gt;&lt;img alt="JEA-Jacksonville-Florida-Outage-Information-Map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef016766d962bb970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef016766d962bb970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="JEA-Jacksonville-Florida-Outage-Information-Map"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;strong&gt;Florida&lt;/strong&gt; (Tampa). &lt;a href="https://web.archive.org/web/20160522055845/http://www.tampaelectric.com/outagemap/" target="_self"&gt;Tampa Electric Outage Map&lt;/a&gt;. Tampa Electric is part of TECO. Call&amp;#0160;877-588-1010.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef016305e5aede970d-pi"&gt;&lt;img alt="TECO-Tampa-Electric-Outage-Map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef016305e5aede970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef016305e5aede970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="TECO-Tampa-Electric-Outage-Map"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;strong&gt;Florida&lt;/strong&gt; (Pensacola to Panama City). Gulf Power, a Southern Company. Facebook: &lt;a href="https://web.archive.org/web/20160522055845/https://www.facebook.com/GulfPowerCompany" target="_self"&gt;Gulf Power Company&lt;/a&gt;; used in times of emergency to distribute updates from their Distribution Control Center. New map: &lt;a href="https://web.archive.org/web/20160522055845/http://outagemap.gulfpower.com/external/default.html" target="_self"&gt;Gulf Power Outage Center&lt;/a&gt;. Updated October 4, 2013.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affc83976970b-pi"&gt;&lt;img alt="Screen shot 2013-10-04 at 11.09.05 PM" class="asset  asset-image at-xid-6a00d8341c4f1a53ef019affc83976970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affc83976970b-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Screen shot 2013-10-04 at 11.09.05 PM"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Florida&lt;/strong&gt; (Panhandle). &lt;a href="https://web.archive.org/web/20160522055845/http://www.outageentry.com/dvOSM4/dvOSM4.php?Client=TALQ" target="_self"&gt;Talquin Electric Cooperative Outage Status Map&lt;/a&gt;. Facebook: &lt;a href="https://web.archive.org/web/20160522055845/https://www.facebook.com/pages/Talquin-Electric-Cooperative/114279335279640" target="_self"&gt;Talquin Electric Cooperative&lt;/a&gt;. &amp;quot;Powered by DataVoice&amp;quot;. Updated October 4, 2013.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affc84832970c-pi"&gt;&lt;img alt="Screen shot 2013-10-04 at 11.12.12 PM" class="asset  asset-image at-xid-6a00d8341c4f1a53ef019affc84832970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affc84832970c-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Screen shot 2013-10-04 at 11.12.12 PM"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Florida&lt;/strong&gt; (Gainesville). &lt;a href="https://web.archive.org/web/20160522055845/https://www.gru.com/StormCentral.aspx" target="_self"&gt;Gainesville Regional Utilities&lt;/a&gt; (GRU). No maps. Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/grustormcentral" target="_self"&gt;GRUStormCentral&lt;/a&gt;. Call&amp;#0160;352-334-3434.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Georgia&lt;/strong&gt; (Atlanta, statewide). &lt;a href="https://web.archive.org/web/20160522055845/https://customerservice.southerncompany.com/Outage/OutageHome.aspx" target="_self"&gt;Georgia Power Outage Center&lt;/a&gt;&amp;#0160;. Twitter: &lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/#!/georgiapower" target="_self"&gt;@georgiapower&lt;/a&gt;.&amp;#0160;&amp;#0160;Call&amp;#0160;888-891-0938&amp;#0160;to report an outage. &lt;a href="https://web.archive.org/web/20160522055845/http://investor.southerncompany.com/images/maplayered.gif" target="_self"&gt;Southern Company service area map&lt;/a&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.gatekeeper.com/clients-georgia.html" target="_self"&gt;Georgia Power uses NaviGate from Gatekeeper Systems&lt;/a&gt;&amp;#0160;for visualization of their distribution network (case study). New: &lt;a href="https://web.archive.org/web/20160522055845/http://outagemap.georgiapower.com/external/default.html?address=" target="_self"&gt;Georgia Power Outage Map&lt;/a&gt;. Map credit: iFactor.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0192ab1a2b52970d-pi"&gt;&lt;img alt="Georgia-Power-Outage-Map-2013-June-13" class="asset  asset-image at-xid-6a00d8341c4f1a53ef0192ab1a2b52970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0192ab1a2b52970d-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Georgia-Power-Outage-Map-2013-June-13"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Georgia&lt;/strong&gt; (NE of Atlanta, Athens). &lt;a href="https://web.archive.org/web/20160522055845/http://jemc.maps.sienatech.com/" target="_self"&gt;Jackson EMC Outage Map&lt;/a&gt;. Map hosted by Sienatech.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015432f44017970c-pi"&gt;&lt;img alt="Georgia-jackson-emc" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015432f44017970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015432f44017970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Georgia-jackson-emc"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;strong&gt;Georgia&lt;/strong&gt; (NW of Atlanta, Cobb County). &lt;a href="https://web.archive.org/web/20160522055845/http://www.outageentry.com/dvosm/dvOSM2.php?Client=greys" target="_self"&gt;GreyStone Power Outage Status Map&lt;/a&gt;. Map powered by dataVoice. Unusually, this map reports outages by substation as well as by city and county.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0167667f6ca0970b-pi"&gt;&lt;img alt="Greystone-power-georgia-map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef0167667f6ca0970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0167667f6ca0970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Greystone-power-georgia-map"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;strong&gt;Georgia&lt;/strong&gt; (NE of Atlanta). &lt;a href="https://web.archive.org/web/20160522055845/http://www.sawnee.com/content/current-outages" target="_self"&gt;Sawnee EMC Current Outages&lt;/a&gt;. The Twitter account @&lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/SawneeAssist" target="_self"&gt;SawneeAssist&lt;/a&gt; is protected. A &lt;a href="https://web.archive.org/web/20160522055845/http://sawneearcgis.sawnee.com/sawnee.apps/outage-mobile/index.html" target="_self"&gt;mobile outage map&lt;/a&gt; is set up for smart phones and tablets. Service area map.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01a3fcbabd3a970b-pi"&gt;&lt;img alt="Sawnee-emc-service-area-map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01a3fcbabd3a970b img-responsive" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01a3fcbabd3a970b-580wi" style="width: 578px; display: block; margin-left: auto; margin-right: auto;" title="Sawnee-emc-service-area-map"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hawaii&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.heco.com/" target="_self"&gt;Hawaiian Electric Company (HECO).&lt;/a&gt;&amp;#0160;No maps.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Idaho&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.idahopower.com/AboutUs/serviceMap/default.cfm" target="_self"&gt;Idaho Power Service Area Map&lt;/a&gt; (no outage information). Follow @&lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/idahopower" target="_self"&gt;idahopower&lt;/a&gt; on Twitter or the &lt;a href="https://web.archive.org/web/20160522055845/https://www.facebook.com/idahopower" target="_self"&gt;Idaho Power Facebook page&lt;/a&gt; for information during severe power outage incidents.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Illinois&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.illinoisoutage.com/" target="_self"&gt;Ameren llinois Outage Center&lt;/a&gt;;&lt;a href="https://web.archive.org/web/20160522055845/http://www.ameren.com/Media/Pages/Serviceterritory.aspx" target="_self"&gt; Ameren Service Territory Map&lt;/a&gt; (includes Missouri)&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e891f991a970d-pi"&gt;&lt;img alt="Illinois-ameren" class="asset  asset-image at-xid-6a00d8341c4f1a53ef014e891f991a970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e891f991a970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Illinois-ameren"/&gt;&lt;/a&gt; &lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e892bccae970d-pi"&gt;&lt;img alt="Ameren provides energy to customers in Illinois and Missouri" class="asset  asset-image at-xid-6a00d8341c4f1a53ef014e892bccae970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e892bccae970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Ameren provides energy to customers in Illinois and Missouri"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 11pt;"&gt;&lt;strong&gt;Illinois&lt;/strong&gt; (Chicago area, northeast): &lt;a href="https://web.archive.org/web/20160522055845/https://www.comed.com/_layouts/comedsp/OutageMap.aspx" target="_self"&gt;ComEd Outage Map&lt;/a&gt;. Call&amp;#0160;1-800-Edison-1 to report a downed power line.&amp;#0160;For News Media Inquiries, contact ComEd Media Relations at +&lt;big&gt;1 312 394 3500. ComEd is an &lt;a href="https://web.archive.org/web/20160522055845/http://www.exeloncorp.com/" target="_self"&gt;Exelon&lt;/a&gt; company. &lt;a href="https://web.archive.org/web/20160522055845/http://www.exeloncorp.com/contactus.aspx" target="_self"&gt;Exelon Corporation: Contact Us&lt;/a&gt;.&lt;/big&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015432e520bf970c-pi"&gt;&lt;img alt="Illinois-comed" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015432e520bf970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015432e520bf970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Illinois-comed"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;strong&gt;Indiana&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.duke-energy.com/indiana/outages/current.asp#outagemap" target="_self"&gt;Duke Energy Current Outage Map&lt;/a&gt;. If the power goes out, call&amp;#0160;1-800-343-3525. [Updated 10/27/12]&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://www.duke-energy.com/externaldata/midwestoutages/in/indiana_outage_map.png"&gt;&lt;img alt="image from www.duke-energy.com" class="asset  asset-image at-xid-6a00d8341c4f1a53ef016305905d49970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef016305905d49970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="image from www.duke-energy.com"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Indiana&lt;/strong&gt; (northwest). &lt;a href="https://web.archive.org/web/20160522055845/https://www.indianamichiganpower.com/outages/" target="_self"&gt;Indiana Michigan Power Outages and Problems map&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Indiana&lt;/strong&gt; (north) &lt;a href="https://web.archive.org/web/20160522055845/http://www.nipscooutages.com/WSSNisourceOutageMap/outagemap.html?action=city&amp;amp;reloaded=true" target="_self"&gt;NIPSCO Current Power Outages.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Indiana&lt;/strong&gt; (Indianapolis). &lt;a href="https://web.archive.org/web/20160522055845/http://apps.iplpower.com/outages/outagemap.aspx" target="_self"&gt;Indianapolis Power and Light Company OutageMap&lt;/a&gt;.&amp;#0160;If you are currently experiencing an outage, please call 317-261-8111.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015433320ac2970c-pi"&gt;&lt;img alt="Picture 49" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015433320ac2970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015433320ac2970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 49"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Iowa&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://outages.iowarec.org/" target="_self"&gt;Iowa Association of Electric Cooperatives Outages&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01538f52a633970b-pi"&gt;&lt;img alt="Picture 39" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01538f52a633970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01538f52a633970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 39"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Iowa&lt;/strong&gt;. MidAmerican Energy &lt;a href="https://web.archive.org/web/20160522055845/http://www.midamericanenergy.com/storm/OutageWatch/MECOutageWatch.aspx" target="_self"&gt;MEC Outage Watch&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015432e9f43b970c-pi"&gt;&lt;img alt="Picture 15" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015432e9f43b970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015432e9f43b970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 15"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Kansas &lt;/strong&gt;(Kansas City). &lt;a href="https://web.archive.org/web/20160522055845/http://www.kcpl.com/kcmaps/frameset_menus.htm" target="_self"&gt;Kansas City Power and Light Powerwatch&lt;/a&gt;. Powered by &lt;a href="https://web.archive.org/web/20160522055845/http://www.linkedin.com/company/obvient-strategies" target="_self"&gt;Obvient Strategies&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef016765246913970b-pi"&gt;&lt;img alt="Picture 12" class="asset  asset-image at-xid-6a00d8341c4f1a53ef016765246913970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef016765246913970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 12"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Kansas &lt;/strong&gt;(Topeka, Wichita).&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/https://www-11.westarenergy.com/outagemaps/outagemap.asp" target="_self"&gt;Westar Energy Outage Map.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015432e86bb4970c-pi"&gt;&lt;img alt="Picture 12" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015432e86bb4970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015432e86bb4970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 12"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;strong&gt;Kentucky&lt;/strong&gt; (Louisville, statewide). &lt;a href="https://web.archive.org/web/20160522055845/http://stormcenter.lge-ku.com/default.html" target="_self"&gt;LG&amp;amp;E / KU / ODP Outage Map&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015433320358970c-pi"&gt;&lt;img alt="Picture 48" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015433320358970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015433320358970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 48"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Kentucky&lt;/strong&gt; (eastern). &lt;a href="https://web.archive.org/web/20160522055845/https://www.kentuckypower.com/outages/" target="_self"&gt;Kentucky Power Outages and Problems&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Kentucky &lt;/strong&gt;(Lexington). &lt;a href="https://web.archive.org/web/20160522055845/http://outage.bgenergy.com/" target="_self"&gt;Blue Grass Energy Outage Viewer&lt;/a&gt;.&amp;#0160;To report a power outage please call 1-888-655-4243.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Louisiana&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://outage.cleco.com/scripts/ClecoOutageMap.dll/$" target="_self"&gt;CLECO Current Power Outage Information&lt;/a&gt;. Map shows overlay of weather radar, with Hurricane Isaac of 2012 displayed.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef017c31876e7a970b-pi"&gt;&lt;img alt="Cleco-Isaac-Weather-Overlay" class="asset  asset-image at-xid-6a00d8341c4f1a53ef017c31876e7a970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef017c31876e7a970b-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Cleco-Isaac-Weather-Overlay"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Louisiana&lt;/strong&gt;. (Lafayette) &lt;a href="https://web.archive.org/web/20160522055845/http://www.slemco.com/site.php?pageID=350" target="_self"&gt;SLEMCO Current Outages&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Louisiana&lt;/strong&gt; (New Orleans).&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/http://viewoutage.entergy.com/la.aspx" target="_self"&gt;Entergy Storm Center&lt;/a&gt;. This screen shows outages reported just after Hurricane Isaac made landfall in 2012.&amp;#0160;Mobile access via the&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/http://www.entergy.com/app/" target="_self"&gt;Entergy App&lt;/a&gt;&amp;#0160;(iPhone).&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0177446460eb970d-pi"&gt;&lt;img alt="Entergy-Louisiana-Isaac-Landfall" class="asset  asset-image at-xid-6a00d8341c4f1a53ef0177446460eb970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0177446460eb970d-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Entergy-Louisiana-Isaac-Landfall"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Louisiana&lt;/strong&gt; (Slidell). &lt;a href="https://web.archive.org/web/20160522055845/http://ebill.wste.coop/oms/outageMap" target="_self"&gt;Washington - St Tammany Electric Cooperative Storm Center&lt;/a&gt;. Detail view shown; note that the outage reporting lets you gather detail down to the substation and feeder level. A Touchstone Energy partner.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0176177e090e970c-pi"&gt;&lt;img alt="Washington-St-Tammany-Isaac" class="asset  asset-image at-xid-6a00d8341c4f1a53ef0176177e090e970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0176177e090e970c-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Washington-St-Tammany-Isaac"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Louisiana&lt;/strong&gt; (Shreveport): &lt;a href="https://web.archive.org/web/20160522055845/https://www.swepco.com/outages/" target="_self"&gt;SWEPCO Outages and Problems&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Maine.&amp;#0160;&lt;/strong&gt;Transmission and distribution map for utilities statewide, from the &lt;a href="https://web.archive.org/web/20160522055845/http://www.maine.gov/mpuc/electricity/index.shtml" target="_self"&gt;Maine Public Utilities Commission&lt;/a&gt;. [Updated 11/2/14]&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01b8d0890243970c-pi"&gt;&lt;img alt="Maine-transmission-distribution-map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01b8d0890243970c img-responsive" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01b8d0890243970c-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Maine-transmission-distribution-map"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Maine&lt;/strong&gt; (Augusta): &lt;a href="https://web.archive.org/web/20160522055845/http://www.cmpco.com/Outages/outageinformation.html" target="_self"&gt;Central Maine Power outage reporting&lt;/a&gt; (no maps). &lt;a href="https://web.archive.org/web/20160522055845/http://www.cmpco.com/MediaLibrary/3/6/Content%20Management/Outages/PDFsandDocs/srvctrmap.pdf" target="_self"&gt;CMP Service area map&lt;/a&gt; (PDF). To report an outage, call 1-800-696-1000. Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/cmpco" target="_self"&gt;CMPCo&lt;/a&gt;&amp;#0160;[Updated 11/2/14]&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Maine.&amp;#0160;&lt;/strong&gt;Bangor Hydro and Maine Public Service merged in January 2014 to form Emera Maine. The &lt;a href="https://web.archive.org/web/20160522055845/http://apps.bhe.com/about/outages/Outage_Map.cfm" target="_self"&gt;Emera Maine outage map&lt;/a&gt; also includes detail on every single outage in the service territory, and a total count of outages system wide. Contact&amp;#0160;1-855-EMERA-11 for more info.&amp;#0160;Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/emerame" target="_self"&gt;EmeraME&lt;/a&gt;. [Updated 11/2/14].&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01a73d8eb231970d-pi"&gt;&lt;img alt="Emera-Maine-outage-map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01a73d8eb231970d img-responsive" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01a73d8eb231970d-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Emera-Maine-outage-map"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Maine&lt;/strong&gt; (Bangor): &lt;a href="https://web.archive.org/web/20160522055845/http://apps.bhe.com/about/outages/Outage_Map.cfm" target="_self"&gt;Bangor Hydro outage map&lt;/a&gt;. Merged with Maine Public Service to form Emera Maine.&amp;#0160;[Updated 3/12/14]. Old service territory map.&lt;/p&gt;
&lt;p&gt;&amp;#0160;&lt;/p&gt;
&lt;div class="photo-wrap photo-xid-6a00d8341c4f1a53ef01676136f8d0970b" id="photo-xid-6a00d8341c4f1a53ef01676136f8d0970b" style="display: block; margin-left: auto; margin-right: auto; width: 500px;"&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01676136f8d0970b-pi"&gt;&lt;img alt="Servicearea" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01676136f8d0970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01676136f8d0970b-500wi" title="Servicearea"/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&amp;#0160;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Maryland. &lt;/strong&gt;Electric utility service area map, as of 2008; from &lt;a href="https://web.archive.org/web/20160522055845/http://esm.versar.com/pprp/factbook/distribution.htm" target="_self"&gt;PPRP&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt; &lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0162fbfff442970d-pi"&gt;&lt;img alt="ProposedTranmissionLines08-1" class="asset  asset-image at-xid-6a00d8341c4f1a53ef0162fbfff442970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0162fbfff442970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="ProposedTranmissionLines08-1"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Maryland&lt;/strong&gt; (Baltimore area, BWI): &lt;a href="https://web.archive.org/web/20160522055845/http://outagemap.bge.com/" target="_self"&gt;Baltimore Gas and Electric power outage map&lt;/a&gt;.&amp;#0160;Power Out or Downed Wire? Call 877-778-2222. Media only:&amp;#0160;888.232.1919 . An Exelon Company. [Updated 3/12/14]&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01a3fcd3cbd5970b-pi"&gt;&lt;img alt="Baltimore-Gas-Electric-outage-map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01a3fcd3cbd5970b img-responsive" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01a3fcd3cbd5970b-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Baltimore-Gas-Electric-outage-map"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Maryland&lt;/strong&gt; (Delmarva),&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/http://www.delmarva.com/home/emergency/maps/stormcenter/" target="_self"&gt;Delmarva Power Outage Map.&lt;/a&gt;&amp;#0160;(See listing under Delaware). Download a &lt;a href="https://web.archive.org/web/20160522055845/http://www.delmarva.com/home/emergency/mobileapp/" target="_self"&gt;mobile app from Delmarva Power&lt;/a&gt;. [Updated 3/12/14].&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01a51183b069970c-pi"&gt;&lt;img alt="Delmarva-Power-Outage-Map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01a51183b069970c img-responsive" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01a51183b069970c-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Delmarva-Power-Outage-Map"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Maryland&lt;/strong&gt;: Allegheny Power, A FirstEnergy Corporation. &lt;a href="https://web.archive.org/web/20160522055845/http://outages.firstenergycorp.com/mdwv.html" target="_self"&gt;Allegheny Power Outages Map&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Maryland&lt;/strong&gt; (Delmarva): &lt;a href="https://web.archive.org/web/20160522055845/http://choptankelectric.com/outages/" target="_self"&gt;Choptank Electric Cooperative Outages&lt;/a&gt;.&amp;#0160;Choptank serves 9 counties on Maryland&amp;#39;s Eastern Shore: Caroline, Cecil, Dorchester, Kent, Queen Anne&amp;#39;s, Somerset, Talbot, Wicomico, Worcester. [Updated 3/12/14].&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01a3fcd3cf1a970b-pi"&gt;&lt;img alt="Choptank-Electric-Cooperative-Outages" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01a3fcd3cf1a970b img-responsive" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01a3fcd3cf1a970b-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Choptank-Electric-Cooperative-Outages"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Maryland (&lt;/strong&gt;DC suburbs&lt;strong&gt;)&lt;/strong&gt;:&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/http://www.pepco.com/home/emergency/maps/stormcenter/" target="_self"&gt;Pepco StormCenter&lt;/a&gt;. KML:&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/http://www.pepco.com/home/emergency/maps/stormcenter/data/thematic/current/thematic_areas.xml" target="_self"&gt;Pepco Thematic Areas Map&lt;/a&gt;. Stay away from downed wires, call&amp;#0160;1-877-737-2662 to report an outage.&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/http://www.pepco.com/contact/media/" target="_self"&gt;Media relations&lt;/a&gt;&amp;#0160;(reporters only):&amp;#0160;&amp;#0160;202/872-2680&amp;#0160;Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/PepcoConnect" target="_self"&gt;PepcoConnect&lt;/a&gt;&amp;#0160;8a-5p M-F. [Updated 3/12/14].&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01a73d8ec83c970d-pi"&gt;&lt;img alt="Pepco-Storm-Center-Outage-Map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01a73d8ec83c970d img-responsive" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01a73d8ec83c970d-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Pepco-Storm-Center-Outage-Map"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Maryland&lt;/strong&gt; (Southern): Southern Maryland Electric Cooperative. &lt;a href="https://web.archive.org/web/20160522055845/http://outage.smeco.coop/" target="_self"&gt;SMECO Outage Map&lt;/a&gt;. Report an outage: 1-877-747-6326.&amp;#0160;[Updated 3/12/14].&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01a3fcd3ce65970b-pi"&gt;&lt;img alt="SMECO-Outage-Map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01a3fcd3ce65970b img-responsive" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01a3fcd3ce65970b-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="SMECO-Outage-Map"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Massachusetts&lt;/strong&gt;. (Mass. Electric): &lt;a href="https://web.archive.org/web/20160522055845/http://www1.nationalgridus.com/masselectric/stormcenter/" target="_self"&gt;National Grid Outage Map&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef016766eb412f970b-pi"&gt;&lt;img alt="National-Grid-Massachusetts-Outage-Map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef016766eb412f970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef016766eb412f970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="National-Grid-Massachusetts-Outage-Map"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Massachusetts&lt;/strong&gt; (WMECO, Springfield, Amherst) &lt;a href="https://web.archive.org/web/20160522055845/http://www.wmeco.com/outage/outagemap.aspx"&gt;Western Massachusetts Electric Outage Map&lt;/a&gt;. WMECO delivers power to more than 200,000 customers in 59 towns in western MA. Twitter @&lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/wmeco" target="_self"&gt;WMECO&lt;/a&gt; monitored during business hours. A Northeast Utilities company. A subscriber has built their own &lt;a href="https://web.archive.org/web/20160522055845/http://muffinlabs.com/content/simple-wmeco-outage-page" target="_self"&gt;WMECO service outage page&lt;/a&gt;&amp;#0160;suitable for mobile phones.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01538f1549fe970b-pi"&gt;&lt;img alt="Picture 13" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01538f1549fe970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01538f1549fe970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 13"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;strong&gt;Massachusetts&lt;/strong&gt; (Cape Cod, Boston): &lt;a href="https://web.archive.org/web/20160522055845/http://outagemap.nstar.com/outage/OutageMap.aspx" target="_self"&gt;NSTAR Outage Map&lt;/a&gt;. For mobile devices or low bandwidth: &lt;a href="https://web.archive.org/web/20160522055845/http://outagemap.nstar.com/outage/mobile.aspx" target="_self"&gt;NSTAR Outages&lt;/a&gt;.&amp;#0160;Call to report a power outage.&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/tel:1-800-592-2000"&gt;1-800-592-2000&lt;/a&gt;. Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/NSTAR_News" target="_self"&gt;NSTAR_News&lt;/a&gt;. [Added 10/29/12]&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef017c32e8e3d2970b-pi"&gt;&lt;img alt="Picture 54" class="asset  asset-image at-xid-6a00d8341c4f1a53ef017c32e8e3d2970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef017c32e8e3d2970b-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Picture 54"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Michigan&lt;/strong&gt; (statewide). &lt;a href="https://web.archive.org/web/20160522055845/http://www.michigan.gov/mpsc" target="_self"&gt;Michigan Public Service Commission&lt;/a&gt;. Statewide energy regulator. &lt;a href="https://web.archive.org/web/20160522055845/http://www.dleg.state.mi.us/mpsc/electric/map.htm" target="_self"&gt;Michigan Electric Utility Service Area Map&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01539174e5b1970b-pi"&gt;&lt;img alt="Michigan-electric-service-areas" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01539174e5b1970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01539174e5b1970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Michigan-electric-service-areas"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Michigan&lt;/strong&gt; (Central Upper Peninsula, Ishpeming, Negaunee, Escanaba, Houghton, Hancock): &lt;a href="https://web.archive.org/web/20160522055845/http://www.uppco.com/outagesummary/view/outagegrid.aspx" target="_self"&gt;Upper Peninsula Power Compan Current Electric Outages&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015392edbb63970b-pi"&gt;&lt;img alt="Picture 7" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015392edbb63970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015392edbb63970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 7"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;&lt;strong&gt;Michigan&lt;/strong&gt; (City of Detroit municipal system). &lt;a href="https://web.archive.org/web/20160522055845/http://www.detroitmi.gov/Departments/PublicLighting/tabid/143/Default.aspx" target="_self"&gt;Detroit Department of Public Lighting&lt;/a&gt;&amp;#0160;(no maps). Contact&amp;#0160;(313) 267-7202.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Michigan&lt;/strong&gt; (Detroit metro area, DTW). &lt;a href="https://web.archive.org/web/20160522055845/http://www.dteenergy.com/map/outage.html" target="_self"&gt;DTE Energy Outage Map&lt;/a&gt;&amp;#0160;(interactive), &lt;a href="https://web.archive.org/web/20160522055845/http://www.dteenergy.com/map/zipCodeOutageMap.pdf" target="_self"&gt;DTE Zip Code Outage Map&lt;/a&gt; (PDF). iPhone users can download the &lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/vacuum/2011/09/dte-energy-has-new-iphone-app-for-outage-reporting-and-tracking.html" target="_self"&gt;DTE iPhone outage tracker app&lt;/a&gt;&amp;#0160;for free. Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/dte_energy" target="_self"&gt;DTE_Energy&lt;/a&gt; . Call&amp;#0160;800-477-4747. &lt;a href="https://web.archive.org/web/20160522055845/http://dteenergy.mediaroom.com/index.php?s=74" target="_self"&gt;Media relations&lt;/a&gt;: &amp;#0160;313-235-5555.&amp;#0160;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01538f11bc1a970b-pi"&gt;&lt;img alt="Michigan-dte-energy" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01538f11bc1a970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01538f11bc1a970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Michigan-dte-energy"/&gt;&lt;/a&gt;&lt;strong&gt;&amp;#0160;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e894c8af2970d-pi"&gt;&lt;img alt="ZipCodeOutageMap" class="asset  asset-image at-xid-6a00d8341c4f1a53ef014e894c8af2970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e894c8af2970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="ZipCodeOutageMap"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Michigan&lt;/strong&gt; (central, western, northern Lower Peninsula) &lt;a href="https://web.archive.org/web/20160522055845/http://www.consumersenergy.com/content.aspx?id=1228" target="_self"&gt;Consumers Energy: Report an Electric Outage&lt;/a&gt; (no outage maps). &lt;a href="https://web.archive.org/web/20160522055845/http://www.consumersenergy.com/content.aspx?id=2021" target="_self"&gt;Electric and Gas Service Territories&lt;/a&gt;. If you are news media: &lt;a href="https://web.archive.org/web/20160522055845/http://www.consumersenergy.com/content.aspx?id=1811" target="_self"&gt;Consumers Energy Media Contacts&lt;/a&gt;. Twitter: &lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/consumersenergy" target="_self"&gt;@consumersenergy&lt;/a&gt;&amp;#0160;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://www.consumersenergy.com/uploadedImages/CEWEB/SHARED/Service_Maps/consumers-energy-electric-and-gas-service-territory-map.jpg?n=7971"&gt;&lt;img alt="image from www.consumersenergy.com" class="asset  asset-image at-xid-6a00d8341c4f1a53ef014e892c15e7970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e892c15e7970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="image from www.consumersenergy.com"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;strong&gt;Michigan&lt;/strong&gt; (southwest). &lt;a href="https://web.archive.org/web/20160522055845/http://www.aepcustomer.com/outagemap/main.aspx?region=im" target="_self"&gt;Indiana Michigan Power Outage Map&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e894c8cb3970d-pi"&gt;&lt;img alt="Picture 43" class="asset  asset-image at-xid-6a00d8341c4f1a53ef014e894c8cb3970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e894c8cb3970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 43"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Minnesota&lt;/strong&gt; (statewide). Minnesota Geospatial Information Office &lt;a href="https://web.archive.org/web/20160522055845/http://www.mngeo.state.mn.us/chouse/utilities.html" target="_self"&gt;Public Utilities Infrastructure Information for Minnesota&lt;/a&gt;. Electric, natural gas, water and sewer maps. Detailed statewide electric utility service area boundaries are not currently available. A detailed &lt;a href="https://web.archive.org/web/20160522055845/http://www.gda.state.mn.us/maps/ElecTran07.pdf" target="_self"&gt;Minnesota electric transmission lines and substations map from 2007&lt;/a&gt; shows service of 60 kV or larger; this map is an excerpt.&amp;#0160;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e8b68a106970d-pi"&gt;&lt;img alt="Minnesota-electric-transmission-2007-excerpt" class="asset  asset-image at-xid-6a00d8341c4f1a53ef014e8b68a106970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e8b68a106970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Minnesota-electric-transmission-2007-excerpt"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Minnesota&lt;/strong&gt; (Duluth). &lt;a href="https://web.archive.org/web/20160522055845/http://mnpower.outagemaps.com/core_site/mnpower.html" target="_self"&gt;Minnesota Power Outage Map&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015433a87a86970c-pi"&gt;&lt;img alt="Picture 4" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015433a87a86970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015433a87a86970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 4"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Minnesota&lt;/strong&gt; (Northeast). &lt;a href="https://web.archive.org/web/20160522055845/http://mi.lcp.coop:82/Outages" target="_self"&gt;Lake Country Power Outage Viewer&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Mississippi&lt;/strong&gt; (Western). &lt;a href="https://web.archive.org/web/20160522055845/http://viewoutage.entergy.com/ms.aspx" target="_self"&gt;Entergy Mississippi Storm Center&lt;/a&gt;.&amp;#0160;Mobile access via the&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/http://www.entergy.com/app/" target="_self"&gt;Entergy App&lt;/a&gt;&amp;#0160;(iPhone). Facebook: &lt;a href="https://web.archive.org/web/20160522055845/https://www.facebook.com/EntergyMS" target="_self"&gt;Entergy Mississippi&lt;/a&gt;. Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/entergyms" target="_self"&gt;entergyms&lt;/a&gt; . For storm alerts, text REG to 368374. To report a power outage, call&amp;#0160;1-800-9OUTAGE. Entergy also serves adjacent Louisiana, Arkansas, and Texas customers with outage reporting on the same map.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affc8511d970c-pi"&gt;&lt;img alt="Screen shot 2013-10-04 at 11.21.03 PM" class="asset  asset-image at-xid-6a00d8341c4f1a53ef019affc8511d970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affc8511d970c-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Screen shot 2013-10-04 at 11.21.03 PM"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Mississippi&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.mississippipower.com/" target="_self"&gt;Mississippi Power&lt;/a&gt;.&amp;#0160;&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/https://www.facebook.com/pages/Mississippi-Power/132875910121051" target="_self"&gt;Facebook: Mississippi Power&lt;/a&gt;.&amp;#0160;If you lose power, call 1-800-ITS-DARK (1-800-487-3275). Map: &lt;a href="https://web.archive.org/web/20160522055845/http://outagemap.mississippipower.com/external/default.html" target="_self"&gt;Mississippi Power Outage Map&lt;/a&gt;. Updated October 4, 2013.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affc84e61970c-pi"&gt;&lt;img alt="Screen shot 2013-10-04 at 11.18.37 PM" class="asset  asset-image at-xid-6a00d8341c4f1a53ef019affc84e61970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affc84e61970c-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Screen shot 2013-10-04 at 11.18.37 PM"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Mississippi&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.coastepa.com/" target="_self"&gt;Coast Electric Power Association&lt;/a&gt; (no maps). Report an outage:&amp;#0160;877-7MY-CEPA. Facebook: &lt;a href="https://web.archive.org/web/20160522055845/https://www.facebook.com/coastelectric" target="_self"&gt;Coast Electric&lt;/a&gt;. Serves 77,000 customers in southern Mississippi.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Missouri&amp;#0160;&lt;/strong&gt;(Kansas City, Independence).&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/http://www.kcpl.com/kcmaps/frameset_menus.htm" target="_self"&gt;Kansas City Power and Light Powerwatch&lt;/a&gt;. &amp;quot;Powered by Obvient Strategies&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01543325b855970c-pi"&gt;&lt;img alt="Picture 35" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01543325b855970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01543325b855970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 35"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&amp;#0160;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Missouri&lt;/strong&gt; (St Louis area): &lt;a href="https://web.archive.org/web/20160522055845/http://apps.ameren.com/outage/OutageMap.aspx?state=MO" target="_self"&gt;Ameren Power Outage Map&lt;/a&gt;; &lt;a href="https://web.archive.org/web/20160522055845/http://www.ameren.com/Media/Pages/Serviceterritory.aspx" target="_self"&gt;Ameren Service Territory Map&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://www.ameren.com/SiteCollectionImages/Charts/ADC.Media.Service_territory.Photo01.jpg"&gt;&lt;img alt="image from www.ameren.com" class="asset  asset-image at-xid-6a00d8341c4f1a53ef0154330b9536970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0154330b9536970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="image from www.ameren.com"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;strong&gt;Missouri&lt;/strong&gt; (west of St Louis): &lt;a href="https://web.archive.org/web/20160522055845/http://www.cuivre.com/NewsCenter/LiveOutageViewer/tabid/129/Default.aspx" target="_self"&gt;Cuivre River Electric Outage Viewer&lt;/a&gt;.&amp;#0160;Please call 1-800-392-3709 to report an outage. &lt;a href="https://web.archive.org/web/20160522055845/http://209.206.198.218:81/" target="_self"&gt;Smart phone link&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affc78c69970d-pi"&gt;&lt;img alt="Screen shot 2013-10-04 at 5.35.56 PM" class="asset  asset-image at-xid-6a00d8341c4f1a53ef019affc78c69970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affc78c69970d-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Screen shot 2013-10-04 at 5.35.56 PM"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Missouri&lt;/strong&gt; (Southwest, Joplin area): &lt;a href="https://web.archive.org/web/20160522055845/https://www.empiredistrict.com/Outages/OutageMap.aspx" target="_self"&gt;Empire District Outage Map.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef017c318a7fd5970b-pi"&gt;&lt;img alt="Empire-Service-Area" class="asset  asset-image at-xid-6a00d8341c4f1a53ef017c318a7fd5970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef017c318a7fd5970b-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Empire-Service-Area"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Montana&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.northwesternenergy.com/" target="_self"&gt;Northwestern Energy&lt;/a&gt;. (No maps.) In June 2011, a fawn dropped by an eagle cut power to a neighborhood in East Missoula, affecting about 30 homes (&lt;a href="https://web.archive.org/web/20160522055845/http://www.reuters.com/article/2011/06/17/us-deer-power-idUSTRE75G6J520110617" target="_self"&gt;Reuters story&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Nebraska&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.nppd.com/StormCenter/default/default.aspx" target="_self"&gt;Nebraska Public Power District Storm Center Outage Map&lt;/a&gt;. Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/nppdstormcenter" target="_self"&gt;NPPDstormcenter&lt;/a&gt;.&amp;#0160;If you have an outage and get your electric bill from NPPD, call us at (toll free):&amp;#0160;&lt;strong&gt;1-877-ASK-NPPD&amp;#0160;&lt;/strong&gt;(275-6773).&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affc7b2df970b-pi"&gt;&lt;img alt="Screen shot 2013-10-04 at 8.31.56 PM" class="asset  asset-image at-xid-6a00d8341c4f1a53ef019affc7b2df970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affc7b2df970b-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Screen shot 2013-10-04 at 8.31.56 PM"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Nebraska&lt;/strong&gt;.&lt;a href="https://web.archive.org/web/20160522055845/http://ww3.oppd.com/pom/default.aspx" target="_self"&gt; Omaha Public Power District Power Outage Map.&lt;/a&gt;&amp;#0160;Outages are reported on a grid, either as absolute numbers or as % of total subscribers (shown).&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e8945ad91970d-pi"&gt;&lt;img alt="Picture 32" class="asset  asset-image at-xid-6a00d8341c4f1a53ef014e8945ad91970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e8945ad91970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 32"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Nevada&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.nvenergy.com/" target="_self"&gt;NV Energy&lt;/a&gt; (no maps).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;New Hampshire&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.nhec.com/oms.php" target="_self"&gt;New Hampshire Electric Co-op Outage Map&lt;/a&gt;. About 78,500 customers served.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;New Hampshire&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.psnh.com/outage/outagemap.aspx" target="_self"&gt;Public Service of New Hampshire Outage Map.&lt;/a&gt;&amp;#0160;Mobile site: &lt;a href="https://web.archive.org/web/20160522055845/http://www.psnh.com/outagelist/" target="_self"&gt;PSNH Outage List&lt;/a&gt;.&amp;#0160;Call to report a power outage.&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/tel:1-800-662-7764"&gt;1-800-662-7764&lt;/a&gt;. Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/psnh" target="_self"&gt;PSNH&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;#0160;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e89085170970d-pi"&gt;&lt;img alt="New-hampshire-public-service" class="asset  asset-image at-xid-6a00d8341c4f1a53ef014e89085170970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e89085170970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="New-hampshire-public-service"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;strong&gt;New Hampshire&lt;/strong&gt; (Capitol, Seacoast regions). &lt;a href="https://web.archive.org/web/20160522055845/http://www.unitil.com/outage-center/outage-updates" target="_self"&gt;Unitil Energy Outage Information&lt;/a&gt; (no maps). Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/unitil" target="_self"&gt;Unitil&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;New Jersey&lt;/strong&gt; (northern). &lt;a href="https://web.archive.org/web/20160522055845/http://wp1.coned.com/or_stormcenter/default.aspx" target="_self"&gt;Orange and Rockland Storm Center&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0153911ca901970b-pi"&gt;&lt;img alt="Orange-rockland-storm-center" class="asset  asset-image at-xid-6a00d8341c4f1a53ef0153911ca901970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0153911ca901970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Orange-rockland-storm-center"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;New Jersey&lt;/strong&gt; (Jersey Central Power and Light). &lt;a href="https://web.archive.org/web/20160522055845/http://www.firstenergycorp.com/outages/outages.do?state_code=NJ" target="_self"&gt;FirstEnergy Current System Outage Map&lt;/a&gt;. Phone&amp;#0160;1-888-544-4877.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015434f01b49970c-pi"&gt;&lt;img alt="Jersey-central-power-light" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015434f01b49970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015434f01b49970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Jersey-central-power-light"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;strong&gt;New Jersey&lt;/strong&gt; (Bergen, Essex, Hudson, Mercer, Middlesex, Passaic, Somerset and Union counties): &lt;a href="https://web.archive.org/web/20160522055845/http://www.pseg.com/home/customer_service/outage_info/outagemap.jsp" target="_self"&gt;PSE&amp;amp;G Outage Center&lt;/a&gt;. PSE&amp;amp;G, NJ&amp;#39;s largest utility, services 2.1 million electric customers and 1.7 million gas customers. Call 800-436-PSEG.&amp;#0160;Twitter: &lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/#!/PSEGdelivers" target="_self" title="PSE&amp;amp;G Delivers"&gt;@PSEGdelivers&lt;/a&gt;. [Updated 10/29/12]&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0162fc3704b1970d-pi"&gt;&lt;img alt="Pseg-outage-center" class="asset  asset-image at-xid-6a00d8341c4f1a53ef0162fc3704b1970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0162fc3704b1970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Pseg-outage-center"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;New Jersey&lt;/strong&gt; (Atlantic City, southern). &lt;a href="https://web.archive.org/web/20160522055845/http://www.atlanticcityelectric.com/business/emergency/maps/outage/" target="_self"&gt;Atlantic City Electric Outage Map&lt;/a&gt;. KML: &lt;a href="https://web.archive.org/web/20160522055845/http://www.atlanticcityelectric.com/home/emergency/maps/stormcenter/data/thematic/current/thematic_areas.xml" target="_self"&gt;Atlantic City Electric Thematic Areas Map&lt;/a&gt;. If you see a downed line, call&amp;#0160;800-833-7476. Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/ACElecConnect" target="_self"&gt;ACElecConnect&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e8af3c21f970d-pi"&gt;&lt;img alt="Atlantic-city-electric-new-jersey" class="asset  asset-image at-xid-6a00d8341c4f1a53ef014e8af3c21f970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e8af3c21f970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Atlantic-city-electric-new-jersey"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;New Mexico&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.epelectric.com/tx/residential/trouble-and-outages" target="_self"&gt;El Paso Electric Trouble and Outages&lt;/a&gt; (no maps)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;New Mexico&lt;/strong&gt; (Albuquerque). &lt;a href="https://web.archive.org/web/20160522055845/http://www.pnm.com/customers/outage_map/home.htm" target="_self"&gt;PNM Power Outage Map&lt;/a&gt;.&amp;#0160;Call 1-888-DIAL-PNM (888-342-5766) to report your outage. This map is from the windstorms of December 1, 2011.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0162fd35734c970d-pi"&gt;&lt;img alt="Picture 20" class="asset  asset-image at-xid-6a00d8341c4f1a53ef0162fd35734c970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0162fd35734c970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 20"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;New York&lt;/strong&gt; (statewide). &lt;a href="https://web.archive.org/web/20160522055845/http://www.nyiso.com/" target="_self"&gt;New York Independent System Operator&lt;/a&gt;. Wholesale power coodination across New York State.&lt;/p&gt;
&lt;p&gt;New York /New Jersey (New York City area). &lt;a href="https://web.archive.org/web/20160522055845/http://nycpowerstatus.com/" target="_self"&gt;NYCPowerStatus.com&lt;/a&gt; has consolidated information from Con Edison, LIPA, and PSEG, with graphs that chart system outage and restoration.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;New York&lt;/strong&gt; (New York City).&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/http://apps.coned.com/stormcenter_external/default.html" target="_self"&gt;Con Edison Storm Center&lt;/a&gt;. KML: &lt;a href="https://web.archive.org/web/20160522055845/http://apps.coned.com/weboutageinfo/stormcenter/stormcenterdata/data/thematic/current/thematic_areas.xml" target="_self"&gt;ConEdison Power Outages Thematic Areas Map&lt;/a&gt;.&amp;#0160;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015434d05f2d970c-pi"&gt;&lt;img alt="Con-edison-storm-center" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015434d05f2d970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015434d05f2d970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Con-edison-storm-center"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;strong&gt;New York&lt;/strong&gt; (Long Island). &lt;a href="https://web.archive.org/web/20160522055845/http://www.lipower.org/stormcenter/outages/outagemap.html" target="_self"&gt;Long Island Power Authority Storm Center Outage Map&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e8af05b24970d-pi"&gt;&lt;img alt="New-york-long-island-power" class="asset  asset-image at-xid-6a00d8341c4f1a53ef014e8af05b24970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e8af05b24970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="New-york-long-island-power"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;strong&gt;New York&lt;/strong&gt; (Poughkeepsie, Kingston) &lt;a href="https://web.archive.org/web/20160522055845/http://stormcentral.cenhud.com/default.aspx" target="_self"&gt;Central Hudson Storm Center&lt;/a&gt;, powered by iFactor.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e8b10a77d970d-pi"&gt;&lt;img alt="Central-hudson-storm-center" class="asset  asset-image at-xid-6a00d8341c4f1a53ef014e8b10a77d970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e8b10a77d970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Central-hudson-storm-center"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;New York&lt;/strong&gt; (Buffalo, upstate).&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/http://www1.nationalgridus.com/niagaramohawk/stormcenter/" target="_self"&gt;National Grid Outage Map&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef016305f77433970d-pi"&gt;&lt;img alt="National-Grid-New-York-Outage-Map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef016305f77433970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef016305f77433970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="National-Grid-New-York-Outage-Map"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;New York&lt;/strong&gt; (Upstate). &amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/http://www.nyseg.com/Outages/outageinformation.html" target="_self"&gt;NYSEG Outage Central&lt;/a&gt;. No maps, but detailed city by city and outage by outage information in table format. Call&amp;#0160;1.800.572.1131. Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/#!/nyseandg" target="_self"&gt;NYSEandG&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;New York&lt;/strong&gt; (Rochester). &lt;a href="https://web.archive.org/web/20160522055845/http://rge.com/Outages/" target="_self"&gt;RG&amp;amp;E Outage Central.&lt;/a&gt;&amp;#0160;No maps. Outages are reported by city and by street.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;New York&lt;/strong&gt; (Rochester).&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/http://hoopycat.com/rgeoutages/" target="_self"&gt;RGE Outages&lt;/a&gt; plots the approximate locations of power outages in Rochester, New York, and is updated every ten minutes. The source data for this map is published by&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/http://www.rge.com/Outages/outageinformation.html"&gt;RG&amp;amp;E&lt;/a&gt;, but all map-related blame should go to&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/http://hoopycat.com/~rtucker/"&gt;Ryan Tucker&lt;/a&gt;.&amp;#0160;You can find the source code&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/https://github.com/rtucker/rgeoutages/"&gt;on GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;North Carolina&lt;/strong&gt;. (Charlotte, Greensboro).&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/http://www.duke-energy.com/north-carolina/outages/current.asp#outagemap" target="_self"&gt;Duke Energy Current Outages&lt;/a&gt;. Call&amp;#0160;&amp;#0160;1-800-POWERON to report outages and get an estimated time of restoration. Los clientes hispanos pueden llamar 1-866-4-APAGON. &lt;a href="https://web.archive.org/web/20160522055845/http://www.duke-energy.com/news/media-kit/mediacontacts.asp" target="_self"&gt;Media contact line&lt;/a&gt;: 800-559-3853 or&amp;#0160;704-382-8333 for news media only.&amp;#0160;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015392fdcd03970b-pi"&gt;&lt;img alt="Picture 10" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015392fdcd03970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015392fdcd03970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 10"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;North Carolina&lt;/strong&gt; (Raleigh/Durham, Asheville). &lt;a href="https://web.archive.org/web/20160522055845/https://www.progress-energy.com/app/outagemaps/carolinas.aspx" target="_self"&gt;Progress Energy Outage Map&lt;/a&gt;. An option on the map shows an outage history with restoration progress, as well as a breakdown of outages by county. KML: &lt;a href="https://web.archive.org/web/20160522055845/https://www.progress-energy.com/app/outagemapdata/CAR/thematic/current/thematic_areas.xml" target="_self"&gt;Progress Energy Thematic Areas Map&lt;/a&gt;. Powered by iFactor. Progress Energy also serves a part of eastern South Carolina.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015391269a62970b-pi"&gt;&lt;img alt="Progress-energy-outage-map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015391269a62970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015391269a62970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Progress-energy-outage-map"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt; &lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015434f9f411970c-pi"&gt;&lt;img alt="Progress-outage-history-chart" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015434f9f411970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015434f9f411970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Progress-outage-history-chart"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;North Dakota&lt;/strong&gt; (Fargo). &lt;a href="https://web.archive.org/web/20160522055845/http://www.xcelenergy.com/Outages" target="_self"&gt;Xcel Energy Outage Map&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ohio&lt;/strong&gt; (statewide). &lt;a href="https://web.archive.org/web/20160522055845/http://www.puco.ohio.gov/pucogis/eleclinks.cfm" target="_self"&gt;Electric industry maps of Ohio&lt;/a&gt;, provided by the Public Utilities Commission of Ohio.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ohio&lt;/strong&gt; (City of Cleveland): &lt;a href="https://web.archive.org/web/20160522055845/http://www.cpp.org/outageassistance.html" target="_self"&gt;Cleveland Public Power Outage Information&lt;/a&gt; (no maps). In the event of an outage, call&amp;#0160;216-664-3156. Dial 811 before digging. CPP serves much of the city of Cleveland.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0162fc58bf21970d-pi"&gt;&lt;img alt="Mdi-plan-Model" class="asset  asset-image at-xid-6a00d8341c4f1a53ef0162fc58bf21970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0162fc58bf21970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Mdi-plan-Model"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ohio:&lt;/strong&gt; (northern, Toledo, Cleveland suburbs, Youngstown): &lt;a href="https://web.archive.org/web/20160522055845/http://www.firstenergycorp.com/outages/outages.do?state_code=OH" target="_self"&gt;FirstEnergy Current System Outage Map&lt;/a&gt;. Consolidated map for Toledo Edison, Ohio Edison, and Illuminating Company. &lt;a href="https://web.archive.org/web/20160522055845/https://www.firstenergycorp.com/newsroom/media_contacts_information.html" target="_self"&gt;Media contacts&lt;/a&gt; for news media only.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0162fc67c925970d-pi"&gt;&lt;img alt="Picture 12" class="asset  asset-image at-xid-6a00d8341c4f1a53ef0162fc67c925970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0162fc67c925970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 12"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ohio&lt;/strong&gt;: (southeast, Columbus, Findlay, Athens, Canton, Chillicothe):&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/https://www.aepohio.com/outages/" target="_self"&gt;AEP Ohio Outages&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0162fc67cc96970d-pi"&gt;&lt;img alt="Picture 13" class="asset  asset-image at-xid-6a00d8341c4f1a53ef0162fc67cc96970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0162fc67cc96970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 13"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ohio&lt;/strong&gt; (south central) &lt;a href="https://web.archive.org/web/20160522055845/http://www.scp.utilities.com/ow/ow_map.aspx" target="_self"&gt;South Central Power Company Outage Map&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01539120d291970b-pi"&gt;&lt;img alt="South-central-ohio-outage-map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01539120d291970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01539120d291970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="South-central-ohio-outage-map"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ohio&lt;/strong&gt;: (Cincinnati): &lt;a href="https://web.archive.org/web/20160522055845/http://www.duke-energy.com/externaldata/midwestoutages/maps/CGEmap.htm" target="_self"&gt;Duke Energy Power Outage Map&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://www.duke-energy.com/externaldata/midwestoutages/maps/images/OhioKentuckyMap.gif"&gt;&lt;img alt="image from www.duke-energy.com" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01538f13dd48970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01538f13dd48970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="image from www.duke-energy.com"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;strong&gt;Ohio&lt;/strong&gt; (Dayton): &lt;a href="https://web.archive.org/web/20160522055845/http://www.dpandl.com/customer-service/outage-center/outage-map/" target="_self"&gt;Dayton Power and Light Outage Map&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef017615f32c85970c-pi"&gt;&lt;img alt="Picture 12" class="asset  asset-image at-xid-6a00d8341c4f1a53ef017615f32c85970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef017615f32c85970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 12"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Oklahoma&lt;/strong&gt; (southwestern): &lt;a href="https://web.archive.org/web/20160522055845/http://www.cottonelectric.com/outage/" target="_self"&gt;Cotton Electric Cooperative Outage Map&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Oklahoma&lt;/strong&gt; (Tulsa, Lawton, McAlester): &lt;a href="https://web.archive.org/web/20160522055845/https://www.psoklahoma.com/outages/Default.aspx" target="_self"&gt;PSO Outages and Problems map&lt;/a&gt;. Public Service Company of Oklahoma, a unit of AEP, serves over 530,000 customers in 45 Oklahoma counties. Twitter: &lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/#!/publicserviceco" target="_self"&gt;@publicserviceco&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015392e2650c970b-pi"&gt;&lt;img alt="Picture 4" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015392e2650c970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015392e2650c970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 4"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Oklahoma&lt;/strong&gt; (OKC): &lt;a href="https://web.archive.org/web/20160522055845/http://public.oge.com/systemwatch/" target="_self"&gt;OG&amp;amp;E System Watch map&lt;/a&gt;. Includes graphs of outages by hour of day and recent historical outage counts, plus a weather overlay. Updated every 15 minutes on the quarter hour. Twitter: &lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/OGandE" target="_self"&gt;@OGandE&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01538f214d80970b-pi"&gt;&lt;img alt="Picture 18" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01538f214d80970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01538f214d80970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 18"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Oregon &lt;/strong&gt;(Portland, Beaverton, Salem). &lt;a href="https://web.archive.org/web/20160522055845/http://www.portlandgeneral.com/safety_outages/outages/outage_updates/outage_map.aspx" target="_self"&gt;Portland General Electric Outage Map&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015434f440cf970c-pi"&gt;&lt;img alt="Portland-general-oregon-map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015434f440cf970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015434f440cf970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Portland-general-oregon-map"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;strong&gt;Pennsylvania&lt;/strong&gt; (statewide). &lt;a href="https://web.archive.org/web/20160522055845/http://www.puc.state.pa.us/" target="_self"&gt;Pennsylvania Public Utility Commission&lt;/a&gt;. Regulation and reporting on statewide energy utilities, with jurisdiction over &lt;a href="https://web.archive.org/web/20160522055845/http://www.puc.state.pa.us/electric/electric_companies.aspx" target="_self"&gt;11 electric utility companies that serve most of the commonwealth&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pennsylvania&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://ebill.citizenselectric.com/oms/outageMap" target="_self"&gt;Citizens Electric of Lewisburg outage map&lt;/a&gt;.&amp;#0160;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pennsylvania&lt;/strong&gt; (Pittsburgh). &lt;a href="https://web.archive.org/web/20160522055845/http://www.duquesnelight.com/StormCenter/" target="_self"&gt;Duquene Light Company Storm Center&lt;/a&gt;. (no maps) During storms, the Twitter account @&lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/#!/DuquesneLight" target="_self"&gt;DuquesneLight&lt;/a&gt;&amp;#0160;is updated. Area codes: 412, 878.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pennsylvania&lt;/strong&gt; (Philadelphia). &lt;a href="https://web.archive.org/web/20160522055845/http://www.peco.com/outagemap" target="_self"&gt;PECO outage map.&lt;/a&gt;&amp;#0160;Call 800-841-4141 to report an outage. PECO is an &lt;a href="https://web.archive.org/web/20160522055845/http://www.exeloncorp.com/" target="_self"&gt;Exelon&lt;/a&gt; company. Area codes: 215, 267.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01538f147bb5970b-pi"&gt;&lt;img alt="Pennsylvania-peco" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01538f147bb5970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01538f147bb5970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Pennsylvania-peco"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;strong&gt;Pennsylvania&lt;/strong&gt; (Penn Power, Penelec, Met-Ed): &lt;a href="https://web.archive.org/web/20160522055845/http://www.firstenergycorp.com/outages/outages.do?state_code=PA" target="_self"&gt;FirstEnergy Current System Outage Map - Pennsylvania&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015432f4a452970c-pi"&gt;&lt;img alt="Picture 17" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015432f4a452970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015432f4a452970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 17"/&gt;&lt;/a&gt;&lt;strong&gt;&amp;#0160;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pennsylvania&lt;/strong&gt; (suburban Pittsburgh, State College). &lt;a href="https://web.archive.org/web/20160522055845/https://app.alleghenyenergy.com/outagestatus/Map/AE_MAP1.html" target="_self"&gt;Allegheny Energy Outage Status&lt;/a&gt;. Call 1-800-255-3443 to report an outage.&amp;#0160;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0154353b6c31970c-pi"&gt;&lt;img alt="Screen shot 2011-09-07 at 2.00.55 PM" class="asset  asset-image at-xid-6a00d8341c4f1a53ef0154353b6c31970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0154353b6c31970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Screen shot 2011-09-07 at 2.00.55 PM"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pennsylvania&lt;/strong&gt; (PPL; eastern) . &lt;a href="https://web.archive.org/web/20160522055845/https://www.pplelectric.com/my-account/outage-center.aspx" target="_self"&gt;PPL Outage Map&lt;/a&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.pplelectric.com/Residential+Customers/Learning+Center/About+PPL+Electric+Utilities.htm" target="_self"&gt;PPL service territory map&lt;/a&gt;. [Updated 11/2/12]&lt;/p&gt;
&lt;p&gt;&amp;#0160;&lt;/p&gt;
&lt;div class="asset asset-image-multiple med-img-mult"&gt;
&lt;ul class="asset-thumbnails"&gt;
&lt;li class="asset-thumbnail on" tp:fulluri="http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e891dd9ef970d-pi" tp:largeuri="http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e891dd9ef970d-500wi"&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e891dd9ef970d-pi"&gt;&lt;img alt="Picture 19" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e891dd9ef970d-75pi"/&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class="asset-thumbnail" tp:fulluri="http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e891ddb46970d-pi" tp:largeuri="http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e891ddb46970d-500wi"&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e891ddb46970d-pi"&gt;&lt;img alt="Servmap_625" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e891ddb46970d-75pi"/&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="asset-image-large"&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e891dd9ef970d-pi"&gt;&lt;img alt="Servmap_625" border="0" class="at-xid-6a00d8341c4f1a53ef014e891dd9ef970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e891dd9ef970d-500wi"/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Pennsylvania&lt;/strong&gt;: &lt;a href="https://web.archive.org/web/20160522055845/https://ebill.northwesternrec.com/oms/outageMap" target="_self"&gt;Northwestern REC Outage Web Map&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affc9010f970d-pi"&gt;&lt;img alt="Screen shot 2013-10-05 at 12.15.37 AM" class="asset  asset-image at-xid-6a00d8341c4f1a53ef019affc9010f970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affc9010f970d-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Screen shot 2013-10-05 at 12.15.37 AM"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Rhode Island&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www1.nationalgridus.com/narragansett/stormcenter/" target="_self"&gt;National Grid outage map&lt;/a&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://interactives.wpri.com/out/ng/ri" target="_self"&gt;Table of Rhode Island power outages&lt;/a&gt; (text, data from National Grid, hosted by WPRI).&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015432fdd6c4970c-pi"&gt;&lt;img alt="Picture 21" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015432fdd6c4970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015432fdd6c4970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 21"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;South Carolina&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.duke-energy.com/north-carolina/outages/current.asp#outagemap" target="_self"&gt;Duke Energy Outage Map&lt;/a&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.duke-energy.com/architects-engineers/servicemap.asp" target="_self"&gt;Duke Energy Service Area Map&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0154330bdec0970c-pi"&gt;&lt;img alt="Picture 26" class="asset  asset-image at-xid-6a00d8341c4f1a53ef0154330bdec0970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0154330bdec0970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 26"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://www.duke-energy.com/images/content/ecodev_service_area_map.gif"&gt;&lt;img alt="image from www.duke-energy.com" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01538f38d602970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01538f38d602970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="image from www.duke-energy.com"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;strong&gt;South Carolina &lt;/strong&gt;(Columbia, coastal). &lt;a href="https://web.archive.org/web/20160522055845/http://www.sceg.com/en/storm-center/outage-map/" target="_self"&gt;SCE&amp;amp;G Outage Map&lt;/a&gt;. Call 800-251-7234.&amp;#0160;Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/#!/scegnews"&gt;scegnews&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015391004638970b-pi"&gt;&lt;img alt="South-carolina-sce-g" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015391004638970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015391004638970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="South-carolina-sce-g"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;South Carolina&lt;/strong&gt; (eastern, coastal). &lt;a href="https://web.archive.org/web/20160522055845/https://www.progress-energy.com/app/outagemaps/carolinas.aspx" target="_self"&gt;Progress Energy outage map&lt;/a&gt;.&amp;#0160;An option on the map shows an outage history with restoration progress, as well as a breakdown of outages by county. KML:&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/https://www.progress-energy.com/app/outagemapdata/CAR/thematic/current/thematic_areas.xml" target="_self"&gt;Progress Energy Thematic Areas Map&lt;/a&gt;. Powered by iFactor. Progress Energy also serves a part of North Carolina. Progress Energy has been acquired by Duke Energy.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0168eb7c2801970c-pi"&gt;&lt;img alt="Progress-energy-north-carolina-south-carolina-outage-map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef0168eb7c2801970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0168eb7c2801970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Progress-energy-north-carolina-south-carolina-outage-map"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;South Dakota&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.xcelenergy.com/Outages/Report_a_Problem" target="_self"&gt;Xcel Energy&lt;/a&gt;. Call&amp;#0160;1-800-895-1999. &lt;a href="https://web.archive.org/web/20160522055845/http://www.xcelenergy.com/Outages/Report_a_Problem/Outage_Map/Outage_Map" target="_self"&gt;Xcel Energy Outage Map&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;South Dakota&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.northwesternenergy.com/" target="_self"&gt;NorthWestern Energy&lt;/a&gt; (no maps). Call&amp;#0160;(800) 245-6977.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;South Dakota&lt;/strong&gt; (Rapid City). &lt;a href="https://web.archive.org/web/20160522055845/http://www.blackhillspower.com/report-outage-or-problem/current-outages" target="_self"&gt;Black Hills Power Current Outages&lt;/a&gt;. Call&amp;#0160;1-800-839-8197 to report an outage.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affc909b8970d-pi"&gt;&lt;img alt="Screen shot 2013-10-05 at 12.28.32 AM" class="asset  asset-image at-xid-6a00d8341c4f1a53ef019affc909b8970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affc909b8970d-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Screen shot 2013-10-05 at 12.28.32 AM"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;South Dakota&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://outages.sdrea.coop/" target="_self"&gt;South Dakota Rural Electric Association Outages&lt;/a&gt;. Consolidated mapping, includes Black Hills Electric Coop, Butte Electric Coop, Grand Electric Coop, West River Electric Association, and 20+ other cooperatives.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affc78011970d-pi"&gt;&lt;img alt="Screen shot 2013-10-04 at 5.23.56 PM" class="asset  asset-image at-xid-6a00d8341c4f1a53ef019affc78011970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affc78011970d-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Screen shot 2013-10-04 at 5.23.56 PM"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tennessee&lt;/strong&gt; (statewide). Tennessee Valley Authority (no outage maps). Regional map shows &lt;a href="https://web.archive.org/web/20160522055845/http://www.tva.com/power/pdf/tva_distributor_map.pdf" target="_self"&gt;TVA distribution map (PDF)&lt;/a&gt; to local power companies.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0168ebdc4888970c-pi"&gt;&lt;img alt="Tva_distributor_map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef0168ebdc4888970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0168ebdc4888970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Tva_distributor_map"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tennessee&lt;/strong&gt; (Memphis). &lt;a href="https://web.archive.org/web/20160522055845/http://azimuth.mlgw.org/" target="_self"&gt;MLGW Electric Outage Summary Map.&lt;/a&gt;&amp;#0160;First map I&amp;#39;ve seen that does outage accounting on a grid rather than by political boundaries, zip codes or internal subdivisions. Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/MLGW" target="_self"&gt;MLGW&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e891e3931970d-pi"&gt;&lt;img alt="Tennessee-mlgw" class="asset  asset-image at-xid-6a00d8341c4f1a53ef014e891e3931970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e891e3931970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Tennessee-mlgw"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tennessee&lt;/strong&gt; (Nashville). &lt;a href="https://web.archive.org/web/20160522055845/http://www.nespower.com/OutageMap/default.aspx" target="_self"&gt;Nashville Electric Service (NES) Outage Map&lt;/a&gt;. Mobile version: &lt;a href="https://web.archive.org/web/20160522055845/http://www.nespower.com/outagemapdata/gmap/mOutage5.html" target="_self"&gt;Estimated customers without power&lt;/a&gt;. Facebook: &lt;a href="https://web.archive.org/web/20160522055845/https://www.facebook.com/NESpower" target="_self"&gt;Nashville Electric Service&lt;/a&gt;. Customer service:&amp;#0160;(615) 736-6900.&lt;/p&gt;
&lt;p&gt;&amp;#0160;&amp;#0160;&amp;#0160;&amp;#0160; &lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01538f2b0d43970b-pi"&gt;&lt;img alt="Tennessee-nashville-electric-service" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01538f2b0d43970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01538f2b0d43970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Tennessee-nashville-electric-service"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;strong&gt;Tennessee&lt;/strong&gt; (southern suburbs of Nashville): &lt;a href="https://web.archive.org/web/20160522055845/http://www.mtemc.com/pages.cfm/name/o01" target="_self"&gt;Middle Tennessee Electric Membership Corporation Outages&lt;/a&gt;.&amp;#0160;&amp;#0160;Report an outage through MTEMC&amp;#39;s automated outage reporting line at 1-877-777-9111.&lt;/p&gt;
&lt;p&gt;&amp;#0160;&lt;/p&gt;
&lt;div class="photo-wrap photo-xid-6a00d8341c4f1a53ef0163007dce93970d" id="photo-xid-6a00d8341c4f1a53ef0163007dce93970d" style="display: block; margin-left: auto; margin-right: auto; width: 500px;"&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0163007dce93970d-pi"&gt;&lt;img alt="Picture 6" class="asset  asset-image at-xid-6a00d8341c4f1a53ef0163007dce93970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0163007dce93970d-500wi" title="Picture 6"/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&amp;#0160;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Texas&lt;/strong&gt;: &lt;a href="https://web.archive.org/web/20160522055845/http://www.ercot.com/" target="_self"&gt;ERCOT&lt;/a&gt;&amp;#0160;grid reliability; aggregate demand, pricing. No maps.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019b036fbfd5970d-pi"&gt;&lt;img alt="Ercot-texas-loadForecastVsActualCurrentDay" class="asset  asset-image at-xid-6a00d8341c4f1a53ef019b036fbfd5970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019b036fbfd5970d-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Ercot-texas-loadForecastVsActualCurrentDay"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Texas&lt;/strong&gt;: San Bernard Electric Coop (Columbus, Hempstead, Sealy; west of Houston)&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/http://66.63.235.29/Outages/" target="_blank"&gt;http://66.63.235.29/Outages/&lt;/a&gt;&amp;#0160;&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019b036eda5f970c-pi"&gt;&lt;img alt="San-Bernard-Outage-Viewer" class="asset  asset-image at-xid-6a00d8341c4f1a53ef019b036eda5f970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019b036eda5f970c-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="San-Bernard-Outage-Viewer"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Texas&lt;/strong&gt;: &lt;a href="https://web.archive.org/web/20160522055845/http://www.samhouston.net/storm-central" target="_self"&gt;Sam Houston Electric Cooperative Storm Central&lt;/a&gt;. Call 1-888-444-1207 to report an outage.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019b036fd570970d-pi"&gt;&lt;img alt="Sam-houston-electric-cooperative-texas" class="asset  asset-image at-xid-6a00d8341c4f1a53ef019b036fd570970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019b036fd570970d-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Sam-houston-electric-cooperative-texas"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Texas&lt;/strong&gt;: &lt;a href="https://web.archive.org/web/20160522055845/http://www.cpsenergy.com/Services/Outage_Center/index.asp" target="_self"&gt;CPS Energy Outage Center&lt;/a&gt; (San Antonio)&amp;#0160;&amp;#0160;&lt;/p&gt;
&lt;p&gt;&amp;#0160;&lt;/p&gt;
&lt;h2 class="photo-wrap photo-xid-6a00d8341c4f1a53ef01630022a633970d" id="photo-xid-6a00d8341c4f1a53ef01630022a633970d" style="display: block; margin-left: auto; margin-right: auto; width: 500px;"&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01630022a633970d-pi"&gt;&lt;img alt="Screen%20Shot%202012-01-25%20at%2010.35" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01630022a633970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01630022a633970d-500wi" title="Screen%20Shot%202012-01-25%20at%2010.35"/&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&amp;#0160;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Texas&lt;/strong&gt;: AEPTexas.com&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/https://www.aeptexas.com/outages/" target="_blank"&gt;https://www.aeptexas.com/outages/&lt;/a&gt;&amp;#0160;Outages by zipcode at the county level.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019b036fc4a2970d-pi"&gt;&lt;img alt="Aep-texas-service-area-outage-map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef019b036fc4a2970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019b036fc4a2970d-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Aep-texas-service-area-outage-map"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Texas&lt;/strong&gt; (Austin): &lt;a href="https://web.archive.org/web/20160522055845/https://my.austinenergy.com/outages/" target="_self"&gt;Austin Energy Storm Center.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01a3fae33d87970b-pi"&gt;&lt;img alt="Austin-energy-storm-center" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01a3fae33d87970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01a3fae33d87970b-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Austin-energy-storm-center"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Texas&lt;/strong&gt; (southeast of Austin, including Bastrop): &lt;a href="https://web.archive.org/web/20160522055845/http://outage.bluebonnetelectric.coop:82/" target="_self"&gt;Bluebonnet Electric Outage Viewer&lt;/a&gt;. The map depicted shows damage to the system from the Bastrop County Complex Fire and was added on September 9, 2011.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015391753580970b-pi"&gt;&lt;img alt="Bluebonnet-electric-bastrop-fire" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015391753580970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015391753580970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Bluebonnet-electric-bastrop-fire"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Texas&lt;/strong&gt; (El Paso): &lt;a href="https://web.archive.org/web/20160522055845/http://www.epelectric.com/tx/residential/trouble-and-outages" target="_self"&gt;El Paso Electric Trouble and Outage&lt;/a&gt; (no maps). Call&amp;#0160;&lt;strong&gt;(915) 877-3400 &lt;/strong&gt;to report an outage. News coverage from the &lt;a href="https://web.archive.org/web/20160522055845/http://www.elpasotimes.com/" target="_self"&gt;El Paso Times&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Texas&lt;/strong&gt; (Dallas/Fort Worth, Waco, Odessa, Midland): &lt;a href="https://web.archive.org/web/20160522055845/http://stormcenter.oncor.com/default.html" target="_self"&gt;ONCOR Storm Center.&lt;/a&gt;&amp;#0160;Powered by &lt;a href="https://web.archive.org/web/20160522055845/http://www.ifactorconsulting.com/" target="_self"&gt;iFactor&lt;/a&gt;, this map includes a weather overlay and detailed zip code and county level outage counts. &lt;a href="https://web.archive.org/web/20160522055845/http://www.epcupdates.org/2012/04/utilities-and-disasters-oncor-shows-way.html" target="_self"&gt;Review at EPC Updates&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef016766aada5f970b-pi"&gt;&lt;img alt="Oncor-storm-center-dallas-fort-worth-texas" class="asset  asset-image at-xid-6a00d8341c4f1a53ef016766aada5f970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef016766aada5f970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Oncor-storm-center-dallas-fort-worth-texas"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Texas&lt;/strong&gt; (Houston): &lt;a href="https://web.archive.org/web/20160522055845/http://gis.centerpointenergy.com/outagetracker/index.html" target="_self"&gt;CenterPoint Energy Outage Tracker&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e894e906d970d-pi"&gt;&lt;img alt="Picture 45" class="asset  asset-image at-xid-6a00d8341c4f1a53ef014e894e906d970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e894e906d970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 45"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Texas&lt;/strong&gt;: &lt;a href="https://web.archive.org/web/20160522055845/http://www.tnmp.com/about/service-area-map/index.htm?source=power-outages" target="_self"&gt;Texas New Mexico Power Service Areas&lt;/a&gt;. (no outage map)&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e89371149970d-pi"&gt;&lt;img alt="Map of TNMP's service areas throughout Texas" class="asset  asset-image at-xid-6a00d8341c4f1a53ef014e89371149970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e89371149970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Map of TNMP's service areas throughout Texas"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;strong&gt;Texas (Denton County)&lt;/strong&gt;: &lt;a href="https://web.archive.org/web/20160522055845/http://outagemap.coserv.com/external/default.html" target="_self"&gt;CoServ&lt;/a&gt;. Map includes weather overlay, powered by iFactor. Twitter: &lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/CoServ_Energy" target="_self"&gt;@CoServ_Energy&lt;/a&gt; (Updated May 7, 2015.)&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01bb082acb04970d-pi"&gt;&lt;img alt="Screen Shot 2015-05-07 at 9.00.53 PM" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01bb082acb04970d img-responsive" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01bb082acb04970d-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Screen Shot 2015-05-07 at 9.00.53 PM"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Utah&lt;/strong&gt;. Division of Public Utilities. Map of consumer owned electric utilities.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015393dff4df970b-pi"&gt;&lt;img alt="Utah-electric-map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015393dff4df970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015393dff4df970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Utah-electric-map"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Utah&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.rockymountainpower.net/ed/po/uoi.html" target="_self"&gt;Rocky Mountain Power Outages&lt;/a&gt;&amp;#0160;(no map).&amp;#0160;To report an outage or if you do not see your outage listed and would like an update, call us anytime toll free at&amp;#0160;1-877-508-5088. &amp;quot;To improve service to you, we are working to enhance our online outage information to include interactive maps in the future.&amp;quot; (December 2011)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Vermont&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.vtoutages.com/" target="_self"&gt;Vermont Outages&lt;/a&gt;. Consolidated information from 20 utilities. The map depicts damage after Hurricane Irene caused widespread flooding.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01539126a1f3970b-pi"&gt;&lt;img alt="Vermont-outages-vtoutage-map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01539126a1f3970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01539126a1f3970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Vermont-outages-vtoutage-map"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Vermont&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.cvps.com/customerservice/outages/default.aspx" target="_self"&gt;Central Vermont Public Service Outage Map&lt;/a&gt;. The map depicts outages as well as the CVPS service territory.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef016305869588970d-pi"&gt;&lt;img alt="Central-vermont-public-service-map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef016305869588970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef016305869588970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Central-vermont-public-service-map"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;strong&gt;Virginia&lt;/strong&gt; (State Corporation Commission). &lt;a href="https://web.archive.org/web/20160522055845/http://www.scc.virginia.gov/pue/elec/el_map.pdf" target="_self"&gt;Virginia Electric Utility Electric Service Territories map&lt;/a&gt; (PDF).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Virginia &lt;/strong&gt;(Norfolk, Richmond, Fairfax). &lt;a href="https://web.archive.org/web/20160522055845/http://www.dom.com/storm-center/dominion-electric-outage-map.jsp" target="_self"&gt;Dominion Electric Outage Map&lt;/a&gt;. Call&amp;#0160;1-866-366-4357. A &lt;a href="https://web.archive.org/web/20160522055845/http://www.dom.com/storm-center/dominion-electric-outage-summary.jsp" target="_self"&gt;Dominion Electric power outage summary&lt;/a&gt; breaks down outages by service region. Twitter: &amp;#0160;@&lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/#!/DomVAPower" target="_self"&gt;DomVAPower&lt;/a&gt;. Facebook: &lt;a href="https://web.archive.org/web/20160522055845/http://www.facebook.com/dominionvirginiapower" target="_self"&gt;Dominion Virginia Power&lt;/a&gt;. The map depicts damage after widespread flooding and high winds from Hurricane Irene. News coverage: &lt;a href="https://web.archive.org/web/20160522055845/http://www.nbc12.com/" target="_self"&gt;NBC12&lt;/a&gt;&amp;#0160;(WWBT), &lt;a href="https://web.archive.org/web/20160522055845/http://www.timesdispatch.com/" target="_self"&gt;Richmond Times-Dispatch&lt;/a&gt;. [Confirmed 3/12/14]&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015434f16bab970c-pi"&gt;&lt;img alt="Dominion-electric" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015434f16bab970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015434f16bab970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Dominion-electric"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;strong&gt;Virginia &lt;/strong&gt;(Lynchburg, Roanoke): &lt;a href="https://web.archive.org/web/20160522055845/https://appalachianpower.com/outages/" target="_self"&gt;Appalachian Power Outages and Problems.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015432e29dbc970c-pi"&gt;&lt;img alt="West-virginia-appalachian-power" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015432e29dbc970c-500wi" title="West-virginia-appalachian-power"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Virginia&lt;/strong&gt; (Blue Ridge, Bowling Green, Culpeper). &lt;a href="https://web.archive.org/web/20160522055845/http://www.myrec.coop/outagecenter/outage-map.cfm" target="_self"&gt;Rappahannock Electric Cooperative Outage Map&lt;/a&gt;. A Touchstone Energy Cooperative; technology by Lockheed Martin.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01a73d8eca83970d-pi"&gt;&lt;img alt="Rappahannock-Electric-Cooperative-Outages" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01a73d8eca83970d img-responsive" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01a73d8eca83970d-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Rappahannock-Electric-Cooperative-Outages"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Virginia&lt;/strong&gt; (Manassas, Loudon, Fairfax, Prince William). &lt;a href="https://web.archive.org/web/20160522055845/http://stormcenter.novec.com/index.cfm" target="_self"&gt;NOVEC Outage Map&lt;/a&gt;. Facebook: &lt;a href="https://web.archive.org/web/20160522055845/https://www.facebook.com/novec" target="_self"&gt;NOVEC&lt;/a&gt;. Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/novec" target="_self"&gt;NOVEC&lt;/a&gt;. &amp;#0160;[Updated 3/12/14]&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01a73d8eca37970d-pi"&gt;&lt;img alt="NOVEC-Outage-Map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01a73d8eca37970d img-responsive" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01a73d8eca37970d-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="NOVEC-Outage-Map"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Washington&lt;/strong&gt;. The &lt;a href="https://web.archive.org/web/20160522055845/http://www.utc.wa.gov/regulatedIndustries/utilities/energy/Pages/companiesWeRegulate.aspx" target="_self"&gt;Washington Utilities and Transportation Commission&lt;/a&gt;&amp;#0160;regulates energy companies in the state. The Access Washington government portal has a comprehensive page of where to &lt;a href="https://web.archive.org/web/20160522055845/http://access.wa.gov/emergency/resources/utilities.aspx" target="_self"&gt;report a power outage to your Washington utility company&lt;/a&gt;, with over 35 company contact numbers listed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Washington&lt;/strong&gt; (Spokane, eastern Washington). &lt;a href="https://web.archive.org/web/20160522055845/https://www.avistautilities.com/safety/_layouts/avista/transactions/viewoutages.aspx?map=1" target="_self"&gt;Avista Power Outages&lt;/a&gt;. Avista serves over 350,000 customers. Call 1-800-227-9187 to report an outage; &amp;#0160;24-Hour Media Line: 509-495-4174 for press inquiries only. Maps depict both outages and recent power restorations.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01630586937a970d-pi"&gt;&lt;img alt="Avista-power-outage-restored-map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01630586937a970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01630586937a970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Avista-power-outage-restored-map"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Washington&lt;/strong&gt;&amp;#0160;(Seattle): &lt;a href="https://web.archive.org/web/20160522055845/http://www.seattle.gov/light/sysstat/" target="_self"&gt;Seattle City Light System Status&lt;/a&gt;.&amp;#0160;Seattle City Light provides power to nearly 1 million Seattle area residents. News release:&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/http://www.bruceharrell.org/2010/11/new-outage-management-system-enhances-city-light-storm-response/" rel="bookmark"&gt;New Outage Management System Enhances City Light Storm Response&lt;/a&gt;, November 2010.&amp;#0160;Outage Hotline&amp;#0160;(206) 684-7400&lt;/p&gt;
&lt;p&gt;&amp;#0160;&lt;/p&gt;
&lt;div class="photo-wrap photo-xid-6a00d8341c4f1a53ef0168e5e36e42970c" id="photo-xid-6a00d8341c4f1a53ef0168e5e36e42970c" style="display: block; margin-left: auto; margin-right: auto; width: 500px;"&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0168e5e36e42970c-pi"&gt;&lt;img alt="Picture 3" class="asset  asset-image at-xid-6a00d8341c4f1a53ef0168e5e36e42970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0168e5e36e42970c-500wi" title="Picture 3"/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&amp;#0160;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Washington&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://pse.com/" target="_self"&gt;Puget Sound Energy&lt;/a&gt;. Call us for assistance any time of day at 1-888-225-5773.&amp;#0160;Puget Sound Energy serves more than 1.2 million electric &amp;amp; gas customers in Washington State, in&amp;#0160;Island, Jefferson, Kitsap, King, Pierce, Skagit, Thurston, Whatcom and Kittitas counties. A &lt;a href="https://web.archive.org/web/20160522055845/http://sam.pse.com/" target="_self"&gt;service alert map&lt;/a&gt; is activated only when there are major outages. Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/psetalk" target="_self"&gt;PSEtalk&lt;/a&gt;. Facebook:&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/https://www.facebook.com/pugetsoundenergy" target="_self"&gt;pugetsoundenergy&lt;/a&gt;. The map shown depicts the January 2012 snowstorm.&lt;/p&gt;
&lt;p&gt;&amp;#0160;&lt;/p&gt;
&lt;div class="photo-wrap photo-xid-6a00d8341c4f1a53ef0162ffed8f7e970d" id="photo-xid-6a00d8341c4f1a53ef0162ffed8f7e970d" style="display: block; margin-left: auto; margin-right: auto; width: 500px;"&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0162ffed8f7e970d-pi"&gt;&lt;img alt="Picture 2" class="asset  asset-image at-xid-6a00d8341c4f1a53ef0162ffed8f7e970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0162ffed8f7e970d-500wi" title="Picture 2"/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Washington DC&lt;/strong&gt;:&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/http://www.pepco.com/home/emergency/maps/stormcenter/" target="_self"&gt;Pepco StormCenter&lt;/a&gt;. KML:&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/http://www.pepco.com/home/emergency/maps/stormcenter/data/thematic/current/thematic_areas.xml" target="_self"&gt;Pepco Thematic Areas Map&lt;/a&gt;. Stay away from downed wires, call&amp;#0160;1-877-737-2662 to report an outage.&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/http://www.pepco.com/contact/media/" target="_self"&gt;Media relations&lt;/a&gt;&amp;#0160;(reporters only):&amp;#0160;&amp;#0160;202/872-2680&amp;#0160;Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/PepcoConnect" target="_self"&gt;PepcoConnect&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;#0160;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e8af0617c970d-pi"&gt;&lt;img alt="Pepco-storm-center-washington-dc" class="asset  asset-image at-xid-6a00d8341c4f1a53ef014e8af0617c970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e8af0617c970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Pepco-storm-center-washington-dc"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;West Virginia&lt;/strong&gt;&amp;#0160;(northern).&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/https://app.alleghenyenergy.com/outagestatus/Map/AE_MAP1.html" target="_self"&gt;Allegheny Energy Outage Status&lt;/a&gt;. Call 1-800-255-3443 to report an outage.&amp;#0160;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0154353b6c31970c-pi"&gt;&lt;img alt="Screen shot 2011-09-07 at 2.00.55 PM" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0154353b6c31970c-500wi" title="Screen shot 2011-09-07 at 2.00.55 PM"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;#0160;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;West Virginia&lt;/strong&gt; (Charleston): &lt;a href="https://web.archive.org/web/20160522055845/http://www.aepcustomer.com/outagemap/main.aspx?region=apco" target="_self"&gt;Appalachian Power Outage Map&lt;/a&gt;.&amp;#0160;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015432e29dbc970c-pi"&gt;&lt;img alt="West-virginia-appalachian-power" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015432e29dbc970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015432e29dbc970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="West-virginia-appalachian-power"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Wisconsin&lt;/strong&gt; (Northeast: Green Bay, &amp;#0160;Waupaca, Stevens Point, Wausau, Antigo, Merrill, Rhinelander): &lt;a href="https://web.archive.org/web/20160522055845/http://www.wisconsinpublicservice.com/outagesummary/view/outagegrid.aspx" target="_self"&gt;Wisconsin Public Service Current Electric Outages&lt;/a&gt;. Two maps here; the first depicts damage from a November 9, 2011 snowstorm. WPS is a subsidiary of&amp;#0160;Integrys Energy Group. Twitter: &lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/wpsstorm" target="_self"&gt;@WPSstorm&lt;/a&gt;.&amp;#0160;To report an outage or down power line call 800-450-7240. Media: &lt;a href="https://web.archive.org/web/20160522055845/http://www.integrysgroup.com/news/media_contacts.aspx" target="_self"&gt;Integrys Media Contacts&lt;/a&gt;. Area media: &lt;a href="https://web.archive.org/web/20160522055845/http://www.wsaw.com/" target="_self"&gt;WSAW&lt;/a&gt; (CBS 7).&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015436c0f1f4970c-pi"&gt;&lt;img alt="Picture 6" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015436c0f1f4970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015436c0f1f4970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 6"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e89028af7970d-pi"&gt;&lt;img alt="Wisconsin-public-service" class="asset  asset-image at-xid-6a00d8341c4f1a53ef014e89028af7970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e89028af7970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Wisconsin-public-service"/&gt;&lt;/a&gt;&lt;strong&gt;Wisconsin&lt;/strong&gt; (Milwaukee): &lt;a href="https://web.archive.org/web/20160522055845/http://www.we-energies.com/outagemapext/" target="_self"&gt;WE Energies Outage Map&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e89028e69970d-pi"&gt;&lt;img alt="Wisconsin-we-energies" class="asset  asset-image at-xid-6a00d8341c4f1a53ef014e89028e69970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e89028e69970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Wisconsin-we-energies"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;strong&gt;Wisconsin&lt;/strong&gt; (Madison): &lt;a href="https://web.archive.org/web/20160522055845/http://www.mge.com/myaccount/outage/" target="_self"&gt;Madison Gas and Electric Power Outages&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015432e292e9970c-pi"&gt;&lt;img alt="Wisconsin-madison-gas-electric" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015432e292e9970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015432e292e9970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Wisconsin-madison-gas-electric"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Wyoming&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.rockymountainpower.net/ed/po/woi.html" target="_self"&gt;Rocky Mountain Power Large-Scale Outage Information for Wyoming.&lt;/a&gt;&amp;#0160;Selective listing of outages affecting more than 500 customers; no maps. Contact:&amp;#0160;&lt;strong&gt;1-877-508-5088.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Canada&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alberta&lt;/strong&gt;: &lt;a href="https://web.archive.org/web/20160522055845/http://www.aeso.ca/" target="_self"&gt;AESO&lt;/a&gt;, Alberta Electric System Operator. AESO manages demand among Alberta utilities. Same day and near future records of system load; no maps.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alberta&lt;/strong&gt; (Northern, east central, east southern): &lt;a href="https://web.archive.org/web/20160522055845/http://www.atcoelectric.com/Outage-Information"&gt;ATCO Electric Outage Information&lt;/a&gt;. Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/ATCOElectric"&gt;ATCOElectric&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alberta&lt;/strong&gt; (Edmonton). &lt;a href="https://web.archive.org/web/20160522055845/http://www.epcor.com/" target="_self"&gt;EPCOR&lt;/a&gt;. Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/EPCOR" target="_self"&gt;EPCOR&lt;/a&gt;. No maps.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alberta&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.fortisalberta.com/" target="_self"&gt;Fortis Alberta&lt;/a&gt;. The &lt;a href="https://web.archive.org/web/20160522055845/http://outagemap.fortisalberta.com/" target="_blank"&gt;FortisAlberta Outage Map&lt;/a&gt; shows both scheduled and unscheduled outages. Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/fortisalberta" target="_self"&gt;FortisAlberta&lt;/a&gt;. Updated August 1, 2014. Thanks to Bil Simser.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01a511ee5f76970c-pi"&gt;&lt;img alt="Fortis-alberta-outage-map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01a511ee5f76970c img-responsive" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01a511ee5f76970c-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Fortis-alberta-outage-map"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;British Columbia&lt;/strong&gt;: &lt;a href="https://web.archive.org/web/20160522055845/http://www.bchydro.com/outages/orsMapView.jsp" target="_self"&gt;BC Hydro Power Outages Map&lt;/a&gt;.&amp;#0160;Call 1-888 POWERON (1 888 769-3766) to report an outage. &lt;a href="https://web.archive.org/web/20160522055845/http://www.bchydro.com/news/power_outages/outages_rss.html" target="_self"&gt;RSS outages feeds&lt;/a&gt;&amp;#0160;show outage details broken down by municipality and region, available in standard RSS formats for automated use updated each 15 minutes.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015393f1475b970b-pi"&gt;&lt;img alt="Picture 22" class="asset  asset-image at-xid-6a00d8341c4f1a53ef015393f1475b970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef015393f1475b970b-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 22"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;New Brunswick:&amp;#0160;&lt;/strong&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://www.nbpower.com/Open/Outages.aspx?lang=en" target="_self"&gt;NB Power Current Power Outages&lt;/a&gt;. (no map) (updated 11/2/2014)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Newfoundland&lt;/strong&gt;: &lt;a href="https://web.archive.org/web/20160522055845/http://www.newfoundlandpower.com/Outages/ViewPowerOutages/Details.aspx" target="_self"&gt;Newfoundland Power Outages Map&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affc85943970b-pi"&gt;&lt;img alt="Screen shot 2013-10-04 at 11.47.06 PM" class="asset  asset-image at-xid-6a00d8341c4f1a53ef019affc85943970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affc85943970b-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Screen shot 2013-10-04 at 11.47.06 PM"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Nova Scotia&lt;/strong&gt;: &lt;a href="https://web.archive.org/web/20160522055845/http://www.nspoweroutages.com/" target="_self"&gt;NS Power Outages&lt;/a&gt;&amp;#0160;is an independent outage tracking log, based on data and reports from the &lt;a href="https://web.archive.org/web/20160522055845/http://www.nspower.ca/en/home/residential/outageinformation/liveoutagemap.aspx" target="_self"&gt;Nova Scotia Power Live Outage and Restoration Map&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ontario&lt;/strong&gt;: &lt;a href="https://web.archive.org/web/20160522055845/http://www.hydroone.com/stormcenter/" target="_self"&gt;Hydro One Storm Centre&lt;/a&gt;.&amp;#0160;Call 1-800-434-1235 to Report a Power Problem.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e89028514970d-pi"&gt;&lt;img alt="Ontario-hydro-one" class="asset  asset-image at-xid-6a00d8341c4f1a53ef014e89028514970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef014e89028514970d-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Ontario-hydro-one"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ontario&lt;/strong&gt; (Guelph) &lt;a href="https://web.archive.org/web/20160522055845/http://ghydro.maps.arcgis.com/apps/OnePane/storytelling_basic/index.html?appid=84a350f246104722a262e9ef63101abd" target="_self"&gt;Guelph Hydro Power Outage Map&lt;/a&gt;. Map overlay shows both power outages and recent lightning strikes. Powered by Arcgis. Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/GuelphHydro" target="_self"&gt;GuelphHydro&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affd6ed99970d-pi"&gt;&lt;img alt="Screen shot 2013-10-07 at 5.14.04 PM" class="asset  asset-image at-xid-6a00d8341c4f1a53ef019affd6ed99970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affd6ed99970d-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Screen shot 2013-10-07 at 5.14.04 PM"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ontario&lt;/strong&gt; (Missisauga) &lt;a href="https://web.archive.org/web/20160522055845/http://www.enersource.com/outagemap/outagemap/" target="_self"&gt;Enersource Power Outage Map.&lt;/a&gt;&amp;#0160;To Report Outages please call&amp;#0160;905-273-9050.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affd6ee7c970d-pi"&gt;&lt;img alt="Screen shot 2013-10-07 at 5.17.44 PM" class="asset  asset-image at-xid-6a00d8341c4f1a53ef019affd6ee7c970d" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affd6ee7c970d-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Screen shot 2013-10-07 at 5.17.44 PM"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ontario &lt;/strong&gt;(Ottawa): &lt;a href="https://web.archive.org/web/20160522055845/http://www.hydroottawa.com/outages/" target="_self"&gt;Hydro Ottawa Power Outage Map.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affd66f40970b-pi"&gt;&lt;img alt="Screen shot 2013-10-07 at 5.19.29 PM" class="asset  asset-image at-xid-6a00d8341c4f1a53ef019affd66f40970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef019affd66f40970b-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Screen shot 2013-10-07 at 5.19.29 PM"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ontario&lt;/strong&gt; (Toronto): &lt;a href="https://web.archive.org/web/20160522055845/http://www.torontohydro.com/sites/electricsystem/PowerOutages/Pages/OutageMap.aspx" target="_self"&gt;Toronto Hydro Power Outage Map&lt;/a&gt;.&amp;#0160;To report a power outage, please call 416-542-8000. Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/torontohydro" target="_self"&gt;TorontoHydro&lt;/a&gt;. Facebook: &lt;a href="https://web.archive.org/web/20160522055845/https://www.facebook.com/TorontoHydro" target="_self"&gt;TorontoHydro&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a class="asset-img-link" href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01901e364e22970b-pi"&gt;&lt;img alt="Toronto-hydro-power-outage-map" class="asset  asset-image at-xid-6a00d8341c4f1a53ef01901e364e22970b" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef01901e364e22970b-600wi" style="width: 600px; display: block; margin-left: auto; margin-right: auto;" title="Toronto-hydro-power-outage-map"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Prince Edward Island&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.maritimeelectric.com/" target="_self"&gt;Maritime Electric&lt;/a&gt;, a Fortis Company. No maps. Call&amp;#0160;1-800-670-1012.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Quebec&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.hydroquebec.com/poweroutages/index.html" target="_self"&gt;Hydro Quebec Power Outage Information&lt;/a&gt; (no maps). A &lt;a href="https://web.archive.org/web/20160522055845/https://www.hydroquebec.com/bilan-interruptions-service/" target="_self"&gt;table of Hydro Quebec power outages&lt;/a&gt; is provided (in French only) with detail to service interruption locations.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Saskatchewan&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.saskpower.com/outages/" target="_self"&gt;SaskPower Outages&lt;/a&gt; (no maps).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Australia&lt;/strong&gt; (SE Queensland). Energex. &lt;a href="https://web.archive.org/web/20160522055845/http://www.energex.com.au/residential-and-business/power-interruptions/current-interruptions" target="_self"&gt;Energex Current Interruptions&lt;/a&gt;&amp;#0160;(no maps).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Bangladesh.&amp;#0160;&lt;/strong&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://www.pgcb.org.bd/" target="_self"&gt;Power Grid Company of Bangladesh, Ltd&lt;/a&gt;&amp;#0160;(no maps). &lt;a href="https://web.archive.org/web/20160522055845/http://www.pgcb.org.bd/index.php?option=com_wrapper&amp;amp;view=wrapper&amp;amp;Itemid=282" target="_self"&gt;Hourly generation and load shedding table&lt;/a&gt; shows unmet demand. (Updated 11/2/2014).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Kenya&lt;/strong&gt;. Kenya Power. Facebook: @&lt;a href="https://web.archive.org/web/20160522055845/https://www.facebook.com/KenyaPowerLtd" target="_self"&gt;KenyaPowerLtd&lt;/a&gt;.&amp;#0160;Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/kenyapower" target="_self"&gt;KenyaPower&lt;/a&gt;.&amp;#0160;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Mexico&lt;/strong&gt;. &lt;a href="https://web.archive.org/web/20160522055845/http://www.cfe.gob.mx/" target="_self"&gt;CFE (Comisión Federal de Electricidad)&lt;/a&gt;&amp;#0160;(no maps). Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/#!/@CFEmx" target="_self"&gt;CFEmx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;New Zealand&lt;/strong&gt;: &lt;a href="https://web.archive.org/web/20160522055845/http://www.oriongroup.co.nz/outages.aspx" target="_self"&gt;Orion New Zealand Outages&lt;/a&gt;. Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/#!/OrionNZ" target="_self"&gt;OrionNZ&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;South Africa:&lt;/strong&gt; &lt;a href="https://web.archive.org/web/20160522055845/http://www.eskom.co.za/" target="_self"&gt;Eskom&lt;/a&gt; (no maps). When demand exceeds supply, Eskom does &lt;a href="https://web.archive.org/web/20160522055845/http://www.loadshedding.eskom.co.za/" target="_self"&gt;load shedding&lt;/a&gt;. Twitter: @&lt;a href="https://web.archive.org/web/20160522055845/https://twitter.com/Eskom_SA" target="_self"&gt;Eskom_SA&lt;/a&gt;&amp;#0160;; Twitter hashtag #&lt;a href="https://web.archive.org/web/20160522055845/http://twitter.com/hashtag/eskom" target="_self"&gt;eskom&lt;/a&gt; . [Updated 11/2/14]&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Venezuela&lt;/strong&gt;:&amp;#0160;&lt;a href="https://web.archive.org/web/20160522055845/http://josealler.blogspot.com/" target="_self"&gt;Crisis Eléctrica Venezolana&lt;/a&gt; is a weblog by Jose Aller in Venezuela who is tracking the widespread power outages in that country in 2011. &amp;#0160;Map is based on &lt;a href="https://web.archive.org/web/20160522055845/http://www.sinluz.tk/" target="_self"&gt;tweets with the tag #sinluz&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160522055845/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0154332cb84a970c-pi"&gt;&lt;img alt="Picture 44" class="asset  asset-image at-xid-6a00d8341c4f1a53ef0154332cb84a970c" src="https://web.archive.org/web/20160522055845im_/http://vielmetti.typepad.com/.a/6a00d8341c4f1a53ef0154332cb84a970c-500wi" style="display: block; margin-left: auto; margin-right: auto;" title="Picture 44"/&gt;&lt;/a&gt; &lt;br/&gt;&lt;strong&gt;Credits&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Original content by Edward Vielmetti.&lt;/p&gt;
</description><pubDate>Fri, 20 Oct 2017 12:19:00 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/bsimser/outagemaps</guid><category>maps</category><category>power outages</category></item><item><title>Automatically Publishing NuGet packages from GitHub</title><link>https://weblogs.asp.net:443/bsimser/automatically-publishing-nuget-packages-from-github</link><description>&lt;p&gt;About an hour ago I didn&amp;rsquo;t have a &lt;a href="https://www.myget.org/"&gt;MyGet&lt;/a&gt; account (although I knew about the service) but did have a repository on &lt;a href="https://github.com"&gt;GitHub&lt;/a&gt; with a package that I was manually updating and pushing to &lt;a href="https://www.nuget.org/"&gt;NuGet&lt;/a&gt;. Thanks to a recommendation from &lt;a href="http://haacked.com/"&gt;Phil Haack&lt;/a&gt; and an hour of messing around with some files I now have a push to GitHub updating my NuGet package with a click of a button. Dead simple. Read on to get your own setup working.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m currently in the midst of a reboot of &lt;a href="https://github.com/terrariumapp"&gt;Terrarium&lt;/a&gt;, a .NET learning tool that lets you build creatures that survive in an online ecosystem. More on that later but right now I&amp;rsquo;ve setup a NuGet package that you add to your own creation to get all the functionality of a creature in Terrarium. The problem was is that I was manually editing a batch file every time I built a new version and pushing that build up to NuGet.&lt;/p&gt;
&lt;p&gt;This is 2014. There must be a better way. We have the technology. We have the capability to make this process easy.&lt;/p&gt;
&lt;p&gt;&lt;img width="582" height="470" title="austin" style="display: inline; background-image: none;" alt="austin" src="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/austin_3.jpg" border="0" /&gt;&lt;/p&gt;
&lt;p&gt;Thanks to a few tweets and one suggestion from &lt;a href="http://haacked.com/"&gt;Phil Haack&lt;/a&gt; I checked out &lt;a href="https://www.myget.org/"&gt;MyGet&lt;/a&gt;. At first it didn&amp;rsquo;t look like what I wanted to do. I didn&amp;rsquo;t want package hosting, I wanted to build my package from GitHub and publish it to NuGet. After looking at a few pages I realized that MyGet was really a perfect way to setup &amp;ldquo;test&amp;rdquo; packages. Packages I could push and push and push and never make public then with the click of a button publish the version from MyGet upstream to NuGet. In addition to a few pages of documentation on MyGet I stumbled over &lt;a href="http://www.xavierdecoster.com/commit-push-consume-continuous-delivery-of-resharper-extensions"&gt;Xavier Decoster&amp;rsquo;s blog post&lt;/a&gt; on how he does it with his &lt;a href="https://github.com/xavierdecoster/ReSharper.RazorExtensions"&gt;ReSharper Razor extension&lt;/a&gt;. The post was good and had enough steps to get me going. The MyGet docs are there but the screenshots and some of the steps are a little obscure (and didn&amp;rsquo;t always match what I was seeing in my browser) so hopefully this post will clear things up and give you a detailed step-by-step on how to do this (with the current version of MyGet, it may change in the future).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What You&amp;rsquo;ll Need&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;re going to need a few things setup first for this to work:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A &lt;a href="https://github.com"&gt;GitHub&lt;/a&gt; repository. BitBucket is also supported as well as others but I&amp;rsquo;ll document GitHub here. Check out &lt;a href="http://docs.myget.org/"&gt;the MyGet documentation&lt;/a&gt; on what they support.&lt;/li&gt;
&lt;li&gt;A &lt;a href="https://www.myget.org/"&gt;MyGet&lt;/a&gt; account. I hadn&amp;rsquo;t signed up for one until about an hour ago so this is easy (and free!)&lt;/li&gt;
&lt;li&gt;A &lt;a href="https://www.nuget.org/"&gt;NuGet&lt;/a&gt; account.&lt;/li&gt;
&lt;li&gt;A .nuspec file for your project (we&amp;rsquo;ll create it in this post)&lt;/li&gt;
&lt;li&gt;A batch file to build your package (again, we&amp;rsquo;ll create it later)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;MyGet Feed&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;re going to need to create a MyGet feed first before anything. So once you have an account you&amp;rsquo;ll add a feed. There are various places on MyGet to add one (and I think once you verify your account you&amp;rsquo;re thrown into the screen to create one). In the top login bar next to your name you&amp;rsquo;ll see a file icon that says &amp;ldquo;New Feed&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_2.png"&gt;&lt;img width="257" height="82" title="image" style="display: inline; background-image: none;" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_thumb.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s also a &amp;ldquo;New Feed&amp;rdquo; button in the Your Feeds box on your activity stream page.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_4.png"&gt;&lt;img width="388" height="198" title="image" style="display: inline; background-image: none;" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_thumb_1.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Once you click it you&amp;rsquo;ll be taken to a page where you enter the details of your new feed.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_6.png"&gt;&lt;img width="604" height="265" title="image" style="display: inline; background-image: none;" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_thumb_2.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Enter a name for the feed. The first part of the URL is already filled in for you but you specify whatever you want. This will be your URL that you&amp;rsquo;ll enter into the Package Manager to consume your feed. You can also enter a description here.&lt;/p&gt;
&lt;p&gt;Next you get to determine how your feed is to be used. By default it&amp;rsquo;s public but you can also create a community feed (where anyone can push and manage their own packages on the feed).&lt;/p&gt;
&lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_8.png"&gt;&lt;img width="604" height="175" title="image" style="display: inline; background-image: none;" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_thumb_3.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;With a paid account you can also have a private feed where you invite users to access it.&lt;/p&gt;
&lt;p&gt;Click on the Create feed button to finish the setup. Once you create the feed you&amp;rsquo;ll be dumped to the main page of the package where you can select various settings to configure your package feed. By default there&amp;rsquo;s nothing there so we&amp;rsquo;ll build up our package.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_10.png"&gt;&lt;img width="604" height="195" title="image" style="display: inline; background-image: none;" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_thumb_4.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Getting Your Code&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;First thing you want to do is add a Build Service. A build service is a mechanism to tell MyGet how to build your project. This will clone your GitHub repository on MyGet and build your package. Detailed information about the Build Services can be &lt;a href="http://docs.myget.org/docs/reference/build-services"&gt;found here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Click on Build Services then click on the Add build source button. This will allow you to select a build source where you&amp;rsquo;ll pull your code from.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_12.png"&gt;&lt;img width="604" height="322" title="image" style="display: inline; background-image: none;" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_thumb_5.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here you can see you can add a GitHub repository, BitBucket, CodePlex, or Visual Studio Online service (or you can add one manually).&lt;/p&gt;
&lt;p&gt;Choose GitHub and you&amp;rsquo;ll be asked to authorize MyGet to interact with GitHub (along with maybe signing into GitHub). Once you authorize it you&amp;rsquo;ll be shown a list of repositories on GitHub you can select from. Choose the one you&amp;rsquo;re going to build the package from by clicking on the Link? checkbox and click Add (some repositories below are obscured but yours won&amp;rsquo;t be).&lt;/p&gt;
&lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_14.png"&gt;&lt;img width="604" height="239" title="image" style="display: inline; background-image: none;" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_thumb_6.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Once you add the build source you now have the information to setup GitHub for the webhook. Expand the build source to show the information MyGet created for it and you&amp;rsquo;ll see something like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_16.png"&gt;&lt;img width="604" height="284" title="image" style="display: inline; background-image: none;" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_thumb_7.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Initially you won&amp;rsquo;t have any builds but this is where you&amp;rsquo;ll see those builds and their status. What&amp;rsquo;s important here is the Hook url. This is the value we&amp;rsquo;re going to use on GitHub to trigger MyGet to fetch the source when a push occurs (and build the package).&lt;/p&gt;
&lt;p&gt;Copy the Hook url (there&amp;rsquo;s a small icon you can click on to copy it to your clipboard, typing is for weenies) and head over to your GitHub project you selected for the build source.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Webhooks&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;On GitHub in your repository go to Settings then click on Webhooks and Services. Click on Add webhook to show this dialog:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_18.png"&gt;&lt;img width="604" height="549" title="image" style="display: inline; background-image: none;" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_thumb_8.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In the Payload URL paste the Hook URL that you got from MyGet. Leave the Content type as application/json and the radio button trigger to just work off the push event then click Add webhook.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_20.png"&gt;&lt;img width="604" height="138" title="image" style="display: inline; background-image: none;" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_thumb_9.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This will add the webhook to your GitHub repository which, on a push to the repo, will trigger MyGet to do it&amp;rsquo;s stuff.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Building&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now its time to setup your package creation in GitHub and create a package. Remember, MyGet is going to be doing the fetching of the source code from GitHub and compiling and packaging. The trigger will be when you push a change to GitHub (you can also trigger the build manually from MyGet if you need to).&lt;/p&gt;
&lt;p&gt;By default MyGet will search for a variety of things to try to figure out what to do with your codebase once it gets it. While it does look for .sln files and .csproj files (and even .nuspec files) I prefer to be specific and tell it what to do. The build service will initially look for a build.bat (or build.cmd or build.ps1) file and run it so let&amp;rsquo;s give it one to follow.&lt;/p&gt;
&lt;p&gt;Xavier provides one in his RazorExtensions repository so I (mostly) copied that but he&amp;rsquo;s doing a few things to support his plugin. Here&amp;rsquo;s a more generic build.bat you can create that should be fine for your project:&lt;/p&gt;
&lt;div data-gist-id="8c5d08f0f5fc0b7626d0"&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Line 2-5: These lines setup the configuration we&amp;rsquo;re going to use. This would be &amp;ldquo;Release&amp;rdquo; or &amp;ldquo;Debug&amp;rdquo; or whatever you have defined in your solution. If it&amp;rsquo;s blank it will use &amp;ldquo;Release&amp;rdquo;.&lt;/li&gt;
&lt;li&gt;Line 7-10: This sets up the PackageVersion value that will be passed onto NuGet when creating the package. Again, if it&amp;rsquo;s blank it will use 1.0.0 as the default.&lt;/li&gt;
&lt;li&gt;Line 12-15: Here we&amp;rsquo;re setting the nuget executable. If you have a specific one in your solution you can use it, otherwise it&amp;rsquo;ll just use the one available on MyGet (which is always the latest version)&lt;/li&gt;
&lt;li&gt;Line 17: This is the msbuild command to run your solution file. My solution file is in a subfolder called &amp;ldquo;src&amp;rdquo; so I specify that way, yours might be at the root so adjust accordingly. The %config% parameter is used here to select the build configuration from the solution file. The other values are for diagnostic purposes to provide information to MyGet (and you) in case the build fails.&lt;/li&gt;
&lt;li&gt;Line 19-21: Here I&amp;rsquo;m just setting up the output directories for NuGet. All packages will get put into a folder called &amp;ldquo;Build&amp;rdquo; and follows the standard naming for NuGet packages. Right now I just have a .NET 4.0 library but other files may come later. Build up your package folder structure accordingly (the docs on NuGet &lt;a href="http://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-package#From_a_convention_based_working_directory"&gt;describe it here&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;Line 23: Finally we build the NuGet package specifying our .nuspec file (again mine is in a subfolder called &amp;ldquo;src&amp;rdquo;) and the version number. The &amp;ldquo;-o Build&amp;rdquo; option is use the Build directory to output the package.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Okay now we have a build.bat file that MyGet will run once it grabs the latest code from GitHub. Commit that (but don&amp;rsquo;t push yet, we&amp;rsquo;re not ready). Next up is to build the .nuspec file that will tell NuGet what&amp;rsquo;s in our package. You can create the .nuspec file manually or using NuGet to scaffold it for you (&lt;a href="http://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-package#Creating_a_Package"&gt;docs here&lt;/a&gt;). There are also some GUI tools and whatnot to build it so choose your weapon.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s my .nuspec for the Terrarium SDK:&lt;/p&gt;
&lt;div data-gist-id="37115a0d4d3558d41b7b"&gt;&lt;/div&gt;
&lt;p&gt;Pretty typical for a .nuspec file and pretty simple. It contains a single file, the .dll, that&amp;rsquo;s in the &amp;ldquo;lib/net40&amp;rdquo; folder. A few things to note:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;My assembly is in the project directory but the .nuspec file is in the &amp;ldquo;src&amp;rdquo; folder so the package contents are relative to where the .nuspec file is, not where the system is running it from (which is always the root with MyGet)&lt;/li&gt;
&lt;li&gt;We use the $version$ and $configuration$ token to replace paths and names here. These are set in the batch file prior to invoking NuGet.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Okay now we&amp;rsquo;ve got the .nuspec to define our pacakge, the source code wired up to notify MyGet, MyGet to get it on a push, and a batch file to create our package.&lt;/p&gt;
&lt;p&gt;Push the code changes into GitHub and sit back. You can go to your Build Services page on MyGet for your feed, expand the chevron next to your feed name, and watch an automatically updated display pull your code down and create your package.&lt;/p&gt;
&lt;p&gt;If things go wrong feel free to ping me and I can try to help, but realize that everyone&amp;rsquo;s setup is different. Check the build log for immediate errors. When MyGet fetches your repository it&amp;rsquo;ll clone it into a temporary directory and then start looking for build.bat and other files to invoke. That&amp;rsquo;s why we want to put our build.bat file in our root (mine isn&amp;rsquo;t but I&amp;rsquo;ll probably change that at some point) so we can get his party started.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A Package Is Born&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Once you have a successful build you&amp;rsquo;ll see your new package under the Packages section.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_22.png"&gt;&lt;img width="604" height="188" title="image" style="display: inline; background-image: none;" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_thumb_10.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Cool. You can click on the Package Id to see more detailed information about the package and also manage old releases. Unlike NuGet, MyGet let&amp;rsquo;s you delete packages rather than just unlist them.&lt;/p&gt;
&lt;p&gt;One thing to note here is the version number. Where did that come from? In the screenshot above my version number is 1.8.0-CI0007.&lt;/p&gt;
&lt;p&gt;MyGet follows &lt;a href="http://semver.org/"&gt;Semantic Versioning&lt;/a&gt; (which is a good thing). I do recommend you give it a quick read and consider adopting it. It&amp;rsquo;s easy and lets people know when things are potentially going to break (if you follow the 3 simple rules about major, minor, and patch version). Semantic Versioning regards anything after the patch number to be whatever your want (pre-release, beta, etc.)&lt;/p&gt;
&lt;p&gt;So about that build version. Go back to Build Services in MyGet and for your GitHub source you&amp;rsquo;ll see a button next to Build called Edit. Click it and it&amp;rsquo;ll bring up the details about the source that lets you configure how the code is fetched from GitHub.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_24.png"&gt;&lt;img width="446" height="274" title="image" style="display: inline; background-image: none;" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_thumb_11.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So down a bit you&amp;rsquo;ll see a section called Version. Here you can set (or reset) a build counter. Each build on MyGet increments the counter so you know how many times the system was built (you can also use this to track what version is available or how far it&amp;rsquo;s drifted from source control or different builds in different environments, etc.). The version format field lets you enter your Semantic Versioning formatted value and use {0} as a placeholder for the counter. By default it's set to 1.0.0-CI{0} meaning that your first build is going to be labeled 1.0.0-CI000001 (the build number is prefixed with zeros).&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s where it came from so anytime you need to bump up the major, minor, or patch version just go here to change it. As for the extra bit we&amp;rsquo;ll get to it shortly but the default version works and won&amp;rsquo;t make it&amp;rsquo;s way into our &amp;ldquo;production&amp;rdquo; versions of our package.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Consuming the Package&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now that we have a package we can add it to our package sources in Visual Studio and install it. Again this post is written from the perspective of using MyGet as your own personal repository where you can test out packages before releasing them to the public. While public packages are the default (and free) version on MyGet, you can keep pushing pre-release versions up to MyGet until you&amp;rsquo;re happy with it then &amp;ldquo;promote&amp;rdquo; it to NuGet.&lt;/p&gt;
&lt;p&gt;In MyGet click on your package and select Feed Details from the menu. You&amp;rsquo;ll see something like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_26.png"&gt;&lt;img width="604" height="219" title="image" style="display: inline; background-image: none;" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_thumb_12.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is your NuGet feed from MyGet for this package. Copy it (again with the handy icon) and head into Visual Studio.&lt;/p&gt;
&lt;p&gt;In the package manager settings add this as a package source. I just add it while I&amp;rsquo;m developing and testing the package and then disable it (so it doesn&amp;rsquo;t get confused with the &amp;ldquo;official&amp;rdquo; NuGet server). You can easily flip back and forth between packages this way.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_28.png"&gt;&lt;img width="604" height="353" title="image" style="display: inline; background-image: none;" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_thumb_13.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I just name the MyGet feed after the package because it&amp;rsquo;s for testing. Activate the MyGet feed (and to avoid confusion disable the NuGet one) and then return to the managing pacakges for your solution. Select your MyGet feed from the Online choices in NuGet to see your package.&lt;/p&gt;
&lt;p&gt;Remember that MyGet is (by default) building a pre-release version (as indicated by the &amp;ndash;CI{0} in your version number). This means you need to select the &amp;ldquo;Include Prerelease&amp;rdquo; dropdown in the Package Manager:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_30.png"&gt;&lt;img width="446" height="158" title="image" style="display: inline; background-image: none;" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_thumb_14.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You should see your package with the same version as MyGet is showing.&lt;/p&gt;
&lt;p&gt;At this point you can install your package into a test or client app or wherever you&amp;rsquo;re using the package. Make changes to it, push the changes to GitHub and magically MyGet will fetch the changes and republish the package for you. Just go into the Updates section in NuGet to see them. Here&amp;rsquo;s a new package that was created after pushing a change up to GitHub as it appears in the Package Manager GUI in Visual Studio:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_32.png"&gt;&lt;img width="604" height="323" title="image" style="display: inline; background-image: none;" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_thumb_15.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here you can see we have 1.8.0 installed (from NuGet.org). I changed my package source to MyGet feed and there&amp;rsquo;s a new version available. It&amp;rsquo;s labeled as 1.9.0-CI00009 (Prerelease).&lt;/p&gt;
&lt;p&gt;Like I said, you can keep pushing more versions up to GitHub and go nuts until you&amp;rsquo;re happy with the package and are ready to release.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Upstream to NuGet&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The last piece in our puzzle is having MyGet push a package up to NuGet. This is a single click operation and while it can be automatic (for example pushing everything from MyGet to NuGet) you might not want that. Users would get the pitchforks out and start camping on your doorstep if you pushed out a new version of your package 10 times in a day.&lt;/p&gt;
&lt;p&gt;Package Sources are the way to get your feed out. By default one for NuGet.org is even created for you, but it&amp;rsquo;s not configured or enabled. Click on the Package Sources and you&amp;rsquo;ll see the NuGet.org one. Click on edit (assuming you have a NuGet.org account and API key).&lt;/p&gt;
&lt;p&gt;Enter your information to allow MyGet to talk to NuGet and in the upstream section you&amp;rsquo;ll see this:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_34.png"&gt;&lt;img width="560" height="192" title="image" style="display: inline; background-image: none;" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_thumb_16.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Check the first option. This allows you to push a package from MyGet to NuGet.&lt;/p&gt;
&lt;p&gt;Finally we&amp;rsquo;re ready to go but we don&amp;rsquo;t want version 1.9.0-CI00108 to be going public. So here&amp;rsquo;s where Semantic Versioning comes into play. Back in MyGet click on Packages on your package and then click the Push Latest button.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_36.png"&gt;&lt;img width="604" height="327" title="image" style="display: inline; background-image: none;" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/Automatically-Publishing-NuGet-packages-_13E7E/image_thumb_17.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s where the magic happen. MyGet recognizes the &amp;ldquo;&amp;ndash;CI00009&amp;rdquo; is the prerelease tag in our version. If we leave this in, it&amp;rsquo;ll push the prerelease up to NuGet. Maybe this is okay but for my use I want to only push up tested packages when I&amp;rsquo;m ready to release them.&lt;/p&gt;
&lt;p&gt;Clear the Prerelease tag field out. This means that will ignore that tag that&amp;rsquo;s in your version number and only push the version up using the major.minor.patch (in this case 1.9.0 will be pushed up to NuGet.org).&lt;/p&gt;
&lt;p&gt;Click Push and in a few minutes it&amp;rsquo;ll be on NuGet with the newest version.&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s about it. I know this was long but it was step-by-step and hopefully it should clear up some fuzziness with the process of automatically publishing your GitHub repositories as NuGet packages. As typical it actually took me longer to write this up then to actually do it.&lt;/p&gt;
&lt;p&gt;I encourage you to check out more documentation on MyGet as this just scratches the surface as to what it can do and even in this project there are additional options you can leverage like automatically patching AssemblyInfo.cs in your build, labeling the source when you push from MyGet to NuGet, etc.&lt;/p&gt;
&lt;p&gt;Feel free to leave your comments or questions below and enjoy!&lt;/p&gt;
</description><pubDate>Tue, 24 Jun 2014 05:35:00 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/bsimser/automatically-publishing-nuget-packages-from-github</guid><category>NuGet</category><category>Terrarium</category><category>GitHub</category></item><item><title>Live Kitten Juggling with ASP.NET MVC</title><link>https://weblogs.asp.net:443/bsimser/live-kitten-juggling-with-asp-net-mvc</link><description>&lt;p&gt;Are you as excited as I am about ASP.NET MVC but want to know more. Or have you been struggling all your life in Web Forms Hell and want to make the leap to MVC and don’t know where to start or who to turn to?&lt;/p&gt;&lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/c52184f765ac_F67E/kitties_small_2.jpg"&gt;&lt;img width="504" height="379" title="kitties_small" style="display: inline; background-image: none;" alt="kitties_small" src="https://aspblogs.blob.core.windows.net/media/bsimser/Windows-Live-Writer/c52184f765ac_F67E/kitties_small_thumb.jpg" border="0"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Jon Galloway and Christopher Harrison are presenting a fast-paced live virtual session (no travel required, except to get from the couch to the computer which I know is a task but we can do it) that walks you through getting introduced to MVC, Visual Studio, Bootstrap, Controllers, Views, and bears oh my!&lt;/p&gt;&lt;p&gt;It’s a free-as-in-beer all-day session. If you know some C#, a little HTML, and some JavaScript and want to amp up your game then I encourage you to drop by. The free Microsoft Virtual Academy event runs from 9:00am – 5:00pm PDT on June 23, 2014. Check out &lt;a href="http://www.microsoftvirtualacademy.com/liveevents/introduction-to-asp-net-mvc"&gt;this page for more details&lt;/a&gt; where you can also register for the event.&lt;/p&gt;&lt;p&gt;See you there!&lt;/p&gt;
</description><pubDate>Fri, 13 Jun 2014 23:44:00 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/bsimser/live-kitten-juggling-with-asp-net-mvc</guid><category>ASP.NET</category><category>MVC</category><category>.NET</category></item><item><title>SPListCollection ContainsList Extension Method</title><link>https://weblogs.asp.net:443/bsimser/splistcollection-containslist-extension-method</link><description>&lt;p&gt;This is such a simple thing but something every SharePoint developer should have in their toolkit (well, actually, this is something Microsoft should put into the product). The SPFieldCollection has a nice method called &lt;A href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfieldcollection.containsfield.aspx" mce_href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfieldcollection.containsfield.aspx"&gt;ContainsField&lt;/A&gt; so you can check for the existence of a field (without throwing an exception if you get the spelling wrong). This is my version of the same method for SharePoint Lists. &lt;PRE style="BORDER-BOTTOM: #cccccc 1px dashed; TEXT-ALIGN: left; BORDER-LEFT: #cccccc 1px dashed; PADDING-BOTTOM: 0px; LINE-HEIGHT: 20px; PADDING-LEFT: 0px; WIDTH: 99%; PADDING-RIGHT: 0px; FONT-FAMILY: arial; BACKGROUND: url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) #f0f0f0; HEIGHT: auto; COLOR: #000000; FONT-SIZE: 12px; OVERFLOW: auto; BORDER-TOP: #cccccc 1px dashed; BORDER-RIGHT: #cccccc 1px dashed; PADDING-TOP: 0px"&gt;&lt;CODE style="WORD-WRAP: normal; COLOR: #000000"&gt; public static class SPListExtensions&lt;br /&gt;
{&lt;br /&gt;
public static bool ContainsList(this SPListCollection lists, string displayName)&lt;br /&gt;
{&lt;br /&gt;
try&lt;br /&gt;
{&lt;br /&gt;
return lists.Cast&amp;lt;SPList&amp;gt;().Any(list =&amp;gt; string.Equals(list.Title, displayName, StringComparison.OrdinalIgnoreCase);&lt;br /&gt;
}&lt;br /&gt;
catch (Exception)&lt;br /&gt;
{&lt;br /&gt;
return false;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;Enjoy.&lt;/p&gt;
</description><pubDate>Tue, 24 Sep 2013 19:41:00 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/bsimser/splistcollection-containslist-extension-method</guid><category>C#</category><category>SharePoint</category></item><item><title>Enhancing your SharePoint Team Site Homepage</title><link>https://weblogs.asp.net:443/bsimser/enhancing-your-sharepoint-team-site-homepage</link><description>&lt;P mce_keep="true"&gt;
&lt;P&gt;A team site can be a boring place. Just a site with some documents, a list or two, maybe a calendar. Here’s a super simple way to make the page a little more interesting looking.&lt;/P&gt;
&lt;P&gt;Your team site might look like this right now, with a calendar on the home page:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://aspblogs.blob.core.windows.net/media/bsimser/teamsiteicons/before.jpg" mce_href="https://aspblogs.blob.core.windows.net/media/bsimser/teamsiteicons/before.jpg"&gt;&lt;IMG style="WIDTH: 194px; DISPLAY: inline; HEIGHT: 77px" title=before border=0 alt=before src="https://aspblogs.blob.core.windows.net/media/bsimser/teamsiteicons/before.jpg" width=194 height=77 mce_src="https://aspblogs.blob.core.windows.net/media/bsimser/teamsiteicons/before.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Simple and effective but bland. Also the title just blends into the background doesn’t it?&lt;/P&gt;
&lt;P&gt;Edit the web part and under Advanced settings, set the Title Icon Image URL to the same value as the Calendar Icon Image URL:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://aspblogs.blob.core.windows.net/media/bsimser/teamsiteicons/settings.jpg" mce_href="https://aspblogs.blob.core.windows.net/media/bsimser/teamsiteicons/settings.jpg"&gt;&lt;IMG style="WIDTH: 219px; DISPLAY: inline; HEIGHT: 240px" title=settings border=0 alt=settings src="https://aspblogs.blob.core.windows.net/media/bsimser/teamsiteicons/settings.jpg" width=219 height=240 mce_src="https://aspblogs.blob.core.windows.net/media/bsimser/teamsiteicons/settings.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Now the calendar shows a small icon next to the title and breaks up the page a little.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://aspblogs.blob.core.windows.net/media/bsimser/teamsiteicons/after.jpg" mce_href="https://aspblogs.blob.core.windows.net/media/bsimser/teamsiteicons/after.jpg"&gt;&lt;IMG style="WIDTH: 194px; DISPLAY: inline; HEIGHT: 77px" title=after border=0 alt=after src="https://aspblogs.blob.core.windows.net/media/bsimser/teamsiteicons/after.jpg" width=194 height=77 mce_src="https://aspblogs.blob.core.windows.net/media/bsimser/teamsiteicons/after.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Simple but easy to do. By default, the Title icon is blank but IMHO it should be defaulted to the type of list that’s being shown (Calendar, Task List, Document Library, etc.). Like I said, it’s simple but it breaks up the page and also is a visual reminder of what you’re looking at. It also shows where the clickable title is for a list or library that’s been put on a page. When you have a page full of web parts, it’s not immediately obvious where the title is in a sea of text. A little graphic goes a long way for readability.&lt;/P&gt;
&lt;P&gt;You can use any icon for any list but I like using the one suited to the task. Here’s a list of the icons to use for each list/library type:&lt;/P&gt;
&lt;TABLE border=0 cellSpacing=0 cellPadding=2 width=400&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;&lt;STRONG&gt;List/Library Type&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=200&gt;&lt;STRONG&gt;Icon&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;Custom List&lt;/TD&gt;
&lt;TD vAlign=top width=200&gt;/_layouts/images/itgen.gif&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;Calendar&lt;/TD&gt;
&lt;TD vAlign=top width=200&gt;/_layouts/images/itevent.png&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;Contact List&lt;/TD&gt;
&lt;TD vAlign=top width=200&gt;/_layouts/images/itcontct.gif&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;Site&lt;/TD&gt;
&lt;TD vAlign=top width=200&gt;/_layouts/images/SharePointFoundation16.png&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;Document Library&lt;/TD&gt;
&lt;TD vAlign=top width=200&gt;/_layouts/images/itdl.png&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;Announcements&lt;/TD&gt;
&lt;TD vAlign=top width=200&gt;/_layouts/images/itann.png&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;Discussion Board&lt;/TD&gt;
&lt;TD vAlign=top width=200&gt;/_layouts/images/itann.png&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;Issue Tracker&lt;/TD&gt;
&lt;TD vAlign=top width=200&gt;/_layouts/images/itissue.png&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;Picture Library&lt;/TD&gt;
&lt;TD vAlign=top width=200&gt;/_layouts/images/itil.png&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;Links&lt;/TD&gt;
&lt;TD vAlign=top width=200&gt;/_layouts/images/itlink.png&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;Tasks&lt;/TD&gt;
&lt;TD vAlign=top width=200&gt;/_layouts/images/ittask.png&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=200&gt;Survey&lt;/TD&gt;
&lt;TD vAlign=top width=200&gt;/_layouts/images/itsurvey.png&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;Enjoy!&lt;/P&gt;
</description><pubDate>Wed, 31 Jul 2013 17:48:00 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/bsimser/enhancing-your-sharepoint-team-site-homepage</guid><category>SharePoint 2010</category></item><item><title>Virtual Machine Tips for running SharePoint</title><link>https://weblogs.asp.net:443/bsimser/virtual-machine-tips-for-running-sharepoint</link><description>&lt;P mce_keep="true"&gt;Just a few simple Virtual Machine tips when developing in SharePoint&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;My VMs are 40GB in size and pre-allocated. After installing SharePoint, SQL Server, and Visual Studio and all the tools I need I have about 10GB for data which is more than sufficient for most jobs. The pre-allocation helps performance but you need a lot of disk space so keep that in mind when planning your VM.&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;I run my VMs disconnected with their own Domain Controller (for development I usually just run a single VM with DC, SQL, and SharePoint all in one). I reconnect them via a bridge to the host network adapter when I'm at home off my corporate network. This is to get patches and keep things up to date. Running disconnected is nice because you know when things fail and why. Got a rogue web part that's behaving strangely? Put it in your VM and take a look at it to make sure it's not relying on some external service (which may be throwing proxy errors or something from your corporate network)&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;I rely on source control to store my code and only pull down copies of current projects when I'm ready to work on something and keep things fresh with mulitple check-ins per day. With VMWare the nice thing is that I can mount the VM as a disk image in case I need to pull something off (without having to fire up the VM). Having a source control system like GIT or Mercurial instead of Subversion or VSS will let you do local check-ins then you can sync when you're done at the end of the day.&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;VMs on the local drive (if you're running a SSD) are waaaaaaaaaaay faster than on an external drive. If you have to use an external drive for your VMs (I've since stopped doing this with the increased size of SSDs these days) then go with eSATA for the best performance (although some people will argue USB 3.0 is faster). Pre-allocating the VM on an external drive will help with performance as well.&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Give your VM lots of memory. Any SharePoint developer must be running at *least* 8GB on their host machine. Give your VM 4-5 GB. No watching movies while you work, defer that to another machine. For SharePoint 2013 you really need to run 16GB on your host machine and give your VMs 8-12 GB of RAM.&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Copying large files into a VM (like an installer) then deleting it will cause fragmentation that you might not get back during regular usage. Make sure you use your virtualization tools to defragment your VMs on a regular basis.&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;A really great tool to keep your VMs under control size wise is SpaceSniffer. It visually shows you where things are gobbling up space in the OS so you can pinpoint things that you don't need and zap 'em! &lt;A href="http://www.uderzo.it/main_products/space_sniffer/index.html" mce_href="http://www.uderzo.it/main_products/space_sniffer/index.html"&gt;Get it. It's free&lt;/A&gt;!&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;That's it for now. Just a few simple tips that might help out. Happy developing!&lt;/P&gt;
</description><pubDate>Mon, 22 Apr 2013 20:33:00 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/bsimser/virtual-machine-tips-for-running-sharepoint</guid><category>General Software Development</category><category>SharePoint</category></item><item><title>ASP.NET Training Videos Delivered via SharePoint</title><link>https://weblogs.asp.net:443/bsimser/asp-net-training-videos-delivered-via-sharepoint</link><description>&lt;p&gt;Recently &lt;a href="http://www.hanselman.com/blog/" mce_href="http://www.hanselman.com/blog/"&gt;Scott Hanselman&lt;/a&gt; posted &lt;a href="http://www.hanselman.com/blog/BuildingWebAppsWithASPNETJumpStart8HoursOfFREETrainingVideos.aspx" mce_href="http://www.hanselman.com/blog/BuildingWebAppsWithASPNETJumpStart8HoursOfFREETrainingVideos.aspx"&gt;on his blog an ASP.NET Jump Start&lt;/a&gt; session they had which featured 9 videos (over 8 hours of content) on developing apps with ASP.NET. This is a great resource and I wanted to share it with the rest of my team. Problem is that a) the team generally doesn’t have access to video content on the web as it’s generally blocked by proxy b) streaming an hour video over the Internet might be okay for one but not for an entire team and c) there must be a better way to share this other than passing out links to Scott’s blog or the Channel 9 site.&lt;/p&gt;
&lt;p&gt;We have a team site in SharePoint so I thought this would be a great opportunity to share the information that way. The problem was that even at medium resolution the files are just too big to host inside of SharePoint.&lt;/p&gt;
&lt;p&gt;Sidebar. There have been a lot of discussions about “Large file support” in SharePoint 2010 (and beyond) and that’s great but for me the bottom line is that extremely large files (over the default 50MB in size) just isn’t meant for an Intranet. I can hear the arguments now about it but a few things to consider with large files (specifically media files like videos). Uploading a 100MB file to the server means 100MB of memory gets gobbled up by the w3wp.exe process (the process attached to the Application Pool running your site) during the entire time the file is being uploaded. LANs are fast but even a 100MB file only gets uploaded at a certain speed (regardless of how big your pipe is). Also uploading the video commits the user to that web front end (usually pegging the server or process) so your load balancing is shot. In short, many people bump up the maximum size of SharePoint’s default of 50MB without taking any of these things into consideration then wonder why their amazing Intranet site is running slow (and usually they toss more memory on the front-ends thinking it will help). Basically 50MB should be the limit for files on any web application when users are uploading.&lt;/p&gt;
&lt;p&gt;In any case, an option is to specify the files via UNC paths which means that a) I can just use the Windows Desktop top copy the files so no size limitations and b) I can address the files via the file:// protocol. This works much for most Intranets and large files and should be considered over stuffing a file into SharePoint (regardless of how you get it in). Remember that a 100MB file in SharePoint generally takes up at least 150MB of space (and if the file is versioned, eek! just watch your content database explode in size!).&lt;/p&gt;
&lt;p&gt;So my first step was to download the files and put them onto a file share. Simple enough. 9 files. I grabbed the medium size files but you can get the HD ones or whatever you want (I just didn’t want to wait around for 500MB per file to download with the high quality WMV files). Medium quality is good enough for training as you can clearly see the code in the IDE and not be annoyed by pixel artifacts on the playback.&lt;/p&gt;
&lt;p&gt;Now that I had my 9 videos of content on the corporate LAN it was time to set something up to display them. You can get way fancier than I did here with some jQuery, doing some Client Object Model code to write out a video carousel but this is a simple solution that required no code (and I do mean absolutely zero code) and a few minutes of time. In fact it took longer to copy the files than it did to setup the list.&lt;/p&gt;
&lt;p&gt;First create a Custom List on the site you want to server your video catalog up from. Then I added three fields (in addition to the default Title field):&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Video. This was set to Hyperlink field that would be the UNC path to the video itself on the file share.&lt;/li&gt;
  &lt;li&gt;Thumbnail. This was a Hyperlink field formatted as a picture and would offer up a snapshot of what the user was going to see.&lt;/li&gt;
  &lt;li&gt;Description. A multiline field set to Text only that would hold a brief description of the video.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here’s the Edit form for a video item:&lt;/p&gt;
&lt;p&gt;&lt;img style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; background-image: none;" border="0" src="https://aspblogs.blob.core.windows.net/media/bsimser/videopost/list.jpg" mce_src="https://aspblogs.blob.core.windows.net/media/bsimser/videopost/list.jpg"&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;The title is whatever you want (it’s not used for the catalog)&lt;/li&gt;
  &lt;li&gt;The Video is a hyperlink to the file on the file share. This will take the form of “file://” instead of “http://” and point to your UNC path to the file. Put the full title (or whatever the user is going to see to click on) in the description field. With Hyperlink fields if you leave the description field blank it gets automatically filled in with the full link (which isn’t very user friendly).&lt;/li&gt;
  &lt;li&gt;The Thumbnail is a hyperlink to an image. You can choose to make your own (if your content is your own). I cheated here and just grabbed the image directly off of Scott’s blog (which is up on some Microsoft content delivery network location). As this field is formatted as a Picture it’ll just display the image so make sure it points to an image file SharePoint recognizes (JPEG is probably preferred here).&lt;/li&gt;
  &lt;li&gt;The Description field is just copied straight off the blog. Again, change this to whatever you want so users know what the video is about.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Once you populate the list with the videos you almost ready to go. Here’s the default view of the list:&lt;/p&gt;
&lt;p&gt;&lt;img style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; background-image: none;" border="0" src="https://aspblogs.blob.core.windows.net/media/bsimser/videopost/default.jpg" mce_src="https://aspblogs.blob.core.windows.net/media/bsimser/videopost/default.jpg"&gt;&lt;/p&gt;
&lt;p&gt;This is okay but not very user friendly for viewing videos. Users might click on the Title field which would open up the List Item instead of launching the video. So instead either create a new view or modify the default one. If you create a new view you might want to set it as a new default so when a user visits the list they see the right view.&lt;/p&gt;
&lt;p&gt;In your new view we’ll set a few options:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Set the first three columns to be Thumbnail, Video, and Description (in this order). This is to create the catalog view of the world so you might want another view for editing content (in case you’re adding something or want to update a value).&lt;/li&gt;
  &lt;li&gt;Turn off Tabular View as we don’t need it here&lt;/li&gt;
  &lt;li&gt;Under Style choose “Boxed, no labels”&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now here’s the updated view in the browser:&lt;/p&gt;
&lt;p&gt;&lt;img style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; background-image: none;" border="0" src="https://aspblogs.blob.core.windows.net/media/bsimser/videopost/catalog.jpg" mce_src="https://aspblogs.blob.core.windows.net/media/bsimser/videopost/catalog.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Pretty slick and only took 5 minutes to build the view. Users click on the title and the video launches in Windows Media Player (or whatever player is associated with your video file format you’re pointing to).&lt;/p&gt;
&lt;p&gt;Note that this posts talks about a specific set of files for a solution but the video content is up to you. If you have some high quality/large format audio or video files in your organization and want to surface them up in a catalog this solution might work for you. It’s not about the content, it’s about serving up that content.&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;
</description><pubDate>Mon, 04 Mar 2013 16:49:00 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/bsimser/asp-net-training-videos-delivered-via-sharepoint</guid><category>ASP.NET</category><category>SharePoint</category></item><item><title>Convention over Configuration with MVC and Autofac</title><link>https://weblogs.asp.net:443/bsimser/convention-over-configuration-with-mvc-and-autofac</link><description>&lt;p&gt;One of the key things to wrap your head around when doing good software development using frameworks like ASP.NET MVC is the idea of &lt;a href="http://en.wikipedia.org/wiki/Convention_over_configuration" mce_href="http://en.wikipedia.org/wiki/Convention_over_configuration"&gt;convention over configuration&lt;/a&gt; (or coding by convention).&lt;/p&gt;
&lt;p&gt;The idea is that rather than messing around with configuration files about where to find things, how to register IoC containers, etc. that we used to do, you follow a convention, a way of doing things. The example normally expressed is a class in your model called “Sale” and a database named “Sales”. If you don’t do anything that’s how the system will work but if you decide to change the name of the database to “Products_Sold” then you need some kind of configuration to tell the system how to find the backend database. Otherwise it can naturally find it based on the naming strategy of your domain.&lt;/p&gt;
&lt;p&gt;MVC does this by default. When you create a controller named “Home” the class is HomeController and the views of the HomeController are found in /Views/Home for your project. When dealing with IoC containers there’s the task of registering your types to resolve correct. So let’s take a step back and take a look at a project with several repositories in it (a repository here being some kind of abstraction over your data store).&lt;/p&gt;
&lt;p&gt;Here we have under our Models:&amp;nbsp;Customer, Invoice, and Product with their respective classes, repositories, and interfaces:&lt;/p&gt;
&lt;p&gt;&lt;img style="border: 0px currentColor; width: 237px; height: 236px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/convention/before.png" width="237" height="236" mce_src="https://aspblogs.blob.core.windows.net/media/bsimser/convention/before.png"&gt;&lt;/p&gt;
&lt;p&gt;This might be how your project is typically setup.&amp;nbsp;I want to inject the dependencies on my repositories into my controller (via my IoC system) like this:&lt;/p&gt;
&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: Consolas, "Courier New", Courier, Monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #a31515; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;div class="csharpcode"&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; HomeController : Controller &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;{ &lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;readonly&lt;/span&gt; ICustomerRepository _customerRepository; &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;readonly&lt;/span&gt; IInvoiceRepository _invoiceRepository; &lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;readonly&lt;/span&gt; IProductRepository _productRepository;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; HomeController(&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;ICustomerRepository customerRepository,&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;IInvoiceRepository invoiceRepository, &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;IProductRepository productRepository) &lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;    { &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;        _customerRepository = customerRepository; &lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;        _invoiceRepository = invoiceRepository; &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;        _productRepository = productRepository; &lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;    }&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;    &lt;span class="rem"&gt;// &lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;    &lt;span class="rem"&gt;// GET: /Home/ &lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; ActionResult Index() &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;    { &lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;        &lt;span class="kwrd"&gt;return&lt;/span&gt; View(); &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;    } &lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Then somewhere in my controller I’ll use the various repositories to fetch information and present it to the user (or write back values gathered from the user). How do my IoC know how to resolve an ICustomerRepository object? &lt;/p&gt;
&lt;p&gt;Here’s how I have my IoC engine setup for this sample using Autofac. You can use any IoC engine you want but I find Autofac works well with MVC. First in Global.asax.cs I just follow the same pattern that the default projects setup and add a new static class called ContainerConfig.RegisterContainer()&lt;/p&gt;
&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: Consolas, "Courier New", Courier, Monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #a31515; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;div class="csharpcode"&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; MvcApplication : System.Web.HttpApplication &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;{ &lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Application_Start() &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;    { &lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;        AreaRegistration.RegisterAllAreas();&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;        WebApiConfig.Register(GlobalConfiguration.Configuration); &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;        FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); &lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;        RouteConfig.RegisterRoutes(RouteTable.Routes); &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;        BundleConfig.RegisterBundles(BundleTable.Bundles); &lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;        ContainerConfig.RegisterContainer(); &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;    } &lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Next is setting up Autofac. First add the Autofac MVC4 Integration package either through the NuGet UI or the &lt;a href="http://docs.nuget.org/docs/start-here/using-the-package-manager-console" mce_href="http://docs.nuget.org/docs/start-here/using-the-package-manager-console"&gt;Package Manager Console&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;font face="courier new,courier"&gt;PM&amp;gt; Install-Package Autofac.Mvc4&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;Next here’s my new ContainerConfig class I created which will register all the types I need:&lt;/p&gt;
&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: Consolas, "Courier New", Courier, Monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #a31515; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;div class="csharpcode"&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; ContainerConfig &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;{ &lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; RegisterContainer() &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;    { &lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;        &lt;span class="kwrd"&gt;var&lt;/span&gt; builder = &lt;span class="kwrd"&gt;new&lt;/span&gt; ContainerBuilder(); &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;        builder.RegisterControllers(Assembly.GetExecutingAssembly()); &lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;        builder.RegisterType&amp;lt;CustomerRepository&amp;gt;().As&amp;lt;ICustomerRepository&amp;gt;(); &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;        builder.RegisterType&amp;lt;InvoiceRepository&amp;gt;().As&amp;lt;IInvoiceRepository&amp;gt;(); &lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;        builder.RegisterType&amp;lt;ProductRepository&amp;gt;().As&amp;lt;IProductRepository&amp;gt;(); &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;        &lt;span class="kwrd"&gt;var&lt;/span&gt; container = builder.Build(); &lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;        DependencyResolver.SetResolver(&lt;span class="kwrd"&gt;new&lt;/span&gt; AutofacDependencyResolver(container)); &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;    }&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;What’s going on here:&lt;/p&gt;
&lt;table border="0" cellSpacing="0" cellPadding="2" width="400"&gt;&lt;tbody&gt;
    
&lt;tr&gt;
      
&lt;td vAlign="top" width="76"&gt;Line 5&lt;/td&gt;
&lt;td vAlign="top" width="324"&gt;Create a new ContainerBuilder&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      
&lt;td vAlign="top" width="76"&gt;Line 6&lt;/td&gt;
&lt;td vAlign="top" width="324"&gt;Register all the controllers using the assembly object&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      
&lt;td vAlign="top" width="76"&gt;Line 7-9&lt;/td&gt;
&lt;td vAlign="top" width="324"&gt;Register each repository&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      
&lt;td vAlign="top" width="76"&gt;Line 10&lt;/td&gt;
&lt;td vAlign="top" width="324"&gt;Build the container&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      
&lt;td vAlign="top" width="76"&gt;Line 11&lt;/td&gt;
&lt;td vAlign="top" width="324"&gt;Set the default resolver to use&amp;nbsp;Autofac&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Pretty straight forward but here are the issues with this approach:&lt;/p&gt;
&lt;ol&gt;
  
&lt;li&gt;I have to keep going back to my ContainerConfig class adding new repositories as the system evolves. This means not only do I have to add the classes/interfaces to my system, I also have to remember to do this configuration step. New developers on the project might not remember this and the system will blow up when it can’t figure out how to resolve INewRepository&lt;/li&gt;
&lt;li&gt;I have to pull in a new namespace (assuming I follow the practice of namespace = folder structure) into the ContainerConfig class and whatever controller I add the new repository to.&lt;/li&gt;
&lt;li&gt;Repositories are scattered all over my solution (and in a big solution this can get a little ugly)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;A little messy. We can do better with convention over configuration.&lt;/p&gt;
&lt;p&gt;First step is to move all of your repositories into a new folder called Repositories. With ReSharper you can just use F6 to do this and it’ll automatically move and fix the namespaces for you, otherwise use whatever add-in your want or move it manually. This includes both the classes and interfaces. Here’s what our solution looks like after the move:&lt;/p&gt;
&lt;p&gt;&lt;img style="border: 0px currentColor; width: 260px; height: 290px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/convention/after.png" width="260" height="290" mce_src="https://aspblogs.blob.core.windows.net/media/bsimser/convention/after.png"&gt;&lt;/p&gt;
&lt;p&gt;Pretty simple here but how does this affect our code? Really minimal. In the controller(s) that you’re injecting the repository into, you just have to remove all the old namespaces and replace it with one (whatever namespace your repositories live in).&lt;/p&gt;
&lt;p&gt;The other change is how you register your ContainerConfig. Here’s the updated version:&lt;/p&gt;
&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: Consolas, "Courier New", Courier, Monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}

.csharpcode pre { margin: 0em; }

.csharpcode .rem { color: #008000; }

.csharpcode .kwrd { color: #0000ff; }

.csharpcode .str { color: #a31515; }

.csharpcode .op { color: #0000c0; }

.csharpcode .preproc { color: #cc6633; }

.csharpcode .asp { background-color: #ffff00; }

.csharpcode .html { color: #800000; }

.csharpcode .attr { color: #ff0000; }

.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}

.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;div class="csharpcode"&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; ContainerConfig &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;{ &lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; RegisterContainer() &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;    { &lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;        &lt;span class="kwrd"&gt;var&lt;/span&gt; builder = &lt;span class="kwrd"&gt;new&lt;/span&gt; ContainerBuilder(); &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;        builder.RegisterControllers(Assembly.GetExecutingAssembly()); &lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;        builder.RegisterAssemblyTypes(Assembly.GetExecutingAssembly())&lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;            .Where(x =&amp;gt; x.Namespace.EndsWith(&lt;span class="str"&gt;".Repositories"&lt;/span&gt;))&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;            .AsImplementedInterfaces(); &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;        &lt;span class="kwrd"&gt;var&lt;/span&gt; container = builder.Build(); &lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;        DependencyResolver.SetResolver(&lt;span class="kwrd"&gt;new&lt;/span&gt; AutofacDependencyResolver(container)); &lt;/pre&gt;
&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;    } &lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Note that a) we only have one line to register all the repositories now and b) the namespace dependency we had in our file is now gone.&lt;/p&gt;
&lt;p&gt;The call to RegisterAssemblyTypes above using the convention of looking for any class/interface in a namespace that ends with “.Repositories” and then simply registers them all.&lt;/p&gt;
&lt;p&gt;So for the new developer on the project the instructions to them are to just create new repository classes and interfaces in the Repositories folder. That’s it. No configuration, no mess.&lt;/p&gt;
&lt;p&gt;Hope that helps!&lt;/p&gt;
</description><pubDate>Fri, 01 Mar 2013 13:53:00 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/bsimser/convention-over-configuration-with-mvc-and-autofac</guid><category>ASP.NET</category><category>Autofac</category><category>C#</category><category>MVC</category></item><item><title>Defaulting Values in a Multi-Lookup Form in SharePoint</title><link>https://weblogs.asp.net:443/bsimser/defaulting-values-in-a-multi-lookup-form-in-sharepoint</link><description>&lt;p&gt;This was a question asked on the MSDN Forums but I thought it was worthy of a blog post as I could get more in depth with the explanation and show some pretty pictures (plus the fact I’ve never done it so thought it would be fun).&lt;/p&gt;
&lt;p&gt;The problem was a user wanted to default multiple values in a lookup field in SharePoint. First problem, there are no defaults in a lookup field. Second problem, how do you do default multiple values?&lt;/p&gt;
&lt;p&gt;First we’ll start with the setup. Create yourself a list which will hold the lookup values. In this case it’s a list of country names but it can be anything you want. Just a custom list with the Title field is enough.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://weblogs.asp.net/controlpanel/blogs/$image[12].png" mce_href="$image[12].png"&gt;&lt;img style="width: 269px; height: 236px; display: inline;" title="image" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/multi/lookuplist.jpg" width="269" height="236" mce_src="https://aspblogs.blob.core.windows.net/media/bsimser/multi/lookuplist.jpg"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now we need a list with a lookup column to select our countries from. Create another custom list and add a column to it that looks something like this. Here’s the name and type:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://weblogs.asp.net/controlpanel/blogs/$image[13].png" mce_href="$image[13].png"&gt;&lt;img style="width: 494px; height: 350px; display: inline;" title="image" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/multi/name.jpg" width="494" height="350" mce_src="https://aspblogs.blob.core.windows.net/media/bsimser/multi/name.jpg"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And here’s the additional column settings where we get our information from (MultiLookupDefaultSpikeSource is the name of the list we created to hold our values)&lt;/p&gt;
&lt;p&gt;&lt;a href="http://weblogs.asp.net/controlpanel/blogs/$image[14].png" mce_href="$image[14].png"&gt;&lt;img style="width: 497px; height: 430px; display: inline;" title="image" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/multi/additiional.jpg" width="497" height="430" mce_src="https://aspblogs.blob.core.windows.net/media/bsimser/multi/additiional.jpg"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here’s what our form looks like when we add a new item:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://weblogs.asp.net/controlpanel/blogs/$image[19].png" mce_href="$image[19].png"&gt;&lt;img style="border: 0px currentColor; width: 701px; height: 445px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/multi/original.jpg" width="701" height="445" mce_src="https://aspblogs.blob.core.windows.net/media/bsimser/multi/original.jpg"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thinking about the problem I first though we could manipulate the form in SharePoint Designer but realized that the Form Web Part is going to retrieve all of our values from the list, defaults, etc. and really what we need to do is manipulate the list at runtime in the DOM.&lt;/p&gt;
&lt;p&gt;It’s jQuery to the RESCUE!&lt;/p&gt;
&lt;p&gt;First we take a look at the original state of the form to find our list boxes. Here’s the snippet we’re interested in, the first listbox:&lt;/p&gt;
&lt;pre style='background: url("http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif") rgb(240, 240, 240); padding: 0px; border: 1px dashed rgb(204, 204, 204); width: 99%; height: auto; text-align: left; color: rgb(0, 0, 0); line-height: 20px; overflow: auto; font-family: arial; font-size: 12px;'&gt;&lt;code style="color: rgb(0, 0, 0); word-wrap: normal;"&gt; &amp;lt;select   
 name="ctl00$m$g_478fe6d2_8fdb_48e8_be57_7739de1c3b8f$ctl00$ctl05$ctl01$ctl00$ctl00$ctl04$ctl00$ctl00$SelectCandidate"   
 title="Country possible values"   
 id="ctl00_m_g_478fe6d2_8fdb_48e8_be57_7739de1c3b8f_ctl00_ctl05_ctl01_ctl00_ctl00_ctl04_ctl00_ctl00_SelectCandidate"   
 style="width: 143px; height: 125px; overflow: scroll;"   
 ondblclick="GipAddSelectedItems(ctl00_m_g_478fe6d2_8fdb_48e8_be57_7739de1c3b8f_ctl00_ctl05_ctl01_ctl00_ctl00_ctl04_ctl00_ctl00_MultiLookupPicker_m); return false"   
 onchange="GipSelectCandidateItems(ctl00_m_g_478fe6d2_8fdb_48e8_be57_7739de1c3b8f_ctl00_ctl05_ctl01_ctl00_ctl00_ctl04_ctl00_ctl00_MultiLookupPicker_m);"   
 multiple="multiple"&amp;gt;   
 &amp;lt;OPTION title=Africa selected value=5&amp;gt;Africa&amp;lt;/OPTION&amp;gt;   
 &amp;lt;OPTION title=Asia value=1&amp;gt;Asia&amp;lt;/OPTION&amp;gt;   
 &amp;lt;OPTION title=Europe value=3&amp;gt;Europe&amp;lt;/OPTION&amp;gt;   
 &amp;lt;OPTION title=India value=4&amp;gt;India&amp;lt;/OPTION&amp;gt;   
 &amp;lt;OPTION title=Ireland value=6&amp;gt;Ireland&amp;lt;/OPTION&amp;gt;   
 &amp;lt;OPTION title=Singapore value=2&amp;gt;Singapore&amp;lt;/OPTION&amp;gt;   
 &amp;lt;/select&amp;gt;  
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We can see that it has an ID that ends in “_SelectCandidate” so we’ll use this for selection.&lt;/p&gt;
&lt;p&gt;Another part of the puzzle is a hidden set of fields that store the actual values used in the list. There are three of them and they’re well documented in &lt;a href="http://sharepointmagazine.net/articles/variations-in-multiselect-controls-in-different-sharepoint-language-versions" mce_href="http://sharepointmagazine.net/articles/variations-in-multiselect-controls-in-different-sharepoint-language-versions"&gt;a blog post here&lt;/a&gt; by Marc Anderson on &lt;a href="http://sharepointmagazine.net" mce_href="http://sharepointmagazine.net"&gt;SharePoint Magazine&lt;/a&gt;. In it he talks about multiselect columns and breaks down the three hidden fields used (the current set of values, the complete set of values, and the default values).&lt;/p&gt;
&lt;p&gt;The second listbox looks like this:&lt;/p&gt;
&lt;pre style='background: url("http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif") rgb(240, 240, 240); padding: 0px; border: 1px dashed rgb(204, 204, 204); width: 99%; height: auto; text-align: left; color: rgb(0, 0, 0); line-height: 20px; overflow: auto; font-family: arial; font-size: 12px;'&gt;&lt;code style="color: rgb(0, 0, 0); word-wrap: normal;"&gt; &amp;lt;select   
 name="ctl00$m$g_478fe6d2_8fdb_48e8_be57_7739de1c3b8f$ctl00$ctl05$ctl01$ctl00$ctl00$ctl04$ctl00$ctl00$SelectResult"   
 title="Country selected values"   
 id="ctl00_m_g_478fe6d2_8fdb_48e8_be57_7739de1c3b8f_ctl00_ctl05_ctl01_ctl00_ctl00_ctl04_ctl00_ctl00_SelectResult"   
 style="width: 143px; height: 125px; overflow: scroll;"   
 ondblclick="GipRemoveSelectedItems(ctl00_m_g_478fe6d2_8fdb_48e8_be57_7739de1c3b8f_ctl00_ctl05_ctl01_ctl00_ctl00_ctl04_ctl00_ctl00_MultiLookupPicker_m); return false" \   
 onchange="GipSelectResultItems(ctl00_m_g_478fe6d2_8fdb_48e8_be57_7739de1c3b8f_ctl00_ctl05_ctl01_ctl00_ctl00_ctl04_ctl00_ctl00_MultiLookupPicker_m);"   
 multiple="multiple"&amp;gt;  
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Easy enough. It has an ID that contains “_SelectResult”.&lt;/p&gt;
&lt;p&gt;Now a quick jQuery primer when selecting items:&lt;/p&gt;
&lt;ul&gt;
  
&lt;li&gt;$("[id='foo']"); // id equals 'foo'&lt;/li&gt;
&lt;li&gt;$("[id!='foo']") // id does not equal 'foo'&lt;/li&gt;
&lt;li&gt;$("[id^='foo']") // id starts with 'foo'&lt;/li&gt;
&lt;li&gt;$("[id$='foo']") // id ends with 'foo'&lt;/li&gt;
&lt;li&gt;$("[id*='foo']") // id contains 'foo'&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Simple. We want to find the control that ends with “_SelectCandidate” and remove some items, then find the control that ends with “_SelectResult” and append our selected items.&lt;/p&gt;
&lt;p&gt;So a few lines of heavily commented JavaScript:&lt;/p&gt;
&lt;pre style='background: url("http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif") rgb(240, 240, 240); padding: 0px; border: 1px dashed rgb(204, 204, 204); width: 99%; height: auto; text-align: left; color: rgb(0, 0, 0); line-height: 20px; overflow: auto; font-family: arial; font-size: 12px;'&gt;&lt;code style="color: rgb(0, 0, 0); word-wrap: normal;"&gt; $(document).ready(function(){  
   // define the items to add to the results (i.e already selected) this the visual part only   
   var $resultOptions = "&amp;lt;OPTION title=Africa value=5&amp;gt;Africa&amp;lt;/OPTION&amp;gt;&amp;lt;OPTION title=India value=4&amp;gt;India&amp;lt;/OPTION&amp;gt;&amp;lt;OPTION title=Ireland value=6&amp;gt;Ireland&amp;lt;/OPTION&amp;gt;";   
   // this is the list of initial items (matching the ones above) that are used when the item is saved   
   var $resultSpOptions = "5|tAfrica|t4|tIndia|t6|tIreland";   
   // find the possible values control   
   var possibleValues = $("[id$='_SelectCandidate']");  
   // remove 1st option (Africa)   
   $("[id$='_SelectCandidate'] option:eq(0)").remove();  
   // remove 3rd option (India)   
   $("[id$='_SelectCandidate'] option:eq(2)").remove();  
   // remove 3rd option (Ireland)   
   $("[id$='_SelectCandidate'] option:eq(2)").remove();  
   // set selected value to asia (value 1)   
   possibleValues.val(1)  
   // append the new options to our results (this updates the display only of the second list box)   
   $("[id$='_SelectResult']").append($resultOptions);  
   // append the new options to our hidden field (this sets the values into the list item when saving)   
   $("[id$='MultiLookupPicker']").val($resultSpOptions);   
 });  
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;SharePoint 2010 supports editing NewForm.aspx (and the other out-of-the-box forms) in the browser. One option is to modify the list and under advanced settings you can disable “Launch forms in a dialog”. This will launch the form like a regular web page. However that’s 3 or 4 steps and you have to go back and change it when you’re done.&lt;/p&gt;
&lt;p&gt;Instead just visit the new form directly:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sitename/listname/NewForm.aspx" mce_href="http://sitename/listname/NewForm.aspx"&gt;http://sitename/listname/NewForm.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;From this page select Site Actions | Edit Page. Now you can add a Content Editor Web Part to the page. When adding JavaScript I point the Content Link to the .js file (that I upload somewhere like Style Library or the Assets library if you have one) rather than trying to put JavaScript into the Content Editor Web Part. This way a) I can edit the JavaScript outside of the page by loading it up in SharePoint Designer or even upload a new .js file to the library and b) I can debug the JavaScript independently of the NewForm.aspx page (or whatever page I’m adding the .js file to)&lt;/p&gt;
&lt;p&gt;The result:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://weblogs.asp.net/controlpanel/blogs/$image[25].png" mce_href="$image[25].png"&gt;&lt;img style="border: 0px currentColor; width: 701px; height: 445px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/multi/final.jpg" width="701" height="445" mce_src="https://aspblogs.blob.core.windows.net/media/bsimser/multi/final.jpg"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;When you save the record, the three default options are saved as well (this was set by the JavaScript).&lt;/p&gt;
&lt;p&gt;Hope that helps!&lt;/p&gt;
</description><pubDate>Wed, 20 Feb 2013 16:28:00 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/bsimser/defaulting-values-in-a-multi-lookup-form-in-sharepoint</guid><category>JavaScript</category><category>jQuery</category><category>SharePoint</category><category>SharePoint 2010</category></item><item><title>Where tips in LINQ</title><link>https://weblogs.asp.net:443/bsimser/a-couple-of-linq-tips</link><description>&lt;p&gt;These might be old but as I was going through doing some code reviews and optimizations I thought I would share with the rest of the class.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Count() &amp;gt; 0 vs. Any&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is a bit of heated debate but as you dive in the LINQ world you'll start seeing simpler ways to write things. LINQ itself gets you away from writing loops for example (sometimes). One thing I notice in code are things like this:&lt;/p&gt;
&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: Consolas, "Courier New", Courier, Monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #a31515; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;pre class="csharpcode"&gt;if(entity.Where(some condition).Count() &amp;gt; 0)&lt;/pre&gt;
&lt;p&gt;
When you could just write this instead:&lt;/p&gt;
&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: Consolas, "Courier New", Courier, Monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #a31515; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;if&lt;/span&gt;(entity.Any(some condition))&lt;/pre&gt;
&lt;p&gt;
For me, writing *less* code is *more* important. It's a cornerstone in refactoring. Making your code more readable, more succinct. If you can scan code quicker while troubleshooting a problem or trying to figure out where to add an enhancement, all the better.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blog.donnfelker.com/" mce_href="http://blog.donnfelker.com/"&gt;Donn Felker&lt;/a&gt; wrote&amp;nbsp; about the Count() vs. Any() &lt;a href="http://blog.donnfelker.com/2009/06/22/linq-any-vs-count/" mce_href="http://blog.donnfelker.com/2009/06/22/linq-any-vs-count/"&gt;discussion here back in 2009&lt;/a&gt;&amp;nbsp;and it was &lt;a href="http://stackoverflow.com/questions/305092/which-method-performs-better-any-vs-count-0" mce_href="http://stackoverflow.com/questions/305092/which-method-performs-better-any-vs-count-0"&gt;discussed on StackOverflow here&lt;/a&gt; in case you're wondering if Any() is more performant than Count() (it generally is). So my advice is use Any() to make your code potentially easier to read unless there's a performance problem.&lt;/p&gt;
&lt;p&gt;Another simple tip for code reduction is this one.&lt;/p&gt;
&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: Consolas, "Courier New", Courier, Monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #a31515; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; x = entity.Where(some condition).FirstOrDefault();&lt;/pre&gt;
&lt;p&gt;
Becomes:&lt;/p&gt;
&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: Consolas, "Courier New", Courier, Monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}

.csharpcode pre { margin: 0em; }

.csharpcode .rem { color: #008000; }

.csharpcode .kwrd { color: #0000ff; }

.csharpcode .str { color: #a31515; }

.csharpcode .op { color: #0000c0; }

.csharpcode .preproc { color: #cc6633; }

.csharpcode .asp { background-color: #ffff00; }

.csharpcode .html { color: #800000; }

.csharpcode .attr { color: #ff0000; }

.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}

.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; x = entity.FirstOrDefault(some condition);&lt;/pre&gt;&lt;p&gt;
&lt;p&gt;I know it's simple but again it's about readability. The better you can scan someone elses new code you've never seen before is less time stumbling over the syntax and more about what the intention is.&lt;/p&gt;&lt;p&gt;Yes, these tips are old but you would be surprised seeing new developers write new code with them and wonder why?&lt;/p&gt;&lt;/p&gt;
</description><pubDate>Tue, 19 Feb 2013 15:08:00 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/bsimser/a-couple-of-linq-tips</guid><category>C#</category><category>LINQ</category></item><item><title>Windows 8 and the Lethbridge Technology User Group</title><link>https://weblogs.asp.net:443/bsimser/windows-8-and-the-lethbridge-technology-user-group</link><description>&lt;p&gt;Join me and 83,517 screaming nerds (everyone in the city is attending and a geek right?) on Thursday February 21st from 3-5pm to talk about building Metro style apps for WIndows 8. Here's what we'll be covering.
&lt;/p&gt;&lt;p&gt;
&lt;strong&gt;Windows 8 Platform for Metro Style Apps&lt;/strong&gt;
&lt;/p&gt;&lt;p&gt;Windows 8 is Windows re-imagined. Join this session to learn about the new platform for building Metro style apps. Get an understanding of the platform design tenets, the programming language choices and the integration points with the operating system and across Metro style apps
&lt;/p&gt;&lt;p&gt;
&lt;strong&gt;Everything Web Developers Must know to build Metro Style Apps&lt;/strong&gt;
&lt;/p&gt;&lt;p&gt;
Learn how you can use your web skills to build Windows 8 Metro style apps using HTML5, CSS3 and JavaScript. In this session you’ll discover how to harness the rich capabilities of Windows 8 through JavaScript and the Windows Runtime. You will learn about navigation, user experience patterns and controls, inherent async design and the seamless integration with the operating system that will let you create great Metro style apps.
&lt;/p&gt;&lt;p&gt;I promise fun times, chaos monkeys, and live kitten juggling as per my usual presentations.&lt;/p&gt;
</description><pubDate>Tue, 19 Feb 2013 10:20:00 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/bsimser/windows-8-and-the-lethbridge-technology-user-group</guid><category>Metro</category><category>presentations</category><category>Windows 8</category></item><item><title>PowerShell Tools - Removing Orphaned Users from SharePoint</title><link>https://weblogs.asp.net:443/bsimser/powershell-tools-removing-orphaned-users-from-sharepoint</link><description>&lt;p&gt;Here’s a script that will walk through all Site Collections in all Web Applications (i.e. your entire farm) and delete any user from the Site Collection that isn’t in ActiveDirectory anymore. &lt;/p&gt;
&lt;p&gt;Note this will not remove them from their user profiles, it just cleans up Site Collections. If you want some great info on how the User Profile service works and the My Site Cleanup Job then check out these resources:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;
    &lt;div align="left"&gt;&lt;a href="http://blogs.msdn.com/b/kaevans/archive/2012/06/25/top-recommendations-for-managing-the-my-site-cleanup-timer-job.aspx" mce_href="http://blogs.msdn.com/b/kaevans/archive/2012/06/25/top-recommendations-for-managing-the-my-site-cleanup-timer-job.aspx"&gt;Inside the SharePoint 2010 My Site Cleanup Timer Job&lt;/a&gt; by &lt;a href="http://blogs.msdn.com/b/kaevans/" mce_href="http://blogs.msdn.com/b/kaevans/"&gt;Kirk Evans&lt;/a&gt;&lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href="http://www.harbar.net/archive/2011/02/10/account-deletion-and-sharepoint-2010-user-profile-synchronization.aspx" mce_href="http://www.harbar.net/archive/2011/02/10/account-deletion-and-sharepoint-2010-user-profile-synchronization.aspx"&gt;Account Deletion and SharePoint 2010 User Profile Synchronization&lt;/a&gt; by &lt;a href="http://www.harbar.net/" mce_href="http://www.harbar.net/"&gt;Spencer Harbar&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here’s the code:&lt;/p&gt;
&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: Consolas, "Courier New", Courier, Monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
&lt;p&gt;.csharpcode pre { margin: 0em; }&lt;/p&gt;
&lt;p&gt;.csharpcode .rem { color: #008000; }&lt;/p&gt;
&lt;p&gt;.csharpcode .kwrd { color: #0000ff; }&lt;/p&gt;
&lt;p&gt;.csharpcode .str { color: #a31515; }&lt;/p&gt;
&lt;p&gt;.csharpcode .op { color: #0000c0; }&lt;/p&gt;
&lt;p&gt;.csharpcode .preproc { color: #cc6633; }&lt;/p&gt;
&lt;p&gt;.csharpcode .asp { background-color: #ffff00; }&lt;/p&gt;
&lt;p&gt;.csharpcode .html { color: #800000; }&lt;/p&gt;
&lt;p&gt;.csharpcode .attr { color: #ff0000; }&lt;/p&gt;
&lt;p&gt;.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}&lt;/p&gt;
&lt;p&gt;.csharpcode .lnum { color: #606060; }
&lt;/style&gt;&lt;/p&gt;
&lt;div class="csharpcode"&gt;
&lt;pre class="alt"&gt;[int]$GLOBAL:TotalUsersUpdated = 0;&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;function&lt;/span&gt; Check_User_In_ActiveDirectory([string]$LoginName, [string]$domaincnx)&lt;/pre&gt;
&lt;pre&gt;{&lt;/pre&gt;
&lt;pre class="alt"&gt;    $returnValue = $false&lt;/pre&gt;
&lt;pre&gt;    $strFilter = &lt;span class="str"&gt;"(&amp;amp;(|(objectCategory=user)(objectCategory=group))(samAccountName=$LoginName))"&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;    $objDomain = New-Object System.DirectoryServices.DirectoryEntry($domaincnx)&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class="alt"&gt;    $objSearcher = New-Object System.DirectoryServices.DirectorySearcher&lt;/pre&gt;
&lt;pre&gt;    $objSearcher.SearchRoot = $objDomain&lt;/pre&gt;
&lt;pre class="alt"&gt;    $objSearcher.PageSize = 1000&lt;/pre&gt;
&lt;pre&gt;    $objSearcher.Filter = $strFilter&lt;/pre&gt;
&lt;pre class="alt"&gt;    $objSearcher.SearchScope = &lt;span class="str"&gt;"Subtree"&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class="alt"&gt;    $colResults = $objSearcher.FindAll()&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class="alt"&gt;    &lt;span class="kwrd"&gt;if&lt;/span&gt;($colResults.Count &lt;span class="preproc"&gt;-gt&lt;/span&gt; 0)&lt;/pre&gt;
&lt;pre&gt;    {&lt;/pre&gt;
&lt;pre class="alt"&gt;        $returnValue = $true&lt;/pre&gt;
&lt;pre&gt;    }&lt;/pre&gt;
&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;    &lt;span class="kwrd"&gt;return&lt;/span&gt; $returnValue&lt;/pre&gt;
&lt;pre class="alt"&gt;}&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;function&lt;/span&gt; ListOrphanedUsers([string]$SiteCollectionURL, [string]$mydomaincnx)&lt;/pre&gt;
&lt;pre&gt;{&lt;/pre&gt;
&lt;pre class="alt"&gt;    [System.Reflection.Assembly]::LoadWithPartialName(&lt;span class="str"&gt;"Microsoft.SharePoint"&lt;/span&gt;) &amp;gt; $null&lt;/pre&gt;
&lt;pre&gt;    $site = new-object Microsoft.SharePoint.SPSite($SiteCollectionURL)&lt;/pre&gt;
&lt;pre class="alt"&gt;    $web = $site.openweb()&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class="alt"&gt;    Write-Host &lt;span class="str"&gt;"SiteCollectionURL:"&lt;/span&gt;, $SiteCollectionURL&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class="alt"&gt;    $siteCollUsers = $web.SiteUsers&lt;/pre&gt;
&lt;pre&gt;    Write-host &lt;span class="str"&gt;"SiteUsers:"&lt;/span&gt;, $siteCollUsers.Count&lt;/pre&gt;
&lt;pre class="alt"&gt;    &lt;/pre&gt;
&lt;pre&gt;    &lt;span class="rem"&gt;#Create array to hold non-existant users&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;    $usersToRemove = @()&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class="alt"&gt;    &lt;span class="kwrd"&gt;foreach&lt;/span&gt;($MyUser &lt;span class="kwrd"&gt;in&lt;/span&gt; $siteCollUsers)&lt;/pre&gt;
&lt;pre&gt;    {&lt;/pre&gt;
&lt;pre class="alt"&gt;        &lt;span class="kwrd"&gt;if&lt;/span&gt;(($MyUser.LoginName.ToLower() &lt;span class="preproc"&gt;-ne&lt;/span&gt; &lt;span class="str"&gt;"sharepoint\system"&lt;/span&gt;) -and &lt;/pre&gt;
&lt;pre&gt;            ($MyUser.LoginName.ToLower() &lt;span class="preproc"&gt;-ne&lt;/span&gt; &lt;span class="str"&gt;"nt authority\authenticated users"&lt;/span&gt;) -and &lt;/pre&gt;
&lt;pre class="alt"&gt;            ($MyUser.LoginName.ToLower() &lt;span class="preproc"&gt;-ne&lt;/span&gt; &lt;span class="str"&gt;"nt authority\local service"&lt;/span&gt;))&lt;/pre&gt;
&lt;pre&gt;        {&lt;/pre&gt;
&lt;pre class="alt"&gt;            $UserName = $MyUser.LoginName.ToLower()&lt;/pre&gt;
&lt;pre&gt;            $Tablename = $UserName.split(&lt;span class="str"&gt;"\")&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;            &lt;/pre&gt;
&lt;pre&gt;            $returncheck = Check_User_In_ActiveDirectory $Tablename[1] $mydomaincnx &lt;/pre&gt;
&lt;pre class="alt"&gt;            if($returncheck -eq $False)&lt;/pre&gt;
&lt;pre&gt;            {&lt;/pre&gt;
&lt;pre class="alt"&gt;                Write-Host "User does not exist&lt;span class="str"&gt;", $MyUser.LoginName, "&lt;/span&gt;on domain&lt;span class="str"&gt;"&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;                $usersToRemove = $usersToRemove + $MyUser.LoginName&lt;/pre&gt;
&lt;pre class="alt"&gt;                $GLOBAL:TotalUsersUpdated += 1;&lt;/pre&gt;
&lt;pre&gt;            }&lt;/pre&gt;
&lt;pre class="alt"&gt;        }&lt;/pre&gt;
&lt;pre&gt;    }&lt;/pre&gt;
&lt;pre class="alt"&gt;    &lt;/pre&gt;
&lt;pre&gt;    foreach($u in $usersToRemove)&lt;/pre&gt;
&lt;pre class="alt"&gt;    {&lt;/pre&gt;
&lt;pre&gt;        Write-Host "Removing&lt;span class="str"&gt;", $u, "&lt;/span&gt;from site collection&lt;span class="str"&gt;", $SiteCollectionURL&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;        $siteCollUsers.Remove($u)&lt;/pre&gt;
&lt;pre&gt;    }&lt;/pre&gt;
&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;    $web.Dispose()&lt;/pre&gt;
&lt;pre class="alt"&gt;    $site.Dispose()&lt;/pre&gt;
&lt;pre&gt;}&lt;/pre&gt;
&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;function ListOrphanedUsersForAllColl([string]$WebAppURL, [string]$DomainCNX)&lt;/pre&gt;
&lt;pre class="alt"&gt;{&lt;/pre&gt;
&lt;pre&gt;    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint&lt;span class="str"&gt;") &amp;gt; $null&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;    $Thesite = new-object Microsoft.SharePoint.SPSite($WebAppURL)&lt;/pre&gt;
&lt;pre class="alt"&gt;    $oApp = $Thesite.WebApplication&lt;/pre&gt;
&lt;pre&gt;    Write-host "Total Site Collections:&lt;span class="str"&gt;", $oApp.Sites.Count&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;    $i = 0&lt;/pre&gt;
&lt;pre class="alt"&gt;    foreach ($Sites in $oApp.Sites)&lt;/pre&gt;
&lt;pre&gt;    {&lt;/pre&gt;
&lt;pre class="alt"&gt;        $i = $i + 1&lt;/pre&gt;
&lt;pre&gt;        Write-Host "---------------------------------------&lt;span class="str"&gt;"&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;        Write-host "Collection Number&lt;span class="str"&gt;", $i, "&lt;/span&gt;of&lt;span class="str"&gt;", $oApp.Sites.Count&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class="alt"&gt;        if($i -gt 0)&lt;/pre&gt;
&lt;pre&gt;        {&lt;/pre&gt;
&lt;pre class="alt"&gt;            $mySubweb = $Sites.RootWeb&lt;/pre&gt;
&lt;pre&gt;            $TempRelativeURL = $mySubweb.Url&lt;/pre&gt;
&lt;pre class="alt"&gt;            ListOrphanedUsers $TempRelativeURL $DomainCNX&lt;/pre&gt;
&lt;pre&gt;        }&lt;/pre&gt;
&lt;pre class="alt"&gt;    }&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class="alt"&gt;    Write-Host "=======================================&lt;span class="str"&gt;"&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class="alt"&gt;}&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class="alt"&gt;function EnumerateAllSiteColl()&lt;/pre&gt;
&lt;pre&gt;{&lt;/pre&gt;
&lt;pre class="alt"&gt;    $farm = Get-SPWebApplication | select DisplayName&lt;/pre&gt;
&lt;pre&gt;    foreach($app in $farm)&lt;/pre&gt;
&lt;pre class="alt"&gt;    {&lt;/pre&gt;
&lt;pre&gt;        $webapp = Get-SPWebApplication | ? {$_.DisplayName -eq $app.DisplayName}&lt;/pre&gt;
&lt;pre class="alt"&gt;        Write-Host "Web Application:&lt;span class="str"&gt;", $webapp.DisplayName&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;        ListOrphanedUsersForAllColl $webapp.Url "LDAP://DC=ca,DC=util&lt;span class="str"&gt;"&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;        Write-Host&lt;/pre&gt;
&lt;pre&gt;    }&lt;/pre&gt;
&lt;pre class="alt"&gt;}&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class="alt"&gt;function StartProcess()&lt;/pre&gt;
&lt;pre&gt;{&lt;/pre&gt;
&lt;pre class="alt"&gt;    cls&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class="alt"&gt;    [System.Diagnostics.Stopwatch] $sw;&lt;/pre&gt;
&lt;pre&gt;    $sw = New-Object System.Diagnostics.StopWatch&lt;/pre&gt;
&lt;pre class="alt"&gt;    $sw.Start()&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class="alt"&gt;    EnumerateAllSiteColl&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class="alt"&gt;    $sw.Stop()&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class="alt"&gt;    write-host "***************************&lt;span class="str"&gt;"&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;    write-host $GLOBAL:TotalUsersUpdated, "users removed &lt;span class="kwrd"&gt;in&lt;/span&gt;&lt;span class="str"&gt;", $sw.Elapsed.ToString()&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="alt"&gt;    write-host "***************************"&lt;/pre&gt;
&lt;pre&gt;}&lt;/pre&gt;
&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;StartProcess&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
  &lt;br&gt;Enjoy!&lt;/p&gt;
</description><pubDate>Tue, 12 Feb 2013 21:25:00 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/bsimser/powershell-tools-removing-orphaned-users-from-sharepoint</guid><category>PowerShell</category><category>SharePoint 2010</category></item><item><title>VMWare performance with USB drives</title><link>https://weblogs.asp.net:443/bsimser/vmware-performence-with-usb-drives</link><description>&lt;P mce_keep="true"&gt;As a SharePoint developer a wise choice is to run your Virtual Machines on a separate drive (separate from your OS drive). That way you gain some performance as two different operating systems are not contending for precious read/write times on the disk and, after all, the disk is the biggest bottleneck.&lt;/P&gt;
&lt;P mce_keep="true"&gt;If you're using VMWare with an external USB drive and are plagued by the dreaded 5+ minute black screen as your guest OS shuts down, then here's a potential fix.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Locate the config.ini file for VMWare. On Windows 7 you should find it under C:\ProgramData\VMWare\VMWare Workstation&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Edit the file and add the following lines to it:&lt;/DIV&gt;&lt;/LI&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;&lt;SPAN style="TEXT-ALIGN: left; WIDOWS: 2; TEXT-TRANSFORM: none; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; DISPLAY: inline !important; FONT: 12px/18px Arial, Helvetica, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; FLOAT: none; LETTER-SPACING: normal; COLOR: rgb(51,51,51); WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"&gt;prefvmx.minVmMemPct = "100"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;&lt;SPAN style="TEXT-ALIGN: left; WIDOWS: 2; TEXT-TRANSFORM: none; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; DISPLAY: inline !important; FONT: 12px/18px Arial, Helvetica, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; FLOAT: none; LETTER-SPACING: normal; COLOR: rgb(51,51,51); WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"&gt;&lt;/SPAN&gt;&lt;SPAN style="TEXT-ALIGN: left; WIDOWS: 2; TEXT-TRANSFORM: none; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; DISPLAY: inline !important; FONT: 12px/18px Arial, Helvetica, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; FLOAT: none; LETTER-SPACING: normal; COLOR: rgb(51,51,51); WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"&gt;&lt;SPAN style="TEXT-ALIGN: left; WIDOWS: 2; TEXT-TRANSFORM: none; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; DISPLAY: inline !important; FONT: 12px/18px Arial, Helvetica, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; FLOAT: none; LETTER-SPACING: normal; COLOR: rgb(51,51,51); WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"&gt;mainMem.useNamedFile = "FALSE"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;&lt;SPAN style="TEXT-ALIGN: left; WIDOWS: 2; TEXT-TRANSFORM: none; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; DISPLAY: inline !important; FONT: 12px/18px Arial, Helvetica, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; FLOAT: none; LETTER-SPACING: normal; COLOR: rgb(51,51,51); WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"&gt;&lt;SPAN style="TEXT-ALIGN: left; WIDOWS: 2; TEXT-TRANSFORM: none; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; DISPLAY: inline !important; FONT: 12px/18px Arial, Helvetica, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; FLOAT: none; LETTER-SPACING: normal; COLOR: rgb(51,51,51); WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"&gt;&lt;/SPAN&gt;&lt;SPAN style="TEXT-ALIGN: left; WIDOWS: 2; TEXT-TRANSFORM: none; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; DISPLAY: inline !important; FONT: 12px/18px Arial, Helvetica, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; FLOAT: none; LETTER-SPACING: normal; COLOR: rgb(51,51,51); WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"&gt;mainMem.partialLazySave = "FALSE"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;&lt;SPAN style="TEXT-ALIGN: left; WIDOWS: 2; TEXT-TRANSFORM: none; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; DISPLAY: inline !important; FONT: 12px/18px Arial, Helvetica, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; FLOAT: none; LETTER-SPACING: normal; COLOR: rgb(51,51,51); WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"&gt;&lt;SPAN style="TEXT-ALIGN: left; WIDOWS: 2; TEXT-TRANSFORM: none; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; DISPLAY: inline !important; FONT: 12px/18px Arial, Helvetica, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; FLOAT: none; LETTER-SPACING: normal; COLOR: rgb(51,51,51); WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"&gt;&lt;/SPAN&gt;&lt;SPAN style="TEXT-ALIGN: left; WIDOWS: 2; TEXT-TRANSFORM: none; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; DISPLAY: inline !important; FONT: 12px/18px Arial, Helvetica, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; FLOAT: none; LETTER-SPACING: normal; COLOR: rgb(51,51,51); WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"&gt;mainMem.partialLazyRestore = "FALSE"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;&lt;SPAN style="TEXT-ALIGN: left; WIDOWS: 2; TEXT-TRANSFORM: none; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; DISPLAY: inline !important; FONT: 12px/18px Arial, Helvetica, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; FLOAT: none; LETTER-SPACING: normal; COLOR: rgb(51,51,51); WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"&gt;&lt;SPAN style="TEXT-ALIGN: left; WIDOWS: 2; TEXT-TRANSFORM: none; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; DISPLAY: inline !important; FONT: 12px/18px Arial, Helvetica, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; FLOAT: none; LETTER-SPACING: normal; COLOR: rgb(51,51,51); WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"&gt;Save the file and restart your VM&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;&lt;SPAN style="TEXT-ALIGN: left; WIDOWS: 2; TEXT-TRANSFORM: none; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; DISPLAY: inline !important; FONT: 12px/18px Arial, Helvetica, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; FLOAT: none; LETTER-SPACING: normal; COLOR: rgb(51,51,51); WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"&gt;&lt;SPAN style="TEXT-ALIGN: left; WIDOWS: 2; TEXT-TRANSFORM: none; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; DISPLAY: inline !important; FONT: 12px/18px Arial, Helvetica, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; FLOAT: none; LETTER-SPACING: normal; COLOR: rgb(51,51,51); WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"&gt;Shut down and the home screen should come up in a matter of seconds instead of minutes&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P mce_keep="true"&gt;&lt;SPAN style="TEXT-ALIGN: left; WIDOWS: 2; TEXT-TRANSFORM: none; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; DISPLAY: inline !important; FONT: 12px/18px Arial, Helvetica, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; FLOAT: none; LETTER-SPACING: normal; COLOR: rgb(51,51,51); WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"&gt;So what are these settings for? minVmMemPct = "100" tells VMWare to fit the memory in the VM into your system RAM (using 100 as 100%). Try to avoid anything other than 100% or else you'll have a lot of file swapping going on here. The useNamedFile property is intended to be set to FALSE for USB-disks or other slow disks. partialLazySave and partialLazyRestore are just that, taking and restoring snapshots in the background or not.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;SPAN style="TEXT-ALIGN: left; WIDOWS: 2; TEXT-TRANSFORM: none; BACKGROUND-COLOR: rgb(255,255,255); TEXT-INDENT: 0px; DISPLAY: inline !important; FONT: 12px/18px Arial, Helvetica, sans-serif; WHITE-SPACE: normal; ORPHANS: 2; FLOAT: none; LETTER-SPACING: normal; COLOR: rgb(51,51,51); WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"&gt;Hope that helps.&lt;BR&gt;&lt;/P&gt;&lt;/SPAN&gt;
</description><pubDate>Mon, 01 Oct 2012 18:37:00 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/bsimser/vmware-performence-with-usb-drives</guid><category>SharePoint 2010</category></item><item><title>Metro SharePoint Directory–Reading from Lists</title><link>https://weblogs.asp.net:443/bsimser/metro-sharepoint-directory-reading-from-lists</link><description>&lt;p&gt;As yet another follow-up to the various posts I made on building a Metro-style directory of sorts in SharePoint &lt;a href="http://weblogs.asp.net/bsimser/archive/2012/06/07/goodbye-ribbon-going-full-screen-metro-style-with-sharepoint.aspx"&gt;here&lt;/a&gt; and &lt;a href="http://weblogs.asp.net/bsimser/archive/2012/02/28/metro-style-site-directory-for-sharepoint-using-emcascript.aspx"&gt;here&lt;/a&gt;, one thing that’s been asked a few times already is reading from a list.&lt;/p&gt;  &lt;p&gt;In &lt;a href="http://weblogs.asp.net/bsimser/archive/2012/02/28/metro-style-site-directory-for-sharepoint-using-emcascript.aspx"&gt;the original post&lt;/a&gt; we called the getSubWebsForCurrentUser method to fetch a list of sites. What if you wanted something more generic? Here’s a solution that will let you read from a list instead.&lt;/p&gt;  &lt;p&gt;First we’re going to need a list. This part is easy. Create a new custom list through the Site Actions (Site Actions &amp;gt; More Options &amp;gt; List &amp;gt; Custom List, intuitive I know). &lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_164EDF69.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_thumb_3BD85CCA.png" width="500" height="271" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The custom list gives you a blank list with one column, Title. That will be our text to display. Next add a new column to the list of type Hyperlink. It can be called Url, Link, or Ganondorf if you’re feeling particularily Zelda-ish. This will be the link that will transport your users to magical places.&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_0D12A428.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_thumb_0CA67133.png" width="500" height="325" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now that we have our list we can use a modified version of the original script to iterate through the list items and build up our menu. I won’t get into the details of how everything works here (go back and read the first article in this series) but here’s the part that will create the menus. Replace your loadSites method with this one:&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:ff2386e7-6e58-4009-a716-ffdd10ad695b" class="wlWriterEditableSmartContent"&gt;&lt;pre style=" width: 500px; height: 309px;background-color:#FFFF80;overflow: auto;;font-family:Consolas;font-size:12"&gt;&lt;div&gt;&lt;!--
&lt;p&gt;Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/&lt;/p&gt;
&lt;p&gt;--&amp;gt;&lt;span style="color: #008080;"&gt; 1&lt;/span&gt; &lt;span style="color: #800000;"&gt;function loadSites()
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 2&lt;/span&gt; &lt;span style="color: #800000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;{&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 3&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;    var context = new SP.ClientContext.get_current();
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 4&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 5&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;    if(context != undefined &amp;amp;&amp;amp; context != null)
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 6&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;    {
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 7&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;        var web = context.get_web();
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 8&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;        var list = web.get_lists().getByTitle('Zelda');
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 9&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;10&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;        var query = SP.CamlQuery.createAllItemsQuery();
&lt;/span&gt;&lt;span style="color: #008080;"&gt;11&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;        this.sites = list.getItems(query, 'Include(Title, Link)');
&lt;/span&gt;&lt;span style="color: #008080;"&gt;12&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;13&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;        context.load(this.sites);
&lt;/span&gt;&lt;span style="color: #008080;"&gt;14&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;15&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;        context.executeQueryAsync(
&lt;/span&gt;&lt;span style="color: #008080;"&gt;16&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;            Function.createDelegate(this, this.onSuccess),
&lt;/span&gt;&lt;span style="color: #008080;"&gt;17&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;            Function.createDelegate(this, this.onFailed));
&lt;/span&gt;&lt;span style="color: #008080;"&gt;18&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;    &lt;/span&gt;&lt;span style="color: #000000;"&gt;}&lt;/span&gt;&lt;span style="color: #800000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;19&lt;/span&gt; &lt;span style="color: #800000;"&gt;}
&lt;/span&gt;&lt;span style="color: #008080;"&gt;20&lt;/span&gt; &lt;span style="color: #800000;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Line 8 is where things get different from the original implementation. Instead of getting the sites for the user, we get our custom list. Then we create a new CAML query. The SP.CamlQuery object has a method to get all items so we’ll use that (we could construct a custom query here but we want everything for now).&lt;/p&gt;
&lt;p&gt;Line 11 we get all the list items based on the query and specify the fields we want to load.&lt;/p&gt;
&lt;p&gt;Line 13 is the same as line 18 in the original code and submits our job to the server for execution.&lt;/p&gt;
&lt;p&gt;Our onSuccess method is a little different now that we have to enumerate over list items instead of sites. Here’s the modified version:&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:e189840e-454e-40aa-9c31-1d3b4706c659" class="wlWriterEditableSmartContent"&gt;&lt;pre style=" width: 500px; height: 712px;background-color:#FFFF80;overflow: auto;;font-family:Consolas;font-size:12"&gt;&lt;div&gt;&lt;!--
&lt;p&gt;Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/&lt;/p&gt;
&lt;p&gt;--&amp;gt;&lt;span style="color: #008080;"&gt; 1&lt;/span&gt; &lt;span style="color: #800000;"&gt;function onSuccess()
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 2&lt;/span&gt; &lt;span style="color: #800000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;{&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 3&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;    var listItems = this.sites.getEnumerator();
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 4&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;    var menuNavContent = '';
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 5&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;    var contentNavContent = '';
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 6&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 7&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;    menuNavContent += '&amp;lt;div id=&amp;quot;applist&amp;quot;&amp;gt;';
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 8&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;    menuNavContent += '&amp;lt;h1&amp;gt;Apps&amp;lt;/h1&amp;gt;';
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 9&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;    menuNavContent += '&amp;lt;ul class=&amp;quot;apps&amp;quot;&amp;gt;';
&lt;/span&gt;&lt;span style="color: #008080;"&gt;10&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;11&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;    contentNavContent += '&amp;lt;div id=&amp;quot;appbox&amp;quot;&amp;gt;';
&lt;/span&gt;&lt;span style="color: #008080;"&gt;12&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;    contentNavContent += '&amp;lt;ul class=&amp;quot;apps&amp;quot;&amp;gt;';
&lt;/span&gt;&lt;span style="color: #008080;"&gt;13&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;14&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;    while(listItems.moveNext())
&lt;/span&gt;&lt;span style="color: #008080;"&gt;15&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;    {
&lt;/span&gt;&lt;span style="color: #008080;"&gt;16&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;        var item = listItems.get_current();
&lt;/span&gt;&lt;span style="color: #008080;"&gt;17&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;        var itemId = item.get_id();
&lt;/span&gt;&lt;span style="color: #008080;"&gt;18&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;        var itemUrl = item.get_item('Link').get_url();
&lt;/span&gt;&lt;span style="color: #008080;"&gt;19&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;        var title = item.get_item('Title');
&lt;/span&gt;&lt;span style="color: #008080;"&gt;20&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;21&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;        menuNavContent += '&amp;lt;li&amp;gt;';
&lt;/span&gt;&lt;span style="color: #008080;"&gt;22&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;        menuNavContent += &amp;quot;&amp;lt;a href='&amp;quot; + itemUrl + &amp;quot;'&amp;gt;&amp;quot; + title + &amp;quot;&amp;lt;/a&amp;gt;&amp;quot;;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;23&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;        menuNavContent += '&amp;lt;/li&amp;gt;';
&lt;/span&gt;&lt;span style="color: #008080;"&gt;24&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;25&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;        contentNavContent += &amp;quot;&amp;lt;div style=&amp;amp;quot;cursor&lt;/span&gt;&lt;span style="color: #000000;"&gt;:&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;pointer&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;&amp;amp;quot; onclick='location.href=&amp;quot; + itemUrl + &amp;quot;');&amp;amp;quot;&amp;gt;&amp;quot;;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;26&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;        contentNavContent += '&amp;lt;li class=&amp;quot;theme_blue&amp;quot;&amp;gt;';
&lt;/span&gt;&lt;span style="color: #008080;"&gt;27&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;        contentNavContent += '&amp;lt;div&amp;gt;';
&lt;/span&gt;&lt;span style="color: #008080;"&gt;28&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;        contentNavContent += '&amp;lt;div class=&amp;quot;tileTitle&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;' + itemUrl + '&amp;quot;&amp;gt;' + title + '&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;';
&lt;/span&gt;&lt;span style="color: #008080;"&gt;29&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;30&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;        contentNavContent += '&amp;lt;/div&amp;gt;';
&lt;/span&gt;&lt;span style="color: #008080;"&gt;31&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;        contentNavContent += '&amp;lt;/li&amp;gt;';
&lt;/span&gt;&lt;span style="color: #008080;"&gt;32&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;        contentNavContent += '&amp;lt;/div&amp;gt;';
&lt;/span&gt;&lt;span style="color: #008080;"&gt;33&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;    &lt;/span&gt;&lt;span style="color: #000000;"&gt;}&lt;/span&gt;&lt;span style="color: #800000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;34&lt;/span&gt; &lt;span style="color: #800000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;35&lt;/span&gt; &lt;span style="color: #800000;"&gt;    menuNavContent += '&amp;lt;/ul&amp;gt;';
&lt;/span&gt;&lt;span style="color: #008080;"&gt;36&lt;/span&gt; &lt;span style="color: #800000;"&gt;    menuNavContent += '&amp;lt;/div&amp;gt;';
&lt;/span&gt;&lt;span style="color: #008080;"&gt;37&lt;/span&gt; &lt;span style="color: #800000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;38&lt;/span&gt; &lt;span style="color: #800000;"&gt;    // replace our left hand menu navigation&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;39&lt;/span&gt; &lt;span style="color: #800000;"&gt;    $('#menuNav').html(menuNavContent);
&lt;/span&gt;&lt;span style="color: #008080;"&gt;40&lt;/span&gt; &lt;span style="color: #800000;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;41&lt;/span&gt; &lt;span style="color: #800000;"&gt;    contentNavContent += '&amp;lt;/ul&amp;gt;';
&lt;/span&gt;&lt;span style="color: #008080;"&gt;42&lt;/span&gt; &lt;span style="color: #800000;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;43&lt;/span&gt; &lt;span style="color: #800000;"&gt;    // replace our right hand tile navigation
&lt;/span&gt;&lt;span style="color: #008080;"&gt;44&lt;/span&gt; &lt;span style="color: #800000;"&gt;    $('#contentNav').html(contentNavContent);
&lt;/span&gt;&lt;span style="color: #008080;"&gt;45&lt;/span&gt; &lt;span style="color: #800000;"&gt;}
&lt;/span&gt;&lt;span style="color: #008080;"&gt;46&lt;/span&gt; &lt;span style="color: #800000;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;A few things to note here on what happening.&lt;/p&gt;
&lt;p&gt;Line 3 we fetch the list item enumerator.&lt;/p&gt;
&lt;p&gt;Line 14 we step over each item in the list.&lt;/p&gt;
&lt;p&gt;Line 16-19 we grab the individual item and fields we want.&lt;/p&gt;
&lt;p&gt;Line 21-23 we setup the left hand menu navigation with the title and link to the site (from the custom list data)&lt;/p&gt;
&lt;p&gt;Line 25-32 we populate the Metro tiles with the same information.&lt;/p&gt;
&lt;p&gt;Finally we add it to our markup on the page using jQuery to replace our Loading tags.&lt;/p&gt;
&lt;p&gt;That’s it. Now you have your custom menu driven from a SharePoint list. Go ahead and add items to the list and magic will happen.&lt;/p&gt;
&lt;p&gt;Look for a more lengthy article on this entire series shortly where I pull it all together as well as adding a few more cool things like tracking and sorting the list based on popularity of clicks. I’m also going to present this whole thing at next weeks Calgary SharePoint User Group meeting if you’re in town so you can join us then.&lt;/p&gt;
&lt;p&gt;Enjoy.&lt;/p&gt;
</description><pubDate>Tue, 12 Jun 2012 13:44:03 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/bsimser/metro-sharepoint-directory-reading-from-lists</guid><category>JavaScript</category><category>jQuery</category><category>Metro</category><category>SharePoint 2010</category></item><item><title>Goodbye Ribbon–Going Full Screen Metro Style with SharePoint</title><link>https://weblogs.asp.net:443/bsimser/goodbye-ribbon-going-full-screen-metro-style-with-sharepoint</link><description>&lt;p&gt;Having some fun with a previous post I did about generating a Metro-style menu from a Custom List in SharePoint for the purpose of building something like an Application Directory. It’s a great navigation system and by adding something like Live Tiles (that pulls information from each site) via JavaScript it can be an informative dashboard rather than a pretty menu. You can read the previous write-up I did on this &lt;a href="http://weblogs.asp.net/bsimser/archive/2012/02/28/metro-style-site-directory-for-sharepoint-using-emcascript.aspx"&gt;here&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;Here’s what my Application Directory looks like:&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_5EE79E4F.png"&gt;&lt;img style="display: inline" title="image" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_thumb_4A31DD6A.png" width="500" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Nice, but all that SharePoint chrome isn’t needed for the purpose of navigating the directory.&lt;/p&gt;  &lt;p&gt;The answer is simple. Just a few CSS styles you override to hide everything.&lt;/p&gt;  &lt;p&gt;Here’s the CSS markup you need:&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:8139534c-7ffa-44c1-b602-6d5b05e371aa" class="wlWriterEditableSmartContent"&gt;&lt;pre style=" width: 500px; height: 365px;background-color:#FFFF80;overflow: auto;;font-family:Consolas;font-size:12"&gt;&lt;div&gt;&lt;!--
&lt;p&gt;Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/&lt;/p&gt;
&lt;p&gt;--&amp;gt;&lt;span style="color: #008080;"&gt; 1&lt;/span&gt; &lt;span style="color: #800000;"&gt;&amp;lt;style&amp;gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 2&lt;/span&gt; &lt;span style="color: #800000;"&gt;&lt;/span&gt;&lt;span style="color: #008000;"&gt;/&lt;em&gt;&lt;/span&gt;&lt;span style="color: #008000;"&gt; hide the ribbon row &lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;/em&gt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 3&lt;/span&gt; &lt;span style="color: #800000;"&gt;#s4-ribbonrow
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 4&lt;/span&gt; &lt;span style="color: #800000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;{&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 5&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;    display&lt;/span&gt;&lt;span style="color: #000000;"&gt;:&lt;/span&gt;&lt;span style="color: #0000FF;"&gt; none&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 6&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;}&lt;/span&gt;&lt;span style="color: #800000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 7&lt;/span&gt; &lt;span style="color: #800000;"&gt;&lt;/span&gt;&lt;span style="color: #008000;"&gt;/&lt;em&gt;&lt;/span&gt;&lt;span style="color: #008000;"&gt; hide the title row (menus, social tags, search) &lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;/em&gt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 8&lt;/span&gt; &lt;span style="color: #800000;"&gt;#s4-titlerow
&lt;/span&gt;&lt;span style="color: #008080;"&gt; 9&lt;/span&gt; &lt;span style="color: #800000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;{&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;10&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;    display&lt;/span&gt;&lt;span style="color: #000000;"&gt;:&lt;/span&gt;&lt;span style="color: #0000FF;"&gt; none&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;11&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;}&lt;/span&gt;&lt;span style="color: #800000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;12&lt;/span&gt; &lt;span style="color: #800000;"&gt;&lt;/span&gt;&lt;span style="color: #008000;"&gt;/&lt;em&gt;&lt;/span&gt;&lt;span style="color: #008000;"&gt; without overriding this your content
&lt;/span&gt;&lt;span style="color: #008080;"&gt;13&lt;/span&gt; &lt;span style="color: #008000;"&gt;   will get pushed down &lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;/em&gt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;14&lt;/span&gt; &lt;span style="color: #800000;"&gt;body #s4-leftpanel
&lt;/span&gt;&lt;span style="color: #008080;"&gt;15&lt;/span&gt; &lt;span style="color: #800000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;{&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;16&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;    width&lt;/span&gt;&lt;span style="color: #000000;"&gt;:&lt;/span&gt;&lt;span style="color: #0000FF;"&gt; 0&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;17&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;}&lt;/span&gt;&lt;span style="color: #800000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;18&lt;/span&gt; &lt;span style="color: #800000;"&gt;&lt;/span&gt;&lt;span style="color: #008000;"&gt;/&lt;em&gt;&lt;/span&gt;&lt;span style="color: #008000;"&gt; without this your content will be
&lt;/span&gt;&lt;span style="color: #008080;"&gt;19&lt;/span&gt; &lt;span style="color: #008000;"&gt;   pushed to the left &lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;/em&gt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;20&lt;/span&gt; &lt;span style="color: #800000;"&gt;.s4-ca
&lt;/span&gt;&lt;span style="color: #008080;"&gt;21&lt;/span&gt; &lt;span style="color: #800000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;{&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;22&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;    margin-left&lt;/span&gt;&lt;span style="color: #000000;"&gt;:&lt;/span&gt;&lt;span style="color: #0000FF;"&gt; 0&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;23&lt;/span&gt; &lt;span style="color: #FF0000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;}&lt;/span&gt;&lt;span style="color: #800000;"&gt;
&lt;/span&gt;&lt;span style="color: #008080;"&gt;24&lt;/span&gt; &lt;span style="color: #800000;"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;And here’s the result:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_7093C0B5.png"&gt;&lt;img style="display: inline" title="image" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_thumb_69085148.png" width="500" height="296" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Nice and clean.&lt;/p&gt;
&lt;p&gt;If your admins need to get to the underlying system pages just navigate to “/_layouts/viewlsts.aspx” and they can navigate around normally from there. You could also create a link on the main page for that, even wrap it in a security token so only admins can see it!&lt;/p&gt;
&lt;p&gt;I have a blog post in the works on turning those pretty Metro icons into Live Tiles with data from the subsites, but that’s for another day.&lt;/p&gt;
&lt;p&gt;Until then, enjoy!&lt;/p&gt;
</description><pubDate>Thu, 07 Jun 2012 13:59:55 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/bsimser/goodbye-ribbon-going-full-screen-metro-style-with-sharepoint</guid><category>CSS</category><category>Metro</category><category>SharePoint 2010</category><category>User Interface</category></item><item><title>Tree Surgeon–Alive and Kicking or Dead and Buried?</title><link>https://weblogs.asp.net:443/bsimser/tree-surgeon-alive-and-kicking-or-dead-and-buried</link><description>&lt;p&gt;&lt;a href="http://treesurgeon.codeplex.com/"&gt;Tree Surgeon&lt;/a&gt; is a Visual Studio project generation tool originally written by Mike Roberts based on a series of blogs he wrote about building up a maintainable and testable development tree for .NET projects (&lt;a href="http://treesurgeon.codeplex.com/wikipage?title=DevelopmentTreeIntroduction&amp;amp;referringTitle=Documentation"&gt;recreated here on the CodePlex site&lt;/a&gt; as Mike’s original blog content is gone).&lt;/p&gt;  &lt;p&gt;It’s about building up a development tree that’s consistent from project to project; contains source code and all tools and dependencies; checked into source control; atomically integratable (not a word) into a build system complete with unit tests and artefacts (a word but the Canadian version of it).&lt;/p&gt;  &lt;p&gt;This is something every developer does on day 0 of the project. So why not automate it and make it a wizard that you don’t have to think about a lot? That’s why Tree Surgeon exists.&lt;/p&gt;  &lt;p&gt;I took over the maintenance of the tool and blogged about it &lt;a href="http://weblogs.asp.net/bsimser/archive/2007/04/02/tree-surgeon-has-a-new-home-on-codeplex.aspx"&gt;back in 2007&lt;/a&gt; when I took over the project and the last release was in June of 2008. The project has been popular. Since it’s launch there’s been over 10,000 downloads and 150,000 page views with 50,000 visitors to the site.&lt;/p&gt;  &lt;p&gt;Times have changed. Since that last release in 2008 so much has changed for .NET developers. The question is, today is the project still viable? Do we still need a tool to generate a project tree given that we have things like scaffolding systems, NuGet, and T4 templates. Or should we just give the project its rightful and respectful send off as its had a good life and has outlived its usefulness.&lt;/p&gt;  &lt;p&gt;What’s changed since 2008? Plenty. &lt;/p&gt;  &lt;p&gt;First off there's the T4 templating system that's now baked into Visual Studio. Scott Hanselman has a &lt;a href="http://www.hanselman.com/blog/T4TextTemplateTransformationToolkitCodeGenerationBestKeptVisualStudioSecret.aspx"&gt;great post on it here&lt;/a&gt; which has links to some tutorials (and his post is from 2008 but still valid today). From first glance at T4 (and to be honest I haven't done anything except tinker with it) it looks like Tree Surgeon. The templates look pretty much like what we use, except we're using code to search and replace tokens. With T4 it's built in.&lt;/p&gt;  &lt;p&gt;Now having said that you still need to do some magic with T4 templates to make them work as they can't tell if you wanted this type of project or that type. If TS was written today, it would probably use T4 as the templating engine instead of the one it uses now. That would eliminate a lot of the heavy lifting and probably make the system a little more robust, dynamic, etc.&lt;/p&gt;  &lt;p&gt;So there's that.&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Banksy_Elephant_in_the_room" border="0" alt="Banksy_Elephant_in_the_room" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/Banksy_Elephant_in_the_room_7202DF50.jpg" width="500" height="312" /&gt;&lt;/p&gt;  &lt;p&gt;Then there's the elephant in the room, NuGet.&lt;/p&gt;  &lt;p&gt;I personally worked on NuGet with Microsoft and have a lot of passion for it. With NuGet you can just type something like &amp;quot;Install-Package ScaffoldApp&amp;quot; and have a complete application built out for you. Scaffolding is something that was introduced with ASPMVC but it's a fairly generic concept and basically what Tree Surgeon does. With NuGet, scaffolding is easy and you just have some scripts and whatnot combined with files (potentially T4 templates) and the system will build out for you.&lt;/p&gt;  &lt;p&gt;Early on in NuGet I considered that TreeSurgeon could just become a NuGet package. However at the time it was still difficult to get something going (NuGet requires a project to start with so that was a bit of a show stopper). However some other scaffolding systems seem to work well (the MVC ones come to mind) so there might be an opportunity there. The other option is a Visual Studio plug-in as there are a few that will create new projects for you (the HTML5 one comes to mind) complete with all the fixings.&lt;/p&gt;  &lt;p&gt;In any case, if a new project was created in Tree Surgeon, I'm almost certain it should use NuGet to fetch the third party references.&lt;/p&gt;  &lt;p&gt;Herein lies a bit of a dilemma with TS. For example when I start a new project I just go through the File &amp;gt; New Project and pick some appropriate starter (say a Windows Phone 7 application). Depending on the app platform (WP7, Web, WinForms, WPF) there are a set of packages that I'll just go and install (like Ninject or MVVM Light or something, along with some platform specific ones). It takes me 5 minutes but then I've got a scaffolded project that's ready to go (ala Tree Surgeon).&lt;/p&gt;  &lt;p&gt;However two things come to mind. First off, these are installed with NuGet and some people still haven't jumped onto that band wagon. So I think there should be a decision here. Tree Surgeon requires NuGet. That way, the dependencies and whatnot for getting these packages works. That's one of the issues with the current codebase (and why talk of a plugin system was going on). The third party components come and go. We need a system to manage them without having to get a new version of Tree Surgeon every time a new build tool comes out. That plugin system was NuGet (except Nuget does it much better).&lt;/p&gt;  &lt;p&gt;Okay, getting past that hurdle then the issue of how to serve up the tool so that a) its easy to get/use/access and b) it supports all the configurations that are out there. There are a *lot* more platforms than when Tree Surgeon started. TS was meant to be a solution starter so it would create your app along with unit test project and a client. The only problem is things like ASPNET MVC came along and already has the unit test framework generator built into the project creator. That sitll leaves WinForms and WebForms projects in the dust though and future of some of these (how many people start WebForms projects these days and where is WinForms going to be in a year when we have Win8 that doesn't support creating them in VS2012).&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Too-many-choices" border="0" alt="Too-many-choices" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/Too-many-choices_74C89443.jpg" width="500" height="375" /&gt;&lt;/p&gt;  &lt;p&gt;Pile on top of that the multitude of platforms available now. WPF, SharePoint, Silverlight, MVC, WebForms, WinForms, WP7. How many and how to support/include any or all of these in Tree Surgeon.&lt;/p&gt;  &lt;p&gt;Maybe I'm making a mountain out of a molehill but the landscape has changed and I think Tree Surgeon needs to change with it. The question is in what direction?&lt;/p&gt;  &lt;p&gt;There continues to be questions asked about creating new projects on StackOverflow for example, all of which either refer to or are similar to Tree Surgeon:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://stackoverflow.com/questions/789389/project-structure-for-c-sharp-development-effort"&gt;Project Structure for C# Development Effort&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://stackoverflow.com/questions/280439/whats-a-good-directory-structure-for-large-c-c-solutions"&gt;What’s a good directory structure for large C#/C++ solutions?&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://stackoverflow.com/questions/1287925/best-practices-organizing-a-visual-studio-solution"&gt;Best Practices organizing a Visual Studio Solution&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://stackoverflow.com/questions/270053/is-there-a-tool-that-will-generate-visual-studio-2008-projects"&gt;Is there a tool that will generate Visual Studio 2008 projects?&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://stackoverflow.com/questions/2736260/programmatically-generate-visual-studio-solution"&gt;Programatically generate Visual Studio Solution&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;So like I said, there’s still interest and need for such a tool but is that Tree Surgeon or something else?&lt;/p&gt;  &lt;p&gt;I look forward to anyones contributions to the discussion either in the comments below or &lt;a href="http://treesurgeon.codeplex.com/discussions"&gt;on the CodePlex site here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Thanks!&lt;/p&gt;
</description><pubDate>Thu, 31 May 2012 13:01:20 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/bsimser/tree-surgeon-alive-and-kicking-or-dead-and-buried</guid></item><item><title>What If Mad Men Landed the Microsoft Advertising Contract?</title><link>https://weblogs.asp.net:443/bsimser/what-if-mad-men-landed-the-microsoft-advertising-contract</link><description>&lt;p&gt;Back in the day, Marvel had a wonderful comic book series. It was called &lt;a href="http://en.wikipedia.org/wiki/What_If_(comics)"&gt;What If&lt;/a&gt; and featured titles like What If Spider-Man Joined the Fantastic Four, What If Captain America Became President, and What If Conan the Barbarian Walked The Earth Today?&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/250px-WhatIf1_33865F90.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="250px-WhatIf1" border="0" alt="250px-WhatIf1" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/250px-WhatIf1_thumb_503FD4A5.jpg" width="155" height="240" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Here’s some Sunday afternoon Photoshop fun and my What If version of &lt;a href="http://en.wikipedia.org/wiki/Mad_Men"&gt;Mad Men&lt;/a&gt; doing the advertising for Microsoft products.&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/microsoft_3BFE4484.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="microsoft" border="0" alt="microsoft" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/microsoft_thumb_37B42125.png" width="234" height="240" /&gt;&lt;/a&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/forefront_0799A9D7.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="forefront" border="0" alt="forefront" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/forefront_thumb_0BC3819C.png" width="234" height="240" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/liveessentials_385C15A8.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="liveessentials" border="0" alt="liveessentials" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/liveessentials_thumb_40EC4867.png" width="234" height="240" /&gt;&lt;/a&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/office_5BF4F1A8.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="office" border="0" alt="office" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/office_thumb_1A0E0C5A.png" width="234" height="240" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/office365_25FFD6C1.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="office365" border="0" alt="office365" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/office365_thumb_4FFF1342.png" width="234" height="240" /&gt;&lt;/a&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/ie_05A432D0.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="ie" border="0" alt="ie" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/ie_thumb_1E23AA53.png" width="234" height="240" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/sharepoint_1FC4505A.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="sharepoint" border="0" alt="sharepoint" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/sharepoint_thumb_7C842F29.png" width="234" height="240" /&gt;&lt;/a&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/visualstudio_7D4C6F46.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="visualstudio" border="0" alt="visualstudio" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/visualstudio_thumb_7CD01684.png" width="234" height="240" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;
</description><pubDate>Sun, 27 May 2012 20:57:41 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/bsimser/what-if-mad-men-landed-the-microsoft-advertising-contract</guid><category>Community News</category><category>User Interface</category></item><item><title>Code to Interfaces. Right. What’s an Interface?</title><link>https://weblogs.asp.net:443/bsimser/code-to-interfaces-right-what-s-an-interface</link><description>&lt;p&gt;The premise of coding to interfaces has been around for awhile now. The concept is simple. Given a definition of something you create things based on that definition. That might be a horrible description of an interface but I didn’t want to go all Computer Science on you.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Interface? What’s an Interface?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Here’s a simple interface:&lt;/p&gt;  &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;interface&lt;/span&gt; ICustomerService&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum2&amp;quot;&amp;gt;   2:&amp;lt;/span&amp;gt; {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum3&amp;quot;&amp;gt;   3:&amp;lt;/span&amp;gt;     IEnumerable&amp;amp;lt;Customer&amp;amp;gt; GetAllCustomers();&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum4&amp;quot;&amp;gt;   4:&amp;lt;/span&amp;gt; }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Pretty basic. We have a Customer class somewhere and this interface describes a method called GetAllCustomers that will return you a list of Customer objects.&lt;/p&gt;
&lt;p&gt;With an interface you don’t have an implementation. There’s no code here to say where we get the customers from, just that we expect this to return us a list of them.&lt;/p&gt;
&lt;p&gt;Now in our code we can write something like this:&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; DisplayAllCustomers(ICustomerService service)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum2&amp;quot;&amp;gt;   2:&amp;lt;/span&amp;gt; {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum3&amp;quot;&amp;gt;   3:&amp;lt;/span&amp;gt;     &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;foreach&amp;lt;/span&amp;gt; (var customer &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;in&amp;lt;/span&amp;gt; service.GetAllCustomers())&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum4&amp;quot;&amp;gt;   4:&amp;lt;/span&amp;gt;     {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum5&amp;quot;&amp;gt;   5:&amp;lt;/span&amp;gt;         &amp;lt;span style=&amp;quot;color: #008000&amp;quot;&amp;gt;// Output whatever customer info here&amp;lt;/span&amp;gt;&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum6&amp;quot;&amp;gt;   6:&amp;lt;/span&amp;gt;     }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum7&amp;quot;&amp;gt;   7:&amp;lt;/span&amp;gt; }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The method here expects an object that implements the ICustomerService interface. That’s how we can build and compile this but we have yet to build an implementation of this method. Of course the code won’t run because your application doesn’t know how to create an object that implements ICustomerService.&lt;/p&gt;
&lt;p&gt;Like I said, the implementation is up to you but you’ll probably be driving it from requirements or what the user needs to see or whatever. Here’s a sample implementation:&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;internal&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; CustomerRepository : ICustomerService&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum2&amp;quot;&amp;gt;   2:&amp;lt;/span&amp;gt; {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum3&amp;quot;&amp;gt;   3:&amp;lt;/span&amp;gt;     &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;public&amp;lt;/span&amp;gt; IEnumerable&amp;amp;lt;Customer&amp;amp;gt; GetAllCustomers()&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum4&amp;quot;&amp;gt;   4:&amp;lt;/span&amp;gt;     {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum5&amp;quot;&amp;gt;   5:&amp;lt;/span&amp;gt;         &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;return&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;new&amp;lt;/span&amp;gt; List&amp;amp;lt;Customer&amp;amp;gt;&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum6&amp;quot;&amp;gt;   6:&amp;lt;/span&amp;gt;                     {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum7&amp;quot;&amp;gt;   7:&amp;lt;/span&amp;gt;                         &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;new&amp;lt;/span&amp;gt; Customer {Name = &amp;lt;span style=&amp;quot;color: #006080&amp;quot;&amp;gt;&amp;amp;quot;Harold&amp;amp;quot;&amp;lt;/span&amp;gt;}, &amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum8&amp;quot;&amp;gt;   8:&amp;lt;/span&amp;gt;                         &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;new&amp;lt;/span&amp;gt; Customer {Name = &amp;lt;span style=&amp;quot;color: #006080&amp;quot;&amp;gt;&amp;amp;quot;Kumar&amp;amp;quot;&amp;lt;/span&amp;gt;}&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum9&amp;quot;&amp;gt;   9:&amp;lt;/span&amp;gt;                     };&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum10&amp;quot;&amp;gt;  10:&amp;lt;/span&amp;gt;     }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum11&amp;quot;&amp;gt;  11:&amp;lt;/span&amp;gt; }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;So if we created an object of this CustomerRepository class and passed it to the DisplayAllCustomers method above, we would output Harold and Kumar’s names (or whatever your display code was).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The $10,000 Question&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;People will stare at the code and say, why? Why create that ICustomerService and then have to go to the trouble of creating it and passing it along to the DisplayAllCustomers. More code to maintain they say. More work.&lt;/p&gt;
&lt;p&gt;Let’s try to dispel some myths here.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Coding to Interfaces is Hard&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Really? Do you understand the code above? That’s coding to an interface. Could you do that yourself? Sure you can. Let’s move on.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Coding to Interfaces Constrains Me&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;It’s true. If you added the method “void AddCustomer(Customer customer)” to your inteface, you wouldn’t be able to compile your code. The CustomerRepostory class (and any other class that implemented the ICustomerService interface) would require it. Stop thinking about this as a constraint, it’s a design choice. It’s like the Architect giving you a window or door on the side of your house. You don’t go cutting open another hole because you want another window. You have to take into account load bearing walls, structural integrity, etc. which is what the Architect does (I know, I used to be one). Just because it looks good or you need it, doesn’t mean it should be done (at least in the way you might want it).&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Coding to Interfaces makes you do extra work&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Yes, you have to create those interfaces so yeah, that’s extra work. Some might argue that if your implementation is simple then you’re writing double the code. Again, all true. There are benefits that will outweigh this which we’ll look at in a moment.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Where are the Benefits?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Let’s talk some benefits here. First coding to an interface is giving you a layer of abstraction. Remember that ICustomerService above? The implementation is sort of silly but shows that we can write code that does what the system intends. We could also build an implementation that reads from a database. Or Active Directory. Or SAP. Or a Web Service. Each time we write a new implementation, we don’t have to change our DIsplayAllCustomers method.&lt;/p&gt;
&lt;p&gt;That’s abstraction. You don’t have to worry in your DisplayAllCustomers method where the data came from or what infrastructure may or may not exist. All you care about is that you expect a list of customers to come back.&lt;/p&gt;
&lt;p&gt;Now multiply that by 10 or 100 and you get the benefits of abstraction against a real codebase.&lt;/p&gt;
&lt;p&gt;Some people will talk about future proofing and interfaces and while that may be a benefit down the road, and it can happen, consider it icing on the cake. Imagine if you had coded to an IEnumerable interface instead of ArrayList? Now you *might* not have to rewrite a lot of code (or any if you’re really lucky). &lt;/p&gt;
&lt;p&gt;I do believe, and have rarely seen, entire implementations changed. For example one classic is the “build a database interface so we can swap between SQL and Oracle”. You build an abstraction over a database to make it simpler to code to but not necessarily swap out technologies.&lt;/p&gt;
&lt;p&gt;Just don’t use the future proofing claim as a crutch to not code to interfaces claiming YAGNI or something. There are different reasons for this. &lt;/p&gt;
&lt;p&gt;The other big thing is testing. Going back to our CustomerRepository. It’s an in-memory representation to a list of customers. Imagine you had additional methods on your interface like this:&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;internal&lt;/span&gt; &lt;span style="color: #0000ff"&gt;interface&lt;/span&gt; ICustomerService&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum2&amp;quot;&amp;gt;   2:&amp;lt;/span&amp;gt; {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum3&amp;quot;&amp;gt;   3:&amp;lt;/span&amp;gt;     IEnumerable&amp;amp;lt;Customer&amp;amp;gt; GetAllCustomers();&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum4&amp;quot;&amp;gt;   4:&amp;lt;/span&amp;gt;     &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;void&amp;lt;/span&amp;gt; AddCustomer(Customer newCustomer);&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum5&amp;quot;&amp;gt;   5:&amp;lt;/span&amp;gt;     &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;void&amp;lt;/span&amp;gt; DeleteCustomer(Customer customerToDelete);&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum6&amp;quot;&amp;gt;   6:&amp;lt;/span&amp;gt; }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;And now with your in-memory representation you can write tests that ensure items are added and deleted in your repository and the counts all match and the list comes back with the right names. Now you’re starting to test against your interface, which is a good thing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Testing&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Testing frameworks will let&amp;#160; you do things like create stubs or fake implementations of the interface, without actually writing code to return actual values. Without interfaces if you tried to test the AddCustomer method in say a SQL based implementation, you would need a database, login information, test data, etc. That’s great for infrastructure tests but for unit tests it’s a lot of overhead you shouldn’t be getting into.&lt;/p&gt;
&lt;p&gt;Another benefit is getting ahead of infrastructure. Imagine if your ICustomerService is going to talk to a web service, as web service that won’t be written for another month. You could go ahead and wait for the infrastructure to show up, code concrete classes against it, and then start your testing but now you’re in the crunch to get the system done and you’re just starting your unit testing.&lt;/p&gt;
&lt;p&gt;Instead, based on requirements and perhaps UI discussions with users using paper, whiteboard, or digital wireframes, you come up with the interface. “We’re going to need to display the customer fields and oh yeah, we want to search by first and last name”. Great. From that description you can come up with an interface something like this:&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;interface&lt;/span&gt; ICustomerService&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum2&amp;quot;&amp;gt;   2:&amp;lt;/span&amp;gt; {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum3&amp;quot;&amp;gt;   3:&amp;lt;/span&amp;gt;     IEnumerable&amp;amp;lt;Customer&amp;amp;gt; FindBy(&amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;string&amp;lt;/span&amp;gt; firstName);&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum4&amp;quot;&amp;gt;   4:&amp;lt;/span&amp;gt;     IEnumerable&amp;amp;lt;Customer&amp;amp;gt; FindBy(&amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;string&amp;lt;/span&amp;gt; firstName, &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;string&amp;lt;/span&amp;gt; lastName);&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum5&amp;quot;&amp;gt;   5:&amp;lt;/span&amp;gt; }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Again we can write up some implementation (maybe going against a preset list of names you import from a spreadsheet) and actually build out a working UI. The user can put their hands on it, search by names, and see the results returned. All without that pesky infrastructure. Then come the say the database gets built, you create your implementation to read it and do searches and BAM, your system is online and working end-to-end.&lt;/p&gt;
&lt;p&gt;On the testing front again, how would you test something that’s dependent on DateTime? For example you have a piece of code that ages some items in a system based on some business rules (or expires them).&lt;/p&gt;
&lt;p&gt;It’s all well and fine to start tossing around DateTime objects like this:&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; ExpireTest(ICustomerService service, DateTime date)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum2&amp;quot;&amp;gt;   2:&amp;lt;/span&amp;gt; {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum3&amp;quot;&amp;gt;   3:&amp;lt;/span&amp;gt;     &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;foreach&amp;lt;/span&amp;gt; (var customer &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;in&amp;lt;/span&amp;gt; service.GetAllCustomers())&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum4&amp;quot;&amp;gt;   4:&amp;lt;/span&amp;gt;     {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum5&amp;quot;&amp;gt;   5:&amp;lt;/span&amp;gt;         &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;if&amp;lt;/span&amp;gt;(customer.ContractDate &amp;amp;gt; date)&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum6&amp;quot;&amp;gt;   6:&amp;lt;/span&amp;gt;         {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum7&amp;quot;&amp;gt;   7:&amp;lt;/span&amp;gt;             ExpireContractFor(customer);&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum8&amp;quot;&amp;gt;   8:&amp;lt;/span&amp;gt;         }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum9&amp;quot;&amp;gt;   9:&amp;lt;/span&amp;gt;     }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum10&amp;quot;&amp;gt;  10:&amp;lt;/span&amp;gt; }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;However things get real ugly real fast. First I have to write this test and I’m sort of breaking both encapsulation and responsibility of the customer class. Maybe I should have a method on customer that takes in a DateTime object. Yuck. Now I’m passing that value into my business object which might be okay (it depends) but now consider the idea of something like this business rule:&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (var customer &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; service.GetAllCustomers())&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum2&amp;quot;&amp;gt;   2:&amp;lt;/span&amp;gt; {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum3&amp;quot;&amp;gt;   3:&amp;lt;/span&amp;gt;     &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;if&amp;lt;/span&amp;gt;(customer.ContractDate.Day == date.Day &amp;amp;amp;&amp;amp;amp; date.Hour &amp;amp;gt; 12)&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum4&amp;quot;&amp;gt;   4:&amp;lt;/span&amp;gt;     {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum5&amp;quot;&amp;gt;   5:&amp;lt;/span&amp;gt;         ExpireContractFor(customer);&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum6&amp;quot;&amp;gt;   6:&amp;lt;/span&amp;gt;     }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum7&amp;quot;&amp;gt;   7:&amp;lt;/span&amp;gt; }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Now I’ll only expire the contract if the date passed in is the same day as my contract and it’s after noon. Silly logic yes, but would require another test method, another date object to be passed in, etc. A lot of setup to test something and then along comes this somewhere in my Customer class:&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; Customer&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum2&amp;quot;&amp;gt;   2:&amp;lt;/span&amp;gt; {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum3&amp;quot;&amp;gt;   3:&amp;lt;/span&amp;gt;     &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;public&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;string&amp;lt;/span&amp;gt; Name { get; set; }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum4&amp;quot;&amp;gt;   4:&amp;lt;/span&amp;gt;&amp;amp;#160; &amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum5&amp;quot;&amp;gt;   5:&amp;lt;/span&amp;gt;     &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;public&amp;lt;/span&amp;gt; DateTime ContractDate { get; set; }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum6&amp;quot;&amp;gt;   6:&amp;lt;/span&amp;gt;&amp;amp;#160; &amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum7&amp;quot;&amp;gt;   7:&amp;lt;/span&amp;gt;     &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;public&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;int&amp;lt;/span&amp;gt; AgeOfContract()&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum8&amp;quot;&amp;gt;   8:&amp;lt;/span&amp;gt;     {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum9&amp;quot;&amp;gt;   9:&amp;lt;/span&amp;gt;         &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;return&amp;lt;/span&amp;gt; (&amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;int&amp;lt;/span&amp;gt;) (DateTime.Now - ContractDate).TotalDays;&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum10&amp;quot;&amp;gt;  10:&amp;lt;/span&amp;gt;     }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum11&amp;quot;&amp;gt;  11:&amp;lt;/span&amp;gt; }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Now I’m screwed, both in testing in code and testing on the site. I’m going to have to create test data with very specific dates, maybe mess around with the values (because I certainly can’t change the clock on the server) and frankly I’m going to cry.&lt;/p&gt;
&lt;p&gt;Interfaces can save you here. What if we had an interface called:&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;interface&lt;/span&gt; IDateTime&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum2&amp;quot;&amp;gt;   2:&amp;lt;/span&amp;gt; {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum3&amp;quot;&amp;gt;   3:&amp;lt;/span&amp;gt;     DateTime Now { get; set; }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum4&amp;quot;&amp;gt;   4:&amp;lt;/span&amp;gt; }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;And instead of the concrete implementation in our customer class we use the IDateTime interface. Here’s the Customer class refactored to use an interface:&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; Customer&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum2&amp;quot;&amp;gt;   2:&amp;lt;/span&amp;gt; {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum3&amp;quot;&amp;gt;   3:&amp;lt;/span&amp;gt;     &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;readonly&amp;lt;/span&amp;gt; IDateTime _dateTime;&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum4&amp;quot;&amp;gt;   4:&amp;lt;/span&amp;gt;&amp;amp;#160; &amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum5&amp;quot;&amp;gt;   5:&amp;lt;/span&amp;gt;     Customer(IDateTime dateTime)&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum6&amp;quot;&amp;gt;   6:&amp;lt;/span&amp;gt;     {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum7&amp;quot;&amp;gt;   7:&amp;lt;/span&amp;gt;         _dateTime = dateTime;&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum8&amp;quot;&amp;gt;   8:&amp;lt;/span&amp;gt;     }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum9&amp;quot;&amp;gt;   9:&amp;lt;/span&amp;gt;&amp;amp;#160; &amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum10&amp;quot;&amp;gt;  10:&amp;lt;/span&amp;gt;     &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;public&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;string&amp;lt;/span&amp;gt; Name { get; set; }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum11&amp;quot;&amp;gt;  11:&amp;lt;/span&amp;gt;&amp;amp;#160; &amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum12&amp;quot;&amp;gt;  12:&amp;lt;/span&amp;gt;     &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;public&amp;lt;/span&amp;gt; IDateTime ContractDate { get; set; }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum13&amp;quot;&amp;gt;  13:&amp;lt;/span&amp;gt;&amp;amp;#160; &amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum14&amp;quot;&amp;gt;  14:&amp;lt;/span&amp;gt;     &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;public&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;int&amp;lt;/span&amp;gt; AgeOfContract()&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum15&amp;quot;&amp;gt;  15:&amp;lt;/span&amp;gt;     {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum16&amp;quot;&amp;gt;  16:&amp;lt;/span&amp;gt;         &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;return&amp;lt;/span&amp;gt; (&amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;int&amp;lt;/span&amp;gt;) (_dateTime.Now - ContractDate).TotalDays;&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum17&amp;quot;&amp;gt;  17:&amp;lt;/span&amp;gt;     }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum18&amp;quot;&amp;gt;  18:&amp;lt;/span&amp;gt; }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Yes, there’s more that needs to be here like how an IDateTime can subtract values from each other, return a TImeSpan object, etc. but this is just for concepts.&lt;/p&gt;
&lt;p&gt;With the interface added, I’m now abstracted away from the concrete implementation of DateTime hard coded into my Customer class. I’ll pass in something that might implement DateTime to return some real time but for testing I can set it to anything I want.&lt;/p&gt;
&lt;p&gt;Testing is easier now and I don’t have to change my domain logic to deal with responsibilities outside of my concerns.&lt;/p&gt;
&lt;p&gt;Interfaces vs. Classes is the kind of thing to start holy flame wars. Some argue it adds extra code/work to the developer, others claim it unnecessarily future-proofs your app (aka YAGNI) and others think it makes for easier testing and abstraction away from things that have yet to come.&lt;/p&gt;
&lt;p&gt;I like to live in the latter world where I build my systems loosely coupled but tightly integrated. Interfaces provide me that ability. I hope this article sheds some light on the subject for you, whatever you choose.&lt;/p&gt;
&lt;p&gt;Enjoy.&lt;/p&gt;
</description><pubDate>Thu, 17 May 2012 02:48:28 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/bsimser/code-to-interfaces-right-what-s-an-interface</guid><category>.NET</category><category>Agile</category><category>C#</category><category>General Software Development</category></item><item><title>Getting Started with ASP.NET MVC 3, Logging, and Depency Injection</title><link>https://weblogs.asp.net:443/bsimser/getting-started-with-asp-net-mvc-3-logging-and-depency-injection</link><description>&lt;p&gt;I started a new ASP.NET MVC project recently and wanted to give you a little insight on kicking off new projects. There’s some setup time you want to spend setting up your solution and getting the plumbing in order before you dive into writing unit tests and building out your site. &lt;/p&gt;  &lt;p&gt;For a full on, blow my mind, ultimate guide you *have* to go watch &lt;a href="http://blog.wekeroad.com/"&gt;Rob Conery&lt;/a&gt; and his 90 minute walkthrough of setting up his MVC projects. I’ve watched this video a few times and Rob is awesome and knows his stuff. The tips he gives are gold. You can also check out the &lt;a href="http://mvc3starter.codeplex.com/"&gt;MVC 3 Starter Kit&lt;/a&gt; on CodePlex which is based on his &lt;a href="http://mvcstarter.codeplex.com/"&gt;MVC 2 Starter&lt;/a&gt; code but I found it was lacking a few features. In any case, go watch his video for the full meal deal either &lt;a href="http://youtu.be/U_Y2IJd2HjE"&gt;here on YouTube&lt;/a&gt; or &lt;a href="http://tekpub.com/view/dotnet-oss/4"&gt;here on TekPub&lt;/a&gt;. This post is just a mere shadow of his work but updates the use of Ninject with MVC 3.&lt;/p&gt;  &lt;p&gt;Okay, so we’re going to be doing some simple plumbing to get this going. We’ll put together the Hello World MVC 3 app, add in a logging system, and plumb in dependency injection in just a few minutes.&lt;/p&gt;  &lt;p&gt;You’ll need Visual Studio 2010 with MVC 3 and NuGet installed. You can get MVC 3 from the main site &lt;a href="http://www.asp.net/mvc/mvc3"&gt;here&lt;/a&gt;. Next install NuGet from &lt;a href="http://nuget.org/"&gt;here&lt;/a&gt;. The MVC 3 framework is obviously needed (Visual Studio 2010 only comes with MVC 2 out of the box) and NuGet is used to install our additional libraries (trust me, if you haven’t used NuGet before it will blow your mind).&lt;/p&gt;  &lt;p&gt;First steps is to build a new MVC 3 app. File &amp;gt; New Project. Then select Visual C# &amp;gt; Web &amp;gt; ASP.NET MVC 3 Application and give it a name.&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_221D877F.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_thumb_67C2119D.png" width="502" height="347" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Click OK and you’ll see the options dialog for a new MVC 3 Application.&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_146ACB77.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_thumb_3E6AC99F.png" width="502" height="453" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Pick Internet application as it will work for most everyone (Windows authentication works fine too but for this post it’s just easier to go with Internet). Let’s choose Razor for the view engine (ASPX is so 2011) and use HTML 5 markup (hey, it’s just a demo). We won’t create a unit test project but in a real project you’ll create one (or create a class library separately so you can use other unit testing frameworks). &lt;/p&gt;  &lt;p&gt;We’re creating a project based on the template to give us a controller as we’ll inject our dependency into it later, otherwise we would have to create those. In a real project we might start with an empty template and create our own controllers from scratch (again, demo land, remember?).&lt;/p&gt;  &lt;p&gt;Once you do that you’ll be at the Hello World project of the MVC world.&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_5D413D7D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_thumb_436D074E.png" width="247" height="258" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Okay, now we’re going to install two NuGet packages, &lt;a href="http://www.ninject.org/"&gt;Ninject&lt;/a&gt; and &lt;a href="http://nlog-project.org/"&gt;NLog&lt;/a&gt;. Ninject is an open source dependency injection framework and makes working with external dependencies (like infrastructure and services) a breeze. NLog is a free logging solution for .NET and allows you to write anything to almost any target including files, event logs, web services, mail, forms. You name it, it can write to it. I was using log4net for all my projects but lately I’ve switched over to NLog. It’s super-simple to use and highly flexible. Did I mention it’s available as a NuGet package?&lt;/p&gt;  &lt;p&gt;Right click on the References in your project and choose Manage NuGet Packages…&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_4294A164.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_thumb_28C06B35.png" width="350" height="206" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Make sure you’re looking at the Online packages (sometimes the dialog will open up to installed packages or updatable ones). Type in “nlog” into the search box and you’ll see the filtered search results. Choose NLog Configuration from the options. If you already had a log configuration file you can just choose NLog to install the logger but since we’re starting from scratch we need a config file to start with. Selecting NLog Configuration and you’ll see it has a dependency on NLog so you can just install the one package which installs a starter config file and then drags along the library with it. Easy.&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_60FEE24D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_thumb_5FBA496E.png" width="502" height="335" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Once you’ve installed NLog you can enter “ninject” in the search box. This will bring up a list of packages for the dependency injection library Ninject by Nate Kohari. You’ll want to install the Ninject.MVC3 package by Remo Gloor and Ian Davis. This package will install Ninject itself and the extensions for MVC 3 (along with the bootstrapper for web projects. Ninject requires you to review and accept the license agreement before it will install so go ahead and do that.&lt;/p&gt;  &lt;p&gt;Two packages and all of their dependencies but you’re now only a few minutes (yes, minutes) away from dependency injection heaven and MVC 3.&lt;/p&gt;  &lt;p&gt;The first thing we’re going to do is create an interface that will be our logging system. We have a logger (NLog) but that’s an implementation and while we could scatter NLog statements all over the place, we would be tied directly to that library. If we decided to phase out NLog and replace it with another library (such as how I’ve shifted from log4net to NLog) we would have to go through everywhere in our code and replace the NLog calls with the next best thing.&lt;/p&gt;  &lt;p&gt;This the one of the principles of dependency injection, abstraction, and SOLID. Creating an abstraction of an implementation to code against without tying ourselves to any one system (so to speak). At the end of the day we’ll still be calling into NLog functions but we’ll be doing it through an implementation class via our interface.&lt;/p&gt;  &lt;p&gt;The other key thing about this approach is that we we can mock or stub out the actual implementation of our logger for unit testing. You can really do that (very well) with concrete implementations. Imagine having to start up a database, file system logger, and the Windows Event log service just to unit test some business code.&lt;/p&gt;  &lt;p&gt;In addition to being able to test our code, we can also code to interfaces meaning that we don’t need the actual implementation until it comes time to actually perform the work. For example the project I’m currently working on is going to require to call out to web services and databases. These components are not built yet and won’t be for another month or so. I don’t want to halt the development of my app so I create service interfaces and repositories that will abstract these away from my system, allowing me to build a fully working (and tested) system (which just happens to use hard coded values for now). Later when those services appear I just build an implementation to talk to them and voila, my system is still working exactly the way it does today.&lt;/p&gt;  &lt;p&gt;Okay, enough talk. Here’s the interface for our logging system. I’m borrowing from Rob’s approach by creating a folder called Infrastructure with a subfolder called Logging. In it I’ll create an ILogger interface that will let me write an information message (most logging systems have various levels of logging like Information, Warning, Errors, etc.)&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_5E75B08F.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_thumb_56EA4122.png" width="167" height="59" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;And here’s my ILogger interface:&lt;/p&gt;  &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; MvcStarter.Infrastructure.Logging&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum2&amp;quot;&amp;gt;   2:&amp;lt;/span&amp;gt; {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum3&amp;quot;&amp;gt;   3:&amp;lt;/span&amp;gt;     &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;public interface&amp;lt;/span&amp;gt; ILogger&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum4&amp;quot;&amp;gt;   4:&amp;lt;/span&amp;gt;     {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum5&amp;quot;&amp;gt;   5:&amp;lt;/span&amp;gt;         &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;void&amp;lt;/span&amp;gt; Info(&amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;string&amp;lt;/span&amp;gt; message);&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum6&amp;quot;&amp;gt;   6:&amp;lt;/span&amp;gt;     }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum7&amp;quot;&amp;gt;   7:&amp;lt;/span&amp;gt; }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Next we need an implementation. We’ll create one for NLog. This is a simple class that implements ILogger and provides the Info method (along with the setup needed for NLog to work). Here’s the NLogLogger class:&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; height: 240px; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; NLog;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum2&amp;quot;&amp;gt;   2:&amp;lt;/span&amp;gt;  &amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum3&amp;quot;&amp;gt;   3:&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;namespace&amp;lt;/span&amp;gt; MvcStarter.Infrastructure.Logging&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum4&amp;quot;&amp;gt;   4:&amp;lt;/span&amp;gt; {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum5&amp;quot;&amp;gt;   5:&amp;lt;/span&amp;gt;     &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;public&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;class&amp;lt;/span&amp;gt; NLogLogger : ILogger&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum6&amp;quot;&amp;gt;   6:&amp;lt;/span&amp;gt;     {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum7&amp;quot;&amp;gt;   7:&amp;lt;/span&amp;gt;         &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;private&amp;lt;/span&amp;gt; Logger _logger;&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum8&amp;quot;&amp;gt;   8:&amp;lt;/span&amp;gt;  &amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum9&amp;quot;&amp;gt;   9:&amp;lt;/span&amp;gt;         &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;public&amp;lt;/span&amp;gt; NLogLogger()&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum10&amp;quot;&amp;gt;  10:&amp;lt;/span&amp;gt;         {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum11&amp;quot;&amp;gt;  11:&amp;lt;/span&amp;gt;             _logger = LogManager.GetCurrentClassLogger();&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum12&amp;quot;&amp;gt;  12:&amp;lt;/span&amp;gt;         }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum13&amp;quot;&amp;gt;  13:&amp;lt;/span&amp;gt;  &amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum14&amp;quot;&amp;gt;  14:&amp;lt;/span&amp;gt;         &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;public&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;void&amp;lt;/span&amp;gt; Info(&amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;string&amp;lt;/span&amp;gt; message)&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum15&amp;quot;&amp;gt;  15:&amp;lt;/span&amp;gt;         {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum16&amp;quot;&amp;gt;  16:&amp;lt;/span&amp;gt;             _logger.Info(message);&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum17&amp;quot;&amp;gt;  17:&amp;lt;/span&amp;gt;         }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum18&amp;quot;&amp;gt;  18:&amp;lt;/span&amp;gt;     }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum19&amp;quot;&amp;gt;  19:&amp;lt;/span&amp;gt; }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;We create a private variable of type NLog.Logger and create it in our constructor using the LogManager from NLog. Then to write using NLog we just call the Info method on the class, passing it our message.&lt;/p&gt;
&lt;p&gt;There are a lot of other methods we can call and add to our interface so later maybe we’ll extend that but this is enough to get you started.&lt;/p&gt;
&lt;p&gt;One more thing is that the default config file that was installed with the package is just that, blank. You need to tell it at least what target to use and what rules to apply to each target. The entire config file is documented online but you can just uncomment the sample implementation. Make sure to match up the logger rule (Trace in the config file) with your method you’re calling in the implementation. I just changed the minLevel of the NLog config file from Trace to Info to match our code.&lt;/p&gt;
&lt;p&gt;That’s all you need to have logging working but how do we call it? And how does Ninject fit in?&lt;/p&gt;
&lt;p&gt;Back when we installed Ninject it created a file for us. Go back to your project and check out the App_Start folder. Expand it and you’ll see a new file there called NinjectWebCommon.cs&lt;/p&gt;
&lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_4B5483E3.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_thumb_5CC4E4BB.png" width="227" height="112" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This sucker is responsible for kickstarting Ninject for you. If you watched Rob’s video or saw some tutorials on the net they talk about changing the base HttpApplication to a Ninject one. That’s one approach but with MVC 3 and the NuGet package this way is much simpler. There’s nothing for you to do except tell Ninject what dependencies you want to deal with and how to resolve them. &lt;/p&gt;
&lt;p&gt;Open up NinjectWebCommon.cs and scroll down to the RegisterServices method. This is where you’ll specify you own interfaces and concrete classes so Ninject can do it’s magic.&lt;/p&gt;
&lt;p&gt;With a single line we’re going to tell Ninject this:&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum2&amp;quot;&amp;gt;   2:&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color: #008000&amp;quot;&amp;gt;/// Load your modules or register your services here!&amp;lt;/span&amp;gt;&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum3&amp;quot;&amp;gt;   3:&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color: #008000&amp;quot;&amp;gt;/// &amp;amp;lt;/summary&amp;amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum4&amp;quot;&amp;gt;   4:&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color: #008000&amp;quot;&amp;gt;/// &amp;amp;lt;param name=&amp;amp;quot;kernel&amp;amp;quot;&amp;amp;gt;The kernel.&amp;amp;lt;/param&amp;amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum5&amp;quot;&amp;gt;   5:&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;private&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;static&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;void&amp;lt;/span&amp;gt; RegisterServices(IKernel kernel)&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum6&amp;quot;&amp;gt;   6:&amp;lt;/span&amp;gt; {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum7&amp;quot;&amp;gt;   7:&amp;lt;/span&amp;gt;     kernel.Bind&amp;amp;lt;ILogger&amp;amp;gt;().To&amp;amp;lt;NLogLogger&amp;amp;gt;().InSingletonScope();&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum8&amp;quot;&amp;gt;   8:&amp;lt;/span&amp;gt; }        &amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;What are we saying here? Simple. We’re telling Ninject to:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Whenever you see the ILogger interface needed (e.g. passed into a constructor of a class)&lt;/li&gt;
  &lt;li&gt;Resolve to the NLogLogger class&lt;/li&gt;
  &lt;li&gt;Make it a singleton (i.e. only do it once and reuse it over and over again)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We’re making our logger a singleton because we don’t need to start NLog every time we want to log a message. You can also specify other scopes (like by thread or on demand) but for logging a singleton works.&lt;/p&gt;
&lt;p&gt;Oh yeah, that’s it to hook up your dependency injection engine. And logging is ready to go.&lt;/p&gt;
&lt;p&gt;Let’s give it a whirl. Crack open the HomeController class and add a constructor that takes in an ILogger interface then using that interface, write out a message when the Index method is called (i.e. our home page is visited). Here’s the modified HomeController class:&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; height: 280px; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.Mvc;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum2&amp;quot;&amp;gt;   2:&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;using&amp;lt;/span&amp;gt; MvcStarter.Infrastructure.Logging;&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum3&amp;quot;&amp;gt;   3:&amp;lt;/span&amp;gt;&amp;amp;#160; &amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum4&amp;quot;&amp;gt;   4:&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;namespace&amp;lt;/span&amp;gt; MvcStarter.Controllers&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum5&amp;quot;&amp;gt;   5:&amp;lt;/span&amp;gt; {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum6&amp;quot;&amp;gt;   6:&amp;lt;/span&amp;gt;     &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;public&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;class&amp;lt;/span&amp;gt; HomeController : Controller&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum7&amp;quot;&amp;gt;   7:&amp;lt;/span&amp;gt;     {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum8&amp;quot;&amp;gt;   8:&amp;lt;/span&amp;gt;         &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;private&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;readonly&amp;lt;/span&amp;gt; ILogger _logger;&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum9&amp;quot;&amp;gt;   9:&amp;lt;/span&amp;gt;&amp;amp;#160; &amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum10&amp;quot;&amp;gt;  10:&amp;lt;/span&amp;gt;         &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;public&amp;lt;/span&amp;gt; HomeController(ILogger logger)&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum11&amp;quot;&amp;gt;  11:&amp;lt;/span&amp;gt;         {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum12&amp;quot;&amp;gt;  12:&amp;lt;/span&amp;gt;             _logger = logger;&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum13&amp;quot;&amp;gt;  13:&amp;lt;/span&amp;gt;         }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum14&amp;quot;&amp;gt;  14:&amp;lt;/span&amp;gt;&amp;amp;#160; &amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum15&amp;quot;&amp;gt;  15:&amp;lt;/span&amp;gt;         &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;public&amp;lt;/span&amp;gt; ActionResult Index()&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum16&amp;quot;&amp;gt;  16:&amp;lt;/span&amp;gt;         {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum17&amp;quot;&amp;gt;  17:&amp;lt;/span&amp;gt;             ViewBag.Message = &amp;lt;span style=&amp;quot;color: #006080&amp;quot;&amp;gt;&amp;amp;quot;Welcome to ASP.NET MVC!&amp;amp;quot;&amp;lt;/span&amp;gt;;&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum18&amp;quot;&amp;gt;  18:&amp;lt;/span&amp;gt;             _logger.Info(&amp;lt;span style=&amp;quot;color: #006080&amp;quot;&amp;gt;&amp;amp;quot;Home page visited&amp;amp;quot;&amp;lt;/span&amp;gt;);&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum19&amp;quot;&amp;gt;  19:&amp;lt;/span&amp;gt;             &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;return&amp;lt;/span&amp;gt; View();&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum20&amp;quot;&amp;gt;  20:&amp;lt;/span&amp;gt;         }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum21&amp;quot;&amp;gt;  21:&amp;lt;/span&amp;gt;&amp;amp;#160; &amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum22&amp;quot;&amp;gt;  22:&amp;lt;/span&amp;gt;         &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;public&amp;lt;/span&amp;gt; ActionResult About()&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum23&amp;quot;&amp;gt;  23:&amp;lt;/span&amp;gt;         {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum24&amp;quot;&amp;gt;  24:&amp;lt;/span&amp;gt;             &amp;lt;span style=&amp;quot;color: #0000ff&amp;quot;&amp;gt;return&amp;lt;/span&amp;gt; View();&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum25&amp;quot;&amp;gt;  25:&amp;lt;/span&amp;gt;         }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum26&amp;quot;&amp;gt;  26:&amp;lt;/span&amp;gt;     }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum27&amp;quot;&amp;gt;  27:&amp;lt;/span&amp;gt; }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;We add an ILogger interface to the constructor. This trigger Ninject to figure out what implementation to grab (our NLogLogger one) and create it for us (or reuse it since we told it we wanted a singleton). Then we use that implementation in our Index() method to log a message.&lt;/p&gt;
&lt;p&gt;Compile and run the app to visit the home page of your app and you’ll see this in your log:&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; 2012-05-15 19:18:38.8471 INFO Home page visited&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;That’s it. You have a logging system you can call anytime (just inject the interface into the class, Ninject will take care of the rest) and your project is setup with dependency injection and you’re ready to go. Now you can just add additional interfaces as you need them.&lt;/p&gt;
&lt;p&gt;The awesome thing here is that a) you can now mock or stub out your logging implementation and test it and b) replace that implementation with some other logger any time and your code will still just work.&lt;/p&gt;
&lt;p&gt;That’s the power of dependency injection.&lt;/p&gt;
&lt;p&gt;As a bonus piece of information, now that you have the dependency injection setup you can use it any time in case you’re in a pinch and don’t need/want to inject the implementation into your class.&lt;/p&gt;
&lt;p&gt;Here’s how you can call the logger from your Application_Start method (found in Global.asax.cs) before any controllers are fired up:&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Application_Start()&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum2&amp;quot;&amp;gt;   2:&amp;lt;/span&amp;gt; {&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum3&amp;quot;&amp;gt;   3:&amp;lt;/span&amp;gt;     AreaRegistration.RegisterAllAreas();&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum4&amp;quot;&amp;gt;   4:&amp;lt;/span&amp;gt;&amp;amp;#160; &amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum5&amp;quot;&amp;gt;   5:&amp;lt;/span&amp;gt;     RegisterGlobalFilters(GlobalFilters.Filters);&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum6&amp;quot;&amp;gt;   6:&amp;lt;/span&amp;gt;     RegisterRoutes(RouteTable.Routes);&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum7&amp;quot;&amp;gt;   7:&amp;lt;/span&amp;gt;&amp;amp;#160; &amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum8&amp;quot;&amp;gt;   8:&amp;lt;/span&amp;gt;     DependencyResolver.Current.GetService&amp;amp;lt;ILogger&amp;amp;gt;().Info(&amp;lt;span style=&amp;quot;color: #006080&amp;quot;&amp;gt;&amp;amp;quot;Application Started&amp;amp;quot;&amp;lt;/span&amp;gt;);&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pre style=&amp;quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;amp;#39;Courier New&amp;amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color: #606060&amp;quot; id=&amp;quot;lnum9&amp;quot;&amp;gt;   9:&amp;lt;/span&amp;gt; }&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;See that last line? DependencyResolver.Current.GetService will use whatever IoC you have configured and return the implementation of that interface.&lt;/p&gt;
&lt;p&gt;Okay, that’s enough to get started. Again, I encourage you to watch Rob’s *entire* video of setting up a new MVC project. Even though the video is for MVC 2, there are still a lot of idea that hold water in MVC 3 and it’s a great learning too (and free too).&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;
</description><pubDate>Wed, 16 May 2012 01:35:00 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/bsimser/getting-started-with-asp-net-mvc-3-logging-and-depency-injection</guid><category>ASP.NET</category><category>MVC</category><category>NuGet</category><category>Visual Studio</category></item><item><title>Broken Windows Phone Marketplace</title><link>https://weblogs.asp.net:443/bsimser/broken-windows-phone-marketplace</link><description>&lt;p&gt;Recently the Windows Phone Developer Team posted an article about how App Insights work and specifically &lt;a href="http://create.msdn.com/en-US/education/catalog/article/app-insights-part-one"&gt;how Free, Top, and New apps work&lt;/a&gt;. It’s all accurate, a good read, and (to an extent) will help you improve your app’s ranking in the Marketplace list.&lt;/p&gt;  &lt;p&gt;However there continues to exist a few underlying problems with the Marketplace, specifically for independent app and game developers, that has yet to be fixed. This isn’t the first time someone brought this and I blogged about it &lt;a href="http://weblogs.asp.net/bsimser/archive/2011/02/13/pet-peeves-with-the-windows-phone-7-marketplace.aspx"&gt;over a year ago&lt;/a&gt; when the Marketplace had about 10,000 apps. There’s even a user voice item to &lt;a href="http://wpdev.uservoice.com/forums/110711-app-hub-marketplace/suggestions/1739465-show-a-paid-app-w-a-trial-option-in-the-free-a"&gt;show trial apps that you can vote on&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;While I hate being a “this is broken” it seems that if you don’t call people out on things, they just let them linger and hope someone else fixes them. This is somewhat like the &lt;a href="http://en.wikipedia.org/wiki/Broken_windows_theory"&gt;broken windows theory&lt;/a&gt; that breaking a few windows in a building and not repairing them leads to more disrepair which then spreads to other areas. The idea is to fix a broken window when you see it and keep things fresh and working. To me, most of these broken windows have been in the Marketplace since day one and in some cases, new ones have appeared since the launch of the web-based Marketplace.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Apps vs. Games&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This is probably the biggest issue, next to the XBox LIVE one below. When I visit the Marketplace on the web I see this listed for Apps:&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_69F62DB7.png"&gt;&lt;img style="display: inline" title="image" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_thumb_169EE791.png" width="400" height="276" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;And here’s the home page listing for games:&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_0EA7452F.png"&gt;&lt;img style="display: inline" title="image" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_thumb_3F5A4CDA.png" width="400" height="278" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;That’s all well and dandy but what if I click on the “Top” filter under Apps. This is what I see:&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_79D54CAE.png"&gt;&lt;img style="display: inline" title="image" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_thumb_118C8415.png" width="400" height="287" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;No, that isn’t a Photoshop with a mislabelled title. It really is the “Top” listing of apps.&lt;/p&gt;  &lt;p&gt;Even though apps and games appear separated, they still get lumped together when you view the “Top” listing (because in the grand scheme of things, Angry Birds is way more popular than YouTube or Facebook).&lt;/p&gt;  &lt;p&gt;To me this is wrong. Games have their own grouping. In fact they even have an entire page to themselves:&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_625A987D.png"&gt;&lt;img style="display: inline" title="image" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_thumb_4741C96F.png" width="400" height="243" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;So why are they being lumped into the Top rankings for Apps?&lt;/p&gt;  &lt;p&gt;It gets even worse when you click on Apps from the home page to view all of the app and their sub-categories then click on the Top listing for Apps:&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_2C952D56.png"&gt;&lt;img style="display: inline" title="image" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_thumb_1586AC1A.png" width="400" height="228" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Yes, that’s the Top “Apps” in the all category. Is there a single app in that list? No, you have to scroll down (at least in my marketplace, every marketplace ranking is different) to the 12th icon before it’s an actual app (which is then followed by another 8 games before getting to the 2nd top app).&lt;/p&gt;  &lt;p&gt;So basically “Top” apps and games is broken. Plain and simple. If you build a kick-ass app that rises to the top don’t hold your breath to hope it will appear in the “all top” listings because you need to climb above all the XBox live games first. With a separation on the site of Apps vs. Games, this is unacceptable.&lt;/p&gt;  &lt;p&gt;Suggestion: If you go the distance to separate Apps vs. Games (like you have done) then go the distance and keep them separated. Don’t show me XBox LIVE titles when I’m asking for the Top Apps.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;XBox LIVE&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This brings us to the second most annoying “feature”. The Games section of the Marketplace offers a new “XBox LIVE” tab. This will filter out indie games and only show you ones that have been created by Microsoft and other studios for XBox LIVE (i.e. they get to participate in the official achievements and points system).&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_1037C569.png"&gt;&lt;img style="display: inline" title="image" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_thumb_194450EA.png" width="400" height="305" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;That’s great if you’re looking for an XBox LIVE title. Just click on it and boom, Bob’s yer uncle.&lt;/p&gt;  &lt;p&gt;However why do I see this when I click on the Top games:&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_10E07B93.png"&gt;&lt;img style="display: inline" title="image" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_thumb_5CCBDC3F.png" width="400" height="315" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Yes kids, just like how these titles bubble up to the “top” of the app listing, they also bubble up to the top of the game listing.&lt;/p&gt;  &lt;p&gt;Unfair? You betcha. XBL have a tab of their very own and right now there’s only a few dozen titles. So why in the name of all that is holy are you injecting XBox LIVE titles in to the Free, Top, and New tabs? &lt;/p&gt;  &lt;p&gt;Okay, I get it. How would you sort out XBL free, top, and new titles from each other? Fair question but since you have a tab of your very own for XBox LIVE why not go the extra distance and have a Free, Top and New tab or filter for just XBL titles.&lt;/p&gt;  &lt;p&gt;In other words, an indie game developer has a snowballs chance in Hell of getting into the Top listing for games (or apps for that matter) when trying to face off against the juggernaut of Microsoft Game Studio titles. Of the *Top* 20 games in all categories, only 1 is a non-XBL title.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Suggestion: Please keep XBL titles out of the filtering from the rest of the games. If you give them a sandbox to play in like you did, then let them play there and stop peeing in our sandbox.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Trial&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The third issue here is that of Trial visibility. Do you know how to see if an app or game has a trial version? Click on the details for each individual title and you’ll see it on the page under the price:&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_344CFA2B.png"&gt;&lt;img style="display: inline" title="image" alt="image" src="https://aspblogs.blob.core.windows.net/media/bsimser/Media/image_thumb_2BE924D4.png" width="279" height="417" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;There it is. On Each. Individual. Page.&lt;/p&gt;  &lt;p&gt;So trying to browse to see what’s a trial vs. not isn’t possible. The system knows they’re trials but they won’t tell you until you look at each individual one.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Suggestion: Include a Trial tab or filter or search box or something. Let us see what’s available as a Trial without having to drill into each title.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;To me, the Marketplace is broken on a few levels and it’s difficult (if not almost impossible) for people to get visibility above the AAA titles. Here’s hopes that Microsoft might be listening again and perhaps look into it. If you don’t agree things are broken then just consider me the crazy white dude on the corner yelling about doom and gloom and move on. If you do agree, voice your opinion as comments, tweet this, blog about it, whatever. Lets see if we can instigate change.&lt;/p&gt;  &lt;p&gt;Thanks!&lt;/p&gt;
</description><pubDate>Wed, 25 Apr 2012 23:46:28 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/bsimser/broken-windows-phone-marketplace</guid><category>Community News</category><category>Windows Phone</category><category>WP7</category></item></channel></rss>