|
|
These blog entries are written by industry experts and leaders. We consider this content to be a good read for any software developer or web technologist.
October 2007 - Posts
-
-
Jason Alexander has a great post about must-have mac apps and some of the settings that he uses. I am in a similar boat as Jason, being primarily a .NET developer and former Windows user who has switched to the Mac I get tons of questions about what apps to use and how I like it. I thought I would go ahead and lay out some of my must-have apps and tips here:
My must-have apps for the Mac:
1) FireFox and Camino: I agree with Jason here, I couldn't get into Safari. I like Camino, but the various plugins I have become accustomed to keep bringing me back to Firefox. (Firebug, Del.icio.us, Google Toolbar, Alexa, etc)
2) Adium - Again, I am with Jason here. This is the best messenger app I have ever used on any platform.
3) Ecto - It's what I am writing this post in. Great blog posting tool that wasn't too expensive and does a great job.
4) VMWare Fusion - I have never used Parallels so I can't compare the two, but I loved VMWare on Windows and I love it on the Mac.
5) Quicksillver - It really is as cool as they say. Great launcher app with all kinds of neat features.
6) TextMate - Again, it's as cool as they say. Not only am I using it for Rails development I am using it for all of my text editor needs.
7) Cyberduck - Good little FTP program. I am thinking about buying Transmit, but I have bought enough Mac software this year already.
8) svnX - This is what I have been using for SVN access, there is a finder plugin as well like TortoiseSVN but I couldn't get it working with the latest version of Subversion.
9) Twitterific - The twitter client that all the Windows people lust over, been a little weird since Leopard but hoping a new release is coming out to fix the issues.
10) delibar - Toolbar app that gives me easy access to all my del.icio.us links.
11) Fan Control 1.2 - I like this one a little better than smcFanControl since it lets you set temperature thresholds. These things run hot.
12) Transmission - Free BitTorrent utility that I only use to download legit stuff.
13) Writeroom - One of those cool word processor apps that blacks out the rest of the screen and makes it feel like a typewriter, it's great if you want to focus on something.
14) CocoaMySql - A nice little MySQL client.
15) Flip4Mac - Play VMW and WMA in Quicktime
16) Growl - Toast for Macs
I have been trying out CSSEdit which is a nice looking CSS editor as well as iWork.
As for configuration tips I have a couple small ones, but make sure you read Jason's.... I do just about all the same things.
1) I setup my Active Corners a little bit differently than Jason. I put All Windows in the top left, Dashboard in the top right, Desktop in the bottom left, and Space in the bottom right.
2) Under System & Preferences -> Keyboard check the "Use all F1, F2, etc. keys as standard function keys". Using Visual Studio and hitting Fn + F5, Fn + F11, Fn + 11 is a pain.
A couple of accessories I have picked up too:
1) I picked up a Lapinator. Did I mention these run hot?
2) Option GT Max 3.6 Express - Don't believe the guy at the store who tells you it only works for Windows.
3) Brethaven Edge II - Great small case, not much room for anything else. But the extra power adapter pouch helps.
Well, that's about it.
-James

