A significant part of my business involves developing software
and I'm always seeking ways to create source code more quickly. The
less time I can spend on the task of writing code, the more time I
can spend on designing the business logic that the software will
deliver.
Something that I've started doing lately has ended up being a
big timesaver: I use Excel as a poor-man's code generator to
produce some of my markup and code-behind.
I do a lot of ASP.Net Web development using Microsoft Visual
Studio 2008. A common task for me involves dragging a group of
controls to a page, renaming each of them so that they are
associated with the same field, then linking those controls to
corresponding CSS styles. Each group of controls can take two or
three minutes to configure in this way so repeating this process 10
or 15 times, as is common, can use up a lot of time.
So I built a simple spreadsheet wherein I type in the key field
named just once and the =concatenate() function does
the rest of the work for me inserting the unique tags in the
appropriate places. Then I simply paste the resulting code into my
development environment and away I go. This has ended up saving me
a lot of time.
Yes I know, I could write a macro that would prompt me for the
field name and spit out the code.But my way takes a lot less time
to customize whatever I need to and I didn't have to debug yet
another programming routine.
So for those of you who must write the same thing repeatedly
with only minor differences, consider something similar to my
decidedly not-so-high-tech solution... and use the time you save
for something more valuable.