You are here: Blogsphere Longtail

Rails BlogSphere

BlogSphere

Keep up to date with your favourite Rails bloggers in context.

Read more about how it works


REST Anti-Patterns [del.icio.us]

by Brent Sordyl | about 2 hours ago | Read more

To many people, REST simply means using HTTP to expose some application functionality. The fundamental and most important operation is an HTTP GET. A GET should retrieve a representation of a resource identified by a URI.

Christophe-maximin WTF of the day: The Salt Lake Tribune

by Christophe Maximin | about 2 hours ago | Read more

A 7-year-old girl was killed in a drive-by shooting on Salt Lake City’s west side Sunday evening.
Police are on the scene and have cordoned off about a block of 800 West Street near Fremont Avenue, where the shooting took place about 6:30 p.m. The shooting was gang-related but the girl was not the intended victim, said Salt Lake City police Lt. Isaac Atencio.

NO SHIT CAPTAIN OBVIOUS.
I thought a lot of 7-year-old girls were related to gang activities !


The Salt Lake Tribune: Young girl killed in drive-by shooting on Salt Lake City’s west side

What do you not like about agile?

by Devender Gollapally | about 2 hours ago | Read more

Somebody recently asked me, “What do you not like about agile?”, I thought about it and here’s what I think. My first pet peeve, this is not something wrong with agile, but more to do with the literature on agile and its proponents, they do not stress enough on the fact that this is not a [...]

BMW Kinetic Sculpture: Artistically Subtle and Esthetically Beautiful

by John S. Kim | about 3 hours ago | Read more

BMW recently opened a museum in Munich. They are showcasing a kinetic sculpture composed of 714 metallic orbs hanging from the ceiling with thin wires that allows the orbs’ movements to be controlled. By distributing the orbs evenly across the horizontal plane and controlling the vertical axis with the wires, orbs can be coordinated to [...]

Bluemtns Not dead...

by Taryn East | about 3 hours ago | Read more

I'm not dead - just been In Thailand. I'll post again when I get up to speed.

Co-working in Austin [del.icio.us]

by Brent Sordyl | about 3 hours ago | Read more

Conjunctured will be open Monday through Saturdays, 9 a.m. to 9 p.m. and will offer coffee, Wi-Fi Internet access, printing services and snacks for a monthly fee that ranges from $175. Walk-in clients will be able to work at Conjunctured for $25 a day.

NEVER TELL A VC. . .

by Alexander Muse | about 3 hours ago | Read more

Wow, Rick Segal (the Steve Segal of venture capital) is on a roll.  His latest post offers entrepreneurs advice on which questions they should NEVER answer: Who else are you speaking to? [Answer: The usual suspects.] What pre-money value did you have in mind? [We are looking for a deal that provides great returns for all of [...]

Ever wonder what a letter of intent for VC funding looks like?

by Alexander Muse | about 3 hours ago | Read more

Rick Segal posted an example letter of intent (as opposed to a term sheet) that I thought was worth reading: Dear Dave, Thanks for taking time out of your schedule to meet with my partners and I regarding NewCo. I know a second meeting is a pain but it went very well. We think you did a [...]

FriendFeed API call tester [del.icio.us]

by Brent Sordyl | about 4 hours ago | Read more

All the form submissions below will prompt you for HTTP Basic Auth credentials. Enter your FriendFeed nickname as the username and your FriendFeed Remote Key for the password.

Four words not to say to Mark Cuban. . .

by Alexander Muse | about 4 hours ago | Read more

Mark Cuban suggests, “I just want to put it out there to save everyone and anyone who deals with me time. If at any point in time you utter the words “Just Don’t Get It” or “Just Doesn’t Get It” in any conversation with me, I will not do business with you.” My advice, don’t tell [...]

Headshot2 @supaben34 Heh :-) Will be ou…

by Damien McKenna | about 4 hours ago | Read more

@supaben34 Heh :-) Will be our first visit home in 3 years, I’m psyched.

Drought in California !!!!!!!!!!!!

by Venu | about 4 hours ago | Read more

For the first time in 17 years state-wide drought has been declared urging all Californians to reduce their water usage by 10% to avoid mandatory rationing later this year. Here are some tips: Turn off water tap when brushing or doing dishes. You will save 2.5 gallons every minute. Take shorter showers. [...]

Data streams, part 1

by Andrew Koster | about 5 hours ago | Read more

