Programming languages provide people with the tools to address a variety of problems. Python, for example, is great for back end development and artificial intelligence. Javascript enables web developers to create dynamic and responsive web sites. R is used for statistical analysis. In spite of the great diversity in their purposes, syntax and supporting communities, these popular languages all share a common characteristic, their keywords are in American English.
This fact is a result of historical and social processes that should not be left unquestioned. English is not, after all, the most spoken natural language in the world, nor has…
A Brief How-To
Whether Python is your first programming language or you’ve already got a few languages under your belt, string interpolation is a fun and necessary tool to learn.
For those unsure, string interpolation gives you the ability to inject variables directly into a string. This means, for example, that you can dynamically print strings rather than hard coding them. The below function, for example, lets you print out names dynamically.
def print_name(name):
print(f"Hi, {name}! How are you?")
The Modulo
There are a few different ways to interpolate in Python. …
You will wish you learned it sooner.
It’s incredibly useful, and if you already know Javascript this tool is well within your reach. It may look like nonsensical hieroglyphs, but once you pick up a few tricks it’s actually more readable than the alternative longhand Javascript. So what is a regular expression?
“A sequence of characters that define a search pattern.” -Wikipedia
Why should you learn it?
Finding Vowels Example
Consider this classic vowels problem: Write a function that returns the number of vowels used in a string…
Effectively Improve Your HTTP Requests
What is Axios?
According to NPMjs: “Promise based HTTP client for the browser and node.js”
Axios is a third-party library that enables you to perform HTTP requests. Functional equivalents include fetch-node and XHR.
Why should you learn it?
As you’ll see below, Axios is highly readable and concise relative to other HTTP request options. It’s even more efficient than node-fetch, due to it’s ability to automatically transform JSON data. Additionally, it has…
Why do I have to use JSON.stringify() when I make a post request?
I approached my instructor at Flatiron, the concise Kevin, with the above question. I was learning how to make post requests to APIs with Javascript, and had found the following syntax in the Fetch API Docs:
fetch(url, {
method: 'POST', // or 'PUT'
body: JSON.stringify(data), // data can be `string` or {object}!
headers:{
'Content-Type': 'application/json'
}
})
A high level break down:
fetch()
allows us to ‘fetch’ the resources contained at the urlmethod: 'POST'
tells the server we want to add data to the resources…The Tools and Lessons I Wish I Knew Before
My third week in to Flatiron’s Software Engineering Intensive program, my peers and I were tasked with building our first command line application. We were given a week to create a CLI project of any sort, and it was indeed a very challenging and rewarding week.
Here are some of the things I wish I’d known about before I started. I hope they make your CLI App development experience a little less challenging and a bit more rewarding.
TTY Prompt
I can’t even fathom how much precious time my partner…
What is an Object? The question is indeed the key to the meaning that you think it is. As you make your way through Java, Python or Ruby, I advise you turn to this question before all others. Whether a tree makes a sound in an empty forest or a chicken came before an egg is near irrelevant. Objects, on the other hand… Objects can unlock a whole new world.
What an object is not:
To fully understand objects and the programs that use them, Object-Oriented Programs (OOP), it’s helpful to examine their predecessor, Procedural Oriented Programs. …