Posts

HTML vs CSS

So you want to build a website?

Learning how to construct a website is much like learning a new language.

The fundamental languages for building a website are HTML and CSS.

Let’s break each one down individually, then see how they work together…

HTML stands for Hypertext Markup Language. Think of HTML as the skeleton or tree of the document. It’s what gives structure to the site in its most basic form. We do this by tags, elements, and attributes. Whether you want headings, lists, images, or links, HTML can do all of that.

We can start with a basic HTML document.

<!DOCTYPE html>
 <html>
 <head>
     <title>Welcome to One Month</title>
 </head>
 <body>
     <h1>Big Willie Style</h1>
     <img src=https://i.imgur.com/Vr37Ac3.jpg>
 </body>
 </html>
HTML vs. CSS

HTML code example

Lets dissect this a bit further. The !DOCTYPE tells the browser what type of document it is. In this case, HTML. In the head section you can see the title tag. This is where you would put the title of your website. Inside the body, you could add an H1 tag. Think of a newspaper headline such as Hello World!. This would be inside the H1 tags like so <H1>Hello World!</H1> which would translate to the largest heading tag there is.

Tag, you’re it!

HTML is the structure of a website. In order to give your website form you’re going to need to use some HTML tags (also referred to as HTML elements).

<h1>, <h2>, <h3>, <h4>, <h5>, <h6>
These tags are for headings, much like a newspaper. h1 being the largest.

<p>
Paragraph

<br>
Line break

<img>
The img tag is for inserting images into your site.

<video>
The video tag is for adding videos, of course.

<a href>
We use this for adding links, stands for anchor.

<strong>
Bold

<em>
Italic

<ul>
unordered lists

<ol>
ordered lists

Note: Both <ul> and <ol> have children tags <li>

If you are writing a list either unordered <ul> (bulleted) or ordered <ol> (numbered) they will surely need items in the list. To do this we use the list <li> tag. The <li> is a child of either the <ul> or <ol> tags. So an example of favorite 90’s sitcoms would look something like this…

<ul>
  <li>Seinfeld</li>
  <li>Friends</li>
  <li>Frasier</li>
  <li>Growing Pains</li>
</ul>
HTML vs. CSS

HTML code example

CSS

CSS stands for Cascading Style Sheet.

If HTML is the structure of your page, CSS is the style. It’s not one or the other, rather they work together at all times.

Without CSS, your websites would look rather boring and dull. In CSS there is a property and a value. Property is what you want to change, property value is what you want to change it to.

Let’s look at our example again…just with HTML.

CSS code example #1

CSS code example #1

Remember the <body> tag in HTML? We can correspond the same body with CSS. Let’s say we want to change the color of the body. It would look something like this…

HTML with CSS code together

HTML with CSS code together

body {
 background: red;
 }

Gettin’ jiggy wit it.

Or lets say we want to change the color and size of just the text in the body.

It would look like this…

body {
 font-size: 25px; background: blue; color: orange;
}

Learn HTML vs. CSS with a blue background Or suppose you just wanted to hone in on the H1 tag. You could do something like this…

H1 {
 color: blue; font-size: 100px
}
 Learn HTML vs. CSS with a blue background
 

