Floyd’s Thoughts…

Because Everything is Interesting!!!

Rails can’t scale!

without comments

I’m not sure who coined the phrase “Rails can’t scale”? but its on of those things that amazingly keeps coming up, particularly when you talk to people in the corporate world who for some reason have it as the stock answer to any rails related discussions.

Anyway this is my Open Source answer to that statement, so please if anybody asks you “can rails scale” or makes the statement “Rails can’t scale!” please feel free to use this answer…

Applications built in rails are actually as capable of scaling as apps built in any other language (or on top of any other framework), in fact rails out-of-the-box is good enough for 99.9% of the applications you will ever write, and that tiny amount of apps that will have problems would have the same problems in ANY other language or framework. The benefits of Rails as a framework and Ruby as a language (Like Productivity, Maintainability, Developer Engagement, Mapping to an Agile Process) should in every case be considered over any notion of scaling issues. In fact if your app doesn’t have 8 million concurrent users right now, don’t worry about scaling at all, your wasting time that could be better spent getting 8 million users.

Now this answer doesn’t touch the real issue with this question but in my experience it is good enough to satisfy the type of people who ask this question.

The only exception where i wouldn’t use this answer is if the question (or statement) comes from a “Technical Architect” in a large corperate who is paid 6 figures a year to keep a development team of 100+ moving forward, if he says “Rails can’t scale” Punch him between the fucking eyes, because he should know better.

The truth, is of course that, anybody who says this knows f-all about software architecture and in fact shouldn’t be in a position where they have an audience to spout their nonsense.

Written by Floyd Price

June 18th, 2010 at 6:25 am

Best Buy – Open Sources IdeaX

without comments

Best Buy has received much acclaim for its IdeaX platform over the last year, and rightly so. For anyone who isn’t away of IdeaX its an Idea Gathering application that allows Best Buy to capture ideas and comments from customers and staff members, which can then be voted or commented on buy other customers or staff members. The basic idea is that good ideas will organically rise to the top as votes and comments increase the “score” given to an Idea. Best Buy can then take a “good” idea and make it into a reality.

Idea Gather Applications (also known as Idea Management Apps) are not a new thing, many American corporates have already embraced this concept including Google and Dell, and while each have great apps the Best Buy IdeaX platform stands head and shoulders about the competition.

While browsing Hacker News the other day i noticed a post saying that the Best Buy IdeaX platform has been open sourced! This is a great step for Best Buy, Come on, a big non-tech US corporate releasing an Open Source product!!! its unheard of! Whats more the app is written in Ruby on Rails, which in its self is a massive step for a big corporate who would traditionally have written apps like this in C# or Java.

Check out the project home page for the full story, and be sure to take a look around the code ;-)

The project does take some getting going, you have to me using Postgress and be sure to check out the mad Postgress Specific stuff going on in the migrations. I plan on getting a version of it up and running on EC2 over the next few days (time permitting) so I will issue some instructions in a later post.

All I can say is Hat Tip to Best Buy, Great job!

 

 

Written by Floyd Price

June 17th, 2010 at 10:38 pm

I love Spotify, but why do the record labels?

without comments

I absolutely love Spotify.com I have it on all my Macs, my IPhone and my Nexus One and I use it every single day. I recommend it to almost everyone I meet, i’d even go so far to say that it was the app of 2009!

Ok, you now appreciate that I love Spotify right?

I can’t help wondering what the record labels get out of it, here is a true story about my own listening and spending habits (when it comes to music)…

Prior to signing up for a Spotify account in Sept 2009 I used iTunes and the Apple Music store exclusively in the 12 month prior to Sept 2009 I purchase over 1000 items from the store and spent well over £700 (I know! I was shocked too)… Since Sept 2009 I have spent £99 (a year subscription) and wont need to spend a penny until Sept 2010, yup Spotify has saved me £600+ isn’t it great?

Well yes it is for me (and maybe you) but what about the record industry who have been fighting a bitter battle against apple around the price of their product, yet they are loosing tons of revenue by supporting alternative suppliers who are essentially giving it away! Is this a case of biting your nose of to spite your face? Not sure, but it certainly doesn’t add up! (to me any way).

I can’t help but think that Great services like Spotify can’t last!

BTW I Love Spotify!

Written by Floyd Price

February 2nd, 2010 at 4:43 pm

Posted in Business,Life,iTunes

Tagged with , , ,

New IPhone App – TweetExpress

without comments

Today Apple approved our 4th IPHone app TweetExpress, it took them almost 3 weeks which was a bit disappointing, but its here now.

TweetExpress allows you to receive Push Notifications from Twitter when a selected friend or mention appears on your Twitter timeline, It’s really great that you can select the Friends your interested in rather than getting all your twitter noise pushed to you ;-)

Check it out at http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=336775839&mt=8 and let me know what you think?

Written by Floyd Price

November 3rd, 2009 at 8:42 pm

Posted in Uncategorized

Gmail for business

without comments

Just moved our email over to Google mail, and as a result I can switch off the Active Directory and Exchange virtual servers, and use the Mac Pro for somthing useful like writing code!

I did have to fire up a windows isntance to use the Google Mail Uploader but it was worth it, I have ~9000 mails in outlook that are now in gmail.

Gmail has just saved us 2 windows server licenses and an exchange 2007 license, never mind all the time and effort.

Moving your email over to Gmail? You should be!

Written by Floyd Price

October 25th, 2009 at 6:12 pm

IPhone Libraries

without comments

Mose developers collect a number of libraries and Open Source code samples during their career, which they use over and over again.

