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


A few words from a “Graceful Authentic”

by Daniel Gibbons | 3 days ago | Read more

Hello Carrie and Danielle, I literally just finished reading your book Style Statement to discover that I am graceful authentic. Now, I cannot stop repeating it to myself (graceful authentic)-it’s just so me, I want to make copies and put it on my wall. It so adequately describes every aspect of my style, choices in life, [...]

Three-fourths of IITians are in United States

by Venu | 3 days ago | Read more

I read this stat recently and it made my heart weep. These are the best we produce and most of them are serving USA. At the same time I also came to know that in the past couple of years IIT and IIM graduates preferred to stay back in India. And that’s a great news. [...]

6661ef9d747db3af8896cd94959d717d Getting Started with Clojure and Aquamacs

by Paul Barry | 3 days ago | Read more

I just posted a short screencast on how to get started with Clojure and Aquamacs:

One of the fun features of Clojure, or any Lisp I suppose, is the interactive development workflow. As you can see in the video, you write code by creating expressions that define functions and then you evaluate those functions in the REPL (Read-Eval-Print-Loop). You can redefine a function at any time. You can imagine that if you had a production system running, you could connect to it via a REPL or something like that, evaluate some expressions that redefine functions that contain bugs, and the system would be fixed with no downtime.

Here's the contents of the ~/bin/clj script:

#!/bin/bash 

SRC_DIR=/Users/pbarry/src

CLOJURE_JAR=$SRC_DIR/clojure/clojure.jar
JLINE_JAR=$SRC_DIR/jline/jline-0.9.94.jar

if [ -z "$1" ]; then 
    java -cp $JLINE_JAR:$CLOJURE_JAR jline.ConsoleRunner clojure.lang.Repl    
else
    java -cp $CLOJURE_JAR clojure.lang.Script $1
fi

You don’t need story-points either

by Amit Rathore | 3 days ago | Read more

Or an estimation-less approach to software development I’ve had too many conversations (and overheard a few) about re-estimating stories or “re-baselining” the effort required for software projects. The latest one was about when it might be a good idea to do this re-estimation, and how, and what Mike Cohn says about it, and so on. The [...]

Run!

by Michael Erb | 3 days ago | Read more

It’s good to be able to walk away from an accident. Being able to run is gravy…especially on water!

Cookies by Design rocks.

by Rick Martinez | 3 days ago | Read more



Cookies by Design rocks.

Msncampzone Canon 1D Mark III

by Arie Meeldijk | 3 days ago | Read more

I was secretely looking for a replacement for my trusted Canon EOS 30D. The Canon 1D Mark IIn was looking rather good. Not too pricey on the used market, decent specifications, basically the same sensor technology as my 30D. But then I stumbled upon an ad by someone selling her Canon 1D Mark III to go [...]

Me_square Broken mirrors and fingernails

by Greg Donald | 3 days ago | Read more

Today on the way home I was ran off the road by a blue BMW driven by a young guy with brown hair. He came flying around the corner on my side of the road and would have hit me had I not swerved over in time. Swerving over caused me to side-swipe a large plastic trash can sitting out very close to the road. The impact with the trash can snapped my passenger side mirror right off. ...

http://destiney.com/blog/broken-mirrors-fingernails

BBC's Cloud Clicks; More SaaS for the rest of us

by Alain Yap | 3 days ago | Read more

Part of LG Ad; Thanks to Szymon

I honestly think TV still has quite a great many punches left. Yes, I've been spending way too much time in front of a keyboard and even if it isn't much of a difference, 'sitting back and letting the reins' by turning on the box can also help me re-charge a bit.

Funny thing is, seems like web is out to get me as I can't get past BBC's Click. Check their top cloud links.

SaaS: The Hunters and Farmers Can any person or worker actually do everything and be successful on the SaaS field? Maybe, but having roles to play can be more efficient.

SaaS for those who still don't get it
.

