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


Pascal_09 Your Entire Computer in 7 Years

by Pascal Rettig | over 2 years ago | Read more

It'll be much smaller and those clunky peripherals have got to go (picture inside)

Game on for Brands

by Steve Deiters | over 2 years ago | Read more

In the past year, the social gaming industry has exploded. Market leader Zynga, maker of the wildly popular Facebook-centric games FarmVille and Mafia Wars, boasts 100 million players per month. Gaming giant Electronic Arts snapped up Zynga rival Playfish last November for $300 million. Both companies have shown a knack for hooking consumers on games that tie into their social networks. What's more, they've expanded the market as games like FarmVille and PetVille attract diverse audiences outside the young male gamer stereotype.

Smartphones Helping Magazines Become Interactive

by Steve Deiters | over 2 years ago | Read more

With the sudden ubiquity of smartphones, which have apps that can read bar codes, and cameraphones, which can easily snap pictures of icons, magazines like Esquire and InStyle are adding interactive graphics to their articles, while Entertainment Weekly and Star are including them in ads.

Surf_s_up @techpickles mazel tov, Josh!

by Brian Del Vecchio | over 2 years ago | Read more

Brian Del Vecchio
@techpickles mazel tov, Josh!

Robbazinet I Am Not a Master but a Solutionist

by Rob Bazinet | over 2 years ago | Read more

I stumbled upon an interesting essay by Zed Shaw recently titled "The Master, The Expert, The Programmer" pointed out by Avdi Grimm. One part that stuck out in my mind was this excerpt:

What I notice is that my peers are progressing to more and more complicated and convoluted designs. They are impressed with the flashiest APIs, the biggest buzzwords, and the most intricate of useless features. They are more than happy to write endless unit tests to test their endless refactoring all the while claiming that they follow XP’s “the simplest thing that works” mantra. I’ve actually seen a guy take a single class that did nothing more than encapsulate the addition of two strings, and somehow “refactor” it to be four classes and two interfaces. How is this improving things? How can more somehow equal simpler? This should never be the case.

These are the actions of an expert. These experts are very smart, capable, and skilled, but they are too busy impressing everyone to realize that their actions are only making things worse for themselves. In the end all of their impressive designs are doing nothing but making more work for themselves and everyone around them. It’s as if their work is only designed for getting them their next job, rather than keeping them in their current one.

I agree and have always thought the same. I have seen people turn something simple into something complex that will be difficult to maintain. One of my previous enterprise clients produced solution after solution which was so complex that adding a field to a form took a day with all of its levels of indirection.

So many programmers are like sheep, they follow the herd because they think they should and feel if they don't they will be left behind. In my opinion, developers should stand back from the crowd and be an individual and do those things that work for them.

Personally, I will do the simplest thing I can do to solve a problem within the constraints of the problem domain. This is my best interest because I can better maintain code later and it is the best interest of the client because it costs them less and more likely someone else can support it later.

Solutionist

I currently am working on a project that is filled with tests, some created in TDD fashion, some created after the fact. It seems to me, from someone coming in from the outside, that these tests were created for tests-sake and done for the right reasons. The tests are spread out across the project and are not complete and don't cover all of the necessary business rules. When I look at this it seems like it was a waste of the clients money. If we can't rely 100% on what the tests are actually testing, then why do them at all?

I am also working on a project with very little tests, almost none. This project works very well and shows almost no ill-effects of not having a test suite. I will not get into a holy TDD war, it's not my point. I'm just pointing out how two diverse projects from a test perspective can provide value.

I look at the work I have done over the years, some with full test suites and some without and realize what was done was done with a certain business situation in mind. We don't live in a perfect world business is not perfect, projects aren't perfect and neither are solutions.

We are solutionists and we do the best job we can from the experience we have garnered and what the client can afford. I think this is an important point here, we can't really bang our fist on the table demanding TDD from a client who may not have the budget.

I think we should be creating the simplest solutions we can to fit the needs, and budget of the client. If simple is a one form application, then do it. If simple is a 20 form application with full test suite, then do it. Simple is what gets the job done.

Technorati Tags: TDD,Freelancing,Ruby on Rails

My120_135 RE: RE: RE: RE: RoR Developers for Comodo Group Inc. (Ukraine, Odessa)

by Ruslan Voloshin | over 2 years ago | Read more

Да, я написал злой пост и ожидал критику :)

> Здесь иметься ввиду что если у человека есть опыт работы в веб N лет, и плюс у него
> есть огромное желание перейти на рельсы.

Понятно что имеется ввиду. Однако почему явно указан PHP, а не perl, python, C# наконец? Основа руби, как и рельс - ООП. Я очень сильно сомневаюсь что после двух лет в пхп чувак будет реально смыслить в этом. А это значит что его придется обучать с 0.


