- Use exercism.io for coding exercises
- Ruby like syntax
- Compiled
- "Fast as C, slick as Ruby"
- Concurrency model like Go-lang
- http://caseywatts.com/mindmanipulation
- Control your mind/emotions from negative feedback loops to prevent the "downward spiral".
- The "whoop" moment. Catch yourself starting on the path of negative thoughts and bring it back. It's probably not "the worst day ever". You're not "the worst".
- Use apps like Headspace for mindful meditation
- Book called "Feeling Good" on how to deal with depression, anxiety, negative thoughts without drugs
- schema.org
- Search engines pick up on keywords in
<title>and<meta>tags but only goes so far - Structured Data
- data easy to digest for search engines
- Google web developer tools has a Structured Data Testing Tool that can test live data, show errors from pages that have been crawled, or test pasted snippets
- Microdata is common older format
- Nests structured data within HTML context
- Interwoven with user-visible text
- Syntax like: itemscope, itemtype, itemprop
- JSON-LD is new preferred format by search engines (aka Google)
- "JavaScript Object Notation for Linked Data"
- Looks like JSON with some syntactical differences
- Consists of properties and values
- Not interwoven with user-visible text/markdown. As such it is easier to find and update JSON-LD for a page since it is in one place.
- Create a
json_ld_tagmethod to insert into views - JSON-LD allows search engine to show Rich Cards / Snippets
- A decade or so ago thousands of lines of configuration for a tomcat server, colo hardware to the datacenter, etc was not unusual in order to launch a new service application
- Context changes. Technology moves on
- Rails being a young framework still, our tooling is built generally for smaller teams and smaller projects.
- Go-lang has "forced errors / forced error checking"
- Force error handling in Ruby with required callback parameters
def get(url, on_success:, on_failure:) #... begin # do something on_success.call(resp) rescue StandardError => e # Would use a more specific error type on_failure.call(e) end end
- Adding context objects can allow a trace of which request called a third party service, which request with which parameters raised an error. Logs lose context quickly so pass it down.
- Was mentioned he would tweet out a link to a gem but I can't find anything. Seemed like a very interesting idea though.
- GraphQL developed at Facebook. In use at Github. Goal to make API requests easier and require less requests to get all the data you need
- GraphQL services generally supply only 1 endpoint: /graphql
- Example:
query { deck(id: 2) { name cards { name } } } - GraphQL services are strongly typed and self-documenting
- Has "fragments" that are kind of like reusable query partials
- Can implement rate-limiting based on nodes (objects) returned, not number of queries. This applies to "complexity" of how much the query will cost.
- Can use from controller action to pull all data in one spot which can be more easily monitored and optimized compared to when queries are initiated from views.
- Gem: graphql-ruby
- http://graphql.org | http://graphql-ruby.org
- "System Tests" with capybara will be fully baked into Rails 5.1 by default. These are the same as "Acceptance Tests".
- "Tests your application as a system"
- By default will run with the selenium driver through a chrome browser window.
- Chosen for ubiquity and not requiring another dependency like installing phantomjs for headless testing.
- Super easy to change driver to phantomjs or browser to something else.
- RSpec is dropping it's own Rails / capybara integration in favor of this new feature. rspec/rspec-rails#1813
- DatabaseCleaner no longer required. Some refactoring was done to allow the rails test setup code and the request running in the browser to share the same database transaction so data is shared and the transaction can simply be rolled back at the end of the test.
- "Consensus is the enemy of vision". When developing in open source, you can't please everyone. There are many people who feel they have a stake in the feature. Rails is opinionated. Have a vision and accept constructive feedback.
- Rails integration tests differ from system tests in that integration tests construct requests and check responses rather than actually clicking through the UI.
- Integration tests were improved to be faster as part of this work since
ActionDispatch::SystemTestCaseinherits fromActionDispatch::IntegrationTest