July 31st, 2008
For example:
I have a model Partner and I have a parter section of the site I’m building so I created a namespace Partner.
That results in lots of these:
inflector.rb:298: warning: toplevel constant SignupsController referenced by Partner::SignupsController
and that results in lots of these:
:(
Jeremy Voorhis Says:
June 30, 2006 at 10:04 am
In Ruby, you cannot have a class and a module with the same name.
More here.
Posted in Uncategorized | No Comments »
June 9th, 2008
Monica built her own website when she became a freelance writer. She hosted it on WordPress and that was fine. Except it kinda sucked that she had to spend her time doing that instead of pitching to editors. Along with that it was really lucky that she had the skills necessary to wrangle WordPress and I had a server and the knowledge to install it.
We decided to fix that problem for other writers and we created Writer’s Residence. The site is a tool that we hope does one thing well, help writer’s create and host their own writing portfolio is 30 minutes or less.
When you sign up you get an address like http://monicashaw.writersresidence.com so you’re ready to get your site out to editors with no further expense. If you want to bring your own domain you can hook that up to so you can have a Writer’s Residence portfolio with an address like http://monicashaw.com
Anyway, it was fun to build and I learned a lot in the process.
We’re now learning how to market the site and I think that that is going to be a very steep learning curve.
Writer’s Residence
Posted in Uncategorized | No Comments »
May 28th, 2008
Technical details of permanent failure:
PERM_FAILURE: Gmail tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 550 550 SC-004 Mail rejected by Windows Live Hotmail for policy reasons. A block has been placed against your IP address because we have received complaints concerning mail coming from that IP address. If you are not an email/network admin please contact your E-mail/Internet Service Provider for help. Email/network admins, we recommend enrolling in our Junk E-Mail Reporting Program (JMRP), a free program intended to help senders remove unwanted recipients from their e-mail list: http://postmaster.live.com (state 13).
Oh good, Windows Live Mail is blocking Gmail’s IP address. How do I email my friend Priya now?
Fuckers.
More at the Gmail Help desk, apparently they know it is a problem and they’re working on it.
Posted in Uncategorized | 1 Comment »
May 27th, 2008
This leads to an interesting question.
Hrm…
This
or this
Decisions, decisions.
This unexpected expense probably rules out one of these:
In the mean time at least I can have the MacBook plugged into an external display so I can get on with shit.
Posted in Uncategorized | No Comments »
May 27th, 2008
On the day I was scheduled to take my MacBook in for repairs to the wireless network interface and the top case I managed to write the entire damn thing off.
My own fault.
Yesterday we managed to kill our HiFi too.
Keep me out of the way of expensive technology for the foreseeable future please.
Posted in Uncategorized | 3 Comments »
May 15th, 2008
Handy:
In console:
Date::DATE_FORMATS.each_pair {|key, value|puts "#{key} => #{Date.today.to_s(key)}"}
Prints a list of each available format with an example.
short => 15 May
long => May 15, 2008
long_ordinal => May 15th, 2008
db => 2008-05-15
rfc822 => 15 May 2008
number => 20080515
Would be better as a rake task.
Posted in Uncategorized | No Comments »
May 15th, 2008
I’m scheming with Monica on a site for freelance and other writers. The idea came about because 1) Monica needed a portfolio site for her writing and couldn’t find a good solution online and 2) Monica couldn’t find a good way to track her story pitches and submissions.
We did a bit of research and figured that there are probably enough people out there that need the same things as Monica does to make a nice little income stream.
Today while taking a break from coding on this product I watched an talk that DHH gave at Startup School a little while back. I thought the talk was good, he talks about the importance of charging money for your product and getting paid. Obvious. No? But the audience to which he was speaking was to a group of people chasing the billion dollar start-up dream.
Some takeaways:
- a $1mil company is way easier a $1bn company
- the jump from 0 to $1mil will make more of a difference to your life than the jump from $1mil to $1bn
“Tell me, Gordon–when does it all end? How many yachts can you waterski behind? How much is enough?”
- you’ve got to charge money
- stay free of external funding and you get to remain in charge and enjoy yourself a whole lot more
Anyway, DHH digs into the model 37signals uses a bit too, monthly fees for small businesses is where they’ll stick. They’re down to 4 days per week too.
Link to presentation. I really like they way the slides are presented next to the speaker video.
Posted in Uncategorized | No Comments »
May 15th, 2008
tim@localhost:~/Development/getfree$ script/generate migration \
add_polymorphic_foreign_key_to_attachments resource_id:integer resource_type:string
exists db/migrate
create db/migrate/20080515094515_add_polymorphic_foreign_key_to_attachments.rb
tim@localhost:~/Development/getfree$ rake db:migrate
(in /Users/tim/Development/getfree)
== 20080515094515 AddPolymorphicForeignKeyToAttachments: migrating ============
-- add_column(:attachments, :resource_id, :integer)
-> 0.0422s
-- add_column(:attachments, :resource_type, :string)
-> 0.0150s
== 20080515094515 AddPolymorphicForeignKeyToAttachments: migrated (0.0731s) ===
So, that’s pretty cool. I wasn’t thinking very hard when I wrote this generate migration command but Rails just figured out that i must want to add these new fields to the attachments table based on the way I named the migration.
I didn’t know rails did this when I used it this way, in fact after I ran in the migration I was surprised it worked because I thought I’d forgotten to go in and tell it which table to add this fields to…
Actually, it’s not just pretty cool, that’s very cool.
Posted in Uncategorized | No Comments »
May 15th, 2008
My friend, and fellow New Zealander abroad, Julian Simpson is an extraordinarily capable build and deployment expert and he’s writing some fantastic stuff about how to do the right thing for your projects over at his new(ish) blog The Build Doctor.
I worked with Jules on refactoring some very gnarly Ant and CruiseControl builds a couple of years ago and I can’t recommend his advice enough.
In particular check out Julian’s series on Ant Best Practices.
Posted in Uncategorized | No Comments »
May 13th, 2008
Lifehacker blogged about Monica’s healthy foods shopping list and for a couple of hours last night while we were sleeping Wordpress collapsed under the load.
I’ve just installed WP Super Cache and will see how that goes.
On the whole the installation process was very straight forward.
http://ocaoimh.ie/wp-super-cache/
A couple of things to note:
The plugin installs some text into the .htaccess file that’s wrapped in conditionals that don’t seem to work in Apache2:
<IfModule mod_rewrite.c>
I deleted those.
Now we need some more of these spikes to see how it performs.
Oh, and I suppose I should get some monitoring set up.
Henry recommends pingdom.com and that might be a good option but I’m cheap so perhaps I can roll my own system using cron / wget and twitter API?
Posted in Uncategorized | 2 Comments »