As I've progressed in my learning of web development, I've noticed that many fellow developers (inside and outside of Flatiron) use Sublime Text as their text editor of choice. In fact, Sublime Text is the editor recommended by Flatiron to incoming students. I've used Sublime Text, and it's great — it has tons of useful keyboard shortcuts, supports multiple selections, integrates with Git, and is extensible via the Sublime API.

While these are all great things, one thing about Sublime Text is decidedly not great: keep using it for a while, and it won't be long before you're greeted with this:

This dialog box appears every once in a while after saving. While I don't begrudge the developers of Sublime Text wanting to be paid for their hard work, as a student I'm not exactly flush with cash, so the $70 asking price to make the box go away is a bit steep.

Fortunately, there is a fine alternative that is totally free: Atom. Many of the features that exist in Sublime Text are also present in Atom — in fact, I've yet to come across a feature in Sublime that doesn't also exist in Atom.

One huge advantage that Atom has is that just over one year ago, GitHub decided to make Atom an open source project. In that time, Atom has made huge strides — and it hasn't even hit 1.0 yet. It's also endlessly customizable with packages and themes… check out this theme that makes you look like a 1337 h4x0r.

For some perspective: the last time I was taking a part-time programming course (in 2013), Atom didn't yet exist. (I used TextWrangler at the time.)

So far, my only complaint with Atom is that it takes longer to load, but I have no doubt that its performance will improve with time. If you want a powerful text editor but don't have $70 burning a hole in your pocket, give Atom a try — you will love it!

AuthorIan Valentine

One of the main reasons I love the web is that there are so many apps that work in conjunction with one another. In recent years, entire ecosystems of apps have sprouted up that work with Facebook and Twitter — some simply use them for authentication, while many others use your data from these services to customize your experience.

In the past, this meant that if you wanted to use your Facebook or Twitter account with a third-party app, you would need to provide your Facebook or Twitter username and password to these services. From a security standpoint, this is risky — with your password, any person (or any app) has full access to your account and can do whatever it wants, including changing your associated e-mail address and password, thereby locking you out of your account.

To solve this problem and make it easy to securely use third-party apps with services like Facebook and Twitter (and many others), a group of engineers created OAuthRather than give a third-party app your Twitter username and password (for example), OAuth allows the third-party app to redirect you to Twitter, where you can log in and grant permission for the third-party app to perform a limited set of actions and/or access a limited set of information. If you've ever connected a third-party app to your Twitter account, you've used OAuth — likely without even knowing it.

Eran Hammer's guide to OAuth 1.0 describes it as the "valet key for the Web," which I find to be a perfect metaphor. Rather than give the valet your regular car key, which allows full access to all areas of the car, you can provide a valet key which permits entry into the car but allows the trunk and glove box to remain secure.

Another benefit of OAuth is that if a third-party app you've authorized does something you don't like, you can easily revoke that app's access to your account — or even just revoke specific permissions — without having to change your password.

For these reasons (and many others!), OAuth is an excellent way for developers to work with a long list of services. In my next post, I'll explore OAuth in more depth.

AuthorIan Valentine

In the three weeks I've completed so far of the Web Development Immersive course at the Flatiron School, I've learned a lot. I've worked with the command line, Git, Ruby, and SQL — just a few of the many languages, systems, and tools developers use to accomplish their work. Among all of these, one stands out as singularly useful and powerful: regular expressions.

Regular expressions are a sequence of characters that denote a pattern to be searched for within a block of text. When you need to find some text that matches some known criteria, but don't know what the actual words themselves are, regular expressions are a great tool to use.

For example, let's say you needed to find every instance of a person's first and last name within the following block of text:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque varius risus quis nibh placerat, nec interdum quam varius. Nam ut laoreet turpis, sit amet pulvinar elit. Quisque posuere rutrum tortor, at maximus elit consequat quis. Duis non nisl in arcu commodo tempus. Sed vehicula varius dolor sed venenatis. Sed id urna eget massa Steve Jobs sodales efficitur. Suspendisse nisi lacus, varius id fringilla a, commodo ut libero. Nulla vestibulum aliquam eros eget vestibulum. Nullam et lobortis dui. Cras tempor lorem tempor massa tincidunt pharetra. Nunc viverra tempor eros non interdum. Aliquam erat volutpat. Vestibulum eu magna blandit, facilisis Bill Gates purus at, viverra erat. Donec viverra pulvinar arcu. Ut dolor augue, porttitor eu lacinia nec, aliquet sed leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

Vestibulum auctor molestie neque, maximus lacinia mauris euismod cursus. Duis quis turpis fringilla, scelerisque leo ac, tincidunt lacus. Vestibulum semper fermentum est, quis ultrices metus fringilla vel. Morbi laoreet pretium luctus. Pellentesque turpis sem, dignissim bibendum Jeff Bezos elit sit amet, lobortis vehicula nunc. Cras quis nisl a nulla mattis pellentesque sit amet nec urna. Suspendisse in magna non erat vestibulum feugiat. Quisque tristique dui sit amet dui vehicula, sit amet iaculis lacus tempor.

Not so easy, is it?

Now, imagine that the text you have to search through is long enough to fill an entire book. You're a busy person, so you don't have the time to read through an entire book just to find every instance of a person's name. Besides, even if you were to do that, you might miss more than a few names along the way. Luckily, regular expressions make it simple to find just what we're looking for — even when it's buried in mounds of text.

To find a person's first and last name, we can use the following regular expression:


In English, this translates to "a capital letter followed by any number of word characters, a space, a capital letter, and any number of word characters."

Try pasting the text and regular expression above into Rubular, and what do we get?

Steve Jobs, Bill Gates, Jeff Bezos


This example is pretty simple, but regular expressions are useful in a wide variety of situations — one common application is to check that the text entered in the "e-mail address" field on a form is, in fact, a valid e-mail address. Another useful application is for validating dates.

The most useful sites I've come across for learning about and testing regular expressions are RegExr and Rubular — give them a try, and the next time you need to find a needle in a haystack, you can use your newfound skills to save the day!

AuthorIan Valentine