A friend learned some Ruby on Rails a few years ago (Rails 1.1). Now he's returning to web development, and he wants to get back up to speed fast. He asked me if I had any advice. Turns out I did.
1. The Rails Tutorial. http://ruby.railstutorial.org/ruby-on-rails-tutorial-book This is a free, online, complete book-length tutorial for learning rails. It's pretty comprehensive for learning rails, and it's great.
It starts in with testing early, in the third chapter. Obey the paradigm; do TDD (test-driven development)! A huge strength of the book is that it integrates testing from the beginning, rather than relegating it to a late-chapter afterthought. If a book presents testing in its own chapter, then it's not going to be effective in teaching the TDD philosophy.
RSpec is nearly universally-used in the workplace, in my experience.
2. You are using git, right? Good source control is powerful and pretty liberating. Git is the standard, and of course there's Github, which is ridiculously useful for using, publishing, and collaborating on open-source code.
You might want to install an up-to-date version of git and download the HTML docs for that version at the same time. As git gets updated, sometimes the online kernel.org documentation changes without notice. (there's no note of what version each page refers to.) I've been bitten before by relying on the online docs, which had been updated to reflect new functionality that my version of git didn't have.
git high-level doc: http://www.kernel.org/pub/software/scm/git/docs/everyday.html -- "Everyday GIT With 20 Commands Or So"
git books: http://gitready.com http://progit.org
git downloads: http://www.kernel.org/pub/software/scm/git/git-1.7.6.tar.bz2 http://www.kernel.org/pub/software/scm/git/git-htmldocs-1.7.6.tar.bz2
3. Install and use rvm as soon as possible. I hated it & didn't get it at first. But eventually I realized rvm's power. It is fabulous. The sooner you start using it, the sooner you will benefit, especially as you are on a learning curve and will probably be installing lots of gems. rvm sandboxes your projects and makes everything MUCH easier to keep clean.
For example, if you upgrade ruby or rails for one project, or install or upgrade any gem (RSpec, CanCan, etc.), you might start seeing things fail on another project. And it can get very painful to isolate which change (if any) is causing the problem. With rvm, Rails 3's Gemfiles, and the bundler gem, you can isolate almost all of that per project: ruby version, bundler version, rails & gem versions, etc.
rvm: https://rvm.beginrescueend.com/ Make sure you follow the complete install instructions, including the .profile specifics and the 'default ruby' detail. After that, the rvm docs on the site are thorough, but irritatingly organized. Oh well. You can ask me rvm questions.
4. We (boston.rb) are archiving all our presentations that have been videoed -- we've been organizing this this week, still in progress today: http://bostonrb.org/presentations You'll have to google our site, I guess, but we've had a lot of interesting presentations.
5. My friend Wyatt wrote a high-level guide, intended for someone with no prior development experience.  Rails Bugmash is this weekend! Consider asking around right away to see if anyone is hosting a get-together. You'll get to test and verify pieces of the rails code itself. https://github.com/rails/rails It's a good opportunity to see how real-world large-scale projects are managed & tested, and you'll be able to get pointers from smart people on how to get started.
7. Ryan Bates's Railscasts http://railscasts.com and the text & pictures version. http://asciicasts.com
Additional screencasts that people have recommended (although not free) are at http://peepcode.com/ -- such as http://peepcode.com/pages/rails-3-screencasts
8. There are a lot of other things you can read & watch. I only read the first two, because I can't keep up with everything. http://weblog.rubyonrails.org/ Meta-blogs: http://www.rubyinside.com http://planetrubyonrails.com/ http://www.rubyflow.com/ Useful news on github & trending open-source repos: https://github.com/blog Insightful news on heroku (for example, Matz just joined Heroku!): http://blog.heroku.com/ Podcasts: http://www.rubyshow.com/ http://ruby5.envylabs.com/ -- 5-minute podcasts twice a week
9. Some of the guides on http://guides.rubyonrails.org/ are good. Also, sometimes there are guides on http://edgeguides.rubyonrails.org/ that fill in gaps in the stable rubyonrails.org documentation.
10. Thoughtbot is in Boston. They're a highly respected rails shop. They apparently follow this philosophy: http://handbook.thoughtbot.com/
This is the table of contents:
=== First things first:
=== Vision. Competitive advantages. Customer development.  Mobile apps. SaaS.
=== Values:
=== Ambidexterity. Face time. Saying no.
=== Team:
=== Members. Outsourcing. Do it yourself. Hiring.
=== Communication:
=== Discussions. Sketches. User stories. Pair programming. Feature branch code reviews.
=== Rhythm:
=== Sustainable pace. Daily standups. Weekly iterations. Monthly rotations.
=== Tools:
=== Version control. The stack
=== Design:
=== What works. What doesn't work.
=== Metrics:
=== AARRR. A/B testing.
=== Money:
=== Cost. Investor lunch.
=== Appendix
=== Cloud services:
=== Hosting. Storage. Payments. Email. Instrumentation. Process tools.
=== Boston:
=== Events. Designers. Developers. Investors. Lawyers.
You can read the whole handbook online.
z) Finally, a bit about Behavior-Driven Development, and my favorite article on TDD and BDD.
BDD (behaviour-driven development), usually using Cucumber, is pretty popular and widely-discussed. But where it's used, it's almost always in concert with using Rspec anyway. Doing TDD with Rspec is considered best practice almost everywhere, and you should start there.
That being said, you might want to read this blog post on "Outside-In Development" (BDD with Cucumber and Rspec). It easily demonstrates how the philosophies and tools provide different benefits. Also, there's a bit about where not to use TDD/Rspec. http://www.sarahmei.com/blog/2010/05/29/outside-in-bdd/
Hope this helps!Posted 2011-07-22 at 11pm UTC by Chris Houhoulis
bostonmike commented about 1 month ago:
Daniel Choi made a one-page version of the thoughtbot handbook. A version is at http://danielchoi.com/software/thoughtbot-playbook.html


