Archive for September, 2007

Straw Dogs Death & Rebirth

September 30th, 2007

Unfortunately the Straw Dogs VPS account was deleted on Thursday by VPSFarm.  Apparently this was due to the PayPal subscription being cancelled by me on September 2nd.  As much as the PayPal site does state that the sub was cancelled by me – I disagree.  I see no reason why I’d cancel the subscription to my main VPS provider.  Regardless of the who, what or why: Straw Dogs and several of my other sites have been deleted without warning.

Backups?

Yes I had backups but due to a series of silly coincidences recently (local machine failure and moving of backups between servers) none of my data has been saved.  So I’m resorting to Google Cache to save my blog but my other sites are very much dead and buried.  Hours of code lost, blood sweat and tears down the drain.  I don’t know whether I should be blaming VPSFarm or PayPal, but in all honesty it doesn’t really matter.  Whats done is done and the best way to go forward is just that – go forward!!

All my work will be rebuilt bigger and better with the wisdom of months to help me.

Here’s to a great future.  Thank you for your patience while I get everything back up to speed.

10 Free SVN & Project Hosting Services

September 20th, 2007

Gears

UPDATED: As of Jul 10th 2009

Open Source seems to be exploding all over the place at the moment and with online services increasingly jumping on the free offerings its been fantastic for developers wanting to host, manage, flaunt and communicate their projects online. Here’s a rundown of 6 free SVN hosting and project management offerings I like the look of.

Unfuddle

Nice name and nice site. Very web 2.0 and slick with project tracking such as issue tickets, source control, time tracking, milestones, etc. The free package only comes with 200Mb and restrictive user allowances (1 per account) and only one project. This makes them the stingiest of the group. This is reflected in their price-resources on paid plans with $99 only getting you 10Gb and 50 projects. Compare this to $59.99 at Codespaces for the same space but unlimited projects.

Pros: best interface, great features, Git support.

Cons: high price, low resources, tiny free account.

CodeSpaces

They have a hefty 500Mb for 2 free users per account and they have a good range of prices starting from $9 per month for 4-man teams upto $59 for unlimited.

Pros: nice interface, good pricing, active and involved developers.

Cons: Not as many features as the ‘big-beast’ Assembla.

Assembla

Part of a large and feature-packed service full of project management features as well as basic 200Mb of SVN hosting. It even has a jobs board but the project hosting comes with wiki pages, blogs, etc. The free package has all of this but lacks phone supports and is only for open source projects.  They have VERY competitive prices starting from $3.

Pros: packed with features, reliable, supports Mercurial.

Cons: pricey in the higher plans.

OpenSVN

One of the first to release free SVN hosting and starting to show its age with very barebones features. They had a major failure in backup and restore last year which causes some worry about their reliability. So when I say “free SVN hosting” I really mean just that!

Pros: unlimited space, unlimited projects.

Cons: very unreliable, no features!

XP-Dev

This is a very no-frills setup but they have one killer feature: Private SVN repo hosting – FOR FREE!!  Made for agile and extreme programmers this doesn’t have a lot of the features inherent in other services but thats just fine.  Its also got an unlimited repo limit.

Pros: unlimited repos, free private hosting

Cons: Only one paid option, very few features.

Bounty Source

Still going strong after I first mentioned it back in June Bounty Source offer your basic SVN along with a wiki and CMS for managing your projects online presence as well as a task tracker. Bounty Source have a unique feature though that enables a developer to be paid for the work they carry out on user feature requests. Something I really like the look of – all I need now is an open source project people are going to pay me to finish!

Pros: bounty system helps devs get paid to work.

Cons: no paid option, looking old, falling behind in features.

SourceForge

Like an old grandfather clock this has been around years and although very reliable its showing its age. They tried to spruce it up with some Web2.0 gradients and curves but you can’t scrub out the moldy smell from that interface and features-set.

Pros: reliable, well established.

Cons: very intrusive ads, pain to use.

Google Project Hosting

They seem to have taken a lot of the old school methods of project hosting from SourceForge. Unfortunately as mentioned earlier they’re looking old and although Google looks much cleaner its features still lack the richness that the smaller providers have who’ve gone all out on innovation while Google remains formulaic. Google also don’t provide paid private hosting. Its all open source here.

Pros: reliable, clean interface, good features, supports mercurial

Cons: no private paid options, open source only

Comparison Table – Free Accounts

Metric Unfuddle Code Spaces OpenSVN Bounty Source XP-Dev Google SourceForge
Project/Repo 1/Unlimited[1] Unlimited/Unlimited 1 Unlimited 5 Unlimited[4] Unlimited
Space 200Mb 50Mb Unlimited N/A[3] 300Mb Unlimited[4] Unlimited
Wiki Yes Yes No Yes No Yes Yes
Tracking Yes Yes No Yes No Yes Yes
Browser Yes Yes No Yes No Yes Yes
  • [1] Unfuddle allow one active project but unlimited numbers of repos within it.
  • [3] They state nowhere on their site about limits to project size.
  • [4] Google claim in their terms that there’s no upper limit but they reserve the right to impose one.

Latest NetBeans 6.0 Ruby/JRuby/Rails Support

September 20th, 2007

Netbeans LogoThe first shiny Ruby-supported beta of Netbeans 6.0 IDE by Sun has been released. With Ruby’s features maturing rapidly this looks to give Radrails a serious run for its money.I’ve always been a huge fan of Netbeans over Eclipse so I’m glad to see it jumping ahead like this and adding Ruby support was a masterstroke.

After some initial playing around and testing it all looks pretty solid for a beta and not a single crash attacked me in the time I’ve been using it.

The Ruby-features in the package are stunning compared to the other editors I’ve used. With the clever code completion and solid refactoring support which has been a part of NetBeans for a while now but works well with Ruby. It also comes packed with Rails app support so you can generate your apps internally and edit – similar to RadRails’ method.

I’m really looking forward to the final release of this as it promises to be something special.

Learn Ruby Easily

September 19th, 2007

RubyCompared to other languages you may have used Ruby can seem a little odd. Flexible syntax, talking foxes and mad Japanese geniuses all make it look rather more like an arcane formula than a programming language.
Though learning it really couldn’t be simpler because it flows like your mind. In fact the hardest part of all is realising Ruby makes sense!

Let me take an example of Ruby and PHP code that does exactly the same thing:

// PHP
if(strpos(”restaurant”, “aura”)){
exit;
}
# Ruby
exit unless “restaurant”.include? “aura”

And the definition of elegance is….

So how to learn this beautiful language? Here’s 5 simple steps:
1. Deprogram
Stop thnking in strict programming terms. Think more fluidly about what you want to achieve and if needs be find out the Ruby Way of doing things.

2. Read Existing Code
As with other languages one of the best ways to learn is reading existing code. With the proliferation of Rails apps you can’t help stumble across quality code to peruse and learn from.

3. Read a Good Book
The Ruby Way is the one book I’ve really cherished since starting Ruby and blows the usual recommended tome of “Pickaxe” out of the water.

4. Don’t Rail It – Yet
As much as I love Rails I wouldn’t recommend it as a first project in Ruby. It teaches a lot of good practices (if you don’t do them already) such as MVC programming and strong testing. However, it can also lull you into false securities. As the old saying goes: Don’t make your first app in a language a production app. Rails is too nice to resist that urge so don’t!

5. Teach, Blog, Talk
Teaching other people and blogging about it really, really helps you re- inforce your own knowledge. Regardless of how confident you may feel you always know more than someone else and even if you get corrected or someone puts you down – you’re learning. So go forth and blog, preach and shout ahbout Ruby to make yourself a master.

IBM Flunked Their HCI Course

September 19th, 2007