> у тебя есть опыт Ruby Team Lead чтобы так рассуждать?

1) Представьте - есть, причем не только в руби.
2) Я не представляю себе разраба с головой, который не имеет представления об облаке.

> хотя бы на среднем уровне HTML, CSS and JavaScript

Никто не спорит. Даже больше - он должен уметь использовать те фреймворки и библиотеки, которые позволяют повысить продуктивность и читаемость кода. Именно поэтому я привел ХАМЛ и САСС.

Мой сарказм исходил из того, что обычно в резюме пишут "средний" уровень, а приходишь на собеседование - оказывается нужно быть чуть ли автором своего фреймворка.

> А ну прокомментируй вот эту вакансия http://railsware.com/team/careers.

Отлично написанная вакансия.

> Strong technical and web development background.
Учитывая дальнейшие требования это можно было не писать.

> Strong Ruby skills, experience in Ruby on Rails (not required if candidate is already familiar with other Ruby or Python frameworks such as Merb or Django).

Отлично. В последнее время rails начинается становится синонимом говнокодерства (достаточно зайти в раздел "Проекты"). Merb не зря называется фреймворком для хакеров. Знание Джанго подразумевает хорошее знание Питона и ООП.

> Experience with RDBMS and Unix-like operating systems.
Этой строки не хватает большинству вакансий. У человека, не знакомого с основами юникс и не работающего постоянно в нем, будущего в веб-деве нет.
RDBMS - немного расплывчато, но учитывая что SQL-синтаксис везде один - понятно.

> Experience in jQuery is a big plus.

Ясно дают понять что работают с jQuery. Молодцы.

> Understanding of OOP principles, design patterns, best development practices.

После строки о Мербе и Джанго этого можно было не писать :)

> Understanding of different scalability techniques including caching, is a plus.

Кеширование и масштабирование на руби - одна из самых насущных задач. Которая не терпит непрофессионалов.

> Practical experience in test-driven development and agile projects is a plus.

Ну это тоже написано для галочки. После всего вышеперечисленного тестирование и гибкая разработка - само-собой разумеющееся.

> Strong technical English.

+100500
Достали уже эти Васи и Пети, которым все нужно "на русскАм".



Pic Ruby on rails: how to install ruby 1.8.7 on windows

by Randika Rathugama | over 2 years ago | Read more

Hopefully you are here because you couldn’t find the very famous one-click-installer for installing ruby on windows, right?. It happened to me as well, after trying various ways I ended up with a solution for this. Here is what I did to get ruby 1.8.7 installed on windows. First download the ruby 1.8.7 from this link: [...]

Das abgefahrene Kiffer-Film-Quiz zu Contact High

by Benjamin Krause | over 2 years ago | Read more

Contact High ist eine skurrile Mischung aus si-Komdie und Kifferfilm, den ihr euch nicht entgehen lassen solltet. Wir haben euch ein Expterten-Quiz zum Thema gebastelt.

ber den Kifferfilm Contact High berichteten wir bereits ausfhrlich. Pnktlich zum DVD-Start des Streifens haben wir fr alle Gras-Experten und Film-Liebhaber ein Quiz zum bekannten Genre des Kifferfilms gebastelt. Ihr habt Viel Rauch um Nichts, Ananas Express und Lammbock – Alles in Handarbeit bereits tausendmal gesehen? Dann testet hier euer Experten-Wissen:



Contact High wird am 15. Januar 2010 auf DVD verffentlicht.

Schaut hier noch einmal den Trailer zu Contact High an:



Whlt euer Lieblingskino und gewinnt zwei Kinofreikarten! Moviepilot sucht die beliebtesten Kinos im Lande – die Top 200 findet ihr hier.

Bild zu:  © Delphi

Nolan_eakins_2007 @kevsmith the heart pounding will add a degree or two to your body temp?

by Nolan Eakins | over 2 years ago | Read more

Nolan
@kevsmith the heart pounding will add a degree or two to your body temp?

Nolan_eakins_2007 @mickael don't disagree, but I wouldn't be surprised if it was limited to a single app. probably will depend on CPU and memory specs.

by Nolan Eakins | over 2 years ago | Read more

Nolan
@mickael don't disagree, but I wouldn't be surprised if it was limited to a single app. probably will depend on CPU and memory specs.

Karl Fresh Thinking: Against Guruism, Unconferences, and Social Media Experts » SearchViz: Get Found

by Rick Bradley | over 2 years ago | Read more

Fresh Thinking: Against Guruism, Unconferences, and Social Media Experts » SearchViz: Get Found:

(posted by arafatm)

Nolan_eakins_2007 yak shaving is most easy with fresh razor blades. #protip

by Nolan Eakins | over 2 years ago | Read more

Nolan
yak shaving is most easy with fresh razor blades. #protip

