You can post a json file with curl
like so:
curl -X POST -H "Content-Type: application/json" -d @FILENAME DESTINATION
so for example:
{}.as_json # {} | |
{}.to_json # "{}" | |
# query / command | |
user_params # query, no get_params etc, prefer queries over commands, leads to more declarative code, which is simpler | |
remote_document # Query, not get_document, more declarative | |
buy_document! # Exception to the above, it's probably a POST and I want to express that it's not a free call | |
prepare_document! # Bang to express imperative behaviour (?) | |
compact_params(params) # command - takes args and can be reused | |
compacted_user_params # YES, a noun is better |
title | date | author | tags |
---|---|---|---|
The Direction Of The Dependency |
2016-02-26 |
Architecture, Dependency Management, Ruby |
When projects grow they become hard to change. One aspect that is not often highlighted is dependency direction. I haven't found much material on the topic, maybe the best ideas came from this talk by Sandi Metz "Less, the path to a better design".
# CGI.parse(params) # "checklist_list_ids%5B%5D=10806" | |
# Gem::Specification.map(&:name).sort | |
# app.users_path # => "/users" | |
::U = User # Etc | |
def self.helpme | |
puts <<-TEXT | |
v # view helpers (eg: content_tag) | |
exceptions # List of all exceptions |
Currently interested in ReactJS, Node, TypeScript, AI, UX.
app
)It's practically an all-purpose training of the mind.
Meditation has the objects of stable attention and mindfulness (sati in pali), the latter being the optimal interaction between attention and peripheral awareness.
The practice consists in listening to the meditation object (the breath). Whenever you realise the mind wondered off, you happily move back to the meditation object. That's it, everything else are techniques to remove the time you're not following the meditation object.