Pedalpalooza Edible Garden and Urban Farm Tour

If you live in Portland and own a bike you've probably heard of pedalpalooza. If not your missing out on a two week long event with hundreds of individual rides for all age groups and types of bikers. From the world naked bike ride to tall bike jousting and quiet rides through the country there is a lot going on. On Saturday I joined up with the permaculture ride. I think it was a big success. About 50 or so people showed up at the first house. In fact there were so many of us that we decided to break up into smaller groups because was no way to fit us all in a garden at once.

Meeting up for the ride.

The first garden features lots of shady fruit trees. The rest of the yard has nice little sections of plants alternating with open space and places to sit.

A lovely shady, sustainable yard.

This house also features a great chicken coop with a nifty little door to get to the eggs from the outside.

Hot egg laying action.

From there we headed out  20 at a time to the next house. This house is in Laurelhurst and just 4 years earlier had a standard grass lawn.  But the owner felt inspired to kill every inch of grass and replace it a really nice permacultured landscape.  There are little berms around each planting and rain barrels (a total of 10!) to collect water for irrigation.  She also showed off her composting toilet system.  Given how new the garden is it looks really good.

Showing off the garden

Next up we visited a pair of urban farming households in NE Portland with adjoining lots. They seem to share a sense of what a garden should be. Both have large plantings of edible native plants and share as much as they can with the community.

Lots of tall green plants

Going to the next house

The last stop was another house in NE that comes complete with a taste test of some home made goodies. There were pickles, lavender meade, blackberry wine and sparkling pear apple cider.

It's not Portland without alcohol.

It was a great way to end an afternoon getting inspired to plant more and be more sustainable. See the rest of my photos from the event on flickr.

Posted in Pacific NW | Tagged , , | 2 Comments

Hello (Electrical) World!

A long time ago I was thinking of getting together enough stuff to start building my own electrical devices. Somewhere along the way that idea got derailed. But unlike some of my other hairbrain schemes, this one really stuck in my head. I kept thinking that eventually I would get back to it, now it seems that I actually have. Every once and a while over the last year I would buy a piece of electrical equipment if I happened across it. It seemed weird at the time because I didn't have a project in mind or even enough pieces to do anything. But I knew the eventually it would be useful. Sure enough as of tonight I have all the pieces to light up an LED!

My evil scientist lab

Funny enough the last thing was just some solder. I had an wires and plugs laying around, and even a nice bench power supply. But no way to connect them together. So once I had power and wires I hooked up a pirated LED from a cheap light up wand (often sold to kids at carnivals). And there you have it: a simple circuit. Welcome to the exciting world of electricity!

Posted in Crafts | Tagged , | Leave a comment

Some Basic CSS

Anyone who at some point has had to build or edit a web page has probably at least heard of CSS. What is it exactly? It's a markup language that is used to define how to display HTML elements on a web page. It has become the dominate way to control the colors fonts and layout of a web page.

Why does everyone like CSS? It lets you separate the presentation part of a web page (color, typography, etc.) from the content. That way if you want to re-style a site you only have to change the CSS—in one place—and not the whole site.

But I'm sure you already knew all that. How does one go about actually using it? First you have to understand just a little bit about the basic structure of the language.

Basics

CSS lets you use something called selectors to select pieces of the HTML and style them. For instance if you have a page with one div and inside that one p. In the CSS you can add style to just the div and or just the p. You do this by simply starting a line of CSS with the name of the element, let's say p, then all of the style for that selector goes in between a set of curly braces.

Ex. 1, Hello World

p {
    color: red;
}

Now everything on your page in a p will have have a red text color. But you can select with a far more granular level of control than just element type. Remember that the code above will effect every p tag on the entire page! Instead we want to use logical names and some hierarchy rules.

Luckily this is pretty easy to do. Just about every element in HTML has optional attributes called id and class. If you set give an element an id then you can refer to that id in the CSS and control just that one element. Same with class. The difference between class and id is that according to the HTML spec you are only allowed one element with a particular id. Conversely you can reuse a class on as many elements as you want.

To handle hierarchy you just write out the selectors in the order that they appear on the page.

Ex. 2, Advanced Selectors

/*Style for every p on the page*/
p {
    color: red;
}
 
/*Style for an element with the id "foo"*/
#foo {
    color: blue;
}
 
/*Style for every element on the page
with the class "bar"*/
.bar {
    color: green;
}
 
