Skip to content

Instantly share code, notes, and snippets.

View jurinco's full-sized avatar

Juan F. Rincon Zapata jurinco

  • www.osdglobal.com
  • Medellin, Co
View GitHub Profile
@jurinco
jurinco / cifar10-train-test.py
Created June 28, 2017 13:29
TensorFlow Quickstart Samples
import tensorflow as tf
import numpy as np
import cv2
import matplotlib.pyplot as plt
import time
# Training with 50k cifar images and testing with their set.
# be sure to use cifar data in python format.
@jurinco
jurinco / poodir-notes.md
Created May 28, 2017 21:23 — forked from speric/poodir-notes.md
Notes From "Practical Object-Oriented Design In Ruby" by Sandi Metz

Chapter 1 - Object Oriented Design

The purpose of design is to allow you to do design later, and it's primary goal is to reduce the cost of change.

SOLID Design:

  • Single Responsibility Principle: a class should have only a single responsibility
  • Open-Closed Principle: Software entities should be open for extension, but closed for modification (inherit instead of modifying existing classes).
  • Liskov Substitution: Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program.
  • Interface Segregation: Many client-specific interfaces are better than one general-purpose interface.
@jurinco
jurinco / admin_base_controller.rb
Created May 28, 2017 21:19 — forked from antillas21/admin_base_controller.rb
An excersie in removing duplication on CRUD Rails controllers. Inspired by the book Growing Rails Application in Practice
# app/controllers/admin/base.rb
class Admin::BaseController
include Admin::CRUDMethods
class NotImplementedError < StandardError; end
def index
list_resources
end
@jurinco
jurinco / example_controller.rb
Created May 28, 2017 21:17 — forked from stereosupersonic/example_controller.rb
from the growing rails application pdf
class NotesController < ApplicationController
def index
load_notes
end
def show
load_note
end
@jurinco
jurinco / introduction.md
Created May 28, 2017 21:17 — forked from wagnerjgoncalves/introduction.md
Notes from Growing Rails Applications in Practice

Growing Rails Applications in Practice

  • How to use discipline, consistency and code organization to make your code grow more gently.

  • As you cycle through patterns, your application is becoming a patchwork of different coding techniques.

    All those new techniques actually help, or if you are just adding layers of inderection.

  • Large applications are large so what we can do is organize a codebase in a way that "scales logarithmically".