Vi efficiency enhancement

by rsutton 30. March 2009 08:08

I really enjoy using the vi command set to write code on a daily basis.  Currently I use ViEmu for Visual Studio.  One thing I love is how I get to stay on the home row, but one thing that has always seem out of place was having to go clear up to the top of my keyboard to hit ESC (probably the most used key).  Well today I finally noticed that there is a key right next to the home row that I rarely use.  In fact I think I hit it more accidentally that intentionally.  That’s right it is the caps lock.  Therefore I decided to switch the caps lock key and ESC key.  I did this using AutoHotKey and here is my script.

Capslock::Esc
Esc::Capslock

Now my Esc key is on home row and everything just feels better.

Tags:

Development

What stock market bubble?

by rsutton 30. March 2009 07:34

bubble

And we didn’t even see this one coming?

Tags:

Misc

Editing a project file in Visual Studio

by rsutton 25. March 2009 03:28

Here is a quick and easy way to edit the actual xml of a project file in Visual Studio.

First you need to unload the project.  You can do this by right-clicking on the project and selecting “Unload Project” from the menu.

edit0

One you do that your project will appear grayed out and the menu that appears when you right-click on the project will include a “Edit XXXX.csproj” option.

edit1

Once selected the xml for the project file will be displayed and you can edit it as you wish.

edit2

  Once you are done just select the “Reload Project” and you are ready to go.

edit3

Tags:

Development

GUID vs GUID (COMB)

by rsutton 20. March 2009 01:54

I just finished reading an article on the the pros and cons of using guids for keys in a database.  One thing I didn’t realize was the huge performance hit when using them.  In the article it noted that inserting records took 10x longer than using an integer for a key.  Fortunately the notion of using a COMBined GUID seems to solve this issue.  Anyway take a look at this article and hopefully you’ll learn something ;)

 

http://www.informit.com/articles/article.aspx?p=25862

Tags:

Development

Web applications going by the wayside

by rsutton 18. March 2009 06:53

So lately have been really been feeling like the whole web application (not website) thing hasn’t been working out so well.  While it is true that JavaScript and it’s accompanying frameworks are getting better, it is still plagued with slowness and browser issues.  For me the experience of a desktop app is still a thousand times better and I doubt that will ever go away no matter how good browsers get (sorry Google).  In my opinion browsers are not application platforms.  The two examples that have lead me to this conclusion are one the iPhone.  When it was originally introduced there was no notion of third-party applications.  I watched the keynote and it seemed that the buzz they wanted to created was around being able to have a decent web browsing experience on a phone.  While they did accomplish this in my opinion, far better than anyone else I must say, what people really wanted to do was harness the iPhone platform, ie install applications.  Now looking at where most people spend their time today, you will see them using the apps not the browser.  I feel this is the same with Twitter.  Sure you can use the browser to make posts and follow people, but who wants to do that when you can have an app that gives you a much better experience.

Tags:

IT | Development

Excellent advanced jQuery video

by rsutton 17. March 2009 23:58

I’ve been watching this video by John Resig (creator of jQuery) and it is excellent.

http://ajaxian.com/archives/ajax-experience-talks-resig-slocum-and-heilmann

Tags:

Development

ViEmu and Resharper compatible key mappings

by rsutton 16. March 2009 02:34

I’ve noticed some increased interest lately around how to use ViEmu and ReSharper together.  I have been using both for some time now and I have found that creating custom keyboard mappings in the best route.  I am able to use these mappings without any conflicts between ViEmu and Resharper.  I also have a couple handy defaults that go along nicely with this setup.

**Visual Studio Custom Maps**

Shift+Alt+J - Resharper.GotoNextMethod
Shift+Alt+K - Resharper.GotoPrevMethod
Shift+Alt+I - Resharper.Generate
Shift+Alt+R - Resharper.RefactorThis
Shift+Alt+E - Resharper.UnitTest_ContextRun
Shift+Alt+D - Resharper.UnitTest_ContextDebug
Shift+Alt+F - Resharper.GotoFile
Shift+Alt+S - Resharper.GotoSymbol
Shift+Alt+T - Resharper.UnitTest_RunCurrentSession
Shift+Alt+N - Resharper.GotoNextErrorInSolution
Shift+Alt+P - Resharper.GotoPrevErrorInSolution

Shift+Alt+B - Build.BuildSelection
Shift+Alt+C - Window.CloseAllDocuments
Shift+Alt+X - File.CloseAllButThis

Ctrl+Alt+E - View.ErrorList

**Visual Studio Defaults**

Ctrl+Alt+O - View.Output
Ctrl+Alt+l - View.SolutionExplorer
Shift+Esc - Window.CloseToolWindow

Tags:

How to switch tasks in a remote desktop session.

by rsutton 11. March 2009 07:02

I just figured out how to switch tasks while in a remote desktop session.

Shift+Alt+PgUp

Shift+Alt+PgDn

Finally no more taskbar clicking while in remote desktop :)

Tags:

Custom control not being added to designer file

by rsutton 9. March 2009 05:46

I’m currently working on converting a large ASP.NET IIS project to a Web Application Project.  Everything was going great until a very important custom control would not add it self to the .designer.cs file.  I didn’t get any build errors, but I couldn’t reference the control placed in the aspx file from the code behind (ie nothing added to the designer file for the control).  The solution.  There was a very subtle execution error where I was using Page.Request when I had to use HttpContext.Current.Request.  Now why did this affect the designer?  Well because apparently is does some rendering of the control before it decides that it is correct and can be added to the designer file.  The only way I was able to figure there was even an error was by opening the page using the designer (which I almost never use).  In the designer I could see a “Request is not available in this context” message.  From there I was able to guess at what the problem might be.  Perhaps this would have shown up at runtime, but right now I’m just trying to get things to compile and it will be days before I can run this thing.  So the moral of the story is if something isn’t being added to the designer file and there are no compile-time errors it is probably because there is a error that only occurs during rendering.

Tags:

Development

A dollar is a dollar

by rsutton 5. March 2009 23:38

There is something that has me concerned about the current ideas that are currently being circulated about the economy and what should be done to fix it.  What concerns me is that it appears that some have forgotten that a dollar is a dollar.  Let me explain what I mean with these four important examples.

 

1. A dollar spent by the government is a dollar that cannot be spent in the private sector

2. A dollar given to a failing company is a dollar that cannot be used by a profitable company

3. A dollar spent today is a dollar that cannot be spent tomorrow

4. A dollar borrowed today is a dollar that must be repaid in the future

 

I invite you to think about these examples as you listen to the resolutions provided for the current economic problems.  In doing so hopefully things with make more sense and you’ll be able to decide for yourself what is good and what is not.

Tags:

Misc

Powered by BlogEngine.NET 1.4.5.0
Theme by Extensive SEO

Profile

Member of the Church of Jesus Christ of Latter-Day Saints, Developer and IT Professional