/*Style for every p tag inside a div tag*/
div p {
    color: black;
}
 
/*Getting fancy now, style every
p tag inside an element with
class "bar" that is in the
element with an id "foo"*/
#foo .bar p {
    color: white;
}

So what happens when an element is in more than one selector? For instance in the example above how does a p tag that satisfies the last selector get know to be white rather than red (from the first selector)? The answer comes from the 'cascading' part of cascading style sheets. If you have conflicting selectors, but with different properties in them, then the element gets style from both. If both selectors have the same property, but with different values then the most specific one wins. What do I mean?

Ex. 3, Inheritance

p {
    background: #f4c;
    color: #000;
}
 
div p {
    color: #fff;
}
 
#foo {
    color: #ccc;
}

In this case all p's get a background color of #FF44CC and a text color of #000000. But, if there is a p inside a div, this is more specific than just any p. It still retains the background color but gets the text color #FFFFFF. And if a p has an id of "foo" then that is even more specific and so again it keeps the background color but gets the ext color #CCCCCC.

This actually keeps getting more and more complicated with crazy things like pseudo-classes and other advanced ways to get to elements. But the above is enough to get started actually changing things.

Now that you know how to get to a element on a page, what can you do with it? This is where the style part of cascading style sheets comes in. CSS has a number of properties that can be set on any object. In the examples I've already hinted at two of them, background and color. There are many more. In fact rather than list them here check out these handy dandy reference sites:

I highly encourage reading over these once or twice to get an idea of what you can do, but don't think you have to memorize it all! Even processionals occasionally cheat and look at references. One note about colors, if you're not already familiar with the hexadecimal notation for colors and were wondering what all that #fe4563; mess is then read this.

Getting down to business

Instead of all this theory it's best if we just look at some examples and see how to accomplish some common things.

Ex. 4, Add some padding around an element

p {
    padding: 25px;          /*25 pixel padding around the whole object. */
    padding-left: 50px;     /*50 pixel padding on the left of the object. */
    padding: 10px 14px 0 3px;  /*Shorthand: first value is padding on top, then right, bottom then left. */
}
 
p {
    margin: 34px;       /*Works  exactly the same as padding, but things like background color don't apply*/
}

The best way to space out items on a page is to have rules for margin and padding set for everything. The difference between the two is that margin is the spacing outside of the element and padding is the spacing on the inside.

Ex. 5, Make a Border

#one {
    border: 1px solid #fc2;
}
 
#two {
    border-right: 3px dashed #4fc;
}

Borders are super easy.

Ex. 6, Typography

p {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 1.3em;
    line-height: 1.5em;
}

Typography is a tricky thing on the web. There is no guarantee that you're audience's computer has the same font's installed that you do. When you give an element a font-family you should always give it a failover or two. At the very least end it with either 'serif' or 'sans-serif'. Just about every browser understands that. What the browser will do in this example is try to use the Georgia typeface and if that is not installed it will use Times New Roman, and if that is not installed it will use Times, and if none of those are installed then it will use the default serif font for the users computer.

Actually when it comes to typography on the web there are a lot of tools out there that will write CSS for you. Two good ones to look at are Typetester and Typeograph. These tools with let you choose what you want the type to look like and the give you the CSS to accomplish that goal. Also Portland's own @brampitoyo gave a talk a while back that was a great introduction to typesetting for blogs. Some of the slides have CSS examples on them.

Ex. 7, Hide Something

p {
    display: none;
}

This will effectively remove the element from the page. It's won't show and other elements on the page will try and take it's place. If you just want it to be hidden but not totally gone use 'visibility: hidden;' instead.

Ex. 8, Image as Backgrounds

p {
    background: #fff url('image/image.png') top left no-repeat;
}

Instead of just a color you can include an image as the background of an element. You can control where the image is positioned in the element ('top left') and whether or not it repeats (no-repeat, repeat-x, repeat-y or repeat-xy).

Again all this detail cab be found in reference sites and books.

Practical Advice

It took me an awfully long time to get to this point, but now that we are all on the same page, here is my advice for actually doing something with a design in the real world.

When you have an existing page that is mostly laid out, say a Wordpress theme, then you don't need to be able to start from scratch and build up all kinds of fancy rules for every type of thing on your page. But you might want to adjust it a little. Maybe you want to change the font or a background color. This is actually very easy these days. There is a really fine tool that comes as a plugin for Firefox called Firebug. If you don't have Firefox or some derivative of it, you should just take this opportunity to download it. Then go to the firebug site and install the plugin. What firebug does is allow you to see in real time the style of every element on the page. You can even change it on the page and see what effect it will have in real time. It also has a JavaScript debugger and several other advanced features.

