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


The Long Tail revisited again

by Rafe Colburn | 3 days ago | Read more

Tyler Cowen agrees with and expands on Chris Anderson’s response to Anita Elberse’s article arguing against the existence of a “long tail” effect enabled by online retailing.

Jayfields The Immaturity of In Browser Testing

by Jay Fields | 3 days ago | Read more

Designing applications that behave the same in several browsers is a miserable job. Unfortunately, it's often a business requirement. If your application needs to behave flawlessly in multiple browsers, In Browser testing is probably a necessary evil.

I tend to use Selenium for In Browser testing; therefore, this entry is written from the perspective of a Selenium user.

Selenium is terrible for several reasons.
  • There are several ways to drive Selenium, and none of them are particularly mature. Should you use SeleniumRC, Selenium on Rails, the in browser recorder, or some other half baked solutions? I don't have the answer. I've used all 3 of the named solutions and found them all to be problematic. Yes, the problems can be gotten around, but they are there and solving them costs time.
  • There are several languages for writing tests. Should you use Java, Ruby, Python, Perl, etc? I have no idea. Having the choice might seem like a good thing -- until the person who was writing the majority of tests leaves and the next person to take on the Selenium suite decides he wants to use another language. The languages are also fairly clunky. I can't help wondering if a better solution would have been to create a DSL specific to the in browser testing space.
  • I could have written this entire blog entry before most of the Selenium suites in the world would finish. In Browser testing is almost unacceptably slow. Selenium Grid sets out to solve this problem. So you should use that, right? Not exactly, it's not worth the effort unless you have a large suite, and it requires you to go down the SeleniumRC path, which may or may not be the right choice for you.
  • Selenium suites quickly reach the size where their value is not proportionate to the amount of effort the tests require to maintain. Thinking about throwing your suite away? If you do you'll be joining a very large club of developers who decided to dump their Selenium suites. It is very hard to design a large Selenium test suite that provides value. I've heard of several suites that were thrown out and only one suite that was large and the team believed it provided value. I guess there's hope, 1 team managed to get it right.
  • Browsers are buggy. While Selenium itself might justify it's value, spending a week figuring out what the latest bug in IE is starts to call in question the value of the Selenium suite. Of course, you can stop testing in IE, since only IE breaks the build, but if you need to deploy to an environment where users will be on IE... you're in a bad spot.
  • Selenium is great for verifying that everything works as expected, but when a test breaks you get little information on what the problem is. Since the tests are running at such a high level, it's unlikely that you'll be able to easily identify the majority of defects based on the broken Selenium test. The broken test is a great tip that something is wrong, but you'll likely need to do some digging to figure out exactly what is wrong.
Of course, there is another point of view. There are several reasons that Selenium is a good tool.
  • The only real way to know that your application runs in all browsers is to test it in all browsers. Selenium makes it possible to run the same tests regardless of browser.
  • The only way to verify that all the pieces of your application integrate perfectly is to test against the entire application stack. Selenium provides a great tool for simulating user experience.
  • Once you make a decision on what version to use and what language to use, writing tests is easy. Getting started with Selenium takes very little time, including time for learning.
  • For those less than technical team members, the Selenium recorder can be a great tool for creating tests.
  • Selenium also represents a tool that is helpful for both developers and testers.
The trick to using Selenium is knowing who (for), what (for), when, and why it's useful. For those that desire concise descriptions -- Selenium is best used by developers or testers when testing the most valuable (to the business) happy paths of a Javascript heavy web application that must function in several browsers.

When you begin to deviate from the above context, things begin to get problematic.

Selenium is undoubtably a tool that can be used by both developers and testers. The various ways to drive the tool ensure that both less than technical users and very technical users both have options. Selenium is best used for happy path testing because large suites can be both hard to maintain and prohibitively slow. Selenium is an appropriate choice for Javascript heavy applications since the tests run directly in the browser, ensuring expected behavior. Selenium is also helpful for mitigating cross-browser compatibility risks. The write once, run in several browsers model is a powerful one. You should chose Selenium when it can improve your confidence that the highest business value features are working correctly.

Despite it's problems it would be misleading not to mention that it probably is the best solution for In Browser testing, but there is surely room for improvement.

Headshot2 @xentek Sucks. Can you swap p…

by Damien McKenna | 3 days ago | Read more

@xentek Sucks. Can you swap phones with your wife? Failing that, I’m sure your bambino needs his own cellphone ;-)

Headshot2 @supaben34 S3E1 is *fantastic*…

by Damien McKenna | 3 days ago | Read more

@supaben34 S3E1 is *fantastic*! Love it, love it, love it!

mathis - now on Last.fm

by Elliot Smith | 3 days ago | Read more

I'm going to put the mathis album up on Last.fm as I complete the tracks. All will be downloadable for free from here:

http://www.last.fm/music/Mathis/mathis

我對「偏小上線」的看法

by Yi-Ru Lin | 3 days ago | Read more

