private static void SetListPermissions(SPList list, SPWeb web)
{
try
{
list.BreakRoleInheritance(false);
SPRoleDefinition readerRole = web.RoleDefinitions.GetByType(SPRoleType.Reader);
SPUser allUser = web.AllUsers["NT Authority\\Authenticated Users"];
SPRoleAssignment spRoleAssignment = new SPRoleAssignment(allUser);
spRoleAssignment.RoleDefinitionBindings.Add(readerRole);
list.RoleAssignments.Add(spRoleAssignment);
list.Update();
}
catch (Exception ex)
{
//Log Exception
throw;
}
}
Google announced a new mobile phone today. We have seen a number of announcements for ground-breaking, sexy new mobile devices in recent history
- AT&T/Apple’s iPhone
- Palm/Sprint’s Palm Pre
- Verizon/Motorola’s Droid
Google’s new Nexus One is available exclusively from … wait, it isn’t available exclusively to any mobile phone company or locked to any network. As subtle as this can seem on the surface, it changes the game in a profound way. Customers have been oppressed by artificial limitations placed on their hardware- well, the hardware that they kinda own- for far too long, and this simply needs to stop. It is inherently evil for any company to cripple or severely limits hardware they sell for the sole purpose of competitive advantage and to hold their customers captive. Apple learned this lesson many years ago when it lost market share to the PC. The cell phone companies must adapt or die.
Personally, I have had dozens of phones on every mobile network under the sun, and don’t recall many, if any, particularly good experiences with any of the companies I did business with. At the end of the standard two year contract period, I regularly jumped ship even if I was reasonably happy with my current provider. There was no reason to stay, their only goal was to hook you and forget about you for two years.
We’re reaching a point where it doesn’t really matter who carries your bits from your mobile device to whatever destination you send them to. They’re just bits, 1’s and 0’s whether they represent and email, a photo, a text message, a tweet, or a voice call. So long as they get where they’re going reliably, the pipe they flow across is completely irrelevant. I still use SMS to communicate with my low-tech friends, but have to pay extra for a communication that would be free via email, Twitter, Facebook, et al. Give me a pipe to the Interwebs and get out of my way!
The concept of buying a phone and being able to use it on any network its hardware will allow for is necessary step to repair the reviled mobile phone industry in the US today. It is also time to stop arguing VHS vs. Beta and standardize on GSM like the rest of the world already has done. Concentrate on what customers really care about: a fast network, a reliable network, and their choice of any phone they choose to buy.
With this crucial shift today, the future is bright for the customer to take back what is rightfully theirs – choice.
Chris is a North Carolina native who grew up in Greensboro. He was introduced to his first computer - a Commodore 64 - at age five and has not been able to disconnect since.
He is passionate about crafting better software, improving the user experience and giving back to the programming community.
Prior to joining Microsoft in 2009, he spent 4 years at Volvo IT working on the world's largest implementation of MCMS 2002. Soon after joining Volvo IT he helped lead the conversion of their CMS with 750,000 content articles from MCMS and SharePoint 2003 to a completely new system based on SharePoint 2007 for the company's Intranet, Extranet, and Internet presence.
To decompress, he enjoys hiking, backpacking, travelling, writing software, mountain biking, motorcycling, photography, live music, reading, playing guitar, doodling, and chasing his furry friends Roxy(a Sheltie) and Brasky(a Ninja Kitty).
While still residing part-time in Greensboro with his girlfriend Bridget, he looks forward to becoming a full-time Charlottean in 2010.
It is Fall, and a season of change for me. This post is long overdue, but today is the first day I've been able to relax a bit and think about blagging.

