Don Havey

Sustainably harvested information

Archive for March, 2008

Repurposed architect for hire  

Sometimes people who know that I come from an architectural background ask me, “Are you still unemployed?” To which I respond, “I prefer to consider myself repurposed.”

%41%72%63%68%69%74%65%63%74%75%72%65%20%69%73%20%64%65%61%64%20%61%6E%79%77%61%79%2E%0A

The article has

2 responses

Written by Don

March 28th, 2008 at 6:56 pm

Categories: Etcetera

Tags: ,

Google and Custom 404 Error Pages  

I ran into this problem the other day:

After creating a custom error page handler for Curiobot that redirected users to the home page, I noticed that Google was not pleased. On the webmaster tools interface, Google said something like this:

We’ve detected that your 404 (file not found) error page returns a status of 200 (found successfully) in the header.

Here is what I had inserted into an .htaccess file:

ErrorDocument 404 http://www.curiobot.net/index.php?e=404

That would redirect any lost users to the home page, where an error message would be displayed. The problem was that the index.php page that I was redirecting to throws a status code of 200 (success) by default instead of 404 (error). So if Google didn’t specifically test for this, all URLs pointing to nonexistent pages on your site would look like they still functioned, and therefore be wrongly indexed.

Here’s the solution that I inserted into the index.php page that users are redirected to:

if(isset($_GET["e"])&&intval($_GET["e"])==404){
  header("HTTP/1.1 404 Not Found");
}

This forces PHP to send a 404 status code if a user has been redirected from a nonexistent page.
Hope this helps someone…

The article has

no responses yet

Written by Don

March 26th, 2008 at 11:35 am

Introduction to Processing  

It’s time to get the real content started.

Processing is an open source programming language and environment for people who want to program images, animation, and interactions.

The Processing website states it pretty clearly. Processing is a tool used primarily for visualizing data. It is based on Java, but uses a much simpler syntax, and adds a very powerful set of graphic output tools. I would call it a fourth-generation language (others might say fifth- or sixth-generation): Java is based upon C/C++, which in turn is the offspring of the most ancient and revered ALGOL. My rule of thumb? The more generations the better. Unless you hate sunlight.

The tutorials that you’ll find on this site assume that you have some experience writing code… or at least that you aren’t daunted by the jargon. If you need a primer, the Processing website is the place to look. They have a number of tutorials and a helpful forum.

Let me start by describing Processing in relation to other languages.

Object-Oriented and Procedural

One of the unique characteristics of Processing is that it can be used in an object-oriented or procedural manner. Object-oriented code is generally more flexible and deployable, but procedural code can be much simpler to implement for small scale or calculation-heavy projects. I’m going to assume that you’re ready for object-oriented (abbreviated OO or OOP) solutions, as most of the tutorials I have lined up are fairly complex, and therefore require an object-oriented, class-based approach.

For the sake of comparison, Java is a strict object-oriented language. Actionscript is technically an object-oriented language, but you can think of Flash’s timeline as a way of using Actionscript procedurally. VBScript, Perl, and Fortran are examples of procedural languages.

Strictly Typed

Processing is a strictly typed language. Not “typed” as in keyboard. “Typed” as in “defined as a specific type of variable.” Variables are defined by their type. For example, a number would be defined using either the floating point type (for decimal numbers) or integer type (for integers). Once a variable’s type is set, it cannot be changed. However, values can be cast to a variable of a different type. For example:
int i = 6;  //i is defined as an integer, it must always remain an integer
float f = (float) i;  //the <u>value</u> of i is cast to a float
print("i = "+i+"   f = "+f);  //outputs "i = 6   f = 6.0" (notice the decimal!)

This strict typing system helps avoid compiling errors, but does limit Processing’s ability to deal with objects and arrays. If you’re used to programming with Javascript (not typed at all) or Actionscript (flexibly typed), this will be the hardest thing to get used to.

Inherent 3D Rendering

This is huge. There are two built-in 3D renderers available for use in the Processing environment: OpenGL and P3D. OpenGL tends to be the faster of two, and has more rendering options available. I use P3D only when I need to render lots of 2D text in 3D… which looks better than in OpenGL.

If you’ve ever written your own 3D rendering scripts in Actionscript (or similar), you’ll appreciate the ease with which Processing renders and transforms 3D objects and coordinates. It includes built-in matrix transformation tools for rotating and moving the camera. This aspect of Processing currently has no equal in any other programming language.

Okay. That’s it for the introduction. Next on the agenda is a look at some of the generic classes of mine that I’ll be using in the tutorials to come. Until then…

The article has

no responses yet

Written by Don

March 25th, 2008 at 1:18 pm

N x N (in progress)  

N x N screenshotN x N is a custom portfolio generator (in progress).

The question that motivated the project was: making a portfolio is a theoretically simply task… why do I always hate making one? The answer is: hidden, arduous tasks. Thumbnail cropping, ordering, creating a layout that compliments the projects…. These seem like small jobs but end up making the “quick portfolio” perpetually illusive.

The solution, as I see it, is this: Look to the grid (it will never fail you).

N x N is primarily a dead-simple framework for uploading and displaying images and projects. No fancy tools, just a familiar, form-based, step-by-step process that results in an equally simple, elegant portfolio. Of course, the layouts and general presentation can be customized, but not to the same level that an application such as WordPress can. I think this is a good thing. Standardized results.

The target audience is craftspeople (e.g. Etsians), design school students, and groups of individuals who need to quickly compile a joint design portfolio.

Estimated completion date is mid-April, depending on how some other projects shape up.

The article has

2 responses

Written by Don

March 20th, 2008 at 2:10 pm

Curiobot  

Curiobot screenshotCuriobot is a project created by myself and Angel. Introductions necessary!

Angel is my girlfriend. Has been for a long time. She is very good at making things by hand, and we team up on projects occasionally. I designed the Curiobot website, she manages the content. End of introductions.

The thought behind Curiobot was to create an image gallery of the strangest and most interesting products available online. The type of objects that almost could not exist without the internet’s niche-market-expanding power. It’s an ongoing fascination of mine: the physical objects that the internet generates through encouragement.

I’ll borrow a bit out of Curiobot’s concept statement:

Curiobot aims to be a hybrid website. Not in the environmentally-conscious sense of the word (although we like that too)… more like in the Frankensteinian sense of the word:

We want to be half museum and half garage sale. Half library and half amusement park. Not a blog: they’re too personal and text-based. Not a shopping site: their navigation schemes are static, sales-driven, and bland. We’d rather be explorable… and entertaining, and inspiring, and helpful. We want to make you say “What the hell is that?”, “I wish I had thought of that”, and “Oh my God, I finally found one!” all in the same day. We want to extend the blog mentality to encompass the universal languages of imagery and cool-stuff-for-sale commerce.

[...]

Our unbiased approach to aggregating products is different from general product search sites. There is no external motivation here besides wanting the best of the best and the strangest of the strange. We actually seek out the things that the big search and retail sites do not want. The products that only one person in ten thousand actually buy. The big sites think that this is a bad thing. We know, however, that although only one person in ten thousand buys it, nine out of ten people might still think a product is amazing… they just don’t know where it would fit in their apartment. Think of this site as your fantasy storage closet.

We generate a small amount of revenue through click-through traffic to merchant sites when applicable, but products are admitted to the database regardless of their retailer. We hope that our site will eventually benefit smaller sites and individuals, who are making their own unique imprint on the internet product market, by pulling their products into a more easily accessible realm.

At the moment, we’re moderating all of the products that are added, but at some point in the future, we’d like to let Curiobot loose into the world of mass-contribution websites. Who wouldn’t? I mean, we’re really good at finding unusual stuff on the internet, but we think our talents would pale in comparison to those of a billion people combined.

At its worst, Curiobot is a site that encourages wasteful I-didn’t-know-I-needed-that buying habits and widens the market for obscure and useless goods. At its best, however, it helps dissolve the distinction between useless and useful, and celebrates our need for both.

There you have it. Not too much else to say about the content. I’ll leave you with a few of my favorite items in the gallery: Plush Giant Squid, Lamplamp, Daisy Pen Vase, Stick-On Sunroof, Parent-Child Dance Shoes, Rolling Clock, IV-Drip Plant Pot.

The article has

no responses yet

Written by Don

March 20th, 2008 at 1:40 pm

Categories: Projects

Tags: , , ,

Getting started  

Let me begin with the theme of this blog:

Sustainably harvested information.

I’m interested in the idea of conserving bits. I’m not sure exactly why, but I have a feeling that it stems from my opinion that physical matter and information are nearly one and the same. Therefore, an extension of general (physical) conservation and efficiency would be the conservation of information. The smallest unit of information is the bit.

The early stages of the internet promoted the efficient, sustainable use of information due to the extremely low bandwidths available at the time. Content was succinct. Every bit mattered.

As connection speeds increased, however, so did the spread of redundant, unnecessary information. Examples: mash-ups, mash-ups, mash-ups, via trees, domain parking, hack writing, fluff, spin-offs. There is a theme here. The incredible number of internet users supports redundancy. And to some extent, redundancy is necessary. Imagine every person who ever viewed the Dancing Baby video (remember that?) loading it from the same server. The more adaptive model that has evolved is this: once a particular destination (page, article, media object) reaches a critical number of hits, other sites naturally want to share the traffic; this process repeats until the trend fades.

Some types of redundancy are necessary strictly for structural reasons, like in a power grid. Other types of redundancy improve the original source by appending information or displaying it in a unique context, like in a curated gallery. But some types of redundancy detract from the original source - as in the parasitic examples above - and eventually dissuade that type of source from being generated. The goal of this blog, which will feature my work, thoughts, and tutorials, is to provide only the sustainable type of information.

I’m interested in the fields of interactive media arts, design, architecture, and to some extent, web design and development. The tutorials on this site will mostly revolve around my work in Processing, because it is the least documented of all the languages I program in, and is an easy and addictive way to get interested in electronic art.

Coming soon: Processing introduction, Primary classes, Voronoi diagrams, Icosahedral globe, The Game of Life, Trees made of letters…

Until then!

The article has

no responses yet

Written by Don

March 20th, 2008 at 1:03 pm