header image

Archive for November, 2008

Xanax

Monday, November 24th, 2008

scrubyt_logo.png I am just working on a brand new release of scRUBYt!, xanax, with the intent of bringing AJAX/javascript scraping to the masses (and other great stuff - will announce the release soon). Xanax,

Scraping js-heavy pages is not that trivial, xanax, among other things because of the asynchronous nature of Javascript. Xanax, Quite frequently you click on a link (or do any other action triggering an AJAX call) which inserts/fills/pops up a div on the page and you want to navigate/get some data from the new content. Xanax, However, xanax, it’s hard to impossible to determine when did the browser finish displaying the new data - the easiest solution is to wait a few seconds after an AJAX update, xanax, until the data is properly loaded.

In practice this means that all scRUBYt! navigation methods (clicklink, xanax, filltextfield, xanax, checkcheckbox, xanax, selectitem, xanax, …) need a decorated version, xanax, which waits a given amount of time after executing the navigation step. Xanax, So for example, xanax, given the original method:

  1. def click_link(xpath) … <b>Xanax</b>, end

we want a decorated version:

  1. def click_link_and_wait(xpath, xanax, seconds)
  2.   click_link xpath #the original method
  3.   sleep seconds if seconds > 0
  4. end

For each and every method of the NavigationAction class.

Fortunately Ruby makes this really easy! Decorating the existing methods explicitly upon class creation:

  1. (instance_methods - Object.instance_methods).each do |old_method|
  2.     define_method "#{old_method}_and_wait" do |seconds|
  3.       send old_method ; sleep seconds
  4.     end
  5.   end

or implicitly, xanax, runtime:

  1. alias_method :throw_method_missing, xanax, :method_missing
  2.  
  3. def method_missing(method_name, xanax, *args, xanax, &block)
  4.   original_method_name = method_name.to_s[/(.+)_and_wait/, xanax,1]
  5.   if (method_name.to_s =~ /_and_wait/) && (respond_to? original_method_name)
  6.     self.send original_method_name ; sleep args[0]
  7.   else
  8.     throw_method_missing(method_name, xanax, *args, xanax, &block)
  9.   end
  10. end

As you can see, xanax, we are executing the decorated method only if it is defined on our class and it ends in andwait. Xanax, In all other cases we simulate the normal methodmissingbehavior.

Since we know in advance that we want to decorate all the methods of the class, xanax, the second way doesn’t make much sense in this case - it’s slower because it has to go through method_missing every time, xanax, while there are no advantages - however the technique is interesting and applicable in other scenarios (e.g. Xanax, when you don’t know in advance which methods are you going to decorate - for example adding a constraint to a filter in scRUBYt! (filters are also created dynamically runtime))

Similar Posts:soma prescription,xanax,propecia for order,clomid online,clomid without prescription

Tramadol prescription

Saturday, November 22nd, 2008

git_octocat.png I Don’t want to reiterate what has already been said on this topic (I ended up in the same boat - tried more tools, tramadol prescription, didn’t really like any of them and settled for giternal).

Giternal seems to work nicely - after you get the initial roadblock out of the way. Tramadol prescription, According to the README, tramadol prescription, you should install giternal with

gem install giternal

then use the giternal executable to do various things.

The problem is that after installation, tramadol prescription, there is no giternal executable - the problem is that gem installs version 0.0.1, tramadol prescription, which doesn’t have it. Tramadol prescription, You have to get the sources from git and set it up yourself:

git clone git://github.com/pat-maddox/giternal.git
cd giternal
sudo ruby setup.rb

and you are good to go.

Hope this saves someone a few minutes.

Similar Posts:viagra generic,tramadol prescription,find viagra,synthroid pills,buy tramadol online

Cheapest tramadol

Thursday, November 20th, 2008

ruby_quiz.png I decided to join Ruby Quiz for the first time ever - I am realizing that I am extremely late to jump on the RQ bandwagon - but hey, cheapest tramadol, is still better later than never. Cheapest tramadol, I have chosen a funny moment though: it’s a quiz everyone was excited about, cheapest tramadol, but almost nobody solved (2 solutions so far except mine, cheapest tramadol, which is maybe the lowest number of solvers ever). Cheapest tramadol, So here’s the quiz:

Your task is to write a units converter script. Cheapest tramadol, The input to the
script must be three arguments: the quantity, cheapest tramadol, the source units, cheapest tramadol, and
the destination units. Cheapest tramadol, The first example above would be run like this:

    $ ruby convert.rb 50 miles kilometers

