My tech blog and other writing

Wednesday, May 30, 2007

Favorite Tech tool

Of course first off I have to praise UltraEdit http://www.ultraedit.com/

Absolutely a great text editor... the advanced find and replace features are sweet... the unix style regex makes it awesome... but honestly I don't use that feature that much...

What I find myself using all the time is the search in files feature that actually works... as you would expect it! And the handy dandy Column mode... You could take a list like this...



x.apend somevariable(5) & ","

x.apend somevariable(14) & ","

x.apend somevariable(3) & ","

x.apend somevariable(7) & ","

And column select right before the "s" in somevariable and type trim(

and end up with

x.apend trim( somevariable(5) & ","
x.apend trim( somevariable(14) & ","
x.apend trim( somevariable(3) & ","
x.apend trim( somevariable(7) & ","


Now you might say you could copy and paste that 3 times... ok you are correct... But if the list was say... 20 long... I saved some time... the point is that all these little tiny emprovements or efficiencies add up to minutes and minutes saved by the end of the day...

It is the same as typing speed... 40 wpm guy is at a big dissadvantage to the 80 wpm guy... in terms of ability to crank out code... the 40 wpm guy has to be more efficient to keep up... ultra edit has macro's as well.. .and when editing code where I don't have an IDE with a built in refactor tool I'll write a macro to help me do it... basically highlight the code... and fire off my macro and whamo new empty sub or function or whatever the language calls it... fill in the parameters... jump back to the call and fill it in too... (double click method call... to highlight... ctrl-f to pull up find which already has the function name in it... enter and whamo I am back at the function call... and all I have to do is paste the parameter list into the function call since I put it in my clipboard before leaving)...

Short Keys
Ok so another of my favorite tools is ShortKeys. You can get a copy of the light version at http://www.shortkeys.com/lite.htm

I type my email address a million gazillion times a day... this way I just type ! then @ and whamo out comes my email address... pretty cool... How about my phone number ! and #

basically the tool is a find and replace tool that is always watching your typing.... So putting a replace on a single letter like "I" could be disasterous... :-) I happen to use ! along with another character since I almost never type ! followed by anything except != so I just don't use that one...

Some ones I use are:

!@ email
!# phone number
!W Work Phone
!5 Test MC number
!4 Test Visa Number
!3 Test Amex Number

... you get the idea... it creates a sort of short hand... In the paid version you can load up different sets of "short keys" from files... so if you can load a set of short keys specific to what you are doing...

IOpus IMacros
One thing I do alot of is testing web forms... the next tool is absolutely awesome and a super time save... I don't even need to explain it... just check it out... and whipe the drool off your face...

http://www.iopus.com/imacros/home/?a=5352008&v=5211028

I would imagine... that ultra edit saves me an hour a week when I am working with old vbscript... which has been quite a bit lately...

short keys saves me about a minutes or two every day... so 200 minutes or so a year... not to mention at least 200,000 key strokes a year... (typing my email addres 5 times a day... 23 characters saved each time)

and iopus imacros saves me a tun of time testing applications that require several pages to be tested in a row... plus I can save off my old tests for future use...

I would image this tool saves me 10 minutes to 3 hours a week. Depending on where I am at in the process.

Cool tools...

Oh and one more tool that is just COOL... doesn't really save me time but it makes me happy and that is what it is all about...

http://nerdcave.webs.com/

Allows you to order you task bar... drag things around... group them... so all your IE's are to gether... etc... love this tool...

Friday, September 15, 2006

Rants

#1... reading my posts here... most stink! well except for me... they are kind of like notes to myself... and completely worthless to everybody else... I guess I should spend a few extra minutes and make them a bit les cryptic... and ...right down to earth in a language everybody can easily understand...

#2... I just don't understand... I am a professional programmer... and I got to this point by teaching myself my craft... learning from books... I learned the hard way and figured that most programmers had a leg up on me with their formal education... yet amazingly that isn't the case... perhaps it is the nature of inter/intranet apps... that many were created by novices and now the pro's have to come and clean up... I rarely if ever encounter code written by others that I would consider "ok" or ever "good"...

I know that programmers tend to have a myopic view of coding... my stuff good... everything else bad! BUT really... Am I out of line or is this complete garbage...
Sub ProcessOutput()
        If Not ValidateQueryString() Then
            Exit Sub
        End If

        ' We'll use these variables throughout
        mMfrId = Request.QueryString("mfr_id")
        mMfrDeleteId = Request.QueryString("mfr_delete_id")

        Dim aMfrIdParm(,) As String = {{"@mfr_id", SqlDbType.Int, mMfrId}}
        Dim aMfrDeleteIdParm(,) As String = {{"@mfr_delete_id", SqlDbType.Int, mMfrDeleteId}}

        Select Case Trim(Request.QueryString("step"))
            Case "1"
                Step1(aMfrIdParm)
            Case "1a"
                Step1a(aMfrIdParm)
            Case "2"
                Step2(aMfrIdParm)
            Case "2a"
                Step2a(aMfrDeleteIdParm)
            Case "3"
                Step3(aMfrIdParm)
            Case "3a"
                Step3a(aMfrDeleteIdParm, aMfrIdParm)
            Case Else
        End Select

    End Sub
Come on... what a great comment...

' We'll use these variables throughout
FOR WHAT!? what kind of arbitrary made up garbage is this... hmm... mMfrId yeah I know what a mMfr is I'll guess it is a manufacturer... but since we are still under the oppression of character restrictions in our variable names... I guess this is acceptable... Instead of making logical names... just call things step 1, 2,3 instead of saying what they really do... better yet... lets just hard code some values in to this program as well...


Function ReturnLName(ByVal sName As String) As String
        Select Case LCase(sName)
            Case "amadeupnametoprotecttheinnocent1"
                Return "Amadeupnametoprotecttheinnocent1"
            Case "amadeupnametoprotecttheinnocent2"
                Return "Amadeupnametoprotecttheinnocent2"
            Case "amadeupnametoprotecttheinnocent3"
                Return "Amadeupnametoprotecttheinnocent3"
            Case Else
                Return "System"
        End Select
    End Function 

There are several other functions just like this one to get peoples email addresses... not only is that function silly because all it does is capitolize the first letter of the name... and if not in the list of folks it know it uses system... it just uses hard coded values... so if so and so #1 leaves the company... we have to edit the program... NICE! I love arbitrary code... and hard coded values... :-)... My two favorite things... OH and code you can't test because it will interactive with live systems... or code that sends emails out to people and you can't turn them off or have them all redirected to a single mailbox...

OK enough ranting... well one more... I hate people that over used the elipse "..."

Tuesday, September 12, 2006

Subversion... source control... change control

Today I was asked to become the backup... for the main subversion guy. My quest is to read the book... then work with the guy I'll call Joe... to formulate guidlines and how to's for developers... and to document our process of code promotion... ie... change control... source control... what ever you want to call it... I will log my progress and notes here...

begin notes ... idea of atomic commits... is important... revist that as you read the book...

... need to figure out how to check if I have a mixed revision... not just in revision number but in actual differences? ... end notes decided to install it...

Wednesday, September 06, 2006

Enterprise logging observations Part II

I am unable to get the traceOutput Options to show UNLESS I create a listener with no association formatter. The for example... the call stack will be outputted... but if I associate a formatter with it... no call stack?????

Friday, September 01, 2006

Enterprise logging observations

  • If you do not specify a catagory... the catagory is General.
  • Catagory Sources are Case SEnSitive.
  • No formatter on a Trace Listener... uses the default Text Formatter


That is it for now... but still interesting...

Thursday, August 31, 2006

Training list

I have a larger project comming up and will take a week or two before it begins to do some self-training in preparation for it. Here is a list of topics:
  1. CSLA
  2. Enterprise Library (specifially but not limited to Exception Handling)
  3. NUnit/NUnit.asp and TestDriven.net
  4. SQL Server 2005 new features
  5. ASP.net components/master pages

Monday, August 28, 2006

UltraEdit rocks

I finally broke down and bought a copy of UltraEdit for my home PC. I have become so accustom to using it at work that I bought I copy for home.

UltraEdit.com