photo by 416style
A lot has been going on in my life lately. Namely:
All of that in the span of little over a month has been daunting, but overall very good, other than the car dropping incident.
With Volvo, it was my time. After four and a half years there, a change was long overdue. Overall it wasn't a bad job, which is what made it so difficult to leave, but I had reached what I like to call a "career cul-de-sac" and had been keeping my eye out for a fresh new opportunity for some time.
When I got the call from Microsoft saying they wanted to hire me as a contractor, the news was bittersweet. Having lived all my life in Greensboro, NC there was no way for me to know what the coming transition would be like, or would feel like. I didn't really hate my job, and loved the team I worked on. CWPTeam is a unique and talented bunch of people whom I feel privileged to have
been one of the original members of. Then I'm reminded of this quote from Mario Andretti
”If things seem under control, you are just not going fast enough."
While mostly tongue-in-cheek, there is a lot of truth just behind the seams.
Seth Godin's book The Dip had been a quick read around this time and put some important thoughts in my head. You have to close a door, even a perfectly good door, to open another one. When you distill things down enough, I was afraid of being a quitter, afraid of change, afraid to go outside of my comfort zone, afraid to jump. But to jump is exactly what I needed to do.
Since joining Volvo IT as a "permanent employee" in February 2008, to say things had gone downhill would not really be full disclosure. Sure the manufacturing and transportation industries are quite cyclical, but things had realigned at a very fundamental level. I joked that our motto had morphed from "Let's make sure" to "Let's make do," but this was hardly in jest. This environment had made me stop caring, an unnatural stance for me. When that happens, it is time to leave and go do something you can and *do* care about, for every-one's sake. The shift in focus helped me to realize that my passion was solely for the software, and the rest didn't matter to me.
Oddly enough, my current manager and I discussed this during my interview, as he had recently left a job with a large bank for a similar reason. It was a light-bulb moment when I came to realize the stark shift in priorities between a company that makes software, and a company that just happens to write software to accomplish a line-of-business task they haven't outsourced yet. While my team there was a talented group of individuals, each of whom I would jump at the opportunity to work with again - but that culture and quality was the exception rather than the rule in the wider scope there.
My first day at Microsoft was tough, and included a minor fender bender at lunch, but I learned the ropes quickly and was committing code to source control before the end of the first week. The fresh new challenge was a welcome one and I buried myself in the codebase, learning everything that I could from the collective intelligence in the air around me. I'm learning new things every day and that's exactly what was missing.
We'll have to see what the future holds, but no regrets thus far.
Charlotte has reminded me how easy I had it with Greensboro traffic. It is no DC, or Atlanta, but commuting was much more challenging until I moved into my new place yesterday. Now my commute is 15 minutes and I can take the light-rail to work if I want. This evening I walked a few blocks to enjoy dinner at Thai Taste and am surprised to admit, that I like urban living.
Update: Badge turned blue on December 21st. A dream realized!
Source: back of a napkin
The morning started out normal enough- a sunny Sunday morning with pavement waiting to be ridden on. About 25 members of the Impatient Triad Riders met at the usual spot, the Shell Station in Oak Ridge at 68 and 150. There was a great turnout for this ride in memory of Mason Levin, one of the founders of the group, who lost his life from injuries from a ride on July 18th. 
So we rode out and hit Highway 66 near Danbury for some twisties and stopped here at the shack for a short break and then began the ride up to Hanging Rock.
When I got to the end of Lynchburg Rd I became increasingly concerned that, unlike a minute or two before, there were no riders in my mirrors. I hesitated (and shouldn't have) for about a minute and turned around to find out what was up.
It wasn't instantly apparent what had happened when I arrived on this scene, but I knew it wasn't anything good.
To make a long story short, the rider behind me, Chris, had a Tree Fall On Him!
His reaction to this completely random flying timber was absolutely spot-on. He cracked open the throttle, hunkered down, and hugged the gas tank as closely as he could. With his side mirrors ripped off and helmet scuffed, he miraculously kept the bike up.

Next in the formation, Richard, wasn't as fortunate. Seriously, what are you supposed to do when a tree falls into your line of travel? There is no amount of experience to prepare you for that kind of thing. He did all he could with the brakes and limited stopping distance and reaction time, and laid it down before impacting the unexpected tree. He sustained some leg and knee injuries, but still made it out relatively unscathed for such a strange chain of events. He was taken to Baptist Hospital for treatment of his injuries.
Overall I was extremely impressed with how the other ITR members reacted on the scene before and after medical personnel arrived. Kudos guys, you're a top-notch bunch!
All photos
Find nearest object query with LINQ
While LINQ simplifies your DAL in myriad ways, this seemingly simple query made me stop and think about how to properly explain this to the query engine
Problem: Given an input of a current location (latitude and longitude) find all objects in the database within a specified radius
Disclaimer: This is using a bounding box hack rather than an accurate radius forumula, use at your own risk as there is some loss of precision.
/// Find all courts within a specified radius (in miles) to a point (latitude & longitude)
/// <param name="latitude">degrees(decimal)</param>
/// <param name="longitude">degrees(decimal)</param>
/// <param name="radius">miles</param>
/// <returns></returns>
public IQueryable<Court> FindNearbyCourts(decimal latitude, decimal longitude, decimal radius);
The first order of business is to convert miles to degrees of latitude and longitude, respectively.
| Latitude: | Factor out Equatorial bulge, and a degree of latitude is simply 69.04 statute miles. |
| Longitude: | On the other hand, longitude varies in length depending on your current latitude. For this example, I am assuming 30°N. Thus, one degree of longitude is 59.96 statute miles. |
decimal radiusLatitude = radius / 69.04;
decimal radiusLongitude = radius / 59.96;
Once we have these conversions in place, we are ready to build our LINQ query:
IQueryable<Court> nearbyCourts = from court in _db.Courts where (Math.Abs(court.latitude - latitude) < radiusLatitude) where (Math.Abs(court.longitude - longitude) < radiusLongitude) select court;
Return the IQueryable object nearbyCourts you just generated and you're all set.
How do grilled BBQ Ribs, a Cauldron of Brunswick stew, chicken, hotdogs & hamburgers sound for a Saturday in Spring? I thought it sounded great, so I'd like you to join me this Saturday for the festivities. Slated to be an extravaganza of southern food, your tastebuds will not soon forgive you for missing out.
Saturday, May 9th at 7pm
Some suggestions for items you might want to bring:
- Chips / Dip
- Sodas
- Beer
- Any Adult Beverages you might like (some will be provided)
- Smores ingredients: Marshmallows, Chocolate Bars, Graham Crackers
- A Blender (i have the stuff to make Margaritas, but a broken blender)
- Anything else you might feel inclined to bring and share
- Or, just bring yourself and a guest if you like
Looking forward to seeing you!
~Chris & Bridget
|