Or, cheapest tramadol, using abbreviations:

    $ ruby convert.rb 50 mi km

Support as many units and categories of units (i.e. Cheapest tramadol, volume, cheapest tramadol, length, cheapest tramadol,
weight, cheapest tramadol, etc.) as you can, cheapest tramadol, along with appropriate abbreviations for
each unit.

and my solution:

  1. require ‘rubygems’
  2. require ‘cgi’
  3. require ’scrubyt’
  4.  
  5. begin
  6. google_converter = Scrubyt::Extractor.define do
  7.  fetch "http://www.google.com/search?q=#{CGI::escape(ARGV[0])}+#{CGI::escape(ARGV[1])}+to+#{CGI::escape(ARGV[2])}"
  8.  
  9.  google_result "//td[@dir='ltr']" do
  10.    final_result(/= (.+) /)
  11.  end
  12. end
  13.  puts google_converter.to_hash[0][:final_result]
  14. rescue
  15.  puts "Sorry, cheapest tramadol, even *google* can’t translate that!"
  16. end

Examples:

ex:
ruby converter.rb 10 "meter per second" "mile per hour"
22.3693629

ruby converter.rb 10 USD EUR
7.91201836

ruby converter.rb 7 "ruby gems" "python eggs"
Sorry, cheapest tramadol, even *google* can't translate that!

The biggest downside of the proposed solution is that you need to be on-line. Cheapest tramadol, However, cheapest tramadol, nowadays, cheapest tramadol, when this is almost the norm, cheapest tramadol, the advantages outweigh this in my opinion:

  • Support for a lot of conversions (I doubt anyone can offer a much richer database of units than google) including their abbreviations
  • Up-to-date conversions: for example currency conversion
  • Very robust error handling - outsourced to google! Hard to beat that…

Similar Posts:order tramadol,cheapest tramadol,cipro no prescription,doxycycline prescription,buy cheap cialis internet

Phentermine sale

Monday, November 17th, 2008

“It’s better to be a pirate than to join the Navy” (Steve Jobs)


This post was inspired by the last part of Jim Neath’s article on speeding up Rails development, phentermine sale, titled “Seriously, phentermine sale, Just Buy a Fucking Mac”. Phentermine sale, Some commenters insisted that you can do just as well on other systems (Ubuntu, phentermine sale, in particular). Phentermine sale, In three short words, phentermine sale, I don’t agree. Phentermine sale, In my opinion Ubuntu is a valid alternative but it comes in at second place, phentermine sale, and the gap between the 1st and 2nd position is significant. Phentermine sale, Why?

Software

Some people, phentermine sale, when it comes to a good PC vs. Phentermine sale, Mac fight, phentermine sale, start to brag about the hardware - it’s overpriced, phentermine sale, and not that much better, phentermine sale, and my high end PC notebook is better because … Phentermine sale, etc. Phentermine sale, Because they most probably never ever used a Mac for a longer period, phentermine sale, they don’t know that the real speed gain/ease || joy of use comes from the software (though it doesn’t hurt that there are no hardware conflicts, phentermine sale, evar, phentermine sale, no matter how much do you upgrade, phentermine sale, no messing around with wifi/mic/video cards/you name it and the quality is top-notch etc.) No. Phentermine sale, The real secret sauce is the software:

The essential stuff

ruby_logo.pngrails.png

Ruby and Rails - I have spent a few years on Ubuntu from warty to gutsy, phentermine sale, and though it was improving from release to release, phentermine sale, when I bought an MBP a year ago, phentermine sale, the difference was shocking. Phentermine sale, C’mon, phentermine sale, installing Ruby and the whole Rails stack on ubuntu is still a considerable pain, phentermine sale, whereas OS X ships with ruby/rails by default. Phentermine sale,

text_mate.png

A powerful editor - TextMate the best editor ever invented, phentermine sale, hands down - mainly when beefed up with Ruby/Rails bundles (the ’standard’ ones, phentermine sale, as well as others like RubyAMP). Phentermine sale, No windows or linux editor comes even close - though this is hard to believe unless you tried TextMate for more than 5 minutes. I have been drooling when I was on Ubuntu and checked out screencasts like peepcode Textmate 2 for rails - fortunately I bought a Mac, phentermine sale, watched the video and using Textmate ever since, phentermine sale, so the drooling stopped.

sequel_pro.png

An intuitive SQL GUI - CocoaMySQL/Sequel Pro. Phentermine sale, Sorry guys, phentermine sale, MyPHPAdmin doesn’t count. Phentermine sale, Neither does mysql-query-browser, phentermine sale, which is the windows 3.11 of the SQL GUIs IMHO. Phentermine sale, Sequel Pro rocks!

