February 2008 Entries
Well, today is my last day with the Project Server team before I move on to my new role with the UIFx team (the ASP.NET team but they're not called that apparently :-)). Last days are kinda weird, I've been going round saying goodbye to the people I've worked with most closely; even though I'm only moving to a building about 1/2 mile away! So anyway I learned a lot about how to be a Program Manager in the last year and a bit, but it's time to follow my passion and head back to a more technical position.
I was speaking to a friend back home this morning and one of our usual discussion points came up - 'why do I like working for Microsoft so much'...it may not seem like I do sometimes (I'm a moaner) but I really do. I tried to explain all the usual stuff, cool things to play with, responsibility which you rarely get anywhere else, great place to work etc...but in the end what it really comes down to is the people who work here.Now I'm not going to get into a Mini-MSFT type discussion, its not perfect but it's pretty damn good being here. A prime example came up this morning on a discussion list, where we were discussing of all things high utility bills and whether baseboard electric heaters or oil filled radiators are more efficient. In most places this would never be resolved...not at Microsoft!. Incidentally I have the permission of the person who wrote this post to put his reply on here...usually we can never post internal discussions publicly. This reply is from Harsh:
"The difference is in a variable called the Power Factor. High school physics says electrical power is P= V*I.
However, in actuality, not all current is converted into power, and some is lost to impedance. Hence, actual power equation looks like
![clip_image002[4]](http://mostlylucid.net/images/mostlylucid_net/WindowsLiveWriter/WhyIloveworkingatMicrosoft_AC3A/clip_image002%5B4%5D_thumb.gif)
Where Φ is the angle by which the Voltage vector leads the current vector. Aka phase angle
The reason for the different equations being that the first equation holds for linear impedances such as pure resistors. Whereas all real world loads have resistance along with Inductance which adds the phase angle between current and voltage.
Ideally cos Φ should be 1 for perfect efficiency. However, in real world scenarios, power companies mandate that all appliances have cos Φ as close to 1 as possible. Standard appliances range from 0.8-0.95. This is done by adding capacitance to compensate for the loss due to inductance. Since impedance Z is measured as
Z = R+jX where
![clip_image004[4]](http://mostlylucid.net/images/mostlylucid_net/WindowsLiveWriter/WhyIloveworkingatMicrosoft_AC3A/clip_image004%5B4%5D_thumb.gif)
Higher the X higher is the angle, and hence lower is the power factor.
With base board heaters, the load is pure inductance + resistance, since these are the primary heat generating components. Inductance always lags by 90 (current lags voltage by 90), so higher inductance means the phase angle is closer to 90 than to 0. So base board heaters operate at power factors that are in the range 0.2-0.4
If you add that in the equation, this means, for the amount of power drawn, the conversion of current drawn to heat is very inefficient.
With portable heaters or space heaters, they add capacitance in parallel with the inductance circuit. Capacitance ensures that the phase angle is leading by 90 (current leads voltage by 90). And ends up compensating for the inductance. Also, by its nature, a capacitor is a energy storage device, and ends up reducing the overall power drawn, along with also increasing the efficiency with which the power/current drawn is converted to heat.
So even though the mechanism that creates heat is the same, base board heaters are more inefficient as compared to space heaters."
I've been playing around with the new .NET 3.5 features including the as yet unreleased MVC framework (well, the version I'm playing with...). As I've said before I never really had the chance to use this stuff much when it first came out...but it's phenomenal! The code below provides paging of blog entries straight from my blog DB. I am still blown away by how simple this is to do now and just how little code I needed to write. Interesting times (and not in the nasty 'chinese proverb' sense of the word :-)) lay ahead for me!
public class PostModel
{
private static PostsDataContext pdc = new PostsDataContext();
public static Posts GetPosts(int blogId,int? page, int? pageSize)
{
int skip = page ?? 0 * pageSize ?? 20;
var posts = (from p in pdc.subtext_Contents where p.BlogId==blogId && p.PostType==1 orderby p.DateAdded descending select p).Skip(skip).Take(pageSize ?? 20);
Posts postList = new Posts();
foreach (var post in posts)
{
postList.Add(new Post { Id = post.ID, Title = post.Title, Body = post.Text });
}
return postList;
}
}
So, anyone remember my ASP.NET forums password? Umm...actually it's been so long since I've used it I think it expired (the password reminder page gets my hopes up). Anyway just signed up for a new account and answered a couple of questions. Really can't wait to get started in my new job!
Anyway, hope to see some of my faithful reader on the ASP.NET forum in future and expect to see a few posts with me making a fool of myself when getting up to speed on all the new hotness my future team is working on. I have some embryonic stuff I might wind up writing soon, number one is an XML configuration method for ASP.NET MVC...which I have no doubt completely goes against some core philosophy of the framework but I think it'd be cool to separate the controller mapping from code into some external config file (note, I have NO idea if this already planned...ain't joined the team yet!).
Right, off to bed...going to the dentist tomorrow to have my pizza fractured teeth fixed (as in a pizza caused one of my very british teeth to fragment...)
This is just the most exciting thing which has happened to me for years; in less than a week I'll be the newest Program Manager on the UIFx team (the team responsible for Silverlight, Winforms, ASP.NET, MVC, AJAX etc...).
It is a bit surreal, when I started this blog 5 years ago I was a developer living and working in Edinburgh (for the best company pre-Microsoft that I ever worked for, StormId) using and loving ASP.NET...now I get a chance to help design the future of the product. Over the past couple of weeks I've been getting caught up on the stuff which has happened in the product in the three years since I've been a full time dev; things like MVC, the development of AJAX and most recently Silverlight 2.0. One thing you find out when you stop using a product 8 (or 12) hours a day, every day is how rusty you get with this stuff.
I totally admit I was a bit underwhelmed by Silvelight 1.0 but the 2.0 release is just stunning...I can bind to a datagrid clientside in C# and have it work on a Mac! I got the chance to install the new dev bits yesterday and trawl through the tutorials which ScottGu posted on his blog (I'm told that everyone will get these bits fairly soon). I can't wait to see what people will do with this technology; makes it as easy to write a rich Internet application as it is to write a Winforms one...it's going to be amazing.
Apologies to Josh Twist with whom I had a drunken argument a couple of weeks ago in a downtown bar, you're right it's awesome...but I still say that it's the developers who write applications that will change the world, technologies just enable that to happen.
ASP.MVC...I've had the chance to read the specs as well as play with the latest bits for this framework. If you haven't worked with it you should! If you're developing an ASP.NET application which involves more than a few pages you have to use it! The last thing I did as a dev was to write what is basically an MVC based application for this site...it's based on a very different infrastructure (all configured and defined in XML) but in essence they're very similar. I am totally sold on this way of building applications and I'm really excited that we've chosen to build one into the product. I was reading through the specs and writing a little app thinking 'this is just beautiful'; it's so easy to understand and work with.
I'll update the post with links etc...later...
According to Jeff Foxworthy, so true....linked (stolen shamelessly) from here
- You know the state flower (Mildew).
- You feel guilty throwing aluminum cans or paper in the trash.
- Use the statement 'sun break' and know what it means.
- You know more than 10 ways to order coffee.
- You know more people who own boats than air conditioners.
- You feel overdressed wearing a suit to a nice restaurant.
- You stand on a deserted corner in the rain waiting for the 'WALK' signal.
- You consider that if it has no snow or has not recently erupted, it's not a real mountain.
- You can taste the difference between Starbucks, Seattle's Best, and Veneto's.
- You know the difference between Chinook, Coho and Sockeye salmon.
- You know how to pronounce Sequim, Puyallup, Issaquah, Oregon, Yakima and Willamette.
- You consider swimming an indoor sport.
- You can tell the difference between Japanese, Chinese and Thai food.
- In winter, you go to work in the dark and come home in the dark while only working eight-hour days.
- You never go camping without waterproof matches and a poncho.
- You are not fazed by 'Today's forecast: showers followed by rain,' and 'Tomorrow's forecast: rain followed by showers.'
- You have no concept of humidity with out precipitation.
- You know that Boring is a town in Oregon and not just a state of mind.
- You can point to at least two volcanoes, even if you cannot see through the cloud cover.
- You notice, 'The mountain is out' when it is a pretty day and you can actually see it.
- You put on your shorts when the temperature gets above 50, but still wear your hiking boots and parka.
- You switch to your sandals when it gets about 60, but keep the socks on.
- You have actually used your mountain bike on a mountain.
- You think people who use umbrellas are either wimps or tourists.
- You buy new sunglasses every year, because you cannot find the old ones after such a long time.
- You measure distance in hours.
- You often switch from 'heat' to 'a/c' in the same day.
- You design your kid's Halloween costume to fit under a raincoat.
- You know all the important seasons: Almost Winter, winter, Still Raining (Spring), Road Construction (Summer), Deer & Elk season (Fall).
- You actually understood these jokes and will probably forward them.
Pah, so I have great news but I can't tell you yet until someone else tells a bunch of other people (I know, I'm posting to tell you that I can't post...weird).
Umm...what I can say is that I have a renewed interest in Phil's blog...oh and it's the fulfillment of something I wanted to do about 9 years ago!
I don't usually like this stuff but this one is pretty good...and painfully true as someone who worked through the last bubble.
found here...
Well, I admit it I've been ignoring you...I'm sorry. Lots going on workwise, hopefully I'll have some big news this week and one of the many results will be lots more posts on this ere blog.
Oh, and as for the title...it's a lyric from one of the greatest songs ever: Zeros and Ones by Jesus Jones. You do have to remember that I'm pretty old; 35 as of yesterday!. When I was first learning to code I had this on loop literally for hours on end...on an Aiwa really tiny portable cassette player. Oddly now I'm pretty deaf...weird!
I REALLY love the last gasps of a technology when in order to even approach keeping up manufacturers take the platform to a new level; remember SVHS? My prediction; when we have ubiquitous broadband everywhere the likes of iPod and Zune will get REALLY interesting!
I love this type of thing, a whole post on
optimal string reverse algorithms. I always love this sort of thing, learning huge amounts of detail about fundamental operations (sort of, umm when do you ever reverse strings?). Actually looking at
Justin Rogers' blog he has
lots of great performance posts...