Welcome to the bloggy home of Noah Brier. I'm the co-founder of Percolate and general internet tinkerer. This site is about media, culture, technology, and randomness. It's been around since 2004 (I'm pretty sure). Feel free to get in touch. Get in touch.

You can subscribe to this site via RSS (the humanity!) or .

How to Build a Web App (for Non-Programmers)

Last Friday at a conference called Planningness I tried to do something I’ve been thinking about for awhile: Teach a bunch of non-coders how to make things on the internet. I’m not positive how successful it was, but it was fun and I figured I might as well share the presentation, code examples and general story here. (Disclaimer: I’m no programmer myself, so there is a definite possibility some of the stuff in here is incorrect. I did check things with a few programmers beforehand, however, so I’m pretty sure that’s not the case.)

The story goes something like this (if you’ve been hanging around this site : A few years ago I heard about how Microsoft was interested in buying Yahoo! for an insane amount of money ($47 billion I believe). I said to myself, “what the hell is $47 billion? How am I even supposed to comprehend that?” And my self answered, “maybe you should build a site that shows you how many iPhones you could buy with that sort of cash.” (This is a dramatization of the events.) Anyhow, I had played around with WordPress setup and had looked at some PHP and so I figured I’d see if I could do it. I bought a domain and started Googling.

The first important thing to understand is that every web app, more or less, is just a form and a submit button. Think about it. Sometimes that button sends an email, or posts a Tweet, but it’s still the same basic behavior: You capture some user input and do something with it when they hit a button. (Increasingly you capture it before they hit the button, but that’s another lesson).

The first big barrier to understanding how to build this thing was how the hell you actually get something someone types into a form to another page so that you can do something with it. That’s when I discovered HTTP GET. That’s also when I realized that I already understood how GET works. That’s because we are all familiar with it. GET is just a method of passing data between pages by using a URL. Put simple: Every time you call up any page on the web through a browser by typing in a URL you are making a GET call.

But there’s also an even simpler way to explain GET: Go to Google and search for something. Seriously. Search for noah brier and then look at the URL. What you’ll see will look something like this: http://www.google.com/search?source=ig&hl=en&rlz=&q=noah+brier (there may be some other stuff stuck in there as well). If we pull that apart and just focus on the part that matters we get: search?q=noah+brier. That, there, is the key to passing things between pages using GET. Essentially the elements break down like this:

  • search: The page that is processing the data
  • ?: Start of a query string
  • q=: Field name (basically every form element is given a name so that later, when you’re doing stuff with the data, you can easily access it)
  • noah+brier: The query (whatever someone typed into the form field)

Once you understand that basic idea the next big question is how the hell do you get stuff down from the URL? It’s sitting up there and you want to do something with it (whether it’s a little math like How Much Does it Buy? or an incredibly complex operation like searching billions of search records on Google. To do that you need some sort of server-side language. The one I use in my presentation (and for my projects) is PHP. Every language has some simple syntax for getting at the stuff you’ve stored in the URL. In PHP’s case that syntax looks like this:

Where field_name is replaced with whatever you named the field. So if you made a form like this:

Your PHP to grab the person’s name on the page dosomething.php would look like this:

Anyway, I’m just repeating a lot of what’s in there. Give it a try yourself. Go download MAMP or WAMP (which allows you to run PHP/MySQL locally) and start playing. I’ve even put together a little zip file with all the code samples. Have fun.

Oh, and one other important thing: The beauty of the internet is that it’s most abundant resource is information on how to build the internet. Use that. When you want to know how to do something just Google it and try whatever code you get. See what happens. Learn that way. It’s fun, I swear.

October 7, 2010

Comment Equality

A few years ago I moved to a format that put the comments on the right side of the posts. I can’t remember what site inspired me, but I did it because I believed (and still do) that comments on a blog should be equally important to the post they’re commenting on.

Anyway, I mention this because I was happy to read John Borthwick supporting my theory:

Bob [Stein] told me about a test he had run at the Institute for the futureofthebook.  In the test they placed comments on a blog to the right of the posts / articles.  The result was meaningfully more interesting discourse.  The comments werent placed at the bottom, hidden away, like a letter to the editor, they were part of the body of the post.    Think about it this way.  If you took TechCrunch and placed the comments to the right of the posts and let them stream live (most recent first) wouldnt it look like a mirror image of the new Twitter?   Stream on the right — media on the left — Twitter is stream on the left, media on the right. Interesting.

[Via James]

October 4, 2010

House Phone

I keep telling people about how strange it feels to have a land line. Like millions of unhappy AT&T customers I now have to pay an extra $25 a month because my iPhone is so inconsistent in my apartment that I was about ready to lose my mind.

Anyway, I’ve been amazed at what a profound effect on my psyche a couple cordless phones and a Vonage box have had. Mainly, I’ve found it makes me feel married more than just about anything else thus far. (I’ve cleared this post with my wife, so no one should be offended.) What I mean is that there is something about having a communal phone that makes an apartment feel like a home and really makes me feel like I have a family.

Growing up we, like probably all of you, had a land line. Grandma would call the house and while she may have been looking for Dad, she was happy to talk to my sister or myself for a few minutes if we answered the phone. This behavior, obviously, doesn’t happen on a cell phone, where all calls are definitely meant for you. It’s a personal device as opposed to a shared one.

Funnily enough I wrote about just this topic in 2004 for American Demographics in an article about cord cutters:

Historically, the home telephone has been something that signifies a relationship; it is a number shared among a group of people. “The land line for voice purposes is seen as the communal phone. A grandparent calls the house and doesn’t care who in the family they get,” says Mark Page, vice president of management consulting firm A.T. Kearney, which along with Cambridge University released the Mobinet Index 2004, which examines mobile technology trends around the world. “No one has come up with a communal mobile phone yet.” So, young people today are able to create their own identity completely outside the control of their families.

When I published the article 6 percent of households had only a cell phone, in 2008 The New York Times reported that number had risen to 17 percent and earlier this year that number had risen to nearly 25 percent. Obviously we have known about this for awhile, but I found it no less shocking how big it felt to add a “home” number to my cell phone’s favorites list. Funny how new technology can make old technology feel even more important.

October 3, 2010