|
-
A few people have asked me what "hard core" WF questions to ask a job candidate.
For advanced topics, I like open-ended questions. Not all these questions have a right or wrong answer- but they should give you an idea of the candidates WF experience, and how they'd design and implement software with WF.
- Are there advantages to building workflows using only XAML? Are there disadvantages?
- What are the pros and cons of using an ExternalDataExchange service versus going directly to the WorkflowQueuingService?
- When are attached dependency properties useful in WF programming?
- What behavior does the default scheduling service provide?
- How can my code participate in a database transaction with a workflow instance?
- Why would I use a tracking service?
- Describe a scenario where the WF runtime will cancel an executing activity.
- Describe a scenario where I'd need to spawn an ActivityExecutionContext.
- Tell me why I'd use a compensation handler.
- Tell me about the following activities: Replicator, Parallel, and Policy.
A candidate who can run the table on these 10 questions knows their WF stuff. 
|
-
What people are working on in their spare time fascinates me. I love talking to someone about a project that they are motivated about and believe in enough to work on after hours (usually over a couple of beers). It especially fascinates me when the project is at least somewhat of a business. I love open source, but I also love the entrepreneur spirit and the quest to free yourself from the shackles of a day job.
So, I thought it would be fun to interview people who I know working on side projects and to hear about their motivation, goals, and experience.
I decided to start with my good friend Dave Donaldson and his project CodeKeep.
Give me a quick Bio
I’ve recently joined Telligent, makers of Community Server, as a Sr. Software Developer working on the core product team. Before that I spent 3 years as an independent consultant helping major companies adopt agile-type practices for building .NET applications.
So what is the elevator pitch for CodeKeep?
CodeKeep allows you to store code snippets in one central place, so you have access to them from anywhere at any time. You can use CodeKeep with a browser or with an add-on for Visual Studio.
How many users and snippets does CodeKeep currently have?
There are over 11,000 users and over 9,000 snippets.
What technologies did you use to build CodeKeep?
CodeKeep is built entirely on .NET. I used a number of things to implement CodeKeep: NHibernate, NHibernateRepository, EViL, ELMAH, log4net, and ASP.NET AJAX; SQL Server is used as the backend database. The first release of CodeKeep was done in .NET 1.1, but I rewrote it for .NET 2.0 quite a ways back. It’s written completely in C# for both the web site and the add-in and has undergone a couple major revisions since it launched back in August 2005. The most noticeable has been a new UI for the web site, but many of the improvements are things people can’t see.
How did you think of the idea for CodeKeep?
I got tired of always having to search through all my previous projects just to find little pieces of code I needed for what I was currently working on, and I thought it would be nice if I could just save code snippets in a single place that I could look up and use whenever I needed to. So I started thinking about CodeKeep as something just for me, but then quickly realized that a lot of other developers out there could benefit as well.
What were your original plans for CodeKeep?
Like any new project, the original plans called for world domination, but since that could take awhile, I scaled it back a bit. Actually, what you see now is pretty much the original plans: to first build a web site and then build a Visual Studio add-in.
How have those plans changed since launching?
Since CodeKeep is free, there was a period early on where I thought about offering premium functionality that users would pay a small fee for, but have since abandoned those plans. There are literally thousands of sites where you can find source code for free, so there doesn’t seem to be much of a business model in terms of making any money from it.
Are you happy with how CodeKeep has done since launch? Would you do it all over again?
Yes and yes. I honestly never thought I’d get more than a couple thousand users and a couple thousand snippets (of which I thought most would be mine), so it has certainly exceeded my expectations. There are definitely some things I would have done differently as I’ve learned some things along the way, but the best part is every so often I get an email from someone thanking me for providing the service and how much they like it.
How much time do spend on Codekeep a month?
Most of the time not much, maybe 10-20 hours at most (many months much less than that). CodeKeep is at a point now where it mostly runs itself. I’d actually like to spend a lot more time on it, but finding the time is always hard.
What's next for CodeKeep?
I’ve got some new functionality I want to release, but the biggest thing will be making the CodeKeep add-in an open source project. I haven’t worked out all the details for that yet, but it’ll be soon. My hope is that the community can take the add-in to a level it won’t otherwise go if left only in my hands.
What is a feature you hope to see added by the community to the add-in once you open source it?
One of the most requested features is the ability to create groups for you to share snippets with, kind of like private snippets, but for a group. There is a bit of thought that needs to go into that, so that’s something I’d love to see driven by the community.
How much do you use CodeKeep? How many snippets do you have stored?
For storing snippets, I use CodeKeep kind of sporadically (to date I have 56 snippets stored… sad, yes), but I do use it often when I need to search for snippets. Also, I subscribe to most of the language RSS feeds, so I certainly use that aspect every day. Having the feeds is very nice because I’ll see something come across that I find interesting and then I’ll tag it in del.icio.us.
Thanks Dave for being my guinea pig. If you have any other questions for Dave leave them in the comments and I will try and get him to swing by and answer.
If you are working on a cool side project shoot me an email (javery ~at~ infozerk.com), I would love to talk to you for a future post.
-James

