GithubHelp home page GithubHelp logo

daily_dojo's Introduction

Daily Dojo

Coding related daily practice to improve muscle memory of various techniques.

Techniques

  • vi on commandline

  • vi in the browser (Vimium for chrome)

    • 5 min
    • muscle memory for basic usefull key combinations
  • ruby TDD kata (TDD - Test Driven Development)

    • 15 min - 2 hours
    • muscle memory for ES6 project setup
    • muscle memory for TDD - red, green, refactor style problem solving
  • ES6 TDD kata

    • 15 min - 2 hours
    • muscle memory for ES6 project setup
    • muscle memory for TDD - red, green, refactor style problem solving
  • Neovim autorun tests

    • 5 min
    • muscle memory for basic usefull key combinations

Technique details

VI in the browser

(Vimium for chrome)

browse the web with nothing but your keyboard

key commands based on the Vimium demo video

j             - move down
k             - move up
d             - move half page down
20d           - move 10 pages down
u             - move half page up
<SHIFT> - F   - follow a link and open in new tab
F             - follow a link
<SHIFT> - H   - go back
<SHIFT> - L   - go forward
<SHIFT> - K   - go tab right
<SHIFT> - J   - go tab left
x             - close tab
o             - open book marks, history and google searches
                navigate using shortcuts
<SHIFT> - T   - search open tabs
?             - available keybaord shortcuts

Dojo exercise

  1. In browser search for "hn"
  2. f open hacker news
  3. d move down to find something with lots of comments
  4. SHIFT-F open in new tab
  5. on something that is interesting
  6. SHIFT-F open in new tab
  7. SHIFT-T find open tab with comments
  8. j down k up
  9. d down page u up page
  10. 20d move a fair way down
  11. gg go to top
  12. ? show options
  13. f navigate options
  14. j show advanced
  15. learn about
    1. gu go up url hierarchy
    2. p open clipboard's url
    3. gs view page source

Neovim autorun tests

Assuming you have neovim installed and want to write ruby tests in one split, implementation in another split and a terminal with continually running tests in another.

Dojo exercise

  1. assuming a test setup as per [ruby TDD kata]
  2. add guard
    cat >> Gemfile
    gem "guard"
    gem "guard-rspec"
    
    bundle
  3. guard init rspec configure guard
  4. vi open neovim
  5. :e spec/tennis_spec.rb edit the spec file
  6. :vsplit lib/tennis.rb edit the implementation file
  7. :vsplit | terminal vsplit a terminal, or vs | te
  8. guard in terminal
  9. <CTRL>-\ <CTRL>-n to go to navigation mode in terminal under neovim
  10. <CTRL>-w l to jump to a different split (l for one to right)
  11. :w save the test and the terminal should re-run tests
  12. <CTRL>-w h to jump back to the left
  13. i to put terminal into insert mode

daily_dojo's People

Contributors

saramic avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.