Sensation Framework
Intro
The point of this tutorial is to explore and compare the basics of a few popular programming languages, specifically ones that I happen to be interested in. In the time honored tradition of many coders before us, we are going to start with the task of printing "Hello World" in each of our chosen languages.
We will then move onto exploring a basic function, called 'my function', in each language. Our function will return a custom greeting to our user, based on input.
Our function takes in three variables
- user name (type: string)
- user age (type: number)
- is user human? (type: boolean)
And return a personalized greeting (type: string)
To do this, we will use string concatenation to construct our custom greeting. This will give us a chance to see how each language handles a few different basic data types, as well as how each constructs and executes commands.

JavaScript
JavaScript is a fast and flexible programming language that runs the web. JavaScript can be used on the frontend(browser-run) or backend(server-run) and is sometimes abbreviated to JS. It is important to note that JavaScript is not the same as Java (another programming language outside the scope of this guide). JavaScript is so popular that over 97% of websites use it client-side for web page behavior.
Note: In this guide will be be using ES6 which was implemented 2015
Hello World
Hello World in Javascript
console.log("Hello World");
// Prints: "Hello World"
<nav id="navbar" class="palette">
<div class="nav-links">
<a href="#Intro" class="nav-link">Intro</a>
<a href="#JavaScript" class="nav-link">JavaScript</a>
<a href="#Ruby" class="nav-link">Ruby</a>
<a href="#Python" class="nav-link">Python</a>
<a href="#R" class="nav-link">R</a>
</div>
</nav>
Custom Greeting Function
let myFunction = (userName, userAge, isUserHuman) => {
let customGreeting = `Hello ${userName}, the ${userAge} years old ${isUserHuman ? "human" : "non-human"}`;
console.log(customGreeting);
};
myFunction("RJ", 33, true);
// Prints: "Hello RJ, the 33 years old human"
myFunction("Niko", 10, false);
// Prints: "Hello Niko, the 10 years old non-human"
Javascript uses the keywords let for mutable data, and const for non-mutable data to declare variables. Javascript uses camelCasing for variables.
JavaScript in the Wild
- Majority of Websites
- Mobile Apps
- Node Package Manager

Ruby
Ruby is a flexible programming language that calls itself 'A programmer's best friend'. Ruby prides itself on being a swiss army knife, and is used for everything from automation to web development. Ruby is a powerful tool, one that comes with many useful methods built into its core. It's easy to see why this language is a fan favorite.
Hello World
puts "Hello World!";
# prints "Hello World" with a new line after
print "Hello World!"; # no line break
# prints "Hello Wolrd" with no new line after
Ruby is super flexible and the keywords puts and print both work for our hello world example. The difference being that puts creates a line break after and print does not
Custom Greeting Function
def my_function(user_name, user_age, is_user_human)
custom_greeting = "Hello #{user_name}, the #{user_age} years old #{ is_user_human ? "human" : "non-human"}"
puts custom_greeting
end
my_function("RJ", 33, true)
# Prints: "Hello RJ, the 33 years old human"
my_function("Niko", 10, false)
# Prints: "Hello Niko, the 10 years old non-human"
Ruby is a developer friendly language that prides itself on being easy for humans to read. Variables in Ruby are written in snake_case
Ruby in the Wild
- Web Scraping
- Command Line Tools
- API Clients
Condtionals
Unless
Unless is the oppsiite of if in Ruby. An unless statement in Ruby is used to evaluate an expression. If the expression evaluates to false, then the code following unless is executed.
print "Enter a number"
# take input from our user and check if its an interger. Ruby is full of handy methods like this.
number = gets.to_i
unless number > 10
puts "number is less than 10."
end
# The program will not print anything unless the number is less than 10.
# If the number is less than 10, prints "number is less than 10".
Loops
For Loop
Ruby was a a for loop
# ... excludes the last number, while .. is inclusive
for num in 1...10
puts num
end
# prints
=begin
1
2
4
5
6
7
8
9
=end
While Loop
Ruby was a a while loop
counter = 1
while counter < 10
puts counter
counter = counter + 1
end
# prints
=begin
1
2
4
5
6
7
8
9
=end
Until Loop
Ruby was a a until loop
i = 0
until i == 6
i = i + 1
end
puts i
# prints
=begin
1
2
4
5
6
=end
Note: Ruby has += and -= shorthand but not ++ or --

Python
Python is a Powerhouse for Data! Named after the British Comedy Troupe, Monty Python, this language (like its namesake) has gathered quite the loyal following, and therefore has some of the best and most robust documentation of any programming language.
Hello World
print("Hello World")
# Prints "Hello World"
Custom Greeting Function
def my_function(user_name, user_age, is_user_human):
species_subgreeting = "human" if is_user_human else "not human"
custom_greeting = "Hello {} the {} years old {}".format(user_name, user_age, species_subgreeting)
print(custom_greeting)
my_function("RJ", 33, True)
# Prints: "Hello RJ, the 33 years old human"
my_function("Niko", 10, False)
# Prints: "Hello Niko, the 10 years old non-human"
Python should follow the PEP 8 style guidelines. which are opinionated on things like whitespacing (it matters in python!). Like Ruby, Python variables use snake_case. Booleans in python are case sensitive and must be capitalized.
Python in the Wild
- Task Automation
- Data Analysis
- AI and Machine Learning

R
R is among one of the most popular languages for data science. It was created for statistics nerds. R is made for data analysis and is capable of making graphs, charts and all sorts of cool data analysis tools. R was not really meant to be pushed like it is in this tutorial but I was able to co-opt some of its methods for our uses.
Hello World
print("Hello World!")
Variables in R
Varibles in R can be constinted of numbers, letters, underscores and dots with few rules. Dots cannot be followed by a number, and underscores cannot be the first character of a varible. R has a few different ways of declaring variables (which includes functions):
- equal operator =
- leftward operator <-
- rightward opertor ->
# varible assigment using the equal operator.
my.name = "RJ"
print(my.name)
# prints RJ
# varible assigment using the leftward operator.
my.name <- "RJ"
print(my.name)
# prints RJ
# varible assigment using the rightward operator.
my.name -> "RJ"
print(my.name)
# prints RJ
Custom Greeting Function
my.function <- function(user_name, user_age, is_user_human) {
cat("Hello", user_name, "the", user_age, "years old", if(is_user_human) ("the human") else ("the not human"), "\n")
}
my.function("RJ", 33, T)
# Prints: "Hello RJ, the 33 years old human"
my.function("Niko", 10, F)
# Prints: "Hello RJ, the 33 years old human"
Functions in R are created using the function keyword. In R true and false are case sensitive and need to be passed in as T or F or TRUE or FALSE all other cases will fail
R in the Wild
- Data Analysis
- Data Visualization
- Data Mining