Skip to content

Instantly share code, notes, and snippets.


Subrat Rout subratrout

View GitHub Profile


Here are my goals that I would like to accomplish over the next year.

Goal #1 - Become proficient in JavaScript and its ecosystem

  • Currently, I have a decent grasp over the language. There are still some ES5 methods I am not familiar with and ES6 is hit or miss with what I know. The JS ecosystem is still something I'm getting used to (npm) and using a tool like webpack is still tough to wrap my head about.
  • Success would be fully understanding all the little quirks of JS and keeping up with the latest version of the language. Being able to structure modern client side applications using webpack and taking advantage of npm. Also, I would like to become fairly proficient with building out API's with Node.
  • Resources for learning:
View parse_interviews.rb
#!/usr/bin/env ruby
require 'yaml'
require 'json'
input_dirname = ARGV[0]
output_filename = "parsed_interviews.json"
class Categorizer
HW_CATEGORIES = [[/.*dell.*/, ["pc","system"]],

WDI 34 Learning Objectives

Developers will be able to...

Week 1

###Command Line

  • Navigate the file system from the command line.
  • Create, move, copy, and delete files or directories from the command line.
subratrout /
Created Sep 22, 2017 — forked from somu45/
Ruby, Rails and Sql Specific Questions


  1. Fix the following snippet. Given a collection of 1000 draft Articles, update all of them to be published

    Post.where(status: :draft).each { |p| p.update_attributes(status: :published}
    #Ans. Post.where(status: :draft).update_all(status: :published)
subratrout /
Created Sep 22, 2017 — forked from Vasyl-Varkholyak/
Questions to Ask During a Ruby Interview


Senior programmers won't have a problem with these, while junior programmers will usually give only half-answers.

What is a class?

A text-book answer: classes are a blue-print for constructing computer models for real or virtual objects... boring.

In reality: classes hold data, have methods that interact with that data, and are used to instantiate objects.

View gist:0d0e56fd2038b1a93a85026a512b86f6

1. What is a class, what is an object and why we need modules

This may be simple, but it allows to start a conversation between two strangers involved into the same craft.


Classes are a blue-print, they may hold data, likely they hold methods; classes are directly connected with an idea of objects, because object is an instance of a class. As objects are first-class citizens in Ruby, there is a main, root class Object, and all classes are inherited from this root entity. Modules, generally, are a tool for mix-ins and they provide something we call a namespace. Modules cannot be initialised the way we can do this with classes, but they provide a multiple inheritance.

2. Who’s _why and what’s up with his Shoes?


#A team

##What is Rails?

Rails is an open source web application framework written in Ruby. It is a full-stack framework that has been optimised for programmer happiness and sustainable productivity. It emphasises the use of well-known software engineering patterns and paradigms, including convention over configuration (CoC), don't repeat yourself (DRY), the active record pattern, and model–view–controller (MVC).

Extra: David Heinemeier Hansson (DHH) is the creator of Rails, having extracted it from his work on Basecamp. He first released Rails as open source in July 2004.

Useful Links: