Skip to content

Instantly share code, notes, and snippets.

ecoologic ecoologic

Block or report user

Report or block ecoologic

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ecoologic /
Last active Jul 25, 2019
Suggestions to a beginner developer

Suggestions to a beginner developer

  • Be very very humble
  • Pick up small and tedious jobs (bug fixes?)
  • Understand the product and the user
  • Read and fully understand the task
  • Think of the best UX, don't compromise
  • Think of possible bugs in your code
  • Read the stack trace carefully
  • Ask for pairings when stuck

Design Patterns

  • Value: (read-only) does some math or manipulation with one input value, like a model, but for one value only
  • Presenter: (read-only) takes complex data, like different models, and provides extra presentation values, even HTML
  • Service: (mainly-write) Has a main method that writes data through delegation, and can expose the results as read-methods (eg: errors)
  • Query: (read-only) Joins different models and performs SQL queries on them, ideally through SQL views
  • Gateway: (read-write) LIB Wrap of an API (lib: favour primitives, don't depend on app)
  • Serializer: (read-only) Converts input to a string like JSON, CSV, PDF blob etc (prefer others)
  • Parser: (read-only) convert data from one format to another (prefer others)
  • Decorator: (read-only) extends an object with extra value otherwise written in a presenter (prefer others)

Agile Manifesto points

  • People over tools
  • Sw over doc
  • Collaboration over contract
  • Change over plan


  • Be restful
  • Put view partials in proper resource (table partial, not table body)
  • Namespace a lot, use lib a lot, but don't put app (eg AR models) stuff in lib
  • Models should not use change itself in callbacks; Use services, strategies, queries, have a clear dependency hirarchy
  • Limit the use of validation (defaults?), they are only for UI purposes, (almost) always add relative DB constraints
  • DB foreign_keys, unique indexes, null with defaults
  • No SQL outside of the model
  • Write extra models (or Query objects?) to connect models
  • Write non-AR models
View .bash_aliases
alias f="find . -name "
alias s=sudo
alias dfh="df -h"
alias cpr="cp -r"
alias sag="sudo apt-get -y"
alias rmf="rm -rf"
alias y=yarn
alias b=bundle
alias be="bundle exec"



Next Window: ctrl+pgDown Reset terminal: ctrl+shift+g

RubyMine (default keymap - remapped)

  • Copy file location ctrl+shift+c

Erik T. Ecoologic

Currently interested in React, Ruby, Node, AI, UX.

profile for ecoologic on Stack Exchange, a network of free, community-driven Q&A sites

Open Source: from React to Ruby on Rails on Linux... I love it!

I love to identify solutions, code, help with UX, organise teams, mentor, hire, and everything that comes with my job. But most of all, I want to help.

View Preferences.sublime-settings
ecoologic / debugging.rb
Last active Feb 27, 2018
Ecoologic's debugging and console tricks (for Brisbane Ruby Meetup talk)
View debugging.rb
# CGI.parse(params) # "checklist_list_ids%5B%5D=10806"
# app.users_path # => "/users"
::U = User # Etc
def self.helpme
puts <<-TEXT
v # view helpers (eg: content_tag)
exceptions # List of all exceptions
# node-reinstall
# credit:
## program version
You can’t perform that action at this time.