➜
$
Nick Sweeting
01
Projects
For Work
Monadical
OddSlingers
redux-time
Past work...
Personal Projects
ArchiveBox
Wireguard Docs
Mesh Networking
Free China VPN
Security Growler
This Site
More...
Older Projects
Good Karma Kit
Medusa Bot
StoryCoin
Bitcoin Trader
More...
02
Writing
Security Activism
Equifax
Cloudbleed
Breach Response
More...
Software Engineering
Concurrency
Databases
DevOps
Animation
More...
Random Thoughts
Life Goals
Crackpot Theories
Books & Movies
Mgmt Principles
More...
03
Speaking
Code & Security
Concurrency
Docker
Equifax Security
Mesh Networks
Metal/K8s/Lambda
More...
Other
Power Grids
Internet Archiving
OddSlingers
Monadical
DrChrono
More talks...
Request a talk...
04
Adventures
On Wheels
Motorbiking
Rallies & Races
Cycling
Vanlife
Favorite Trails
Packing Lists
Outdoor Sports
Climbing
Winter Sports
Water Sports
Air Sports
Drone Flying
Travel
Travel Blog
Communities
City Guides
Travel Map
05
Info
Links
About
Blog
Web Archive
Twitter
Medium
Soundcloud
Goodreads
Keybase.io
Professional
Resume
Github
LinkedIn
ProductHunt
StackOverflow
Cofounder's Site
Contact
Email Me
06
Admin
SSH PubKey
⌘
I'm a developer, bike rider, and unschooler. For more about me,
click here
...


Should I have my record sealed?
Clean Slate can help you determine the best course of action for your history record. In many cases, sealing your record is not only possible, but the best course of action to broaden your future options. Other times, disclosure is the best path to be hired by potential employers. Click below to find where you fit.
Learn More


Brewing
On Tap
Fermenting
Brews
Brew Tech
Brews
Recipies and stats for past brews
IPA
IPA 1
IPA 2
Irish Red
Irish Red 1
Weizen
Dunkelweizen 1
Porter
Brown Porter 1


Password is too short.
Password is too long.
This field is required.
Password not equal with confirm password.


ENUM
SubmitTransactionType
The way the transaction is sent to the blockchain
link GraphQL Schema definition
1
enum SubmitTransactionType {
2
3
# The call will return as soon as submitted
4
5
6
# The call will return once the mempool has run CheckTx on the transaction
7
8
9
# The call will return once the transaction has been processed by the core
10
11
}


Here we investigate "selective inference" in the toy example of Wang et al (2018). We show that the approach will sometimes select the wrong variables -- which is inevitable in cases where variables are perfectly correlated -- and then assign them highly significant $p$ values. This is because even though the wrong variables are selected, their coefficients within the wrong model can be estimated precisely.
knitr::opts_chunk$set(comment = "#",collapse = TRUE,results = "hold")
First, load the selective inference package.
library(selectiveInference)
Now simulate some data with $x_1 = x_2$ and $x_3 = x_4$, and with effects at variables 1 and 3. (We simulate $p = 100$ variables rather than $p = 1000$ so that the example runs faster.)
set.seed(15)
n <- 500
p <- 100
x <- matrix(rnorm(n*p),n,p)
x[,2] <- x[,1]
x[,4] <- x[,3]
b <- rep(0,p)
b[1] <- 1
b[4] <- 1
y <- drop(x %*% b + rnorm(n))
Unfortunately, the selective inference methods won't allow duplicate columns.
try(fsfit <- fs(x,y))
try(larfit <- lar(x,y))
So we modify x
so that the identical columns aren't quite identical.
x[,2] <- x[,1] + rnorm(n,0,0.1)
x[,4] <- x[,3] + rnorm(n,0,0.1)
cor(x[,1],x[,2])
cor(x[,3],x[,4])
Now run the forward selection again, computing sequential p-values and confidence intervals.
fsfit <- fs(x,y)
out <- fsInf(fsfit)
print(out)
From the above output, we see that the selective inference method selected variables 1 and 3 with very small p-values. Of course, we know that variable 3 is a false selection, so it might seem bad that the p-value is small. However, you have to remember that p-values do not measure significance of variable selection---they measure the significance of the coefficient of the selected variable, conditional on the selection event.
Put another way, selective inference is not trying to assess uncertainty in which variables should be selected, and is certainly not trying to produce inferences of the form $$(b_1 \neq 0 \text{ OR } b_2 \neq 0) \text{ AND } (b_3 \neq 0 \text{ OR } b_4 \neq 0),$$ which was the goal of Wang et al (2018).
Exported from manuscript_results/selective_inference_toy.Rmd
committed by Gao Wang on Thu Jul 11 11:20:51 2019 revision 5, 52efa03
Exported from manuscript_results/selective_inference_toy.Rmd
committed by Gao Wang on Thu Jul 11 11:20:51 2019 revision 5, 52efa03
Exported from manuscript_results/selective_inference_toy.Rmd
committed by Gao Wang on Thu Jul 11 11:20:51 2019 revision 5, 52efa03
Exported from manuscript_results/selective_inference_toy.Rmd
committed by Gao Wang on Thu Jul 11 11:20:51 2019 revision 5, 52efa03
Exported from manuscript_results/selective_inference_toy.Rmd
committed by Gao Wang on Thu Jul 11 11:20:51 2019 revision 5, 52efa03
Exported from manuscript_results/selective_inference_toy.Rmd
committed by Gao Wang on Thu Jul 11 11:20:51 2019 revision 5, 52efa03