Skip to content

Instantly share code, notes, and snippets.

View patrickclery's full-sized avatar

Patrick Clery patrickclery

View GitHub Profile
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimal-ui">
<title>Patrick Clery</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.2.0/css/bootstrap.min.css">
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"awards": [],
"basics": {
"email": "patrick@patrickclery.com",
"image": "",
"label": "The greatest Ruby On Rails & React developer of all-time. 🐐",
"location": {
"address": "",
"city": "Montreal",

How to split technical tasks so that every developer can work asynchronously

Mock-Driven Development is a way of planning out features in a way that allows each dev to work on a feature without having to wait for other coders to finish their work.

The traditional way of assigning tasks

  • The coder is given a business requirement and told "make this happen".
  • Because the business scope might be vague, the technical scope becomes a big question mark.
  • This often makes the scope of the feature cross several domains of the app (backend, frontend, API, database, etc.)
  • By the end of the feature, the coder is expected to have all these domains working together without errors.

Best Practices for Debugging

Big Principle #1: Use the same data

Scientific control

A scientific control is an experiment or observation designed to minimize the effects of variables other than the independent variable. This increases the reliability of the results, often through a comparison between control measurements and the other measurements.

~Wikipedia

@patrickclery
patrickclery / how-to-create-a-rubocop-keymap-in-rubymine.md
Last active February 1, 2023 11:47
How To Create A Rubocop Keymap In Rubymine

How To Create A Rubocop Keymap In Rubymine

  1. Go to Settings > Tools > External Tools

Screenshot_20211014_145200

  1. Click "+" to add a new tool. Copy the details below, (replace /home/patrick/bin with /home/<YOUR_USER>/bin)

Screenshot_20211014_145017

[patrick@vision ~]$ ssh blackwidow -v
OpenSSH_8.6p1, OpenSSL 1.1.1k 25 Mar 2021
debug1: Reading configuration data /home/patrick/.ssh/config
debug1: /home/patrick/.ssh/config line 1: Applying options for *
debug1: /home/patrick/.ssh/config line 14: Applying options for blackwidow
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to blackwidow.lexop.com [52.138.33.195] port 22.
^C
[patrick@vision ~]$ ssh rogue -v
OpenSSH_8.6p1, OpenSSL 1.1.1k 25 Mar 2021
@patrickclery
patrickclery / test.log
Created June 11, 2021 03:13
test/models/payment_agreement_test.rb fails (possibly due to after 7pm)
Failure:
PaymentAgreement::#agreement::payment from frontend::fails#test_0001_does not send an email [/home/circleci/project/app/models/debt.rb:302]
Minitest::Assertion: unexpected invocation: #<AnyInstance:PaymentAgreement(id: uuid, debtor_id: uuid, duration: integer, frequency: integer, start_date: datetime, end_date: datetime, status: string, deleted_at: datetime, created_at: datetime, updated_at: datetime, organization_id: uuid, first_payment_amount: decimal, average_payment_amount: decimal, items_count: integer, payment_method_id: uuid, base_start_date: datetime, status_changed_at: datetime, debt_id: uuid)>.send_agreement_message()
unsatisfied expectations:
- expected never, invoked once: #<AnyInstance:PaymentAgreement(id: uuid, debtor_id: uuid, duration: integer, frequency: integer, start_date: datetime, end_date: datetime, status: string, deleted_at: datetime, created_at: datetime, updated_at: datetime, organization_id: uuid, first_payment_amount: decimal, average_payment_amount: decimal, items_count:
@patrickclery
patrickclery / how-to-design-a-full-stack-feature-in-pairs.md
Last active May 14, 2021 02:13
How to design a full stack feature in pairs

How to design a full stack feature in pairs

How to work on frontend/backend without relying on each other's work

STEP 1: Define how the request/response flow works between the frontend at every step.

The Problem: One common issue that can arise is a form needs to be designed before the backend can test their controller... OR an API endpoint on the backend needs to be functioning before a frontend can test if their request works.

If you're building a backend feature, for example a Webhook for the Twilio API, then you can go into their Dashboard, test your webhook, and you don't have to worry about this kind of thing.

# 2020-03-03 Organization Sent this message by Campaign ABC: "You owe $66" <-- this is the
# "campaign message" object
#
# 2020-03-05 Debtor said: "Hey there - I paid this online yesterday"
#
# 2020-03-05 conversation marked as "requires attention". <-- could be hidden/implied and not
# shown
#
# 2020-03-06 Organization said: "We received the update, thanks! Will mark this as resolved."
# ^^^ "campaign message" object, this is just a "reply".
@patrickclery
patrickclery / karabiner.json
Created December 12, 2020 03:59
karabiner keys for Magnets MacOS
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {