Kevin Chiu

Things are only impossible until they’re not.

Archive for the ‘ruby’ tag

Agile Startup Tools

without comments

Jack Po, an experienced entrepreneur and local friend of mine, just posted some tools startups might find useful. While I agree with most of what he has to say, some healthy horizon-broadening is in order.

I’m new to the startup scene, but I’ve always been a tech guy. Here are my tools:

Website Registration: 1and1 has free private registration that you can toggle on or off. $7 is the base fee for a .com.

Website Hosting: Engine Yard (for rails), SliceHost (for custom stuff), Media Temple (for shared hosting), Google App Engine (easily scalable, but has had hiccups…)

DNS Hosting: I stick with whoever hosts my site. I’ve never had any problems.

Email, Calendar, Wiki, Internal Messaging: Google Apps

Actual Website: Ruby, Java, or Plain old HTML/CSS/jQuery

Phone: Skype, Grand Central (but GC keeps deleting my old messages… boo!), iPhone

Conference Calls: Skype - easy and free.

Surveys, Spreadsheets and Documents: Google Docs - The coolest part of this suite is the real-time collaboration. Plus, there’s a form-filler mode for the spreadsheet app that you can use to conduct surveys.

Newsletters: Google Groups (for continuous conversations) or Gmail email aliases with BCC (for periodicals).

Project Management: Lighthouse, Github, Google Code, Sourceforge, or just plain old face-time. I’m actually itching to build a way more intuitive project management system. But for now, I can live with these. (I used to use Basecamp, but it can be abused too easily…)

Website statistics: Google Analytics

Search Engine Optimization (SEO): Google Sitemaps

Code Tools: Linux Shell, TextMate, Eclipse

Computers: Apple Macs.

Presentations: Apple Keynote

Graphics: Adobe Photoshop CS3, Omnigraffle

Written by Kevin Chiu

August 18th, 2008 at 11:52 pm

Pivitol Blabs

without comments

I just read the entire Pivitol Blabs Blog. Interesting.

Written by Kevin Chiu

July 1st, 2008 at 2:48 am

Posted in Uncategorized

Tagged with ,

Ruby on Rails 2.0 is OUT!

without comments

Get it now.

gem install rails -y

Written by Kevin Chiu

December 7th, 2007 at 2:58 am

Posted in Uncategorized

Tagged with , ,

Ruby Threads

with one comment

Today, I encountered my first Ruby gripe.

Variables mapped from collection passed into Ruby threads are not independent of one another. If one thread changes the passed variable, all of other threads share the new variable.

Let’s suppose I have an Array of items = ["item 1", "item 2", "item 3"]

Here’s some code that takes each item in the array and does some processing on it, printing out “finished!” statements after each element is processed.

items.map{|item| Thread.new(item){  #process with variable execution time goes here  puts "#{item} finished!" }}

Let’s suppose the map task associated with “item 3″ starts last and ends first. Then the output could look like this:

item 3 finished!item 3 finished!item 3 finished!

The explanation for this peculiar behavior is detailed in Ruby Central’s Pragmatic Programmer’s Guide:

“A thread shares all global, instance, and local variables that are in existence at the time the thread starts.”

Written by Kevin Chiu

February 8th, 2007 at 3:30 am

Posted in Uncategorized

Tagged with ,

Dusting Off My Ruby Skills

without comments

I just finished writing my first non-trivial Ruby script.

It searches a website (more than a page) for pictures that match given search criteria and downloads the pictures along with meta data.

It’s only 61 lines long, and there are a bunch of comments and blank lines. It’s not complete yet, but the final version should be less than 100 lines long.

Our Railpad server was up for 288 days before I shut it down yesterday. I haven’t coded any significant Ruby code since I worked on Railpad, so this picture grabbing script was a much-needed refresher.

Written by Kevin Chiu

January 7th, 2007 at 4:49 am

Posted in Uncategorized

Tagged with ,