A lab for young creators to showcase their passion and develop their voice

Coding and Friends - Introduction, Conditions, and Kimye

Pin It
Pin It

Hello, lovely people of the Internet! My name is Alex, and for as long as I can remember, I've loved to write. I always thought that writing was the one thing for me, so when my mom sent me a New York Times article about this cool new organization, Girls Who Code, I was less than thrilled. I tried to explain that I hadn't ever been good at math - unless you count that time I helped my first crush, Tommy, with his fractions in the fourth grade, and subsequently watched him fail the assignment because, like I said, I'm not good at math - and that whenever my Internet was down, I'd have a complete breakdown (turns out turning your WiFi off and then on again is really effective). "You might like it," my mom said. "Just try it."

So I set off for Girls Who Code. Now what is Girls Who Code, you ask? Girls Who Code is an incredible organization across the country that teaches high school girls about Computer Science - coding - and takes them through eminent companies in the tech industry for a firsthand look at the work a coder does. Now, if you're picturing old, bulky computers and miserable people who get through their days via Red Bull and questionable pizza, you're very wrong. The companies you visit at Girls Who Code are full of fun-loving people eating totally healthy pizza - okay, healthy is a strong word, but still - while building the apps you spend all day procrastinating on (cough-2048-cough).

But Alex, you might argue, those apps are hard to build. Aren't they full of the heavy math you ever-so-dread? Nope. I was wrong. I hardly admit to being wrong - in the third grade, I was able to convince a friend that Hannah Montana and Miley Cyrus are two separate people and that Alexander Graham Bell was revered for inventing the Graham Cracker - but in this case, I'll make an exception because it's just that important. Coding has nothing to do with math. Like, seriously, nothing. I promise! As it turns out, coding is a language - a series of languages, actually - and once you understand one, you can easily pick up the others with slight adjustments (think of the Romance languages). It's a super creative field; the writing side in me loves creating something out of nothing, and that same side also loves the fact that there are rules so elves can't just fly in out of nowhere (looking at you, every medieval fantasy book ever). As time went on, I grew to really, really love coding. And, just so you know, in Girls Who Code we ended up coding our own version of 2048 - and subsequently used it to procrastinate on building our other projects.

But Alex, you may ask, what does this have to do with me? Why have I chosen to read this instead of a Dylan O'Brien interview or Kendall and Kylie's book? Well, after participating in Girls Who Code, it's my belief that every girl should learn how to code. There will be over a million, very lucrative jobs in Computer Science by the time 2020 rolls around, and, given that only 12% of Computer Science grads are women, we really need more girls to fill those positions. Unfortunately, not a lot of girls have the resources to learn to code - Girls Who Code is rapidly expanding, so that will change soon, but in the meantime, girls need these resources.

Sites like Codeacademy are good at teaching you coding vocab - what a function is, what an if/else statement is, what booleans are (I'll explain what all that is later, don't worry) - but when you're starting from scratch, there's no resource to walk you through the thought processes on how and when to use these elements. It would be like someone reciting words in Spanish to you without teaching you conjugation or tenses or, perhaps most importantly, what they mean. My goal with this column is to teach coding conjugation - in other words, the thought processes and meaning behind concepts in coding, but in terms that don't make you want to bang your head into a desk.

So with that, let's begin.

Perhaps the most important concept in coding is that of a condition, and I'm going to write about it today because it provides the foundation for other really important concepts. Conditions are irrefutable facts - for example, "It's foggy today," "I live in Los Angeles", "Beyonce is a goddess" (None of those are refutable - and yes, I mean none). Here's what a condition looks like in code:

Conditions exist solely as a reference point. In the above scenario, the computer has reached a digital fork in the road - or, you could say, fork in the code! (crickets chirp)

What is this fork in the road, you ask? It's simple: the computer needs to know which sentence to print out: "I'm a morning person! " or "I don't like waking up" (console.log tells the computer to print something out, but we'll get more into that later). The computer checks the stated condition - what time is equal to.If time < 30 seconds (we just write 30), the computer prints out the first sentence, "I'm a morning person!" But wait a minute! Time is equal to 50! That means the condition before - that time &lt; 30 - isn't true. Thus, the computer prints out the second sentence, "I don't like waking up", because time > 30(the else).

Still feeling a little abstract? Let's better demonstrate the concept with some entertaining celeb gossip.

It might come as a surprise that Kanye West - the very "creative genius" and &quot;voice of a generation" we know and love today - used to deride the celebrity culture he wound up embodying, especially when it came to selecting a Mrs. West. In 2005, he was one of Barbara Walters' 10 Most Fascinating People, and when she asked him about his love life, Kanye more or less responded with the phrase "I don't date celebrities."

Kanye had set a condition for himself - that he didn't date celebrities - and for a while, Yeezy more or less upheld this condition, dating a relatively unknown designer for six years. Thus, the condition above is true, and Yeezy don't want no Gold Digger.

But wait a minute, Alex! Kanye West is married to Kim Kardashian - a huge, extremely well-known celebrity! That means the condition above is now false!

Because the condition above is now false - Kanye West does, in fact, date celebrities (before Kim, he dated a pretty well-known model for a couple of years) - the computer doesn't know what to do - we're only giving it one condition, and that condition is no longer true. So what do we do?

Easy - we set up another condition, since Kanye West does, in fact, now date celebrities, and update the necessary info.

Since the condition is true, the computer will print out the sentence "Kimye is bound 2 happen" when we ask it to. We haven't given the computer a web page to display this on, but we'll learn how to do that in the future.

Thanks for reading! If Computer Science (and celebrity culture) seems like something you're interested in, check back in soon for my next entry - where we'll learn more about conditions, if/else statements, the various coding languages, and how to make depressing little web forms like the one below:

For more about Girls Who Code: www.girlswhocode.com
For more about me: https://grabcad.com/alexandra.kukoff-1

Alex Kukoff is a 16-year-old writer and coder who is deaf in one ear. She attends high school and college simultaneously and has written for Seventeen Magazine, the New York Times Learning Network, Scholastic, Johns Hopkins, and Lean In among others. When she's not writing or coding, you can find her eating Cheetos, watching the exceptional programming on MTV, or crying over Theo James - maybe even all three at once! Follow her on Twitter at @akukoff.
(Cambio Col[lab] is a lab for young creators to showcase their passion and develop their voice. Like what you're seeing? Share it to support their effort!)


Follow Cambio


Grab a Col[lab] Badge

Share this badge on your blog to show you're part of our community!

<a style="display: block; text-decoration: none;" href="http://www.cambio.com/collab/"><img src="http://o.aolcdn.com/os/cambio/cambio3/images/collab-badge" style="border:0; display: block;" /></a>


Join Our Newsletter
Stay fetch. Sign up for The Cray, our daily roundup of all things buzzworthy. From Kylie Jenner's trendsetting style (btw, puberty goals AF) to life-changing tech news (tweeting an emoji to order a pizza #YES), The Cray is all you need to impress the squad.
Privacy Terms