Geeks With Blogs
Lee Brandt's Blog You're only as smart as your last line of code Software
MVC3 RC _ViewStart Page
For those of you following the MVC releases, you will see something new in your File->New for MVC3 RC: _ViewStart.cshtml (_ViewStart.vbhtml for you VBers). This is a common place to dry out view dependencies. The most common view dependency is the MasterView it will use. To that end, the default _ViewStart page you get from a File->New MVC3 project has just the: 1: @{ 2: Layout = "~/Views/Shared/_Layout.csh... 3: } This seems to be done by convention. The view must be named “_viewstart.cshtml” ......

Posted On Saturday, November 13, 2010 2:51 PM

Resharper Tip of the Day: Moving Chunks of Code
Today I have been using a ReSharper keyboard shortcut to rearrange chunks of code. I needed to move a method above another method in a class. With the cursor at the beginning of the line inside the chunk I want to move, I hit: Ctrl+Shift+Alt+UpArrow and it moves the entire method up one section (above the method before it). So.. given: public string SomeMethod() { Here.Is.SomeCode.ToBe(Super... } public string MyMethod() { Here.Is.SomeCode(that).Save... } I put my cursor at the line ......

Posted On Monday, April 13, 2009 1:25 PM

I Dig Digsby
I can't for the life of me find the blog entry that mentioned Digsby, but I am glad I read it. I downloaded it then, but it's been sitting on my desktop ready to try out for awhile, and I just finished installing it an playing a bit with the features. This is my new client. It does everything. MSN, AIM, Yahoo!, Jabber, ICQ, gmail (yes you can SEND emails through Digsby), twitter and more and more and more... I'm hooked. Enjoy! ~L ......

Posted On Thursday, April 10, 2008 1:29 AM

A Place to Host Your Project(s)
Some of you may already know about it, but I found this great site that hosts projects.Now I know what you might be saying, "Yeah dude, there are plenty of places that host projects... ever heard of Codeplex?" But that's not what I am talking about. Assembla lets you make your project public or private, hosts your svn repo, hosts a Trac system for your project, sets up a wiki for it and allows you to "hire" people to work on your project with you. The place? Assembla. The free package offers 500Mb ......

Posted On Friday, April 4, 2008 2:22 PM

Implicit Conversion Operators
Recently, we added a SSN type to our project. I also wanted to make an implicit conversion from a string, so that when using it I could do: 1: SSN mySsn = "111-22-3333"; I came across an msdn page about how to code it and thought I'd post it here for posterity. 1: using System; 2: 3: namespace Examinetics.Core 4: { 5: public class SSN 6: { 7: private readonly string _ssn; 8: 9: public SSN(string ssnString) 10: { 11: _ssn = ssnString; 12: } 13: 14: // implicit string converter 15: public static implicit ......

Posted On Wednesday, December 24, 2008 12:43 AM

XP Can Impove Your Code... But It Won't
QUICK THOUGHT: The engineering practices in Extreme Programming (Like TDD, Pair Programming, etc) can lead you to improving your code. But it won't do it for you. TDD will point out design flaws, but it won't GIVE you good design skills. If you write lousy code, you'll find it very hard to maintain practicing XP, but XP won't MAKE your code better. You still have to do it. You STILL have to read books, write code and share with other developers.



Posted On Monday, November 17, 2008 1:23 PM

ReSharper Keyboard Shortcut of the Day
As I try and learn about all the available productivity features of R#, I will post what I learn here... for posterity and for anyone who might find it useful. Alt+Insert is used to generate code in the text editor window. If you are in the text editor, it will bring up a context menu to allow you to generate ctors, members and properties. If you highlight a place in the Solution Explorer and hit Alt+Insert, it will bring up a context menu for generating a class, interface or struct in that folder ......

Posted On Tuesday, October 28, 2008 11:58 PM

NCover with MSTest
I was trying this morning to run NCover (for the first time). I downloaded a eval copy (sweet!) and then opened NCover Explorer only to find myself a little lost. So I thought I'd RTFM a bit first. That helped (a little), and the documentation online also helped some, but what I really needed to do was check my MSTest test coverage of my base framework. The documentation really only covered generic scenarios and a little bit of googling only left me wanting. All these little bits and pieces, however, ......

Posted On Thursday, May 15, 2008 1:47 PM

There is no right answer
I know you've probably heard it before: "There is no silver bullet." Basically, this means that there is no right answer for a particular problem in every situation. There is only the best solution that you know for each individial scenario. For instance, if you have to load a dependency for an object, you could use dependency injection or a provider model; but if you have to load an object's dependencies and that dependency's dependencies (the leg bone depends on the ankle bone and the ankle bone ......

Posted On Thursday, May 8, 2008 8:44 AM

Object Oriented Design Part I
I realize that this is probably WAY beginner stuff for most people who read these blogs, but I am giving these classes to some people who come from a structured programming background and it may help others in the same boat. I like to think I know OOD pretty well, but if you see something that you think (or know) is wrong drop me a comment (no flames please). In the Beginning... There was structured programming; and the developers saw that it was good. The coded and rejoiced at the marvels they created. ......

Posted On Tuesday, April 22, 2008 4:29 PM

What's with all the NEW stuff?!!??
As I get settled in at this new job, I begin to take stock of what the company wants to accomplish: a solid, extensible product with the longest possible useful life. Given the fact that this product will probably take 2-3 years (total) to develop, that means learning the newest stuff and looking at some technologies that have yet to be released. The new technologies coming out of Microsoft in the next six to twelve months is staggering. Beyond products (like Windows 2008, SQL Server 2008 and Visual ......

Posted On Thursday, April 3, 2008 1:11 PM

Copyright © Lee Brandt | Powered by: