LATEST ENTRY

INTERNET | Noah Brier

Making Stuff Online

A few basics I've picked up in the last few months of building websites.

April 25, 2008 | RSS | EMAIL | PRINT | 3 COMMENTS

I've been spending a lot of time learning PHP/MySQL lately (which is part of the reason I haven't been blogging all that much). I've managed to teach myself to be somewhat proficient with the stuff fairly quickly and I thought maybe it would be fun to share a few tips to getting started. I'm sure many aren't that interested in learning this stuff, but for those that are, I hope these will help get you over the hump and give it a try.

So, here are a few things you need to know/understand (and if you understand this stuff better than I do, please feel free to correct me).

Databases

They're basically just big excel spreadsheets. Each table is the equivalent of a sheet in excel. Your goal with a database is to not have a lot of empty cells, so it's important to separate related data into different tables. For instance, on a blogging platform, you need to separate out comments and entries into different tables. That's because different entries can and likely will have different amounts of comments. Therefore, if one gets 100 comments and another gets 3, you'd still need to have 100 columns for comments and on the second entry you'd have 97 empty spaces. Make sense?

GET/POST

This is basically how you pass stuff from one webpage to another. When you click a submit button on a form it is likely doing one of these two actions (I actually don't think it can do anything else). They're both fairly simple: GET puts whatever you filled in the form in the URL (do a google search and take a look at the location bar) and POST passes the variables invisibly (and according to this page should be used if you're doing something like inserting the variables into a database or sending an email because GET is easy to mess with).

Moving Stuff to and From Databases

To do pretty much everything I've needed to do thus far I've only needed a handful of database commands. SELECT grabs stuff from your database. INSERT puts stuff in your database. DELETE (which I've used far less frequently), delete's from the database (surprising huh?). Within those commands you just use WHERE to define the parameters for what row or rows you want to grab (for instance, grab the first name and email for the user with the last name "Brier").

APIs

This is one of those things lots of people talk about, but few actually understand how they actually work (and I can't claim to be an expert by any means). Most APIs work by passing them a URL with the data you want in the syntax they've defined. They then give you back whatever data you requested (most of the time in XML which you then need to parse). Using Google Maps as an example, they make it super simple to get the latitude and longitude for an address (and you can actually try this without knowing any code at all by signing up for a Google Maps API key for free.

So essentially you need to construct a URL with the address and your API key. It works something like this: http://maps.google.com/maps/geo?q=INSERT ADDRESS HERE WITH +'s INSTEAD OF SPACES&output=DEFINE OUTPUT, IN MY CASE I'M USING CSV (COMMA SEPERATED VALUES)&key=YOUR UNIQUE API KEY. They then return a CSV file with 4 values, the latitude, longitude and two other things I can't remember (I think zip is one of them). With varying degrees of complexity that's basically how all the APIs I've experiences work.

So, I hope this is somewhat useful/interesting. Part of what inspired me to write this was a quote I read last night in a little book from Electric Artists (who celebrated their 10th anniversary last night): "If you can't explain it simply, you don't understand it well enough." That nugget comes from Albert Einstein and I couldn't agree more. Obviously there's lots more to it (I haven't really even touched on PHP), but these are a few mental hurdles I had before I got started. Hopefully it inspires a few people to give PHP (or some other web language) a shot. It's really good fun.

CLICK HERE TO COMMENT

PREVIOUS ENTRIES

CULTURE | Noah Brier

Me on Identity

Reprinting an interview I recently did on the role of identity in the internet age.

April 14, 2008 | EMAIL | PRINT | 5 COMMENTS

RANDOM | Noah Brier

Brain Candy

A couple different things that have been floating around in my brain.

March 28, 2008 | EMAIL | PRINT | 4 COMMENTS

LIFE | Noah Brier

Pre-PSFK Drinks

An invitation to get some drinks next Wednesday, March 26.

March 20, 2008 | EMAIL | PRINT | 3 COMMENTS

MARKETING | Noah Brier

Scalable Brands

How brands tap into exponential growth.

March 18, 2008 | EMAIL | PRINT | 5 COMMENTS

MARKETING | Noah Brier

Brand vs. Utility

A presentation on brand versus utility that I gave a few weeks ago.

March 12, 2008 | EMAIL | PRINT | 8 COMMENTS

POSTMODERNISM | Noah Brier

Quotable

A bunch of quotes roughly about non-linearity presented linearly.

March 4, 2008 | EMAIL | PRINT | 9 COMMENTS

MARKETING | Noah Brier

Brands in a World of Costless Interaction

Trying something new online is never more than a click away. How does this change the role of brand?

February 25, 2008 | EMAIL | PRINT | 7 COMMENTS

LIFE | Noah Brier

Playing Catch Up

Just some random thoughts and excuses for why I haven't posted in a while.

February 14, 2008 | EMAIL | PRINT | 3 COMMENTS

QUICKIES: LINKS, TWITTERS, PHOTOS, VIDEOS, ETC.

 SUGGEST A LINK

Larry Page and Naivete

My favorite part of this Fortune interview with Google's Larry Page are his comments on new energy sources: "We've been looking a little at geothermal power. And you start thinking about it, and you say, Well, a couple of miles under this spot or almost any other place in the world, it's pretty darn hot. How hard should it be to dig a really deep hole? We've been drilling for a long time, mostly for oil - and oil's expensive. If you want to move heat around, you need bigger holes. The technology just hasn't been developed for extracting heat. I imagine there's pretty good odds that's possible."

"How hard should it be to dig a really deep hole?" Exactly.

Tags: innovation // 05. 6.08

Backronym

In doing a bit of research for Holy Crap! Facts about whether or not the word "tip" was actually an acronym for "to insure promptness" (it is not), I ran across the word backronym. The word is defined on Wikipedia as "a phrase that is constructed 'after the fact' from a previously existing word or abbreviation, the abbreviation being an initialism or an acronym." I thought that was pretty cool. Wikipedia also has a short list of backronyms.

Tags: language // COMMENTS OPEN (0)

You got a problem with that?

I usually end up deciding to write about something after noticing I've brought it up in conversation two or three times. As is the case with this article from Smithsonian Magazine on what makes New Yorkers who they are. Amongst other theories for why we are the way we are, it's suggested that "the special difficulties of life in New York—the small apartments, the struggle for a seat on the bus or a table at a restaurant—seem to breed a sense of common cause. When New Yorkers see a stranger, they don't think, "I don't know you." They think, "I know you. I know your problems—they're the same as mine—and furthermore we have the same handbag." So that's how they treat you."

via Anil Dash // Tags: culture, nyc // COMMENTS OPEN (0)

Recycled Plastic Bag Art

I was just out in Portland for work and while there I met Laura who showed me her bags and other case type things made of recycled plastic bags. It's pretty awesome stuff and very much reminds me of Freitag. She gave me a sneak peak of her new design for a laptop case, which was awesome and I'm planning to get as soon as it's ready to go. Go buy stuff from her shop on Etsy.

Tags: art, green, shopping // COMMENTS OPEN (0)

10 Things I Learned from Mental Detox Week

Iain took part in Adbusters' Mental Detox Week and now he's gone ahead and written up what he learned from the experience. Some real nuggets in there, I especially liked what he had to say about the "fractalisation of stuff": "The web allows you to fractalise everything. I read a few different books. But instead of doing what I’d normally do and keep leaving the book to go and look something up. I made little notes and just kept on reading."

Tags: analog, culture, technology // COMMENTS OPEN (0)

How football explains economics

A group of economists in England used a football betting market to help them understand the speed markets digest information. They found it to be efficient, with betters reacting to goals immediately (which they showed by looking at bets after goals that happen right before before halftime and the resulting movement, or lack thereof, during the break). While they admit it's not a perfect test, "Still, the old adage that one should buy on the rumour and sell on the news seems vindicated; new information is incorporated into prices too quickly to allow most traders the opportunity to profit."

Tags: economics, sports // 04.30.08

If Microsoft goes fully hostile on Yahoo

Marc Andreessen asked some of his friends who do this type of stuff to explain exactly how a Microsoft/Yahoo! hostile takeover attempt might play out. It's a great and detailed explanation of how things might play out over the next few months.

Tags: business, finance, microsoft, yahoo // 04.29.08

For All You Do, Bud, This Blog Is About You

Wall Street Journal story on Miller's Brew Blog, which is written by an ex-AdAge staffer and writes about the beer industry. The site is apparently not afraid of going on the offensive towards Anheuser-Busch and has scooped a few stories to date (which have been spun quite favorably in Miller's direction). The site is completely transparent (says "brought to you by the Miller Brewing Co." at the top) and has apparently upset the trade press who see it as serious competition (pretty amazing to think of trade press coming from a company involved in the trade).

My favorite quote from the WSJ piece: '"They are trying to aggressively go around the gatekeepers' in newsrooms and the trade press, says Stephen Quigley, an associate professor of public relations at Boston University. 'It's something you couldn't do five years ago," before the proliferation of blogs.'"

via Waxy.org // Tags: beer, blogs, business, media // COMMENTS OPEN (0)

All Three Candidates on WWE

Looks like last week all three presidential candidates were on WWE Monday Night Raw. How crazy is that? From the article (which has accompanying video of each candidates message): "Each candidate taped a special message for last Monday’s episode of 'W.W.E. Raw,' ... In their best mock-wrestler voices, Hillary Rodham Clinton renamed herself Hill-Rod, John McCain renamed his fans the McCainiacs, and Barack Obama played off the familiar tag line of a W.W.E. star, the Rock: 'Do you smell what Barack is cooking?'"

Tags: culture, politics, television // COMMENTS OPEN (0)

Gin, Television, and Social Surplus

There are a number of gems is this speech from Clay Shirky (in essay form). Two "aha" moments for me:

"No one who works in TV gets to ask that question [where do people find the time to edit Wikipedia]. You know where the time comes from. It comes from the cognitive surplus you've been masking for 50 years." (People watching a little less TV leaves a whole lot of time.)

"This information may or may not exist some place in society, but it's actually easier for me to try to rebuild it from scratch than to try and get it from the authorities who might have it now." (This is one of those things I'm pretty sure is hugely important but can't yet articulate.)

via blackbeltjones // Tags: culture, internet // 04.26.08

Strutting Season

Outstanding Washington Post article about New Jersey guidos from 2003 featuring none other than the guy who runs NJGuido.com. This sums it all up pretty nicely: "The guido ethos is showy, it bumps shoulders and yells. It is a hey-baby culture, in which the men are macho and the women wear spandex. When cruising in cars -- a popular pastime -- guidos like loud dance music and loud-looking girls. When they walk, they thrust their shoulders back and take over sidewalks."

Tags: culture, guido, newjersey // COMMENTS OPEN (0)

Beer Menus

I'm always up for supporting a friend's project (especially when it involves beer). With that said, check out Eric's long-awaited Beer Menus, already sporting 164 NYC beer menus and 1,210 total beers. The idea is pretty simple: You choose an area or a beer and it tells you where to find it. Here's my personal favorite (though not really because of the beer).

Tags: beer, nyc // 04.24.08