|
-
One of the things that is important to think about when you start using Silverlight in your sites/applications is to make sure you handle the "what if the end user doesn't have Silverlight installed yet?" scenario. Ideally you want to make sure that the installation experience for Silverlight is very seamless, and nicely integrated into your overall end user experience. Silverlight "Indirect Install" Experience By default when you use the Silverlight.js library to load a Silverlight control in a page, it will automatically detect whether Silverlight is installed on the visiting client machine, and if not prompt the user to install it via an install image the Silverlight.js library automatically injects into your page. This default installation option is a model we call the "indirect install" option - because when the user clicks the install link it automatically opens up a new window with the Silverlight EULA and download page on Microsoft.com displayed. The benefit with the indirect install option is that it works with any site (no custom JavaScript required). The downside, though, is that your visitors will end up navigating to a separate page to install Silverlight, and the overall end user experience won't feel super integrated within the rest of your site. Silverlight "Direct Install" Experience Silverlight also supports an installation approach that we call the "direct install" option - where you can directly integrate the setup of Silverlight in your site, and build a much more immersive and user-friendly experience. When a user who doesn't have Silverlight installed clicks the install Silverlight image, you can author your site to directly download the Silverlight setup from Microsoft.com and immediately kick off the setup program. When the setup program completes, you can then automatically refresh the HTML page and immediately launch the Silverlight content on your site (the user doesn't have to navigate or manually click refresh to enable this). The overall process takes less than 20 seconds on a broadband connection, and the end user experience feels really integrated and easy.  Silverlight Installation Experience Whitepaper + Sample Earlier today we published a whitepaper and set of sample scripts that walksthrough how to build a Silverlight "Direct Install" Experience on your own site. You can download them for free here. You can learn even more about it on Tim Sneath's blog here. The whitepaper and sample scripts demonstrate both how to enable the direct install experience, as well as how to design the HTML UI of the site so that you can easily encourage end users to naturally click the install link. Silverlight Books To learn more about how to use Silverlight 1.0 to build cool media and interactive experiences, also check out some of the new Silverlight 1.0 books that are now all shipping: Hope this helps, Scott 
|
-
Earlier this month we discovered that the VPC (Virtual PC) images we distributed as part of the VS 2008 Beta2 release this summer unfortunately have an operating system timeout of November 1st of this year. The standalone VS 2008 setup packages do not have this issue - only the pre-built VPC images do. So if you've installed VS 2008 on your own operating system image you won't have any issues. If you are using the Beta2 VPC images, though, is is really important that you retrieve all of the data that you have saved in them before November 1st (after this the OS won't work). Today we re-released the VS 2008 Beta2 VPC image downloads (without the timeout setting) that you can download and move to using instead here. Sorry for the mix-up, Scott 
|
-
'Genius is 1% inspiration and 99% perspiration.' -- Thomas Edison
In his most recent blog entry, Jeff Atwood shares his secret on How to Achieve Ultimate Blog Success In One Easy Step: set a goal to write x blog entries per week, and then do it. It doesn't, Jeff claims, matter whether you have any writing talent, whether you have any audience, or whether you have anything interesting to say - just start blogging and keep blogging regularly, and good things will come.
Jeff's advice is a bit trite and does come off as sounding a little like one of those motivational speakers that gives talks to high school students in a Thursday afternoon assembly. The problem is that Jeff makes it sound like persistence is all you need in order to succeed at blogging, but that's not true. In mathematical terms, persistence is a necessary, but not sufficient condition. Taking things to a logical extreme, if persistence trumped quality and content, then surely someone would have created a computer program by now to generate ham fisted essays and would have this generator pumping out a new entry a day for thousands of blogs, and each blog would have a loyal readership in the thousands or tens of thousands, and this clever soul would be richer than Google.
I don't mean to discount the importance of persistence. Persistence will make you better at what you do and will help you stand out from the crowd, but persistence alone is not enough to achieve 'ultimate success' in any field.
But who needs to be an 'ultimate success' anyway? I think most people are content to be a 'success,' and persistence and practice will dramatically increase your chances for success in any given task. You may not be the smartest programmer in your workplace, but I am positive that if you read a new book each month relating to the technology you use, if you put in one extra hour a day to review other programmers' code, if you just make a repeated and consistent effort to be a better programmer, then you will become a better programmer and your improvements will quickly become noticed by others. You may never be the best programmer in your workplace (although you might), but persistence and hard work will unquestionably improve your skills and value to the company.
The main reason why persistence is such a hallmark of success is because very few people have the motivation or drive to make a schedule and stick with it. The very act of sustained effort already puts you ahead of 90% of the crowd.
Finding the motivation to stick with a schedule can, of course, be hard (otherwise everyone would demonstrate a level of sticktoitiveness. The easiest way to keep at a particular task is to, obviously, choose a task that you thoroughly enjoy. So if you are considering taking on a new job or avocation, make sure you choose something that you love to do! I can't stress this enough. Too many people choose a career path based on what other people want them to do, or based on how much money they think they can earn, but you will ultimately have a higher quality of life if you instead find a job in a field you love. You will do better at your job, your days will be more interesting and rewarding, and you'll likely make more money in the long run than working in a job you dislike.
This 'do what you love' concept also applies to hobbies. If you are going to start blogging and want to become a blog superstar like Jeff, first of all make sure that you like writing, and second, pick a topic that wholely interests you.
Another tip: remove distractions. With so many entertainment options it's easy to procrastinate, to find an excuse, to move on to something else, to Alt+Tab off to something more interesting. By removing distractions you lessen this likelihood. For me, one distraction I've kept out of my life since 2001 is a rich TV experience. Yes, we have a TV, but it's an old 19 inch cube with an antennae that can pick up about seven fuzzy English-speaking channels. I've often contemplated getting cable or a satellite, and once had gone so far as to have a technician come out and do an initial visit for DirecTV, but in the end I have stuck with our current television situation because I know upgrading would just introduce one more distraction into my life.
Of course, there are times when we must work hard on an activity that is not enjoyable (for, hopefully, a short time). In that case, start by identifying the end goal, the reason for the struggle. Next, make a written schedule outlining what days and times the undesirable task will be performed. Then stick with it. Each day remind yourself of the end goal, and take note of your progress. Know that tomorrow is one day closer to that goal.
Let me close with two more quotes by Thomas Edison, who really had some great insight into hard work and persistence:
'Opportunity is missed by most people because it is dressed in overalls and looks like work.'
'I never did a day's work in my life. It was all fun.'
|
-
Here is the latest in my link-listing series. Also check out my ASP.NET Tips, Tricks and Tutorials page for links to popular articles I've done myself in the past. ASP.NET - Cleanup Inactive Anonymous Users: ASP.NET 2.0 has support for an optional feature called "anonymous users" - which enables you to optionally track and store profile data for non-authenticated users visiting your sites (read K. Scott Allen's article here for more details on how this works). Omar Al Zabir published this handy article that describes how to "clean up" this anonymous user data periodically to avoid storing it forever in your database.
ASP.NET AJAX Visual Studio -
SQL Database Publishing Wizard Now in VS 2008: One of the post-Beta2 features that we are adding for the final VS 2008 release is the inclusion of a SQL database publishing wizard inside Visual Studio. This will be supported in both the free Visual Web Developer Express edition as well as the full Visual Studio, and provides an easy way to script out your database schema and data to .SQL files. You can then copy these files to a remote hoster to deploy a database. You can learn more about how this works from my earlier posts here and here which describes how to use a previous standalone tool with this functionality (all of this functionality is now built-in to VS 2008). Silverlight IIS 7.0 -
Using LINQ with Microsoft.Web.Administration: Carlos from the IIS7 dev team has a really cool blog post that shows how you can use LINQ with .NET 3.5 to easily query and manipulate the new web server administration API introduced with IIS7. For more information on this new API, you can also read an old post of mine here. Hope this helps, Scott 
|
-
-
My Toolbox column in the November 2007 issue of MSDN Magazine is avaiable online. The November issue examines three products:
This month's issue reviewed Matt Gibbs and Dan Wahlin's Professional ASP.NET 2.0 AJAX. Here is an excerpt from the review:
Most AJAX-related books offer a rather exhaustive low-level look at the technologies involved. But that level of detail is unnecessary for a developer who wants to quickly get started building AJAX-enabled ASP.NET apps. These developers will find Matt Gibbs and Dan Wahlin's Professional ASP.NET 2.0 AJAX (Wrox Press, 2007) to be just what the doctor ordered. The book focuses on core AJAX concepts such as asynchronous postbacks, the browser's Document Object Model, and making HTTP requests via script—and each is explained in terms familiar to ASP.NET developers. Working with the Microsoft ASP.NET AJAX library is also explored, as is using the UpdatePanel control, the ASP.NET client library, ScriptManager, and the controls in the AJAX Toolkit.
As always, if you have any suggestions for products or books to review for the Toolbox column, please send them into toolsmm@microsoft.com.
|
-
With all this talk about the ASP.NET MVC Framework you also hear people mentioning Ruby on Rails quite a bit, another framework you will hear mentioned is Django. In fact, ScottGu mentioned it in his ALT.NETConf talk and in response to one of my posts. I think it is always a good idea to keep an eye on other frameworks and what they are doing, especially since you can often learn new things to take back to your favorite language/framework.
The best way I found to check out Django was to check out this well-done screencast. The project site also has tons of information, and the Community tab is kind of like a "Planet Django" meaning it aggregates lots of Django oriented blogs.
Personally I find Django interesting and subscribed to the community feed, but for the time being plan to stick with my mix of ASP.NET and Rails.
-James

|
-
Probably the most frequent question I field from readers of my Working with Data in ASP.NET 2.0 tutorial series is, How do get the just-inserted ID value from the DAL? This is an important area, and one that I should have authored a tutorial on. There are many situations in which the just-inserted ID value is needed. For example, after a user adds a new record to the database you might want to automatically redirect them to the details page for that new record, something like, ~/Details.aspx?ID=X. In this case you need to know the just-inserted ID because that value is used in the querystring.
I did briefly discuss one technique for accomplishing this in the first tutorial. I showed how you could add a stand-alone Insert method to the TableAdapter and define the query so that it returns the newly inserted record (i.e., doing a SELECT SCOPE_IDENTITY() immediately after running the INSERT statement). Visit this screenshot to see the TableAdapter Query Configuration Wizard step that specifies the INSERT/SELECT statements. In addition to adding the SELECT statement, you also need to set the ExecuteMode property of the method to Scalar. Once this method has been added to the TableAdapter, calling it inserts the product and returns the just-inserted ID:
Dim productsAdapter As New NorthwindTableAdapters.ProductsTableAdapter() Dim new_productID As Integer new_productID = productsAdapter.InsertProduct(...)
While I illustrates this technique, I failed to use it in any subsequent data tutorials. Instead, the subsequent tutorial created a Business Logic Layer (BLL) that used the TableAdapter's batch Update() method to handle inserts and updates. The good news is you can instruct the TableAdapter to return information about the just-added record for those records added via the batch update pattern. When creating the TableAdapter, click the Advanced button in the wizard and check the 'Refresh the DataTable' option (see below). This causes the DataTable to be “refreshed” after adding or updating a record via the built-in DataTable data modification methods.

Next, update your BLL methods. For example, the tutorials create an AddProduct() method in the ProductsBLL class that returns a Boolean indicating whether a product was inserted or not. Modify this function to return an integer instead (since the ProductID field in the database is an int) and then adjust the method so that the code at the end looks like this:
' Add the new product
products.AddProductsRow(product)
' Return the newly inserted ProductID value...
Dim newProductID As Integer = product.ProductID
Return newProductID
The AddProductsRow is a method in the Products table's DataTable. After the row is added, it is 'refreshed' and the resulting, newly-inserted ProductID value is available via the object's ProductID property.
Now, how do you work with the newly-inserted ProductID value from the presentation layer? If you call the BLL programmatically, just work with the return value of the AddProduct() method:
Dim productAPI As New ProductsBLL
Dim newProductID As Integer
newProductID = productAPI.AddProduct(...)
That was pretty easy.
If you're using an ObjectDataSource to do the insert then you can grab the value returned by the InsertMethod in the Inserted event handler:
Protected Sub ProductDataSource_Inserted(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs) Handles ProductDataSource.Inserted
Dim newProductID As Integer
newProductID = e.ReturnValue
...
End Sub
I have a very simple demo illustrating this. The demo is in VB and uses ad-hoc SQL queries, although the concepts are the same when using C# or working with stored procedures. Download the demo here.
Happy Programming!
|
-
A number of clients I do offsite consulting work for use SourceGear Vault as their source code control (SCC) program. I'm a big fan of Vault - it's easy to use remotely over HTTP or HTTPS, integrates seamlessly with Visual Studio, and provides all of the standard SCC features (history, diff, rollback, branching, labels, and so forth).
The only complaint I have about Vault is with the Vault Client. As the Vault Server software has evolved, its protocol has changed. This is understandable. In adding new features and squashing old bugs, I could see how the low-level communication protocol between the client and server might need to change over time.
Fine. But what's annoying as all else is that the clients are not backwards compatible. That is, if I have one customer that uses Vault Server 4.0 and another that uses Vault Server 3.0 (which are two versions that use different protocols), in an ideal world I'd be able to use the latest client software (Vault Client 4.0) and it would be smart enough to use the appropriate protocol depending on the server I connect to.
Unfortunately, this is not the case. Instead, I need to fire up Vault Client 4.0 when working with customer A and Vault Client 3.0 when working with customer B. It is quite possible to install multiple versions of the Vault Client on the same machine in different directories (like C:\Program Files\SourceGear\Vault 3.0 and C:\Program Files\SourceGear\Vault 4.0), but the real kicker comes when you throw Visual Studio integration into the mix. Visual Studio identifies the SCC provider it uses through a registry setting. In short, this means when I want to work with customer A I need to edit the registry so that it points to the Vault Client 4.0 executable in C:\Program Files\SourceGear\Vault 4.0. When I need to switch over to working with customer B's code base, I need to go back into the registry and modify that setting to point to the Vault 3.0 executable in C:\Program Files\SourceGear\Vault 3.0. (In actuality, I have one customer that uses 3.0, one that uses 3.5, and one that uses 4.0, all of which require different protocols, different client executables, and registry modifications when switching from one customer to another.)
The side-by-side installation process and registry keys that need to be modified are detailed here: Installing Multiple Versions of the Vault Client.
To help expedite the process of modifying the registry settings, I created .reg files that enable me to modify the registry setting by double-clicking the .reg file (rather than having to use regedit). Simply create a file for each Vault version you need to use with .reg extensions - like Vault_3_0.reg, Vault_3_5.reg, and so on - and then edit them with Notepad, entering the following text:
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\SourceGear\Vault Client] "SCCServerPath"="pathToVauleIDEFile"
The particular path to the Vault IDE file depends on the version and where you installed the file. See Installing Multiple Versions of the Vault Client for more information.
|
-
Not sure when this happened, but the other day I noticed the Pragmatic Programmers came out with a nice looking new site. The URL is even easier to type than before http://www.pragprog.com/.
You could say I am kind of a Pragmatic Programmer fan boy.
-James

|
-
Last night at the Raleigh.rb group there was an great talk on writing an application as a plugin. Clinton Nixon was talking about the common problem of looking for a CMS and a blog. (which is exactly what I am looking for to rewrite infozerk.com) The problem in just about any framework is that it is very hard to merge two different applications to act as one. In Rails I would love to have a mashup of Simplelog and Radiant, but I imagine it would be quite a task. I may end up simply running them as separate applications, but then it would be separate logins, etc. The speakers solution to this is to build an add-on application as a plugin, in his example a blog application. The idea is that you would be able to install the plugin and be able to quickly integrate a blog into your application.
I was still thinking about this while watching Kevin F's screen cast and the second thing he shows off is a user control he wrote for logging into an application. Even though it is in .NET he took a very similar approach as the speaker at last night talk. First he compiled the code into an assembly which is referenced from the web application. He then has the login.ascx control in the web part of the application so you can edit the view part of the control. In rails the speaker did a very similar thing. The logic for the application stayed in the plugin directory but the view portion was copied to the application. Kevin's example is much more simple than an entire application, but it is the same general idea.
It's an interesting approach in both examples and I expect to see it more and more in both camps, Kevin also plans on doing another screencast to talk more about this approach.
-James

|
-
Has anyone else gotten sick and tired of selecting their state and country from a huge drop down? Does anyone not know their state abbreviation? I think I have noticed this even more since moving to North Carolina. Ohio was top of the list for O, but North Carolina is in the middle of N... and their are a lot of states that start with N.
Jayme got it right over on Meiraware Business, just give me a place to type the state abbreviation.
Or even better if you don't need it separate just let me put in my address on one line.
The same goes for country, let me type in USA instead of selecting from a drop down.
-James

|
-
So today is Blog Action Day where everyone is supposed to blog something about the environment. I originally wasn't going to blog anything, since I couldn't really think of anything to say, but then I read Ben Carey's post and realized I did have something to blog about. He talk's about how elimination is better than reducing, reusing, or recycling. Lately I have been trying to do a couple things for completely different reasons that have ended up having a good effect on the environment, I thought I would talk about those things since I think they often the easiest things to do.
1) Lately I have tried to limit the amount of diet drinks I consume. I realized that a lot times having a Diet Dr. Pepper would make me more hungry, and I started to wonder what all of artificial sweetener and preservatives were doing. I decided to switch to un-sweet iced tea. I didn't really think about it from an environmental angle until I realized I was taking recycling out much less than I used to. Instead of 24 12oz cans a week, the waste I ended up with was some tea leaves and an empty wrapper.
2) Recently I also decided to kick microwave popcorn, again the trying to go natural angle. I went from a bag a day (which had to be packed, shipped, thrown out, etc) to a bottle of seeds every couple weeks.
3) For the last couple of years I have been trying to go digital with all of my documents, usually scanning and then shredding the documents. Due to my aversion to doing the actual scanning and shredding I have tried to find every possible way to get documents digitally. PDFs are much better than paper, mail, etc.
4) Lately I have been trying to download music whenever I can (usually through eMusic or Amazon MP3), this saves the resources used to make CDs, drive to the store, print my receipt, etc.
I think the best way to have less of a negative impact on the environment is to find ways that make life easier, better, or more convenient. What have you been doing lately that has inadvertently helped the environment?
-James

