<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Foliosus</title>
	<atom:link href="http://www.foliosus.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.foliosus.com</link>
	<description>Plants, food and web design</description>
	<pubDate>Mon, 05 May 2008 23:27:50 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Connecting Ruby on Rails to Oracle on an Intel Mac in Leopard, take 2</title>
		<link>http://www.foliosus.com/2008/05/05/connecting-ruby-on-rails-to-oracle-on-an-intel-mac-in-leopard-take-2/</link>
		<comments>http://www.foliosus.com/2008/05/05/connecting-ruby-on-rails-to-oracle-on-an-intel-mac-in-leopard-take-2/#comments</comments>
		<pubDate>Mon, 05 May 2008 23:24:31 +0000</pubDate>
		<dc:creator>Brent Miller</dc:creator>
		
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.foliosus.com/?p=99</guid>
		<description><![CDATA[Since I posted the first version of this article, there have been a couple of changes.  The biggest one is that Intel has released Intel Mac versions of the InstantClient.  Woohoo!  That makes the previous version rather too complicated, so I&#8217;ve updated it here.  This tutorial assumes that you&#8217;re using Rails [...]]]></description>
			<content:encoded><![CDATA[<p>Since I posted the first version of this article, there have been a couple of changes.  The biggest one is that Intel has released Intel Mac versions of the InstantClient.  Woohoo!  That makes the previous version rather too complicated, so I&#8217;ve updated it here.  This tutorial assumes that you&#8217;re using Rails 2.0 or greater.  If you&#8217;re starting from the setup we had before, and you want to fix it, <a href="#fat_fix" title="Jump to the fixer-upper instructions">start with the cleanup instructions at the bottom</a>, and then come back here. <span id="more-99"></span></p>
<h2 id="get_oracle">Grab the new Oracle InstantClient libraries</h2>
<p>The new Intel Mac versions are available from the <a href="http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/intel_macsoft.html" title="Get the libraries: login required">Oracle downloads site</a>.  Install them in <code>/Library/Oracle/</code>.  You can do side-by-side installations in folders with whatever names you want, since apps find them by using the <code>$ORACLE_HOME</code> environment variable (and it&#8217;s friends). I&#8217;ve got mine in <code>/Library/Oracle/instantclient/10.2.0.4</code>.  Also make sure that you&#8217;ve got the files required to run sqlplus and the sdk.  You can drop those in the same directory.</p>
<p>Oh, and don&#8217;t forget to copy over your <code>tnsnames.ora</code> file.</p>
<h3>Symlink the libraries</h3>
<p>In the directory where you&#8217;ve installed the instant client, run this:</p>
<pre class="code">ln -s libclntsh.dylib.10.1 libclntsh.dylib</pre>
<h3>Set the environment variables correctly</h3>
<p>You&#8217;ll probably want to put these lines in your <code>.bash_profile</code>, but they also must be run (or <code>source</code>&#8216;d) from the command line to take effect:</p>
<pre class="code">export ORACLE_HOME=/Library/Oracle/instantclient/10.2.0.4
export TNS_ADMIN=$ORACLE_HOME
export LD_LIBRARY_PATH=$ORACLE_HOME
export DYLD_LIBRARY_PATH=$ORACLE_HOME
export PATH=$PATH:$ORACLE_HOME
</pre>
<p>On to the next step, making Rails &#038; Oracle play nice.</p>
<h2>Getting Rails to talk to Oracle</h2>
<p>First,</p>
<pre class="code">sudo gem install activerecord-oracle-adapter --source http://gems.rubyonrails.org</pre>
<p>This installs the oracle adapter, which is how ActiveRecord deals with Oracle.  It doesn&#8217;t, however, install the Ruby oci8 driver, which is how Ruby talks to Oracle.  We&#8217;ll do that now.</p>
<h3>Compile the ruby-oci8 library</h3>
<p>Make sure you’ve got the <a title="Download the Oracle Instant Client SDK" href="http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/intel_macsoft.html">Oracle Instant Client SDK</a> installed in your Oracle Instant Client directory (/Library/Oracle/instantclient/10.2.0.4)</p>
<p>The most recent stable version of the oci8 library is <a title="Ruby oci8 library" href="http://rubyforge.org/projects/ruby-oci8/">1.0.1</a>.  Download it and unpack the file in the finder: it should unzip into <code>~/Downloads/ruby-oci8-1.0.1</code>.</p>
<p>Now we can finish configuring the environment before we compile the library.</p>
<pre class="code">cd ~/Downloads/ruby-oci8-1.0.0
export SQLPATH=$ORACLE_HOME
export RC_ARCHS=i386
ruby setup.rb config
make
sudo make install</pre>
<p>These steps should cause some compiler output to scroll by.  Pay attention if you run into any errors on the setup step; the error messages are reasonably helpful at pointing you towards any problems.</p>
<h2>Test connectivity</h2>
<p>At this point, we&#8217;re done.  We&#8217;ve got the latest Oracle InstantClient, and we&#8217;ve installed the ruby-oci8 library.  Now it&#8217;s a question of making sure that everything works as advertised:</p>
<pre class="code">ruby /usr/bin/irb</pre>
<p>In the IRb console, type:</p>
<pre class="code">require 'oci8'</pre>
<p>If the console returns <code>true</code> or <code>[]</code>, you’re in business.</p>
<h2>Configure your database.yml</h2>
<p>The last step is to make your application use the Oracle connection.  In your <code>database.yml</code>, use the following to make it work:</p>
<pre class="code">development:
adapter: oracle
database: your_instance_name
username: your_user_name
password: your_password</pre>
<p>The database name comes straight out of your <code>tnsnames.ora</code> file.  You don&#8217;t need to specify any other connection information in <code>database.yml</code>, since the <code>tnsnames.ora</code> file has everything you need.</p>
<p>Your application is now talking to Oracle, without Rosetta!</p>
<h2 id="fat_fix">Fix the <code>ruby_fat</code> and <code>ruby_ppc</code> setup</h2>
<p>If you followed my <a href="/2007/11/19/connecting-ruby-on-rails-to-oracle-on-an-intel-mac-in-leopard-mac-osx-105/" title="Don't read these: you don't want them anymore">previous instructions</a> and went through all of the shenanigans with the <code>ruby_ppc</code> and <code>ruby_fat</code> versions and would like to undo them, it&#8217;s quite simple.  Just remove the <code>ruby_ppc</code> files, and the symlinks to them (called <code>ruby</code>, and rename <code>ruby_fat</code> as <code>ruby</code>:</p>
<pre class="code">cd /usr/bin
sudo rm ruby
sudo rm ruby_ppc
sudo mv ruby_fat ruby
cd /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin
sudo rm ruby
sudo rm ruby_ppc
sudo mv ruby_fat ruby</pre>
<p>Then, you should also remove the 2 management scripts:</p>
<pre class="code">sudo rm /usr/bin/ppc_ruby.sh
sudo rm /usr/bin/fat_ruby.sh</pre>
<p>And that&#8217;s enough for the cleanup.  From here you can start following the instructions beginning with <a href="#get_oracle" title="Start from the top">getting the new Oracle libraries.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.foliosus.com/2008/05/05/connecting-ruby-on-rails-to-oracle-on-an-intel-mac-in-leopard-take-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>HOWTO monkeypatch Rake: overriding a Rake task</title>
		<link>http://www.foliosus.com/2008/05/05/howto-monkeypatch-rake-overriding-a-rake-task/</link>
		<comments>http://www.foliosus.com/2008/05/05/howto-monkeypatch-rake-overriding-a-rake-task/#comments</comments>
		<pubDate>Mon, 05 May 2008 16:33:49 +0000</pubDate>
		<dc:creator>Brent Miller</dc:creator>
		
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.foliosus.com/?p=98</guid>
		<description><![CDATA[I know that some people really don&#8217;t like monkeypatching, and I see why.  But sometimes it&#8217;s just unavoidable.  Recently at work we came across a situation where the standard rake db:schema:dump task just wasn&#8217;t working. So I started by writing the new version of the rake task that I wanted:
namespace :db do
  [...]]]></description>
			<content:encoded><![CDATA[<p>I know that some people really don&#8217;t like monkeypatching, and I see why.  But sometimes it&#8217;s just unavoidable.  Recently at work we came across a situation where the standard <code>rake db:schema:dump</code> task just wasn&#8217;t working. So I started by writing the new version of the rake task that I wanted:</p>
<pre class="code">namespace :db do
  namespace :schema do
    desc "Create a db/schema.rb file"
    task :dump => :environment do
      require 'active_record/schema_dumper'
      puts "Creating schema:"
      File.open(ENV['SCHEMA'] || &#8220;db/schema.rb&#8221;, &#8220;w&#8221;) do |file|
        ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection, file)
      end
    end
  end
end</pre>
<p>This task as shown does exactly what the default rake task does, except for the <code>puts</code> line.  Let&#8217;s just pretend that it&#8217;s a radically different and wonderful version that solves world hunger and raises your children. Now, if you drop this into a rakefile in your app&#8217;s <code>lib/tasks</code> directory, and then you run <code>rake db:schema:dump --trace</code> you&#8217;ll notice that the schema.rb file gets created <strong>twice</strong>.  What the??? <span id="more-98"></span></p>
<h3>Check the docs</h3>
<p>So I started poking around the <a href="http://rake.rubyforge.org/" title="Read the RDocs for Rake">Rake docs</a>. <code>Rake::Task.define_task</code> does the following:</p>
<blockquote><p>Define a task given args and an option block. If a rule with the given name already exists, the prerequisites and actions are added to the existing task. Returns the defined task.</p></blockquote>
<p>Aha!  So instead of overriding the existing task (monkeypatching it), I&#8217;m adding to it.  That&#8217;s why the schema gets dumped twice.  But what if I don&#8217;t want that?  What to do if I want to replace the rake task with my new version?</p>
<h3>Check the internets</h3>
<p>About an hour of googling later, I finally came across <a href="http://matthewbass.com/2007/03/07/overriding-existing-rake-tasks/" title="The solution to my rake problems!">a post from Matthew Bass</a> explaining the solution to my problem:</p>
<pre class="code">Rake::TaskManager.class_eval do
  def remove_task(task_name)
    @tasks.delete(task_name.to_s)
  end
end

def remove_task(task_name)
  Rake.application.remove_task(task_name)
end

# Override existing test task to prevent integrations
# from being run unless specifically asked for
remove_task 'db:schema:dump'

# Now define db:schema:dump again, the way we did above</pre>
<p>And that was it. It&#8217;s relatively straight-forward, but has a tendency to do strange things when rails gets updated.  So you could abstract it into <a href="http://www.taknado.com/2007/7/30/overriding-rake-tasks" title="Plugin to override or monkeypatch rake tasks">a plugin</a>, with tests, but don&#8217;t forget to test it whenever you <code>gem update rails</code>.</p>
<h3>Alternative solution</h3>
<p>While I was googling I also ran into <a href="http://playtype.net/past/2008/3/27/multiple_databases_in_rails_without/" title="alias_task_chain source">a very interesting post on <code>alias_task_chain</code></a>, a method that patches Rake tasks to work like more typical methods with <code>alias_method_chain</code>.  If you were clever and wanted to spend the time, you could get a solution to the problem using this method.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foliosus.com/2008/05/05/howto-monkeypatch-rake-overriding-a-rake-task/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to choose a web designer, freelancer or agency</title>
		<link>http://www.foliosus.com/2008/03/25/how-to-choose-a-web-designer-freelancer-or-agency/</link>
		<comments>http://www.foliosus.com/2008/03/25/how-to-choose-a-web-designer-freelancer-or-agency/#comments</comments>
		<pubDate>Wed, 26 Mar 2008 06:25:04 +0000</pubDate>
		<dc:creator>Brent Miller</dc:creator>
		
		<category><![CDATA[Design]]></category>

		<category><![CDATA[Web Technology]]></category>

		<guid isPermaLink="false">http://www.foliosus.com/2008/03/25/how-to-choose-a-web-designer-freelancer-or-agency/</guid>
		<description><![CDATA[Before I launch in to this, let me just say that, really, there&#8217;s no universally right way to choose the ideal web designer.  There is no idea web designer.  There&#8217;s just the best way for you, and the best web designer for you.  I hope that the thoughts I lay out below [...]]]></description>
			<content:encoded><![CDATA[<p>Before I launch in to this, let me just say that, really, there&#8217;s no universally <em>right</em> way to choose the ideal web designer.  There is no idea web designer.  There&#8217;s just the best way for you, and the best web designer for you.  I hope that the thoughts I lay out below help you to clear up your right way is.</p>
<h3>What you know</h3>
<p>Some clients approach me saying that they want a website.  Some say that they want a website that looks nice.  Some say they want a website that performs functions x, y and z. Some say they want a website set in 12pt Verdana with a background that&#8217;s exactly this shade of green, on a 960 pixel grid.  And written in PHP with a custom CMS, please.</p>
<p>There&#8217;s nothing wrong with any of these, although the last client always tends to give me pause, for reasons I&#8217;ll discuss at the end of the article.  I like to think of hiring a web professional the way I would hire a contractor to work on my house.  Because, really, that&#8217;s what you&#8217;re doing: you&#8217;re hiring a contractor to work on your digital house.  Not all contractors are the same.  They produce work of differing quality, in different styles and at different prices.</p>
<p>The problem for most home owners/clients is that the sheer number of choices is overwhelming; they don&#8217;t even know where to start.  If you want a contractor for your house, there&#8217;s a very clear geographic constraint on the choice &mdash; the contractor must be in the same place as you, so they can come to your house to do the work.  But with the web, that&#8217;s not true; we&#8217;re all just one e-mail away from each other. (6 degrees of separation? Hah!)</p>
<p><span id="more-91"></span></p>
<h3>Who might you hire?</h3>
<p>Chances are pretty good that you&#8217;re not the first business in your industry to have a website.  They&#8217;re also pretty good that you&#8217;re not the first business of your size to have a website.  So look at some of these other businesses on the web, and find out who did their sites.  Most web pros will have some link to themselves somewhere on the sites they design, usually in the footer or on an &#8220;About&#8221; page.</p>
<p>Start building a list of potential contractors in this way.  You can also do a Google local search to find web designers in your area.  They have the advantage of being able to meet you face to face, which is something that I really like, although it&#8217;s not necessary.</p>
<p>You&#8217;ll very quickly end up with 10-20 potential site builders this way.  Collect &#8216;em all.</p>
<h3>Who do you like?</h3>
<p>This is the most fun part of selecting a web designer: making a short list.  Everybody&#8217;s a critic, and this is your chance. Start by browsing their web sites.</p>
<p>If their site is old, clunky or ugly, then maybe you should take them off the list.  If they tend to make sites radically different from the kind of site you&#8217;re looking for, take them off.  If their personal style doesn&#8217;t match up with your vision of your site, then perhaps they&#8217;re not right for you.  Although be careful; some people have amazing ranges and can surprise you.</p>
<p>Many web pros have a blog.  Read some of it.  Do they seem like the kind of person you would want working for you?</p>
<p>After going through this, you should be down to some kind of a short list.</p>
<h3>Your ideas</h3>
<p>Note that, so far, I haven&#8217;t said much about refining the ideas for your site.  That&#8217;s because you don&#8217;t need to do that alone. The analogy about hiring a contractor isn&#8217;t really appropriate anymore.  Really, when you hire someone (or some company) to build your site, you&#8217;re hiring an architect <em>and</em> a contractor all at the same time.  The architect will help you refine your vision when you&#8217;re deciding on the addition to your house; let the web professional do the same.</p>
<p>You shouldn&#8217;t refine your ideas alone.  The best designs come from lots of interaction between the designer and the client.</p>
<h3>Talk to them</h3>
<p>Now we get down to the nitty gritty. E-mail or call every member of your short list, and make an appointment. Speak with them.  Ask them about their process.  How do they get you from where you are to having a completed site?  How much feedback is there between them and you along the way?  What does their process emphasize? How flexible is the process?</p>
<p>Although there are wrong answers to these questions, there aren&#8217;t any right answers.  What&#8217;s important here is that the way they work fit with what you want.  Personality is a big part of this.  You have to be able to talk to your web pro, and you have to be able to trust that their process will produce the end result that you&#8217;re looking for.</p>
<h3>Get a quote</h3>
<p>This one speaks for itself.  Get a quote.  Find out what their pricing method is.  Do they bill hourly?  Is it a flat fee?  What are the restrictions about changing details of the project mid-stream?  What kind of timeline can they work with?  Is the quote firm?</p>
<p>Again, there aren&#8217;t really right answers, although there can be wrong ones. Comparing quotes is very difficult, as they are frequently apples and oranges. Unfortunately I don&#8217;t really have any good advice here, except this: in the low range of web design, you almost always get what you pay for, but above that it&#8217;s a free-for-all, and price frequently bears little correlation to the quality of the finished product. </p>
<h4>Be wary of hidden costs</h4>
<p>Be careful about hidden costs. For example, all web sites need to be hosted somewhere.  Does your web designer offer their own web hosting?  Many do.  If so, what do they charge?  What does the charge include?  You can easily price this against any web hosting company&#8217;s rates to see if what you&#8217;re paying is reasonable.</p>
<p>If they don&#8217;t offer hosting, will they set you up with a reputable web host?  Will they charge you for that?</p>
<p>How does your site get updated?  Will you be able to do it, without breaking anything?  If not, how much will it cost you to make changes?  Be wary of being nickel-and-dimed to death with site updates, especially when nickels cost $80 an hour.</p>
<p>Search engine optimization (SEO) is another favored charge.  Some web pros won&#8217;t submit your new site to the search engines.  Or they will charge you for it.  Some will issue repeated charges for re-submission every few months.  This is a very bad idea: once the search engines are aware of you, they will re-index your site regularly.  Re-submission is usually grounds for removal of your site from their search results. There can be a wide variety of charges associated with SEO; make sure that they are legitimate and useful for you.</p>
<h3>Choose someone!</h3>
<p>By now you&#8217;re very well equipped to choose the best web designer for you.  You know a lot about the people on your short list: you understand something about who they are, how they think and how they will approach your project. Weigh that against your budget, and make your choice.</p>
<h3>Trust your designer</h3>
<p>Once you have chosen a designer, don&#8217;t be afraid to trust them.  If you don&#8217;t think you can trust them, <em>don&#8217;t hire them</em>.</p>
<p>If you know as much as your designer does about web technology, then hiring them is a bad idea; let them sort out the design and the tech.  They know if PHP is the best technology for your site or not. Discuss it with them, but listen to what they have to say.  After all, you hired them to be your web expert.  As long as you have enough input in to the process, they should be trusted to make the best decisions for you.  If they can&#8217;t, then you hired a bad web professional &mdash; fire them and get your money back.</p>
<p>With trust and confidence on both sides, you will end up with a site that you love.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foliosus.com/2008/03/25/how-to-choose-a-web-designer-freelancer-or-agency/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Lemon bars</title>
		<link>http://www.foliosus.com/2008/03/11/lemon-bars/</link>
		<comments>http://www.foliosus.com/2008/03/11/lemon-bars/#comments</comments>
		<pubDate>Wed, 12 Mar 2008 04:07:18 +0000</pubDate>
		<dc:creator>Brent Miller</dc:creator>
		
		<category><![CDATA[Food]]></category>

		<guid isPermaLink="false">http://www.foliosus.com/2008/03/11/lemon-bars/</guid>
		<description><![CDATA[
I wish that I had a photo of these to show; they were just too delicious, though, and didn&#8217;t last long enough.  The addition of a little bit of almond meal to the crust gives them a complexity of flavor that plays very nicely with the clean tartness of the lemon curd.
Lemon curd is [...]]]></description>
			<content:encoded><![CDATA[<div class="image_frame"><img src='/wp-content/uploads/2008/03/lemon.jpg' alt='Lemon' /></div>
<p>I wish that I had a photo of these to show; they were just too delicious, though, and didn&#8217;t last long enough.  The addition of a little bit of almond meal to the crust gives them a complexity of flavor that plays very nicely with the clean tartness of the lemon curd.</p>
<h3>Lemon curd is tricky</h3>
<p>Lemon curd is a very difficult beast.  It&#8217;s too easy for it to be off-balance: the butter, sugar or tartness from the lemons can easily dominate, and then it&#8217;s just good, not sublime like it can be.  There are no hard and fast secrets for getting the balance right, either, as it depends entirely on the particular lemons you&#8217;re using.  As their sugar levels vary, the amount of juice and sugar you&#8217;ll need to use to balance out the curd will change.  This means that you should taste the curd while it&#8217;s cooking, so that you can balance it out at the last minute if it needs it.</p>
<p>The second tricky part to a good lemon curd is making it so that it sets properly, and doesn&#8217;t have those nasty little bits of egg white that cook too soon and gum it up.  I came across a discussion of lemon curds online somewhere, and one of the participants had a suggestion which worked perfectly: that&#8217;s the basis of the recipe below.  The secret is two-fold.  <span id="more-94"></span>First, you cream the butter and sugar like you&#8217;re making a cake.  Second, you must stir the lemon curd constantly while it&#8217;s cooking.  When you first put it on the heat it will be chunky.  As you stir, it will go smooth.  It will take several minutes for the transition to smoothness to start, but once it has started it will be quite rapid.  This is when you have to taste it to correct the balance of flavors. Similarly, when it thickens it will happen very rapidly.  The whole cooking process should take no more than 10&ndash;15 minutes.</p>
<h3>Recipe</h3>
<h4>Crust</h4>
<ul class="ingredients">
<li>&frac12; cup flour</li>
<li>&frac12; almond meal</li>
<li>&frac14; confectioner&#8217;s sugar</li>
<li>&frac12; melted butter</li>
</ul>
<h4>Curd</h4>
<ul class="ingredients">
<li>&frac14; cup butter, cut into pieces</li>
<li>1&frac14; cup sugar</li>
<li>4 eggs, lightly beaten</li>
<li>&frac34; cup lemon juice</li>
<li>1 tbsp. minced lemon zest</li>
</ul>
<p>First, we prepare the crust:</p>
<ol>
<li>Preheat the oven to 350&deg;F</li>
<li>Sift together the flower, almond meal and powdered sugar</li>
<li>Stir in the melted butter</li>
<li>Press into the bottom of an 8-inch baking pan</li>
<li>Bake for 20 minutes</li>
</ol>
<p>While the crust is baking, let&#8217;s make the curd:</p>
<ol>
<li>Cream the butter</li>
<li>Gradually beat in the sugar</li>
<li>Beat in the eggs</li>
<li>Mix in the lemon juice and lemon zest</li>
<li>Cook over a double-boiler, while stirring constantly</li>
<li>The curd will thicken: it is done when it coats the spoon you&#8217;re stirring with, and you can use your finger to draw a line through the curd on the spoon that <em>stays</em></li>
</ol>
<p>Now assemble the bars:</p>
<ol>
<li>Pour the curd into the pre-baked crust</li>
<li>Return the bars to the oven for another 25 minutes</li>
<li>When baked, let cool to room temperature and then refrigerate</li>
<li>Before serving, cut into 2-inch squares and sprinkle with powdered sugar</li>
</ol>
<p>I brought a pile of these into work and they vanished: they&#8217;re quite tasty.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foliosus.com/2008/03/11/lemon-bars/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Microsoft has seen the light on IE8</title>
		<link>http://www.foliosus.com/2008/03/03/microsoft-has-seen-the-light-on-ie8/</link>
		<comments>http://www.foliosus.com/2008/03/03/microsoft-has-seen-the-light-on-ie8/#comments</comments>
		<pubDate>Tue, 04 Mar 2008 06:13:35 +0000</pubDate>
		<dc:creator>Brent Miller</dc:creator>
		
		<category><![CDATA[Browsers]]></category>

		<guid isPermaLink="false">http://www.foliosus.com/2008/03/03/microsoft-has-seen-the-light-on-ie8/</guid>
		<description><![CDATA[Woohoo! Today, Microsoft made the right decision about IE8. The default rendering mode will be fully standards compliant. They&#8217;re not going to punish the people who know what they&#8217;re doing.
This is truly great news, for several reasons.  One is that Microsoft is now arguing for greater openness.  That can only help the marketplace. [...]]]></description>
			<content:encoded><![CDATA[<p><b>Woohoo!</b> Today, <a href=http://blogs.msdn.com/ie/archive/2008/03/03/microsoft-s-interoperability-principles-and-ie8.aspx" title="Read the announcement for yourself">Microsoft made the right decision about IE8.</a> The default rendering mode will be fully standards compliant. They&#8217;re not going to <a href="/2008/01/22/two-wrongs-dont-make-a-right-microsoft-needs-to-fix-themselves/" title="Read my earlier post on the subject">punish the people who know what they&#8217;re doing</a>.</p>
<p>This is truly great news, for several reasons.  One is that Microsoft is now arguing for greater openness.  That can only help the marketplace. The other is that, for the first time in a long time, they&#8217;re making a very good decision with respect to IE, and they&#8217;re making it <em>for the right reasons</em>.  They&#8217;re making it because they want to play nicer with their clients and their developers.  That&#8217;s what I call a win-win: they win, and we win.  Everybody wins!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foliosus.com/2008/03/03/microsoft-has-seen-the-light-on-ie8/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Call URLs on your app from the Rails console</title>
		<link>http://www.foliosus.com/2008/02/06/call-urls-on-your-app-from-the-rails-console/</link>
		<comments>http://www.foliosus.com/2008/02/06/call-urls-on-your-app-from-the-rails-console/#comments</comments>
		<pubDate>Wed, 06 Feb 2008 19:46:37 +0000</pubDate>
		<dc:creator>Brent Miller</dc:creator>
		
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.foliosus.com/2008/02/06/call-urls-on-your-app-from-the-rails-console/</guid>
		<description><![CDATA[Here&#8217;s a neat trick I just learned from Obie Fernandez (The Rails Way, p. 30: you can see what your Rails app&#8217;s HTML output is from the console. To make this work you have to fool the app into thinking that there&#8217;s a request coming in by setting some environmental variables, and then call the [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a neat trick I just learned from Obie Fernandez (<a href="http://www.amazon.com/exec/obidos/tg/detail/-/0321445619/foliosuscom-20" title="Buy the book from Amazon">The Rails Way</a>, p. 30: you can see what your Rails app&#8217;s HTML output is from the console. To make this work you have to fool the app into thinking that there&#8217;s a request coming in by setting some environmental variables, and then call the dispatcher.</p>
<p>But wouldn&#8217;t it be nice to have a single method call, that uses <code>url_for</code> syntax?</p>
<p><span id="more-92"></span></p>
<pre class="code">class Object
  def request(options = {})
    method = options.delete(:method) || :get
    options.reverse_merge!(:only_path => true)
    ENV['REQUEST_URI'] = app.url_for(options)
    ENV['REQUEST_METHOD'] = method.to_s
    Dispatcher.dispatch
  end
end</pre>
<p>First we pull the method (<code>:get</code>, <code>:post</code> etc.) out, if it exists.  By default we want it to be <code>:get</code>.  Then we call <code>url_for</code> and have it only return the path, without any leading domain info.  Next we populate the environmental variables and call the dispatcher.  The return output will be the HTML your app renders.</p>
<p>To make the trick universally accessible on your development box, put the above code in <code>~/.irbrc</code>:</p>
<p>Then, fire up the console to your favorite rails app, and call:</p>
<pre class="code">>> request(:controller => 'my_controller', :action => 'the_action')</pre>
<p>You should see the HTML output scroll by.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foliosus.com/2008/02/06/call-urls-on-your-app-from-the-rails-console/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A rake task for setting up new Rails projects for Subversion</title>
		<link>http://www.foliosus.com/2008/01/31/a-rake-task-for-setting-up-new-rails-projects-for-subversion/</link>
		<comments>http://www.foliosus.com/2008/01/31/a-rake-task-for-setting-up-new-rails-projects-for-subversion/#comments</comments>
		<pubDate>Thu, 31 Jan 2008 16:59:02 +0000</pubDate>
		<dc:creator>Brent Miller</dc:creator>
		
		<category><![CDATA[Site Administrativa]]></category>

		<guid isPermaLink="false">http://www.foliosus.com/2008/01/31/a-rake-task-for-setting-up-new-rails-projects-for-subversion/</guid>
		<description><![CDATA[One of the more annoying things about using Subversion for source code control when using rails is that every time you start a new project, you have to go through this dance to get the new project&#8217;s Subversion setup done.  Really, this means that you&#8217;re repeating yourself every time you start a new project, [...]]]></description>
			<content:encoded><![CDATA[<p>One of the more annoying things about using Subversion for source code control when using rails is that every time you start a new project, you have to go through this dance to get the new project&#8217;s Subversion setup done.  Really, this means that you&#8217;re repeating yourself every time you start a new project, so in the interest of DRYness, it seems like you would want to script this.  Even better, you could just setup one canonical project that you checkout instead of running <code>rails my_new_project</code>.</p>
<p>I&#8217;ve <a href="http://blog.teksol.info/2006/03/09/subversion-primer-for-rails-projects" title="A very complete explanation for how to do it at the shell prompt">found</a> <a href="http://www.railsonwave.com/railsonwave/2006/12/19/smart-subversion-script-for-rails-projects" title="A shell script to configure SVN">several</a> <a href="http://blog.unquiet.net/archives/2005/11/06/helpful-rake-tasks-for-using-rails-with-subversion/" title="A rake task to configure SVN">pages</a> <a href="http://wiki.rubyonrails.org/rails/pages/How+To+Use+Subversion+with+a+Rails+Project" title="Rails wiki">on</a> <a href="http://wiki.rubyonrails.org/rails/pages/HowtoUseRailsWithSubversion" title="Another Rails Wiki page">the</a> internets that discuss how to do a good subversion setup, and they each had their strong points.  I&#8217;ve combined their approaches into a method for making a canonical blank app.</p>
<p><span id="more-89"></span></p>
<h3>Creating the canonical app</h3>
<p>First, you should create a repository for your canonical blank app.  Let&#8217;s say it&#8217;s at <code>http://svn.my_svn.com/canonical/trunk</code>. I trust that you know how to do this.  Then, you can create your app:</p>
<pre class="code">rails canonical
cd canonical</pre>
<p>Next you can do an in-place import of your SVN repo into your app directory:</p>
<pre class="code">svn checkout http://svn.my_svn.com/canonical/trunk .</pre>
<p>Don&#8217;t forget the final period in that command; it&#8217;s critical. SVN should say something like <code>Checked out revision 1</code>.  This step puts our newly created canonical directory under Subversion control.</p>
<h3>Adding all of your files to the repository</h3>
<p>Now we put all of our files under Subversion control:</p>
<pre class="code">svn add --force .</pre>
<p>Again, don&#8217;t forget the trailing period.  This command will output a long list of files with a leading &#8220;A&#8221;, indicating that they&#8217;ve been added.</p>
<h3>Create the rake task</h3>
<p>Put the following code in a file called <code>svn.rake</code> in the <code>lib/tasks</code> folder:</p>
<pre class="code">desc "Configure Subversion for Rails"
task :setup_svn do
  puts "Removing /log"
  system "svn remove log/*"
  system "svn commit -m 'removing all log files from subversion'"
  system 'svn propset svn:ignore "*.log" log/'
  system "svn update log/"
  system "svn commit -m 'Ignoring all files in /log/ ending in .log'"

  puts "Ignoring /db"
  system 'svn propset svn:ignore "*.db" db/'
  system "svn update db/"
  system "svn commit -m 'Ignoring all files in /db/ ending in .db'"

  puts "Renaming database.yml database.example"
  system "svn move config/database.yml config/database.example"
  system "svn commit -m 'Moving database.yml to database.example to provide a template for anyone who checks out the code'"
  system 'svn propset svn:ignore "database.yml" config/'
  system "svn update config/"
  system "svn commit -m 'Ignoring database.yml'"

  puts "Ignoring /tmp"
  system 'svn propset svn:ignore "*" tmp/'
  system "svn update tmp/"
  system "svn commit -m 'Ignoring all files in /tmp/'"

  puts "Ignoring /doc"
  system 'svn propset svn:ignore "*" doc/'
  system "svn update doc/"
  system "svn commit -m 'Ignoring all files in /doc/'"
end</pre>
<h3>Do any other setup</h3>
<p>If there are any other setup or configuration bits that you use all the time — plugins, ActionMailer configs, date formats, etc., put those in the appropriate places.  When using <code>script/plugin</code> make sure that you use the <code>-x</code> flag to get the Subversion stuff right.  When using <code>script/generate</code> be sure to use the <code>--svn</code> flag to add the files automatically to Subversion.</p>
<p>For example, at my work most of our apps routinely connect to multiple databases, so I put stubs for each of them in <code>database.example</code>.  I also like to have certain date formats available to me, </p>
<h3>Run the rake task</h3>
<p>Now, execute the new rake task:</p>
<pre class="code">rake setup_svn</pre>
<p>Be warned, though, you should only run this once on the canonical: it moves the <code>database.yml</code> file to <code>database.example</code>, making the project non-functional.  You don&#8217;t want any passwords in there, either, since you don&#8217;t want to expose them in the repository.</p>
<p>The script does a bunch of commits, so any changes you have made to your canonical will be saved to the repository.</p>
<h3>Export new projects</h3>
<p>The next time you want to create a new Rails project, instead of doing <code>rails projectname</code> you should do the following:</p>
<ol>
<li>Export the canonical from the repository</li>
<li>Do an in-place import from the new project&#8217;s repository</li>
<li>Rename <code>database.example</code> as <code>database.yml</code> and populate it</li>
<li>Run <code>rake secret</code> and copy the new secret code into your <code>environment.rb</code> (you don&#8217;t want all of your apps to have the same code)</li>
</ol>
<p>If you don&#8217;t want to mess with the canonical, you can just drop the <code>svn.rake</code> file in to your new projects and run it.  That would give you some DRYness, like a good hitchhiker&#8217;s towel.</p>
<h3>That&#8217;s it!</h3>
<p>Now you should have a good canonical app that makes creating new projects a breeze.  At my work we have multiple developers and we will have dozens of apps by the time we&#8217;re done migrating ourselves out of the old platform.  By standardizing our new projects this way, it makes our startup time much faster and leads to better habits (like always using Subversion), and there is no bad in any of that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foliosus.com/2008/01/31/a-rake-task-for-setting-up-new-rails-projects-for-subversion/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Two wrongs don&#8217;t make a right: Microsoft needs to fix themselves</title>
		<link>http://www.foliosus.com/2008/01/22/two-wrongs-dont-make-a-right-microsoft-needs-to-fix-themselves/</link>
		<comments>http://www.foliosus.com/2008/01/22/two-wrongs-dont-make-a-right-microsoft-needs-to-fix-themselves/#comments</comments>
		<pubDate>Wed, 23 Jan 2008 02:30:50 +0000</pubDate>
		<dc:creator>Brent Miller</dc:creator>
		
		<category><![CDATA[Browsers]]></category>

		<guid isPermaLink="false">http://www.foliosus.com/2008/01/22/two-wrongs-dont-make-a-right-microsoft-needs-to-fix-themselves/</guid>
		<description><![CDATA[Yesterday two articles appeared at A List Apart discussing a Microsoft-backed proposal to change how the web works (round-up here).  The proposal, on its face, is quite simple.  Developers would put a meta tag in their documents (X-UA-Compatible) stating what version of a browser the pages were coded against.  The browsers would [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday two articles appeared at <a href="http://www.alistapart.com/issues/251" title="read the articles here">A List Apart</a> discussing a Microsoft-backed proposal to change how the web works (<a href="http://www.digital-web.com/news/2008/01/IE8_Version_Targeting_causes_quite_a_stir" title="Summary of blog posts and articles about this">round-up here</a>).  The proposal, on its face, is quite simple.  Developers would put a meta tag in their documents (<code>X-UA-Compatible</code>) stating what version of a browser the pages were coded against.  The browsers would read the tag, and render the page with legacy behavior, including all of the quirks, of that browser.  The goal is to &#8220;not break the web&#8221; with browser upgrades.</p>
<p>It sounds like a great idea, right? I mean, why should I have to worry that Microsoft released IE7? If I used this tag, and specified IE6, then my page would always render correctly in IE, even if IE was on version 28.</p>
<h3>WRONG!!!</h3>
<p><span id="more-88"></span></p>
<p>Let&#8217;s really look at this situation.  There are two wrongs here, and Microsoft wants to add a third.  Let&#8217;s look at how we got here.</p>
<ol>
<li>Microsoft made a bad browser: it didn&#8217;t (and still doesn&#8217;t) support the CSS standard</li>
<li>Developers everywhere screwed up by coding pages that take advantage of the IE bugs, in a way that breaks in standards-compliant browsers (never mind that conditional comments makes this unnecessary)</li>
<li>Microsoft upgrades IE to version 7, and those bad sites break</li>
<li>Microsoft says, &#8220;If every web developer were to just change how they work, we could have upgrades that are ok.&#8221;</li>
</ol>
<p>Do you see the fatal flaw in the logic?</p>
<p>It&#8217;s right there in steps 1 and 2.</p>
<p>If Microsoft made browsers that support the standards, we wouldn&#8217;t be in this mess.  I say, <strong>no</strong> to Microsoft&#8217;s proposal.  I say, if Microsoft doesn&#8217;t want to make browsers that support the standards, then their customers get what they deserve if the web starts breaking for them.  I say, how about Microsoft step up to the plate and make a rendering engine that works instead of relying on <strong>everyone else</strong> to fix their problems for them.</p>
<p>&#8220;But what about all of those pages that the IE7 upgrade broke?&#8221; you ask.  Those are bad pages, and IE7 is a bad browser.  They&#8217;re either not coded to standards, or IE7 choked on the correct standards-compliant code they were using, or both.  That&#8217;s why they broke.  The people who paid for that development should switch developers to get someone who knows what they&#8217;re doing, who will code pages that actually work.  The browser shouldn&#8217;t have been released if it didn&#8217;t support the standards.</p>
<p>This is why they&#8217;re called &#8220;Web Standards.&#8221;  Because they&#8217;re <em>standard</em>.  I make a page that works in Firefox, I know that it works in Safari.  I should know that it works in IE.  If that&#8217;s not true, then it&#8217;s IE&#8217;s problem, not mine.</p>
<h3>Note to Microsoft</h3>
<p><strong>FIX YOUR D*** BROWSER ALREADY</strong>. It&#8217;s almost been a <em>decade</em> since IE5 started support for CSS 2, and they still haven&#8217;t gotten it right.  They make <a href="http://en.wikipedia.org/wiki/Microsoft" title="I'm serious. They're wealthier than just about everybody.">$50 billion dollars a year</a> and can&#8217;t make their browser behave.</p>
<h3>Note to web developers</h3>
<p><strong>FIX YOUR D*** PAGES ALREADY</strong>. It&#8217;s almost been a <em>decade</em> since CSS2 came out.  You haven&#8217;t figured out how it works yet? You call yourself a professional?  Get with it.</p>
<h3>I&#8217;m a bleeding-heart liberal</h3>
<p><a href="http://www.zeldman.com/2008/01/22/in-defense-of-version-targeting/" title="A very good argument for the new proposal">Zeldman</a> posted about people just like me.  He says, &#8220;We won’t get converts by breaking sites and ridiculing their creators for not knowing as much as we do.&#8221;  He&#8217;s right.</p>
<p>Except that we&#8217;ve tried that, and it doesn&#8217;t work.  It doesn&#8217;t work because many of the web pages out there aren&#8217;t made by professionals.  Anybody heard of Dreamweaver WYSIWYG mode?  If the pages work, people are happy.  Except that they don&#8217;t work.  If they work in IE6, but not in IE7, they never worked.  They just had the illusion of working.</p>
<p>Let&#8217;s make an analogy, to print design.  If I, a rank amateur in the print design world, decided to print a book in 5 point Comic Sans and it was totally illegible, that&#8217;s my problem.  It&#8217;s not the printer&#8217;s problem, or the reader&#8217;s problem.  It&#8217;s mine.  I screwed up, I made content that wasn&#8217;t accessible to anybody.  Some readers have figured out that if they use a magnifying glass, it&#8217;s not so bad, they can read it.  That doesn&#8217;t mean that my book wasn&#8217;t broken. Now let&#8217;s say that these people buy another book of mine, this time printed in 72 point Bembo.  With their magnifying glass, they now complain that the new book is broken!  They can&#8217;t read it.  Nobody else can either, because the type is just too big.  If I said, &#8220;Well, every publisher needs to do something so that my books are legible&#8221; you would say I&#8217;m stupid.  It&#8217;s up to me to books that are legible.  And that&#8217;s right.  That&#8217;s why it&#8217;s up to Microsoft to stop making a browser that&#8217;s broken and expecting people to work around them.  And it&#8217;s also up to developers to stop coddling the browser that&#8217;s broken.</p>
<h3>Why the doctype switch isn&#8217;t targeting</h3>
<p>One problem in this debate is that <a href="http://snook.ca/archives/browsers/version_targeting_ie8/" title="Snook got it wrong on this one">people are confusing doctype switching with version targeting</a>. Using a standard doctype is like a contract: I, the developer, support this <strong>standard</strong> of HTML and CSS, so that you, the browser, can render it properly according to the same <strong>standard</strong>.  The standard provides a common language, a shared vocabulary, so that the garbage I put in to the system is the same garbage that comes out.  Targeting a browser isn&#8217;t the same thing.  When I use conditional comments or other CSS hacks, I&#8217;m saying &#8220;hey browser, you&#8217;re don&#8217;t understand this sentence in our standard vocabulary, so I&#8217;m going to give you a sentence that you understand.&#8221;  That&#8217;s not the same thing as saying which vocab you&#8217;re using.  It&#8217;s like talking to a child — if you use a word the child doesn&#8217;t understand, you talk around it, explain it, you don&#8217;t switch languages.  If I use the new meta-tag, and I target IE7, IE8, or IE42, it should render my page the same, according to the contract I say I&#8217;m holding to in my doctype declaration.  End of story.  If they don&#8217;t then they&#8217;ve got bugs.</p>
<h3>Really?</h3>
<p>Are we really going this way? I can&#8217;t believe that this industry is even <em>considering</em> Microsoft&#8217;s proposal. If the browsers aren&#8217;t upholding their end of the contract, why should we work around them?  Let them be broken, let people decide they don&#8217;t want a broken browser, let the bad browsers die.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foliosus.com/2008/01/22/two-wrongs-dont-make-a-right-microsoft-needs-to-fix-themselves/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Pots de chocolat</title>
		<link>http://www.foliosus.com/2008/01/13/pots-de-chocolat/</link>
		<comments>http://www.foliosus.com/2008/01/13/pots-de-chocolat/#comments</comments>
		<pubDate>Mon, 14 Jan 2008 00:39:42 +0000</pubDate>
		<dc:creator>Brent Miller</dc:creator>
		
		<category><![CDATA[Food]]></category>

		<guid isPermaLink="false">http://www.foliosus.com/2008/01/13/pots-de-chocolat/</guid>
		<description><![CDATA[
Who doesn&#8217;t love chocolate?
That&#8217;s what I thought.  Nobody raised their hands.
I love to make desserts that finish a meal in style, and this chocolate mousse certainly fits the bill.  The best part is that it&#8217;s very easy to make.
Choose your chocolate wisely
Like with flourless chocolate cakes, you have to choose your chocolate very [...]]]></description>
			<content:encoded><![CDATA[<div class="image_frame"><a href="http://www.flickr.com/photos/foliosus/2191155804/" title="Pot de chocolat by foliosus, on Flickr"><img src="http://farm3.static.flickr.com/2218/2191155804_2c4055944f_m.jpg" width="240" height="159" alt="Pot de chocolat" /></a></div>
<p>Who doesn&#8217;t love chocolate?</p>
<p>That&#8217;s what I thought.  Nobody raised their hands.</p>
<p>I love to make desserts that finish a meal in style, and this chocolate mousse certainly fits the bill.  The best part is that it&#8217;s very easy to make.<span id="more-87"></span></p>
<h2>Choose your chocolate wisely</h2>
<p>Like with flourless chocolate cakes, you have to choose your chocolate very carefully.  If you look at the ingredients for this recipe, it&#8217;s chocolate with a little bit of butter, some eggs, and a smidgen of coffee.  If your chocolate is no good, your mousse won&#8217;t be any good either.  The mousse will highlight the characteristics of the chocolate; if the chocolate is bitter, the mousse will be bitter.  If the chocolate is very fruity, the mousse will be fruity.  So choose carefully.</p>
<p>I tend to make this with the blocks of <a href="http://www.ghirardelli.com/" title="Visit their site">Ghirardelli</a> (dark, of course) that Trader Joe&#8217;s sells.  It&#8217;s a very good all-purpose chocolate.</p>
<h2>Pots de chocolat</h2>
<ul class="ingredients">
<li>8 ounces of any semisweet chocolate, broken into chunks</li>
<li>1½ tablespoons butter</li>
<li>2-3 tablespoons of strong coffee, rum or brandy</li>
<li>3 eggs</li>
<li>Pinch of salt</li>
</ul>
<ol>
<li>Put the chocolate, butter and coffee (or liquor) into a double boiler over moderate heat.  Stir until completely melted and smooth.</li>
<li>Let the chocolate stand for a few minutes to cool.</li>
<li>Separate the eggs.</li>
<li>Once the chocolate has cooled slightly (it should still be warm), add the egg yolks one at a time, stirring until smooth after each addition.</li>
<li>Beat the egg whites and the salt until they hold a firm shape.  They should be stiff, but not dry.</li>
<li>Fold the whites into the chocolate.  Start with a large spoonful of whites, and fold it in.  Then do a second large spoonful.  Then do half of the remaining whites, and then the rest.</li>
<li>Gently transfer the mousse to serving dishes like ramekins, small bowls, or martini glasses.</li>
<li>Put the dishes in the fridge for 6-8 hours or overnight.  If overnight, the texture will be firmer when eaten; be sure to cover them with plastic wrap so that the tops don&#8217;t dry out.</li>
<li>Serve with a dollop of whipped cream and a garnish — grated chocolate, a mint leaf, or some fresh berries.</li>
</ol>
<p>This recipe makes 6–8 servings.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foliosus.com/2008/01/13/pots-de-chocolat/feed/</wfw:commentRss>
		</item>
		<item>
		<title>HOWTO: Get printer&#8217;s marks and correct bleed sizes in PDFs output from Illustrator CS3</title>
		<link>http://www.foliosus.com/2008/01/10/howto-get-printers-marks-and-correct-bleed-sizes-in-pdfs-output-from-illustrator-cs3/</link>
		<comments>http://www.foliosus.com/2008/01/10/howto-get-printers-marks-and-correct-bleed-sizes-in-pdfs-output-from-illustrator-cs3/#comments</comments>
		<pubDate>Fri, 11 Jan 2008 07:26:36 +0000</pubDate>
		<dc:creator>Brent Miller</dc:creator>
		
		<category><![CDATA[Adobe CS3]]></category>

		<guid isPermaLink="false">http://www.foliosus.com/2008/01/10/howto-get-printers-marks-and-correct-bleed-sizes-in-pdfs-output-from-illustrator-cs3/</guid>
		<description><![CDATA[GRRRRR!
Sometimes stupid software bugs just burn my bu**.
For one of my clients, I designed a 8.5&#215;11&#8243; flyer that&#8217;s going to a real printer.  It&#8217;s a full-bleed piece, so the printer requested that I give them an eighth-inch bleed, with trim marks.  I thought, &#8220;Oh.  No worries.  I&#8217;m using my brand-spanking-new-hot-off-the-presses copy [...]]]></description>
			<content:encoded><![CDATA[<p>GRRRRR!</p>
<p>Sometimes stupid software bugs just burn my bu**.</p>
<p>For one of my clients, I designed a 8.5&#215;11&#8243; flyer that&#8217;s going to a real printer.  It&#8217;s a full-bleed piece, so the printer requested that I give them an eighth-inch bleed, with trim marks.  I thought, &#8220;Oh.  No worries.  I&#8217;m using my brand-spanking-new-hot-off-the-presses copy of CS3, which will surely be able to handle this sort of thing.  Well, you can see where this is going — it doesn&#8217;t.  If you make an 8.5&#215;11&#8243; documentin Illustrator CS3, and then save it as a PDF with the appropriate bleed size and trim marks, you don&#8217;t get what you wanted.  Illustrator crops the document at the artboard limits, which are 8.5&#215;11&#8243;.</p>
<p>Some quick googling turned up <a href="http://rwillustrator.blogspot.com/2007/11/ask-mordy-document-size-and-bleed.html" title="Aha!">a discussion of the problem</a>, but not the solution I wanted.</p>
<p>But there is a work-around.  I&#8217;ll give you a hint: it <em>doesn&#8217;t</em> involve CS3&#8217;s new crop area tool.<span id="more-86"></span></p>
<p>If you use the crop area tool, you get the same bug, so it&#8217;s no help.</p>
<p>The solution:</p>
<ol>
<li>Add ¼&#8221; of width all the way around the artboard, making your document 9&#215;11.5&#8243;</li>
<li>Save the document as a PDF</li>
<li>Open the new PDF in Acrobat 8</li>
<li>Go to Document > Crop Pages&#8230;</li>
<li>Set the TrimBox (shown below) to ¼&#8221; all the way around — to compensate for the ¼&#8221; we added before.  You&#8217;ll see the bright green line in the preview window that now delineates the original 8.5&#215;11&#8243; document size.
<p><img src="/wp-content/uploads/2008/01/cs3_trim_box.jpg" alt="CS3 TrimBox crop dialog" /></li>
<li>Go to Advanced > Print Production > Add Printers Marks</li>
<li>Check &#8220;Trim Marks&#8221;</li>
</ol>
<p>You should now see the trim marks! Don&#8217;t forget to save…</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foliosus.com/2008/01/10/howto-get-printers-marks-and-correct-bleed-sizes-in-pdfs-output-from-illustrator-cs3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>New site launch for Oregon Ki Society</title>
		<link>http://www.foliosus.com/2007/12/08/new-site-launch-for-oregon-ki-society/</link>
		<comments>http://www.foliosus.com/2007/12/08/new-site-launch-for-oregon-ki-society/#comments</comments>
		<pubDate>Sat, 08 Dec 2007 23:23:10 +0000</pubDate>
		<dc:creator>Brent Miller</dc:creator>
		
		<category><![CDATA[Design]]></category>

		<category><![CDATA[Site Administrativa]]></category>

		<guid isPermaLink="false">http://www.foliosus.com/2007/12/08/new-site-launch-for-oregon-ki-society/</guid>
		<description><![CDATA[
Even though I&#8217;ve started a new job, which I love by the way, my freelance work continues.  Last week I launched the newly redesigned Oregon Ki Society site, and it&#8217;s now in my portfolio.  This one is particularly near and dear to my heart, as I began training Aikido with the OKS 11 [...]]]></description>
			<content:encoded><![CDATA[<div class="image_frame"><a href="/portfolio/oregon-ki-society/" title="Go to the design description of the new Oregon Ki Society site"><img src="/wp-content/uploads/2007/12/oregonki_sm.jpg" alt="Oregon Ki Society screenshot" /></a></div>
<p>Even though I&#8217;ve started a new job, which I love by the way, my freelance work continues.  Last week I launched the newly redesigned <a href="http://www.oregonki.org/" title="Oregon Ki Society">Oregon Ki Society</a> site, and it&#8217;s now <a href="/portfolio/oregon-ki-society/" title="Go to the design description of the new Oregon Ki Society site">in my portfolio</a>.  This one is particularly near and dear to my heart, as I began training Aikido with the OKS 11 years ago, and still train today.</p>
<p>To be honest, when I first saw their site in 1996 I wanted to get my hands on it to fix it up.  Little did I know they would still be using the same site in 2007, when I was finally in a position to do something about it. The new site is crisp, clean and fresh with lots of strong photography.  I&#8217;m also quite proud of that since I shot most of the photos.</p>
<p>The content is interesting, too; there are <a href="http://www.ki-society.com/english/renew/aikidokai_002.html" title="Official Ki Society dojo list">Ki Society dojos all over the world</a>, and so there might be one near you.  If there is, it&#8217;s worth checking out.  The aikido training the Ki Society offers is unparalleled.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foliosus.com/2007/12/08/new-site-launch-for-oregon-ki-society/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Connecting Ruby on Rails to Oracle on an Intel Mac in Leopard (Mac OSX 10.5)</title>
		<link>http://www.foliosus.com/2007/11/19/connecting-ruby-on-rails-to-oracle-on-an-intel-mac-in-leopard-mac-osx-105/</link>
		<comments>http://www.foliosus.com/2007/11/19/connecting-ruby-on-rails-to-oracle-on-an-intel-mac-in-leopard-mac-osx-105/#comments</comments>
		<pubDate>Mon, 19 Nov 2007 16:58:15 +0000</pubDate>
		<dc:creator>Brent Miller</dc:creator>
		
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.foliosus.com/2007/11/19/connecting-ruby-on-rails-to-oracle-on-an-intel-mac-in-leopard-mac-osx-105/</guid>
		<description><![CDATA[NOTE: This tutorial has been superseded by a newer version that takes advantage of the newly-released Intel Mac version of the Oracle InstantClient. The new version is much, much simpler, and causes far fewer headaches.
Updated (12/11/07): The ruby-oci8 library just went to full 1.0.0 release.  I&#8217;ve updated that section to reflect the new file [...]]]></description>
			<content:encoded><![CDATA[<p><strong>NOTE:</strong> This tutorial has been superseded by <a href="/2008/05/05/connecting-ruby-on-rails-to-oracle-on-an-intel-mac-in-leopard-take-2/" title="Read this tutorial!  The one you're looking at isn't any good any more.">a newer version</a> that takes advantage of the newly-released Intel Mac version of the Oracle InstantClient. The new version is much, much simpler, and causes far fewer headaches.</p>
<p><strong>Updated (12/11/07):</strong> The <code>ruby-oci8</code> library just went to full 1.0.0 release.  I&#8217;ve updated that section to reflect the new file names.</p>
<p><strong>Updated (5/5/08):</strong> The oracle adapter installation has been on-again-off-again with successive Rails releases, but there&#8217;s an easy fix for it.  I&#8217;ve updated the relevant section.</p>
<p>At my new job, I&#8217;m using Ruby on Rails to connect to multiple databases — multiple Oracle (10g) instances, as well as MySQL and FileMaker.  There&#8217;s a lot of challenges to doing this, so I&#8217;m going to post some of the less obvious solutions as they come up.</p>
<p>The first challenge I had was to get RoR to talk to Oracle.  There isn&#8217;t a lot of information about this online, because the people who tend to use Oracle are not the people who tend to use open source software like Rails.</p>
<h2>Upgrade Rails to version 2.0</h2>
<p>To start out, I wanted to use the most recent release candidate of Rails: version 1.99.  I figured that I might as well upgrade before writing my first application, so that the codebase is all Rails 2.0 and up.  Leopard comes with both Ruby and Rails, and upgrading is actually very easy:<span id="more-80"></span></p>
<pre class="code">sudo gem install rails --source http://gems.rubyonrails.org</pre>
<p>Then enter “y” at each prompt, to install all of the dependencies.  That’s it!  Check yourself with</p>
<pre class="code">rails –v</pre>
<p>You should see <code>Rails 1.99.0</code> or <code>Rails 2.0</code>.</p>
<h2>Getting Rails to talk to Oracle</h2>
<p>Now,</p>
<pre class="code">sudo gem install activerecord-oracle-adapter --source http://gems.rubyonrails.org</pre>
<p>This installs the oracle adapter.  It doesn&#8217;t, however, install the Ruby oci8 driver.  We&#8217;ll do that now.</p>
<p>Make sure you’ve got the <a title="Download the Oracle Instant Client SDK" href="http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/macsoft.html">Oracle Instant Client SDK</a> installed in your Oracle Instant Client directory (/Library/Oracle/instantclient/10.1.0.3)</p>
<p>There&#8217;s a problem on new Intel Macs with this library.  Oracle hasn&#8217;t seen fit to release an Intel version of the library in the past year and a half, and that&#8217;s going to cause problems since the Ruby binary is going to run as Intel-native, but the Instant Client will run under Rosetta.  To solve this, we have to make a PPC version of the Ruby binary.</p>
<h3>Make PPC and fat versions of Ruby</h3>
<p>This is easier than it sounds.  We don&#8217;t have to recompile, since the Ruby binary in <code>/user/bin</code> is fat.  You can check this:</p>
<pre class="code">file `which ruby`</pre>
<p>This should show you a PPC and a i386 version:</p>
<pre class="code">/usr/bin/ruby_fat: Mach-O universal binary with 2 architectures
/usr/bin/ruby_fat (for architecture ppc7400):	Mach-O executable ppc
/usr/bin/ruby_fat (for architecture i386):	Mach-O executable i386</pre>
<p>All we have to do is extract the PPC version as a standalone binary, and trick the system into using that only.  It will make our Ruby slower, but it will get Ruby to talk to Oracle, so I&#8217;m willing to take the performance hit.  It&#8217;s so fast on the Intel Macs anyway, unless your Rails apps are doing massive amounts of processing, you probably won&#8217;t notice.</p>
<p>We&#8217;ll use <code>ditto</code> to extract the PPC version:</p>
<pre class="code">sudo ditto -arch ppc7400 /usr/bin/ruby /usr/bin/ruby_ppc
sudo mv /usr/bin/ruby /usr/bin/ruby_fat</pre>
<p>Now we&#8217;ve got two versions of the Ruby binary — the original fat version, and a PPC only version.</p>
<p>There&#8217;s a catch here, though: we actually have <em>two</em> copies of the <code>ruby</code> binary on our system.  The second binary is a part of the Ruby Framework, and that&#8217;s the binary that&#8217;s used by <code>irb</code>, <code>rake</code> and other very useful Rails helpers, so let&#8217;s fix this one too:</p>
<pre class="code">sudo ditto -arch ppc7400 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby_ppc
sudo mv /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby_fat</pre>
<p>Now we&#8217;ll need a facility for switching between the fat and PPC only binaries.  Create <code>/usr/bin/ppc_ruby.sh</code>:</p>
<pre class="code">#!/bin/bash
ln -fs /usr/bin/ruby_ppc /usr/bin/ruby
ln -fs /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby_ppc /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby</pre>
<p>Create <code>/usr/bin/fat_ruby.sh</code>:</p>
<pre class="code">#!/bin/bash
ln -fs /usr/bin/ruby_fat /usr/bin/ruby
ln -fs /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby_fat /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby</pre>
<p>Now, make them both executable:</p>
<pre class="code">sudo chmod 0711 /usr/bin/ppc_ruby.sh
sudo chmod 0711 /usr/bin/fat_ruby.sh</pre>
<p>Run <code>ruby_ppc.sh</code> to switch to using the PPC version:</p>
<pre class="code">sudo /usr/bin/ppc_ruby.sh</pre>
<p>Verify this worked:</p>
<pre class="code">file `which ruby`</pre>
<p>This should return <code>/usr/bin/ruby: Mach-O executable PPC</code>.</p>
<p>We&#8217;re getting closer.  Now we need the ruby-oci8 library.</p>
<h3>Compile the ruby-oci8 library</h3>
<p>The most recent stable version of the oci8 library is <a title="Ruby oci8 library" href="http://rubyforge.org/projects/ruby-oci8/">1.0.0</a>.  Download it and unpack the file in the finder: it should unzip into <code>~/Downloads/ruby-oci8-1.0.0</code>.</p>
<p>Before we can compile this library, we have to fool the system into making it PPC only, or it&#8217;s not going to work.  With your favorite text editor, edit <code>/usr/lib/ruby/1.8/universal-darwin9.0/rbconfig.rb</code>.  Comment out line 17 (<code>'-arch ppc -arch i386'</code> and replace it with <code>'-arch ppc'</code>.  Save your changes.  Leave the file open in your text editor, because we&#8217;ll come back to it.</p>
<p>Now we can finish configuring the environment before we compile the library.</p>
<pre class="code">cd ~/Downloads/ruby-oci8-1.0.0
export DYLD_LIBRARY_PATH=/Library/Oracle/instantclient/10.1.0.3
export SQLPATH=/Library/Oracle/instantclient/10.1.0.3
ruby setup.rb config
make
sudo make install</pre>
<p>Now you can go back to your text editor and restore line 17, save your changes and exit.</p>
<h2>Test connectivity</h2>
<p>At this point, we&#8217;re done.  We&#8217;ve fooled our system into running a PPC version of Ruby under Rosetta, and we&#8217;ve installed the ruby-oci8 library.  Now it&#8217;s a question of making sure that it works:</p>
<pre class="code">ruby /usr/bin/irb</pre>
<p>In the IRb console, type:</p>
<pre class="code">require 'oci8'</pre>
<p>If the console returns <code>true</code>, you’re in business.</p>
<h2>Configure your database.yml</h2>
<p>The last step is to make your application use the Oracle connection.  In your database.yml, use the following to make it work:</p>
<pre class="code">development:
adapter: oracle
database: your_instance_name
username: your_user_name
password: your_password</pre>
<p>The database name comes straight out of your <code>/Library/Oracle/instantclient/10.1.0.3/network/admin/tnsnames.ora</code> file.  You don&#8217;t need to specify any other connection information in database.yml, since the tnsnames.ora file has everything you need.</p>
<p>Your application is now talking to Oracle!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foliosus.com/2007/11/19/connecting-ruby-on-rails-to-oracle-on-an-intel-mac-in-leopard-mac-osx-105/feed/</wfw:commentRss>
		</item>
		<item>
		<title>HOWTO: Upgrade your Ruby on Rails install to version 2.0 on Leopard (Mac OSX 10.5)</title>
		<link>http://www.foliosus.com/2007/11/13/howto-upgrade-your-ruby-on-rails-install-to-version-20-on-leopard-mac-osx-105/</link>
		<comments>http://www.foliosus.com/2007/11/13/howto-upgrade-your-ruby-on-rails-install-to-version-20-on-leopard-mac-osx-105/#comments</comments>
		<pubDate>Tue, 13 Nov 2007 16:37:35 +0000</pubDate>
		<dc:creator>Brent Miller</dc:creator>
		
		<category><![CDATA[Operating systems]]></category>

		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.foliosus.com/2007/11/13/howto-upgrade-your-ruby-on-rails-install-to-version-20-on-leopard-mac-osx-105/</guid>
		<description><![CDATA[This one&#8217;s real easy.  Leopard ships with a default Rails installation (/usr/bin/rails), but overriding it is quite simple, since it&#8217;s just a gem.
sudo gem install rails --source http://gems.rubyonrails.org
Then, enter &#8220;y&#8221; at each prompt, to install all of the dependencies.  That’s it!  Check yourself with:
rails -v
Right now it will show Rails 1.99.0 which [...]]]></description>
			<content:encoded><![CDATA[<p>This one&#8217;s <em>real</em> easy.  Leopard ships with a default Rails installation (<code>/usr/bin/rails</code>), but overriding it is quite simple, since it&#8217;s just a <code>gem</code>.</p>
<pre class="code">sudo gem install rails --source http://gems.rubyonrails.org</pre>
<p>Then, enter &#8220;y&#8221; at each prompt, to install all of the dependencies.  That’s it!  Check yourself with:</p>
<pre class="code">rails -v</pre>
<p>Right now it will show <code>Rails 1.99.0</code> which is the current release candidate.  When rails goes fully 2.0, the same instructions should work to get the full release installed.</p>
<p>And don&#8217;t forget, you can always <code>rake rails:freeze</code> to lock a Rails app to a particular version of Rails by copying all of the Rails libraries into the <code>/vendor</code> directory.</p>
<p>Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foliosus.com/2007/11/13/howto-upgrade-your-ruby-on-rails-install-to-version-20-on-leopard-mac-osx-105/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Botany Photo of the Day, again!</title>
		<link>http://www.foliosus.com/2007/08/29/botany-photo-of-the-day-again/</link>
		<comments>http://www.foliosus.com/2007/08/29/botany-photo-of-the-day-again/#comments</comments>
		<pubDate>Thu, 30 Aug 2007 06:22:08 +0000</pubDate>
		<dc:creator>Brent Miller</dc:creator>
		
		<category><![CDATA[Ephemeral]]></category>

		<category><![CDATA[Plants]]></category>

		<guid isPermaLink="false">http://www.foliosus.com/2007/08/29/botany-photo-of-the-day-again/</guid>
		<description><![CDATA[Avalanche lily
Really, twice.  First was at the end of June: I completely forgot to note it here.  I took a photo of Erythronium montanum at the top of Larch Mountain outside of Portland.  It was a rainy day, which usually doesn&#8217;t make for good hiking, but we were under a thick understory [...]]]></description>
			<content:encoded><![CDATA[<div class="image_frame"><a href="http://www.ubcbotanicalgarden.org/potd/2007/06/erythronium_montanum.php" title="Go to the UBC BPoTD" class="external"><img src="/wp-content/uploads/2007/08/erythronium_montanum.jpg" alt="Avalanche lily" /><span class="image_caption">Avalanche lily</span></a></div>
<p>Really, twice.  First was <a href="http://www.ubcbotanicalgarden.org/potd/2007/06/erythronium_montanum.php" title="BPotD number 3">at the end of June</a>: I completely forgot to note it here.  I took a photo of <span class="species">Erythronium montanum</span> at the top of Larch Mountain outside of Portland.  It was a rainy day, which usually doesn&#8217;t make for good hiking, but we were under a thick understory for most of the hike so it worked.  There were vast numbers of these very delicate avalanche lilies waiting for us near the top of the mountain, all covered with droplets.  They are quite charismatic.</p>
<div class="image_frame"><a href="http://www.ubcbotanicalgarden.org/potd/2007/08/erigeron_peregrinus_subsp_callianthemus_var_callianthemus.php" title="Go to the UBC BPoTD" class="external"><img src="/wp-content/uploads/2007/08/erigeron_peregrinus.jpg" alt="Wandering daisy" /><span class="image_caption">Wandering daisy</span></a></div>
<p>The second time was <a href="http://www.ubcbotanicalgarden.org/potd/2007/08/erigeron_peregrinus_subsp_callianthemus_var_callianthemus.php" title="BPotD number 4">today</a>, for a photo of <span class="species">Erigeron peregrinus</span> ssp. <span class="species">callianthemus</span>.  I shot this one over this past weekend hiking up on Mt. Hood.  It was a glorious day for a hike, with perfect weather and clear skies.  More photos from this trip are in <a href="http://www.flickr.com/photos/foliosus/" title="See my photos on Flickr">my Flickr stream</a>.</p>
<p>As always, many thanks to Daniel Mosquin of the <a href="http://www.ubcbotanicalgarden.org/" title="Visit the UBC bot garden">UBC Botanical Garden</a> and his <a href="http://www.ubcbotanicalgarden.org/potd/" title="BPotD">Botany Photo of the Day</a>, which I really can&#8217;t recommend enough.  Every day you get a beautiful photo in your feed reader, along with some understanding of the natural world that surrounds us.  It really is an amazing planet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foliosus.com/2007/08/29/botany-photo-of-the-day-again/feed/</wfw:commentRss>
		</item>
		<item>
		<title>An &#8220;else&#8221; condition for link_to_unless_current</title>
		<link>http://www.foliosus.com/2007/04/18/else_for_link_to_unless_current/</link>
		<comments>http://www.foliosus.com/2007/04/18/else_for_link_to_unless_current/#comments</comments>
		<pubDate>Thu, 19 Apr 2007 04:17:21 +0000</pubDate>
		<dc:creator>Brent Miller</dc:creator>
		
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.foliosus.com/2007/04/18/else_for_link_to_unless_current/</guid>
		<description><![CDATA[Every time I get frustrated with an aspect of Rails, it turns out that it&#8217;s just my idiocy and not actually something to do with Rails.
Most recently, I wanted to code this algorithm:
If on the current page
  show &#60;a href="blah1"&#62;link 1&#60;/a&#62;
else
  show &#60;a href="blah2&#62;link 2&#60;/a&#62;

Rails has, of course, the nifty link_to_unless_current, but all [...]]]></description>
			<content:encoded><![CDATA[<p>Every time I get frustrated with an aspect of Rails, it turns out that it&#8217;s just my idiocy and not actually something to do with Rails.</p>
<p>Most recently, I wanted to code this algorithm:</p>
<pre class="code">If on the current page
  show &lt;a href="blah1"&gt;link 1&lt;/a&gt;
else
  show &lt;a href="blah2&gt;link 2&lt;/a&gt;</pre>
<p><span id="more-69"></span></p>
<p>Rails has, of course, the nifty <span class="code">link_to_unless_current</span>, but all that does is show the text of the link:</p>
<pre class="code">If on the current page
  show link
else
  show &lt;a href="blah"&gt;link&lt;/a&gt;</pre>
<p>That&#8217;s not quite what I&#8217;m looking for.  But when I was looking up link_to_unless_current in the <a href="http://api.rubyonrails.org/" title="The full Rails API">docs</a>, I realized that there IS an else condition on <span class="code">link_to_unless_current</span>.  The function takes a block as its last parameter, and that&#8217;s what gives you the &#8220;else.&#8221;</p>
<p>This code, in a view:</p>
<pre class="code">&lt;%= link_to_unless_current('Link text', my_url) { 'Alternate text' } %&gt;</pre>
<p>produces this algorithmic result:</p>
<pre class="code">If on the current page
  show Alternate text
else
  show &lt;a href="my_url"&gt;Link text&lt;/a&gt;</pre>
<p>Mission accomplished.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foliosus.com/2007/04/18/else_for_link_to_unless_current/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Botany photo of the day, take 2</title>
		<link>http://www.foliosus.com/2007/03/05/acer_japonicum_photo_of_the_day/</link>
		<comments>http://www.foliosus.com/2007/03/05/acer_japonicum_photo_of_the_day/#comments</comments>
		<pubDate>Mon, 05 Mar 2007 15:07:10 +0000</pubDate>
		<dc:creator>Brent Miller</dc:creator>
		
		<category><![CDATA[Plants]]></category>

		<guid isPermaLink="false">http://www.foliosus.com/2007/03/05/acer_japonicum_photo_of_the_day/</guid>
		<description><![CDATA[
Once again it seems I owe my thanks to Daniel Mosquin from the UBC Botanical Garden for choosing my photo of Acer japonicum, the japanese maple, for yesterday&#8217;s photo of the day.  That&#8217;s two in two months; we&#8217;ll see if I can make a third.  If you read his comments I think that [...]]]></description>
			<content:encoded><![CDATA[<div class="image_frame"><a href="http://www.ubcbotanicalgarden.org/potd/2007/03/acer_japonicum_cultivar.php" title="Go to the UBC BPoTD"><img src="/wp-content/uploads/2007/03/acer_japonicum.thumbnail.jpg" alt="Japanese maple" /></a></div>
<p>Once again it seems I owe my thanks to <a href="mailto:daniel.mosquin@ubc.ca">Daniel Mosquin</a> from the <a href="http://www.ubcbotanicalgarden.org/">UBC Botanical Garden</a> for choosing my photo of <span class="species">Acer japonicum</span>, the japanese maple, for <a href="http://www.ubcbotanicalgarden.org/potd/2007/03/acer_japonicum_cultivar.php" title="Go to the UBC BPoTD">yesterday&#8217;s photo of the day</a>.  That&#8217;s two in two months; we&#8217;ll see if I can make a third.  If you read his comments I think that he&#8217;s completely right — there is something very appealing about the Japanese maples in the winter time, because of their architectural shapes.  I took this photo shortly after a big rain, and the way the sunlight was catching the drops was so appealing that I couldn&#8217;t resist.  I think that it makes the tree look somehow much more ancient than it really is.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foliosus.com/2007/03/05/acer_japonicum_photo_of_the_day/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Macha cukkii: green tea cookies</title>
		<link>http://www.foliosus.com/2007/02/04/macha-cukkii-green-tea-cookies/</link>
		<comments>http://www.foliosus.com/2007/02/04/macha-cukkii-green-tea-cookies/#comments</comments>
		<pubDate>Mon, 05 Feb 2007 01:31:03 +0000</pubDate>
		<dc:creator>Brent Miller</dc:creator>
		
		<category><![CDATA[Food]]></category>

		<guid isPermaLink="false">http://www.foliosus.com/2007/02/04/macha-cukkii-green-tea-cookies/</guid>
		<description><![CDATA[Green tea cookies
My upstairs neighbor gave us some macha: Japanese powdered green tea.  The Japanese are the only people on the planet who still drink this stuff — it&#8217;s a very primitive form of tea, and when brewed it&#8217;s quite bitter.  They eat it with sweets that are too sweet, alternating bites of [...]]]></description>
			<content:encoded><![CDATA[<div class="image_frame"><a href="http://www.flickr.com/photos/foliosus/379949951/" title="Link to green tea cookies picture" class="external"><img src="http://farm1.static.flickr.com/52/379949951_9d7926a0d7_m.jpg" width="240" height="159" alt="Green tea cookies" /></a><span class="image_caption"><a href="http://www.flickr.com/photos/foliosus/379949951/" title="Link to green tea cookies picture" class="external">Green tea cookies</a></span></div>
<p>My upstairs neighbor gave us some macha: Japanese powdered green tea.  The Japanese are the only people on the planet who still drink this stuff — it&#8217;s a very primitive form of tea, and when brewed it&#8217;s quite bitter.  They eat it with sweets that are too sweet, alternating bites of too-sweet with sips of too-bitter, and it all balances out.</p>
<p>I like drinking macha, though; but I&#8217;d rather make delicious tasty desserts with it, like this one which I made this afternoon.  The recipe is based on the &#8220;Rich roll cookies&#8221; from Joy of Cooking.<span id="more-63"></span></p>
<div class="image_frame"><a href="http://www.flickr.com/photos/foliosus/379950035/" title="Link to green tea cookies picture" class="external"><img src="http://farm1.static.flickr.com/183/379950035_138c9d8557_m.jpg" width="240" height="159" alt="Green tea cookies" /></a><span class="image_caption"><a href="http://www.flickr.com/photos/foliosus/379950035/" title="Link to green tea cookies picture" class="external">Green tea cookies</a></span></div>
<h3>Rich green tea roll cookies</h3>
<ul class="ingredients">
<li>1 cup softened butter</li>
<li>2/3 cup sugar</li>
<li>1 egg</li>
<li>1 teaspoon vanilla</li>
<li>2¼ cups flour</li>
<li>1 tbsp. powdered green tea</li>
<li>1/2 teaspoon salt</li>
</ul>
<p>Cream together the butter and sugar.  Beat in the egg and vanilla.  Sift together the dry ingredients, and stir in to the butter mixture.  Since there is almost no water in the dough, don&#8217;t worry about over-working it.  When the dough has an even color and texture, form it into a ball and chill for 3-4 hours.</p>
<p>Preheat the oven to 350°.</p>
<p>Roll the dough out on a very, very lightly floured surface.  Too much flour is death for these cookies.  Cut them into your favorite shapes with a knife or cookie cutters.  Bake them on a cookie sheet that either has a piece of parchment paper on it or has been lightly greased, for 8-10 minutes or until the corners get slightly brown.</p>
<p>Eating them reminds me of being in Japan!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foliosus.com/2007/02/04/macha-cukkii-green-tea-cookies/feed/</wfw:commentRss>
		</item>
		<item>
		<title>I&#8217;m UBC&#8217;s botany photo of the day!</title>
		<link>http://www.foliosus.com/2007/01/18/im-ubcs-botany-photo-of-the-day/</link>
		<comments>http://www.foliosus.com/2007/01/18/im-ubcs-botany-photo-of-the-day/#comments</comments>
		<pubDate>Fri, 19 Jan 2007 02:25:53 +0000</pubDate>
		<dc:creator>Brent Miller</dc:creator>
		
		<category><![CDATA[Plants]]></category>

		<guid isPermaLink="false">http://www.foliosus.com/2007/01/18/im-ubcs-botany-photo-of-the-day/</guid>
		<description><![CDATA[
Many thanks to Daniel Mosquin from the UBC Botanical Garden for choosing my photo of Zantedeschia aethiopia, also known as the calla lily, for today&#8217;s photo of the day.  Woohoo!
For the record, I shot this image in western Australia, where the calla lily is highly invasive and is causing quite a bit of ecological [...]]]></description>
			<content:encoded><![CDATA[<div class="image_frame"><a href="http://www.ubcbotanicalgarden.org/potd/2007/01/zantedeschia_aethiopica_1.php" title="Go to the UBC BPoTD"><img src="http://farm1.static.flickr.com/36/82857035_0e313f7cd0_m.jpg" width="240" height="159" alt="Zantedeschia aethiopica (Araceae); Calla lily" /></a></div>
<p>Many thanks to <a href="mailto:daniel.mosquin@ubc.ca">Daniel Mosquin</a> from the <a href="http://www.ubcbotanicalgarden.org/">UBC Botanical Garden</a> for choosing my photo of Zantedeschia aethiopia, also known as the calla lily, for <a href="http://www.ubcbotanicalgarden.org/potd/2007/01/zantedeschia_aethiopica_1.php" title="Go to the UBC BPoTD">today&#8217;s photo of the day</a>.  Woohoo!</p>
<p>For the record, I shot this image in western Australia, where the calla lily is highly invasive and is causing quite a bit of ecological upheaval in the tuart forests.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foliosus.com/2007/01/18/im-ubcs-botany-photo-of-the-day/feed/</wfw:commentRss>
		</item>
		<item>
		<title>New page in my portfolio</title>
		<link>http://www.foliosus.com/2006/12/10/new-page-in-my-portfolio/</link>
		<comments>http://www.foliosus.com/2006/12/10/new-page-in-my-portfolio/#comments</comments>
		<pubDate>Mon, 11 Dec 2006 00:34:13 +0000</pubDate>
		<dc:creator>Brent Miller</dc:creator>
		
		<category><![CDATA[Design]]></category>

		<category><![CDATA[Site Administrativa]]></category>

		<guid isPermaLink="false">http://www.foliosus.com/2006/12/10/new-page-in-my-portfolio/</guid>
		<description><![CDATA[
Although this page went live a little while ago, I&#8217;ve just gotten around to writing it up.  A scientist at the University of Santa Barbara contacted me about making a professional page for her.  I&#8217;ve added it to my portfolio.  I&#8217;m particularly happy about the image at the bottom of the page [...]]]></description>
			<content:encoded><![CDATA[<div class="image_frame"><a href="/portfolio/tyler/" title="Link to my description of Claudia Tyler's home page"><img src="/wp-content/uploads/2006/12/tyler_sm.jpg" alt="Thumbnail of Claudia Tyler's site" /></a></div>
<p>Although this page went live a little while ago, I&#8217;ve just gotten around to writing it up.  A scientist at the University of Santa Barbara contacted me about making a <a href="http://www.icess.ucsb.edu/~tyler/" title="Claudia Tyler's home page">professional page</a> for her.  I&#8217;ve <a href="/portfolio/tyler/" title="My description of her page">added it to my portfolio</a>.  I&#8217;m particularly happy about the image at the bottom of the page behaves: use a big screen and make your browser window wide.  Very wide.</p>
<p>I hope that the page will help Claudia advertise her work both to other scientists as well as to potential students and field assistants.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foliosus.com/2006/12/10/new-page-in-my-portfolio/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Plant-inspired architecture</title>
		<link>http://www.foliosus.com/2006/11/30/plant-inspired-architecture/</link>
		<comments>http://www.foliosus.com/2006/11/30/plant-inspired-architecture/#comments</comments>
		<pubDate>Fri, 01 Dec 2006 06:35:41 +0000</pubDate>
		<dc:creator>Brent Miller</dc:creator>
		
		<category><![CDATA[Ephemeral]]></category>

		<category><![CDATA[Plants]]></category>

		<guid isPermaLink="false">http://www.foliosus.com/2006/11/30/plant-inspired-architecture/</guid>
		<description><![CDATA[
I can&#8217;t resist, this is too good to be true: there is such a thing as an urban cactus.  It&#8217;s a housing project in Rotterdam, based on a cactus.  By placing the balconies as the architects did, every resident gets a double-height outdoor space and more sunlight than they would with a typical [...]]]></description>
			<content:encoded><![CDATA[<div class="image_frame"><a href="http://archidose.blogspot.com/2006/10/half-dose-30-urban-cactus.html" title="Read more about the urban cactus"><img src="/wp-content/uploads/2006/11/urban_cactus.jpg" alt="Urban cactus" /></a></div>
<p>I can&#8217;t resist, this is too good to be true: there is such a thing as an <a href="http://archidose.blogspot.com/2006/10/half-dose-30-urban-cactus.html" title="Read more about the urban cactus">urban cactus</a>.  It&#8217;s a housing project in Rotterdam, based on a cactus.  By placing the balconies as the architects did, every resident gets a double-height outdoor space and more sunlight than they would with a typical balcony.  I think it&#8217;s brilliant.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foliosus.com/2006/11/30/plant-inspired-architecture/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
