Created
May 18, 2011 13:49
-
-
Save dnagir/978593 to your computer and use it in GitHub Desktop.
The things I learned from Scottish RubyConf 2010
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Harmony for browser testing | |
Capybara.driver = :rack_test # uses Harmony and can run JS | |
Good talk about Arel: 1LT_04-mp4_500mbs.mp4 | |
Rack GeoIP. | |
Rack GoogleAnalytics | |
Rack::Cache (standard) | |
Rack::CacheBuster | |
Server side include to render page without parts of content that fail | |
(Nginx + Rack) | |
EvenMachine:: WebSockets add-on uses JS like API. | |
Other options: | |
-em-websocket | |
-cramp (higher level websocket) | |
-sunshowers | |
-node.js | |
pusherapp.com | |
Initialise multiple variables in JS: | |
var a = 1, b = 2, noInitialised; | |
jQuery has "end" method to go up in the chain. | |
VIM | |
:copen - opens the console output | |
f - find next occurence of char in this line | |
dap - delete paragraph | |
cap - change | |
yap - yank | |
ytCHAR - yank from here to next CHAR | |
Ctrl-v - visual block mode | |
:split, :sp, :vspilt, :vsp - split into 2 wins | |
ls - list buffers touched | |
q1, q2, q3... - record macro into register | |
@1, @2, @3... - play the macro from register | |
:R - Rails related file | |
:A - Rails alternate file | |
:Rextract - Rails partial extract | |
Shift-k - integrated Ruby ri | |
figutive.vim - more extensions: Glog, Gblame, Gstatus, Gdiff, Ggrep etc | |
snippets.vim | |
nerdtree.vim - files tree view | |
surround.vim | |
unimpaired.vim - auto-brackets | |
Hashrocket configured Vim at Github hashrocket/dotmatrix | |
Vimium, Vimperator - Vim in browser | |
Remotely connect and pair in Vim | |
UTF-8 is backwards compatible with ASCII | |
Ruby doesn't know about UTF-16 - it's messy | |
Globalization TODO: | |
- Do same as .NET CultureInfo | |
- Do different ways to localize different kinds of langs | |
You can generate UML model of Rails model using: | |
railroad -M | dot Tpng > model.png | |
uml dumper | |
Metrics: | |
- rake stats # LOCs | |
- FLOG Weighting the code AST - Assignment Branch Condition (ABC) | |
- FLAY - code similarities | |
- Saikuro - cyclomatic complexity | |
- Roodi - design issues | |
- Reek - design issues and specific smells | |
- Churn - changes to file with Git | |
- Rcov - test coverage | |
- Heckle - test coverage with code mutation | |
- metric_fu |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment