BlogSphere
Keep up to date with your favourite Rails bloggers in context.
by
Paulo Carvalho | 3 days ago |
Read more
Very nice city in the south of France.
It was very hot when I went there (june 2008).
The bridge of Avignon is the greatest symbol of the city.

by
Ezwan Aizat bin Abdullah Faiz | 3 days ago |
Read more
aizatto: His eccentric education
by
Luke Redpath | 3 days ago |
Read more
Here at Reevoo, we’ve just (literally) gone live with our new open-source website, Reevoo Labs. Our old open-source site is moribund and now redirects to the new site.
by
Raymond T Hightower | 3 days ago |
Read more
Next meeting: Saturday, July 19, 2008 at 3pm.
Location: IIT Chicago Campus, Room 123 of the Engineering 1 building near 31st & State Street. Parking is available across State Street; $4.00 for up to four hours.
Map: See the IIT campus map for the exact location.
Green Directions: From downtown Chicago, take the CTA Green line to the 35th/IIT station and walk to Engineering 1.
Curious about WindyCityRails? After the meeting we’ll head over to the McCormick Tribune Campus Center (MTCC), site of the WindyCityRails conference. Once there we’ll answer questions and finalize our logistics for the event. See you then!
by
Peter Sarnacki | 3 days ago |
Read more
I’m in the train from Zgorzelec to Warsaw returning from my girlfriend’s place. Polish trains are like turtles, so I will have pretty much time for writing ;-)
I’ve wrote (or maybe it’s better to say copy&paste) little rails app like in Mike Clark’s tutorial for attachment_fu. A few months ago there was Mugshots exhibition in Yours Gallery in Warsaw based on work of Peter Doyle. I saw it with Kathleene, she took some pictures. Great! I have material to fill my new app, what else could I possibly dream of?! (yeah… macbook, but it’s obvious ;-).
Now you can admire my hard work: mugshots.drogomir.com/mugshots/
But wait… It’s not so cool… where are all those shiny javascript effects? Don’t worry. I will show you how to spice this dish.
We will need:
I’ve pushed application to github, so you can see entire code. Clone it or grab the tarball
There is one thing that is not straight forward. @main_js variable in app/views/layouts/main.rhtml:
<%= javascript_include_tag @main_js %>
It’s there for changing javascript file loaded. When url is app.com/js/some_javascript_file/mugshots, @main_js should be “some_javascript_file.js”. I’ve done this to have possibility to show you app with different javascript files without changing the code. See routes and mugshots_controller.rb to find out how it was done (or run “rake routes” in app dir to see routes).
Lets begin.
What to do first? It’s all about uploading files, so I would add upload progress bar to form in mugshots.drogomir.com/mugshots/new. To implement it you will need some kind of server module:
You have to install and enable one of the above modules to make progress bar work.
Then add some javascript to applications.js. This example is using “LightBoxFu”: – little script that I wrote to show progress bar as an overlay. It’s based on Riddle’s work – all positioning is in CSS (except expressions for IE) so it’s really light and fast. Ideal for such a task. If you don’t like lightBoxFu you can use any other form of displaying message (you can use some other lightbox with displaying code function or even blockUI plugin).
// handy trick, if we can't use $ beaceuse jQuery.noConflict
// was used, jQuery is passed as argument in document ready
// so we can name it $
jQuery(function($) {
// add upload progress to our form
$('form.progress').uploadProgress({
start:function(){
// after starting upload open lightBoxFu with our bar as html
$.lightBoxFu.open({
html: '<div id="uploading"><span id="received"></span><span id="size"></span><br/><div id="progress" class="bar"><div id="progressbar"> </div></div><span id="percent"></span></div>',
width: "250px",
closeOnClick: false
});
jQuery('#received').html("Upload starting.");
jQuery('#percent').html("0%");
},
uploading: function(upload) {
// update upload info on each /progress response
jQuery('#received').html("Uploading: "+parseInt(upload.received/1024)+"/");
jQuery('#size').html(parseInt(upload.size/1024)+" kB");
jQuery('#percent').html(upload.percents+"%");
},
interval: 2000,
/* if we are using images it's good to preload them, safari has problems with
downloading anything after hitting submit button. these are images for lightBoxFu
and progress bar */
preloadImages: ["/images/overlay.png", "/images/ajax-loader.gif"]
});
});
And some styling for progress bar:
#progress {
margin: 8px;
width: 220px;
height: 19px;
}
#progressbar {
background: url('/images/ajax-loader.gif') no-repeat;
width: 0px;
height: 19px;
}
That’s it, just add “progress” class to your form and progress bar is working:
<% form_for(:mugshot, :url => mugshots_path,
:html => { :multipart => true, :class => "progress" }) do |f| -%>
Uploading files looks much better right now, check it here: http://mugshots.drogomir.com/js/progress/mugshots/new
So what now? I find the “add photo, click New mugshot, add photo” scenerio annoying. We could add more than one file on each submit. For that we will use jquery.MultiFile.js. This one is a bit tricky, cause we will need to tweak code handling uploads also.
Javascript enabling mutlifile:
jQuery(function($) {
$('.multi-file').each(function() {
// change name of element before applying MultiFile
// so array of files can be send to server with mugshot[uploaded_data][]
$(this).attr('name', $(this).attr('name') + '[]');
}).MultiFile();
});
We must also add “multi-file” class to file field:
<%= f.file_field :uploaded_data, :class => 'multi-file' %>
From javascript point of view that’s all. Let’s see how uploaded photos are handled by rails app:
@mugshot = Mugshot.new(params[:mugshot])
So mugshot.uploaded_data is filled with data from params[:mugshot][:uploaded_data]. Good for one file. But with array of files we should create Mugshot for each file. I would add a method in model:
def self.handle_upload(mugshot_params)
# array for not saved mugshots
mugshots = []
if mugshot_params[:uploaded_data].kind_of?(Array)
mugshot_params[:uploaded_data].each do |p|
unless p.blank?
mugshot = Mugshot.new(:uploaded_data => p)
mugshots << mugshot unless mugshot.save
end
end
else
mugshot = Mugshot.new(mugshot_params)
mugshots << mugshot unless mugshot.save
end
mugshots
end
and slightly change controller code:
def create
@mugshots = Mugshot.handle_upload(params[:mugshot])
# if @mugshots is empty there are no errors
if @mugshots.blank?
flash[:notice] = 'Mugshot was successfully created.'
redirect_to mugshots_url
else
render :action => :new
end
end
Only one problem left. Validation.
Easiest way is to change error_messages_for:
<%= error_messages_for :object => @mugshots %>
It works. But suppose you are uploading 3 files and 2 of them are too big. You will end with:
- Size is not included in the list
- Size is not included in the list
Which one was added? Some lottery here…
I would tweak attachment_fu error messages a bit. By default it uses validates_as_attachment method which simply adds:
validates_presence_of :size, :content_type, :filename
validate :attachment_attributes_valid?
Instead validates_as_attachment we can isert our new code:
validates_presence_of :size, :content_type, :filename, :message => Proc.new { |mugshot| "can't be blank (#{mugshot.filename})" }
validate :attachment_attributes_valid?
def attachment_attributes_valid?
[:size, :content_type].each do |attr_name|
enum = attachment_options[attr_name]
errors.add attr_name, "#{ActiveRecord::Errors.default_error_messages[:inclusion]} (#{self.filename})" unless enum.nil? || enum.include?(send(attr_name))
end
end
Now it’s a lot more readable:
- Size is not included in the list (filename.jpg)
- Size is not included in the list (filename1.jpg)
Submit form looks better now, but viewing files is still ugly. Maybe we could add some lightbox? No problem:
$('#mugshots li a').lightBox();
I used that lightbox cause I had it configured for my previous rails apps, but pick your favourite one, as there are gazilions of them.
This is first step of tweaking our app. Javascript is in step1.js file: mugshots.drogomir.com/js/step1/mugshots/new
What now? User can upload many files at one submit and see progress bar. What else do we need? Ajax! My preciousssss…
As all children know, XMLHttpRequest can’t upload files. What a shame… our new tweaked mugshots app is all about uploading files. Although you can’t do it with XHR, there is a way to imitate it. It is obtained by creating an iframe and uploading files to it.
Luckily Mike Malsup has done hard work for us writing jQuery form plugin.
First, we need our form. I would place it instead “New mugshot” link. Link has id=”new_mugshot_link”, so this piece of code will replace it with form:
/* create upload form with multifile instead of new mugshot link */
var form = $('<form method="post" enctype="multipart/form-data" class="progress ajax" action="/mugshots">');
var label = $('<p><label for="mugshot_uploaded_data">Upload mugshot: </label></p>');
var input = $('<input type="file" class="multi-file" id="mugshot_uploaded_data" size="30" name="mugshot[uploaded_data]"/>');
label.append(input).appendTo(form);
form.append('<p><input type="submit" value="Create" name="commit"/></p>');
if (typeof(AUTH_TOKEN) != "undefined") form.append('<input type="hidden" value="'+AUTH_TOKEN+'" name="authenticity_token"/>');
$('#new_mugshot_link').replaceWith(form);
Our form has to be send to an iframe, so we have to apply ajaxForm to it. After replacing link with form we can’t figure out when form is actually appended to DOM. To be sure that form is there, we can use livequery. It will fire callback function when ‘form.ajax’ will be available:
$('form.ajax').livequery(function() {
$(this).ajaxForm({iframe: true, success: function (responseText, statusText, form) {
var url = $(form).attr('action');
/* get new files */
$.ajax({
url: url,
dataType: "script",
beforeSend: function(xhr) {xhr.setRequestHeader("Accept", "text/javascript");},
/* we need to update lightbox array to include new files */
complete: function() { $('#mugshots li a').lightBox(); }
});
}});
});
When new form tag with class “ajax” will be available callback function will be run. iframe option tells form plugin to add hidden iframe (it will handle file upload).
The above code has ajax call to ”/mugshots” url which will run index.js.erb (RJS), so we will need one:
app/views/mugshots/index.js.erb
jQuery('#mugshots').html(<%= js render(:partial => 'mugshot', :collection => @mugshots) %>);
to handle it we need to use respond_to:
respond_to do |format|
format.html
# layout => false is here beaceuse without it rails are looking
# for layouts/index.js.erb
format.js { render :layout => false }
end
Normally I try not to use RJS to keep all my javascript (and ajax) logic in javascript files, but in case of images it isn’t so esay. I will write about it and about javascript templating systems in one of the next posts.
Take a look at: mugshots.drogomir.com/js/step2/mugshots Doesn’t it look nice?
There is only one problem :) No ajax validation. After submitting files, javascript can’t get any info about errors or uploaded files beaceuse it is treated like normal html request and response is loaded in an iframe. How to fix it? I’ll write about it in the next post. :)
by
Justin Williams | 3 days ago |
Read more
When it rains, it pours. Tons of fun stories in the past few days. Let’s highlight:
If you see a guy swerving in a Toyota Avalon with the license plate UE 1, it’s quite possibly UE president Stephen G. Jennings. He was picked up last night on a DUI. Toga! Toga! Toga!
There [...]
by
Joey deVilla | 3 days ago |
Read more
Having grown up in the late 70s and early 80s, this is forever linked in my mind with Cincinnati.
Last weekend, the Ginger Ninja and I went to Cincinnati to attend a wedding. Cincinnati was her home for just under a year when she took her first job there; for me, its state, Ohio, is my [...]
by
Ezwan Aizat bin Abdullah Faiz | 3 days ago |
Read more
aizatto: You grok?
by
Arik Jones | 3 days ago |
Read more
It looks like Apple gave their wireless keyboard a redesign. I’m surprise their wasn’t a re-name. Maybe Apple Wireless iBox? lol. Someone is definitely getting fired for this. See full image here. Visit website here
by
Peat Bakke | 3 days ago |
Read more
Holy crap. Every week there’s a miniature gold rush when a new microblogging site is released. Twitter proved the market, and the concept is so simple that anyone with an elementary web development education can put up their own site. And, apparently they are.
So, Twitter kicked the whole thing off, and it’s [...]
by
Justin Williams | 3 days ago |
Read more
While my Fourth of July plans will be taking a bit of a backseat thanks to Apple’s July 7 deadline for AppStore submissions, that doesn’t mean I don’t want to celebrate vicariously through you.
If you are planning on setting off fireworks over the weekend, I want to see video and photos. I’m not talking [...]
by
Alexander Muse | 3 days ago |
Read more
I covered GameWager earlier this year. George Giannukos and Thomas Marriott founded Austin-based GameWager in 2007 with funding from various angels including Todd Wagner (Broadcast.com). GameWager is an online platform for rewarding gamers’ performance with prizes and cash as well as sharing stats/achievements with friends. GameWager currently supports PC titles and enhances game-play with more [...]
by
Claudio Torcato | 3 days ago |
Read more
Sérgio Amadeu, eu seu blog, pede que façamos pedidos aos nossos senadores (do nosso Estado) para criarem emendas anulando certos artigos e incisos do substitutivo do Senador Azeredo. Agora, eu fico pensando, a quem devo recorrer? Os senadores do Piauí são muito fraquinhos. Mão Santa, não dá. Ele é dotado de uma desorgonização fabulosa. O [...]
by
Scott Motte | 3 days ago |
Read more
I was getting the following error after doing sudo gem install scrubyt and trying to run a scrubyt script
can't activate RubyInline (= 3.6.3), already activated RubyInline-3.7.0] (Gem::Exception)
I found this solution for how to fix the Scrubyt RubyInline version error, and it worked great.
sudo gem uninstall RubyInline -v 3.7.0
by
Dan Pickett | 3 days ago |
Read more
So I’m thoroughly annoyed that a fieldWithErrors div wraps around a field that fails validation. I added a file called field_with_error_fix.rb in config/initializers to solve this pesky problem. It has the following code:
ActionView::Base.field_error_proc = Proc.new { |html_tag, instance|
"<span class=\"fieldWithErrors\">#{html_tag}</span>" }
Goodbye inappropriate divs!
addthis_url = 'http%3A%2F%2Fwww.enlightsolutions.com%2Farticles%2Frails-validation-fieldwitherrors-annoyance%2F';
addthis_title = 'Rails+Validation+fieldWithErrors+annoyance';
[...]
by
Robert Dempsey | 3 days ago |
Read more
The first half of 2008 has seen a great number of happenings in the Ruby and Rails worlds. Here are the top ten for the first half of 2008.
June 23, 2008 - Rails scales - LinkedIn serves 1 billion pages using Rails
June 1, 2008 - Rails 2.1 is released
May 31, 2008 - Ruby 1.8.7 is [...]
by
Thomas Lee | 3 days ago |
Read more
In many open source software projects, full backwards compatibility is ensured between minor point releases (for example, 1.2.3 to 1.2.4). Generally speaking, these releases are made mostly to get important defect and/or security fixes to the public in a relatively timely manner. PHP is a notable exception to the rule: I haven’t been following development [...]
by
Eric Mill | 3 days ago |
Read more
I haven’t seemed to muster the energy to write about my experiences at the Personal Democracy Forum last week. This is odd, because I took copious notes during the entire event, tried to lock as much as I could in my memory, and do the very best job I could of meeting people despite not knowing a single solitary person at the conference and not working in any way remotely connected to politics! I owed it to the friends and family who helped pay my way there to make the absolute most of my time at it.
Maybe my lack of posting on it is burnout—from the conference, and all the rest of the stuff I’m doing now as a result of it. Rest assured, I am trying to make sure the conference was concretely worthwhile, and am actively pursuing, every day, a number of ideas and motivations that have arisen recently. I’ll be making a trip to DC later this month to continue my pursuit, and in the meantime I’m paying way more attention to places like OpenCongress and other projects spawned off of the Sunlight Foundation. OpenCongress seems by far to be the most successful project they’ve funded, as searching for any bill number puts them on the first page of Google results, and some of their pages have a simply absurd number of comments. I’m really impressed by the design, scope, and simplicity of the site.
Also, I added ridiculous charts to ohnomymoney, so, you know, go review my financial history since May if you want. See if I care.
by
Justin Williams | 3 days ago |
Read more
If you were looking forward to spending the next few months wearing a fedora, carrying around a race sheet and watching some horses run in Henderson, you’ll be sad to know that Ellis Park won’t be opening this summer and that all employees have been terminated.
Appearing in the U.S. District Court in Owensboro, [...]
by
Stefan Tilkov | 3 days ago |
Read more
Unsurprisingly, I love Steve’s new article....
by
nowazhu | 3 days ago |
Read more
facebook最终证实被封了,国内的SNS(比如千年老抄海内这个团队)也许会高兴一阵。不过话说回来,SNS似乎正和当年的博客一样开始蓬勃发展,前段时间开心网便是一个例证,我们公司里竟然有相当多的人都泡在里面,让我有些愕然~~~
对于我来说,我比较赞成不知道在哪里看到的这句话:“如果一个SNS让你一空下来就想着要上去看看,那才是成功的SNS”。当然这里说的是一个比较完美的状态,这样黏度的用户事实上虽然不是没有,却是极少的。不过这里面其实透露出一个需求——用户希望随时随地的访问SNS。从06年起移动设备的浏览器开始越来越强悍,到现在iPhone的mobilesafari引起用户使用移动设备浏览网络习惯的改变,可以想象未来也许我们站点的主要访问将来自移动设备也未可知。
只是不知道我们伟大的TD啥时候可以真正全网无缝覆盖,真正成熟全民使用。
奥运越发的逼近,可是社会却似乎越来越不和谐。这几天Google Reader里充斥的大多是三个俯卧撑引发的血案,还夹杂着另外一些不是很“和谐”的言论。其实政治总是属于“一小撮”人的,规则的制定同样是为了方便一小撮人更好的凌驾于常人之上。
这些不和谐的一切对衙门来说不过是小插曲罢了。
所以,不要在任何一个年代对任何政体抱有幻想,大多数情况下,也不要对文字抱有太大的幻想。
所以,做一个民族主义者会比爱国主义者更好一些。当然,宇宙主义者更牛。
只是,其实我觉得,作为小娘的老公是最好的。
by
Robert Schmidl | 3 days ago |
Read more
Schonmal ein Video bei Youtube angeschaut? Ich schätze ca. 99,5% aller Internetnutzer werden auf diese Frage mit "Ja" antworten. Für diese überschaubare Anzahl Leute ist demnächst ein Stückchen Privatsphäre weniger im Netz vorhanden.
by
Yan Pritzker | 3 days ago |
Read more
While twitter is out repairing its architecture, they seem to have turned off the track feature. track used to be an incredibly useful feature that is very well hidden as a twitter command instead of a part of their UI (epic design fail, or maybe they want it this way). Here’s how to use a [...]
by
Bill Heaton | 3 days ago |
Read more
I’m looking for work. Find me on Monster, Careerbuilder, Hotjobs, Creativehotlist or AQUENT, résumé link: http://pixelhandler.com/resume
by
Josh Starcher | 3 days ago |
Read more
Johanna Chase has a new cd out titled Azusa. Named after the city she’s been living in the past few years. Azusa is hands down her highest quality work to date. Of course it helps that my brother (Matt) did all the production and mastering.
My favorite track is “What I Mean”. You can listen to [...]
by
Brandon Keepers | 3 days ago |
Read more
Collective Idea is hosting another Ruby on Rails Session on August 25-28, 2008. Sessions is a new take on training: it makes it actually enjoyable! If you’re new to the Ruby world, or just want to get deeper into Rails, check it out.
The last session was a blast. People flew in from Orange County, New York City and the Midwest. We had pizza and beer at the brewery, grilled on the beach, played frisbee and sand volleyball, and of course, learned Rails.
I’m really looking forward to this next one!
by
Igor Gajsin | 3 days ago |
Read more
С сожалением приходится признать, что никто не угодал. Ближе всего к правде попали
krady_ptic с картинкой

и
n_sunkittenс предположением: "4 велика, один без одного колеса"?
Итак отгадка
В гараже стоят:
ролики --- 8 колёс
автомобиль --- 4 колеса
велосипед обыкновенный --- 4шт, 4х2=8 колеёс

одноколёсный велосипед --- 1 колесо
получаем 8 + 4 + 4х2 + 1 = 21 колесо
by
Jerry Richardson | 3 days ago |
Read more
Business name for local onsite tech support: “housegeeks”, as in “housegeeks make house calls”. Any objections?
by
Damien McKenna | 3 days ago |
Read more
Huge thanks to the msysgit team for their hard work, because after some testing I’ve discovered that their git/git-svn port does work, whereas trying to get it working under Cygwin is a quite broken right now. Got git it!
Note: You need to get the Git-1.5.5-preview20080413.exe release if you want to try git-svn, the Git-1.5.6.1-preview20080701.exe [...]
by
Ezwan Aizat bin Abdullah Faiz | 3 days ago |
Read more
aizatto: Death to the person who takes my regex away from me!
by
Nolan Eakins | 3 days ago |
Read more

shared an item on
Google Reader
by
Nolan Eakins | 3 days ago |
Read more

shared an item on
Google Reader
by
Michał Wyrobek | 3 days ago |
Read more
Last time I haven’t much time to write here but there is an interesting issue I’m always thinking about. The problem is I really don’t like SQL. I know, it’s good in many situations, people always using it, and I’m the one of them. But this is not really elegant solution, even if i’m using [...]
by
Brent Sordyl | 3 days ago |
Read more
Trapster® - Speed Trap Sharing System
Your mobile phone or navigation device alerts you as you approach police speed traps.
(tags: travel traffic sms)
by
Damien McKenna | 3 days ago |
Read more
@xentek You could still upgrade, it’ll just cost 2x the price: see appleinsider.com article “Moving to iPhone 3G”
by
Daniel Lopes | 3 days ago |
Read more
Ol?? pessoal, acho que algumas pessoas j?? sabem que eu tenho trabalhado como parceira da e-genial, sendo monitor do curso de Adobe Flex 3. Terminamos a primeira turma em Junho e o curso foi um sucesso, tivemos quase 50 alunos e tenho certeza que a grande maioria tirou bom proveito dos ensinamentos.
Agora estamos para lancar mais uma turma que come??ar?? agora em agosto. Como novidade para este curso iremos remodelar por completo o material te??rico. Todas as apostilas ser??o no formato de livro em PDF, bem parecido com o livro “Rails 2.1 O que h?? de novo”.
Durante o curso ser??o criadas varias aplica????es e exemplos, veja abaixo uma dos exemplos pr??ticos que iremos criar juntos durante as aulas:
Guia de Im??veis
Para saber mais informa????es e matricular-se no curso acesse:
http://www.egenial.com.br/cursoflex/
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.
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.

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 ;-)
by
Damien McKenna | 3 days ago |
Read more
@supaben34 S3E1 is *fantastic*! Love it, love it, love it!
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) 代換為 @ 符號)。
by
Ruslan Voloshin | 3 days ago |
Read more
После того как у тя пройдут миграции, будет сделан Админ:
User.create(:name => 'admin', :password => 'secret', :password_confirmation => 'secret')
Судя по коду (ибо запускать это приложение влом), если хочешь добавить пользователя, то тебе надо login/add_user
А вообще рекомендую ознакомиться с концепцие работы rails приложений а потом задавать вопросы.
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 [...]
by
Eleanor McHugh | 3 days ago |
Read more
This year's
SeedCamp competition is almost upon us so
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
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!
Tell us what you think of the new BlogSphere feature. We are continually looking to improve and update the
functionality based on your feedback.