Farooq Yousuf

Neat. Interesting. Funny. Motivating. And More.

Archive for the ‘Web Development’ Category

America’s Secret Empire

Posted by Farooq Yousuf On July - 13 - 2009

Interview of John Perkins: Author of Confessions of an Economic Hit Man

When I first saw this, I was totally blown away. Majority of people have absolutely no idea how the US is controlling the world and what means they are using in constructing their global empire. They have made the world’s largest empire in history NOT through military might but other means that will leave you shocked if you haven’t come across this before.

The two part interview is VERY interesting but if you don’t have the patience or time to watch them then you can check out the two short clips of what this is all about and maybe check out the longer vids and book later on. The short vids are also below:

Short Clips:

Interview Part 1 (Long one):

Interview Part 2 (Long one):


Popularity: 1% [?]

Music made from Windows noise

Posted by Farooq Yousuf On May - 27 - 2009

Pretty neat. This song is made up of only of alert sounds from Windows Operating System.

Popularity: 22% [?]

Inside Wave - Amazing pic

Posted by Farooq Yousuf On April - 11 - 2009

Check out this amazing picture taken from inside a wave:

inside-waves-clark-little-002

Popularity: 36% [?]

“NoMethodError: undefined method” when running Watir scripts

Posted by Farooq Yousuf On March - 23 - 2009

A few days ago I was trying to get a Watir (Web Automated Testing in Ruby) script working that I had wrote and for some reason it just wasn’t working. It was driving me crazy because I asked my coworkers to run it on their machines and it worked perfectly for them. So something was wrong with my machine not the script.

After Googling I was able to solve the problem. I will list the steps I took in solving it just in case anyone runs into the same thing I did. OK so first things first, what was the problem?

Well every time I tried to execute a Watir  script on my VMware Windows XP I would get this error:

NoMethodError: undefined method ‘goto’ for #<Watir::IE:0×3246f3c>

picture-4

What you want to do is, type: “gem uninstall win32-api”, you probably have more than 1 installed. It’ll ask you which gem to uninstall, I selected to get rid of all of them.

picture-51

After you’ve done that then do a fresh install of the win32-api gem by typing: “gem install win32-api”

picture-61

That should have solved the problem, hope that helped! If not check out this link too.

Popularity: 13% [?]

I was working on setting up CakePHP on my Mac the other day and got it working with one problem. It can get quite frustrating trying to figure out whats going wrong with the install and when you finally solve the problem it feels like you just won a million bucks.

The CSS styling wasn’t showing up on the welcome page and I Googled all over searching for the solution to no avail. Good thing my brother had already gotten past this stage and helped me out. I didn’t find this solution anywhere online so I decided to blog about for anyone else who might encounter this problem. Below is a screen shot of the error I kept getting, you’re probably getting the same one, if not then you’re in the wrong place :D

picture-9

Before I tackle the problem I was having, make sure you go here and follow the Apache and mod_rewrite (and .htaccess) setup correctly. After following those steps and restarting your Apache server, you still don’t see the CSS style on the welcome page, give this a shot:

Navigate to this /etc/apache2/users, once there you should see a username.conf file (your “username” will be different obviously).

picture-16

Open that file in a text editor, I used TextMate: mate farooqyousuf.conf

In that file make sure the “AlloweOverride” is set to “All”, see below:

picture-17

And voila! This should solve your problem. Right after I made this change, I restarted my Apache server and saw all the CSS styling on the CakePHP welcome page. Hope this helped! :D

picture-24

Popularity: 34% [?]

Great CakePHP Tutorial!

Posted by Farooq Yousuf On March - 2 - 2009

So lately, I’ve been learning PHP and CakePHP. I came across this really great CakePHP tutorial, really recommend going over it if you’re a newbie like myself ;)

Introduction to CakePHP

Popularity: 32% [?]

Ruby on Rails scaling issues?

Posted by Farooq Yousuf On March - 1 - 2009

So I had recently started to learn Ruby on Rails and was going to start working on a personal project with a group of friends but I came across an article that discussed Ruby on Rails has some scalability issues for large apps, for that reason we decided to switch over to PHP for our project. Josh Kenzer asked Alex Payne of Twitter 5 questions, below is question #2 addressing the RoR scalability issue:

5 Question Interview with Twitter Developer Alex Payne

I reached out to one of the developers on the Twitter team and asked if he would answer 5 questions. Alex not only answered them but is very honest and up front with his answers. Thanks Alex!

How has Ruby on Rails been holding up to the increased load?

By various metrics Twitter is the biggest Rails site on the net right now. Running on Rails has forced us to deal with scaling issues - issues that any growing site eventually contends with - far sooner than I think we would on another framework. The common wisdom in the Rails community at this time is that scaling Rails is a matter of cost: just throw more CPUs at it. The problem is that more instances of Rails (running as part of a Mongrel cluster, in our case) means more requests to your database. At this point in time there’s no facility in Rails to talk to more than one database at a time. The solutions to this are caching the hell out of everything and setting up multiple read-only slave databases, neither of which are quick fixes to implement. So it’s not just cost, it’s time, and time is that much more precious when people can['t] reach your site.None of these scaling approaches are as fun and easy as developing for Rails. All the convenience methods and syntactical sugar that makes Rails such a pleasure for coders ends up being absolutely
punishing, performance-wise. Once you hit a certain threshold of traffic, either you need to strip out all the costly neat stuff that Rails does for you (RJS, ActiveRecord, ActiveSupport, etc.) or move the slow parts of your application out of Rails, or both.It’s also worth mentioning that there shouldn’t be doubt in anybody’s mind at this point that Ruby itself is slow. It’s great that people are hard at work on faster implementations of the language, but right now, it’s tough. If you’re looking to deploy a big web application and you’re language-agnostic, realize that the same operation in Ruby will take less time in Python. All of us working on Twitter are big Ruby fans, but I think it’s worth being frank that this isn’t one of
those relativistic language issues. Ruby is slow.

Source

Popularity: 2% [?]

Enter your email address:

Delivered by FeedBurner

About Me

Just posting stuff that I find neat, interesting, funny, motivating and more. Hope you enjoy! :)

Twitter

    Photos

    flickrRSS probably needs to be setup