views:

120

answers:

2

I'm currently working through some code katas in multiple languages (Ruby, Perl, Python)/frameworks (Rails, Django, Mojo). It seems every time I start a new project from scratch I end up tweaking files to my liking, even after using things like newgem, module-starter, script/generate, startapp, etc.

For those who program in many different languages, do you have some sort of toolset, scripts, etc that generate start code to your liking?

I'm contemplating setting up git repo of all of my start code and some sort of script that pulls/renames/tweaks when starting new projects but I don't want to reinvent too many wheels. I've also considered making a personalized Textmate Bundle that does this and/or has custom snippets/template that have the same shortcut keys/commands across all the languages I use. It seems I'm also wasting brain time on trying to remember which command/snippet-tab combos are valid for the language/bundle I'm working in.

What are other multi-programming language people doing to quickstart development in different languages/tools?

+2  A: 

Just use the templating capabilities of your editor.

For vim, check out this example.

Update:

Which editor? The choice of editor is too deeply personal and reliant on individual preference for me to recommend any single editor. Pick a cross platform editor that is powerful enough (like Vim or Emacs), learn to really use it, and use it everywhere. This will improve your productivity beyond the gains templates will give you.

daotoad
Which editor? emacs? vim? VS.Net? TextMate? Eclipse? That's also part of the problem. More than one editor and on different oses.
claco
emacs and vim both run on everything. time to standardize.
jrockway
standardize away: http://answers.polldaddy.com/poll/2150554/
ysth
Now jrockway, you already know how I feel about emacs and vi/m. :-)
claco
Editors aside, it would be useful to have something that worked outside of the confines of an editor, like if I'm one someone elses machine starting a new project with them.
claco
A: 

I too find myself using a ragtag set of home grown editor macros, gawk scripts and such to help in this situation. I have to confess however doing much of the relatively "mechanical" changes by hand, as I find it is an opportunity to visit the existing/borrowed codebase and getting familiar with it.

mjv