Open Source, GPL and SaaS from Mike Beckerle. I do believe this is going to be a source of a lot of discussions and people better start now.

More SaaS pricing itself out

Avatar128 Background Processing in Rails Using 'at'

by Erik Peterson | 3 days ago | Read more

So here's a fairly typical problem that happens in the Rails world: you have a long-running process that you need to offload/queue up, and you don't have time to fuck around with some kind of elegant solution. Before, either I'd just make the user eat it and wait for the long request (at the risk of timing out the request and/or pissing off the user), or figure out some way to procrastinate on implementing the feature in the first place.

But alas, I came to a situation that absolutely had to be offloaded: a 50MB file import that takes about 3-5 minutes to process. The request is guaranteed to time out, and it is something that will be done fairly regularly. I'd love to tell my users "Hey, this shit is going to break, but it will be the best and most awesome breaking you've ever seen," but somehow I don't think that would fly. Damn. I don't want to screw around for two days trying to cook up some kind of "scalable" solution involving worker processes and messaging queues. I don't need scalability (this will be run 2 or 3 times a week, max), I just need it to work.

When faced with a problem like this, I think web developers in general underestimate the massive amounts of thought and effort that have gone into the systems that we use every day and generally take for granted. We tend to live in our own little bubbles and think that somehow, our problems are brand new, and that they've never been solved before. Well, guess what: almost all of them have been solved before, have been solved better, and are included in almost all Unix systems out there.

Enter at

If you have a command, and want to have it wait a tick before it starts working, and want the work of several jobs to be handled in some kind of sane fashion, at is the perfect solution. Like most things Unix, at is pretty damned simple. You have a set of commands in some kind of a file. You want to execute them at some date in the future. You send those to at: at -t 07021824 -f /path/to/my/commands. That's pretty damned beautiful.

Now, putting it in Rails is actually damned easy. I wrote a 3-line method in my ApplicationController so that I can offload any arbitrary command. Take a look at this awesome sauce:


def offload(command)
  job_id = MD5.hexdigest("#{command}+#{Time.now.to_i}+#{$$}")
  `echo "#{RAILS_ROOT}/script/runner -e #{RAILS_ENV} \\"#{command}\\"" > /tmp/#{job_id} &&
   at -t #{1.minute.from_now.strftime("%m%d%H%M")} -f /tmp/#{job_id}`
end

Every time I need to offload some arbitrary command, all I do is pass it to offload: offload("Part.import_bom('#{massive_file}')"). Simple as pie.

Scaling? You say you want scaling? You have 3 application servers that you want to dish these offloaded processes to as equitably as possible? You are also as lazy as I am? Awesome:


APP_SERVERS = ["172.16.200.50", "172.16.200.51", "172.16.200.52"]
def offload(command)
  job_id = MD5.hexdigest("#{command}+#{Time.now.to_i}+#{$$}")
  `ssh user@#{APP_SERVERS[rand(APP_SERVERS.size)]} "echo \\"#{RAILS_ROOT}/script/runner -e #{RAILS_ENV} \\\\"#{command}\\\\"\\" > /tmp/#{job_id} &&
   at -t #{1.minute.from_now.strftime("%m%d%H%M")} -f /tmp/#{job_id}"`
end

Now you've got your distributed job queue implemented. Three lines of code. Win.

Sidenote: If your dev machine is running OSX like mine is, and you want this to work, you're going to have to run the command sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.atrun.plist and restart before this stuff will work locally.

Autotest and KNotify

by Peter Sarnacki | 3 days ago | Read more

I’ve configured KNotify to work with ZenTest. To see knotify messages just drop below code to ~/.autotest


module KDENotify
 def self.span str, color
   "<span style=\"color: #{color}\">#{str}</span>" 
 end

 def self.notify title, msg, color
   system "dcop knotify default notify " +
          "eventname '#{span(title, color)}' '#{span(msg, color)}' '' '' 16 2" 
   end

 Autotest.add_hook :ran_command do |at|
   if at.results.split("\n").last.first =~ /([0-9]+\sexamples,\s([0-9]+)\sfailures?(,\s([0-9]+) pending)?)/
     message, failures, pending = $1, $2.to_i, $4.to_i
     if failures > 0
       notify "Tests failed", message, "darkred" 
     elsif pending > 0
       notify "Tests passed with some tests pending", message, "goldenrod" 
     else
       notify "Tests passed", message, "darkgreen" 
     end
   end
 end
end

Twitter Updates for 2008-07-02

by Marcus Ahnve | 3 days ago | Read more

Setting up traditional telephone services is strangely complicated. It is like I am asking them to build me a space ship. # Telia just called to tell me they cannot give me phone numbers for our new office. Simply unbelievable. # Hey Twitterers, I am on FriendFeed also, if Twitter would happen to be down. http://friendfeed.com/mahnve # @dalmaer [...]

wham-bam-thank-you-spam

by James Adam | 3 days ago | Read more

Wham, Bam, Thank You Spam!

My ultra-secure commenting system has finally fallen foul of the malicious robots of spammers. They're probably terrorists, hijacking the precious interblah.net-page-rank fluids to build some kind of net-bomb. Unthinkable!

Anyway, this is good for me, because it forces me to develop some new stuff to counter the spam. And the first step is being able to delete snips. Here's my quick-n-dirty dynasnip for the moment:

(see raw code)

require 'vanilla/dynasnip'
require 'vanilla/dynasnips/login'

class Delete < Dynasnip
  include Login::Helper

  def handle
    return login_required unless logged_in?
    name = app.request.params[:snip_to_delete]
    snip_to_delete = Vanilla.snip(name)
    snip_to_delete.destroy if snip_to_delete
    "Snip #[snip 'name' cannot be found] has been deleted."
  end
  self
end

I've also added the link to the template, but this in turn raises some interesting, unanswered questions about how to take Vanilla.rb from an interesting toy into a proper web platform.

0 comments for wham-bam-thank-you-spam

Broadside for broadband | Mercury - The Voice of Tasmania [del.icio.us]

by Warren Seen | 3 days ago | Read more

THE cost and speed of broadband in Tasmania are at unacceptable levels and increased competition is urgently required to improve services, says Federal Communications Minister Stephen Conroy.

The ape 1.5 released

by David Calavera | 3 days ago | Read more

Yesterday I released a new version of The atom protocol exerciser. We have been working in order to simplify its architecture and create a modular system that anyone may extend.

Now it works from the command line as well the web interface. We've added some rake tasks that you can use for exercise your server implementation and you can select the output format just invoking the correct option:


 $ rake ape:go:text['service document uri']
 $ rake ape:go:html['service document uri']
 $ rake ape:go:atom['service document uri']

It allows some configuration options through its config file $APE_HOME/aperc:


Ape.conf[:REQUESTED_ENTRY_COLLECTION] = 'collection name'
Ape.conf[:REQUESTED_MEDIA_COLLECTION] = 'collection name'

And finally, this last release allows to create and add new tests easily. The test cases must to extend the Ape Validator class and override the validate method.


module Ape
  class CustomValidator < Validator
    def validate(opts = {}) end
  end
end

We've implemented a little system for select the variables to use in your tests, just call the requires_presence_of method into the class declaration and pass the variable name that you require.


module Ape
  class CustomValidator < Validator
    requires_presence_of :entry_collection #OR
    requires_presence_of :entry_collection => 'comments' #OR
    requires_presence_of :media_collection => {:accept => 'image/png'}
    #...

Once your custom validator is ready you just need to move it to $APE_HOME/validators.

But if you really want to learn how to write your custom validator you just need to take a look at the source code.

The ape 1.5 released

by David Calavera | 3 days ago | Read more

Yesterday I released a new version of The atom protocol exerciser. We have been working in order to simplify its architecture and create a modular system that anyone may extend.

Now it works from the command line as well the web interface. We've added some rake tasks that you can use for exercise your server implementation and you can select the output format just invoking the correct option:


 $ rake ape:go:text['service document uri']
 $ rake ape:go:html['service document uri']
 $ rake ape:go:atom['service document uri']

It allows some configuration options through its config file $APE_HOME/aperc:


Ape.conf[:REQUESTED_ENTRY_COLLECTION] = 'collection name'
Ape.conf[:REQUESTED_MEDIA_COLLECTION] = 'collection name'

And finally, this last release allows to create and add new tests easily. The test cases must to extend the Ape Validator class and override the validate method.


module Ape
  class CustomValidator < Validator
    def validate(opts = {}) end
  end
end

We've implemented a little system for select the variables to use in your tests, just call the requires_presence_of method into the class declaration and pass the variable name that you require.


module Ape
  class CustomValidator < Validator
    requires_presence_of :entry_collection #OR
    requires_presence_of :entry_collection => 'comments' #OR
    requires_presence_of :media_collection => {:accept => 'image/png'}
    #...

Once your custom validator is ready you just need to move it to $APE_HOME/validators.

But if you really want to learn how to write your custom validator you just need to take a look at the source code.

Banjo datastructures question

by Ry Dahl | 3 days ago | Read more

I require a data structure and search algorithm for storing and retrieving strings. An example of the search I want to do: if I store the strings "WHAT", "WHEN", and "WHA" and then query the data structure with the string "YOUWHOREISHAPPLETASTER" I should be returned "WHAT".

That is, the query string should find the maximal string in the database which whose characters all belong to the query string and are in the proper order, but not necessarily adjacent.

I've made a hacky implementation but I'd like some published algorithms to look at - perhaps there is something better.

Houston Startup Happy Hour

by Alexander Muse | 3 days ago | Read more

Ready to network with Houston’s growing network of entrepreneurs?  Check out their latest startup happy hour. When: Thursday, July 3rd 6-9PM Where: The Tasting Room @ River Oaks 2409 W. Alabama 7213.526.2242 Click here for more info.  The July Houston Startup [...]

Ipj6kg0tr60seydmsy5q94wd_500 Early Friday

by Tyler Love | 3 days ago | Read more

I’ve got the next two days off. Tomorrow I’m making myself play guitar and write code for non-work stuff, all day. I can’t wait…

Ingrid Betancourt a été libérée…

by Gregoire Lejeune | 3 days ago | Read more

Source : AFP L’armée colombienne a libéré mercredi dans le sud-est de la Colombie l’otage franco-colombienne Ingrid Betancourt, trois Américains et onze militaires colombiens détenus par la guérilla des Farc, lors d’une opération d’infiltration soigneusement planifiée. Lire la suire »

About_image The Not So Long Tail

by Jason Perkins | 3 days ago | Read more

A friend who once commented that Wired was the Cosmo of technology news would’ve appreciated the following from the article, “Study Refutes Niche Theory Spawned by Web,” in today’s Wall Street Journal:

Faithful readers of this column might recall its own skepticism about the idea when the book first hit the stores. In retrospect, “The Long Tail” seems to have followed the template of many Wired articles: take a partly true, modestly interesting, tech-friendly idea and puff it up to Second Coming proportions.

Startup Profile: Roov.com

by Alexander Muse | 3 days ago | Read more

Last year Micah Davis, Chris Capehart and Ethan Fisher started C3 Media Group and recently launched ROOV.com in Dallas.  Funding with around $500K in angel financing, the company operates an online community centered around faith.  They ask users, “Have you ever wondered who else at your church; …enjoys building web apps?  …has started a business? [...]

Wordees.

by Koen Van der Auwera | 3 days ago | Read more

Remember this one?

In het kort:

