Database Column Type - Array

Okay, So More Like "List"
Relational databases are a great way to store, well, related data, in a base. Often times, we have to store items using a "has many" type of relationship. This post will talk about about what it means to "have many" and how it relates a bit to how arrays work in a standard programming environment.

Visualization and the Power of Abstraction

Code Blocks as… Blocks
Imagine some block of code. How about something that will take a list of tweets (strings of text), chop them down to 140 characters, and print them out. Oh and while we're there, let's make some common substitutions that all of our parents would make like "2" for "to" and "u" for "you". Looks kind of like this right?

Autovivification in Ruby

What is Autovivification?
Autovivification is the concept that a hash style data structure can make inferences about its internal structure as it is being created. For instance, creating a nested hash under one of the keys would normally require you to explicitly state that you wanted to create a hash there. Autovivification allows you to skip this step and create the nested structure on the fly.

Ruby -- For Science!

Ruby in Academia -- Why Not?
We were just discussing at Flatiron that Ruby was not a typical choice for scientific and academic projects that require programming. The instructors went back and forth a bit about why that might be the case and why Python seemed to be preferred by the majority of those needing numerical data computation.

Visualizing Your Programs

It's All About Your Data Structures
I think one key to being able to read hashes and other data structures effectively is being able to visualize them on the fly. Knowing where you are in the code, what you are operating on, and what items you have available to you at all times is a super powerful feeling. Here are a few tips I use to help me put the flow back into my workflow.