Showing posts with label .NET. Show all posts
Showing posts with label .NET. Show all posts

Wednesday, February 02, 2011

Video: Good C# Habits Can Encourage Bad JavaScript Habits

Today I recorded a Webinar with DevExpress entitled "Good C# Habits Can Encourage Bad JavaScript Habits". The webinar is embedded below.

The talk was spurred by a recent Fornt-end Architecture Review I performed where the background of the developers was primarily C#. The project was almost entirely written in JavaScript and I noticed a common set of bad JavaScript practices that appeared to have their influence in good C# techniques.

These thoughts turned into a series of articles that I posted several months ago on Enterprise jQuery and I have recently pooled the articles into the following presentation.

I hope that this presentation will help you prevent some of these mistakes in your projects and to let you know, I've made all these mistakes myself :)



Resources


At the end of the presentation I list several resources that you might want to dig into and research for yourself.

Slides and Articles
  • I have hosted the slides from the video. I utilized an HTML5 Presentation tool and the slides are best viewed using either Google Chrome or Firefox. 
  • The article series this video was based on can be found on Enterprise jQuery
Tools
Books
Articles
Video

Mix 11 Conference

If you like this topic, then please consider voting for it to be included in the Microsoft Mix 11 conference by clicking the following tweet. Voting ends on Feb 4th. Thanks!

Thursday, September 17, 2009

Reasons Why .NET Developers Love Their MacBook Pros

Initial Questionnaire

I recently posted an informal survey asking .NET Developers why they love their MacBook Pros and I want to thanks the 51 individuals who responded to my survey.

Objective Results

The first four questions (other than name, twitter, etc…) were general questions about their MacBook Pro hardware. Those types of questions are easy and quick to graph.

Note: If you see some discrepancies of the numbers please note that shortly after I first submitted the questionnaire I added the hardware questions. So, the first several people who answered the survey didn’t have those questions.

Reasons You Love your MacBook Pro for .NET Development

As to summarize the above charts, it seems that most of the people who responded to the survey were .NET developers using a MacBook Pro with a 2.66MHz Processor, 4 GB RAM, and a 15 inch monitor.

Subjective Results

Well, objectively that is all I can really graph. The rest of the questions allowed free form text, which is difficult to chart :) however, I did attempt to summarize each question into common answers so that I can graph them. So, here are my findings…

WhyDidSwitchFromPcToMac

So it seems that the majority of those that switched did so because they had the opportunity to run both OSX and Windows, they felt the hardware was better (faster & quality), and they thought it was more stylish :)

WouldYouConsiderMovingBackToPc

Of those that have switched from a PC to a Mac the vast majority (64%) said that they would not switch back to the PC and only a handful were adamant about moving back to the PC.

AreThereFeaturesThatTheMacHasThatThePcDoesnt

Mac users feel that their OS is more usable and simple compared to Windows, they feel the software for OSX is better, is more stable, and it was mentioned over and over that the multitouch trackpad on the Mac is a plus!

DoYouFindYouAreSacrificingPerformanceByUsingTheMac

An overwhelming majority of Mac users feel that they are no sacrificing any performance by using the Mac. Of those that did feel they were lacking some performance, they attibuted it to using a VM (VMWare or Parallels) and recommending using Bootcamp instead.

AnythingElseIShouldKnowBeforeIChange

As a last ditch effort to glean any useful information, I asked if there was anything else I needed to know before I made the change to a Mac. A large portion of the responses encouraged me to purchase VM software (VMWare or Parrallels), reprogram my keyboard for the PC, and to buy as much of RAM as possible.

Conclusion

Overall, I am very pleased with the responses of the questionnaire. I am even more inclined to make the switch myself. Only time will tell if this will actually take place, but I do appreciate you humoring me in this research and I’m sure you will know when and/or if I do take the Mac plunge for .NET development :)

Wednesday, September 09, 2009

Recursively Unblock Assemblies with Streams

MvcContribEver since my recent blog post Unblocking Assembly Due to AspNetHostingPermission Security Exception I have been pretty careful about unblocking Assemblies after downloading them from the internet.

However, today I decided to download the MVCContrib.Extras.release.zip which has over 100 assemblies, pdbs, and xml files of which ALL are blocked by Windows 7!

Since there is no way to multi-select and unblock the files at once, I shuttered at the thought of right-clicking each file and unblocking them one by one. There has to be a better way… and to my fortune there is :)

The answer is yet another useful too from Sysinternals called Streams.

Streams is a command line tool that lets you unblock one or more files at a time and you can even recursively perform unblocks! Yippee

Immediately I started to look for a feature to right-click folder option to open a command prompt at that location (like I used to with the Open Command Window Here Microsoft Power Tool for Windows XP).

ShiftRightClick

I didn’t see an Open Command Window Here context menu for Windows 7 when I initially right-clicked on a folder, so I decided to do some quick research to see what is the best way to do this in Windows 7.

I was pleased to find that the feature is native in Windows 7, but I had just missed it.

It turns out that if you Shift-Right-Click on a folder then an "Open Command Window Here” context menu will appear! Apparently, this was a feature of Windows Vista too, but as I mentioned in a previous post… I upgraded immediately from Windows XP to Windows 7.

So, (after downloading Streams and registering it in my System Path Variable) I quickly typed in the following command to save the day.

streams –s *.*

Using Streams

Usage: streams [-s] [-d] <file or directory>

-s
Recurse subdirectories.

-d
Delete streams.
Streams takes wildcards e.g. 'streams *.txt'.

 

Anyway, I didn’t know about either the Streams command line too or the Shift-Right-Click “Open command window here” feature of Windows 7 and thought I would share them with you. Hopefully, they help someone ;) If not, it will help me remember them in the future. 

Tuesday, August 25, 2009

Unblocking Assembly Due to AspNetHostingPermission Security Exception

Ok, I am one of those strange birds who jumped over Windows Vista and went straight from Windows XP to Window 7, so I haven’t had the pleasure to experience many of the security features that supposedly protect the user from themselves.

After banging my head on the proverbial wall one too many times, I finally figured out the cause of a Security Exception I was getting while trying to add xVal Validation Framework into my ASP.NET MVC v2 Preview 1 project.

“System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.”

SecurityException

It appears that Windows 7 (and from what I’ve heard Windows Vista also does this as well) attempted to protect me from a potential threat! When looking at the file properties dialog of the xVal.dll there was a security message at the bottom stating…

“This file came from another computer and might be blocked to help protect this computer.”

UnblockAssemblyIt turns out that all I had to do is click the “Unblock” button next to the message, remove & readd my Visual Studio project reference, and viola my problems were solved!

Next time, I hope not to waste half my day trying to figure this out. If you have not already faced this pain, I hope that you don’t have to in the future, or that this post will help you resolve it quickly!