16 April 2014

The Ruby Reflector

Recent News

Page 2 of 12

  Source Favicon
By Guest Post of New Relic 1 day ago.
Email

Imagine that New Relic tells you about one of your apps whose response time is way beyond its SLA. How do you identify the bottleneck? For one, performance issues are global in that they can happen with the application, with a back-end server, a DBMS, or the network. Visibility in the application alone is often not enough to find the problem. Event logs are great data points for the identification of such issues. Logs are universal in nature, can be generated by any type of IT device, and …

newrelic.com Read
  Source Favicon
By Mike Gunderloy of A Fresh Cup 1 day ago.
Email

Ruby's OptionParser Is All You Need - Using the built-in code instead of a gem when you need to build command line apps.

Localtunnel - Another choice for sharing services on your dev box with the world.

afreshcup.com Read
  Source Favicon
Email

Just a short note to point out that carpeaqua's design has been refreshed to finally support a responsive layout that should render much nicer on your phones and tablets. It's something I've known I needed to do for a while, but never seemed to get around to.

Thanks to Michael Tofias for being annoyed enough at this to agree to take on the challenge. He is a scholar and a gentleman.

carpeaqua.com Read
  Source Favicon
By Simon Taranto of Giant Robots Smashing Into Other Giant Robots 1 day ago.
Email

Then in Ruby (at the application layer), we run the map to get the amounts and the inject to get the sum. Done. Not that bad but we can do better.

Using SQL sum

We want to avoid pulling all this data into memory just to get a single number. Let's have the database do the heavy lifting. class Campaign < ActiveRecord::Base # ... def funds_raised loans.sum(:amount) end end

With this implementation we have the database do the calculation. We get access to sum from ActiveRecord

robots.thoughtbot.com Read
  Source Favicon
By Giles Bowkett of Giles Bowkett 2 days ago.
Email
  Source Favicon
By Swirrl of Swirrl Blog 2 days ago.
Email

In February, our very own Bill went to advise at the Smart Data Hack in Edinburgh . This was a 5 day event that involved undergraduates splitting into 16 teams to make apps using open data. Ewan Klein arranged it; it was well attended and, eager to encourage our love of data and its uses, we put up a prize of £250 for the best app that used government data.

And Bill said competition was high - you can read more detail on the different projects here but …

ricroberts.com Read
  Source Favicon
Email

To make it possible, we leveled up the Wrapper API to make it more extensible and to allow developers to directly configure it instead of relying on global state. After such improvements, it was very easy to change the Simple Form configuration to work with Bootstrap 3. I'll talk more about this in a future post.

Integrating Bootstrap with Simple Form should be as easy as it was before. We are working on the documentation before the final release but you can find examples about how …

blog.plataformatec.com.br Read
  Source Favicon
By Todd Hoff of High Scalability 2 days ago.
Email

Most databases have replication but you need to make sure that the characteristics of how the database handles a node failure are well understood. Worst case you use EBS, put your state on it, snapshot it regularly, and ship those snapshots to another region because when EBS fails it fails hard.

Also, logs make every machine stateful. Use something like logstash to centralize that state.

Well, you break your services out onto stateless and stateful machines. After that, you make sure that each …

highscalability.com Read
  Source Favicon
By David of Signal vs. Noise 2 days ago.
Email

Performance tuning is a fun sport, but how you're keeping score matters more than you think, if winning is to have real impact. When it comes to web applications, the first mistake is start with what's the easiest to measure: server-side generation times.

In Rails, that's the almighty X-Runtime header — reported to the 6th decimal of a second, for that extra punch of authority. A clear target, easily measured, and in that safe realm of your own code to make it appear fully …

37signals.com Read
  Source Favicon
Email

Setting up, managing, securing, and dealing with package repositories that support multiple architectures and linux distributions is painful, time consuming, and error-prone.

public launch

We are publicly launching packagecloud.io for the first time today to help ease the pain for hobbyists, devs, and ops people who need to host RPM, DEB, or RubyGem repositories for their personal projects, build systems, and internal infrastructure.

features

Some of the most exciting features …

timetobleed.com Read