Win a Free Ticket to php|tek for Your User Group! »

Created at: 17.05.2012 00:05, source: Engine Yard Blog, tagged: community Contests events php

User group leaders, listen up! We have an extra Full Experience tickets to php|tek, and we'd like to give it to the community to use. php|tek happens May 22-25 in Chicago, Illinois, and is jam packed with PHP goodness, including an Unconference and a Hackathon. I mean, have you seen this schedule?!  Your winner is also welcome to join us at the Engine Yard JAUNT on Friday night after the conference. There is undoubtedly much awesomeness to be had next week.

If you are interested in participating, drop me a line by Thursday, May 17 and let me know. We'll randomly select a user group to receive the ticket, and you can give it out however you wish. Thumb wrestling champion? Karaoke competition? Hackathon winner? Best high fiver? It's really up to you.

As soon as you have a winner, let me know and we'll make the arrangements with the fine folks at Blue Parabola, hosts of the conference.


more »

#350 REST API Versioning »

Created at: 16.05.2012 10:00, source: Railscasts

APIs should be consistent, but it is difficult to do this when returning a JSON response along side the HTML interface. Here I show how to add a versioned, RESTful API. The version can be determined from either the URL or HTTP headers.


more »

Announcing Database-less environments »

Created at: 16.05.2012 03:35, source: Engine Yard Blog, tagged: Add-ons databases Engine Yard Cloud mongodb mysql PostgreSQL Technology

At Engine Yard, we believe that you should have the flexibility to set up your environments and manage your data stores as you see fit. This is something we take seriously as we continue to evolve Engine Yard Cloud and today, we are happy to announce database-less environments as an alpha release. If you need to utilize data offerings outside of our natively supported MySQL or PostgreSQL, then this feature will enable you to do so.

Enabling the feature

With database-less environments, it is no longer necessary to have a MySQL or PostgreSQL instance in every environment. Simply boot up a ‘No Database’ cluster with one of our Add-on database providers or roll your own using utility instances. Now it is easier and more affordable than ever to get started on Engine Yard.

You can enable this feature using the Early Access tools. Once you have the 'No db' feature enabled, you will be able to select the "No Database (Alpha)" option under Database Stack on the new environment form.

You can add as many application instances and utilities as you need, and you can stop paying for database masters that you don’t use.  For example, you can follow the Mongoid RailsCast (Episode 238) and create a simple blog using Mongoid using two application instances and three utility nodes.

Add-ons and DBaaS

You can also use the ‘No Database’ feature in combination with our Add-on Program (login required).  For example, you can have a simple application with just one instance and an external database. See the Database section of our Add-on Program for more information.

We hope you enjoy this feature and let us know what you think.

Notes

Removal of the database.yml file
Environments without databases will not have a database.yml file generated by Engine Yard Cloud. Enabling this feature means that you are either not using ActiveRecord or you have supplied your own database.yml file in your repository.


more »

Infographic: A Mobile Storm in the Cloud »

Created at: 16.05.2012 01:47, source: Engine Yard Blog, tagged: Engine Yard Cloud News Technology

Did you know that there are 3 billion more smartphones on earth than there are humans? Maybe that doesn’t come as much of a surprise to you. But what you might find more surprising is that the growth in smartphone adoption has actually contributed to Engine Yard’s success. That’s right: as smartphone adoption has grown, so has app consumption. As a result, businesses are now prioritizing mobile application development. By 2015, mobile application development projects targeting smartphones and tablets will outnumber native PC projects by a ratio of 4 to 1. Innovation in mobile is imperative, and there’s a need for tools that enable businesses to innovate quickly. Many cloud computing technologies--like Engine Yard's Platform as a Service--have enabled developers and businesses to focus on application innovation.

The below infographic includes even more interesting facts about innovations in mobile, cloud computing and PaaS. Check it out and let us know where you think these fields are headed next.

Platform as a Service
Copy and paste onto your blog:

<a href="http://www.engineyard.com/blog/2012/platform-as-a-service/"><img class="aligncenter size-full wp-image-12384" src="http://www.engineyard.com/blog/wp-content/uploads/platform-as-a-service-v2.jpg" alt="Platform as a Service" width="930" height="5572" /></a><br/>Courtesy of: <a href="http://www.engineyard.com">Engine Yard</a>


more »

Exciting New Integration: Badgeville in our Helpdesk! »

Created at: 15.05.2012 18:17, source: Engine Yard Blog, tagged: Customers Technology Tips & Tricks

We are pleased to announce that we have integrated Badgeville’s gamification technology into our Zendesk ticketing system.  As you use the helpdesk to perform different actions,  (searching documentation, contributing to forums, completing satisfaction surveys, etc.) you will be able to earn many different badges and complete many different missions.

Through this integration we hope to increase community engagement, and to not only give you new channels to share your experiences and ideas, but also to reward you for it!

While inside our helpdesk, if you hover over a user’s picture, a little summary profile will appear showing how many points and rewards that user has, as well as the last badge that they have earned.

By clicking on “Click for profile” you will be brought to the user’s showcase that shows their progress on the current missions, with hints on how to earn the badges associated with them.  You will also be able to see your showcase anytime, by clicking on the “Profile” link in the upper right corner.

Also, there have been a few new Community forums opened up in the last week, so if you want to share your ideas and start earning some badges, check them out here!

Keep your eyes open. We will be introducing additional missions in the future.  If you have any questions or feedback, please open a ticket and I will get back to you!

Happy playing!


more »

All Presentation Software is Broken »

Created at: 14.05.2012 10:00, source: igvita.com

Whenever the point I'm trying to make lacks clarity, I often find myself trying to dress it up: fade in the points, slide in the chart, make prettier graphics. It is a great tell when you catch yourself doing it. Conversely, I have yet to see a presentation or a slide that could not have been made better by stripping the unnecessary visual dressing. Simple slides require hard work and a higher level of clarity and confidence from the presenter.

All presentation software is broken. Instead of helping you become a better speaker, we are competing on the depth of transition libraries, text effects, and 3D animations. Prezi takes the trophy. As far as I can tell, it is optimized for precisely one thing: generating nausea.

Next Presentation Platform: Browser

If you want your message to travel, then the browser is your (future) presentation platform of choice. No proprietary formats, no conversion nightmares, instant access from billions of devices, easy sharing, and more. Granted, the frameworks and the authoring tools are still lacking, but that is only a matter of time.

Unfortunately, we are off to a false start. Instead of trying to make the presenter more effective, we are too busy trying to replicate the arsenal of useless visual transitions with the HTML5, CSS3 and WebGL stacks. Spinning WebGL cubes and CSS transitions make for a fun technology demo but add zero value - someone, please, stop the insanity. We have web connectivity, ability to build interactive slides, and get realtime feedback and analytics from the audience. There is nothing to prove by imitating the broken features of PowerPoint and Keynote, let's leverage the strengths of the web platform instead.

Free Lunch: Web Analytics

Keynote, PowerPoint and friends are optimized to help hide your incompetence: no useful feedback, no way to measure the effectiveness of your delivery or reach of the message. On the web, we inherit all of the power of web analytics for free. We can measure slide impressions, time on slide, referrals, clicks, display heatmaps, segment the viewers, setup conversion goals and more. Let's look at a real-life example.

I've instrumented my RailsConf presentation (Making the Web Faster) with Google Analytics, where I'm tracking slide transitions and clicks via custom events and time on slide via the user timings API:

7.5K+ visits, 200K+ slides impressions, and a 40%+ return rate. An average user took 19 minutes to make their way through the slides, which translates to just over 100 "cognitive days" across all visitors. It took me roughly 20 hours to make the slides from scratch, which translates to a 1:120 hour ratio. Is this good? We can't say, but it is a baseline. I would love to compare these numbers to other RailsConf presentations.

Vanity counters are fun to share, but did the presentation convey the right message? The goal was to focus the audience on optimizing for user perceived latency and the available tools. The peaks in time on slide up to slide 20 correspond to off-site clicks to Navigation Timing spec, Google Analytics documentation, and examples - mission accomplished. Slides 30 to 40 are mostly flat: I need do a better job of motivating webpagetest.org, because it is an amazing tool. Finally, the big timing spike at the end corresponds to slides on mod_pagespeed. Next time around I will make sure to spend more time on it.

Video & YouTube Analytics

The presentation was recorded and I uploaded it to my own YouTube account - this gives you a lot of great analytics. First, it is reassuring to see that web visitors and YouTube audience retention follows the same pattern, with many of the same peaks and valleys. The added bonus: I can click on any time point and review my delivery. And what's the retention peak of entire presentation? An "inception" demo of opening Chrome's inspector, on the inspector! Not surprisingly, this also corresponds to the reaction of the audience during the live presentation.

Make me a better presenter, please!

If I was to give the same presentation again given the information above, I am confident I could now do a better job of it. Except, of course, I wouldn't give the same presentation since I can clearly see the sections that need to be improved, and a few sections that need to be cut.

I would love to see some experiments with live session feedback: am I going too fast, should I revisit a concept, perhaps even live questions. Add a websocket endpoint and all of the above is easily done. This space is ripe for disruption. Forget the animations, ornate templates, and other me-too gimmicks, make me a better presenter.


more »

Spec smell: explicit use of subject »

Created at: 14.05.2012 05:13, source: David Chelimsky, tagged: Uncategorized

TL;DR

Explicit use of the “subject” abstraction is a code smell, and should be refactored to use a more intention revealing name whenever possible.

One liners

rspec-core supports a one-liner syntax to reduce the noise of common requirements like validations:

Without support for this syntax, the same example might look like this:

The benefit of this more verbose example is that it we can read it and understand all the parts right away: an object is initialized and assigned to a local variable, then that variable is used for an expectation.

The benefit of the one-liner is that it’s terse and expressive, but that comes at a cost: you can’t see what the expectation is being evaluated against, so you have to understand some underlying mechanics in order to isolate/understand a failure.

The subject abstraction

Behind the scenes, the one-liner uses a “subject” abstraction supported by two methods named subject. One is a class method on ExampleGroup, used to declare the “subject” of all of the examples in the group:

The other is an instance method on ExampleGroup. The first time it is called within an example the block passed to the class’ subject method is evaluated and its result memoized, returning the same value from that and each subsequent subject call:

Here is what they look like together:

The problem with this example is that the word “subject” is not very intention revealing. That might not appear problematic in this small example because you can see the declaration on line 3 and the reference on line 6. But when this group grows to where you have to scroll up from the reference to find the declaration, the generic nature of the word “subject” becomes a hinderance to understanding and slows you down.

In this case, we’d be better served by using a method (or a let declaration) with an intention revealing name:

If we can do that, you might wonder why we have “subject” at all. Well, it was originally designed to never be seen:

Implicit subject

Note in the example with subject { Article.new }, that the subject declaration is initializing an Article with no args. Since RSpec knows that the first argument to describe is the Article class, it can store a similar block in the background as a default, implicit subject declaration, leaving us with:

That’s a little better, but now subject appears out of nowhere in the example, leaving the reader to wonder where it came from. To remove the need for explicitly referencing subject, the example delegates should and should_not to subject when it is, itself, the receiver:

Starting that line with “should” seems a bit odd though, so the final step is to do it all in one line:

Now we have a completely implicit subject, and the result reads quite nicely in both the code and the output when run with --format documentation:

Article
  should validate presence of :title

We still need to trust that something is doing some work for us but it’s all operating at the same level of abstraction, so we don’t have to try to interpret half of the functionality.

Avoid explicit use of subject

Intention revealing names are crucial if you want to be able to quickly scan and understand code as you navigate around different parts of a system. This is as true for specs as it is for implementation, and the generic nature of the word “subject” makes it a poor choice when a more intention revealing name can be used.

Is an explicit subject ever OK?

Guidelines are guidelines; YMMV. In general I would recommend that if there is a reasonable way to use an intention revealing name instead of “subject”, you should. The only use case I can think of in RSpec in which another name can’t be used is the one liner syntax:

Here we have to use subject because that’s the only way to tell RSpec where to send should and should_not. In my opinion, any other explicit appearance of subject can and should be refactored to use an intention revealing name.

Update 2012-05-15