Specifically once you are on a page then click the Firebug icon in the lower right-hand corder of the browser. Then you can click the 'inspect' button and whatever you click on in the page it will show you the HTML on the left and the CSS on the right that apply to that element.

Firebug icon
The Firebug icon

This will let you see what CSS has already been applied and which parts are overridden by which other parts. Any line of CSS in the right-hand window has a cross out icon when you hover over it. Clicking this will allow you to temporarily hide that line of CSS and see what happens to the page. I use this all the time to figure out what exactly the CSS is doing. A word of caution, it might look like a line does nothing, but that probably means that it is a fix for another browser! Also if you double click at the bottom of a set of CSS you can add a new line and type in your custom CSS and watch it update in real time! Note that Firebug does not actually update anything permanently. If you are working on your site you will still need to update the CSS on the server.

Firebug and Wordpress' built in theme editor make is super easy to update you're blog's look and feel. All you have to do is go your blog and open Firebug and use the inspect button to click on the thing you want to change. Look at the CSS it already has. The selector at the top is the most specific and you can see the other selectors that below it. It's safest to just change the top most selector. You can test out changing a value by double clicking it or add a new one by double clicking at the bottom. Once you have the look you are going for navigate to your dashboard and find the theme editor page. Choose "style.css" or whatever appropriate file (it will also say in Firebug) to edit it then find that same bit of CSS you edited in Firebug and write it in and save your changes. Go back to your site and hit refresh. You might have to hold down shift and refresh in case your browser cached the old CSS. Just repeat those steps until your satisfied.

Firebug running
Firebug running

There are some even easier ways to do some common things like change all the colors in a CSS file. CSS Color Editor takes a file (just copy and past it from Wordpress theme editor to notepad) and shows you every color used in that CSS file. Then you tell it what colors you want to replace and it gives you the new CSS file with the new colors. Here is a list of a several more tools that are fun to play with from CSS Orgy.

Pitfalls

Watch out! Not every browser handles the same CSS the same way. Unfortunately there isn't much you can do about this except practice and test your page in every browser you can think of. If you don't actually have all the browsers ever installed you can go to BrowserShots and have them render it for you and they give you screenshots of every combination of browser/OS. It's free the first time ;)

In general one thing to stay away from is depending on the border width to space things, always use margin or padding. Most of the good CSS references will tell you what property is supported in what browser.

You Can do It

It there is one thing you should know it's that you can do it! I figured all this out myself a few years ago in my free time because I was bored and I thought it was cool. You can do it too. The best way to learn is to just get in there and try stuff. Write a simple little HTML page and then play around with the style. Go crazy with it, break it, then learn what does and doesn't work. Also look out for inspiration. There is nothing wrong with looking at other sites that do something well and learning from them. Using firebug you can peak under the hood of every site out there! I always tell CSS newcomers to check out CSS Zen Garden. The site consists on just one page, the home page. But you can use the links on the side to change the look of the site completely. Hundreds of graphic artists have contributed designs over the years. What's amazing is that all of the different designs rely on the exact same HTML! The only thing they changed is the CSS. If you're bored one day just search for "css gallery" and see what comes up.

Good luck!

Posted in Code | Tagged , , , , | 1 Comment

Potatoes are Proof that God Hates Us and Wants Us to be Hungry

Why to potatoes take so long to cook? Really? I'm hungry now. Potatoes are so tantalizing. They are tasty, go great with catchup and are super cheap. But I know that even if I throw them in the oven or a hot pan it's going to be like eight hours before I can eat anything. This bugs me. I feel like a true benevolent God would have made potatoes cook a little faster. Or maybe it's all a test of patience and faith? Oh they mysteries of life...

Posted in Rants | Tagged , | 1 Comment

Conservation of Noodle-Curry

There are many downsides to working in Beaverton and living in Portland. And that's not to say there's anything wrong with living in Portland. The problem lies more with the Beaverton side of things. Maybe I'm a little biased but there isn't much I like about the suburbs. However, there's one thing that "the Tron" has going for it: hole in the wall Thai restaurants. There are two equidistant from my office and are both awesome. Rama Thai on Canyon and Thai Flavor on Scholls Ferry.