With color, we can do it simply such as the examples above. Another option is to use hexadecimals (#RRGGBB).

In order for us to take advantage of CSS, our HTML needs to be linked to it. We do this by…

<link rel=”stylesheet” type=”text/css” href=”main.css”/>

As you can see, there is a relationship (rel) between HTML and CSS.

Another way we can implement CSS is using the font-family property. This is the same thing as using a text editor to change the font.

We do this by…

h1 {
 font-family: Arial
 }
 HTML vs. CSS 
 

Case Study: CSS Zen Garden

A wonderful showcase of the relationship between the two languages is CSS Zen Garden.

CSS examples with CSS Zen Garden

CSS Zen Garden demonstrates the power of CSS. Clicking the links to the right will load the same exact page with one discernible difference, the CSS. This clearly highlight what CSS can do by changing the look and feel of the page.

Here are some examples from the garden…

CSS Zen Garden examples

CSS Zen Garden examples

CSS Zen Garden examples

Tutorial highlights

So what have we learned?

  • We’ve learned how to construct a barebones website using HTML.
  • HTML can exist on its own, CSS cannot, but together is where the magic happens.
  • The more we learn about each language, the more creative we can be with our design. This is the fun part. With the structure in place, the choices are endless when it comes to what we see.
  • HTML is the noun, CSS is the verb. Let’s make sentences!

Learn more HTML and CSS now! 

If you would like to continue your journey with HTML and CSS here are a few resources:

What is Coding?

print “Hello, World!”

We’re going to talk today a little bit about coding. Specifically we’ll answer the question, What is Coding? and also cover a little of what happens when we code. Before you begin, though, I want you to right click on your browser window and choose the View Page Source option. What you just got was a view of that web page’s code. Which is to say, you got a glimpse of the language that tells your computer how to make that webpage look the way it looks.

The first time I actually looked at the code in a browser window was a revelation to me. Here was the internet in the internet’s own voice. Sure I didn’t understand most of it, but I could pick out snippets of words and phrases I understood. I knew a font name or two, understood pixel sizes more or less. It was alien to me, but I could understand how it worked. Here was the language that my computer spoke. Or so I thought.

If you’re planning on learning to code at all, it’s worthwhile thinking through what exactly is happening when you code, what exactly it means when we say someone is coding, what the difference is between coding vs. programming, what languages you might end up coding in, and how to get started coding.

<style type=awesome_sauce.css>

So let’s start briefly with what coding isn’t. I mentioned above that when I first saw the source code of a web page, I thought that I was looking at the language my computer spoke. This is one of the common ways of talking about what coding is. It’s not exactly true, though.

Your computer doesn’t really understand the nuances of language. In fact, the only terms your computer understands well at all are “Yes” or “No.” Imagine talking to a group of engineers, but your phone has gone out and your radio only works one way. You can only communicate with a flashlight. One flash for yes, two for no. It might take a while, but eventually, the bridge will get built and all will be happy.

This is how a computer communicates with people. The language the computer speaks is binary code, a mathematical language that looks like a line of ones and zeros. Essentially the computer understands “Turn this function on. Turn this other one off,” and nothing else. So unless you’re typing strings of ones and zeros into your text editor (which, you’re not…just no), you’re not really writing code in a computer language.

OK, so if writing code doesn’t amount to writing in the computer’s own language, what are you doing?

Well, think about it like this. You don’t speak binary and the machine can’t come close to understanding human languages. So in order for you to tell the machine what to do, you have to have a translator who can act as an intermediary. This is code. It’s a form of writing that isn’t binary, but that the computer can understand.

For most of the programs you’re likely to write, the code is actually several steps removed from the binary code. You write in a high-level code that’s closer to human language, and programs built into your computer translate them down into binary. It’s like if you needed to speak to someone who knew Mandarin, but the only translator you could find spoke only French. You would need another translator to translate from English to French and then they can translate to Mandarin.

What sort of blows my mind about all of this is that it works somehow. We have programs translating programs to a machine that only speaks binary, which is an insanely complicated prospect. Yet here I am typing human words on my binary speaking computer.

Luckily, when you start coding, it’s not really important to understand how this all works as long as you understand what programming is you’re headed in the right direction. The important takeaway is that coding is writing in an intermediary language that both you and your computer can communicate in.

<{Coding=Programming} YES>

When I was growing up, my dad was a computer programmer and all the people he worked with were programmers. This was how I understood people who wrote for computers for a long time. They were programmers.

Then it seemed like there was a shift in either terminology or industry, and suddenly people who wrote for computers were coders. Which has prompted me to wonder whether there is a difference between the two activities.

A little research shows me that it depends greatly on what school of thought you subscribe to. Several forums I have looked through say that there really isn’t a difference between a coder and a programmer. It’s a difference in terminology rather than activity.

The egalitarian in me likes this way of looking at things. However, Jonah Bitautas makes an interesting argument that there is a real difference that amounts to a matter of scale. Essentially, a coder is someone who writes language for computers. A programmer is someone who oversees the writing of a whole program — that is to say, a whole project’s worth of code writing.

It’s the difference, I think, between calling someone literate and calling someone a writer. A literate person can write and read words, but doesn’t necessarily see how they work together into elegant paragraphs and sentences. A writer, on the other hand, understands how those words work together in a larger, more complex structure and can maneuver through that structure with intelligence and choice.

Like I said, I love the egalitarian quality of the first definition, but I’m all for preserving a sense of difference between the activities, if for no other reason than it gives people something to reach for. I have written code, but I am not yet a coder. When I am a coder, I think I’d love to be able to look forward to the day when I can call myself a programmer.

Languages

There are literally dozens of languages a person can learn to code in. Although a few languages are all-purpose (or multipurpose), most serve a specific function. CSS, for example, functions primarily to make things look pretty on the web. JavaScript, a relatively old language, exists to make web pages more functional. Depending on what you want to accomplish, you’re going to have to choose a specific language. There are a few common ones that you might want to work with, especially if you’re just learning to code.

HTML

When I asked you a minute ago to open the source code for this web page a minute ago, it took you to lines of code written in HTML. Short for Hypertext Markup Language, HTML works as sort of the bones of the Internet. It tells web pages what should be displayed where and how they’ll fit within a given style sheet. It also tells your browser where to look for content like images and videos that you might want to include, as well as where to find the style sheet you’re working off of.

CSS

CSS is the stylesheet. If you open up a CSS file, you’ll see a lot of references to font families, colors, bold or not, etc. When your browser loads a page, the HTML tells it “Hey. Make this part of the page look like a header. OK?” It also says “Here’s where to look to understand what a header should look like.” This will always be a CSS file.

Javascript

Javascript is a language that brings interactivity to the web. It’s a language that makes things happen on a web page. When you click a button on a web site, for example, it’s JavaScript that makes the button seem to click. The controls for video players on the web, animations, etc. Most of these are JavaScript of some other dynamic programming language. In a later post, I’m going to be writing about front-end versus back-end work using Javascript and PHP. Which is to say, programming for the user of the website versus programming for the server of the web site. More on that to come.

Ruby on Rails and Python with Django

We actually already have a baller post on the differences between these two framework languages, which is worth ducking away to read when you’re done here. The short version is that Ruby on Rails (Rails to its friends) and Python (named for Monty Python) are both programs that are used to develop web applications. Which is to say they create programs that allow web pages to do things at a high level of interactivity. If you want to, for example, build a bot to automatically create an automatic payment system for your clients, you’ll probably use one of these. They’re great programs to learn to work with because they are extraordinarily versatile and there is a lot of extant code for you on the web to begin playing with this.

Learning to Code

There are actually a lot of parallels between learning to code and learning to write well (as there should be, since coding is just writing in computer languages). I think the most frustrating of these is that, as with learning any language, you have to be willing to spend time practicing it and doing it poorly.

There are some people who are just natural coders, sure, just as there are people who can speak Italian after listening to a couple of operas. For the vast majority of us, though, learning to code is a process that involves trying to tell the computer to do something, having the computer come back with an error message (which is its way of shrugging its shoulders and saying “Qua?”), and then trying a new way of doing the same thing.

The most successful self-taught coders I know are people who regularly take on coding challenges just to see what they can make. I know a guy who writes Python bots for Twitter as a sort of hobby. He’s made some things that are pretty awesome to behold.

Coding languages now are dynamic and complex enough that often times if you can conceive of a thing you want to have happen on the web, you can do, and probably there’s a web site that can help you work out how.

There are also many ways to find classes that can get you started on the basics of whatever program you want to make. That means there’s really no reason to not start playing a bit. There’s no risk to trying something (you can’t break the web; Kim Kardashian already did that), and the gains are huge. So go for it. Conceive a bot, conceive a web page, conceive a font family, and get started.

Why You Should Learn Python As Your Next (or First) Programming Language

Why You Should Learn Python As Your Next (or First) Programming Language

We’ve got a major course release coming up!  We’re re-launching our Python course, with brand-new material recorded by our original teacher and CEO, Mattan Griffel.

A little over a year ago, we launched our first Python class to our largest-ever audience. We got a ton of student feedback and, based on the feedback, we closed the course for 6 months to renew, upgrade, and edit the curriculum to better meet students needs. Mattan built a new curriculum from scratch and recorded an entirely new course.

Enroll in Python now and save 10%! →

This Fall, Mattan will be teaching at Columbia Business School as well as making this course available to 100 people here at One Month for the first time. It’s one of the most popular programming languages and one of our most popular courses, so if you’re interested in joining us August 15th, sign up here for the Python course right away.

Today, I sat down with Mattan to interview him about what Python is, why you should learn it, and what kinds of projects you can build with it.

Why should you learn Python?

 

Python is an easy programming language for beginners to start out with. It’s newer than a lot of languages, so it’s easier to learn than some of the older languages (they fix a lot of the things they learned that suck about older languages), there’s a lot of demand for Python programmers (the average Python developer salary in the US is $102,000 according to Indeed.com), and you can do some really cool things with Python from data science to building websites.

What is Python?

Python is a really popular programming language used by companies like Google, Facebook, Dropbox, Instagram, and Reddit. Python is used for all sorts of things like building websites, web scraping, data analysis, machine learning, and natural language processing. The language is designed to be easy to read, while still being very powerful, which makes it a great language for beginners to learn.

Why Python and not Rails?

Both are good to learn, but Python is especially good for data analytics and sciency-type stuff. It has a lot of coding tools that make things like statistics easier to do. Rails on the other hand is specifically meant to help you build websites.

What are the different language options out there? Why is Python a good place to start?

There are a lot of potential programming languages out there: C, C++, Go, Java, Javascript, PHP, Python, Ruby, Swift being some of them. But if you were to start anywhere, I’d recommend either Python or Ruby. They both have huge developer communities with lots of resources that are friendly for beginners to learn, and there are features of the language that are easier for beginners to learn (for reasons it would be hard to explain here, but for example like they don’t require ; after every line or do crazy iterative for loops like Javascript.)

How did you teach yourself Python, personally? Why did you learn it?

I taught myself using a bunch of online resources such as Learn Python the Hard WayCodecademy, and Exercism. I learned it because I wanted to be able to compare what it would be like learning a language different from the one I know (Ruby), and I wanted to see what all the fuss what about, and also I wanted to teach this class.

I learned Python because I wanted to compare what it would be like learning a language different from the one I know (Ruby), and I wanted to see what all the fuss what about.

Any cool things you’re doing with Python right now?

Web scraping and data processing I’m doing with Python, but not regularly or anything like that. I’m still more comfortable with Ruby, so I’d probably use that more often.

What kinds of things can you build with Python?

Honestly, just about anything you can build with other programming languages like C++ or Ruby. You can build: websites, web scrapers, crawlers, scripts, interact with APIs, build your own APIs, build automated and messaging bots, make phone calls and send text messages, do machine learning, data analytics, natural language processing, statistical models, just about everything besides iPhone and Android apps (though you can build parts of those in Python).

What kinds of projects will we learn in your class? What will we build?

We’ll write scripts that calculate things for us, automate tasks, get data from APIs like stock prices and the weather, built a bot that sends text messages, write a web scraper, and build a web application.

(Yes, you’ll be able to do all of that within 30 days.)

Enroll in Python now and save 10%! →

Who is this course for?

This is for anyone who is a beginner and wants to learn Python but doesn’t know where to start.

Who is it not for?

This is not for experienced developers. It’s also not for people who are already really busy or who aren’t serious about learning something new.

The process can take a while and be frustrating, so you need to have time and patience. It’s also not really for people who don’t see a benefit in knowing how to code somehow in their life. I mean, you could learn it just out of curiosity, but unless you’re trying to get a job as a developer, automate some of your work with scripts, or apply the knowledge in some way, you’ll probably not be committed enough to remember all this stuff.

How much time do you think a student should spend on Python each week in your course?

We ask our students to take at least 30 minutes a day to work on our course. Some people do the work on the weekends and spend 3-4 hours on the weekends to watch the videos, do the projects, and figure things out. (Sometimes people get really excited and dig deeper into the research project and take 6-8 hours or more each week of class. It’s up to you to customize.)

The one thing I would recommend is making sure you do all of Week 1’s assignments during Week 1, and Week 2 during Week 2, because the benefit of these live courses is that you can ask questions, get feedback, and talk to other students who are working on the same projects you are.

Why did you change the course up and re-launch it?

Because our initial Python course focused on Django and building web apps but not really Python and a lot of the stuff you can do with Python.

We wanted to make the course better and we’re confident that we’ve developed a really good curriculum that works and will show off projects that students are really excited to complete.

What do you wish students knew in advance / before they sign up for the course?

That there’s nothing necessary to know in advance! If you don’t know much, or feel like you know nothing, that’s actually a great place to begin.

It’s helpful if students have some initial understanding of HTML and CSS, but really, it’s not essential. They should also know that this class is made for total beginners so if they already know some programming stuff and they feel like the class starts off slow, they should be patient. It gets challenging really quickly.

What are your favorite resources, books, and other tools that you used to learn Python?

Definitely the resources I used to teach myself: Learn Python the Hard Way and Exercism are two of my favorites.

Anything else you want to tell people in advance?

I hope to see you in the course! And if you have any questions about it, leave a note in the comments so I can answer it.

Oh – and how do they sign up for the course?

Sign up here for One Month: Python (starts August 15th, 2016). We’re opening the course to only 100 students in this premium course. Sign up fast before all the spots are filled!

Enroll in Python now and save 10%! →

Swift Tutorial: Optionals for Beginners

Swift Optionals

Optionals are a powerful feature of the Swift programming language, but they can be difficult to understand and use effectively. Let’s review the essentials.

At a high level, what are Optionals?

Let’s say a mutual friend is throwing a Halloween party. The invitation outlines the pertinent details (e.g. time and location) and among other things it says, “bring a beverage, costumes optional.” Now if we wanted to represent this party and its guests in code, we might create a Party object and a Guest object, and we might translate the above details into properties on these classes. However, in order to accurately represent this Halloween party we want to express the fact that costumes are optional. We do this like so:

class Party{var time: NSDatevar location: CGPointvar guests: Array // …} class Guest {var beverage: String // Each guest must have a beveragevar costume: String? // Each guest can choose to come in costume or plain clothes (i.e. costumes optional)// …}

view rawswift-optionals-1.swift hosted with ❤ by GitHub

In Swift, the ? is how we designate a variable as Optional. And this just means that it’s okay for the variable to have a value costume = "Frankenstein" or to not have a value costume = nil. In contrast, every guest must have a beverage, this is expressed by the absence of a ?, and the compiler will enforce this for us.

A little background

Optionals work in tandem with variables. A variable is a construct that we use to hold onto a piece of data. At a minimum we usually give a variable a name, type and value.

// Here we explicitly specify the typevar beverage: String = “Leffe” // But the type can also be inferred from the fact that we’re assigning it a String valuevar name = “Leffe”

view rawswift-optionals-2.swift hosted with ❤ by GitHub

vars and lets

Swift offers us two distinctly different kinds of variables: vars and lets. In order to understand Optionals we must first understand vars and lets.

The primary distinction between vars and lets is that vars are mutable and lets are immutable. In other words, we can change the value of a var as many times as we want, but once we set the value of a let, we can never change it. Let’s look at some examples.

// varsvar mutableBeverage = “Leffe”println(mutableBeverage) // “Leffe”mutableBeverage = “Bud”println(mutableBeverage) // “Bud”mutableBeverage = mutableBeverage + “weiser”println(mutableBeverage) // “Budweiser”// letslet immutableBeverage = “Bud”println(immutableBeverage) // “Bud”immutableBeverage = “Leffe” // Compiler errorimmutableBeverage = immutableBeverage + “weiser” // Compiler error

view rawswift-optionals-3.swift hosted with ❤ by GitHub

Test these out in a Swift Playground and you’ll see that the compiler enforces these mutability rules for us. And in doing so it forces us to be explicit about our intentions. If we used vars alone we’d be wandering into a lawless land. Mad Max territory. Variables that we intend to be immutable might unintentionally be mutated. But in this day and age we can elect to use vars and lets where appropriate, and proceed with confidence.

Something and Nothing

Optionals add a layer of complexity to vars and lets. They modify vars and lets to make a distinction between variables whose value can be either something or nothing, and variables whose value can be something but never nothing. In the context of Swift, nothing is expressed with nil, the absence of a value. Let’s look at some examples.

// Non-optional varsvar mutableBeverage = “Leffe”println(mutableBeverage) // “Leffe”mutableBeverage = “Bud”println(mutableBeverage) // “Bud”mutableBeverage = mutableBeverage + “weiser”println(mutableBeverage) // “Budweiser”mutableBeverage = nil // Compiler error// Optional varsvar mutableCostume: String? = “Dracula”println(mutableCostume) // Optional(“Dracula”)mutableCostume = “Frankenstein”println(mutableCostume) // Optional(“Frankenstein”)mutableCostume = “Bride of “ + mutableCostume!println(mutableCostume) // Optional(“Bride of Frankenstein”)mutableCostume = nil // nil// Non-optional letslet immutableBeverage = “Bud”println(immutableBeverage) // “Bud”immutableBeverage = “Leffe” // Compiler errorimmutableBeverage = immutableBeverage + “weiser” // Compiler errorimmutableBeverage = nil // Compiler error// Optional letslet immutableCostume: String? = “Dracula”println(immutableCostume) // Optional(“Dracula”)immutableCostume = “Frankenstein” // Compiler errorimmutableCostume = “Bride of “ + immutableName! // Compiler errorimmutableCostume = nil // Compiler errorlet anotherCostume: String? = nil println(anotherCostume) // nil

view rawswift-optionals-4.swift hosted with ❤ by GitHub

Note the addition of a question mark to our variable declaration. The question mark signifies that the variable is an Optional, a variable that can be something (a value) or nothing (nil). Without the question mark these variables can never be nil. Note that declaring a variable as Optional does not effect its mutability. vars remain mutable and letsremain immutable.

Also note the use of an exclamation mark in select locations. The exclamation mark is a heavy-handed way to unwrapi.e. gain access to the value that an optional variable holds.

Unwrapping Optionals

Allowing variables to be either something or nothing injects risk into our programs. If we assume a variable is something and it turns out to be nothing, our program might behave unpredictably or worse yet crash. To mitigate this risk and avoid having to make assumptions, we want to know definitively whether a variable is something or nothing before working with it. Anyone who has worked with Objective-c is familiar with this upfront runtime check.

NSString *costume = @”Dracula”; // …if (costume == nil) {// Do something for this plain clothes guest} else {// Do something else for this costumed guest}

view rawswift-optionals-5.swift hosted with ❤ by GitHub

Swift Optionals allow this check to happen at compile-time. If we attempt to use an optional variable withoutunwrapping it, the compiler will throw an error instructing us to first unwrap the value. Which means that the compiler will never let us use an optional value without first being certain that it is something or nothing.

We can safely unwrap optionals like this:

var costume: String? = “Werewolf”println(costume) // Optional(“Werewolf”)costume = costume + “ dressed as Michael J Fox” // Compiler Errorif let something = costume {// The value is not nil, use it with confidencesomething = something + “ dressed as Michael J Fox”println(something) // “Werewolf dressed as Michael J Fox”} else {// The value is nil}

view rawswift-optionals-6.swift hosted with ❤ by GitHub

A heavy-handed way to unwrap an optional is to make use of the exclamation mark. This is called force unwrapping:

var costume: String? = “Werewolf”println(costume) // Optional(“Werewolf”)costume = costume! + “ dressed as Michael J Fox” println(costume) // Optional(“Werewolf dressed as Michael J Fox”)

view rawswift-optionals-7.swift hosted with ❤ by GitHub

The former is greatly preferred to the latter. By force unwrapping the optional we’re asserting that we’re positive the variable is not nil. But if we’re wrong our program will crash. Force unwrapping puts the onus back on us humans to keep track of what is nil and what is not, and in doing so brings all of the risk and assumptions back into our code.

Optionals in Practice

So when do we use Optionals? We use Optionals when a nil value is meaningful.

Consider the case of a model object in our iOS app that represents a video on our server. If the video’s image_urlproperty is non-nil we know it has a thumbnail image that we can use. And if it’s nil we know it doesn’t.

Or consider the case of an NSError object passed as an argument to a network call’s completion handler. Not every network call will return an error, so it makes sense for this error object to be Optional.

On the other hand, our program might make use of a Person object. And it might require that every Person have anage. In this scenario age would be non-optional, passed into the Person constructor and never allowed to be nil.

In Summary

In Swift, we have four different kinds of variables at our disposal:

  • vars (mutable, never nil)
  • Optional vars (mutable, nilable)
  • lets (immutable, never nil)
  • Optional lets (immutable, nilable)

This simple toolset empowers us to write clearer code and more stable programs. And it allows the compiler to be a better partner in helping us achieve these goals.

Coding Challenge: 3 Ways to Make Sure You Finish Every Course You Start

Listen, I’ll be the first to admit I can be incredibly lazy.

If you give me five minutes to finish a project, I’ll do it in exactly five minutes.

But if you give me five months to finish the same project, I’ll take the full five months!

I’m not alone in this. Most people are not self-starters for everything they do. But people do finish certain things. Most people finish high school. Most people finish college classes. But other things we don’t finish.

Why is that? These are things that can get challenging at times, and make you wanna go:

However… I believe I’ve identified the reason for most people finishing. It’s these three things:

Social Pressure
+
Financial Pressure
+
Super Clear Goals

If you have these three things in place, there’s an enormously large chance you will finish something.

For example, if you were enrolled in some college classes, here’s the breakdown of what keeps you going:

Social Pressure:

You are EXPECTED to finish the class because your parents, your professor, your friends all expect you to. It would be embarrassing and sort of shameful to not finish. So even when things get tough, you don’t just quit… you push through.

Financial Pressure:

Someone is paying for this! Maybe it’s your parents, maybe it’s you… but someone is shelling out money for you to learn, so you have to make sure you get your value out of it. People value things far more when they pay for them.

Super Clear Goals:

This one is a huge. By simply having an exact start date, check in times, and end date… you are far more likely to finish something.

In a college class the professor will tell you:

  • WHEN the first day of class is, and the exact time.
  • WHEN the quiz is.
  • WHEN the test is, and when it takes place.
  • WHEN the final exam is, and when it takes place.

These are all super clear goals you need to hit, or else suffer in some way.

However when people undertake something like One Month Rails, they make no specific end dates, forget to add in accountability, and maybe let it slide for a while. Meaning they don’t have all three elements for completion:

  • Social Pressure
  • Financial Pressure
  • Super Clear Goals

Without these three elements, most people won’t get things done! And if your goal is to learn rails, then you need to set yourself up for success.

So how does this help us learn from One Month?

Well, I originally started One Month Rails with no luck. I actually got to Video 2 then stopped because I had other stuff happening.

(In my real life I teach people how to become copywriters, which means I’m by no means a natural coder. It also means I’ve got TONS OF OTHER THINGS that constantly require my attention.)

You probably do too.

So when I get stuck on a video explaining how to upload to GitHub, or push to Heroku, and something goes wrong… I’d immediately give up!

So let’s apply these three factors for success and create our own Coding Challenge!

This is something fun you can do with your friends — here’s how you can create your own coding challenge!

1: Social Pressure

To create social pressure you need to involve some friends. This means you can go to Facebook and type it in real quick that you want to do a Coding Challenge, like this:

You can invite people from your school, family members, blog readers, whoever. I invited my friends and email list from my copywriting business. I got a total of 29 people who signed up.

Because of those 29 people, I now felt socially pressured to finish the course on time.

I also linked them to a Google Spreadsheet where they could enter their name and track daily progress like this:

So now there’s a tracking chart we can all use to publicly keep each other accountable.

The next step was communicating with each other, which was simply done through a free Slack chat group. It was pretty simple, and people could ask questions or publicly rouse each other if we were falling behind (people were cool with it).

2: FINANCIAL PRESSURE

The financial pressure comes from when people signup to One Month Rails. Of course you have to pay some money, so you now have skin in the game!

People grumble and moan about paying for stuff… but people value things far more when they pay for them.

One of the crazy things about this challenge was that I sent people who joined a referral link from One Month. You can signup for the referral program here: http://refer.onemonth.com

I actually made over $1,000 from the people I signed up! That was a bonus side-effect of the challenge ($1,082 to be precise):

I also charged people from my email list $100 to join the challenge. This resulted in more extra income (29 people X $100 = $2,900).

Making money was never an intent for this challenge, but it sure was a nice little bonus.

3: SUPER CLEAR GOALS

I looked at the One Month Rails schedule, and realized it was exactly 30 days.

So I set the date of the challenge as April 1st — April 30th. Exactly 30 days.

I decided that dedicating just one hour a day to learning Ruby On Rails would be doable. In fact it ended up being less than that, because some of the lessons can be completed in a few minutes.

So now everything was in place!

Social Pressure : Friends and others had joined the challenge. We had a tracking document. We had a chat group.

+

Financial Pressure : Everyone paid for One Month Rails.

+

Super Clear Goals: The starting date would be April 1st. The ending date would be April 30th.

And guess what… I ACTUALLY FINISHED IT ON APRIL 30th!!!

I had successfully built an app called NevTrest (like Pintrest) that actually worked! You can even upload Pins and Photos and Descriptions.

Even though it was pretty basic, I was immensely proud 🙂

And of course a lot of the people who did The Coding Challenge with me finished the course too. Check out one of the members emails to me after:

Hi Neville,

I got through the Coding Challenge last month. Thanks for putting it together. I’d been meaning to learn RoR for some time, but until the Challenge I kept putting it off. While I’m no expert yet, I feel like last month gave me a good foundation. Thanks again. — John Y.

Anyhow, I sincerely hope you take this advice to try and form your own Coding Challenge with your friends.

I sincerely think with the right mixture of Social Pressure, Financial Pressure, and Super Clear Goals you will set yourself up for success with One Month!

What is Web Security?

Key Takeaways

Web security means protecting your website from hackers before it gets broken into.

If you’re a web security expert, you have the following skills:

  • You know how to code.
  • Can review your code for vulnerabilities.
  • You help fix the vulnerabilities you find.

How to Learn Web Security Today

  1. Read about OWASP. It stands for Open Web Application Security Project, and they’re an international nonprofit that puts out lots of documentation, events, news, and web security projects — all in an effort to improve software security across the world. Start here: https://www.owasp.org/index.php/Main_Page (15 minutes).
  2. Read the OWASP Top 10 Vulnerabilities. This is a dense read. Here’s how to succeed in 5 minutes: browse through the list, and read it aloud. Think of it as jumping in over your head! This will plant a seed for getting you on the right path. Start here: https://www.owasp.org/index.php/OWASP_Top_Ten_Cheat_Sheet (5 minutes).
  3. One Month Web Security — By the end of One Month Web Security, you will be able to review your own applications for security issues and ensure the code is properly hardened against malicious attacks. You will also be able to design new applications with security in mind, significantly lowering the risk and cost associated with deploying new applications.