Spock [Music] Stephin Merritt - The Man of a Million Faces

by Ara T Howard | over 2 years ago | Read more

Why You Shouldn’t Use Float for Currency (floating point issues – explained for Ruby and RoR)

by Vlad-Ionut ZLOTEANU | over 2 years ago | Read more

This article is a response to http://vladzloteanu.wordpress.com/2010/01/06/ruby-on-rails-interview-questions-update/ It is a VERY BAD IDEEA to use floating point arithmetics to deal with currency. In most of the programming languages. Basically, because you’ll end up loosing money . And this (on the great majority of cases) is not desirable . I’ll show you some magic (that [...]

Ben Alman » jQuery BBQ v1.1 and jQuery hashchange event v1.0

by Chris Williams | over 2 years ago | Read more

Version 1.1 brings some substantial changes to jQuery BBQ. I reorganized the plugin code substantially, which allowed the core window.onhashchange event functionality to be broken out into a separate jQuery hashchange event plugin.

The end result is that while jQuery BBQ is still just as awesome as it’s always been, if you’ve wanted just a very basic, streamlined, normalized, cross-browser jQuery hashchange event without all the extra awesomeness that BBQ provides, it’s now available separately as jQuery hashchange event.

In addition, BBQ now has a new $.bbq.removeState method, which a few people have requested, as well as updated unit tests that utilize the most recent version of QUnit.

Check out the jQuery BBQ project page as well as the new jQuery hashchange event project page for more information, and let me know what you think!

Is there anything that the amazing Ben "Cowboy" Alman doesn't already have done? The judges think not.

Permalink | Leave a comment  »

Karl (posted by vinbarnes) zoom

by Rick Bradley | over 2 years ago | Read more



(posted by vinbarnes) zoom

Ruby on Rails 101 – Encurtador de URLs = Novo Blog

by Rodrigo Urubatan Ferreira Jardim | over 2 years ago | Read more

Ok, o titulo do post não ficou legal, mas a idéia é que tem tanto encurtador de URLs por ai que eu resolvi fazer um em rails também para brincar um pouco, e como a implementação ficou muito simples, vou tentar transformar isto em um tutorial bem básico de Rails. Mas vejam bem, a idéia é [...]

Post de: Blog do Urubatan
Quer comprar meu livro Desenvolvimento Fácil e Rápido de Aplicações web com 30% de desconto? É só acessar o meu blog e pegar o código :D

Ruby on Rails 101 – Encurtador de URLs = Novo Blog

Alicia Keys - Empire State of Mind Part II (Live on SNL)...

by Kevin Burg | over 2 years ago | Read more



Alicia Keys - Empire State of Mind Part II (Live on SNL) 1-9-2010

2794075742_2080179c58_b @zeldman just watched Annie Hall for the first time last night. It almost made me uncomfortable how much I could relate to it.

by Tyler Love | over 2 years ago | Read more

tylr
@zeldman just watched Annie Hall for the first time last night. It almost made me uncomfortable how much I could relate to it.

Iphoto_bigger 我们没有高科技,只有臭狗屁

by Dylan Zheng | over 2 years ago | Read more

看了这个新闻:http://www.javaeye.com/news/12856-Sixth-Sense “震撼人心的新科技 - Sixth Sense”,真的被里面的“第六感”震撼,但是佩服人家之余却是淡淡的无力感,想起梅尔吉普森几年前拍的那部玛雅人电影《启示》,影片的内容黑色血腥倒不用说,最后一个镜头让我印象很深刻,因为一直都在演丛林中的事情,我还以为故事发生在某个远离现代文明的时期,可是结尾玛雅人赶到海边看到的却是战船大炮,“八国联军”正准备登岸。

本来想发发牢骚,可是想想都是无解,算了,只有──如题!

加赠《启示》这部片的第一句话:A great civilization is not conquered from without until it has destroyed itself from within ── Will Durant

My120_135 RE: RE: RE: RoR Developers for Comodo Group Inc. (Ukraine, Odessa)

by Ruslan Voloshin | over 2 years ago | Read more

Ищется руби-разработчик с опытом в ПХП и базах данных (интересно - каких?). - ну со своего опыта приема на работу то отвечу на это возражение. Здесь иметься ввиду что если у человека есть опыт работы в веб N лет, и плюс у него есть огромное желание перейти на рельсы. Соответственно с этого человека будут спрашивать на собеседовании только базовые понятия ruby. И естественно будет особое внимание обращено на скорость его обучения. Если человек будет сидеть дуплить рельсы год или больше то его конечно никто и не возьмет.
И при этом всем он еще должен быть гуру в CSS и Javascript. А нельзя взять отдельно нормального программиста и нормального верстальщика, как это делается во всех нормальных компаниях?
Во первых слово Knowledge это не подразумевает гуру, это подразумевает знания и понимания. Но я считаю что любой веб-программист должен знать хотя бы на среднем уровне HTML, CSS and JavaScript, потому что ему же хуже будет бегать постоянно к верстальщикам.