I noticed something about these two places though, one has amazing Pad Thai but the curries are lacking in punch. While the other has the best massaman west of the Willamette but their noodles leave something to be desired. After pondering it for a while I realized that I can't remember being at a Thai restaurant where both the noodle dishes and the curries are equally good. This has led me to the conclusion that there cannot be a restaurant that makes really good curries and really good rice noddles. That is to say the noodle curry goodness value must be conserved:

conservation of noodle-curry

Does this mean that all hope is lost for couples who can't decide which Thai place to go to? Perhaps not. I theorize that if two restaurants combined—but while still utilizing separate kitchens and chefs—they could in fact achieve the holy grail of Thai cooking physics, a noodle-curry condensate.

Posted in Food, Pacific NW | Tagged , , , , | Leave a comment

We Need More Seasons

I was walking around last night and noticed that 1.) it got dark much earlier than usual and 2.) it was a bit brisk. Jacket weather even. Finally, fall is here — or at the very least it's beginning in earnest. Needless to say I am stoked about this. Fall is probably my favorite season of the year. I never was a huge fan of summer except for the fact that I didn't have to go to school. Summer is boring. There I said it. I love hiking and biking and all that, but day after day it's hot and sunny. Boring. I general I like cold weather. I like having to bundle up and the chance to show off my cool scarves. But winter tends to go on too long. Spring is probably the worst. Yeah you get flowers and gardens, but in mostly all you get is a few warm days to tease you and a whole bunch of rain.

Fall on the other hand, is the best of both worlds. It's warm during the day and it's fairly dry, but it has all of the excitement of the coming winter built in. Nights get cooler, the sweaters come out of the closet. Dark, malty beers flow and hot tea steams in the mugs of warmth seekers. The trees begin their fiery year end show as they shut down for the winter. While winter is known for being gray, fall is awash with warm glowing color.

I find the most appealing part of it all is the transition. What's really interesting about Fall is it's short and right in between two relatively long seasons. This is why I propose we have new seasons. And not just new names — like “fwinter” — but somehow really change the weather to be different every 2 months. I want a season with snow, a season with fall leaves, a season where flowers bloom on trees only, etc. This way life will never be boring.

But instead I just have to enjoy the fall as much as I can and wait out the winter sitting inside drinking hot chocolate and playing board games. Actually that doesn't sound so bad.

Posted in Rants | Tagged , , | Leave a comment

Paper Craft Fun

Every once and a while I feel crafty. I think this is a perfectly normal thing to feel and I enjoy stretching the brain a little and getting down with some hot glue and scissors. Or maybe even thread and felt. You never know. Once I made a tiny diorama inside a match box at a craft party.

So I was talking to my friend Adam this afternoon about how 8:30 am Scanning Electron Microscopy classes are way to early when he told me I should check out cubecraft. CubeCraft has a bunch of downloadable templates for making cute little figures out of paper. So I decided to make a Bender. Here is how it went together:

I started out by printing out the little guy. Then I cut out all the pieces and started folding.
Cutting out my Bender model

Starting from the ground up
Working from the bottom up.

Putting together the arms
Putting together the arms was a little tricky with my comparatively huge hands.

Torso
I got the Torso done. All that was left was the head.

Completed Bender
Finally I complete the Bender. Actually he turned out looking pretty cool. So cool that I also had to make a Zoidburg too:
Bender and Zoidburg completed

In doing this I came across a bunch of other paper craft sites that had little characters to make. This is what I like about the internet. One little push in the right direction and you can fly down a hill in a whole new genre you never even knew existed before. I am looking forward to perusing more fun little things like this, and who knows I might even design some of my own. Also I'm thinking this is a great idea for a get together. Anyone want to do a paper craft party?

Posted in Crafts | Tagged , , , | 1 Comment

From One Project to Another

Over the last 8 months I have found myself busy with a number of interesting projects and hobbies. One of them has been keeping track of what's new on the web. In doing so I have noticed what a big deal online identity is. Now I realize the real value of a blog is not only exchanging information with the world, but being able to tie back everything you do to one identity. With that in mind I am starting this blog and trying to keep it updated with some of the more interesting things that I work on. Or if it's a slow week, maybe just some opinions on what everyone else is working on.

-Nathan (thats natronics in most places).

Posted in Uncategorized | Leave a comment
  • What I'm Tweeting...

    Powered by Twitter Tools.