American Scientist has an article in their latest issue that talks about the algorithmic difficulties of processing streams of data. It begins by talking about how search engines identify the most popular people (”The Britney Spears problem”), and then goes on to use simple number streams to explain the subject. I was making progress in reading [...]

Ryan-orange-large Checking out identi.ca (identi.ca/slant)

by Ryan L. Cross | about 5 hours ago | Read more

Checking out identi.ca (identi.ca/slant)

Ryan What's New in Edge Rails: Custom Length Validation Tokenizer

by Ryan Daigle | about 5 hours ago | Read more

The various ActiveRecord validation methods are some of the hardest working bits of ActiveRecord and yet they get so little love. In what may be a little-noticed change, you can now specify how validates_length_of parses the attribute value. While the default behavior is to just count the number of characters in the attribute value, you can now also do something like this to make sure the value has a minimum number of words:

1
2
3
validates_length_of :article, :minimum => 10,
  :too_short => "Your article must be at least %d words in length.",
  :tokenizer => lambda {|str| str.scan(/\w+/) }

Just pass a proc to the :tokenizer option that chops the attribute value into its relevant parts for measure by the length validation routine. You can do most anything, like ensure a minimum or maximum number of vowels, digits etc…

tags: ruby, rubyonrails

<map name="google_ad_map_7KKLrtCAfYP6eFLUXdU-CyjJEzU_"><area href="http://imageads.googleadservices.com/pagead/imgclick/7KKLrtCAfYP6eFLUXdU-CyjJEzU_?pos=0" shape="rect" coords="1,2,367,28" /><area href="http://services.google.com/feedback/abg" shape="rect" coords="384,10,453,23" /></map>

RubyKaigi 2008 News: 1.9.1 In December, Ruby Heading For ISO Standardization

by Peter Cooper | about 5 hours ago | Read more

(Credit: june29 - photo under CC 2.0 Attribution license) RubyKaigi 2008 took place a couple of weeks ago. As the main Japanese Ruby conference, RubyKaigi is the de-facto authoritative Ruby conference, and the news that came out of the conference this year did little to shake its stature. The online enterprise news publication InfoQ has covered the [...]

links for 2008-07-07

by Vishnu Gopal | about 5 hours ago | Read more

quipt - Google Code (tags: quipt javascript caching web development)

links for 2008-07-07

by Mike Pence | about 5 hours ago | Read more

AddThis - #1 Social Bookmarking Sharing Button - Del.icio.us Digg Facebook Widget (tags: bookmarking social) The LinkedIn Blog: Web Scalability Practices: Bumper Sticker on Rails (tags: scalability rails) technoweenie’s masochism at master — GitHub NoiseBot.com - Catalog of Funny T-Shirts, Hoodies & Tote Bags - New Designs Every Week! Yahoo! UI Library: Base CSS (tags: yui) [...]

Backing up with S3

by Dave Grijalva | about 5 hours ago | Read more

Last night, I threw together a little script for backing up content from my web server to Amazon S3. It’s not really feature complete, but it is good enough for what I need for now. It provides a very simple DSL for specifying what content should be backed up. Download it here. To specify content: backup [...]

Reading the Service Tag or Serial Number in Ruby

by glenn west | about 5 hours ago | Read more

I want to "do" a inventory of "all" my equipment. (Yes It will eventually be a Rails app), but the first issue is gettig all the "service" tags, and updating them on the fly. If you search, you'll find plenty of examples in vb or python, but not very many. (Read none) in ruby. So I decided to see if I could do it.

First I liked the ruby-wmi package, that gives a activerecord flavor to wmi. WMI is windows standard "Instrumentation" library, where you can find out all too many facts about a windows system.

Next a little "code" of my own to show "how" to do it. Implemented as a class on top of ruby-wmi, with some basic "caching" to make the overhead smaller.

require 'ruby-wmi'
require 'pp'

# Reference URL's
# http://www.vbforums.com/showthread.php?t=326425
# http://ruby-wmi.rubyforge.org/doc/classes/WMI/Base.html
# http://mentalpagingspace.blogspot.com/2008/01/ruby-class-tutorial-using-unify-dbi.html

class ManagePC

def initialize(ipaddress)

@myip = ipaddress
@biosv = WMI::Win32_BIOS.find(:all,:host=>@myip)
@csysv = WMI::Win32_ComputerSystem.find(:all,:host=>@myip)
@netv = WMI::Win32_NetworkAdapterConfiguration.find(:all,
:conditions => 'IPEnabled = True')
return