Here is a list of the IPhone code that I use when building apps, please feel free to send me some suggestions for more?

  • TouchJSON
    TouchJSON is parser and generator for JSON implemented in Objective C.
  • Three20
    Three20 is an Objective-C library for iPhone developers, featuring a Photo Viewer, Message Composer, Web Images View, Internet aware table view controllers, Better text fields, HTTP disk cache and URL-based navigation.
  • HTTPRiot
    HTTPRiot is a simple REST library designed to make interacting with REST services much easier. It supports GET, POST, PUSH and DELETE requests and HTTP Basic Authentication. HTTPRiot was inspired by John Nunemaker’s excellent httparty Ruby library.

I also have a personal stash of UIKit extensions which i often re-us, I will put them together for a later post ;-)

Written by Floyd Price

October 22nd, 2009 at 8:07 pm

Posted in Uncategorized

QuickTweet is Open Source

with 2 comments

A while ago we developed a simple Twitter Client to scratch a personal itch I had with the existing clients.

The idea was to have a simple app that loaded really quick and enabled me to post a status update to twitter, using a full screen view that contained just a keyboard and a text box.

I also wanted it to rotate nicely in to landscape when I rotated the IPhone.

Seems simple ey? yet all the good twitter clients have really poor implementations.

This is what the App looks like:

original.jpgoriginal2.jpg

This project will show you how to do the following things:

  • Draw a custom control (TextField)
  • Use a Fliped Transition (settings view)
  • Save and fetch user defaults
  • Custom Rotation logic to position elements manually
  • Animation, the tweet text field animates away when you click Post
  • Integrating with a 3rd party code base (MGTwitterEngine)

Go get the source from http://svn.floydprice.com/OSS/QuickTweet/trunk/

Written by Floyd Price

October 21st, 2009 at 10:57 pm

Posted in Uncategorized

Automatic Elastic Block snapshots with a cron job

without comments

Amazon EC2 really is amazing, and the Elastic Block storage is pretty darn good too, however I wish you could automate the snapshot process form the EC2 console.

It is however pretty easy to do yourself using a simple cron job.

Before you start make sure you have a JRE:

	sudo apt-get install sun-java6-jre

You will also need the EC2 API tools:

	wget http://s3.amazonaws.com/ec2-downloads/ec2-api-tools.zip
	unzip ec2-api-tools.zip

At this point you should make a metal note of where you unzipped the api tools to.

Now that you have the prerequisites you need the following simple script:

	#!/bin/bash
 
	export JAVA_HOME=/usr/lib/jvm/java-6-sun/jre/
	export EC2_HOME=/root/ec2-api-tools-1.3-42584
	export EC2_PRIVATE_KEY=/data/misc/pk-Umbongo.pem
	export EC2_CERT=/data/misc/cert-Umbongo.pem 
	export AWS_ACCESS_KEY_ID="Twinkle Twinkle Little star"
	export AWS_SECRET_ACCESS_KEY="If your happy and your know it, clap your hands"
 
 
	$EC2_HOME/bin/ec2-create-snapshot vol-999999

Obviously you need to specify your volume id where i have vol-999999

Once you have modified this file to be executable you are ready to test it.

	chmod +x snapshot.sh
 
	./snapshot.sh

Once your have ran it go to the EC2 Console and verify that the snapshot process has started.

And thats it, the first time you run this script the snapshot will take a while to complete but the next one will be much quicker as the snapshot process is incremental, so only the changes since the last snapshot will be read.

Oh, don’t forget to create a cron job for this (*/5 * * * * /path/snapshot/sh) ;-)

Written by Floyd Price

October 20th, 2009 at 11:01 pm

How to respond to the IPhone Shake Gesture

with one comment

The IPhone 3.0 SDK includes support for detecting when a user “Shakes” the IPhone, this is intended to be a usability feature allowing app developers to implement Refresh or Read All functions on shake, wow those crazy guys at Apple really do know how to innovate!

It’s pretty easy to implement all you need to do is register your view controller as the first responder and listen for the motion event.

-(void) viewDidAppear:(BOOL)animated{
	[super viewDidAppear:animated];
	[self becomeFirstResponder];
}

Once your controller is the First Responder you can receive the motion event like so:

- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event
{
	if (motion == UIEventSubtypeMotionShake)
	{
		refresh;
	}
}

This will work beautifully but you will however notice that any views you present over this one will not respond to all touch events, for instance the keyboard will not show when you touch a text field, this is because you need to resign the First Responder before you present the view like so:

- (IBAction)showMyCustomView {    
	[self resignFirstResponder];	
	[self presentModalViewController:myCustomViewController animated:YES];
}

As you can see this is all pretty easy and the only gotcha is the First Responder stuff, which also is pretty trivial.

Enjoy and please people, Shake Responsibly!

Written by Floyd Price

October 20th, 2009 at 8:48 pm

Search Engines…

without comments

Bing loves us,
Google thinks we are cool,
and Yahoo would cross the road it it saw us coming…

If you search for “Subversion Hosting” on the three major search engines you will see pretty mush the same bunch of results just in a very different order.

for instance Bing has Code Spaces right at the top (YAY!) however Google has Code Spaces in at number 6 (hmmm!) and Yahoo! has Code Spaces at number 10 (Bah!).

Obviously Bing and Yahoo! mean absolutely nothing when it comes to traffic (relative to google anyway) but its interesting how all three has slightly different opinions about the web. Personally I think Bing have nailed it ;-)

Written by Floyd Price

October 16th, 2009 at 5:56 pm

Get Adobe Flash playerPlugin by wpburn.com wordpress themes