Wednesday, July 18, 2007

As good of a computer science education that I think I received, when I was an IROC (Idiot Right out of College) I was definitely lacking huge in certain areas.  Chief among these were software engineering (which I think I'm a lot better at now) and beyond basic OO, the fine art of Design Patterns.  I've managed to read about half of Head First Design Patterns and actually implement a few at work.  However, I still feel way behind on them overall, so I started a study group with some coworkers.  We'll attack 2 patterns a week.  I'll post notes about them and links to examples in my svn repository.

Enjoy!

Wednesday, July 18, 2007 7:14:34 PM (GMT Standard Time, UTC+00:00)
I just wanted to thank this guy for providing an easy way to import my old blog posts from blogger.

Wednesday, July 18, 2007 5:47:31 PM (GMT Standard Time, UTC+00:00)

Okay, so I've finally setup my blog!  This is a simple plain install of dasBlog.  I reserved the domain back in April and now in late July I FINALLY get it up and running.  It took me a whopping 10 minutes to setup, too.  Phew!!  I almost went with Subtext, based on a friend's recommendation, but I didn't want to pay the extra money for a sql instance, so here I am.  That's it for now.  Check back soon for updates on my digital exploits (or attempts thereof).

Wednesday, July 18, 2007 4:46:03 PM (GMT Standard Time, UTC+00:00)
Run REGEDIT, follow the following directions to the proper key.
HKEY_LOCAL_MACHINE
|- Software
|-- Microsoft
|--- Internet Explorer
|---- View Source Editor
|----- Editor Name (Default) = C:\windows\notepad.exe
If this doesnt exist (but it should) then create the Key "View Source Editor".
Then create a Key within that named "Editor Name". Modify the "(Default)" value to make it point towards any program on your computer using "D:\Tools\Notepad2\Notepad2.exe" (without the quotes).
Wednesday, July 18, 2007 7:53:00 PM (GMT Standard Time, UTC+00:00)
Notepad is pretty basic. There are several better text editors out there. Below is a short list.

Notepad2
http://www.flos-freeware.ch/notepad2.html

Textpad (trial, free if you don't mind the reminders)
http://www.textpad.com/

Vim
http://www.vim.org/

others can be found at download.com or sourceforge.net


Now to add your new text editor to the right-click menu for various file types: (if you want to add it for all files types, follow these steps for the '*' folder ( HKEY_CLASSES_ROOT/* ) ).
http://www.jfitz.com/tips/rclick_custom.html

abbreviated instructions:

  1. open regedit.exe
  2. Open the HKEY_CLASSES_ROOT "folder"
  3. go to the extension you want to modify (use * for all)
  4. right click on the shell key or create it if its not there
  5. create a new key for your command to create
  6. create a new key below that called command and enter the path to the exe without quotes and add "%1" with quotes to the end, so it looks like
    C:\Program Files\Notepad2\Notepad2.exe "%1"


And then to use your new text editor in IE's View Source feature, see my other post.
Wednesday, July 18, 2007 7:52:00 PM (GMT Standard Time, UTC+00:00)
On your desktop, quicklaunch or the right side of windows explorer, if you alt+dblclick a folder or file, it brings up the properties dialog for that object.
Wednesday, July 18, 2007 7:50:00 PM (GMT Standard Time, UTC+00:00)
I've come across a couple of nifty shortcuts and ways to make stuff easier and quicker that I thought I'd share.

File Dialog - The file dialog, the one you get when you do a file->save as or download something from IE (or Firefox :-) ) has a list of locations on the left. Usually its not that helpful, like my recent documents or my network places, but you can customize this list. There's 2 dialogs and each is modified differently. For the main one, you have to download the windows xp powertoy, tweakui. Open it, expand the common dialogs and select the places bar and customize the 5 locations. The other dialog is used in office 2003. Open the dialog, right click the places bar and switch to small icons if you want. To add a folder to it, navigate to that folder, then click the tools menu and select 'add to my places'. Then you can right click it in the places bar and move it up or down in the list.



Windows Key + E open my computer, but you can create shortcuts somewhere, desktop, quicklaunch, etc and assign keyboard shortcuts to it.



Then there's the combo keys:



Ctrl + Shift + Esc = windows task mgr

WinKey + D = show desktop

WinKey + M = minimize all

WinKey + L = lock workstation

WinKey + R = open run dialog
Wednesday, July 18, 2007 7:49:00 PM (GMT Standard Time, UTC+00:00)
 #
 
Wednesday, July 18, 2007 7:48:00 PM (GMT Standard Time, UTC+00:00)
Below are some articles on how to create and manage hard links(aka directory junctions) in Windows NT/XP/2003 and also manipulate the underlying mechanism, reparse points. Directory Junctions can be used to make one folder look like another, not just be a shortcut. You can also mount a drive as a subfolder under another drive. These are called volumne mount points.
Aside from those two, reparse points are also used in Windows for Remote Storage Service (RSS) and Remote Installation Services (RIS).

I'll repost this info on tech discussions.

http://support.microsoft.com/kb/262797/
http://support.microsoft.com/kb/205524/EN-US/
http://www.sysinternals.com/Utilities/Junction.html
Wednesday, July 18, 2007 7:45:00 PM (GMT Standard Time, UTC+00:00)

I found this neat article on password cracking for SQL.  The tools used can be found here.

Wednesday, July 18, 2007 7:11:00 PM (GMT Standard Time, UTC+00:00)

I created a sql account and wanted to give it dbo access to a particular database.  The settings didnt set for dbo when I created the account, then when I go back and try to adjust the user settings, I get a user already exists error.  The user does already exist, but I just want to update it, not recreate it.  Eventually I found out from reading here and here that my login was orphaned and needed to be mapped to a sql account.  I got the list of orphaned logins with this:

EXEC sp_change_users_login 'Report'

and I fixed it with this

EXEC sp_change_users_login 'Auto_Fix', 'myuser', NULL, 'mypassword'

The only remaining hurdle was I had to set check_policy = off.  I tried some variations of set check_policy = off, all of which gave me errors, but one worked apparently, cuz I was finally about to exec that statement.

Wednesday, July 18, 2007 6:53:00 PM (GMT Standard Time, UTC+00:00)

This guy has a good post about this issue here.  However, I'd like to take it one step further and create 2 new configurations, Design_Debug and Build_Debug, since I still like to run my app in Debug mode.  That way, I just change the build type while working with the aspx UI designer in VS.NET, and switch back when I'm actually coding and testing.

Wednesday, July 18, 2007 6:16:00 PM (GMT Standard Time, UTC+00:00)
I've had to deal with some rather cumbersome dev environments recently (no .sln files under source control, projects and assemblies scattered all over, web folders under program files on dev, etc). That doesn't include the various source control systems I'd had to work with (so far, VSS6.0d and Starteam 6). And yes, I realize 2 probably doesn't qualify for "various", but there's more than enough pain/frustration going around with just these 2.

So, how to deal with this situation? My answer is still in progress, but so far I'm using subversion as my daytoday source control repository and I'm using NAnt to manage the tedium of checking out, copying and translating from vss/starteam to my working area with subverion. More to follow as the experiment progresses.

Any comments or suggestions on this approach?
Wednesday, July 18, 2007 5:41:00 PM (GMT Standard Time, UTC+00:00)
cool programming fonts. I recommend Proggy Clean Slashed Zero.

http://www.proggyfonts.com/
Wednesday, July 18, 2007 12:22:00 PM (GMT Standard Time, UTC+00:00)

I had the hardest time with this issue, 2 crucial parent and child windows were lost offscreen.  I needed to get them back, then I found this simple fix here (thanks Kevin, whoever you are).  I'll repost the content in case that link stops working:

1. Hold down Alt + Spacebar
2. Press the M key
3. Use the arrow keys to relocate the window
4. Press the Enter key when you have the Window in the desired location.

Wednesday, July 18, 2007 12:15:00 PM (GMT Standard Time, UTC+00:00)
Sometimes in windows explorer, I've noticed clicking on different locations (especially removable media such as thumb drives) can be rather slow, somewhere in the range of 30 seconds to 3 minutes. This is not a hardware issue as I can bring up a dos prompt and get a directory listing of said thumb drive with no wait at all.
So, this seems to be a problem with windows explorer, but we don't have to put up with it.
Workaround:
Typing the address of the location you want in the address bar, while maybe taking an extra second or two to perform, the contents seem to load up immediately, without the 3 minute delay.
Wednesday, July 18, 2007 10:19:00 AM (GMT Standard Time, UTC+00:00)