Oct 20, 2011

Roslyn compiler as a service

Summary: Roslyn, Microsoft’s project to open up the VB and C# compilers to support ‘compiler as a service’ scenarios, looks to be a post-Visual Studio 2012 deliverable.

Microsoft execs have been tight-lipped when I’ve tried to pin a ship date on “Roslyn,” the Microsoft “compiler as a service project.”

But we now know that Roslyn most likely will be a post-Visual Studio 2012 thing, according to slides and a presentation from Microsoft’s Build conference in September. (Yes, I’m still wading through all the Build information and presentations. There was a lot there.)

A quick Roslyn refresher: The Roslyn effort is about re-architecting the C# and VB compilers to support “compiler as a service” (CaaS) scenarios. Currently, a compiler is a black box; with Roslyn, Microsoft is working on opening it up so that all of the information processed via a compiler is available in application programming interface (API) form.

Here are few slides from the Build session that covered Roslyn, including one that shows an empty circle which seemingly designates the still-unannounced date when Roslyn will be delivered:

(If you’re curious about the codename itself, Roslyn is named for a mining town outside of Seattle that is featured in “Northern Exposure,” according to Microsoft Technical Fellow Anders Hejlsberg.)

Hejlsberg told Build attendees that Microsoft will release a Community Technology Preview (CTP) test build of Roslyn in mid-October this year. He demonstrated Visual Studio Roslyn during his session at Build, and showed off how Microsoft is building APIs — including a syntax tree API, symbol API, binding and flow API and an emit API — that mirror what its compiler pipeline offers. In addition to dogfooding these APIs itself, Microsoft also is going to make them publicly available, allowing others to build their own refactorings and tools using this information, Hejlsberg said.

Microsoft recently made available to testers a developer preview build of its “Visual Studio 11″ suite. (This is the product that will likely be named Visual Studio 2012 when it ships next year.) Microsoft officials are making enhancements to the core languages (VB, C++, C# and F#) in the suite, as well as making JavaScript a “first class citizen,” now that JavaScript is key to writing apps for Windows 8)

Src: zdnet.com

Oct 15, 2011

Welcome to Renee!

Renee is a new Rack-based library for describing web applications. Sinatra delivered a new simple way to think about building web applications. The popularity of Sinatra both as a library and as a concept shows now enduring the concept really was. Sinatra was different from Rails because the entire DSL was lightweight, easy to read and combined routing and actions into a single file. However, let's consider an example from Sinatra to see where we can improve upon this.


get '/blog/:id' do

This is not too bad so far. The repetition of :id is a bit un-DRY, but not bad. Let's keep expanding upon this.

get '/blog/:id' do

put '/blog/:id' do

Now, we've retrieved blog in two places. Time to refactor. We'd normally create a before filter, with the same path.

before '/blog/:id' do
 @blog = Blog.get(params[:id])

get '/blog/:id' do

put '/blog/:id' do

Now we've repeated the same path three times. With Renee, we can describe these kind of ideas in a simple, easy-to-read way. Here is the equivalent in Renee.

path 'blog' do
 var do |id|
 @blog = Blog.get(id)
 get { halt @blog }
 put { @blog.update(request.params); halt :ok}

This web library is inspired by Sinatra, but offers an approach more inline with Rack itself, and lets you maximize code-reuse within your application.

Platform-as-a-service cloud providers are adding Python, Java, and JRuby development capabilities

Platform-as-a-service cloud vendors Heroku and Engine Yard have been branching out to accommodate more developers by backing more programming languages.

Heroku, the cloud application deployment platform owned by Salesforce.com since early this year, added Python support this week and Java support late last month. Engine Yard as of this week is accommodating JRuby, a version of the Ruby language for the Java Virtual Machine.

Both Python and Java are in a beta stage on Heroku, although developers can use them now. In addition to these languages, Heroku supports development via Ruby, Node.js, and Clojure. Developers also can use PHP when developing applications for Facebook. Applications deployed on Heroku include consumer-facing Web applications as well as some enterprise business applications for the Web.

"We basically believe that moving forward, all software is Web software," said James Lindenbaum, Heroku co-founder. Heroku was acquired by Salesforce.com in January for $250 million.

Engine Yard, in adding JRuby support, bills itself as the first platform to make available all stable, production-ready implementations of Ruby. JRuby project leaders Charles Nutter and Thomas Enebo both work at Engine Yard, after having previously worked for Java founder Sun Microsystems.

Engine Yard, which has been running primarily Ruby on Rails Web applications, wants its customers to shift over to the JRuby variant of the language.

"[JRuby] is the only Ruby that is fully concurrent, which we believe is a bare minimum for running cloud applications," said Nic Williams, Engine Yard vice president of technology. Ruby is very resource-intensive and memory-hungry, he said. "With JRuby, it's much more efficient, much more performant, uses far less memory."

Engine Yard also supports development via PHP.

Src: InfoWorld

Heroku gets Scala

It was announced today at JavaOne that Heroku,SalesForce.com's recently acquired PaaS provider, is getting Scala support. Heroku is teaming up withTypesafe to add Scala support to the Heroku platform. Typesafe, "the Scala company", was co-founded by Scala creator Martin Odersky.

“Scala is well suited for cloud computing applications,” said Martin Odersky. “Its unique integration of object-oriented and functional language features makes it a scalable and productive way to code for cloud environments like Heroku.”

Adam Wiggins, Heroku co-founder and CTO declared “The Scala programming language, Typesafe's Akka middleware, and Heroku's platform are a powerful combination for developers building and delivering the next generation of applications and services on the web.”

Scala use seems to be rapidly growing since its high profile use in Foursquare, LinkedIn and Twitter. Heroku's adoption of Scala seems to be an indication of its recent successes.

This year Heroku, originally a Ruby PaaS provider, has added support for JavaScript/Node.js, Clojure, Java, and Python/Django.

Src: InfoQ

Upcoming Ruby Programming Competitions with Matz - Grand Prize - 1,000,000 JPY!

Dear Ruby Enthusiasts: 

 The Government of Fukuoka, Japan together with "Matz" Matsumoto would like to invite you to enter the following Ruby competitions. If you have developed an interesting Ruby program, please be encouraged to apply.

  • Silicon Valley Competition (November 3, 2011 in Silicon Valley), Entry Deadline: October 17, 2011

Selected finalists will present their Ruby programs in front of Matz on November 3, 2011 in Silicon Valley (exact location to be announced later). Matz, together with a panel of judges, will select the winner. The winner will be invited to Fukuoka, Japan for an award ceremony to be held in March 2012 (hotel and airfare paid). If you enter the Silicon Valley competition, you will also be automatically entered in the Fukuoka competition described below.

  • Fukuoka Competition - Grand Prize - 1 Million Yen! (March 2012 in Fukuoka, Japan), Entry Deadline: November 15, 2011

You can enter the Fukuoka competition exclusively, or enter the above Silicon Valley Competition and be automatically entered in the Fukuoka Competition. Matz and a group of panelists will select the winners of the Fukuoka Competition. The grand prize winner will be invited to attend the award ceremony in Fukuoka, Japan in March 2012 (hotel and airfare paid). The grand prize for the Fukuoka Competition is 1 million yen(approximately $13,000!). Past grand prize winners include Rhomobile (USA) and APEC Climate Center (Korea).

Programs entered in these competitions do not have to be written entirely in Ruby but should take advantage of the unique characteristics of Ruby. Projects must have been developed or completed within the past 12 months to be eligible.

Please visit the following Fukuoka website for additional details or to enter:



Sep 10, 2011

Scalr - open source software that scales web infrastructure

Need to scale? Scalr might be for you.

Scalr is open source software that scales web infrastructure.

 It helps you create and manage super-scalable infrastructure that provisions and configures everything -from cache to database- to handle spikes in demand; then decommissions servers when load decreases to lower cost.

When to use
Project launch
When you're ready to launch, Scalr will provision all the resources from the Cloud for a smooth product launch, even if a million users sign up the first day.

High Growth
Scaling websites is hard and expensive. Using the power of Cloud Computing, Scalr automatically scales your website infrastructure: it scales your database, scales your app servers, and even adds and configures load balancing and caching servers!

Fault-tolerance, backups, uptime, and efficiency
Scalr provides you with a high uptime, fault-tolerant website: Scalr monitors all your servers for crashes, and replaces any that fail. It backups your data at regular intervals, and uses Amazon EBS for database storage. And to make sure you never pay more than you should, Scalr lowers costs by decommissioning servers when load subsides.

You can learn all about how Scalr scales your website, or how to use the API, at http://wiki.scalr.net

PoolParty - Cloud management. Simplified

PoolParty is a declarative cloud infrastructure.

It helps you to run a self-healing, auto-scaled and monitored cloud simply, in the clouds, on nearly any hardware, such as EC2, eucalyptus and vmware

PoolParty provides an executable description of a cloud computing infrastructure in a single file:

pool "myapp" do
  cloud "app" do
    using :ec2
    instances 1..1
    security_group do
      authorize :from_port => 22, :to_port => 22

Deployinator - Deploy code like Etsy

Deployinator is a deployment framework extracted from Etsy.

Here is a blog post explaining the rationale behind it and how it helps us out.

For anyone deploying code (engineers, designers… anyone really), it’s an easy process.
Once your code is ready to go, you go to Deployinator and push the button to get it on QA. From there it visits Princess (see the sidebar).

Then, when it’s ready to go live, you hit the “Prod” button and soon your code is live, and everyone in IRC knows who pushed what code, complete with a link to the diff.

For anyone not on IRC, there’s the email that everyone gets with the same information.


RubyJS translates Ruby code into Javascript code.

NOTE that it executes the Ruby code before it translates it into Javascript.

This has the advantage of being able to (mis-)use all of Ruby's meta-programming tricks in the global scope (i.e. for defining classes and methods, NOT within methods!).

Rack-webconsole, a Ruby/Rails console inside your browser

Rack-webconsole is a Rack middleware that enhances your development experience providing a JavaScript-powered bridge to your Ruby application backend.

With it you can interact with your database and explore the runtime environment from within the browser.

Although it should be used mainly in development environments, I personally think it could be a useful tool for staging as well.

Avoids the pain interacting with some console over an SSH session :) Here you have a little video showing how it works (watch in HD, otherwise you won't see the tiny letters!):


Tripwire - Stop hurting your users

Jeffrey Chupp and Jeremy Weiskotten recently built a new web service aimed at supporting developers, called Tripwire.

It integrates with Rails and remotely logs your form validation errors.

With this information, you can find out where your users are having the most trouble and streamline your web application.

Tripwire is in private alpha but will be open to the world soon.

Yes, Slim is speedy

Slim is a template language whose goal is to reduce the view syntax to the essential parts without becoming cryptic.


Slim is a fast, lightweight templating engine with support for Rails 3. It has been tested on Ruby 1.9.2 and Ruby/REE 1.8.7.

Slim's core syntax is guided by one thought: "What's the minimum required to make this work".

As more people have contributed to Slim, there have been optional syntax additions influenced from their use of Haml and Jade. The Slim team is open to these optional additions because we know beauty is in the eye of the beholder.

Slim uses Temple for parsing/compilation and is also integrated into Tilt, so it can be used together with Sinatra or plain Rack.

Sample View:

doctype html
    title Slim Examples
    meta name="keywords" content="template language"

    h1 Markup examples
      p Nest by indentation

    = yield

    - unless items.empty?
        - for item in items do
            td = item.name
            td = item.price
    - else
      p No items found

      | Copyright © 2010 Andrew Stone

    = render 'tracking_code'

      | $(content).do_something();

Sep 2, 2011

FUEL PHP - An MVC Framework

The Model-View-Controller pattern is pretty much dominating professional, customer facing website design these days.

FUEL is a simple, flexible, community driven PHP 5.3 web framework based on the best ideas of other frameworks with a fresh start.

Sep 1, 2011

Should we use a database at all?

When people start an enterprise application, one of the earliest questions is "how do we talk to the database".

These days they may ask a slightly different question "what kind of database should we use - relational or one of these NOSQL databases?".

But there's another question to consider: "should we use a database at all?" Continue...

Aug 30, 2011

nide - Beautiful IDE for Node.JS

nide is a web-based IDE for Node.js, designed with simplicity and ease-of-use in mind.

The current version of nide was designed and developed in only 48 hours, at the Node.js KO coding competition.

Fulcrum - Alternative to Pivotal Tracker Project Management Tool

Fulcrum is an agile project management tool. It provides a real time overview of your project plan (product backlog), instantly adjusting the project plan based upon your team's prior performance.

Fulcrum aims to create an experience as instantaneous and interactive as the traditional tool for agile project management, the whiteboard.

Aug 29, 2011

Rails 3.1.0.rc8 has been released !!!

This is the final release candidate. Rails 3.1.0 will be release next on August 30th :-)