На сегодняшний день нормальная вакансия руби-разраба должна выглядеть так:

- Rails, Merb, Sinatra, Ramaze (понимание принипов работы rack!)
- MongoDB, CouchDB, Redis? + обязательно DataMapper и Sequel для SQL-решений.
- HAML + SASS
- Тестирование
- Деплоймент, GIT
- Понимание основ Cloud Hosting и Сloud Computing (GAE, Heroku, Amazon, RackSpace)
- у тебя есть опыт Ruby Team Lead чтобы так рассуждать? или это так увидел на сайте енгард ярда и .... а ну ка я поумничаю, это не серьезно разсуждать нормальная или не нормальная вакансия!!!.
А ну прокомментируй вот эту вакансия http://railsware.com/team/careers.
Я считаю вполне нормальные требования. Для того чтобы понять подходишь ты в эту компанию или нет с головой хватит этих требований.

My120_135 RE: RE: RoR Developers for Comodo Group Inc. (Ukraine, Odessa)

by Ruslan Voloshin | over 2 years ago | Read more

Наверное никто не хочет ехать в Одессу :)

А вообще - странная вакансия. Ищется руби-разработчик с опытом в ПХП и базах данных (интересно - каких?). С ума посходили? И при этом всем он еще должен быть гуру в CSS и Javascript. А нельзя взять отдельно нормального программиста и нормального верстальщика, как это делается во всех нормальных компаниях?

Это все равно что искать переводчика английского с опытом немецкого, который будет дополнительно подрабатывать уборкой туалетов и обслуживание столовой.

На сегодняшний день нормальная вакансия руби-разраба должна выглядеть так:

- Rails, Merb, Sinatra, Ramaze (понимание принипов работы rack!)
- MongoDB, CouchDB, Redis? + обязательно DataMapper и Sequel для SQL-решений.
- HAML + SASS
- Тестирование
- Деплоймент, GIT
- Понимание основ Cloud Hosting и Сloud Computing (GAE, Heroku, Amazon, RackSpace)

Nolan_eakins_2007 @jimweirich almost got me to jump in the car and make, presumably, a multihour drive.

by Nolan Eakins | over 2 years ago | Read more

Nolan
@jimweirich almost got me to jump in the car and make, presumably, a multihour drive.

My120_135 RE: RE: RE: RE: что вы думаете о Ruby on Steel!! Visual Studio 2005-2008

by Ruslan Voloshin | over 2 years ago | Read more

> NetBeas притормаживает :(
Если меньше 1 гига ОЗУ - будет тормозить практически любая из вышеперчисленных IDE. Это все из-за Java (ненавижу).

В RadRails нужно отключить стартовую страницу при запуске и, по желанию, автодополнение. Тогда будет работать даже на слабой машине. Когда я только начинал свое знакомство с рельсами (где-то в 2004 году) я работал в этой IDE на IBM X40 с 128 мб ОЗУ на борту. И ничего, работало :)

> Интересно почему VS перестало подерживать Ruby после VS 2008 решила что 2008
> для него достаточно?

Не совсем понял. В следующей версии - 2010, обещают нативную поддержку IronRuby (и IronPython). Вообще мелкософтовцы в восторге от этого языка. У них давно был кризис идей в этом плане - С# прорывом так и не стал, а бейсик безнадежно устарел. А тут такой подарок в виде выразительного, мощного и простого языка! Вот увидите - еще год-другой они его везде будут продвигать.


Shoes packages your Shoes app as a .shy format file.

by Victor Goff | over 2 years ago | Read more

After a reverting and revising Shoes code, it works well to make .shy format file.# shoes_packager_100111.pngLook at the commits on my local github repo.ashbb

Joey-devilla-on-accordion-at-railsconf-2007 Popular Wiping Methods

by Joey deVilla | over 2 years ago | Read more

It’s about time someone – in this case, the fine folks at Blogadilla – put together a chart of toilet paper wiping styles:

Joey-devilla-on-accordion-at-railsconf-2007 Mathew Ingram Joins GigaOM

by Joey deVilla | over 2 years ago | Read more

It’s another “local guy makes good” story: Mesh Conference co-founder, Globe and Mail writer and editor for the better part of two decades, all-round respected Canadian voice in tech journalism and fixture of the Toronto tech scene, Mathew Ingram is leaving the Globe to join GigaOM as one of its full-time reporters. This is great news [...]

Robert_dempsey The Things that Compose Agile Environments

by Robert Dempsey | over 2 years ago | Read more