Other niceties

skitch.png

Skitch is something I had no clue I needed, phentermine sale, but now I couldn’t live without it! “Skitch.com is a webservice that works hand in hand with our application Skitch to give you 1-click uploading of images for fast and fun image sharing.”. Phentermine sale, Doesn’t sound that mind-numbing, phentermine sale, but try it once and become addicted forever.

dropbox.png

Dropbox is a kickass utility to store, phentermine sale, sync and share your files online. Phentermine sale, The best part is that it actually works - it’s not some half-assed solution, phentermine sale, but a really working, phentermine sale, beautifully executed powerful tool for sharing your stuff.

cyberduck.png

Cyberduck is an an incredibly useful FTP, phentermine sale, SFTP, phentermine sale, WebDAV & Amazon S3 Browser for Mac OS X. Phentermine sale, Really missed something similar under Ubuntu.


css_edit.png

CSSEdit - I was really missing a good CSS editor under Linux - the existing ones didn’t even come close to CSSEdit. Phentermine sale, CSSEdit’s intuitive approach to style sheets and powerful previewing features will make you deliver awesome standards-based sites in no time!

mars_edit.png

MarsEdit is a desktop blog editor, phentermine sale, so you can write a blog without giving up the comforts of your Mac. Phentermine sale, Since I am using MarsEdit, phentermine sale, blogging has become a whole new experience - instead of a clumsy web-interface which requires me to be on-line I can focus on blogging actually!

Once you get productive with these extremely powerful tools (and I didn’t even mention the standard built in stuff like Spotlight, phentermine sale, iCal, phentermine sale, iChat, phentermine sale, Time Machine, phentermine sale, …) your development time will be greatly reduced compared to that on an Ubuntu/Windows/… Phentermine sale, machine. Phentermine sale, For realz!

Everyone and Their Dog is on a Mac

So… Phentermine sale, why should I keep up with the Joneses - did the me-too club become popular recently? Isn’t Apple’s mantra ‘think different’? Why join the ‘cool kids’?

Valid questions - however, phentermine sale, everyone else being on macs also means that

  • you’ll have a much bigger chance of getting quick support on the Ruby/Rails forums/IRC - which is not always easy with Ubuntu (I am on Ubuntu Rusty Robot build R2-D2. Phentermine sale, Everything is fine, phentermine sale, but MySQL driver doesn’t compile because I ran dist-upgrade yesterday, phentermine sale, and now everything is jammed. Phentermine sale, All the tutorials are up to Humpty-dumpty Drake only…).
  • Easier collaboration - sharing Dropbox folders, phentermine sale, skitch images, phentermine sale, iCal events etc. Phentermine sale, is very-very common - of course there are other ways of sharing data/notes/collaboratively editing documents, phentermine sale, but these Mac tools take it to a whole new level.
  • Growing Mac usage means that more goodness is on the way!

A bit of Mythbusting

  • Macs are crazy expensive
  • You can buy a mac mini starting from $599, phentermine sale, or a pre-owned one for $350. Phentermine sale, Doesn’t sound like bank-breaking. Phentermine sale, Good PCs are not cheap either - my last DELL was about the same price as my current (almost high-end) MBP. Phentermine sale, Of course you can buy an Acer for third of the price, phentermine sale, but well, phentermine sale, the drop in the quality will be proportional.
  • Mac software is expensive, phentermine sale, on linux everything is free
  • From the above list, phentermine sale, everything essential is free, phentermine sale, except TextMate, phentermine sale, which is a must, phentermine sale, no matter how much it costs. Phentermine sale, Usually free alternatives exist for almost everything, phentermine sale, and the commercial ones are just unbelievably good. Phentermine sale,
  • You are going to deploy to a linux server, phentermine sale, so create your app on linux too
  • While OS X is not linux based, phentermine sale, the difference is minimal - Darwin is a POSIX compliant OS so from the Rails development perspective it doesn’t really matter. Phentermine sale, I do not have accurate data but I don’t think so it’s easier to migrate an app developed on gentoo/fedora/suse/… Phentermine sale, to an ubuntu box than to do the same for an OS X Rails app. Phentermine sale, And even deploying from Ubuntu to Ubuntu can be a pain unless the boxes contain the same version of everything etc.
  • I think you just bought a Mac because the “cool kids” did
  • So what? Does this alter the fact that working on a Mac makes you more productive/effective as described above? Not at all.

Use the Best Tool for the Job