IBM Symphony WriterWhile a mate was banging on about the new Half Life Team Fortress mod I was getting excited about IBM’s new Lotus Symphony office app. I know – I’m one step away from slippers.But when I was trying to download it this morning I couldn’t! Why? Because IBM seem to want to make it as difficult as possible to download their new app. Scrapping the now common ideas of reduction and pulling back the veil so users can get to the meat of the matter – IBM stuck up an assault course of twists and turns to make life ‘interesting’.

Login or Register with your “IBM ID”
First you need an IBM ID. I had one from a few years back but couldn’t remember my “IBM ID”. After some routing around I find out the ever-cryptic “IBM ID” is an email address – well why didn’t it just call it that then?

Ignore the Internal Server Errors

I can understand a small-time developer or enthusiast beiung taken down by the Digg effect but IBM? IBM?! I was held off for a further 10 minutes while their server gasped back into life.

Download….. using DownloadDirector!!

IBM are clearly unhappy with the usual click and save operation so loved by virtually every organisation and site on the planet. So they force you to download and install a Java download manager. Which is presumptious enough to have a default download directory in your root folder. Great – another flaky app I plan on uninstalling once I get my download.

Verdict
Well I gave up this morning and left it until I got home. After finally getitng it installed my verdict isn’t much better than my downloaidng experience. Its….’nice’ I suppose. Considering IBM once had the full blown Lotus Office Suite I expected it to be packed with features but instead its more like a cut down open office with a very strange UI. One of the best moves OOo made was to make their interface more MSOffice familiar so as to not put users off. Thoguh IBM has chosen to do away with such fancy ideas and has completely re-written the office UI book.

So all in – IBM really, really need to sack their entire user interface team and employ a selection of aesthetically shrewd monkeys.

Google Tech Talks

September 15th, 2007

I’m a recent convert to Googles Tech Talks and I’ve been totally taken in by it! Its a huge selection of posted videos searchable on Google Video of lectures, demonstrations and talks from a wide array of difefrent people. All rated and commented on by the community. What’s also great is its got RSS so I can keep an eye on it from my Netvibes page.

Here’s a couple of examples of recent great talks:

How to Design a Good API

A great intro to writing a good API and also why writing a good API should come naturally if you’re coding in the right way. ;)

Everything is Miscallaneous

Fantastic talk on categorisation and how the net is helping us sort and manage much better – if only it helped me sort my ‘misc drawer’ out!

Python 3000

There couldn’t be a list of videos without mentioning Python 3000. As you may have heard they recently released the first alpha of Py3k and there’s lots to be excited about – though you’ll have to wait until this time next year before we get the final.

Programming Python puts Ruby to Shame

September 5th, 2007

Programming Ruby BookI’ve always been a huge fan of the Pragmatic Programmers books since getting their renowned tome The Pragmatic Programmer. I have to admit it was a stunning book and so too was their “Agile Web Development with Rails”. I also jumped on the band wagon and bought myself the Programming Ruby (a.k.a. ‘Pickaxe’) book and at first thought it was okay but I had some doubts even then.

I recently got my hands on a copy of Programming Python (the book from the ‘dark side’ ;) ) and I’m stunned. I now look back at my Pickaxe book and its unbelievable to see the difference. Chapter after chapter is peppered with comments such as: “you can read more about this class by looking at the docs in the back”. What’s not mentioned though is that the docs are actually already part of the Ruby documentation – Its an almost verbatim copy!Programming Python Book

Whereas in the Programming Python book (a hefty 1500 pages) you get all chapters dedicated to explaining how to use the language with real world applications. The Pickaxe has 830 pages but with only 419 dedicated to showing you how the use the language. The rest is taken up with the general Ruby documentation. If that isn’t bad enough the first edition of the Pickaxe is available online for free. So not only is half the book just basic open source documentation but 2/3 of the rest is already available online as part of the first edition. It sticks in the throat a little – though a masterstroke of marketing to be sure. I’m immensely happy with some of their other books but I can’t help but feel a bit cheated in this case and I think the ‘cult’ mentality surrounding their books has much to do with their success – not necessarily their quality.