In the last post we began looking at creating the proper environment for an Agile team. We discussed the people portion of environments, and today we’ll look at the things. Before digging in though, a quick reminder that the Agile Manifesto states, “individuals and interactions over processes and tools.” While we understand we need processes [...]

Which Victory?

by Chris Conrey | over 2 years ago | Read more

In sales there are many metrics to look at for success, the two that are easiest are “how  many deals?” and “how much money did you make?”.  When I was selling cars, Salesman of the Month was based purely off of how many deals you made.  This led to my first real wake up call [...]

Links for January 10th through January 11th

by Tom Armitage | over 2 years ago | Read more

D Nye Everything: Games of the Year – Borderlands, Torchlght Dan on Torchlight and Borderlands: "…they both tickle the same fetishistic urge to collect, developing bigger and better attacks to have much the same effect on bigger and better monsters as your last set of attacks had on the last set of monsters. Every single decent-sized [...]

Making Friends with FFI

by Drew Colthorp | over 2 years ago | Read more

Is your Ruby C Extension lonely? FFI can help

Lonely? Many Ruby programmers have found the need to make calls on C libraries. Sometimes this is for writing performance-critical code and sometimes it is to use an existing library written in C. Ruby extensions are created by writing a small amount of glue code in C. The downside is that you need to compile your C code wrapper. This requires you to either release versions of the compiled code for all platforms or force your users to have a development environment. Furthermore, the extension is only guaranteed to run on the standard Matz Ruby Implementation (MRI). This means that your shiny new extension cannot necessarily be used by other Ruby VMs such as JRuby or MacRuby.

Make friends. If you want your C code to play nicely with the other VMs out there, then FFI (foreign function interface) is the answer. FFI is built-in to JRuby and MacRuby; MRI requires a compiled gem for FFI access. After a night of experimentation, I was able to get C code from the Chipmunk Physics library running in Ruby via FFI (chipmunk-ffi). Just tell FFI what function to attach, what arguments it takes, what the return type is, and it will take care of the rest. FFI is a great tool that any Ruby developer should have in their tool belt and consider against writing a C extension.

C code:


void cpInitChipmunk(void);

To call it from Ruby:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# sample from chipmunk-ffi

require 'ffi'
module CP
  extend FFI::Library
  # load a C library
  ffi_lib 'chipmunk'
 
  # look up a function
  attach_function :cpInitChipmunk, [], :void

  # call the new function
  cpInitChipmunk
end

More Info:

why use FFI

projects using FFI

presentations on FFI

Proposal Submitted for Scottish Ruby Conference

by Ryan Stenhouse | over 2 years ago | Read more

Today I’ve submitted a proposal to be considered for inclusion in the Scottish Ruby Conference this year.

Fingers crossed, I’ll be accepted as a speaker!

Surf_s_up Firefox 3.6 RC1: It's fast.

by Brian Del Vecchio | over 2 years ago | Read more

Brian Del Vecchio
Firefox 3.6 RC1: It's fast.

Ruby on Rails Developers – Central London

by Darragh Browne | over 2 years ago | Read more

Our client is looking for a number of ruby on rails developers with jobs ranging from graduate to mid-level developers. These positions are located in modern offices in central London and working for an organisation that embraces agile methodologies to deliver pioneering online systems for business. The right candidates will be passionate about Ruby on Rails and [...]

405317059_46d3bd458d "I bought another case of Rock Star. Expect architectural changes"

by Matt Polito | over 2 years ago | Read more

“I bought another case of Rock Star. Expect architectural changes” - Orion Henry

6257 Gerade die 1619. Fratze auf #dailyfratze hochgeladen: http://dailyfratze.de/michael/2010/1/11

by Michael Simons | over 2 years ago | Read more

Michael
Gerade die 1619. Fratze auf #dailyfratze hochgeladen: http://dailyfratze.de/michael...

6257 michael am 11. Januar 2010

by Michael Simons | over 2 years ago | Read more

Michael
michael am 11. Januar 2010 - http://dailyfratze.de/michael...
michael am 11. Januar 2010

%ed%81%ac%ea%b8%b0%eb%b3%80%ed%99%98_dscn0264-mirnae 2010년 자바 개발자들을 위한 개발 Tip‏

by SangHyun Son | over 2 years ago | Read more

  Java 개발자를 위한 2010년 핫 트렌드와 최적의 개발환경 툴인 Oracle의 최신 기술 및 사례들을 소개합니다. 이번 방송에서는 Sun마이크로시스템즈 Java Champion이신 인피언컨설팅 양수열 소장님께서 ‘JSF를 이용한 웹 개발’이라는 주제로 자바 개발자들을 위한 주요 이슈와 개발 Tip을 이야기 합니다. 그리고 오라클에서 제공하는 ADF 프레임웍에서의 개발 방법 및 Jdeveloper를 통한 웹서비스 구현 방법을 소개하여 드립니다. 실제 개발하는 방법과 데모 등을 구체적으로 보여주면서 개발자들이 알기 쉽게 적용할 수 있도록 안내해 드릴 것 입니다. 2010년 자바 개발자들을 위한 이.......

