Jay McGavren's Journal

2008-10-14

Oh, how I wish I'd had a PROPER camera with me...

A DSLR with a nice telephoto lens, or anything other than my cell phone camera, which took this huge moonrise and shoved it in a grainy corner of the image. Oh, well, here’s a cropped version.

Moon over Mt. McDowell

Read more...
2008-10-13

A trend toward violence...

Diana returned from her pulmonary function testing conference late last night. She didn’t have a terrible time, but I could tell the highlight for her was a stop she and her friends made at a Coach outlet store, rather than the conference itself. She described it as a madhouse - crowds of people (many of them Japanese tourists), staff scrambling to keep the disheveled stock in order, customers asking each other where they found that purse. I asked her if it matched the cliche image of a horde of women fighting over a clearance table. “No,” she said, “but my friend did get pushed once.”

“Wait a second,” I said, “she wasn’t pushed by an elderly Japanese woman, was she?” She was.

I’m reluctant to stereotype, but this is something several friends and I have noticed about older Japanese. A few weeks into my exchange trip there in 2002, several students reported incidents of getting elbowed aside (in my case, by a lady I didn’t even see beforehand). The culprits were both male and female, but always over 50. They never actually hurt their “victims”, but they were always spectacularly rude.

I don’t think it’s resentment toward gaijin, I’ve heard Japanese students mention the same thing. And besides, while they’re arguably entitled when US citizens are on Japanese soil, why do it over here? Are we supposed to “respect our elders” and get out of the way or something?

Read more...
2008-10-11

Git vs. Subversion on the family photo archive...

17,993 files, most of them .jpg and .avi…

SVN repo: 36.8 GB .git directory: 30.1 GB (Git wins) SVN working copy: 47 GB Git working copy: 23.5 GB (Git wins a LOT.)

Read more...
2008-10-10

ActiveSupport, only when you need it...

I’m betting Rails enthusiasts would like to have access to ActiveSupport core extensions all the time, even when working in regular Ruby. But on my box, “require ‘activesupport’” incurs a 6-10 second delay, so I don’t really want to load it every time I bring up irb.

So I’m putting this in my Utility package:

module DeferredActiveSupport
	def method_missing(method, *arguments, &block)
		require 'activesupport'
		if self.respond_to?(method)
			self.send(method, *arguments, &block)
		else
			raise NoMethodError.new("#{method} not defined")
		end
	end
end

class String
	include DeferredActiveSupport
end

class Object
	include DeferredActiveSupport
end

#Other classes as desired...

Which lets me do this:

puts ({:foo => 'bar', :baz => 'glarch'}).to_json
puts 'foo'.titleize
puts 'test'.pluralize
puts 'large_pepperoni_pizza'.camelize

Yielding:

{"foo": "bar", "baz": "glarch"}
Foo
tests
LargePepperoniPizza

Read more...
2008-10-08

Was Googling a bit to see if anyone else had ever considered naming their computer “Chiark Hub” (answer: 2 people have). I came across a quote I’d read before, but not realized the relevance of:

"In all the human societies we have ever reviewed, in every age and in every state, there has seldom if ever been a shortage of eager young males prepared to kill and die to preserve the security, comfort and prejudices of their elders, and what you call heroism is just an expression of this fact; there is never a scarcity of idiots." --Iain M. Banks, Use of Weapons

Read more...