Archive for the ‘ruby’ tag
Agile Startup Tools
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
Pivitol Blabs
I just read the entire Pivitol Blabs Blog. Interesting.
Ruby on Rails 2.0 is OUT!
Get it now.
gem install rails -y
Ruby Threads
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.”
Dusting Off My Ruby Skills
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.