r/eli5_programming

555 archived posts · Oct 2017 – Sep 2026

Random post

u/cyphrrr•

The purpose of this subreddit is to provide a forum much like urban dictionary where users can explain (or ask for an explanation of) words used by programmers and web developers alike. Often times one of the most frustrating aspects of programming is just understanding what the hell someone is saying, and finding the right words to express programming concepts. Hopefully this sub can make things a little bit easier for us mere mortals.

4410

u/cyphrrr•

The purpose of this keyword allows us to reuse functions with different context by allowing us to decide which object should be referenced when invoking a function or method.

Implicit Binding

var me = {
  name: "Tom",
  age: 25,
  sayName: function(){
    console.log(this.name);
  }
}

me.sayName();

When you invoke a method look to the left of the dot for meaning of this.

Explicit Binding

.call()

used to explicitly define the context that the this keyword will reference, you can also pass parameters to the function you are chaining this method onto.

.apply()

the same as call, except rather than passing multiple parameters after explicitly d

306

u/cyphrrr•

object oriented programming (OOP) is a programming pardigm where data is dealt with in a similar fashion to objects in a real world. A simple example would be cars. Each car has similar qualities like color, model, make, these are called properties. Each car also functions in a similar way and can do things like start, brake, accelerate, steer, etc. these are know as methods but can also be referred to as functions.

Using the information above here is a simple example of what a car object would look like in javascript. Creating an object using this method is called writing an object literal

var civic = {
  make: 'Honda',
  model: 'Civic',
  color: 'blue',
  gallonsOfG
2310



I feel like this is such a basic concept and I just took the meaning of this word for granted when I first started studying basic computer concepts in school. I didn't question it as long as I could pass exams.

But now that I'm working in software, I feel like it's not completely the meaning I assume it to be so I don't fully understand what people say and what they mean. And I'm too embarassed to ask anyone this.

143



u/cyphrrr•

https://upload.wikimedia.org/wikipedia/commons/thumb/a/a0/MVC-Process.svg/500px-MVC-Process.svg.png

MVC or model-view-controller is a patter of software architecture. The main goal of MVC architecture is to separate concerns, that is, to isolate each aspect of your application into the three interconnected parts for easier maintainability and parallel development.

Model

Anytime you hear model, think data. Your model is where in the application the data is stored, this can be hardcoded (unlikely) or fetched from a server via an API in the form of JSON or XML.

View

The view, is how the application is rendered and presented to your users. Everything that they can see is considered

120


u/gohanshouldgetUI•

When I was just getting started with python, the course I was taking recommended that we just go hang out in the docs to learn more/interesting stuff. But when I saw the docs, I couldn't understand any of it. I couldn't even properly understand docs for stuff that I already knew. Why is it that they write the documentation in such convolved language? Why can't they write docs for a module as people write articles/tutorials for that certain module?

124