rubygems-pwn: A Vulnerability in RubyGems

If you've seen people saying to run  gem install rubygems-pwn  on Twitter (which I don't advise!), it's because it's a proof of concept for a vulnerabilty in RubyGems.

The rubygems-pwn project on GitHub has more information about it, but essentially you can push arbitrary Ruby code into gemspec parameters which will then be executed later on.

The vulnerability has been discussed in the rubygems repo where a fix has already been made but, hopefully, more general fixes should be made available soon. (If you want to see the direct example of a malicious gemspec, look here.)

Source: RubyFlow

Aug 25, 2011

Digging Into The Rails Command Line

Have you ever wondered what happens behind the scenes when you start your server using the following command: ?

rails s

Storks has written an excellent article on how the command is hooked up with the rails application.

Source: Storks

Apple’s COO Tim Cook Replaces Steve Jobs As CEO

Apple’s Steve Jobs has resigned from his position as CEO and Apple has just announced
that COO Tim Cook has taken over as CEO.

As COO, Cook was responsible for all of the company’s worldwide sales and operations, including end-to-end management of Apple’s supply chain, sales activities, and service and support in all markets and countries.

He also headed Apple’s Macintosh division and plays a key role in the continued development of strategic reseller and supplier relationships, ensuring flexibility in response to an increasingly demanding marketplace.