前言 我一直挺獨善其身的,或許是因為心中有著不斷想要追求的目標,讓我忽略了許多其他值得關心的議題,我所能關心的朋友、議題都僅止於我身邊的生活圈。 也因此,過去對於社會議題的關注及曾經付出的努力是非常有限的,一直到今年才因為許多事件讓我開始有了一種莫名的使命感。「或許我能多做些什麼!」這樣的想法也經常地在我的腦海中迴繞著,以比較八股的說法是取之於社會、用之於社會,而比較接近我內心的說法則是若能因為某些人的付出、影響到另一些人,豈不是挺快樂的嗎? 有了這樣的想法之後,我在因緣際會之下加入了政大EMBA NPO組(政治大學經營管理碩士學程,非營利事業管理組)底下的某一項專案計畫的子計畫志工(說起來還真是挺複雜的),該計畫之所以吸引我加入的最主要因素是可以讓我發揮所長、使用各類資訊工具來完成各種任務,我與我的夥伴們再加入後的第一項任務(或說訓練課程)便是參與「偏小上線工作坊」的課程,與來自各地偏遠小學的校長、老師們一起學習、交流如何使用Google Blogger來快速建立各種不同目的的部落格。 資訊工具 V.S. 偏遠小學 最近媒體上比較受到注目的偏遠小學「總爺國小」,我相信若偶爾會看電視新聞的朋友應該不陌生,看到電視上那些不斷掉眼淚、嘶吼著保留總爺,甚至唱出「我愛總爺、總爺愛我,對我來說蘇煥智算什麼」的小朋友們,說實在我不知道該感到鼻酸還是憤怒,在參與偏小上線工作坊之前,其實我只是以一個很普通的心態看待此事:「不過就是併校,有這麼嚴重嗎?」我甚至會質疑究竟這些小朋友的情緒是有意地被挑起、還是單純發自於內心的情緒表現?或許總爺距離我太遙遠了、或許是因為我自己不是偏遠地區出來的小孩,因此沒能切身地感受他們的處境、更沒能設身處地的思考偏遠小學所面臨的問題。 所謂的「偏小上線」,就我個人的理解是希望「藉由各種資訊工具協助偏遠小學建立新的發聲管道」,以這次設計的課程內容來說,主要是分享如何使用Google Blogger來建立部落格,並且搭配Google Picasa Web Albums、Google Calendar等服務來豐富部落格的內容。 以我這個資訊人的觀點來看,我覺得善用Web 2.0工具是個非常好的發聲管道,以總爺國小事件來說,我們在電視上所看到的是孩子、家長們必須千里迢迢搭車北上才能抗議,而台南縣長蘇煥智只需要在辦公室裡接受記者採訪便可對大眾發聲,儘管總爺在此事件中(似乎)也有建立表達該校訴求的部落格,但此類非長期經營並累積人氣的臨時部落格,能見度終究有限。 我印象很深刻的是某校長在上台分享各校特色時,他的投影片開頭只有「我為招生而來」幾個字,簡報內容也不如其他小學拼命強調各自的特色來得精采,校長很中肯的說:「我以為來這裡是可以學到什麼招生的撇步,沒想到都是在學部落格怎麼用。」在我聽來,這位校長報告的內容似乎希望我們這些關心偏小的人們應該要搞清楚,偏小的問題是實質的體制問題、是因為政策、是因為城鄉差距、是資源分配不均、是因為種種複雜的因素導致的結果,光以資訊人的觀點、使用資訊工具是無法解決這些問題的。 一開始,這些話在我聽來是無法接受的,一來是今天課程的主題相當清楚地點出了我們要的就是「偏小上線」,透過資訊工具,尤其是Google Blogger這種輕輕鬆鬆就可以建立部落格、上傳照片讓小校即使沒有足夠的資訊能力、資訊人才也可以經常性地更新網頁,讓外界的人們可以更容以了解小校的特色或近期動態;另一方面,以我這個教育、小校議題的門外漢看來,我認為某些小校所面臨的問題、窘境,是可以透過不同的管道來發聲的,今天之所以希望透過網路讓小校有獨力維護部落格的能力,便是希望藉由網際網路無遠弗屆的特性來增加訊息的曝光率,也因此小校的校長們來到偏小上線工作坊,似乎是應該跳脫出既有的思考框架,而不該一開始便先入為主地覺得部落格這東西幫不上什麼忙,反而是能思考部落格與目前的招生、課程設計、班級經營、官方網站經營、社區經營等各種計畫是否能有結合的空間,倘若一開始便先入為主地覺得這東西沒用,豈不是否決了一些創意產生的機會了嗎?(參考「創意的殺手:否決」) 我能了解,對於某些小校的師長們會認為使用資訊工具未必能有所助益,畢竟小孩子可能都只拿來打電動、家長們又不一定懂得如何使用網路或是覺得使用網路沒什麼好處,但如此的思考方式便是侷限在「使用資訊工具與家長、小孩溝通」。 舉例來說,授課的講師之一瓦歷斯便提出了「小手牽大手」的可能性,現在的小孩子是天生的數位人,學習使用各種3C產品對這些小孩子來說是輕而易舉的,由這些小孩子回去影響家長,透過各種班級經營、課程輔導的網站讓家長跟小朋友們一起互動也是很有創意的方式。 此外,瓦歷斯老師也使用部落格將小朋友的作文彙整成許多篇文章並加以更正錯別字、加上評語,小朋友看到老師每一篇文章都有給小朋友鼓勵、建議,也會使用留言功能跟老師互動,瓦歷斯老師也說,很多小朋友平常比較害羞,不好意思跟老師談話的也會藉由部落格的留言讓老師知道小朋友內心的想法。這種事情在我這個七年級生看來簡直不可思議,我小時候老師改作文都是單方向的評語,即使我對老師的評語有意見,下禮拜老師也未必會翻回去上禮拜的部分觀看,搞得我還必須在新的一篇作文裡面延續上週的話題。(但我相信,即使是現在,某些老師的眼中,學生對評語有意見是叛逆的表現,多數的學生即使有想法也未必敢表達。) 數位落差源自於使用上的需求 我前陣子曾經聽到一個故事是這樣的: 一群大學生辦了一個營隊,帶著都市的小孩到花蓮的偏鄉,與當地的小孩度過了一段快樂且充實的日子,但過程中總會發現都市小孩不經意流露出來的驕傲或自滿,例如都市小孩會對偏小的小孩說:「你怎麼這麼笨啊?!連上網留言都不會!」 我聽了其實相當難過,這些在我們看來理所當然的事情,但對許多人來說並非如此,我能想像這個社會上依然有許多人不會打字、不會上網,但是接觸到之後ˋ又是另一回事。 我在課堂上有教到其中一位小朋友,可以發現他對鍵盤的位置相當不熟悉,甚至小寫的L跟I分不清楚,我自己在小學的時候也是不認識英文字母的,但因為玩電腦的過程中(當年使用的還是MS-DOS 6.22)讓我有機會學會了英文字母,所以我能想像許多小朋友若家裡沒有提供英文的補習機會、加上學校沒有英文課程,便有可能遇到這類問題。但現在都已經2008年了,應該是已經推動雙語教學許多年,加上資訊教育的推動,我真的是有點難想像小朋友打字這麼慢,好險後來看到他打注音還算可以,才稍微開心了一點。事實也證明,小朋友們真的是天生的數位人,很快就能對各種工具上手了。 但,你認為這樣的情況是數位落差嗎?我認為不全然是、也不全然不是。 這次偏小上線工作坊的講師群裡也包括了台灣數位文化協會的史萊姆跟陳力,他們開著一台數位麵包車到台灣各個鄉鎮去推廣資訊工具的使用,協助某些想要學習使用網路工具但卻不得其門而入的鄉親、小朋友們。我個人立意良善、他們的精神也非常值得學習。 我認為,數位落差是源自於使用上的需求,也就是當使用者產生了特定程度的需求時才有所謂的數位落差出現,就像史萊姆說:「鄉下的農夫你教他用Excel?!他真的會用嗎?」 我的想法一直都認為資訊工具是要能夠解決特定的問題時才能顯現出它的獨特價值,今天我們這些早就非常熟悉各類資訊工具的新新人類,當口中大喊著要縮短數位落差時,究竟有沒有切合那些鄉民們的需求?還是說那些高喊企業社會責任的大公司們根本沒有想要做到這麼多,社會公益、社會責任只是提昇企業形象的另一個策略包裝? 這些小朋友、這些老師們,過去可能從來沒想過我們可以用這麼輕鬆、簡單、無負擔的方式就建立網站或是部落格,但我們能做的應該是給予適當的工具、並且針對他們的需求給予足夠的工具,就夠了!畢竟太多的資訊工具未必能解決他們的問題,甚至會造成使用上的困擾,強大的Google服務有著非常多的功能,相對地有可能只要一按錯,語系就亂了、功能、版面就跑掉了,都有可能。 再者,我們總是高喊微軟是萬惡的!不要再使用萬惡且昂貴的Microsoft Office了,但我們真的要如此冒險地把所有的希望都寄託在Google身上嗎?這樣真的能縮短數位落差嗎?真的能解決他們的問題嗎?這問題我也沒有答案,畢竟若我自己也當上講師的話,還是會以免費且強大、可輕易整合的Google產品為主。 也因此,我還是要再次強調,縮短數位落差並不是我們這些(或是那些政府官員、企業主管們)口中喊喊的口號而已,是否應該更切身地思考數位資訊工具能替他們解決些什麼問題?他們有何需求、可以使用怎樣的工具解決? 以這次的工作坊來說,很多小校可能沒有使用部落格或是建立網站的需求,當然這樣的需求是可以被創造出來的,但我認為我們應該更具體地展示更多的成功案例來產生他們的誘因、創造使用的需求,否則部落格這樣好用的資訊工具,對他們來說終究只是個網頁產生器,已經有網站的學校或許根本不會想用。 同樣是偏小,也存在城鄉差距 本來我以為只要是偏小,情況都不會差太多,後來才知道,同樣是偏小,也存在城鄉差距。根據在場其中一位校長的說法,台北縣目前為準直轄市,教育經費的分配相較於其他縣市便優渥許多,因此在發展小校特色或是硬體資源、校園的規劃與建設上就有更大的發展空間。 這點在我看來其實是挺無奈的,我也才因此能體會到同樣是偏小,台北縣的小朋友可能享有更好的電腦設備、網路頻寬,而台南縣的小朋友可能還在使用多年前校友捐贈的電腦以及不怎麼穩定的網路(不過也有看到台南縣的小學,校長很重視資訊融入教學因此班班有投影機、電腦等等),更別說家裡是否擁有電腦了。台北縣,即使是偏小,或許都可以特地跑一趟光華商場買到便宜的拼裝電腦,但其他縣市可能就等著被當地的零售商大賺一筆,家庭的收入要支付在資訊方面的學習成本說不定會比台北縣市高出許多。(本段敘述的都是我自己猜想的,有誤請指正。) 我想,我自己是個教育的門外漢,雖然也曾經寫過幾篇文章大談我對教育的看法,但這終究是我一廂情願的想法,也可能忽略了許多現實面,但願能藉由此文章拋磚引玉、也期待路過的前輩指導,讓我對相關的議題能有更進一步、更深入的認識與了解,未來也能有更正確或更具體的想法來協助相關議題的報導與投入。 延伸閱讀 創意的殺手:否決 大學課程,期中期末考填充題,你認同嗎? 有任何指教或建議歡迎來信,我的信箱是 deduce (at) gmail.com (請將(at) 代換為 @ 符號)。

Sales Pitch

by Michael Erb | 3 days ago | Read more

My120_135 RE: DEPOT

by Ruslan Voloshin | 3 days ago | Read more

После того как у тя пройдут миграции, будет сделан Админ: User.create(:name => 'admin', :password => 'secret', :password_confirmation => 'secret') Судя по коду (ибо запускать это приложение влом), если хочешь добавить пользователя, то тебе надо login/add_user А вообще рекомендую ознакомиться с концепцие работы rails приложений а потом задавать вопросы.

Fixed price bidding vs the Cone of Uncertainty

by David Laing | 3 days ago | Read more

Software estimation’s “Code of Uncertainty” suggests that before the requirements & user interface design is completed on a software project, time to complete the project can vary by up to 16x. http://www.construx.com/Page.aspx?hid=1648 So, before you have pinned down the exact requirements, the actual time to compete the project could take up to 16 times longer than your [...]

Looking to get a startup off the ground - again ;)

by Eleanor McHugh | 3 days ago | Read more

This year's SeedCamp competition is almost upon us so [info]spikyblackcat and I are looking to get our grand project into some sort of order. Last year we had too many things clashing, and in hindsight that was a good thing, but this year the basics of a business plan seem to be writing themselves.

However not all is rosy in the garden. Financially I'm now running on less than empty, having plowed a fair amount of my personal resources (not least time) into the research that underpins what we're doing. I hope I can keep everything up in the air for just a couple more months to see if this is really a breakthrough opportunity but right now things are looking... fraught. Meanwhile [info]spikyblackcat is off in Brussels from the 14th doing security work with Mastercard.

I'm therefore looking for one or two additional collaborators who fancy getting involved in a somewhat weird and potentially groundbreaking software project. Ideal candidates would be a javascript hacker who gets the point of SproutCore (so I don't have to spend the next few months becoming a JS guru) and someone who wouldn't mind doing backend development in Ruby (<u>not</u> Ruby on Rails).

I now there are people reading this who match those profiles, so if you've not much planned between September and November of this year and are in or near London... well don't be a stranger!

Karl The Hitchhiker's Guide to ...: Squeak demo on iTouch

by Rick Bradley | 3 days ago | Read more

The Hitchhiker's Guide to ...: Squeak demo on iTouch: (posted by wilkes)

Lyle-sm They’re Always Friendly and They’re Ready to Please

by Lyle Johnson | 3 days ago | Read more

I periodically use Google’s Blog Search tool to look for references to FXRuby, and today’s search turned up a couple of recent posts on a Chinese language blog. Curious to know what it was that this blogger was writing, and me not being able to read Chinese, I ran the pages through Google’s Translate service [...]

Frantisek-malina3 Make your own YouTube clone

by Frantisek Malina | 3 days ago | Read more

The video streaming application setup based on my assumptions to explain what you need to consider from the technical point of view and scalability to create your own video streaming social media website such as YouTube, Break.com or Google video. Video precessing server Responsible for conversion of various uploaded video file types to the FLV (Flash video [...]

starpeak committed to prototypeui

by Sven G. Brönstrup | 3 days ago | Read more

0748ac548cf808052f7612d69bc1b2694869a875

added black theme for calendar

Wynn120 Ruby Editors - The Choices For Non-Mac And Non-VI People

by Wynn Netherland | 3 days ago | Read more

I read an interesting blog post on The Devver Blog regarding the results of a Ruby development survey. The results of the “which development tool do you use” question were very similar to the same question asked in a November 2007 survey on ongoing.

To summarize these 2 surveys, the IDE of choice among Ruby developers can be broken down into 3 basic camps:

  • If you are a Mac user you probably use TextMate
  • If you are not on a Mac but you have taken the time to learn VI, you use VI / VIM. (There is a also a good chance you are using Time Pope’s rails.vim plugin. I played with this plugin a bit last night and am very impressed.)
  • If you are not on a Mac and have decided against going the VI/VIM route, you have probably gone (or are going) through a dozen or so editors trying to find the one that is the best match for you.

As I mentioned in a previous article, I split time between a Mac and an Ubuntu machine. When I am on my Mac, I use TextMate. With Ubuntu, I have explored several options over the past 2+ years:

  • VI / VIM – Fast and powerful, but it sure is a pain in the butt to remember all of those key combinations. However, I may take another look after playing with rails.vim this evening. I have found that my VI-fu has been getting better as I edit more stuff directly on our servers with VI.
  • Emacs – I personally do not remember trying Emacs, but I’m pretty sure I did. It is in a similar vein as VI in that they are both 30+ years old (both were started in 1976 according to Wikipedia) with good sized learning curves. With that being said, it does appear to be powerful. Here is a good Emacs with Rails screencast from the platypope.org blog.
  • NetBeans – A very full featured IDE that just got Ruby / Rails support within the past year. It has a lot of nice features including a great integrated debugger. However, it is heavy. It takes a very long time to load and my system gets slower the longer that I use it. Definitely worth a look if you have a beefy system or do not mind some wait time.
  • Eclipse / RadRails – Full-featured IDE in a similar vein to NetBeans. RadRails was the first IDE I used when I first started with Rails a couple of years ago. I was coming from a Microsoft .NET background where full-featured IDE’s like Visual Studio were the norm and RadRails had a similar feel. I’m sure it has changed a lot since I used it last in 2006, but I honestly have not used it since then. (I stopped using it when I purchased my MacBook in August 2006.)
  • gedit – gedit was my editor of choice on Ubuntu for quite a while. It is very lightweight, supports plugins, and comes preloaded on Ubuntu. There are quite a few blogs posts out there about how to make it more “Rails friendly” such as this post on grigio.org. My biggest complaint with gedit at the time and the reason I left to find another tool was that it did not have a built-in “find in files” so it was a huge hastle to find method definitions and other key-words. This has since been partially solved with a gedit find in files plugin by Vince Wadhwani from the Urban Puddle blog. (I say “partially” because of an issue searching multiple levels down.)
  • Other editors that I have not tried include IntelliJ, jedit, scITE, Komodo (not free), 3rdRail (not free), among dozens of others. There were actually 47 editors with at least 1 vote in the ongoing article.

My current Ruby editor / IDE of choice at the moment?

GEANY (Ironically, Geany was NOT in the list of 47 editors voted for in the ongoing article.)

Why Geany?

It is very lightweight yet powerful with very little upfront configuration (unlike gedit). Features include syntax highlighting, code folding, files browsing, class/method browsing, jump directly to method declarations, integrated terminal, plugin support, and snippets.

The following quote is from a Softpedia review:
Geany is the best Linux IDE I've used until now. I think it will become more and more adopted by Linux developers, because it manages to combine robustness with power. There are other IDEs out there as well, but they seem to lack most of the abilities Geany has. Once you use Geany, I'm sure you will not switch to another IDE.

Geany does have its drawbacks and is a ways away from being the next TextMate, but it is the best Ubuntu IDE I have found for us non-VI folk. I think if you are a jedit or gedit fan, you owe it to yourself to at least give Geany a look. If you are a fan of full blown IDE’s like NetBeans or RadRails, it may not be for you.

I will try to give a more in-depth review with its Pros and Cons for Ruby developers in a not too distant blog post.

For even more information on Ruby editors, I found this forum thread on RAILSforum helpful.

Are there any other good Ruby editors that I should check out?

My120_135 RE: DEPOT

by Ruslan Voloshin | 3 days ago | Read more

Спасибо огромное, сам бы не додумался. Оказывается всё так просто. Был бы женщиной поцеловал бы ...................(наверно). Да и ещё а где менять пароль админа, по умолчанию стоит secret, а я всегда думал что он находтся в database, а там пусто/ И еще /!\ FAILSAFE /!\ Thu Jul 03 18:41:49 +0600 2008 Status: 500 Internal Server Error No route matches "/" with {:method=>:get} что это обозначает (это другой проект который был скачан простым rar архивом)

Microsoft Equipt

by Rahoul Baruah | 3 days ago | Read more

Maybe it’s just me but I think Microsoft’s branding is awful. “Equipt” means you are getting two unrelated products with names totally unlike the one on the box you are actually buying.

N641200498_9496 Tricolores: decisão por pênaltis não é loteria, OK?

by Cristiano Dias | 3 days ago | Read more

Ontem eu torci pelo título do Fluminense. Não tenho nenhum amigo equatoriano e tenho alguns amigos tricolores (todos ricos, chiques e famosos, claro, membros da mais alta aristocracia carioca). Mas agora que o time perdeu o título da Libertadores já começou o pessoal a dizer que “poxa, perder nos pênaltis é azar”. Peralá, não é [...]

5275150 4-timmars arbetsvecka i backspegeln

by Svante Adermark | 3 days ago | Read more

[![The 4-Hour Workweek](http://fibban.fleecelabs.se//4-vecka-igen.jpg)](http://fourhourworkweek.com) Det är nu ca ett år sedan jag läste The Four Hour Workweek av Tim Ferriss. Den är ju skriven på ett väldigt övertalande vis, så det är svårt att värja sig mot dess budskap. Lite som...

Ich Rails 2.1 und xss_terminate

by Tobias Reike | 3 days ago | Read more

Auch mit Rails 2.1 und dem xss_terminate Plugin scheint es Probleme zu geben. Beim Speichern eines Objekts kommt immer der Fehler You have a nil object when you didn't expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.[] Der Fix ist einfach: Eine neue Version des Plugins herunterladen, diese ist gefixt [...]

The party is on!

by Michael Carøe Andersen | 3 days ago | Read more

Roskilde Festival, the biggest party in Denmark, is officially starting today. I came on Friday and has been working as an IT supporter until now. There has been plenty of stuff to do, see and drink already. The skaterpark has been going, the small Pavilion stage had some cool bands and there was a football [...]

Holger and the joys of island life

by Matthew Langham | 3 days ago | Read more

We spent a relaxing long weekend on the small island of Baltrum - just off the German North Sea coast. Baltrum is very small and special in that there are no motorized vehicles on the island - except for...

Rails filters

by Witold Rugowski | 3 days ago | Read more

For those who have missed it, since Rails 2.0 just returning false does not break filter chain (read - action gets executed). Filter chain is broken only when filter render something or redirects. Just short reminder :)

100_5106-785540 jQuery UI Accordion Callback and Dynamic Content Height

by Johannes Fahrenkrug | 3 days ago | Read more

This is just a quick note. I'm using jQuery (via the Google Ajax Libraries API) and jQuery UI Accordion in an OpenSocial application. I need to know which accordion page is about to show and I need the accordion to dynamically change height according to the new contents. So this is how you do it:
First your HTML markup...

<div id="accordion">
<ul id="files-accordion" class="ui-accordion-container" style="padding-top: 10px; width: 550px; clear: both;">
<li><a href="javascript: void(0)" class="ui-accordion-link">Images</a>
<div id="files-Image">Loading...</div>
</li>
<li><a href="javascript: void(0)" class="ui-accordion-link">Videos</a>
<div id="files-Video">Loading...</div>
</li>
<li><a href="javascript: void(0)" class="ui-accordion-link">Files</a>
<div id="files-File">Loading...</div>
</li>
</ul>
</div>


And this is how you'd turn it into a nice accordion:


$('#accordion > ul').accordion({
clearStyle: true,
autoHeight: false
}).bind("accordionchange", function(event, something, ui) {
console.dir(ui.newHeader); // jQuery, activated header
console.log(ui.newHeader[0].id); //this has the id attribute of the header that was clicked
doSomething(ui.newHeader[0].id);
});


Note that "ui" is the 3rd, not the 2nd parameter of the event callback. Within that callback you can call some function that will dynamically load content into the selected accordion pane, maybe like this:


var doSomething = function(paneId) {
$('#' + paneId).html('My dog\'s breath smells like dog food');
};


You can basically put any attribute you want into the <a> tag within the <li> element and access it via the dot notation in your callback (ie ui.newHeader[0].someAttributeOfMyChoice). Enjoy!

MOTOFONE

by Pedro Custódio | 3 days ago | Read more

The MOTOFONE handset redefines wireless communication with high design, smart features and easy functionality at a low price. (…) the MOTOFONE enables even the newest phone users to embrace mobile communication with confidence and style.

I first saw them last month in London on Oliver Ueberholz hands and it immediately surprised me for it’s simple design [...]

Work with us

by Piers Cawley | 3 days ago | Read more

If the last post about our Javascript issues didn’t put you off, then you might be interested to know that we’re hiring. If you’re an experienced, test infected Ruby on Rails programmer with some Javascript and a real world consumer website or two under your belt, and you’re happy to work in Newcastle upon Tyne, then we definitely want to hear from you. I’d probably be interested in at least hearing from you if you’re an experienced dynamic language programmer who has only recently made (or is considering making) the switch to Ruby and Rails. It’s only syntax after all.

The money’s decent, the work is interesting, the people (well, apart from me, obviously) are great, and Newcastle’s a fantastic city. Drop me a line, ping me on AIM/gTalk/Twitter or just send your CV to the jobs@amazing-media.com.

My120_135 RE: DEPOT

by Ruslan Voloshin | 3 days ago | Read more

Лучше саму с начала делать прилоежние а то не будешьпонимать откуда все берется хотя как вараинт можешь посомтреть ужеготовое приложение.

Live fuzzy search using n-grams in Rails

by Jörg Battermann | 3 days ago | Read more

Live fuzzy search using n-grams in Rails: (via johan)

Brando2 Edge Rails: Crie regras para o String#humanize

by Carlos Brando | 3 days ago | Read more

Já faz um certo tempo que Pratik Naik está tentando colocar este patch no Rails e parece que finalmente conseguiu. No arquivo config/initializers/inflections.rb você tem a opção de acrescentar novas inflexões para pluralização, singularização e outros: Inflector.inflections do |inflect| inflect.plural /^(ox)$/i, ‘\1en‘ inflect.singular /^(ox)en/i, ‘\1‘ inflect.irregular ‘person‘, ‘people‘ inflect.uncountable %w( fish sheep ) end Na [...]

15 Capture power with your curtains - CNN.com

by Darryl L. Pierce | 3 days ago | Read more

Imagine every time you closed your curtains, you were capturing enough solar energy to power your laptop. The technology is available, but no one's packaged it up in a handy DIY kit at your local hardware store. Follow the link for the rest of the article...

Why Identi.ca is important

by Edd Dumbill | 3 days ago | Read more

Identi.ca's a new microblogging service. It rocks, and here's why

Unobtrusive Ajax patterns: tabs

by Tore Darell | 3 days ago | Read more

(Ok, there’s not one bit of Ajax in this, but I’m just trying to keep it consistent :)

I guess you know what tabs are: There are two main components, the tabs themselves and the panes they control. To “tabify” an HTML element, we need to know which element is the container (like a form) and which elements are the tab panes and the titles to be used in the tabs. Let’s use a form as an example container:

<form class="tabs">
  <fieldset class="tab">
    <legend class="title">Tab 1</legend>
    <p><label>Koda</label><input type="text" />
    <p><label>Basanda</label><input type="text" />
  </fieldset>
  <fieldset class="tab">
    <legend class="title">Tab 2</legend>
    <p><label>Bosoya</label><input type="text" />
    <p><label>Tikki</label><input type="text" />
  </fieldset>
  <p class="button">
    <input type="submit" value="Ok" />
  </p>
</form>

Here you can see that the fieldsets are marked as tabs. Actually they’re tab panes, we’ll generate the tabs from the title elements (legend).

document.observe('dom:loaded', function(){

  //Find all elements with the "tabs" class (the containers)
  $$('.tabs').each(function(container){
    var tabs = container.select('.tab');//Panes
    //Create a list to contain the tab elements
    var tabList = new Element('ul', {'class':'tablist'});
    //Go through each tab pane
    tabs.each(function(tab){
      var li = new Element('li');//A tab
      li.update(tab.down('.title').innerHTML);
      //Observe the click event, this changes the active tab
      li.observe('click', function(){
        //First, inactivate all tabs
        tabList.select('li').invoke('removeClassName', 'active');
        //Then, activate this tab
        li.addClassName('active');
        //Inactivate all tab panes
        tabs.invoke('removeClassName', 'active');
        //Activate the associated tab pane
        tab.addClassName('active');
      });
      tabList.insert({bottom:li});//Add the tab to the list
    });
    container.addClassName('enhanced');//Make it targetable with CSS
    container.insert({top:tabList});//Add the tablist to the top of the container
    //Activate first tab
    tabs.first().addClassName('active');
    tabList.down('li').addClassName('active');
  });

});

Now all you need to do is add some CSS:

.tabs .tablist {
  list-style-type: none;
  margin: 0 !important;
  overflow: hidden;
}

  .tabs .tablist li {
    float: left;
    background: #ccc;
    border: 1px outset #ccc;
    border-bottom: 1px solid #bbb;
    color: #333;
    padding: 0.25em;
    margin-right: 2px;
  }

    .tabs .tablist li:hover {
      cursor: pointer;
      text-decoration: underline;
    }

    .tabs .tablist li.active {
      background-color: #ddd;
      border-color: #ddd;
    }

.tabs.enhanced .tab {
  display: none;
  background: #ddd;
  border: 1px outset #ddd;
  border-top: none;
  padding: 1em;
}

  .tabs.enhanced .title {
    display: none;
  }

  .tabs.enhanced .tab.active {
    display: block;
  }

And then you have tabs:

<form class="tabs">
Tab 1

<label>Koda</label><input type="text" />

<label>Basanda</label><input type="text" />

Tab 2

<label>Bosoya</label><input type="text" />

<label>Tikki</label><input type="text" />

Tab 3

<label>Ottobo</label><input type="text" />

<label>Boshatta</label><input type="text" />

Tab 4

<label>Umahasha</label><input type="text" />

<label>Heeta</label><input type="text" />

</form>

Of course this can be organised and abstracted more to make it seem a bit more object-oriented, but that’s the basics of it.

Channel Frederator - Watch Funny Cartoons Online

by Logan Koester | 3 days ago | Read more

Channel Frederator - Watch Funny Cartoons Online

Видео ИНК

by Oleg Dashevskii | 3 days ago | Read more

Выкладывание видеозаписей ИНК оказалось невероятно эффективным способом познакомиться с их официальными распространителями :)

С Яндекс.Диска я файлы удалил, все вопросы по адресу records@igorkalinauskas.com.

1940985520_7e01044d9a_m_d New Zealand on SALE!

by Nigel Ramsay | 3 days ago | Read more

28% off everything!

Note: Australia also on sale. Save around 12%

Usability testing (throws) rocks

by Piers Cawley | 3 days ago | Read more

Usability testing is wonderful. But wow, its humiliating.

I’ve spent the last few weeks working on the Amazingtunes in page player. Amazingtunes is a music site, so we need to play music. However, we don’t like the way that most music sites work; either the music stops as you go from one page to another, or the player is a huge Flash app running in its own window. There has to be a better way. There needs to be a popup window if you want to eliminate stop/start behaviour, but there’s surely no reason not to keep the controls on the main page.

So, we set about writing somthing that did just that. We settled on using Jeroen Wijering’s excellent flvPlayer, which handles the media formats we need and has good Javascript control and communications. This sits in the child window and we use Javascript cross-window communication to have a player controller in the main window that looks something like:

Piers Cawley on amazingtunes.com
Uploaded with plasq’s Skitch!

This is all done in HTML and and Javascript, the progress bar does the Safari trick of running behind the tune data links, the buttons do their AJAX magic and the whole thing is rather slick, though I say so myself.

At least, we thought it was slick until we pointed the usertesting.com legions at it. Without exception, they ignore the in page player, foreground the popup and use the teeny weeny controls on the flash player. Originally, the popup window didn’t even display any transport controls, it just had a picture of some speakers and some text asking the user not to close it because it was playing the tunes. We added transport controls as a stopgap while we made the in page player work properly.

I sound like I’m whinging don’t I? It’s certainly a blow to the ego to see something we spent so much time and attention on being ignored by our sample users. On at least one occasion, while watching the screencasts I found myself boggling at the things the users did, and if I didn’t shout “Just play some bloody music!” at the screen, then I came worryingly close.

It would be easy to retreat into a state of denial: “They’re not our target users! They’re stupid! They’re American! If they would only magically intuit the way we think they should use the site!”. And maybe it would be comforting to do so, for a while. The right thing to do is to suck it up – take away from those videos the sure and certain knowledge that bits of the site don’t work and do something about it.

We may dislike the ‘popup window for transport controls’ model of controlling music playback, but users are cool with it. And it’s not as if the work we did on making the in page player work is going to be wasted – widget is straightforwardly event driven so it’ll work just as well in the popup window, and the communication protocol will be much simpler. Having the player in its own window means we’ll be able to extend its interface in ways that would be hard when the player had to share window space with the rest of the page. In the end, it’s all good.

But… damn that in page player was sweet. I learned Javascript as I wrote it (mostly by pretending it was Perl with odd syntas) and I’m bloody proud of it. I’ll happily replace it with the next iteration (which I’m already working on), but it’ll be with a pang of remorse all the same.

My120_135 RE: DEPOT

by Ruslan Voloshin | 3 days ago | Read more

Не поленись прочитай README-DEPOT.html в корне проекта, там все описано. .... To Create the Depot Databases: Open a command window. If it has not already been started, start the MySQL database server. Type the following command to create the development database and press Enter. mysqladmin -u root -p create depot_development Note: If the root user does not have a required password, omit the -p argument. (Optional) Repeat the command to create the depot_test and depot_production databases. .... To Create the Depot Tables: * In the Projects window, right-click the Depot Application project node and choose Migrate Database > To Current Version from the pop-up menu. ....

Jaiku learns from Twitter

by Tom Klaasen | 3 days ago | Read more

How else to explain this?

(or they learned from LinkedIn, of course)

Jaiku learns from Twitter

by Tom Klaasen | 3 days ago | Read more

How else to explain this?

(or they learned from LinkedIn, of course)

Me Verify database connections in long-running idle Rails processes

by Craig Webster | 3 days ago | Read more

I've interfaced one of my xmpp4r bots with the Xeriom Networks control panel. I had intended to write a post about it to show how easy it is, but I've been beaten to it. I can, however, offer one piece of advice that will stop the bot dying after a few hours of idling: periodically verify your database connections.

RAILS_DEFAULT_LOGGER.debug "Launching database connection verifier"
Thread.new do
  loop do
    sleep 1800 # Half an hour
    RAILS_DEFAULT_LOGGER.debug "Verifying database connections"
    ActiveRecord::Base.verify_active_connections!
  end
end

Adding the above code to a script will stop database connections getting dropped (or, at least, will reconnect them if it happens).

To see it in action, add support@xeriom.net to your XMPP roster and have a chat. It's not hugely intelligent, but it does support a few useful commands.

Me Verify database connections in long-running idle Rails processes

by Craig Webster | 3 days ago | Read more

I've interfaced one of my xmpp4r bots with the Xeriom Networks control panel. I had intended to write a post about it to show how easy it is, but I've been beaten to it. I can, however, offer one piece of advice that will stop the bot dying after a few hours of idling: periodically verify your database connections.

RAILS_DEFAULT_LOGGER.debug "Launching database connection verifier"
Thread.new do
  loop do
    sleep 1800 # Half an hour
    RAILS_DEFAULT_LOGGER.debug "Verifying database connections"
    ActiveRecord::Base.verify_active_connections!
  end
end

Adding the above code to a script will stop database connections getting dropped (or, at least, will reconnect them if it happens).

To see it in action, add support@xeriom.net to your XMPP roster and have a chat. It's not hugely intelligent, but it does support a few useful commands.

My120_135 RE: DEPOT

by Ruslan Voloshin | 3 days ago | Read more

Прочитал, немного понял, что радо базу создать, подскажите как это сделать, где взять названия баз, таблиц и т.д.

Ich Rails 2.1 und acts_as_taggable_on_steroids

by Tobias Reike | 3 days ago | Read more

Wie man an meinen letzten beiden Blogeinträgen erkennt, versuche ich momentan ein Projekt auf Rails 2.1 umzustellen. Das ist nicht all zu schwer, da wir das Projekt vorher auf Rails 2.0 laufen hatten, allerdings gibt es doch einige Stellen die mich wundern. Zum Einen lief Gettext nach der Umstellung nicht mehr und jetzt auch acts_as_taggable_on_steroids  nicht [...]

алё, Бен, это Данила. Ай нид ёьо хеълп

by Igor Gajsin | 3 days ago | Read more

Спортивно-транспортное устройство из зогадки оказалось весьма сложным в освоении. Не настолько сложным, как я думал, но всё равно сложным. Когда я проезжаю целых два метра --- я радуюсь как младенец. Но чтобы забраться на него и начать движение --- приходится держаться за стенку.

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

N532412627_2241 Consultant Ruby on Rails pour Direct Interactive - NYC

by BONNAURE Olivier | 3 days ago | Read more

Cela fait maintenant plusieurs mois que je travaille pour la société Direct Interactive située à Manhattan, NYC. Je suis donc consultant en développement Ruby on Rails pour cette entreprise. Depuis quelques jours j’ai signé mon premier contrat avec eux, ce qui officialise notre collaboration. Je tiens vraiment à remercier toute l’équipe de Direct Interactive pour leur accueil [...]

Видео ИНК

by Oleg Dashevskii | 3 days ago | Read more

Женская природа (лекция 30.11.2007)

Лекция I. Части 1, 2.
Лекция II. Части 1, 2.

My120_135 RE: RE: DEPOT

by Ruslan Voloshin | 3 days ago | Read more

Не туда смотриш. В файл логов сомтреть надо log/development.log и смотри, что случилось до ошибки 500

6 aizatto: 3rd at ACM, dissapointed with myself

by Ezwan Aizat bin Abdullah Faiz | 3 days ago | Read more

aizatto: 3rd at ACM, dissapointed with myself

Mornhead_150 65 things that look like Pac-Man

by Hendrik Mans | 3 days ago | Read more



65 things that look like Pac-Man

Daft_cow_100x100 Best. Cover. Evar. We Made This

by Andrew Aitken | 3 days ago | Read more



Best. Cover. Evar. We Made This


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