- Denis Darzacq :: Portfolios :: La chute — They’re not falling. At least, not as high as you think. Wonderful composition n this photos.
Tagged as: photography art dance urban society
As a Rubyist and Textmate user, you’ll probably be aware that def
will tab-expand to stub out a method definition. You might also be aware that, for the purposes of Test::Unit, deft
will tab-expand to a test method beginning def test_
, allowing you to append the name of your test.
But that’s not much more help, because if we’re naming our tests properly, they’re probably going to have very_long_names, and hitting underscore all those times is a bit of a pain. So I rectified that, with this command (and it’s a command, rather than a snippet, because of all the processing it does). Pull up the commands dialog (Command-Opt-Control-C), create a new command in the Ruby bundle, and give it the following code:
#!/usr/bin/env ruby
name = STDIN.read.strip
testname = name.gsub(" ", "_").downcase
print <<OUTPUT
def test_#{testname}
\$0
end
OUTPUT
The command’s Input should be “Selected Text” or “Line”; its Output should be “Insert as Snippet”. The scope should be set to source.ruby
. And give it whatever key definition you want; I’ve got it on ctrl-opt-shift-t.
Usage is easy. On a new line in your test file, type the name of your test in plain English with no punctuation, eg:
get to index should list all items
and then hit your shortcut. You’ll get the following out:
def test_get_to_index_should_list_all_items
end
and your cursor will be slap bang in the middle of the test, indented, ready to write. That’s what I really want from a test definition snippet – something more than deft
supplies. It’s another minute or two’s work to make it strip punctuation, so you can convert real sentences to test cases. I just decided to condition myself to save on coding on this morning’s commute.
- tourb.us blog » Flickr + ruby: Not quite picture perfect — Fixing up the Flickr.rb library.
Tagged as: flickr ruby photos api - A Collection of Word Oddities and Trivia — What it says on the tin.
Tagged as: language linguistics words trivia reference
- Digital Web Magazine – Seven JavaScript Techniques You Should Be Using Today — Lots of meaty/head-scratchy examples in here, but it’s definitely a lot of best-practice for your money.
Tagged as: javascript programming development tips tutorial dom scripting - LolCat Builder » Home — Mark this one high priority, gang: a Lolcat generator. For all your lolcat needs.
Tagged as: lolcat humour generator daft kittens
- 1996 New Paradigms for Using Computers: Clifford Nass Transcript — Clifford Nass on human-computer interactions and relations.
Tagged as: toread cliffordnass interaction ixd ux - Social science research influences computer product design — Initial press release for Microsoft’s "Bob". Never mind!
Tagged as: bob microsoft interface ixd ux - Getting back to POSH (Plain ol’ Semantic HTML) at FactoryCity — "From now on, we will now be promoting POSH as a first order priority, alongside the development and improvement of existing microformats"
Tagged as: microformats markup html posh semantic - listeningtowords — find, listen, and discuss free lectures from around the web.
Tagged as: audio podcast lectures learning reference mp3 download - Magic Ink: Information Software and the Graphical Interface — "In this paper, I … argue that interactivity is actually a curse for users and a crutch for designers, and users’ goals can be better satisfied through other means"
Tagged as: hci interaction design interface usability ixd ux paper essay
- Ambrosia Software, Inc. — games/DEFCON — Ambrosia release the OSX version of Introversion’s Defcon. Cross-platform multiplayer, too. It’s downloading as I type – can’t wait…
Tagged as: osx games introversion indie abstract
- PopMatters Books Feature | Long Zoom: Interview with Steven Johnson — In the interview, Johnson explains how the Long Zoom holds together his recent work, and how this perspective emerged from his graduate-school training in literary theory and the Victorian period.
Tagged as: stevenjohnson interview - BLDGBLOG: The Heliocentric Pantheon: An Interview with Walter Murch —
Tagged as: waltermurch editing architecture film history interview - A man for all ages | By genre | Guardian Unlimited Books — According to many critics of his time, Shakespeare was vulgar, provincial and overrated. So how did he become the supreme deity of poetry, drama and high culture itself, asks Jonathan Bate.
Tagged as: shakespeare literature history theatre toread guardian - Chris Heathcote: anti-mega: service design notes: tools, not services — "…this is tool thinking. It’s deferential, subservient and polite; normal web services are arrogant."
Tagged as: services tools design interaction applications ux politeness behaviour hci - Social Software Building Blocks / nForm / Customer Insight, Strategy, Design and Development — Not every social software system has all of these, but most of them have three or more. And the most popular social websites implement many of these building blocks, but focus on just one or two.
Tagged as: software social socialsoftware design architecture model honeycomb - Mobile Web Design: Methods to the Madness ~ Authentic Boredom — "You’re considering retrofitting an existing website/web app to be more accessible to mobile users. What are your options?"
Tagged as: mobile design accessibility usability markup web