Keeping a Software Development Journal or Diary
I'm the kind of person that keeps tons of notes on my thoughts as I am developing on a new project. I generally abuse the README file in my project. It was a mixture of my notes and other information for the project organized by topic - where applicable.
Recently I started keeping a JOURNAL file in my projects that was a day-by-day dump of what I was thinking and why I chose certain choices. It is a really nice way of organizing your thoughts and providing a way to look back through "what you were thinking." It also provides other developers working on the project a way to look at how you came to a certain conclusion.
I was originally doing this in markdown, but recently went searching for TextMate plugin. I found a really great one called JournalTasks.
I've been making two entries a day on my project. One I keep 'open' all day dumping my thoughts on implementation and any interesting choices as well as good references I find while doing research. I have a second one I make when I'm wrapping up as a checklist of what was accomplished (pretty much a git commit log and some additional notes) and what I need to work on next. The plugin also outputs using markdown, supports tagging/searching your posts and simple tasks support.
If you aren't keeping a journal of your thoughts during development, I'd suggest it. A well organized record of your brain; its a good thing.
Thanks to Alan Schussman for a great bundle (and saving me the time of writing one).
Symbol to Proc Textmate Find/Replace (reversal) macro
So I know some people are the fans of the symbol to proc in ruby and others aren't. I'm not. I'm all for doing things to save developer time, but I think the symbol to proc thing is super lazy. I see it a lot in projects I work on from other developers and I usually remove it when I see it. So I wrote a textmate find and replace macro to undo them. You can download it here or copy the following source into a file called whatever.tmMacro.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>bundleUUID</key> <string>D52BDC31-EFB7-486E-8232-F5B5517E2DF8</string> <key>commands</key> <array> <dict> <key>argument</key> <dict> <key>action</key> <string>replaceAll</string> <key>findInProjectIgnoreCase</key> <false/> <key>findString</key> <string>(\(?)( ?)&:(\w+)( ?)(\)?)</string> <key>ignoreCase</key> <true/> <key>replaceAllScope</key> <string>document</string> <key>replaceString</key> <string>{|i| i.$3 }</string> <key>wrapAround</key> <true/> </dict> <key>command</key> <string>findWithOptions:</string> </dict> </array> <key>keyEquivalent</key> <string>@P</string> <key>name</key> <string>SymbolToProcToNonLazy</string> <key>scope</key> <string>source.ruby</string> <key>useGlobalClipboard</key> <false/> <key>uuid</key> <string>94D8367E-8C6A-4920-AD8D-125CBEFD063D</string> </dict> </plist> |
Once its installed you should be able to do Command-Shift-P and replace all the symbol-to-procs in the current document with their regular proc equivalent.
I've tested it with the following scenarios:
1 2 3 | %w(My super cool array).map &:to_s %w(My super cool array).map( &:to_s ) %w(My super cool array).map(&:to_s) |
If you have any other crazy way of passing in your symbol to proc, let me know. Of course if this macro destroys your computer or sets your hair on fire I take no responsibility, just ask my illegitimate children.