Surf_s_up dlouhy: My Calc 2 professor's name is Donald King. I'm going to hopefully win this class via TKO.

by Brian Del Vecchio | over 2 years ago | Read more

Brian Del Vecchio
dlouhy: My Calc 2 professor's name is Donald King. I'm going to hopefully win this class via TKO. - http://twitter.com/dlouhy...
Map

50+ Most Wanted Blogger Templates

by Lim Hong Kiat | over 2 years ago | Read more

It’s hard to distinguish between a WordPress and a Blogger powered blog because of the various themes being used. If there’s a beautiful WordPress theme available out there, chances are it has already been ported over to Blogger as well. Therefore, there’s no excuse to have a dull looking design on a Blogger. In this [...]

Cloning a remote branch using Git

by Neil Middleton | over 2 years ago | Read more

This is here more as a future note to myself, but hopefully someone out there will find this useful. Essentially, imagine this:  You have a remote repository (say, on GitHub), and that repo has many branches.  You clone the repo and end up with the master branch in your local dev environment.  Now what happens if [...]

Avatar Ruby 1.9 character encoding field notes

by Thijs van der Vossen | over 2 years ago | Read more

As you probably already know the String class became encoding aware in Ruby 1.9. This makes it possible to manipulate strings on the character level instead of on byte level. However, it’s still a general purpose API which means writing a few lines of code to get stuff done.

It’s common to choose one internal representation for character data in an application and convert all incoming strings to this representation. For example, in modern applications strings are often encoded in UTF-8 or UTF-16. I took some time to figure out how to do this in Ruby 1.9.

The biggest problem with receiving data from external sources is trust. Sources can lie about their encoding or provide broken data. Sometimes it gets mangled accidentally and sometimes someone is attacking your application with a carefully crafted payload.

Problems can arise on a lot of levels. Just think about receiving an HTTP response from a webserver. Things can go wrong in the proxy, in the client library, in the string implementation of your language. Meta-data about the encoding is stored in HTTP headers, the HTML, and now in String. The same problems exist with data coming from databases, filesystems, and caches.

You can trust some of these sources more than others. For example, you can control the data going into a database so you can trust the data coming out. In contrast, anything coming from the internet should be considered potentially dangerous.

My solution for these problems is a new method on String called ensure_encoding. It makes sure the data in the string is at least compatible with your internal strings. Depending on the options you pass it will respond differently to broken data.

As an example, let’s take an HTTP POST to a web API. Assume we’ve explained in the API documentation we only accept UTF-8 character data and will be very strict about this. Our code might look something like this:


require "ensure/encoding"
begin
  params.each do |key, value|
    params[key].ensure_encoding!(Encoding::UTF_8,
      :external_encoding  => Encoding::UTF_8,
      :invalid_characters => :raise)
  end
rescue Encoding::InvalidByteSequenceError => e
  send_response_document :unprocessable_entity,
    "Sorry, your request contains invalid encoding" +
    "and can't be processed (#{e.message})"
end

You can find more examples on the GitHub project page and in the source. Normally I try to extract code from a running project, but we don’t run any production code on 1.9 yet. It would be great if you can help out with testing the code. I’ve released the code as a gem, so it should be really easy to install.

$ gem install ensure-encoding

Please leave any bugs, problems, or suggestions in the GitHub issue tracker.

Moi_sqare BBC News - Reporter breaks an 'unbreakable' mobile phone at CES

by Jiayong Ou | over 2 years ago | Read more

BBC News - Reporter breaks an 'unbreakable' mobile phone at CES:

chartier:

With a chuckle-worthy video that I’d love to paste here, but for some reason the BBC does not do the whole “let people view our stuff everywhere” thing.

Avatar-big Как добавить в конкретный Ruby-объект какое-нибудь свойство

by Leonid Shevtsov | over 2 years ago | Read more

Вообще задача такая: class Book < ActiveRecord::Base has_many :ratings has_many :tags, :through => :ratings end   class Rating < ActiveRecord::Base belongs_to :book belongs_to :tag validates_presence_of :score end Надо возвращать для каждой книжки не только все ее теги, но и сумму оценок, поставленных для каждого тега. Ущербные решения Затык был не в том, как закодить саму выборку суммы, [...]

Tobey Maguire verspricht Spider-Man 4

by Benjamin Krause | over 2 years ago | Read more

Gerchte um den Filmstart von Spider-Man 4 haben Tobey Maguire zu einem Interview gebracht. Er spricht ber Peter Parker und die Produktion des Films.

