Andy Kopciuch's Blog
Sunday, April 24, 2005
  Vim, Remote Work & Ice Cream Cake

Recently I found myself doing a large amount of tedious coding. This came out from the specification analysis I had been doing. Large amounts of data elements mapped to IDs, and different column names in different databases. Somehow I had to make the code work. Instead of just jumping in and writing all of the code I decided to think about a smart way to do it first (which is always a good idea). I must say I love VIM. Many others can not stand it, it's so old school. There are all these nice graphical tools available. Bah I say. I had a column of 60 odd variable names, which also needed to be used as associative array indexes, and in many other spots to reference form objects and on and on. I just created a text file listing the names which made it simple to wholesale insert them in VIM

:r <filename>

But who do you make use of the columns now? I also love VIM because of recordable macros. Record the steps you go through, and you can access those steps easily by typing

@ <macroname>

So I prefixed, and suffixed the list of names with the same calls. Then to run through a process like ... go to the first dollar sign in the line ($), take the entire text between the dollar sign and the comma, move to the empty quotes (''), paste the text you copied in between them, and make it all lower case. the move to the next line, and the next dollar sign. I simply hit "q" to start recording, and gave it a name. Did my process and ran that macro until my code was complete. lets see dream weaver pull that one off. ;-)

I found myself in the office doing some remote work for a client. Let's jsut say I was bailing them out again. they have had some other people looking after things, and I must say it was not pretty. I found all sorts of things that were simply broken. I couldn't even do what they asked until I first fixed the broken features. I consider myself a nice guy, so I was going to do a couple of things gratis. When I realized I would have to fix things back to my original code, there was no way I could let that go for free. That's a bad move to make. It all worked out, and I ended up making all of the changes live on the production server. The second group of programmers decided to remove the original product from version control, so I had no other choice when I was no where near my usual set up. It's Sunday evening, so I wasn't worried at all.

It was also my birthday on Friday. The big 27. People bought lots of ice cream cake. Twice in one day. Karen Kneier also got me a fancy cigarette package. Way cool! We went out Friday to the Knockanback, then to the Lucy bar, and Hush. There were lots of interesting people out in Victoria. It's the end of exams, and the weather is beautiful. Sometime I'd like to just go sit downtown ... it was more fun watching the show on the streets than actually going to a bar.

Maybe next year.

 
Comments: Post a Comment



<< Home
The Jolly Smoking Computer Programmer

ARCHIVES
October 2004 / November 2004 / December 2004 / January 2005 / February 2005 / March 2005 / April 2005 / May 2005 / June 2005 / July 2005 / August 2005 / September 2005 / October 2005 / November 2005 / December 2005 / January 2006 / February 2006 / March 2006 / April 2006 / May 2006 / June 2006 / July 2006 / August 2006 / September 2006 / October 2006 / November 2006 / December 2006 / January 2007 / February 2007 / March 2007 / April 2007 / May 2007 / June 2007 / July 2007 / August 2007 / September 2007 / October 2007 / November 2007 / December 2007 / January 2008 / February 2008 / March 2008 / May 2008 / August 2008 / October 2008 / December 2008 / January 2009 / February 2009 / March 2009 / May 2009 / August 2009 /


Powered by Blogger