end #initialize

def prtnetvalues()
@netv.each do |netx|
netx.properties_.each do |p|
value = netx[p.name]
if value
if value.class == Fixnum
value = value.to_s
end
if value.class == Array
value = value.to_s
end
if value.class == TrueClass
if value
value = "True"
else
value = "False"
end
end
theprop = p.name + "="
theprop << value
puts theprop
end
end
end
end # prtnetvalues()

def prtcsysvalues()
@csysv.each do |csys|
csys.properties_.each do |p|
printf "#{p.name} = #{csys[p.name]}\n"
end
end
end # prtcsysvalues()


def netvalue(name)
@netv.each do |netx|
netx.properties_.each do |p|
if p.name == name
return netx[name]
end
end
end
return nil
end

def csysvalue(name)
@csysv.each do |csys|
csys.properties_.each do |p|
if p.name == name
return csys[name]
end
end
end
return nil
end

def macs()
mymacs = Array.new
current_mac = nil
@netv.each do |netx|
netx.properties_.each do |p|
if p.name == "IPAddress"
current_mac << netx[p.name].to_s
end
if p.name == "MACAddress"
current_mac << netx[p.name]
end
if p.name == "Caption" # A new network interface
if current_mac
mymacs << current_mac
end
current_mac = Array.new
end
end
end
mymacs << current_mac
return(mymacs)
end


def domain()
return csysvalue("Domain")
end

def model()
return csysvalue("Model")
end

def name()
return csysvalue("Name")
end

def domain?()
return csysvalue("PartOfDomain")
end

def username()
return csysvalue("UserName")
end

def memory()
return csysvalue("TotalPhysicalMemory")
end

def servicetag()
@biosv.each do |bios|
bios.properties_.each do |p|
if p.name == "SerialNumber"
return(bios[p.name])
end
end
end
return(nill)
end #GetServiceTag

end #ManagePC


mypc = ManagePC.new("127.0.0.1")
puts mypc.servicetag
puts mypc.domain
puts mypc.model
puts mypc.name
puts mypc.username
puts mypc.memory
pp mypc.macs

Ryan What's New in Edge Rails: Collection Partial Variable Naming

by Ryan Daigle | about 5 hours ago | Read more

From the little-but-useful department comes a new addition to Rails that lets you explicitly name the local variable exposed to a partial template when using a collection partial. So, for instance, in this statement:


render :partial => 'employees', :collection => @workers, :as => :person

each element of the workers collection will be exposed as person within the employees template. No longer are you hostage to the singular inflection of your collection name.

tags: ruby, rubyonrails

<map name="google_ad_map_yx5m11otqG3stIaoj3tfVZrhQ1s_"><area href="http://imageads.googleadservices.com/pagead/imgclick/yx5m11otqG3stIaoj3tfVZrhQ1s_?pos=0" shape="rect" coords="1,2,367,28" /><area href="http://services.google.com/feedback/abg" shape="rect" coords="384,10,453,23" /></map>

Headshot2 Holy crap! We’re going to my b…

by Damien McKenna | about 5 hours ago | Read more

Holy crap! We’re going to my brother’s wedding! F Yeah!

Me hard times

by John Reilly | about 6 hours ago | Read more

Jane (hungry): What can I get if I show you my boobs?
Bartender: (plops down a 50¢ bag of chips on the table)
Jane: WTF!?
Me: Well, we are in a recession...

links for 2008-07-06

by Tom Armitage | about 6 hours ago | Read more

Big Contrarian “Big Contrarian is a weblog by Jack Shedd, a designer and a developer in the process of moving to Chicago, IL.” Beautiful, and full of great - and varied - content. (tags: via:gruber via:tomtaylor blog weblog design subscribed) Shneiderman’s Eight Golden Rules of Interface Design “These rules were obtained from the text Designing the User Interface by [...]

Me installing git man pages

by John Reilly | about 6 hours ago | Read more

In a previous post, I was confused on how to install the latest git man pages after updating my git installation.  Turns out to be a single command! 

$ git archive origin/man | sudo tar -x -C /usr/local/share/man

Pretty awesome. The git maintainers made this very easy, as they’ve got a ‘man’ branch that contains the latest auto-generated man pages. A simple copy-through-tar technique gets it all installed.

