Skip to content

Instantly share code, notes, and snippets.

Subrat Rout subratrout

Block or report user

Report or block subratrout

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
@subratrout
subratrout / about.md
Created Apr 18, 2018 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
View about.md
View array_iteration_thoughts.md

While attempting to explain JavaScript's reduce method on arrays, conceptually, I came up with the following - hopefully it's helpful; happy to tweak it if anyone has suggestions.

Intro

JavaScript Arrays have lots of built in methods on their prototype. Some of them mutate - ie, they change the underlying array in-place. Luckily, most of them do not - they instead return an entirely distinct array. Since arrays are conceptually a contiguous list of items, it helps code clarity and maintainability a lot to be able to operate on them in a "functional" way. (I'll also insist on referring to an array as a "list" - although in some languages, List is a native data type, in JS and this post, I'm referring to the concept. Everywhere I use the word "list" you can assume I'm talking about a JS Array) This means, to perform a single operation on the list as a whole ("atomically"), and to return a new list - thus making it much simpler to think about both the old list and the new one, what they contain, and

View api-cheatsheet-array.md

Array<T>

Legend:

  • ✏️ method changes this.
  • 🔒 method does not change this.

Array<T>.prototype.*:

  • concat(...items: Array<T[] | T>: T[] 🔒 ES3
View truhearing.rb
def team_availability(time_used_array)
# total_time_availability = [['8:30', '9:00'],['9:00', '9:30'],['9:30', '10:00'],['10:00', '10:30'],['10:30', '11:00'],['11:00', '11:30'],['11:30', '12:00'],['1:00', '1:30'],['1:30', '2:00'],['2:00', '2:30'],['2:30', '3:00'],['3:00', '3:30'],['3:30', '4:00'],['4:00', '4:30'],['4:30', '5:00']]
time_array = [[8.5, 9.0], [9.0, 9.5], [9.5, 10.0], [10.0, 10.5], [10.5, 11.0], [11.0, 11.5], [11.5, 12.0], [13.0, 13.5], [13.5, 14.0], [14.0, 14.5], [14.5, 15.0], [15.0, 15.5], [15.5, 16.0], [16.0, 16.5], [16.5, 17.0]]
# time_array = []
# (8.5..17).step(0.5).each do |time|
# time_array << time
# end
# time_slot = []
# time_array.each_with_index do |x, i|
# time_slot << [x, time_array[i+1]]
View goals.md

Goals

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"]],
View wdi-34-objectives.md

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.
You can’t perform that action at this time.