Skip to content

Instantly share code, notes, and snippets.

View DanielEFrampton's full-sized avatar

Daniel Frampton DanielEFrampton

View GitHub Profile
@DanielEFrampton
DanielEFrampton / variables_references_and_mutability.md
Last active May 22, 2020 19:50
An article about variable assignment, passing by reference vs. passing by value, and mutability

Variables: Assignment, References, Mutability, and so much more

I was content to jet-ski across the surface of an understanding of variables in Ruby until the grimy tentacles of Leetcode forced me below the surface. Several challenges in their curated list of top interview questions specified that I write a method which would modify the value passed in as an argument "in-place"; that is, rather than having the method return a new, modified value, the original value needs to be (destructively) changed. In these cases Leetcode would evaluate the value of the variable which was passed as an argument to your method and disregard the method's return value, which I'd never encountered before.

Uttering the eternally bad-idea phrase "well, that seems simple," I dove in and tried to get them to work. What transpired was comic gold: Three-Stooges-level antics wherein I kicked my shins on every possible surface trying to intuit why the origi

@DanielEFrampton
DanielEFrampton / rosetta-graphql-examples.md
Last active April 6, 2020 19:19
Rosetta Example GraphQL Queries & Responses
@DanielEFrampton
DanielEFrampton / setting-up-flask-with-postgresql.md
Last active April 6, 2020 23:24
Setting Up a Flask App with PostgreSQL

Setting Up a Flask App with a PostgreSQL Database

Single context app or app factory with multiple contexts?

Rails Equivalencies

rails routes :

from app_name import app 
@DanielEFrampton
DanielEFrampton / making-sense-of-ml-and-nlp.md
Last active April 5, 2020 16:05
Making Sense of NLP and ML

Making Sense of Natural Language Processing (NLP) and Machine Learning (ML)

I'm making an app where you can input a method/function you know in given language and ask for its equivalent in another, and the app will use machine learning (and, perhaps, natural language processing or NLP) to compare the two sets of language docs and returns the best guess at that equivalent function based on text similarity and weighted by up/downvotes.

The only problem? I have no idea what I'm doing. Come along with me as I document my learning process, hacking our way through the jungle undergrowth of obtuse terminology in hopes of coming out the other side older, wiser, and not murdered by my teammates for coming up with this idea.

Machine Learning (ML)

Where to begin?

@DanielEFrampton
DanielEFrampton / rosetta_pitch.md
Last active April 1, 2020 21:26
Rosetta Cross-Pol Project Pitch

Daniel Frampton Mod 4 Cross Pollination Pitch

Pitch

Rosetta: a programming education app that uses machine learning & natural language processing to compare data from official language docs to provide comparisons between different default library functions and syntax to ease the process of learning new languages.

For example, I want to know what the Python function is works similarly to Ruby's .gsub String method; Rosetta looks for language similar to that of the description of Ruby's string method in the Python docs, and returns me the top five matches with a relevance rating. The ML and NLP might be helped along by some manual connections between similar libraries and concepts, and helped to learn by providing concrete known examples.

The app would begin by implementing Ruby-to-Python and, if time allows, Ruby-to-JavaScript. Different versions of a language can be compared by searching their respective docs, and there's the potential to search package libraries if the default library does not hav

@DanielEFrampton
DanielEFrampton / what_the_heck_is_algolia.md
Last active March 22, 2020 22:26
What the Flippin' Heck Is Algolia?

What the Flippin' Heck Is Algolia?

While working on a new feature for Dev.to involving the existing "Reading List" component, my team ran into a roadblock. Namely, having no idea whatsoever where the data was originating. The Rails controller action corresponding with the related view did not make an ActiveRecord query; so where are the articles on the user's reading lists being pulled from? What we did find in the controller was a reference to Algolia, but the Algolia class does not reside in the project itself but in an external library.

The Dev.to docs mention Algolia but are less than helpful on the topic:

Algolia is a third party service that powers the search. When working with the API, you will likely need to utilize Algolia. You will need to sign up for a free-tier account, retrieve the keys, and provide those keys to the Rails application.

What "the search" is and what "the API" might be is left for us to discover. A page farther dow

@DanielEFrampton
DanielEFrampton / introduction_to_rails_talk.md
Last active March 22, 2020 02:35
Introduction to Rails - How Data Is Passed and a Rails App Is Structured

Explain It Like I'm Front-End: Ruby on Rails

Some Ruby Basics

How Methods compare to Functions

Closest comparison is JavaScript class functions. In Ruby, it is very infrequent for a method to be defined outside of a class. Taking this example from the MDN docs on Classes:

@DanielEFrampton
DanielEFrampton / dev_to_data_flow_and_files.md
Last active March 21, 2020 22:03
Dev.to Data Flow and Files Notes

Dev.to Data Flow and Files Notes

General

  • The primary view template at app/views/layouts/application.html.erb loads:
    • app/assets/javascripts/application.js, which loads all JS files.
  • Instant Click loads data in the background when users mouse over links, using:
    • app/assets/javascripts/base.js.erb - calls various initializers
    • app/assets/javascripts/initializePage.js.erb calls all initializers related to page data
  • app/assets/javascripts/initializers/initializeBaseUserData.js - involved in prepping data for home page
@DanielEFrampton
DanielEFrampton / career_journal.md
Created March 12, 2020 17:25
Career Journal Template

Career Journal

Self-Reflection

What are you really good at?

What are you passionate about?

What do you find really challenging?

@DanielEFrampton
DanielEFrampton / mod_4_prework.md
Last active February 3, 2021 16:46
Mod 4 Pre-work Checklist

Mod 4 BE Pre-work Checklist

  • Go back to at least one previous project that you want to update/refactor for your portfolio website. If you have past GH issues that you created, those can be a good place to start. Submit a link to your PR(s). Deliverable
  • Refamiliarize yourself with the HTTP request-response cycle, watch this video.
  • Refresh your familiarity with the git rebase workflow.
  • Submit your M4 Gear Up Lightning Talk here
  • Complete the first draft of your cover letter using this cover letter checklist in preparation for your M4 professional developm