|
-
My desktop computer continued to deteriorate this weekend. Not only could I not maintain an RDP connection into the desktop, I also started having problems synching my phone, copying files across the network, and general performance problems.
On a hunch, I disabled Windows Firewall and all these problems disappeared. Since I am behind a hardware firewall, I'm not concerned about the security implications.
Not sure why this happened – but the firewall rules on this machine numbered over 400 in the private profile (Start -> Search for firewall advanced). Other machines I've checked have ~200 rules.
Perhaps the software firewall was overloaded...

|
-
One of the things that many people have asked for over the years with ASP.NET is built-in support for developing web applications using a model-view-controller (MVC) based architecture. Last weekend at the Alt.NET conference in Austin I gave the first public demonstration of a new ASP.NET MVC framework that my team has been working on. You can watch a video of my presentation about it on Scott Hanselman's blog here. We'll be releasing a public preview of this ASP.NET MVC Framework a little later this year. We'll then ship it as a fully supported ASP.NET feature in the first half of next year. What is a Model View Controller (MVC) Framework? MVC is a framework methodology that divides an application's implementation into three component roles: models, views, and controllers. - "Models" in a MVC based application are the components of the application that are responsible for maintaining state. Often this state is persisted inside a database (for example: we might have a Product class that is used to represent order data from the Products table inside SQL).
- "Views" in a MVC based application are the components responsible for displaying the application's user interface. Typically this UI is created off of the model data (for example: we might create an Product "Edit" view that surfaces textboxes, dropdowns and checkboxes based on the current state of a Product object).
- "Controllers" in a MVC based application are the components responsible for handling end user interaction, manipulating the model, and ultimately choosing a view to render to display UI. In a MVC application the view is only about displaying information - it is the controller that handles and responds to user input and interaction.
One of the benefits of using a MVC methodology is that it helps enforce a clean separation of concerns between the models, views and controllers within an application. Maintaining a clean separation of concerns makes the testing of applications much easier, since the contract between different application components are more clearly defined and articulated. The MVC pattern can also help enable red/green test driven development (TDD) - where you implement automated unit tests, which define and verify the requirements of new code, first before you actually write the code itself. A few quick details about the ASP.NET MVC Framework I'll be doing some in-depth tutorial posts about the new ASP.NET MVC framework in a few weeks once the bits are available for download (in the meantime the best way to learn more is to watch the video of my Alt.net presentation). A few quick details to share in the meantime about the ASP.NET MVC framework: - It enables clean separation of concerns, testability, and TDD by default. All core contracts within the MVC framework are interface based and easily mockable (it includes interface based IHttpRequest/IHttpResponse intrinsics). You can unit test the application without having to run the Controllers within an ASP.NET process (making unit testing fast). You can use any unit testing framework you want to-do this testing (including NUnit, MBUnit, MS Test, etc).
- It is highly extensible and pluggable. Everything in the MVC framework is designed so that it can be easily replaced/customized (for example: you can optionally plug-in your own view engine, routing policy, parameter serialization, etc). It also supports using existing dependency injection and IOC container models (Windsor, Spring.Net, NHibernate, etc).
- It includes a very powerful URL mapping component that enables you to build applications with clean URLs. URLs do not need to have extensions within them, and are designed to easily support SEO and REST-friendly naming patterns. For example, I could easily map the /products/edit/4 URL to the "Edit" action of the ProductsController class in my project above, or map the /Blogs/scottgu/10-10-2007/SomeTopic/ URL to a "DisplayPost" action of a BlogEngineController class.
- The MVC framework supports using the existing ASP.NET .ASPX, .ASCX, and .Master markup files as "view templates" (meaning you can easily use existing ASP.NET features like nested master pages, <%= %> snippets, declarative server controls, templates, data-binding, localization, etc). It does not, however, use the existing post-back model for interactions back to the server. Instead, you'll route all end-user interactions to a Controller class instead - which helps ensure clean separation of concerns and testability (it also means no viewstate or page lifecycle with MVC based views).
- The ASP.NET MVC framework fully supports existing ASP.NET features like forms/windows authentication, URL authorization, membership/roles, output and data caching, session/profile state management, health monitoring, configuration system, the provider architecture, etc.
Summary If you are looking to build your web applications using a MVC approach, I think you'll find this new ASP.NET MVC Framework option very clean and easy to use. It will enable you to easily maintain separation of concerns in your applications, as well as facilitate clean testing and TDD. I'll post more tutorials in the weeks ahead on how the new MVC features work, as well as how you can take advantage of them. Hope this helps, Scott 
|
-
The New ASP.NET Framework
ScottGu gave a demo of the new MVC framework for ASP.NET at the ALT.NET Conference. Here are some notes and thoughts I had after watching ScottHanselman's recording.
The framework should go live in the spring of 2008. The framework is not a replacement for ASP.NET WebForms, but provides an alternative paradigm for building web applications. The new framework still works inside of the ASP.NET runtime - meaning all of the wonderful infrastructure pieces like the configuration system, provider model, SQL cache invalidation, health monitoring, and master pages continue to exist. Like the ASP.NET AJAX extensions – it sounds like we'll only need a new assembly to start the party.
Being an "MVC framework", the software features the Model View Controller pattern. MVC and its many permutations have been (and continue to be) principal patterns in many application frameworks and development environments. There were several mentions of Rails (both the Mono and Ruby types), and at least one reference to Django (the Django book is a good read to get into the framework's mindset).
The framework will provide:
- Mechanisms to enforce a clean separation of concerns
- An API designed for testability
- A pluggable and extensible technology stack
Separation of Concerns
ASP.NET WebForms map an incoming URL to a single .aspx file. Although one can use an HttpModule or VirtualPathProvider to change this behavior, the majority of ASP.NET web applications use this default behavior. In practice, this approach tends to produce code-behind files with intermingled presentation, data access, and business logic. This approach also tightly couples URLs to the physical arrangement of .aspx files in the file system.
The new MVC framework offers a loose coupling between incoming URLs and the view that will ultimately render HTML. ScottGu describes a flexible and pluggable URL dispatching engine that can handle clean and procedural URLs like:
http://OdeToCode.com/articles/show/450
or
http://www.pluralsight.com/classes/register/appliedsilverlight
The URL dispatching engine examines incoming URLs, routes each request to an instance of a controller class, and invokes a method on the controller (the action).
Controllers
Controllers in the new framework support test first and controller first development styles. In other words, you can implement a controller sans any views, and fully test the controller's ability to utilize application logic and services to respond to a request.
The framework provides a low-level interface definition you can implement to claim absolute power over controller policy, but also provides a hierarchy of concrete controller classes to build upon.
When the controller is ready, it can call RenderView(string viewName, object viewData) to generate the appropriate user interface response. Thanks to generics, this boundary can also be strongly typed.
Views
Views render HTML, but views are not web forms - there is no page lifecycle, postbacks, or viewstate in this framework.
In general, views are simple templates. Templates are concerned only with presentation. To enforce a separation of concerns, many template engines do not allow a template to change the value of a variable or call into application logic, but the ASP.NET framework will allow code blocks and data-binding. The view never references a controller, and the controller never references a view - so testability and a separation of concerns prevail.
Designed For Testability
One of the current difficulties in writing unit tests for code running inside an ASP.NET environment is the pervasiveness of sealed classes like HttpContext.The MVC framework features an interface based API with IHttpContext, IResponse, IRequest, etc.
There is a mock view engine and, I believe, mock implementations of IHttpContext and the like to make testing easier.
At the beginning of the discussion Scott mentioned that the framework will include inversion of control containers, although I don't recall this feature appearing in the presentation.
A Pluggable Architecture
It sounds as if every major service in the MVC framework is pluggable – the view engine (throw in Brail), the dependency injection framework (throw in Structure Map), the URL dispatcher, the controllers, and more.
Look For the CTP Soon
The new framework appears to marry mature paradigms from outside the world of ASP.NET with the high performance and robust infrastructure of the ASP.NET runtime. Look for a CTP by the end of the year. 
|
-
Before I start my tale of woe, I just want to point out that I've tried disabling the autotuning feature on Vista machines, but this doesn't fix the problem.
I have a relatively clean desktop machine. The desktop is a host for several virtual PCs, and runs Vista.
Remote desktop connections to the virtual PCs hosted on this desktop are solid, and the connections never drop. The virtual PCs run XP and 2003 Server.
But ... remote desktop connections to the desktop itself stall every 5 minutes. Sometimes the RDP connection drops entirely - other times it's just a matter of waiting 10-20 seconds for the connection to reconnect.
Each time this happens I lose a little more hair.
Even stranger - while a connection to the desktop is stalled, a connection to a virtual PC hosted on the desktop is still working great. I can even ping the host machine and see a 2ms response time.
This behavior leads me to believe that:
- There is nothing wrong with the RDP client
- There is nothing wrong in the networking stack or hardware of the desktop.
- There is something wrong with the terminal services service on Vista.
I'm hoping SP1 will fix the issue, and do so before I go bald.
Anyone else see similar behavior? 
|
-
This morning I read a post from Rob Conery about Ruby on Rails and I think that while many of his points are valid they can be applied to any technology or platform. It's easy to fall in love with a technology and then when you find out it isn't perfect there is some backlash, no framework/technology/person/company is perfect. I think all of the problems Rob talks about can be found in just about any technology or language.
First Rob brings up DHH. I would rather have one foul-mouthed opinionated dane than a corporation with a foul-mouthed litigious CEO at the top. Microsoft has plenty of incredible and awesome people working there like ScottGu, John Lam, or the new Phil Haack and Hanselman... but the rails community has plenty of great people as well. Look at Thomas Fuchs (committer), Tobia Lutke (committer), Andy Hunt, Chad Fowler, etc. And personally I would rather someone say "*** you" than smile and nod while calling someone a Mort. One is at least straightforward and honest instead of condescending.
DHH might reject tons of community feedback, but I can submit a patch to Rails at any time. And while it might get rejected that is much better than what I can do with .NET which is to simple submit a form where it will most likely be rejected. I would guess that Microsoft probably rejects a higher percentage of community feedback than the rails team does.
The CDBaby example is flawed because it is more about the problems with doing an ambitious re-write with a new | |
|