Image for post
Image for post

The Political Divide, And Its Implications

My Goal: To quantitatively understand the political divide in the United States, attempt to identify why such divide exists, and to discuss potential implications for such a divide.

Trigger Warning: This article contains information about sensitive topics such as race, gender, education and political opinion.

Disclaimer: I do not claim to be an expert in these fields, I welcome discussion, and most importantly, criticism. If you can find better more credible research for such topics, please let me know so I can update this article. Also, feel free to criticize me for my bias. …


Image for post
Image for post

Thank you to all the people who have helped me build on this idea since I stumbled upon it a couple years ago.

Thank you.

Just like most people, I have a hidden side.

It’s the side of me that sits quietly in the morning, slouched next to a table as I write in a coffee-stained journal, trying to understand who the fuck I am.

And I’d sit there with the wind brushing softly through the window and across my cheek, waiting to finally understand what it meant to “know who you are.” …


Image for post
Image for post

Facebook’s current documentation is out of date…

The Problem: If you follow the steps according to the documentation exactly, your application may work in your simulator, but it may not work on your real device (I’m using an iPhone 11, so I don’t know for sure about other models).

The Solution: Check step 6 if all you want is the solution.

Using:

  • XCode 11.2.1
  • iOS 13.3.1
  • Cocoapods (FBSDKLoginKit)
  • Swift 5

1. Create a new Single View Application

Basic stuff first.


Image for post
Image for post

Don’t be afraid of babel like I was…

Prerequisites:
- Node.js installed
- NPM installed (this comes with node.js)
- Basic Bash syntax

So you want to publish your own NPM module, and you want to write that code in ES6 syntax? Here are the challenges we will encounter in this article:

  1. We will need to build our project (Difficulty: Easy)
  2. We need to have a way to compile our code from ES6 to ES2015 so that it is compatible with anyone’s code. (Difficulty: Moderate)
  3. We will need to have a way to test our code locally before pushing it to NPM. (Difficulty: Easy)
  4. We need to check to make sure that our package name does not conflict with any other packages. (Difficulty…


How to run your classes’ code when you’re ready for it

Image for post
Image for post

Prerequisites to understand:

  • Swift 5 syntax

You may have seen someone else’s Swift code include the keyword lazy, but what does that mean? The lazy keyword is used to solve problems with processing speed.

Let’s say we have a struct:

struct Person {  var age: Int = 16}

Now, this is a pretty simple struct. And if we want to access the age property of a Person instance, it will be lightning fast. I mean…all we’re doing is returning a value.

So, let’s do that:

let person: Person = Person()
print(person.age)

No problems here…

Now, what if, somehow, we had a property in this struct that was extremely difficult to compute? What if it took six seconds just to compute that property? …


New and improved completion handlers

Image for post
Image for post

Prerequisites to understand:

  • Basic Swift 5 syntax.
  • Closures.
  • Asynchronous data handling.

To fully grasp what the @escaping keyword does, we must first understand what a completion handler is.

Let’s consider the following function:

func fetchData(url: String){  print("Fetching data...")
print("Data has been fetched!")
}

This is a pretty basic function that does nothing but print to the console. No asynchronous requests have been made so far.

The first thing you need to understand about a function is that it has a function scope. All this means is that, when the thread has finished executing this function, the function will be discarded.

You can imagine it as if the function has been thrown away. …


3 reasons why JavaScript will be the most popular programming language in 2030

Image for post
Image for post

For those of you who don’t understand the play on words in the title, there is a keyword in JavaScript called “this” which has been the center of confusion since the birth of the language.

That being said, it is surprising that one of the most misunderstood programming languages is starting to dominate the industry.

JavaScript was once called a “toy” by elitist programmers who saw the age of the self-taught developer learning how to create animations in web browsers. These animations were only possible because of JavaScript.

But as trendy cartoon animations grew in popularity, elitist programmers dug their heels into ASP.NET servers, never heard of it? …


Updated for changes made in 2019

Image for post
Image for post

When I first started programming, one of the first tools I wanted to create was an app that could run blocks of code every day (or some other time interval).

But when you’re just starting out, like I was, I didn’t know what to Google to figure out how to do that. If you don’t know much about me, I was originally a psychology student and originally taught myself how to code in MATLAB. …


Image for post
Image for post
Alec’s Instagram

There is a clear rise of consciousness in 2019, and everyone seems to want to know, “what exactly does it mean to be self-aware?”

Self-awareness at it’s core is going to mean something different to everyone, but everyone who “gets it” knows that it can be a simple but powerful tool for navigating life.

The problem is that “self-awareness” has become a buzzword with a lot of bad advice surrounding it. I’ve had friends tell me that a YouTuber advised them to walk around town and hit on girls way out of their league. And while this might give you a sudden rush of adrenaline, maybe make you feel more “alive,” that feeling is only temporary. …


Image for post
Image for post
Instagram

You’re basically about to get your developer pregnant…

Back in college I encountered this 1 conversation, like, a bajillion times. It went a little something like this.

“Hey Suzy”

“Hey Jimmy”

(I’m Jimmy)

“Hey do you know anything about how [insert topic] works?”

“Why? You stuck on some homework?”

“Nahh”

“What class is it for?”

“It’s not for a class.”

“…what? Then why are you-”

Aaaaaaaaaand stop the scene.

You probably see where I’m going with this. Wanting to learn for the sake of learning is somehow a foreign concept to college students. …

About

Alec Mather

Developer 💻 || Writer 📝

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store