This makes a couple assumptions:

  1. Your remote is named “origin” (which it will be, assuming you did a default clone).
  2. You want to install whatever docs are at the HEAD of origin/man (double check the commit messages to make sure you’re getting the right set of auto-generated docs).
  3. Your man pages live in /usr/local/share/man (Mine were there, as my first install followed the directions in Tim Dysinger’s Installing GIT on Mac OS X 10.5 Leopard article).  You can alter the output path as you need.
Hot times.  I’m now sportin’ git v1.5.6.2, plus the associated docs.

Python - create daemon

by Diego Cibils | about 6 hours ago | Read more

Python - create daemon

I'm doing the friendfeed thing

by Bryan Liles | about 6 hours ago | Read more

Friendfeed is giving more of that information I crave, and now I’m participating toohttp://friendfeed.com/bryanl.

N1402320540_7550 “Allthough there are certain tells.. You have to wait....

by Daniel Hammond | about 6 hours ago | Read more



“Allthough there are certain tells.. You have to wait. Because… youuu…….. I’m requesting time like I have to think about it”

Priceless. Of course it has to be a congressman’s son.

386788613_67447d633b_m Book Review: Secrets of the Rock Star Programmers

by Ted Davis | about 6 hours ago | Read more

Not many secrets revealed in this book, more-so just a collection of formulaic interviews. The author sits down with a little over a dozen industry celebrities and presents them with a thematic collection of questions, which are conveniently cataloged and charted by interview in an appendix. Admittedly I didn't know half the subjects in the book - I knew of their accomplishments, their

Distributing initial configuration information

by Phillip Pearson | about 7 hours ago | Read more

One thing I've never seen satisfactorily explained for distributed fault-tolerant web apps is how to distribute configuration information. For example, if you have a cluster of web servers and a pair of MySQL database servers in dual-master-single-writer configuration (both configured to replicate from each other for easy failover, but with only one handling writes), how do the web servers figure out who the master should be? Especially, when a master server goes down, then comes back online (possibly in an inconsistent state), how does it know whether it should become active again or not?