The Big Word Project is redefining words. Search for your word and link it to your website. Your website is then the new definition. (more)

Ik heb toen nifty gekocht en daardoor kreeg ik vorige week een mail in de bus.

Paddy van The Big Word Project is on tour in Europa. Belgie is zijn eerste stop en ik was vanmiddag de eerste in een rij wordees (word-owners).

Omdat Karmeliet naar mijn mening het beste/betere belgisch bier is en ge moet dat dan toch gedronken hebben als toerist, zijn we er een eentje gaan drinken in het patersvatje (Antwerpen). Tof gebabbeld (er was nog een vriend en vriendin bij, namen vergeten sorry) vervolgens een klein interviewtje gedaan en nog wat tof gebabbeld :)

De mens heeft ook twitter account, spijtig dat we niet hebben gegeten, anders was het een @twunch ;)

Fijn. Internetpeeps zouden dat meer moeten doen.

1teamalps1cmdejgea7p7okx_400 rimshot

by Dan Croak | 3 days ago | Read more



rimshot

Sporty me.

by Koen Van der Auwera | 3 days ago | Read more

Ongeveer 40 km. Dat heb ik vandaag gefietst. Straf eh!

  • Naar kantoor.
  • Van kantoor naar ‘t stad.
  • Van ‘t stad naar kantoor.
  • Van kantoor naar huis.

De rest van de avond voor dood in de zetel ...

2d

by Steven Ness | 3 days ago | Read more






2D atom.



Karl How Creationists Explain Evolution - SCARY

by Rick Bradley | 3 days ago | Read more

How Creationists Explain Evolution - SCARY: (posted by cardioid)

Karl Writers Mugs Block Print Gallery - HOME PAGE

by Rick Bradley | 3 days ago | Read more

Writers Mugs Block Print Gallery - HOME PAGE

Marze Coding Horror: Alan Turing, the Father of Computer Science

by Marcelino Llano Villa | 3 days ago | Read more



Coding Horror: Alan Turing, the Father of Computer Science

marsyas svn

by Steven Ness | 3 days ago | Read more




To install the latest Marsyas via svn (subversion) use the command:


svn co https://marsyas.svn.sourceforge.net/svnroot/marsyas/trunk marsyas




2158401659_9e87d23dcb_m Process Theatre

by Reginald Braithwaite | 3 days ago | Read more

You know how Bruce Schneier uses the term Security Theatre to describe measures designed to make us feel safer but not actually safer? I am going to start using the term Process Theatre. I trust you can grasp the meaning immediately.

As usual, Ruby is 100 times...

by Marcel Molina Jr | 3 days ago | Read more

As usual, Ruby is 100 times slower.

Mauricio Fernandez

100 yen in Hiroshima

by Marcel Molina Jr | 3 days ago | Read more

100-yen-in-hiroshima

100 yen in Hiroshima

The Unanswered Question by ...

by Marcel Molina Jr | 3 days ago | Read more

The Unanswered Question

Charles Ives

IM

by Marcel Molina Jr | 3 days ago | Read more

IM

Marcel - Have you seen this yet? http://www.youtube.com/watch?v=GrV2SZuRPv0
Marcel - It's pretty funny
Marcel - Although I don't think they made this as a joke :(

Paper Prototyping

by Marcel Molina Jr | 3 days ago | Read more

Paper Prototyping

Blizzo Blue Sage Realty Sucks, Apparently

by F. Morgan Whitney | 3 days ago | Read more

A coworker of mine has been looking to rent a new place in Colorado.  After a lot of searching they found a house they liked that is managed by Blue Sage Realty.  You can read for yourself, but he was treated horribly by them.  Despite the problems I am having with my house, I am [...]

Building a Carputer

by Jonathan Mulcahy | 3 days ago | Read more

Building a Car Computer, or a carputer as it is also know can be a daunting task, but also very rewarding. You will learn more things about your car than you ever knew before, and have a pretty cool system by the end of it.

