GithubHelp home page GithubHelp logo

phase-3-nds-to-insights's Introduction

Nested Data Structures to Insights

Introduction

By now you've seen the power of nested data structures (NDS) to represent the world around us. NDS are giant collections of facts, like an encyclopedia. We have to take the knowledge from an encyclopedia and do work with those facts to create new insights.

For example, by researching Colombia, the history of soccer, and South American history, we can write a report about "Soccer in South America." We can synthesize facts into insight.

We do the same with NDS. By applying code to NDS, we can synthesize insights from the raw facts contained in the NDS.

Here are some examples:

  • "What's the average age of people in the NDS representing a class of students?"
  • "How many pieces of candy are in this vending machine?"
  • "In what year will most of my employees reach retirement age so I can plan 401K contributions?"

But sometimes it can be downright scary to get started. You get a big old blob of Array of Hash of Array of Array literals and you get stuck. Never fear! In this lesson, we're going to show you a process that will help you get started whenever you have an NDS that you need to process for insights.

NDS to Insight Strategy

  1. Understand the NDS
  • "Pretty-Print" NDS with pp
  • Home-Grown Pretty-Print NDS
  1. Use [] to verify your understanding from Step 1
  • Print values to verify your understanding
  • Leave code comments and documentation for yourself
  1. Wrap uses of [] from Step 2 into new methods
  • Create simple methods with meaningful names ("First-Order Methods")
  • Ensure "First-Order Methods" use arguments to create flexibility
  1. See-saw between bottom-up and top-down method writing
  • Write a method that provides an insight e.g. oldest_student
  • Evaluate your First Order Methods
  • Can you use your First-Order Methods to build the insight method's implementation?
    • YES: Great! Your method is done!
    • NO: Build a new method that combines other methods to get closer to what the insight method needs. Repeat step 4
  1. Insight method provides an insight! We're done!

We'll explain all these terms in the strategy in the coming lessons.

Learning Strategy: Read over the strategy and see if you can formulate questions you expect us to answer example. Cognitive research suggests that you learn more when you have an overview that you don't fully understand that you expect us to fill in!

We recommend printing this list out and keep it handy as you complete labs that require you to transform NDS' into insights.

Conclusion

In Renaissance Florence, a large block of marble sat for twenty-six years, unfinished. Rain, sun, snow, it sat because no one was brave enough to face such an enormous task. It took a person of courage and conviction to make that first chip in it. His name was Michaelangelo Buonarotti. "The Giant" became the masterpiece, "David."

Starting large programs that center on huge NDS can feel like facing "The Giant." This process gives you the confidence to make the first chip.

At Flatiron School, we've seen that most students get the basics of programming easily: variables, statements, loops, all that. But what stymies all developers โ€” all creators as the story of "The Giant" demonstrates โ€” is not being able to get started. This strategy is designed to help you get over that initial activation cliff and get on your way.

While it might feel silly to think this carefully about process, we can promise you that students who have process don't get overwhelmed and give up before they've even begun. Take this process seriously, and you'll find yourself vaccinated against "getting started" anxiety!

Let's learn to make masterpieces.

phase-3-nds-to-insights's People

Contributors

ihollander avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.