Tobey Maguire verspricht den Spider-Man-Fans einen vierten Teil. Der Start des vierten Spider-Man Teils sei nicht in Gefahr, macht der 34-Jhrige Schauspieler in einem Interview klar. Vor kurzem gab es Gerchte, dass der Starttermin der Fortsetzung verschoben werden soll. Deshalb machten sich Fans Sorgen, ob er berhaupt erscheint. Regisseur Sam Raimi und die Sony Pictures Studios seien sich nicht ber die Storyline einig. Der Hauptstreitpunkt sei, welcher Bsewicht aus dem Spider-Man-Universum die Rolle von Spideys Gegenspieler bernehmen soll. Sam Raimi wnsche sich John Malkovich als Vulture, ein Ingenieur und Erfinder. Sony habe andere, unbekannte Plne.

Thor, eine andere Marvel Superhelden Story, soll auch im Mai 2011 in die Kinos kommen. Das macht den Release von Spider-Man zum gleichen Zeitpunkt sehr unwahrscheinlich. Tobey Maguire : „Wir befinden uns in der Mitte eines Prozesses, wir haben schon eine Menge tollen Stoff, in Sachen Story und Script- nun mssen wir nur noch versuchen alles zusammen zu bekommen und das so schnell wie mglich.“ Er stellte klar: „Natrlich sind solche Filme groe Unterfangen und so was braucht mehr Zeit als ein Drama oder etwas, dass einfacher gestrickt ist.“ Mit anderen Worten Tobey Maguire versucht seine Fans zu beruhigen, aber knnen wir ihm das abnehmen? Zum genauen Releasedate will er sich nicht uern. Vage spricht er vom Jahr 2011.

„Es ist alles sehr aufregend fr mich. Ich denke die Evolution des Charakters ist wirklich aufregend. Er grndet auf dem bisherigen Geschehnissen und der Charakter hat sich bislang kontinuierlich entwickelt. Jetzt brauchen wir eine richtige Entwicklung oder eine Evolution“, sagt Tobey Maguire begeistert. Ein weiteres Indiz, dass eine heile Welt nach auen darstellen soll. Maguire wirbt fr sich, den Film und die Filmfiguren. Marketing zu rechten Zeit, aber es klingt etwas unglaubwrdig. Was Hoffnung macht, ist, dass Sam Raimi vor einem Jahr bei den Filmfestspielen in Cannes sagte: „Wenn ich ber eine Welt nachdenke, in der die Peter Parker Story ein anderer macht, geht es mir schlecht.“

Schaut euch das Interview bei bbc.com an.

Whlt euer Lieblingskino und gewinnt zwei Kinofreikarten! Moviepilot sucht die beliebtesten Kinos im Lande – die Top 200 findet ihr hier.

Bild zu:  Tobey Maguire in Spiderman 3 © Sony Pictures Entertainment

Aus alt mach' neu - Das UCI Colosseum in Berlin

by Benjamin Krause | over 2 years ago | Read more

Auch Multiplexe knnen Charme haben. Daher stellen Euch im Rahmen unseres Kinovotings heute das UCI Colosseum in Berlin Prenzlauer Berg vor.

In unserer Aktion Ein Herz fr Kino wollen wir Euch das beliebteste Kino Deutschlands whlen lassen. Nachdem wir bereits ber das Lichtblick Filmtheater in Oldenburg/Holstein berichteten, wollen wir Euch heute wieder ein ganz besonderes Kino vorstellen.

Fr viele ist das ja eine Glaubensfrage: Geht Ihr in das winzige Kiez-Kino, in dem Ihr die Betreiber persnlich kennt und der Stammsessel im unklimatisierten Mini-Saal schon den Abdruck Eures Allerwertesten hat? Oder zieht Ihr das anonyme Multiplexkino ohne Seele, aber mit bequemen Sesseln und modernster Technik vor? Die Kinokette UCI-Kinowelt, die vor allem auf Multiplex-Kinos spezialisiert ist, ldt in Berlin in ein ganz besonderes Kino mit bewegter Geschichte ein, das die Vorzge aus beiden Systemen verbindet und sich so einen Spitzenplatz in unserem Lieblinkskino-Voting erobern konnte: Das Colosseum in Prenzlauer Berg.

Nachdem das Gebude 1894 als Pferdestall und Wagenhalle errichtet wurde und im Ersten Weltkrieg als Busdepot diente, bauten Architekten in den 20er Jahren auf dem Gelnde ein Kino. Das war die Geburtsstunde des Colosseums, des ersten Filmpalastes im Berliner Arbeiterbezirk Prenzlauer Berg. Der lange, schmale Zuschauerraum bot 1200 Zuschauern Platz. Am 12. September 1924 erffnete das Lichtspieltheater mit “Coolibri”, einem Stummfilm von und mit Ossi Oswalda. Begleitet wurden die Stummfilmpremieren im Colosseum bis zur Einfhrung des Tonfilms 1929 von einem bis zu dreiig Mann starken Orchester. Im Zweiten Weltkrieg diente das Colosseum als Lazarett und Wrmehalle. Nachdem es zwischenzeitlich als Ersatz fr das Metropol-Theater diente, wurde es 1957 zum fhrenden Premierenkino des Ostens aufgebaut.

Nach der Wende erweiterte der Betreiber den historischen Bau mit der denkmalgeschtzten Backsteinfassade um ein Multiplexkino mit 10 Slen, das die Geschichte des Kinos mit modernster Technik kombinierte. Heute bietet das Colosseum seinen Gsten bis zu 2.814 Pltze, eine charismatische Lobby und historisches Flair.

Falls ihr Euer eigenes Lieblingskino ebenfalls an prominente Stelle bringen wollt, macht unbedingt mit bei unserem Voting. Seht nach, ob euer Favorit schon in unserer Liste steht. Bald werden die ersten Kinogutscheine verlost! Scheut Euch nicht und sagt es weiter: Mitmachen – Herz verschenken – Gewinnen! Die Gewinner der ersten 400 Kinogutscheine werden in den kommenden Wochen benachrichtigt werden.

Alle Infos zur Lieblingskino-Auswahl und dem Gewinnspiel

Mein Herz fr Kino - moviepilot

Bild zu:  Das Colosseum © Internationale Filmfestspiele Berlin

Tom DeLonge of Blink-182 is a Social Media Maven

by Steve Deiters | over 2 years ago | Read more

"Weird music industry insanity crossed with internet startup hucksterism with a dash of awkward standoffishness."

Code Retreat Grand Rapids

by Drew Colthorp | over 2 years ago | Read more

Atomic Object will be kicking off the Code Retreat 2010 season by hosting a retreat in Grand Rapids, MI on February 6th at Atomic HQ. “What is a Code Retreat?”, you ask? Code Retreat was dreamed up by Corey Haines, Nayan Harjatwala and Patrick Wilson-Welsh during some spare cycles at the Codemash v.2.0.0.9 conference. They wanted to create an event that would allow software developers to gather and practice their craft away from the pressures of writing production code and delivering business value. It would be a place where developers could come together and improve their ability to write clean and responsible code and ultimately improve their ability to deliver more business value to customers.

It wasn't long before Corey, Nayan and Patrick's idea came to fruition; weeks later, the first Code Retreat was held in Ann Arbor, MI. About 30 developers passionate enough about their craft to spend a whole Saturday geeking out with other developers were in attendance, including some well known people in the Agile/XP community such as Ron Jeffries, Chet Hendrickson, J.B. Rainesberger, Bill Wake, and of course, Corey, Nayan and Patrick. Since this first event there have been several more Code Retreats in places like Cleveland, Chicago, Toronto, Philadelphia, and even Scotland.

So by now you might be asking yourself, “What exactly goes on at these Code Retreats?” Code Retreats typically follow some very simple guidelines. The problem domain that has been adopted is Conway’s Game of Life, which has a small enough problem space, allowing developers to not get overwhelmed by complex business rules, yet complex enough that most pairs won’t be able to finish it. We pair program in ~40 minute iterations on the problem domain, and when the iteration is finished we switch up the pairs and throw away the code we just wrote. The reason behind throwing away the code is because the goal is not to write code, rather it is to learn and practice. We hold retrospectives twice throughout the day to get a feel for how things are progressing, once at lunchtime and once more at the day’s end, and make any adaptions to the process as necessary.

If you are interested in attending, we ask that you RSVP using the Code Retreat website at http://coderetreat.ning.com/xn/detail/2712512:Event:3302?xg_source=activity so that we know how many people to plan for. Atomic Object will be providing the space and food for this event, if you are traveling and need hotel recommendations feel free to contact Jeremy Anderson (jeremy.anderson_AT_atomicobject_DOT_com).

Surf_s_up RT @ballardian: RT @factmagazine: BBC's Brian Eno documentary premieres this month: http://bit.ly/52SYau

by Brian Del Vecchio | over 2 years ago | Read more

Brian Del Vecchio
RT @ballardian: RT @factmagazine: BBC's Brian Eno documentary premieres this month: http://www.factmagazine.co.uk/index...

Surf_s_up @ballardian Why block? RT @bruces Just passed 7,000 followers. Since it's a closed account, they're all human beings.

by Brian Del Vecchio | over 2 years ago | Read more

Brian Del Vecchio
@ballardian Why block? RT @bruces Just passed 7,000 followers. Since it's a closed account, they're all human beings.


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

Stefan Schüßler:

Stefan is a very nice guy and i really enjoy to work with him :)

- Sbubble D.R, Germany