I’ve recently become truly interested in making my lifestyle healthier. It wasn’t because of any health problems, I was just curious about habits that could help me avoid any future health issues.
The world of health advice can be a very confusing place. If you ask ten experts about a health topic, all ten of them may have completely opposite opinions. My goal was to find advice that most health experts agree on and make a guide that I wish I had found when I started exploring how to become healthier.
Disclaimer 1: I’ve put a lot of effort into verifying all the information and sources, but I’m not an expert on nutrition or exercise. If you have any health conditions, please consult them with your doctor, nutritionist or physiotherapist. Do use your common sense to judge everything in this article (and everywhere else too for that matter). …
GraphQL makes building APIs a breeze. Just define types, resolvers and mutations and GraphQL takes care of the REST 😏 ActiveRecord, the most popular Ruby ORM, is famous for its N+1 queries problem unless you correctly preload associations. Can we make ActiveRecord work with GraphQL efficiently without annoying boilerplate?
Imagine the following GraphQL schema.
class ArticleType < Types::BaseObject
field :id, GraphQL::Types::ID, null: false
field :title, String, null: false
field :description, String, null: false # Article belongs to author so Article#author
# can resolve the field.
field :author, Types::AuthorType, null: false # Article has many and belongs to many tags through
# a joining table so Article#tags can resolve the field.
field :tags, [Types::TagType], null: false
I'd been a happy Ruby on Rails developer for years when I started playing around with SPAs. Server-rendered HTML with sprinkles of jQuery worked well for most of my projects, but some parts were getting too complex. That's when my React journey began.
React with Redux was the most popular SPA combo at the time and I gave it a try. Well, the amount of boilerplate that Redux required really sucked. Having been used to Rails, everything seemed 10-times more complicated than it had to be and I couldn't see too much of added value to make up for it. …