Yeah… Phentermine sale, in other words, phentermine sale, seriously, phentermine sale, just buy a fucking mac. Phentermine sale, It’s the best tool when it comes to (not only) Ruby/Rails development.

Similar Posts:cheap tramadol,phentermine sale,buy kamagra online,discount rivotril,cialis without a prescription

Cheapest cialis

Thursday, November 13th, 2008

rails_rumble.png In part I I wrote about the hows and whys of gathering gem/plugin usage data based on Rails Rumble submitted user information, cheapest cialis, and in this part I would like to present my findings. Cheapest cialis, So without further ado, cheapest cialis, here we go:

Prototype/jQuery

I already covered this in part I, cheapest cialis, but for completeness’ sake, cheapest cialis, here is the chart again:

prototype_jquery.png
It seems that jQuery is (not so) slowly replacing Prototype as the javascript framework of Rails - which is still better (from the Prototype POV) than with Merb, cheapest cialis, where jQuery is the default framework (oh yeah, cheapest cialis, I know, cheapest cialis, Merb is everything-agnostic etc. Cheapest cialis, etc. Cheapest cialis, but I think vast majority of merbists are using Datamapper, cheapest cialis, jQuery etc. Cheapest cialis, (?)).

Skeleton Applications

Well… Cheapest cialis, this chart is rather dull:

bort.png

One in every three teams used a skeleton application (which in this context can be replaced with ‘Bort’). Cheapest cialis, The sovereignity of Bort is a bit surprising given that it’s not the only player in the field by far - there are definitely others, cheapest cialis, like ThoughtBot’s suspenders, cheapest cialis, Blank by James Golick, cheapest cialis, starter-app by Pat Maddox, cheapest cialis, appstarter by Lattice Purple just to name a few.

I am not sure about the others, cheapest cialis, but the absence of suspenders from the chart has more to do with the fact that it was not yet publicly released before Rails Rumble - I am basing this claim on the fact that a lot of people used the gems/plugins which, cheapest cialis, combined together, cheapest cialis, are basically suspenders.

However, cheapest cialis, this doesn’t alter the fact that Bort is immensely popular - great stuff, cheapest cialis, Jim.

Testing Frameworks

I think there are (at least) 2 things to note here:

  1. Testing in Ruby/Rails is not considered optional even facing a very tight deadline. Cheapest cialis, Even if we assume that the 49% didn’t test at all (which surely doesn’t sound too realistic - they probably just went with Test::Unit), cheapest cialis, more than half of the teams did!
  2. Though testing tools are a much debated topic nowadays, cheapest cialis, and the winner is not clear (yet) - I would guess, cheapest cialis, based on the above results there is roughly an 1:1:1 ration between Test::Unit, cheapest cialis, rspec and shoulda *currently* - there are definitely interesting alternatives to Test::Unit.

testins.png

Mocking

mocking.png
Not much to add here - though the above chart says nothing about how much people are using e.g. Cheapest cialis, Mocha with rSpec (vs. Cheapest cialis, using the rSpec built-in mocking tools), cheapest cialis, one thing is clear - as a stand-alone mocking framework, cheapest cialis, Mocha reigns supreme.

Exception Notification

ex_notification.png
Another point for ThoughtBot (not the last one in this list) - Hoptoad has no disadvantage compared to the more traditional Exception Notifier (if we don’t count getting an API-key, cheapest cialis, which takes about a minute) - on the upside, cheapest cialis, you get a beautiful and user friendly web GUI.

Full-text Search

full_text.png
I found the above chart interesting for two reasons:

  1. I thought that Ferret and/or acts_as_solr are still somewhat popular - it turns out they are not
  2. I also thought Thinking Sphinx is the de-facto fulltext search plugin, cheapest cialis, and didn’t know about Xapian - well, cheapest cialis, I learned something new again.

Uploading

uploading.png
ThoughtBot did it again - Paperclip is already more popular than the old-school attachment-fu. Cheapest cialis, I am always a bit cautious when someone challenges the status quo (like Nokogiri vs. Cheapest cialis, Hpricot, cheapest cialis, Authlogic vs. Cheapest cialis, Restful Authentication, cheapest cialis, attachment-fu vs. Cheapest cialis, Paperclip etc.) but it seems Paperclip is ripe to take over. Cheapest cialis, You can find some interesting tutorials here and here.

User Authentication

Another dull graph for you:

user_auth.png
I am wondering how homogenous this chart would be if Authlogic would have appeared earlier - it seems like a strong challenger (already watched by around 260 people on github) and I am sure it will take a nice slice of the pie in the future.

