- Did you write tests? Are they mutually exclusive and collectively exhaustive? Do they pass?
- Did you get a code review?
- Have you verified that your code works, outside of tests?
- Is your code DRY?
- Did you follow the single responsibility principle at different levels of detail throughout all your functions, objects, files, folders, repositories, etc.?
- Is your code readable? Can someone else tell you what it does?
- Is your code self-documenting? Did you explain strange choices? Did you write documentation about how it works?
- Do all your variables have self-explaining names?
- Did you avoid writing overly long functions?
- Do you document what your function inputs are? Are you explicit about what preconditions must be true about your function inputs? Are you explicit about what postconditions will hold about your function outputs, if the preconditions hold?
Computer code is a series of executed statements. Frequently, these statements are executed one at a time. If one part of your code takes a long time to run, the rest of your code won't run until that part is finished.
However, this isn't how it has to be. We can often make the exact same code go much faster through parallelization, which is simply running different parts of the computer code simaltaneously.
The first example of this is asynchronous code. The idea here is that many times you do things like send a call to another computer, perhaps over the internet, using an API. Normally, code then has to simply wait for the other computer to give it a response over the API. But asynchronous code can simply keep on going and then the API call returns later.
This makes code harder to reason about and handle because you don't know when the API call will return or what your code will be like when it returns, but it makes your code faster because you don't have to wait arou
Looking at Rails, Angular, jQuery, Prediction.io, and Redis pages to find commonalities.
- Layout matters. A nice layout inspires trust in your project.
- Layout is similar. All the sites had a top bar with the prominent navigation. All the main pages had introductory text.
- GitHub Issues is used ubiquitously for bug tracking.
- IRC seems important for communities. Gitter seems like a good choice.
1.) If I have a data.frame df <- data.frame(a = c(1, 2, 3), b = c(4, 5, 6), c(7, 8, 9))
...
1a.) How do I select the c(4, 5, 6)
?
1b.) How do I select the 1
?
1c.) How do I select the 5
?
1d.) What is df[, 3]
?
"Advanced R" by Hadley Wickham is widely considered the best resource to improve your knowledge at R. However, going through it and answering every exercise takes a long time. This guide is designed to give you the most essential parts of Advanced R so that you can get going right away. It still will take a long time, but not as long.
--
1.) Quickly skim these chapters (without doing the exercises) to make sure you're familiar with the concepts:
COUNTRY | BEEF | PIG | POULTRY | SHEEP | TOTAL | |
---|---|---|---|---|---|---|
ARG | 40.41400058 | 8.24187459 | 36.4689953 | 1.174247185 | 86.29911766 | |
AUS | 22.8010372 | 20.25072536 | 42.00750521 | 7.423454044 | 92.48272181 | |
BGD | 0.885267859 | 5.14E-04 | 1.223173534 | 1.163676301 | 3.272631248 | |
BRA | 24.15640871 | 11.20721696 | 39.36312514 | 0.393513724 | 75.12026453 | |
BRICS | 4.289081407 | 15.79587836 | 10.29847417 | 1.654767905 | 32.03820184 | |
CAN | 17.37132968 | 15.74658647 | 34.15846671 | 0.81704465 | 68.09342751 | |
CHL | 14.96778476 | 17.51448686 | 30.93243359 | 0.411750266 | 63.82645548 | |
CHN | 3.817396071 | 31.56769795 | 11.61724318 | 2.965417779 | 49.96775498 | |
COL | 12.10121226 | 5.084564383 | 26.43592901 | 0.202352547 | 43.8240582 |
- Go through Codecademy on Python if you haven't https://www.codecademy.com/learn/python
- Do Exercises 1-44 on https://learnpythonthehardway.org/book/
- Read "Introduction to Statistical Learning" to learn more stats: http://www-bcf.usc.edu/~gareth/ISL/
- Learn scipy / numpy / pandas by watching this webcast: http://www.oreilly.com/pub/e/3714
## Load libraries | |
if (!require(readr)) { install.packages("readr") }; library(readr) | |
if (!require(magrittr)) { install.packages("magrittr") }; library(magrittr) | |
if (!require(dplyr)) { install.packages("dplyr") }; library(dplyr) | |
if (!require(tibbletime)) { install.packages("tibbletime") }; library(tibbletime) | |
if (!require(lubridate)) { install.packages("lubridate") }; library(lubridate) | |
if (!require(devtools)) { install.packages("devtools") }; library(devtools) | |
if (!require(shinyview)) { install_github("peterhurford/shinyview") }; library(shinyview) | |
## Load Mint transactions |
# Install and load libraries | |
if (!require("dplyr")) { install.packages("dplyr") }; library(dplyr) | |
if (!require("devtools")) { install.packages("devtools") }; library(devtools) | |
if (!require("readr")) { install.packages("readr") }; library(readr) | |
if (!require("recombinator")) { install_github("robertzk/recombinator") }; library(readr) | |
# Download data from https://docs.google.com/spreadsheets/d/1LzUHVgbyQddvESuW_WhJwNUn52023vYerlsho39em2I/edit#gid=0 | |
states <- read_csv("~/Downloads/AR US States.csv") |
Consider completing "Advanced R, Abridged" and "Git 101 Exercises" first.
"Advanced R" by Hadley Wickham is widely considered the best resource to improve your knowledge at building an R package. This guide is designed to give you the most essential parts of R Packages so that you can get going right away. It still will take a long time, but not as long.
--
- Read the following chapters of "R Packages" by Hadley Wickham: