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.
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.
После того как у тя пройдут миграции, будет сделан Админ:
User.create(:name => 'admin', :password => 'secret', :password_confirmation => 'secret')
Судя по коду (ибо запускать это приложение влом), если хочешь добавить пользователя, то тебе надо login/add_user
А вообще рекомендую ознакомиться с концепцие работы rails приложений а потом задавать вопросы.
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 [...]
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!
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 [...]
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 [...]
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 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.
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?
Спасибо огромное, сам бы не додумался. Оказывается всё так просто. Был бы женщиной поцеловал бы ...................(наверно). Да и ещё а где менять пароль админа, по умолчанию стоит secret, а я всегда думал что он находтся в database, а там пусто/
И еще
/!\ FAILSAFE /!\ Thu Jul 03 18:41:49 +0600 2008
Status: 500 Internal Server Error
No route matches "/" with {:method=>:get}
что это обозначает (это другой проект который был скачан простым rar архивом)
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.
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 é [...]
[](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...
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 [...]
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 [...]
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...
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 :)
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...
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!
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 [...]
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.
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 [...]
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...
(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:
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');
});
});
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:
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.
Не поленись прочитай 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.
....
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.
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.
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 [...]
Спортивно-транспортное устройство из зогадки оказалось весьма сложным в освоении. Не настолько сложным, как я думал, но всё равно сложным. Когда я проезжаю целых два метра --- я радуюсь как младенец. Но чтобы забраться на него и начать движение --- приходится держаться за стенку.
На данный момент коридор мне уже мал, а самостоятельно на улице кататься я ещё не могу. Поэтому мне нужна дружеская поддержка в буквальном смысле слова. Если кому-нибудь нечем заняться и он готов провести час-другой в любом из московских парков, то я буду очень-очень благодарен.
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 [...]
Disclaimer: This is a publicly accessible database. The views and opinions of originators and contributors expressed on this site do not necessarily state or reflect those of DSC Limited. No representation or warranty is given as regards to any applicability of any suggestion, its accuracy or completeness.