This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| The article is titled "No Three-month Course can teach you how to code". It should be titled "No three-month course can turn you into a rock-star Software Engineer" because that's what it's actually saying. | |
| "Student X took Course Y and in a mere three months became an amazing developer now working for SuperStartup earning a salary far above the national average." | |
| - This sentence is misleading. It implies that Student X became an amazing dev after only 3 months of doing Course Y. That's rarely ever the case, though this sentence could be true. It's more like "Student X had a super high passion for learning, and writing code, and tried to learn on his own, but needed some help. Student X took Course Y for 3 months, then worked his ass off over the next 2 years to land a position with SuperStarup earning a salaray far above the national average. It wasn't an easy course, but was the shortest path to success." I guess adding all the extra details wouldn't have made for good reading. | |
| "these coding crash c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Looking to write an API like this. | |
| # Before calling Something::Thing#search, there has to be an instance of Something::Connection | |
| # There are other classes to be used that require the connection instance as well. | |
| conn = Something::Connection.new | |
| things = Something::Thing.search('stuff') # requires that an instance of Something::Connection exists | |
| other = Something::Other.stuff('more') # also requires that instance exists | |
| conn.close | |
| # How can I save that instance in such a way that any other classes in that module will see that, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| board = [ | |
| [nil, nil, nil, nil, nil, nil, nil, nil], | |
| ['wp', 'wp', 'wp', 'wp', 'wp', 'wp', 'wp', 'wp',], | |
| [nil, nil, nil, nil, nil, nil, nil, nil], | |
| [nil, nil, nil, nil, nil, nil, nil, nil], | |
| [nil, nil, nil, nil, nil, nil, nil, nil], | |
| [nil, nil, nil, nil, nil, nil, nil, nil], | |
| ['bp', 'bp', 'bp', 'bp', 'bp', 'bp', 'bp', 'bp',], | |
| [nil, nil, nil, nil, nil, nil, nil, nil], | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require './encryptor' | |
| read_file = File.open('secret.txt') | |
| word = read_file.read | |
| read_file.close | |
| e = Encryptor.new(rand(20)) | |
| encrypted_word = e.encrypt(word) | |
| write_file = File.open('secret.txt', 'w+') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Instance Variable | |
| @people = [] # Array | |
| # Local Variable | |
| age = 32 # Integer | |
| weight = 195.6 # Float | |
| # = means assignment | |
| person = {} # Hash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /^(http(?:s)?\:\/\/[a-zA-Z0-9\-]+(?:\.[a-zA-Z0-9\-]+)*\.[a-zA-Z]{2,6}(?:\/?|(?:\/[\w\-]+)*)(?:|\w+\.[a-zA-Z]{2,4}?))$/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [{"name":"Black Crowes","address":"Las Vegas, NV","starts_at":"2013-12-13T20:00:00-08:00","ends_at":"2013-12-14T00:00:00-08:00","time_zone":"America/Los_Angeles","venue_name":"Hard Rock Hotel and Casino Las Vegas - The Joint","html_url":"https://www.tabeso.com/events/52a19b79e76542ffc8000e2b","rsvp_url":null,"description":"","photos":[]},{"name":"Stone Temple Pilots","address":"Las Vegas, NV","starts_at":"2013-12-15T19:00:00-08:00","ends_at":"2013-12-16T00:00:00-08:00","time_zone":"America/Los_Angeles","venue_name":"Hard Rock Hotel and Casino Las Vegas - The Joint","html_url":"https://www.tabeso.com/events/52a1bbb360c564964c00396f","rsvp_url":null,"description":"","photos":[]},{"name":"Steve Miller Band and the Doobie Brothers","address":"Las Vegas, NV","starts_at":"2013-12-28T19:30:00-08:00","ends_at":"2013-12-29T00:00:00-08:00","time_zone":"America/Los_Angeles","venue_name":"Hard Rock Hotel and Casino Las Vegas - The Joint","html_url":"https://www.tabeso.com/events/52a1bcb460c56463300048db","rsvp_url":null, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Models | |
| class Event | |
| include Mongoid::Document | |
| has_and_belongs_to_many :organizations, index: true | |
| belongs_to :location, polymorphic: true, index: true | |
| end | |
| class Organization | |
| include Mongoid::Document | |
| has_and_belongs_to_many :events, index: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # bash completion support for core Git. | |
| # | |
| # Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]> | |
| # Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
| # Distributed under the GNU General Public License, version 2.0. | |
| # | |
| # The contained completion routines provide support for completing: | |
| # | |
| # *) local and remote branch names |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ${1:Model}sController < ApplicationController | |
| before_filter :find_${1/./\l$0/}, only: %i(show edit update destroy) | |
| def index | |
| @${1/./\l$0/}s = ${1:Model}.all | |
| end | |
| def show; end | |
| def new |