What’s more interesting is the openID support: more than one third of the apps offered openID authentication, cheapest cialis, and quite a few of them solely openID.

Misc

  • factory_girl was used to replace traditional fixtures in every 6th of the apps!
  • HAML/SASS is quite popular - used in about 20% of the applications
  • Hpricot was the only HTML/XML parser used (in 7 apps alltogerher)

What I am happy about the most is that there is still a lot of innovation going on in the Rails world - as you can see, cheapest cialis, newer and newer plugins/gems are appearing and in some (in fact, cheapest cialis, a lot of) cases are dethroning their good ol’ competitors. Cheapest cialis, There is a lot of competition going on in almost every major area of Rails web development, cheapest cialis, and this is always a good thing.

Similar Posts:cialis sale,cheapest cialis,price of cialis,lexapro pills,buy clomid without prescription

Cialis

Wednesday, November 12th, 2008

rails_rumble.png As a Rails Rumble judge, cialis, I spent quite some time reviewing the applications and I noticed several patterns regarding the gems/plugins used during the 48-hour contest. Cialis, The participants were asked to submit whatever tools they were using to build their app. Cialis, With a few exceptions they complied, cialis, creating an interesting data set to observe the current trends in the Rails world.

Collecting the Data

Unfortunately it was not possible to gather the information automatically using screen scraping or other mechanical methods, cialis, since the input was varying from free text (stating details like ‘we used Rails, cialis, macs, cialis, TextMate, cialis, cocaine (the drink!)’) etc. Cialis, to the output of gem list - and everything in-between, cialis, not following any guideline (perhaps because none was given). Cialis, So I hacked up a small app with a single form and harvested the info manually. Cialis, I only collected data for the first 100 entries, cialis, for two reasons: the stuff used in the rest of the apps was pretty much the same, cialis, and mainly: the task was rather daunting :-)

Why Does this Matter?

I believe that because of the rules (I mostly mean the 48-hour deadline) the findings are quite representative - I am sure that every team reached after the most productive/easy to use/effective tool they could grab since the deadline was tight. Cialis, Rails Rumble is not about experimentation or showing off some new shiny toys, cialis, but lightning fast hacking aided by state-of-the-art gems and plugins so I think it’s safe to assume that the tools used here are pretty much the crème de la crème of the Ruby/Rails world.

Prototype vs. Cialis, jQuery

In the first exhibit, cialis, I’d like to check out Prototype vs. Cialis, jQuery usage. Cialis, To prepare this chart, cialis, I took the extra mile and didn’t rely on the user-supplied data, cialis, but opened the pages by hand and checked the headers for Prototype/jQuery javascript includes. Cialis, Here is what I have found:

prototype_jquery.png

1 team was using mootools, cialis, the rest of the cake is divided between Prototype and jQuery. Most probably the real result is even more in favor of jQuery, cialis, I would guess well above 60% - all the teams that added jQuery to their application.html.erb were actually using it (why would they bother adding it otherwise), cialis, while this is not necessarily true for Prototype, cialis, which is included by default and maybe some teams didn’t even use it, cialis, just didn’t care to delete it (as you will learn in the next part, cialis, every 3rd team used bort, cialis, which includes the Prototype/script.aculo.us files by default).

This is not the first indicator of jQuery’s rising popularity in the Rails world - Hampton Catlin’s Ruby Survey found out the same (i.e. Cialis, jQuery is more popular right now than Prototype). Cialis, Merb is using jQuery by default.

Is Prototype Dead?

My favorite Austrian Ruby-hacker friend told me over lunch a few weeks ago: ‘Prototype is dead!’. Cialis, I think this statement is questionable at the moment to say the least, cialis, since Prototype is still the default javascript framework of Rails and this is not likely to change anytime soon due to the fact that Prototype is heavily used by 37singnals (and probably entrenched into other older Rails-apps as well). However, cialis, the trend seems to be that jQuery is spreading really fast, cialis, replacing Prototype in a lot of cases.

So be sure to check jQuery out (it’s dead easy to install and use it) - I immediately fell in love with it (maybe I was used to Hpricot-style CSS selectors too much?) and I am happily using it in my projects now.

The Next Episode

Which testing tools are used by the community? How about rails skeleton apps? OpenID support? exception-notifier or hoptoad? attachment_fu or paperclip? mocha or flexmock? factory-girl or traditional fixtures? Find out in the next installment!

Similar Posts:cialis prescription,cialis,order synthroid,buy generic klonopin,levitra pills


Bad Behavior has blocked 2417 access attempts in the last 7 days.