Видеозаписи И.Н. Калинаускаса

by Oleg Dashevskii | 3 days ago | Read more

Продолжаю заливку.

Женская ситуация, Москва, 2008 г.

Лекция I: часть 1, часть 2.
Лекция II: часть 1, часть 2.
Лекция III: часть 1, часть 2.

2008년 7월 2일

by Heungseok Do | 3 days ago | Read more

  • 미소야 일본라면 싼맛에 먹어본다(식미투 me2photo)2008-07-02 19:12:15

  • 간만에 된장질(탐앤탐스 me2photo)2008-07-02 19:42:05

  • 아니나달라 버스타니까 라디오에서는 비오는 수요일에는 빨간 장미를 (me2sms 90년 분위기)2008-07-02 22:38:23
  • 이 글은 꽃띠앙님의 2008년 7월 2일의 미투데이 내용입니다.

    <!-- end of daily_digest -->

    664954 Optimiser les performances d’un site web

    by Camille Roux | 3 days ago | Read more

    Le mardi 8 juillet, je participe pour la 3ème fois aux Intellicore Tech Talks. Accompagné de Nicolas Chevallier, créateur de Allogarage et ingénieur Polytech’Nice-Sophia, je présenterai une conférence sur l’optimisation des performances d’un site. Quand on demande à un développeur web même confirmé d’améliorer le temps de chargement du site, il va généralement se pencher sur [...]

    2565990952_d5609b19af_m Tahiti gets a name and an initial code push

    by Paul Dix | 3 days ago | Read more

    I haven't given a real update on Tahiti since my post last September announcing that I was putting it on hold. That's mostly been true since then. My schedule has prevented me from finding time to work on the project....

    HTTP Response 500!?

    by Hsu Shih Chun | 3 days ago | Read more

    剛剛在解決一個小Bug
    用瀏覽器瀏覽某個會丟301的網站時,在Ruby或Telnet都會丟500回來
    什麼鬼.. 怎麼會這樣?

    其實這是因為沒有User-Agent的關係啦
    有些Web Server可能會Reject一些Header中沒有User-Agent的Request
    所以這時候只要在丟request時加上User-Agent這個Header即可
    原本的原始碼:
    response = Net::HTTP.get_response(URI.parse(uri_str))
    改成:
    uri = URI.parse(uri_str)
    http = Net::HTTP.new(uri.host)
    response = http.send_request('GET', uri.request_uri, {"User-Agent" => "Mozilla/5.0"})
    這樣一來不管是301、302,還是最該死的404都沒問題啦XD

    (( 因為這篇是工作上的心得,所以只好擺在Rails啦XD

    Agile Community Building using Social Software

    by Andrew Turner | 3 days ago | Read more

    Last week, Alan Gutierrez gave an excellent presentation at the Burton Catalyst Group titled “How social networking saved New Orleans: Powered by community, New Orleans residents exposed city hall and the power of social software” or “Innovating Your Way Out of Total System Failure” . Get the slide deck (powerpoint, 32MB)) and digg the story [...]

    Karl adamwiggins's rest-client at master — GitHub

    by Rick Bradley | 3 days ago | Read more

    adamwiggins's rest-client at master — GitHub: (posted by rickbradley)

    Hospedando imagem e Animações em flash (swf) para Orkut

    by Luiz Arão A. Carvalho | 3 days ago | Read more

    Olá Amigos Leitores. Bom um colega meu hoje me perguntou se eu conhecia algum site que hospede animações em flash, os famosos SWF’s. Bom eu havia passado pelo mesmo problema ontem, utilizava um, que aliasd era muito bom, o SWFUP que infelizmente saiu do ar. Eu estava ajudando uma amiga que queria colocar o convite de seu [...]


    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

    Mark Windholtz:

    I've known mark for years and enjoyed working with him.

    - Sbubble C.N, United States