One failure model I have in mind is where you have [clusters of] servers in different locations, such that you need to change DNS to fail over from one location to another. In this case, some clients may still have the old IP address for your website in their cache, so if a colo loses its network connection and the site fails over to a different colo, but then the initial colo comes back up, it needs to know ASAP whether it's meant to be serving traffic or redirecting to the other location, or there's a danger that it will accept updates from clients, which will be hard to reconcile later. (Assuming you're not using an 'eventual consistency' model, in which case the system will probably sort things out by itself).

Also, say each cluster hosts DNS. A cluster that has recently lost its network connection shouldn't start serving DNS immediately upon going back online, in case a failover operation has resulted in records changing.

What I'd like [to build?] is a service that distributes configuration information between hosts, in such a way that the hosts can determine whether they are safe to go online or not, and which hosts are currently authoritative. So when a web host starts up, it can conclusively figure out where its database servers are and whether it should be redirecting (or answering at all), and when a master database host starts up, it can conclusively figure out whether it should accept updates from clients or whether it should rebuild itself from a new master.

The best lead I have so far is the Paxos algorithm, and Google's Chubby filesystem/lock manager. I think the trick will be for each host to maintain a local database of settings (host locations, active colos etc), versioned with the Paxos proposal number, and to continuously poll other hosts. When a host loses contact with enough other hosts to not have a quorum for Paxos, it should deactivate itself.

I haven't thought this through well enough yet, though. Another interesting thing to try would be for all hosts to determine network connectivity, and to vote on what other hosts/colos are down, to determine what to do with DNS and database master selection...

Comment

Blog all dog-eared pages: Regarding The Pain Of Others, Susan Sontag

by Tom Armitage | about 7 hours ago | Read more

Regarding the Pain of Others is a long-form essay by Susan Sontag, examining the representation of suffering (and notably warfare) through the display of photographs. Published in 2003, in many ways, it is a follow up to some of the ideas examined in her earlier On Photography. On Photography is one of my favourite books on [...]

signs and wonders?

by Andreas Happe | about 7 hours ago | Read more

So, it’s that time of year again. I went home early, lightened up some candles, opened a bottle of wine (thanks dad, even if you don’t know it yet), sat on my ledge my guitar in my arms and doing the thing that I’d like to call practicing. Then the clock turned midnight: my birthday. Again. [...]

666 a devils number ?

by Glenn Verhalle | about 7 hours ago | Read more

Some consider 666 the number of the devil (it was also the price Apple sold its first computer for, the Apple 1: $666,66). Many web designers and developers of web applications think Internet Explorer 6 is a bit devilish…(and they’re right ). Well by now at least 2 big names dropped support for IE 6 : [...]

Album At the Giants vs. Dodgers game. So hot that we’ve had several requests for pants status: off

by Cameron Walters | about 7 hours ago | Read more

At the Giants vs. Dodgers game. So hot that we’ve had several requests for pants status: off

Halven video…VCR for the win!

by Diego Cibils | about 7 hours ago | Read more



Halven video…VCR for the win!

Me_tumblr "We clutter the earth with our inventions, never dreaming that possibly they are unnecessary—or..."

by Luke Crawford | about 7 hours ago | Read more

“We clutter the earth with our inventions, never dreaming that possibly they are unnecessary—or disadvantageous. We devise astounding means of communication, but do we communicate with one another? We move our bodies to and fro and incredible speeds, but do we really leave the spot we started from? Mentally, morally, spiritually, we are fettered.”

- Henry Miller, The World of Sex, 1940

Hadoop up and running... now what to do with it?

by Phillip Pearson | about 7 hours ago | Read more

I've had a pile of unused but relatively powerful (one Athlon 1333, one Athlon XP 2100+ and two Athlon XP 2800+) computers sitting around not doing anything for the last little while. I've been meaning to hook them all up together, along with the various laptops in the house, into some sort of cluster to play around with for a while. Finally got around to installing Hadoop on a couple of yesterday, so now I have a little mini-cluster here.

Hadoop is interesting; my initial expectation was that it would be a general distributed task/job handling system that happens to handle Map/Reduce type workflows, but from the looks of things it's more the other way around - it's completely built to run Map/Reduce jobs (in particular ones which handle large numbers of records from log files or databases) and can possibly be hacked to handle general distributed jobs.

The one distributed job I want to try to run on it doesn't quite fit the Map/Reduce model, but that's probably just because of how it's structured right now. It's an "embarrassingly parallel" type problem with lots of brute-force testing (machine learning stuff) that boils down to something like average { map { evaluate(best_of(map { test_candidate } find_candidates)) } (split $input) }.

I guess the way to do it is to run it as three consecutive Map/Reduce jobs.

1. Only Map: $sets_of_candidates = map { find_candidates } (split $input)

2. Map/Reduce: $best_candidates = best_of { map { test } ($sets_of_candidates) }

3. Map/Reduce: $evaluation = average { map { evaluate } ($best_candidates) }

An interesting observation is that while the model is named Map/Reduce, the initial step, splitting the data up, is really important too. I get the impression that much of the work that's gone into Hadoop has been in the area of intelligently dividing data between workers.

Comment

1859189134_2b04faaf19_m Feeddit now has digg topics support

by Andrew Nesbitt | about 7 hours ago | Read more

The first thing to come out of githorde is full support for individual topics from Digg, along with some nice speed improvements too. I uploaded the improvements last night so lets check them out. Topics If you go to the Topics Page you’ll see a list of all the topics that are currently on Digg, this is [...]

4761a1638aa18f8cb2d21d9340ce92b1?s=80&r=any eschaton

by Guilio Karadanais | about 8 hours ago | Read more

Ruby-brigade 9th July 2008 eschaton talk:
Please make any comments about the talk or what we are doing.

Helps with writing google map mashups in rails.

If you have a bug or issue check the list or help by reporting your bug or issue.

Get it...

For Rails 2.1 and up
script/plugin install git://quiver.cuspcode.net/eschaton.git
script/plugin install git://quiver.cuspcode.net/quiver_core.git

Older versions of Rails
cd vendor/plugins
git clone git://quiver.cuspcode.net/eschaton.git
git clone git://quiver.cuspcode.net/quiver_core.git

Get going...

Generate a map, look at the files the generator created and play a bit
script/generate map

Then visit the map at http://localhost:3000/map


Tell us what you think of the new BlogSphere feature. We are continually looking to improve and update the functionality based on your feedback.

Job Board

Job Boards
Find your next Ruby on Rails project or job.
Exclusive content, regularly updated - onsite and tele-working positions listed.

View the opportunities

Latest from the Weblog

Recent Recommendation

Marshall Sontag:

My go-to man for rails questions.

- Sbubble J.Z, United States