Sorry O’Reilly – all is forgiven. :(

scRUBYt! Tutorial: Dogs of the FTSE

September 5th, 2007

I’ve been getting into investment a lot recently and so bought a book by James O’Shaughnessy titled “What Works on Wall Street”. Well after a couple of chapters I couldn’t hold off any longer from what I’d read at the end of chapter 1 Dogs of the Dow, You can visit the link for more info but in summary it’s an investment method where you buy the highest yielding stocks on the S&P 500 then refresh this every year.

Well I’m a Brit so rather than try this with the S&P I went for the FTSE 100 which is a similar index. I jumped to it first of all looking to see if Google, Yahoo or any other finance site got me the dividend yields all in one place but alas no. So I decided to give scRUBYt! a go.

So here goes: scRUBYt! being used to Let the Dogs Out!

In this example I use:

* 2 Extractors – One feeding the other.
* Form filling and submitting.
* Page navigation.
* Constraints.

I’ve given the full excerpt of my code below and you can download it here: Dogs of the FTSE

In English first of all though so here’s what I did:

1. First Extractor – This is to get the most up-to-date list of companies in the FTSE 100 index. It navigates to the Yahoo Finance page conatining the list and extracts the stock codes for each one. You’ll notice though that its split across two pages but scRUBYt! handles this fantastically and all it needs is a “next_page” command. You can’t get much more elegant. ;)
2. We need the above stock codes because the dividend yield that I need is on each companies profile page. So each one needs to be retrieved individually after we place the codes into a hash.
3. Second Extractor – Looping through each code we create an extractor then enter the code into the search box of the Yahoo Finance page, “submit” then retrieve the data.
4. Enter each stocks data into a hash with the stock code acting as key
5. The final block at the end just loops through the final dataset and outputs it to the screen. You can do anything with this though such as put it to a file, tabulate it, etc.

Now onto the example – I’ve also added comments to this to help with anything that may be unclear. I’m always willing to answer questions if you post them below.

require ‘rubygems’
require ’scrubyt’
final_data = {}
# We create our first extractor to get the FTSE 100 list from Yahoo
ftse_list = Scrubyt::Extractor.define do
	fetch ‘http://uk.finance.yahoo.com/q/cp?s=%5EFTSE’
	ftse_listing(“/html/body/div/div/table/tr/td/table/tr/td/table/tr/td/b”, { :generalize => true }) do
		stock_code(“/a[1]”)
	end.ensure_presence_of_pattern(“stock_code”)
	# The listing is split across two pages so we go to the next page and repeat
	next_page(“Next”, { :limit => 2 })
end

# All of my scraped data is being put into a hash "ftse_100"
ftse_100 = ftse_list.to_hash

# Now for each ftse listing…
ftse_100.each do |ftse_1|
	# … get the stock code …
	sc = ftse_1[:stock_code]

	# Our final extractor for searching a stock code and retrieving all relevent data (div yield, etc)
	# I get the fieldheader such as "Div Yield" as well as the field data such as "2.3%"
	co_data = Scrubyt::Extractor.define do
		fetch ‘http://uk.finance.yahoo.com/’
		fill_textfield ’s’, sc
		submit

		co_fields(“/html/body/div/div/table/tr/td/table/tr/td/table/tr”, { :generalize => true }) do
			fieldheader(“/td[1]”)
			fielddata(“/td[2]”)
		end.ensure_presence_of_ancestor_node(:td, {“class”=>“yfnc_tabledata1?})
	end

	# Adding all the stock data to a hash with the key being the stock code
	final_data[sc] = co_data.to_hash
end

# Here you can do what you want with this final set of data you got above.
# Here I’m just outputing the "Dividend Yield" for each stock.
# Note my check for the string "yield"
final_data.each do |key, entry|
	puts “\n\n#{key}”
	entry.each do |dataset|
		if dataset[:fieldheader].include? “Yield”
			puts “#{dataset[:fieldheader]} #{dataset[:fielddata]}”
		end
	end
end

Source available here.