Based on feedback on this post, I added support for a “named subject,” which lets you reference the declared subject implicitly in one-liners and with an intention revealing name in standard examples:

This will be released with rspec-core-2.11. Keep your eyes out for it!


more »

Engine Yard Expands IaaS Offerings with HP Cloud Services »

Created at: 10.05.2012 15:01, source: Engine Yard Blog, tagged: Engine Yard Cloud News Partners

We’re excited to announce that we’re expanding the infrastructure options available to our customers with support for HP Cloud Services. We empower developers by providing a rock-solid platform with choices of infrastructure and components that make their job of building great applications as easy as possible. Engine Yard is one of the first PaaS providers to add support for HP’s public cloud, which is based on their world-class hardware and software, using key elements of the HP Converged Infrastructure combined with OpenStack technology.

For the past six years, our customers have relied on the Engine Yard platform to enable them to innovate faster, with higher reliability and while maintaining control of their environment. We continue to invest deeply in our open source PaaS to provide value for our customers. We want to ensure developers can rapidly build and iterate their applications while using Engine Yard Cloud to provide the on-demand scalability and reliability they need as their businesses grow and succeed.

By combining our leading commercial-grade open PaaS with HP's public cloud infrastructure offerings, we’re providing development teams a powerful new solution to rapidly deploy both large and small applications in the cloud. Engine Yard has deep roots in open source, and we continue to champion open computing by adding new IaaS options like HP’s public cloud.

We’ll be announcing more details about availability. To get updates, click here.


more »

How to fix the Ruby 1.9 HTTPS/Bundler segmentation fault on OS X Lion »

Created at: 09.05.2012 21:38, source: Phusion Corporate Blog, tagged: ruby

If you’ve installed a gem bundle on OS X Lion the past few weeks then you may have seen the dreaded “[BUG] Segmentation fault” error, where Ruby sees to crash in the connect C function in http.rb. Upgrading to the latest Ruby 1.9.3 version (p194) doesn’t seem to help. Luckily someone has found a solution for this problem.

It turns out the segmentation fault is caused by an incompatibility between MacPort’s OpenSSL and RVM. MacPorts installs everything to /opt/local but RVM does not look for OpenSSL in /opt/local. We solved the problem by reinstalling Ruby 1.9.3 with the MacPorts OpenSSL, as follows:

sudo port install libyaml
rvm reinstall ruby-1.9.3 --with-openssl-dir=/opt/local --with-opt-dir=/opt/local


more »

Multiple Ruby Version Support on Heroku »

Created at: 09.05.2012 18:27, source: Heroku

Maximizing parity between development and production environments is a best practice for minimizing surprises at deployment time. The version of language VM you're using is no exception. One approach to this is to specify it using the same dependency management tool used to specify the versions of libraries your app uses. Clojure uses this technique with Leinigen, Scala with SBT, and Node.js with NPM. In each case, Heroku reads the dependency file during slug compile and uses the version of the language that you specify.

Today, we're pleased to announce that we've added support for specifying a Ruby version to Gem Bundler, the dependency management tool for Ruby. This will allow you to specify a version of Ruby to be used in your Ruby app on Heroku.

Try it out:

$ gem install bundler --pre

In your Gemfile:

source 'http://rubygems.org'

ruby '1.9.3'
gem  'rails', '3.2.3'

Then:

$ bundle install
$ git add Gemfile
$ git commit -m 'use Ruby 1.9.3'
$ git push heroku master

Prove that you're running 1.9.3:

$ heroku run 'ruby -v'
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]

$ heroku run 'ruby -e "puts RUBY_VERSION"'
1.9.3

Patch Versions

While you can specify the version of Ruby for you app, you can't specify a patch version, such as Ruby 1.9.2-p290. Ruby patches often include important bug and security fixes and are extremely compatible. Heroku will provide the most secure patch level of whatever minor version number you request.

Thanks

Thanks to Terence Lee Heroku Ruby team member and bundler maintainer for the additional support of ruby versions to the Heroku Ruby Buildpack and orchestrated the release of Bundler 1.2.0. Also thanks to Yehuda Katz and the entire Bundler team for helping get this release out the door.


more »