Deploying a Rails App The Easy Way

Introduction You've written the app, you've deployed it on Heroku, and now it's time to deploy your app for production on a real server. There are a few advantages of a server (dedicated or VPS) over something like Heroku. It mainly boils down to: Optimization Security Flexibility and Customization Multi-app hosting Lower Cost Signing Up First, we need to sign up for DigitalOcean: a VPS service renowned for the speed and simplicity of their VPS »

11: Objects and Classes

Introduction Objects can be one of the most difficult programming concepts to understand. Once it clicks, however, it really clicks. I recommend you read and pay close attention to the textbook, and utilize your resources until you understand objects and classes, as your upcoming evaluation will rely heavily on your understanding of these concepts. Before you begin, please read the Python documentation 9.2. Python Scopes and Namespaces. This stuff messes a lot of people »

10: The While Loop

Introduction This will be a short tutorial, as while loops are pretty easy. You MUST understand conditionals to continue. While loops rely on an expression to operate. As long as the expression is True, the loop will run. When the expression stops being True (ie. it is False), so does the loop. WHILE loop structure The basic structure of a while loop is as follows: while (expression): # Do something This will execute the code inside »

08: Functions

Introduction We’ve used Python for an array of applications so far. You should by now be familiar with loops, lists, strings, mathematical operations, and how they all work together. We’ve also used a lot of Python’s built in functions to help us get the job done! Here’s a few examples: import math myRange = range(0, 10) mySqr = math.sqrt(2) newList = myList.append(newElement) It’s clear to see how these »

07: Strings

A lot of students struggle with the String type. Your understanding of this type is extremely important, and failure to understand will seriously impact your performance in labs. Therefore, I’ve decided to dedicate a post entirely to the use and manipulation of Strings. What is a String? In programming, a letter, symbol, space, new line, or tab is usually referenced by a numerical value (encoded by ASCII or Unicode). This is called a character, »