Source: TechChrunch

Aug 24, 2011

Engine Yard and Orchestra Join Forces

Engine Yard has acquired Orchestra to add PHP support to the Engine Yard Platform as a Service (PaaS)

Source - EngineYard

Aug 20, 2011

Firefox 7 reaches beta, promises faster browsing

Mozilla released yesterday a beta of Firefox 7, putting the lighter-weight browser in front of a large number of users for the first time.
According to Mozilla, Firefox 7 uses significantly less memory than Firefox 4 through Firefox 6, cutting consumption by as much as 50 percent .

You can download the beta version here

Ruby - Finding Unused Methods Statically

Laser can see when you don't use a method, even through some interesting cases with send and public_send See how it works, and when it doesn't!

Rails 2.3.14, 3.0.10 and 3.1.0-rc6 Released

The Rails developers have pushed out three new releases in tandem to fix the same security vulnerabilities. All three major branches have been covered. The vulnerabilities include:

  • SQL injection vulnerability
  • A way for attackers to render a view without first calling the corresponding action
  • A XSS vulnerability in the strip_tags helper
  • Another XSS vulnerability, this time having to do with the UTF8 parsing code

It's recommended that everyone upgrade, as the SQL injection and XSS vulnerabilities can be particularly damaging.

    Twitter Releases Bootstrap, A Set Of Tools To Build Web Apps Using CSS

    Twitter has just released Bootstrap, a new toolkit to build web apps using CSS. It includes base CSS styles for typography, forms, buttons, tables, grids, navigation, alerts, and more. You can access Bootstrap on GitHub here.
    Twitter says that Bootstrap was launched as a way to provide a consistent framework for the front end of individual applications. The toolkit was originally developed during Twitter’s first Hackweek, and Twitter has been working on the tools to release to developers.
    Source: Techrunch

    Brightbox - Serious rails hosting out of the box

    Brightbox provides Xen-based virtualised servers, optimised for hosting Ruby on Rails.

    Each Brightbox server comes with RAID10 storage, access to our managed MySQL cluster and the Brightbox Rails stack preinstalled.

    Link: http://www.brightbox.co.uk/ 

    Aug 18, 2011

    Orion Henry on Heroku, Doozer and Paxos, Ruby

    Orion Henry explains what make Heroku's PaaS tick, in particular the new extensible Cedar stack as well as Doozer, the implementation of the Paxos algorithm created at Heroku.

    Link: http://www.infoq.com/interviews/henry-heroku

    rbenv: A Simple, New Ruby Version Management Tool

    rbenv is a new lightweight Ruby version management tool built by Sam Stephenson (of 37signals and Prototype.js fame). 

    The established leader in the Ruby version management scene is RVM but rbenv is an interesting alternative if you want or need something significantly lighter with fewer features. 

    Think of it as a bit like Sinatra and Rails.

    Link: https://github.com/sstephenson/rbenv

    Interview: Aaron Patterson upon Rails 3.1 as well as Ruby Performance

    Aaron Patterson talks about opening in Ruby as well as Rails, a small of a hurdles Rails as well as Rack poise for a Ruby GC, as well as most more.

    Link: http://www.infoq.com/interviews/patterson-ruby-performance

    Rails HTTP Status Code to Symbol Mapping

    Status CodeStatus MessageSymbol
    1xx Informational
    101Switching Protocols:switching_protocols
    2xx Success
    203Non-Authoritative Information:non_authoritative_information
    204No Content:no_content
    205Reset Content:reset_content
    206Partial Content:partial_content
    226IM Used:im_used
    3xx Redirection
    300Multiple Choices:multiple_choices
    301Moved Permanently:moved_permanently
    303See Other:see_other
    304Not Modified:not_modified
    305Use Proxy:use_proxy
    307Temporary Redirect:temporary_redirect
    4xx Client Error
    400Bad Request:bad_request
    402Payment Required:payment_required
    404Not Found:not_found
    405Method Not Allowed:method_not_allowed
    406Not Acceptable:not_acceptable
    407Proxy Authentication Required:proxy_authentication_required
    408Request Timeout:request_timeout
    411Length Required:length_required
    412Precondition Failed:precondition_failed
    413Request Entity Too Large:request_entity_too_large
    414Request-URI Too Long:request_uri_too_long
    415Unsupported Media Type:unsupported_media_type
    416Requested Range Not Satisfiable:requested_range_not_satisfiable
    417Expectation Failed:expectation_failed
    422Unprocessable Entity:unprocessable_entity
    424Failed Dependency:failed_dependency
    426Upgrade Required:upgrade_required
    5xx Server Error
    500Internal Server Error:internal_server_error
    501Not Implemented:not_implemented
    502Bad Gateway:bad_gateway
    503Service Unavailable:service_unavailable
    504Gateway Timeout:gateway_timeout
    505HTTP Version Not Supported:http_version_not_supported
    507Insufficient Storage:insufficient_storage
    510Not Extended:not_extended

    Source:  codyfauser

    Jul 22, 2011

    Rails Hotline


    Nice initiative to help the rails community.
    Have signed up as a volunteer. Will share my experience soon.

    Bushido - Heroku alternative


    We need to proved the git-hub URL of the project and the service will take care of the rest. But seems like its still in beta and it has got a long way ahead..

    LocomotiveCMS - Better than RefineryCMS

    You can play with the demo app @ http://demo.locomotivecms.com/admin
    Some features are not enabled in the demo mode.

    http://pogodan.com/blog/2011/06/03/we-ve-switched-to-locomotive - blog post on why an organization switched from refinery, adva CMS, etc to LocomotiveCMS.

    Things like CSS/JS editiing, custom themes, custom attributes for the CMS pages, custom models, etc are missing in refinery.

    You can do everything within the site itself unlike refinery where I had to write lot of ruby code to achieve certain features.

    Pivotal Tracker Analytics | GoodData


    Pivotal Tracker Analytics allows you to measure your agile development process as easily as Tracker lets you manage your stories.

    Here is the youtube video link: http://www.youtube.com/embed/V8din03y3e4

    Amazon Releases aws-sdk, An Official AWS SDK for Ruby Developers

    Ruby is getting popular day by day!!!!

    Cool thing is it even supports SimpleDB in the form of ROM

    Terminus - Cross browser/platform testing.


    Terminus is an experimental Capybara driver implemented in client-side JavaScript. It lets you script your application in any browser on any device, without needing browser plugins. This allows several types of testing to be automated:
    - Cross-browser testing
    - Multi-browser interaction e.g. messaging apps
    - Testing on remote machines, phones, iPads etc

    Sugar: A Javascript library for working with native objects.

    It is designed to be intuitive, unobtrusive, and let you do more with less code.

    It is similar to Prototype in that it adds methods to native Javascript objects. However, it doesn't carry any of the weight of classic browser-oriented frameworks (ajax, DOM manipulation, inheritance, etc.). Sugar is also not interested in adhering to a Ruby based syntax, nor does it have anything to do with Rails. Sugar is Javascript for Javascript developers.

    Link: sugarjs.com

    Rails development mode 300% faster

    The bigger rails project the slower development mode. If it annoys you go and try ActiveReload by Robert Pankowecki. If you don't believe just watch a video comparison -