Ruby on Rails

58 results back to index


pages: 280 words: 40,881

JQuery UI by Eric Sarrion

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Chuck Templeton: OpenTable, Firefox, Ruby on Rails, web application

List of suggestions The input field is represented by an <input> whose ID is book: <script src = jquery.js></script> <script src = jqueryui/js/jquery-ui-1.8.16.custom.min.js></script> <link rel=stylesheet type=text/css href=jqueryui/css/smoothness/jquery-ui-1.8.16.custom.css /> <h3>Enter the name of the book:</h3> <input id=book /> <script> // array of items to be proposed in the list of suggestions var books = ["Web development with J2EE", "Practical CSS & JavaScript", "Practical Ruby on Rails", "Introduction to HTML & CSS", "jQuery UI"]; $("input#book").autocomplete ({ source : books }); </script> In the <script> tag of the HTML page, we need to indicate both the list of suggestions (var books) and that the input field must be observed in order to display the list of suggestions. To do this, simply indicate that the <input> field is managed by the jQuery UI autocomplete () method.

For example, if we modify the ui-menu-item class associated with <li> elements, we can change the font used for the list of suggestions, as shown in Figure 9-3: <script src = jquery.js></script> <script src = jqueryui/js/jquery-ui-1.8.16.custom.min.js></script> <link rel=stylesheet type=text/css href=jqueryui/css/smoothness/jquery-ui-1.8.16.custom.css /> <style type=text/css> li.ui-menu-item { font-size : 12px; font-family : georgia; } </style> <h3>Enter the name of the book:</h3> <input id=book /> <script> // array of items to be proposed in the list of suggestions var books = ["Web development with J2EE", "Practical CSS & JavaScript", "Practical Ruby on Rails", "Introduction to HTML & CSS", "jQuery UI"]; $("input#book").autocomplete ({ source : books }); </script> Figure 9-2. HTML code generated by the autocomplete () method Figure 9-3. Customized list of suggestions The autocomplete () Method The autocomplete () method can be used in two forms: $(selector, context).autocomplete (options) $(selector, context).autocomplete ("action", params) The autocomplete (options) Method The autocomplete (options) method declares that an <input> HTML element must be managed as an input field that will be displayed above a list of suggestions.

In this example, we set the list of suggestions to 400 pixels wide (see Figure 9-4): <script src = jquery.js></script> <script src = jqueryui/js/jquery-ui-1.8.16.custom.min.js></script> <link rel=stylesheet type=text/css href=jqueryui/css/smoothness/jquery-ui-1.8.16.custom.css /> <h3>Enter the name of the book:</h3> <input id=book /> <script> // array of items to be proposed in the list of suggestions var books = ["Web development with J2EE", "Practical CSS & JavaScript", "Practical Ruby on Rails", "Introduction to HTML & CSS", "jQuery UI"]; $("input#book").autocomplete ({ source : books, open : function (event) { var $ul = $(this).autocomplete ("widget"); $ul.css ("width", "400px"); } }); </script> The list corresponds to the <ul> (created automatically by jQuery UI when using the autocomplete (options) method). It was explained earlier that it was easier to retrieve it using the autocomplete ("widget") instruction.


pages: 82 words: 17,229

Redis Cookbook by Tiago Macedo, Fred Oliveira

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Debian, full text search, loose coupling, Ruby on Rails, Silicon Valley

Note that we start off by actually connecting to the redis-server instance by instantiating the Redis class: > r = Redis.new => #<Redis client v2.2.0 connected to redis://127.0.0.1:6379/0 (Redis v2.2.11)> > r.set 'hellofoo','hellobar' => "OK" > r.get 'hellofoo' => "hellobar" > r.sadd 'parkdogs', 'fido' => true > r.sadd 'parkdogs', 'rudolph' => true > r.sadd 'parkdogs', 'rex' => true > r.smembers 'parkdogs' => ["rex", "rudolph", "fido"] In these examples, we cut a little bit of the irb output for brevity and simplicity. As you can see, using Redis from inside a Ruby script (or full-blown application) is quite trivial. In the next recipe, we’ll look into how we can build upon what we just learned to use Redis from a Ruby on Rails-based application. Using Redis with Ruby on Rails Problem You want to store and access data in Redis from a Ruby on Rails application. Solution Use Ezra Zygmuntowicz’s redis-rb library to access and manipulate Redis data from Ruby on Rails. Discussion If you already have a Ruby on Rails application, you can add Redis support to it by adding the following line to your Gemfile: gem 'redis' and by creating a file inside your config/initializers directory with the following initializer to connect your application to Redis: $redis = Redis.new This will create a global variable called $redis with which you can manipulate data and run commands on the engine.

Discussion If you already have a Ruby on Rails application, you can add Redis support to it by adding the following line to your Gemfile: gem 'redis' and by creating a file inside your config/initializers directory with the following initializer to connect your application to Redis: $redis = Redis.new This will create a global variable called $redis with which you can manipulate data and run commands on the engine. You can pass the :host and :port options to the Redis.new method in order to connect to a specific host and port instead of the default localhost:6379. redis-rb also lets you connect to Redis by using a Unix socket by passing the parameter :path. Once these two steps are done, you are ready to start using Redis from Ruby on Rails. You can test out your setup by accessing and using the $redis variable from your Rails console by running: rails console and exploring Redis commands to get and set specific keys, hashes, sets, or lists. Adding Redis functionality to ActiveRecord models Let’s imagine you have a User model and a Book model and you wanted to store a list of books that person owns by using a Redis set, thus allowing you to do creative things like seeing books users have in common easily.


pages: 194 words: 36,223

Smart and Gets Things Done: Joel Spolsky's Concise Guide to Finding the Best Technical Talent by Joel Spolsky

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Build a better mousetrap, David Heinemeier Hansson, knowledge worker, linear programming, nuclear winter, Ruby on Rails, Sand Hill Road, Silicon Valley, sorting algorithm, Superbowl ad, the scientific method, type inference, unpaid internship

A story that allows for words like passion and enthusiasm to be part of the sanctioned vocabulary of developers without the need to make excuses for yourself. Or feel embarrassed about really liking 61 62 Smart and Gets Things Done what you do.”8 Elevating a web programming framework to a thing of “beauty, happiness, and motivation” may seem like hubris, but it’s very appealing and sure differentiates their company. In propagating the narrative of Ruby on Rails as Happiness, they’re practically guaranteeing that at least some developers out there will be looking for Ruby on Rails jobs. But 37signals is still new at this identity management campaign thing. They don’t hold a candle to Apple Computer, which, with a single Super Bowl ad in 1984, managed to cement their position to this day as the countercultural force of freedom against dictatorship, of liberty against oppression, of colors against black and white, of pretty women in bright red shorts against brainwashed men in suits.

That’s the stereotype, anyway, so to keep the best developers, investment banks have two strategies: paying a ton of money, and allowing programmers basically free rein to keep rewriting everything over and over again in whatever hot new programming language they feel like learning. Wanna rewrite that whole trading app in Ruby? Whatever. Just get me a goddamned cheeseburger. 59 60 Smart and Gets Things Done Some programmers couldn’t care less about what programming language they’re using, but most would just love to have the opportunity to work with exciting new technologies. Today that may be Python or Ruby on Rails; three years ago it was C# and before that Java. Now, I’m not telling you not to use the best tool for the job, and I’m not telling you to rewrite in the hot language-du-jour every two years, but if you can find ways for developers to get experience with newer languages, frameworks, and technologies, they’ll be happier. Even if you don’t dare rewrite your core application, is there any reason your internal tools, or less-critical new applications, can’t be written in an exciting new language as a learning project?

Other companies line up with social causes, or produce a product which, in some way, can be perceived or framed as benefitting society. As a recruiter, your job is to identify the idealistic aspects of your company, and make sure candidates are aware of them. Some companies even strive to create their own ideological movements. Chicago-area startup 37signals has strongly aligned themselves with the idea of simplicity: simple, easy to use apps like Backpack and the simple, easy to use programming framework Ruby on Rails. For 37signals, simplicity is an “-ism,” practically an international political movement. Simplicity is not just simplicity, oh no, it’s summertime, it’s beautiful music and peace and justice and happiness and pretty girls with flowers in their hair. David Heinemeier Hansson, the creator of Rails, says that their story is “one of beauty, happiness, and motivation. Taking pride and pleasure in your work and in your tools.


pages: 190 words: 52,865

Full Stack Web Development With Backbone.js by Patrick Mulder

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Airbnb, create, read, update, delete, Debian, MVC pattern, node package manager, Ruby on Rails, side project, single page application, web application

Preface | xi Thoughtbot’s Backbone.js on Rails This self-published book is great from a Ruby on Rails perspective, because it in‐ cludes a lot of Ruby code examples that are necessary to drive a Backbone.js frontend in Rails. It also does a nice job in discussing Jasmine and Capybara for frontend testing. Building Backbone Plugins Consult this book written by Derick Bailey and Jerome Gravel-Niquet if you want to delve more into writing Backbone plug-ins and reusable code in general. Also, with the Pragmatic Bookshelf ’s Hands-on Backbone.js, Derick has published a number of screencasts that might help more audio-visual inclined learners. BackboneRails.com Brian Mann’s screencasts provide a great discussion of concepts and examples for developing client-side applications together with Ruby on Rails. Last but not least, the source code of Backbone itself and of many Backbone plug-ins are good places to improve your understanding of Backbone details.

For some application stacks (e.g., when you work with a web server similar to Express.js), CommonJS modules, or CommonJS like require of modules, can be done with some simple configurations. For web servers based on Node.js, there are the package managers Stitch and Mincer, which are somewhat similar to the Sprockets asset manager for web servers in Ruby. If you come from Ruby on Rails, you probably have used Sprockets, the asset pipeline in Ruby on Rails. Sprockets is very similar to Stitch but supports its own require syntax. If you like that syntax, you might want to check out Mincer, a port of Sprockets to Node.js. To illustrate some ideas behind using a package manager and a manifest file, let’s walk through an example with Express.js and Stitch. The role of the web server is to deliver HTML, CSS, and JavaScript to the client.

This “JST” object acts as a central object from where all templates can be referenced. For example, this is the default approach in frameworks such as Ruby on Rails and Sprockets, or in Grunt-based build processes, which we will discuss soon: template: JST['genresFilter'] To create this JST object, we usually have a build step where the templates are con‐ catenated into a single file and exported as a JST object. Because this step is very similar to preparing an application for deployment, we’ll discuss this further in “Grunt” on page 77. ECO Another approach to improve building DOM nodes is given by ECO templates. ECO stands for “embedded CoffeeScript.” Some prefer the minimal syntax of JavaScript. Also, the template engine can be easily combined with stacks based on Ruby on Rails or Stitch, as ECO is written by the same author, Sam Stephensson. Here’s how we install it: $ npm install eco From now on, we can combine the template property in a Backbone.View by requiring an external file.


pages: 132 words: 31,976

Getting Real by Jason Fried, David Heinemeier Hansson, Matthew Linderman, 37 Signals

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

call centre, collaborative editing, David Heinemeier Hansson, iterative process, John Gruber, knowledge worker, Merlin Mann, Metcalfe's law, performance metric, premature optimization, Ruby on Rails, slashdot, Steve Jobs, web application

Web-guru Jeffrey Zeldman said, "The brilliant minds at 37signals have done it again." Ta-da List keeps all your to-do lists together and organized online. Keep the lists to yourself or share them with others for easy collaboration. There's no easier way to get things done. Over 100,000 lists with nearly 1,000,000 items have been created so far. Ruby on Rails, for developers, is a full-stack, open-source web framework in Ruby for writing real-world applications quickly and easily. Rails takes care of the busy work so you can focus on your idea. Nathan Torkington of the O'Reilly publish ing empire said "Ruby on Rails is astounding. Using it is like watching a kung-fu movie, where a dozen bad-ass frameworks prepare to beat up the little newcomer only to be handed their asses in a variety of imaginative ways." Gotta love that quote. You can find out more about our products and our company on our web site at www.37signals.com.

We encourage you to give that combination a spin. In summary, your team needs to work with tools they love. We've talked here in terms of programming languages, but the concept holds true for applications, platforms, and anything else. Choose the fuse that gets people excited. You'll generate excitement and motivation and a better product as a result. The kinds of engineers you want The number one reason I wanted to build our app using Ruby on Rails is that it is so elegant, productive, and beautifully designed. It tends to attract the kind of engineers who care about just those sort of things...those are exactly the kinds of engineers you want on your team because they create the kind of beautiful, elegant and productive software you need to win the market. —Charles Jolley, Managing Director at Nisus Software (from Signal vs. Noise) Table of contents | Essay list for this chapter | Next essay Code Speaks Listen when your code pushes back Listen to your code.

. ;) An example from our own history is the Yellow Fade Technique, a method we invented to subtly spotlight a recently changed area on a page. We wrote a post about it on Signal vs. Noise. That post made the rounds and got thousands and thousands of page views (to this day it's doing huge traffic). The post worked on both an educational and a promotional level. A lesson was learned and a lot of people who never would have known about our products were exposed to them. Another example: During our development of Ruby on Rails, we decided to make the infrastructure open source. It turned out to be a wise move. We gave something back to the community, built up goodwill, garnered recognition for our team, received useful feedback, and began receiving patches and contributions from programmers all over the world. Teaching is all about good karma. You're paying it forward. You're helping others. You get some healthy promotion.


pages: 648 words: 108,814

Solr 1.4 Enterprise Search Server by David Smiley, Eric Pugh

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Amazon Web Services, bioinformatics, cloud computing, continuous integration, database schema, domain-specific language, en.wikipedia.org, fault tolerance, Firefox, information retrieval, Internet Archive, Ruby on Rails, web application, Y Combinator

• jquery_autocomplete is an example of using the jQuery Autocomplete library to populate suggestions based on Solr searches. • solrjs is an example of building a fully featured Solr Search UI using just JavaScript. • php is a barebones example of PHP integration with Solr. • solr-php-client is a richer example of integrating Solr results into a PHP based application. • myfaves is a Ruby on Rails application using acts_as_solr to search for music artists. • blacklightopac is a demonstration of a full featured faceted search UI in Ruby on Rails. SolrJ: Simple Java interface SolrJ is the simple Java interface to Solr that insulates you from the dirty details of parsing and sending messages back and forth between your application and Solr. Instead, you get to work in the familiar world of objects like SolrQuery, QueryResponse, and SolrDocument. SolrJ is a core part of the Solr project, and therefore is updated as soon as new features are added to Solr.

NW, , Atlanta, , 30327 Chapter 8 I think that Acquia's hosted search product is a very promising idea, and I can see hosted Solr search becoming a very common integration approach for many sites that don't wish to manage their own Java infrastructure or need to customize the behavior of Solr drastically. Acquia is currently evaluating many other enhancements to their service that take advantage of the strengths of the Drupal platform and the tight level of integration they are able to perform. So expect to see more announcements. You can learn more about what is happening here at http://acquia.com/products-services/acquia-search. Ruby on Rails integrations There has been a lot of churn in the Ruby on Rails world for adding Solr support, with a number of competing libraries and approaches attempting to add Solr support in the most Rails-native way. Rails brought to the forefront the idea of Convention over Configuration. In most traditional web development software, from ColdFusion, to Java EE, to .NET, the framework developers went with the approach that their framework should solve any type of problem and work with any kind of data model.

Blacklight OPAC Blacklight is an open source Online Public Access Catalog (OPAC) that demonstrates the power of a highly configurable Ruby on Rails frontend paired with Solr. OPACs are the modern web enabled version of the classic card catalog that allow libraries to easily put their collections online. Blacklight supports parsing of various standard library catalog storage formats including MARC records and TEI XML format. Blacklight 2.0 was released in March of 2009 as a Rails Engine plugin. Rails Engine plugins allow users to integrate the rich functionality of the plugin, while keeping the plugin related code and assets, such as JavaScript, CSS and images, separate from the hosting application, thus facilitating upgrades to the Blacklight Engine. You may find that Blacklight provides an excellent starting point for your own Solr/Ruby on Rails development. Let's go ahead and index information from MusicBrainz.org into Blacklight, just to see how easy it is.


pages: 120 words: 19,624

git internal by Scott Chacon

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Debian, en.wikipedia.org, loose coupling, pull request, Ruby on Rails

I will focus on some interesting features of a commercial service called GitHub (http://github.com) here, but there is also an open source project called Gitorious (http://gitorious.com) that has many of the same features. One of the compelling features of GitHub is the ability to create a private repository and share it with only a few developers. However, the complete source to Gitorious is available as a Ruby on Rails application. It could be modified to run on your company’s server if your project needs to remain private. GitHub hosts many popular projects featured in the PeepCode series, including Ruby on Rails (http://github.com/rails/rails/tree/master), Merb (http://github.com/wycats/merb-core/tree/master), RSpec (http://github.com/ dchelimsky/rspec/tree/master), and Capistrano (http://github.com/jamis/capistrano/tree/master). GitHub GitHub is interesting as a source code hosting service because it 107 includes some social networking features, which is not what most people imagine when they think of hosting source code.

Recently (since 1.0), more and more of the scripts have been re-written in C (referred to as built-ins), increasing portability and speed. Though originally used for just the Linux kernel, the Git project spread rapidly, and quickly became used to manage a number of other Linux projects, such as the X.org, Mesa3D, Wine, Fedora and 8 Samba projects. Recently it has begun to spread outside the Linux world to manage projects such as Rubinius, Merb, Ruby on Rails, Nu, Io and many more major open source projects. 9 Understanding Git chapter 2 In this section, we will go over what Git was built for and how it works, hopefully laying the groundwork to properly understand what it is doing when we run the commands. The first commit message for the Git project was ‘initial version of “git”, the information manager from hell’ – Linus, 4/7/05 When I learned Git, as many people do, I learned it in the context of other SCMs I had used – Subversion or CVS.

It works completely offline or with hundreds of remote repositories that can push to and/ or fetch from each other over several simple and standard protocols. Efficiency Git is very efficient. Compared to many popular SCM systems, it seems downright unbelievably fast. Most operations are local, which reduces unnecessary network overhead. Repositories are generally packed very efficiently, which often leads to surprisingly small repo sizes. The Ruby on Rails Git repository download, which includes the full history of the project – every version of every file, weighs in at around 13M, which is not even twice the size of a single checkout of the project (~9M). The Subversion server repository for the same project is about 115M. Git also is efficient in its network operations – the common Git transfer protocols transfer only packed versions of only the objects that have changed.


pages: 278 words: 70,416

Smartcuts: How Hackers, Innovators, and Icons Accelerate Success by Shane Snow

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

3D printing, Airbnb, Albert Einstein, attribution theory, augmented reality, barriers to entry, conceptual framework, correlation does not imply causation, David Heinemeier Hansson, deliberate practice, Elon Musk, Fellow of the Royal Society, Filter Bubble, Google X / Alphabet X, hive mind, index card, index fund, Isaac Newton, job satisfaction, Khan Academy, Law of Accelerating Returns, Lean Startup, Mahatma Gandhi, meta analysis, meta-analysis, pattern recognition, Peter Thiel, popular electronics, Ray Kurzweil, Richard Florida, Ronald Reagan, Ruby on Rails, Saturday Night Live, self-driving car, side project, Silicon Valley, Steve Jobs

So DHH built a layer on top of Ruby to automate all the repetitive tasks and arbitrary decisions he didn’t want taking up his time. (It didn’t really matter what he named his databases.) His new layer on top of programming’s pavement became a set of railroad tracks that made creating a Ruby application faster. He called it Ruby on Rails. Rails helped DHH build his project—which 37signals named Basecamp—faster than he could have otherwise. But he wasn’t prepared for what happened next. When he shared Ruby on Rails on the Internet, programmers fell in love with it. Rails was easier than regular programming, but just as powerful, so amateurs downloaded it by the thousands. Veteran coders murmured about “real programming,” but many made the switch because Rails allowed them to build their projects faster. The mentality behind Rails caught on.

For detailed reading on the subject, I suggest Timothy R. Colburn, Philosophy and Computer Science (M. E. Sharpe, 1999), chapter 11. If you’re really hungry, the books in this list will keep you going for a while: “A Reading List for the Self-Taught Computer Scientist,” Reddit, http://www.reddit.com/r/books/comments/ch0wt/a_reading_list_for_the_selftaught_computer/ (accessed February 16, 2014). 85 He called it Ruby on Rails: For more information on Ruby on Rails, see http://rubyonrails.org/. 85 a couple of guys at a podcasting startup: For a thorough and dramatic history of Twitter, see Nick Bilton, Hatching Twitter: A True Story of Money, Power, Friendship, and Betrayal (Portfolio, 2013). 86 “standing on the shoulders of giants”: The common contemporary quotation comes from a line in one of Sir Isaac Newton’s letters to Robert Hooke: “If I have seen further, it is by standing on ye shoulders of Giants,” Newton, letter to Hooke, February 5, 1676, http://www.isaacnewton.org.uk/essays/Giants.

The mentality behind Rails caught on. People started building add-ons, so that others wouldn’t have to reinvent the process of coding common things like website sign-up forms or search tools. They called these “gems” and shared them around. Each contribution saved the next programmer work. Suddenly, people were using Ruby on Rails to solve all sorts of problems they hadn’t previously tackled with programming. A toilet company in Minnesota revamped its accounting system with it. A couple in New Jersey built a social network for yarn enthusiasts. Rails was so friendly that more people became programmers. In 2006 a couple of guys at a podcasting startup had an idea for a side project. With Rails, they were able to build it in a few days—as an experiment—while running their business. They launched it to see what would happen.


pages: 292 words: 81,699

More Joel on Software by Joel Spolsky

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

a long time ago in a galaxy far, far away, barriers to entry, Black Swan, Build a better mousetrap, business process, call centre, Danny Hillis, David Heinemeier Hansson, failed state, Firefox, fixed income, George Gilder, Larry Wall, low cost carrier, Mars Rover, Network effects, Paul Graham, performance metric, place-making, price discrimination, prisoner's dilemma, Ray Oldenburg, Ruby on Rails, Sand Hill Road, Silicon Valley, slashdot, social software, Steve Ballmer, Steve Jobs, Superbowl ad, The Great Good Place, type inference, unpaid internship, wage slave, web application, Y Combinator

A story that allows for words like passion and enthusiasm to be part of the sanctioned vocabulary of developers without the need to make excuses for yourself. Or feel embarrassed about really liking what you do” (www.loudthinking.com/ arc/2006_08.html). Elevating a web programming framework to a thing of “beauty, happiness, and motivation” may seem like hubris, but it’s very appealing and sure differentiates their company. In propagating the narrative of Ruby on Rails as Happiness, they’re practically guaranteeing that at least some developers out there will be looking for Ruby on Rails jobs. 32 More from Joel on Software But 37signals is still new at this identity management campaign thing. They don’t hold a candle to Apple Computer, which, with a single Superbowl ad in 1984, managed to cement their position to this day as the countercultural force of freedom against dictatorship, of liberty against oppression, of colors against black and white, of pretty women in bright red shorts against brainwashed men in suits.

That’s the stereotype, anyway, so to keep the best developers, investment banks have two strategies: paying a ton of money and allowing programmers basically free rein to keep rewriting everything over and over again in whatever hot new programming language they feel like learning. Wanna rewrite that whole trading app in Lisp? Whatever. Just get me a goddamned cheeseburger. Some programmers couldn’t care less about what programming language they’re using, but most would just love to have the opportunity to work with exciting new technologies. Today that may be Python or Ruby on Rails; three years ago it was C# and before that Java. Now, I’m not telling you not to use the best tool for the job, and I’m not telling you to rewrite in the hot language-du-jour every two years, but if you can find ways for developers to get experience with newer languages, frameworks, and technologies, they’ll be happier. Even if you don’t dare rewrite your core application, is there any reason your internal tools, or less-critical new applications, can’t be written in an exciting new language as a learning project?

Other companies line up with social causes, or produce a product which, in some way, can be perceived or framed as benefitting society. As a recruiter, your job is to identify the idealistic aspects of your company and make sure candidates are aware of them. Some companies even strive to create their own ideological movements. Chicago-area startup 37signals has strongly aligned themselves with the idea of simplicity: simple, easy to use apps like Backpack and the simple, easy-to-use programming framework Ruby on Rails. For 37signals, simplicity is an “-ism,” practically an international political movement. Simplicity is not just simplicity, oh no, it’s summertime, it’s beautiful music and peace and justice and happiness and pretty girls with flowers in their hair. David Heinemeier Hansson, the creator of Rails, says that their story is “one of beauty, happiness, and motivation. Taking pride and pleasure in your work and in your tools.


pages: 323 words: 65,306

Programming in CoffeeScript by Mark Bates

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

don't repeat yourself, en.wikipedia.org, MVC pattern, node package manager, Ruby on Rails, single page application, web application

His career started as a UI developer writing HTML and JavaScript applications before moving toward the middle(ware) with Java and Ruby. Nowadays, Mark spends his days cheating on Ruby with his new mistress, CoffeeScript. Always wanting to share his wisdom, or more correctly just wanting to hear the sound of his own voice, Mark has spoken at several high-profile conferences, including RubyConf, RailsConf, and jQueryConf. Mark has also taught classes on Ruby and Ruby on Rails. In 2009 Mark’s first (surprisingly not his last!) book, Distributed Programming with Ruby, was published by Addison-Wesley. Mark lives just outside of Boston with his wife, Rachel, and their two sons, Dylan and Leo. Mark can be found on the web at: http://www.markbates.com, http://twitter.com/markbates, and http://github.com/markbates. preface I started my professional development career in 1999, when I first was paid a salary to be a developer.

I used it on a project for a client to try it out to see whether it was worth the xvi Programming in CoffeeScript little bit of hype I was hearing. Unfortunately, at the time two things caused me to push it aside. The first was that it was still not quite ready for prime time. There were too many bugs and missing features. The second reason why I didn’t use CoffeeScript was because the app I was trying it out on wasn’t a very JavaScript-heavy application. I was mostly doing a few validation checks and an occasional bit of AJAX, which Ruby on Rails9 helped me do with very little, if any, JavaScript code. So what made me come back to CoffeeScript? Some six months after I had tried out CoffeeScript for the first time, it was announced10 that Rails 3.1 would ship with CoffeeScript as the default JavaScript engine. Like most developers I was taken aback by this. I had tried CoffeeScript and didn’t think it was that great. What were they thinking?

Notes 1. http://www.metabates.com/2010/07/01/testing-is-not-an-option/ 2. http://en.wikipedia.org/wiki/Test-driven_development 3. http://www.metabates.com/2010/10/12/how-to-become-a-test-driven-developer/ 4. http://pivotal.github.com/jasmine/ 5. https://github.com/rspec/rspec 6. http://docs.jquery.com/QUnit 7. http://code.google.com/p/js-test-driver/ 8. http://yuilibrary.com/yui/docs/test/ 9. http://johnbintz.github.com/jasmine-headless-webkit/ 10. http://nodejs.org 11. https://github.com/pivotal/jasmine/wiki/Matchers 12. http://github.com 191 This page intentionally left blank 9 Intro to Node.js O ver the past year or so, a platform written by Joyent1 has been taking the web development world by storm. This platform is called Node.js,2 commonly referred to as Node (and will be from here on). Tip If you don’t believe that Node is taking the web development world by storm, just ask companies like LinkedIn,3 who announced in 2011 that it had rewritten its API from Ruby on Rails4 to Node. That’s a pretty big endorsement. So what is Node exactly, and why are we talking about it in a CoffeeScript book? In this chapter, you’ll find out. What Is Node.js? Node is an implementation of server-side JavaScript that sits atop Google’s V85 JavaScript engine. Node is part framework, runtime, and language. Because of that, people are sometimes confused about what exactly Node is and when and why they should use it.


pages: 224 words: 48,804

The Productive Programmer by Neal Ford

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

anti-pattern, business process, c2.com, continuous integration, database schema, domain-specific language, don't repeat yourself, Firefox, general-purpose programming language, knowledge worker, Larry Wall, Ruby on Rails, side project, type inference, web application, William of Occam

.* It offers sophisticated features such as “pinning” applications to a certain desktop (meaning that application will appear only on that desktop, and the focus will change to that desktop if you select that application). This is a great feature for developers, who typically set up certain desktops for specific purposes (development, documentation, debugging, etc.). * Download at 48 http://virtuedesktops.info/. CHAPTER 3: FOCUS FIGURE 3-4. Managing desktops with Virtual Desktop Manager One of my recent projects was a Ruby on Rails gig where we were pair-programming on Mac Minis (the little smaller-than-a-breadbox machines that you buy without a monitor or keyboard). They make surprisingly good development machines, especially with two keyboards, mice, and monitors. What made them great environments, though, were the virtual desktops. We had each machine set up the same way (to preserve sanity as we swapped pairs), with all the development tools on one desktop, documentation on another, and the running application (a terminal window running the web server in debug mode and browser) on a third.

Lots of projects treat source code and SQL as completely separate artifacts, sometimes created by entirely separate groups of developers. Yet, for the source code to function correctly, it must rely on a certain version of the database schema and data. There are a couple of ways to solve this problem, one framework is specific and the other was designed to work across frameworks and languages. NOTE Always keep code and schemas in sync. Rake migrations One of the many cool things about the Ruby on Rails web development framework is the idea of migrations. A migration is a Ruby source file that handles versioning your database schemas, helping keep them in sync with your source code. Presumably, you’ll make database changes (both in schema and test data) at the same time you make code changes. Managing your database via migrations allows you to check both changes into version control at the same time, enabling your version control to act as the keeper of snapshots of code + data.

Panopticode’s tree map of CruiseControl’s cyclomatic complexity Analysis for Dynamic Languages While dynamic languages are considered more productive in many development scenarios, they lack the kinds of analysis tools that exist for statically typed languages. Building analysis tools for dynamic languages is more difficult because you don’t have the characteristics of the type system to lean upon. Most of the efforts in the dynamic language world center around cyclomatic complexity (which is universal in virtually every block-based language) and code coverage. For example, in the Ruby world, rcov is a commonly used code coverage tool. In fact, Ruby on Rails comes with rcov preconfigured (you can see an rcov report in Figure 15-1). For cyclomatic complexity, you can use the open source Saikuro.† † Download at 116 http://saikuro.rubyforge.org/. CHAPTER 7: STATIC ANALYSIS Because of the lack of “traditional” static analysis tools, Ruby developers have gotten clever. A couple of interesting projects have emerged to measure code quality in nontraditional ways.


Terraform: Up and Running: Writing Infrastructure as Code by Yevgeniy Brikman

Amazon Web Services, cloud computing, DevOps, en.wikipedia.org, full stack developer, general-purpose programming language, Ruby on Rails

The EC2 Instance now has a name tag Deploy a single web server The next step is to run a web server on this Instance. The goal is to deploy the sim‐ plest web architecture possible: a single web server that can respond to HTTP requests, as shown in Figure 2-6. Deploy a single web server | 53 Figure 2-6. Start with a simple architecture: a single web server running in AWS that responds to HTTP requests In a real-world use case, you’d probably build the web server using a web framework like Ruby on Rails or Django, but to keep this example simple, let’s run a dirt-simple web server that always returns the text “Hello, World”:7 #!/bin/bash echo "Hello, World" > index.html nohup busybox httpd -f -p 8080 & This is a bash script that writes the text “Hello, World” into index.html and runs a tool called busybox (which is installed by default on Ubuntu) to fire up a web server on port 8080 to serve that file.

File layout | 83 • global: A place to put resources that are used across all environments, such as user management (e.g. S3, IAM). Within each environment, there are separate folders for each “component.” The com‐ ponents differ for every project, but the typical ones are: • vpc: The network topology for this environment. • services: The apps or microservices to run in this environment, such as a Ruby on Rails frontend or a Scala backend. Each app could even live in its own folder to isolate it from all the other apps. • data-storage: The data stores to run in this environment, such as MySQL or Redis. Each data store could even live in its own folder to isolate it from all other data stores. Within each component, there are the actual Terraform templates, which are organ‐ ized according to the following naming conventions: • vars.tf: Input variables. • outputs.tf: Output variables. • main.tf: The actual resources. • .terragrunt: Locking and remote state configuration for Terragrunt.

If you deploy this cluster using terragrunt apply, wait for the Instances to register in the ELB, and open the ELB URL in a web browser, you’ll see something similar to Figure 3-6. 94 | Chapter 3: How to manage Terraform state Figure 3-6. The web server cluster can programmatically access the database address and port Yay, your web server cluster can now programmatically access the database address and port via Terraform! If you were using a real web framework (e.g. Ruby on Rails), you could set the address and port as environment variables or write them to a config file so they could be used by your database library (e.g. ActiveRecord) to talk to the database. Conclusion The reason you need to put so much thought into isolation, locking, and state is that infrastructure as code (IAC) has different trade-offs than normal coding. When you’re writing code for a typical app, most bugs are relatively minor and only break a small part of a single app.


pages: 408 words: 63,990

Build Awesome Command-Line Applications in Ruby: Control Your Computer, Simplify Your Life by David B. Copeland

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Chris Wanstrath, database schema, en.wikipedia.org, full stack developer, Ruby on Rails, web application

'gem help install')​ ​ gem server present a web page at​ ​ http://localhost:8808/​ ​ with info about installed gems​ ​ Further information:​ ​ http://rubygems.rubyforge.org​ This is just a small part of the very complete documentation available, and it’s all there, right from the command line. It’s clear that a lot of thought was put into making this tool polished; this was no one-off, hacky script. Much like the design philosophy of Ruby on Rails, there was clear care given to the user experience of the programmer. These tools aren’t one-off scripts someone pieced together; they are made for “real” work. What this told me was that the command line is far from the anachronism that Java tool vendors would have us believe; it’s here to stay. The future of development won’t just be manipulating buttons and toolbars and dragging and dropping icons to create code; the efficiency and productivity inherent to a command-line interface will always have a place in a good developer’s tool chest.

Such dependencies range from testing libraries like RSpec to rake itself. Developers should be able to install all the gems they need with one command and get up and running as easily as possible. This will save you time in documenting the setup and make it easier for developers to contribute. We can specify these dependencies in the gemspec and manage their installation with Bundler.[42] Bundler was created to help manage the dependencies for Ruby on Rails projects, but it’s a general-purpose tool and will work great for us. It’s also what most seasoned Rubyists will expect. First, let’s specify our development dependencies. Although rake and RDoc are typically installed with Ruby, their inclusion is not guaranteed, and users might not necessarily have the versions of these tools that we require. Let’s add them explicitly as development dependencies to our gemspec by way of add_development_dependency: ​Gem::Specification.new do |s|​ ​ s.name = "todo"​ ​ s.version = "0.0.1"​ ​​ ​ # Rest of the gemspec...​ ​​ ​

Footnotes [40] https://github.com/cwninja/geminabox [41] https://github.com/lutter/gem2rpm [42] http://gembundler.com [43] http://rdoc.sourceforge.net/doc/index.html [44] http://www.github.com Copyright © 2012, The Pragmatic Bookshelf. Chapter 8 Test, Test, Test Writing perfect code isn’t easy. It might even be impossible. That’s why seasoned developers—including command-line application developers—write tests. Tests are the best tool we have to make sure our applications perform flawlessly, and the Ruby community is especially friendly to testing, thanks to the culture and tools established by Ruby on Rails. Command-line applications often interact with various systems and environments, which produces a unique set of challenges for testing. If you’ve done any web application development, you are probably accustomed to having different “tiers,” such as a development tier and a testing tier. These tiers are complete systems, often using many servers to provide an environment for isolated testing.


pages: 313 words: 75,583

Ansible for DevOps: Server and Configuration Management for Humans by Jeff Geerling

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Amazon Web Services, Any sufficiently advanced technology is indistinguishable from magic, cloud computing, continuous integration, database schema, Debian, defense in depth, DevOps, fault tolerance, Firefox, full text search, Google Chrome, inventory management, loose coupling, Minecraft, Ruby on Rails, web application

Ansible Examples Other resources Chapter 1 - Getting Started with Ansible Ansible and Infrastructure Management On snowflakes and shell scripts Configuration management Installing Ansible Creating a basic inventory file Running your first Ad-Hoc Ansible command Summary Chapter 2 - Local Infrastructure Development: Ansible and Vagrant Prototyping and testing with local virtual machines Your first local server: Setting up Vagrant Using Ansible with Vagrant Your first Ansible playbook Summary Chapter 3 - Ad-Hoc Commands Conducting an orchestra Build infrastructure with Vagrant for testing Inventory file for multiple servers Your first ad-hoc commands Discover Ansible’s parallel nature Learning about your environment Make changes using Ansible modules Configure groups of servers, or individual servers Configure the Application servers Configure the Database servers Make changes to just one server Manage users and groups Manage files and directories Get information about a file Copy a file to the servers Retrieve a file from the servers Create directories and files Delete directories and files Run operations in the background Update servers asynchronously, monitoring progress Fire-and-forget tasks Check log files Manage cron jobs Deploy a version-controlled application Ansible’s SSH connection history Paramiko OpenSSH (default) Accelerated Mode Faster OpenSSH in Ansible 1.5+ Summary Chapter 4 - Ansible Playbooks Power plays Running Playbooks with ansible-playbook Limiting playbooks to particular hosts and groups Setting user and sudo options with ansible-playbook Other options for ansible-playbook Real-world playbook: CentOS Node.js app server Add extra repositories Deploy a Node.js app Launch a Node.js app Node.js app server summary Real-world playbook: Ubuntu LAMP server with Drupal Include a variables file, and discover pre_tasks and handlers Basic LAMP server setup Configure Apache Configure PHP with lineinfile Configure MySQL Install Composer and Drush Install Drupal with Git and Drush Drupal LAMP server summary Real-world playbook: Ubuntu Apache Tomcat server with Solr Include a variables file, and discover pre_tasks and handlers Install Apache Tomcat 7 Install Apache Solr Apache Solr server summary Summary Chapter 5 - Ansible Playbooks - Beyond the Basics Handlers Environment variables Per-play environment variables Variables Playbook Variables Inventory variables Registered Variables Accessing Variables Host and Group variables group_vars and host_vars Magic variables with host and group variables and information Facts (Variables derived from system information) Local Facts (Facts.d) Variable Precedence If/then/when - Conditionals Jinja2 Expressions, Python built-ins, and Logic register when changed_when and failed_when ignore_errors Delegation, Local Actions, and Pauses Pausing playbook execution with wait_for Running an entire playbook locally Prompts Tags Summary Chapter 6 - Playbook Organization - Roles and Includes Includes Handler includes Playbook includes Complete includes example Roles Role scaffolding Building your first role More flexibility with role vars and defaults Other role parts: handlers, files, and templates Handlers Files and Templates Organizing more complex and cross-platform roles Ansible Galaxy Getting roles from Galaxy Using role requirements files to manage dependencies A LAMP server in six lines of YAML A Solr server in six lines of YAML Helpful Galaxy commands Contributing to Ansible Galaxy Summary Chapter 7 - Inventories A real-world web application server inventory Non-prod environments, separate inventory files Inventory variables host_vars group_vars Ephemeral infrastructure: Dynamic inventory Dynamic inventory with DigitalOcean DigitalOcean account prerequisites Connecting to your DigitalOcean account Creating a droplet with Ansible DigitalOcean dynamic inventory with digital_ocean.py Dynamic inventory with AWS Inventory on-the-fly: add_host and group_by Multiple inventory sources - mixing static and dynamic inventories Creating custom dynamic inventories Summary Chapter 8 - Ansible Cookbooks Highly-Available Infrastructure with Ansible Directory Structure Individual Server Playbooks Main Playbook for Configuring All Servers Getting the required roles Vagrantfile for Local Infrastructure via VirtualBox Provisioner Configuration: DigitalOcean Provisioner Configuration: Amazon Web Services (EC2) Summary ELK Logging with Ansible ELK Playbook Forwarding Logs from Other Servers Summary GlusterFS Distributed File System Configuration with Ansible Configuring Gluster - Basic Overview Configuring Gluster with Ansible Summary Mac Provisioning with Ansible and Homebrew Running Ansible playbooks locally Automating Homebrew package and app management Configuring Mac OS X through dotfiles Summary Docker-based Infrastructure with Ansible A brief introduction to Docker containers Using Ansible to build and manage containers Building a Flask app with Ansible and Docker Data storage container Flask container MySQL container Ship it! Summary Chapter 9 - Deployments with Ansible Deployment strategies Simple single-server deployments Provisioning a simple Ruby on Rails server Deploying a Rails app to the server Provisioning and Deploying the Rails App Deploying application updates Zero-downtime multi-server deployments Ensuring zero downtime with serial and integration tests Deploying to app servers behind a load balancer Capistrano-style and blue-green deployments Additional Deployment Scenarios Summary Chapter 10 - Server Security and Ansible A brief history of SSH and remote access Telnet rlogin, rsh and rcp SSH The evolution of SSH and the future of remote access Use secure and encrypted communication Disable root login and use sudo Remove unused software, open only required ports Use the principle of least privilege User account configuration File permissions Update the OS and installed software Automating updates Automating updates for RedHat-based systems Automating updates for Debian-based systems Use a properly-configured firewall Configuring a firewall with ufw on Debian or Ubuntu Configuring a firewall with firewalld on RedHat, Fedora, or CentOS Make sure log files are populated and rotated Monitor logins and block suspect IP addresses Use SELinux (Security-Enhanced Linux) or AppArmor Summary and further reading Chapter 11 - Automating Your Automation - Ansible Tower and CI/CD Ansible Tower Getting and Installing Ansible Tower Using Ansible Tower Other Tower Features of Note Tower Alternatives Jenkins CI Unit, Integration, and Functional Testing Debugging and Asserting Checking syntax and performing dry runs Automated testing on GitHub using Travis CI Setting up a role for testing Testing the role’s syntax Role success - first run Role idempotence Role success - final result Some notes about Travis CI Real-world examples Automated testing with test-runner Functional testing using serverspec Summary Appendix A - Using Ansible on Windows workstations Prerequisites Set up an Ubuntu Linux Virtual Machine Log into the Virtual Machine Install Ansible Summary Appendix B - Ansible Best Practices and Conventions Playbook Organization Write comments and use name liberally Include related variables and tasks Use Roles to bundle logical groupings of configuration YAML Conventions and Best Practices YAML for Ansible tasks Three ways to format Ansible tasks Shorthand/one-line (key=value) Structured map/multi-line (key:value) Folded scalars/multi-line (>) Using | to format multiline variables Using ansible-playbook Use Ansible Tower Specify --forks for playbooks running on > 5 servers Use Ansible’s Configuration file Summary Appendix C - Jinja2 and Ansible Summary Changelog Version 0.94 (2015-05-16) Version 0.92 (2015-04-09) Version 0.90 (2015-03-16) Version 0.89 (2015-02-26) Version 0.88 (2015-02-13) Version 0.87 (2015-02-01) Version 0.84 (2015-01-27) Version 0.81 (2015-01-11) Version 0.75 (2014-12-23) Version 0.73 (2014-12-09) Version 0.71 (2014-11-27) Version 0.70 (2014-11-16) Version 0.64 (2014-10-24) Version 0.62 (2014-10-07) Version 0.60 (2014-09-30) Version 0.58 (2014-08-01) Version 0.56 (2014-07-20) Version 0.54 (2014-07-02) Version 0.53 (2014-06-28) Version 0.52 (2014-06-14) Version 0.50 (2014-05-05) Version 0.49 (2014-04-24) Version 0.47 (2014-04-13) Version 0.44 (2014-04-04) Version 0.42 (2014-03-25) Version 0.38 (2014-03-11) Version 0.35 (2014-02-25) Version 0.33 (2014-02-20) Preface Growing up, I had access to a world that not many kids ever get to enter.

Simple single-server deployments The vast majority of small applications and websites are easily run on a single virtual machine or dedicated server. Using Ansible to provision and manage the configuration on the server is a no-brainer. Even though you only have to manage one server, it’s better to encapsulate all the setup so you don’t end up with a snowflake server. In this instance, we are managing a very simple Ruby on Rails site that allows users to perform CRUD operations on articles (very simple database records with a title and body). The code repository for this app is located on GitHub at https://github.com/geerlingguy/demo-rails-app. To make testing simple, we’ll begin by creating a new Vagrant VM using the following Vagrantfile: 1 # -*- mode: ruby -*- 2 # vi: set ft=ruby : 3 4 Vagrant.configure(2) do |config| 5 config.vm.box = "geerlingguy/ubuntu1404" 6 7 config.vm.provider "virtualbox" do |v| 8 v.name = "rails-demo" 9 v.memory = 1024 10 v.cpus = 2 11 end 12 13 config.vm.hostname = "rails-demo" 14 config.vm.network :private_network, ip: "192.168.33.7" 15 16 config.vm.provision "ansible" do |ansible| 17 ansible.playbook = "playbooks/main.yml" 18 ansible.sudo = true 19 end 20 21 end In this case, we have a very simple VM that will be accessible at the IP address 192.168.33.7, and when provisioned, it will run the Ansible playbook defined in playbooks/main.yml.

To make testing simple, we’ll begin by creating a new Vagrant VM using the following Vagrantfile: 1 # -*- mode: ruby -*- 2 # vi: set ft=ruby : 3 4 Vagrant.configure(2) do |config| 5 config.vm.box = "geerlingguy/ubuntu1404" 6 7 config.vm.provider "virtualbox" do |v| 8 v.name = "rails-demo" 9 v.memory = 1024 10 v.cpus = 2 11 end 12 13 config.vm.hostname = "rails-demo" 14 config.vm.network :private_network, ip: "192.168.33.7" 15 16 config.vm.provision "ansible" do |ansible| 17 ansible.playbook = "playbooks/main.yml" 18 ansible.sudo = true 19 end 20 21 end In this case, we have a very simple VM that will be accessible at the IP address 192.168.33.7, and when provisioned, it will run the Ansible playbook defined in playbooks/main.yml. Provisioning a simple Ruby on Rails server To prepare for our application deployment, we need to do the following: Install git (our application is version controlled in a git repository). Install Node.js (asset compilation requires it’s Javascript runtime). Install Ruby (our application requires version 2.2.0 or later). Install Passenger with Nginx (we need a fast web server to run our rails application). Install any other dependencies, and prepare the server for deployment.


pages: 102 words: 27,769

Rework by Jason Fried, David Heinemeier Hansson

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

call centre, Clayton Christensen, Dean Kamen, Exxon Valdez, fault tolerance, James Dyson, Jeff Bezos, Ralph Nader, risk tolerance, Ruby on Rails, Steve Jobs, Tony Hsieh, Y Combinator

Highrise, our contact manager and simple CRM (customer relationship management) tool, is used by tens of thousands of small businesses to keep track of leads, deals, and more than 10 million contacts. More than 500,000 people have signed up for Backpack, our intranet and knowledge-sharing tool. And people have sent more than 100 million messages using Campfire, our real-time business chat tool. We also invented and open-sourced a computer-programming framework called Ruby on Rails that powers much of the Web 2.0 world. Some people consider us an Internet company, but that makes us cringe. Internet companies are known for hiring compulsively, spending wildly, and failing spectacularly. That’s not us. We’re small (sixteen people as this book goes to press), frugal, and profitable. A lot of people say we can’t do what we do. They call us a fluke. They advise others to ignore our advice.

Campfire www.campfirenow.com Real-time chat and file and code sharing for remote teams. Ta-da List www.tadalist.com Ta-da List makes it easy to create and share your to-do’s. Writeboard www.writeboard.com Writeboard is a collaborative writing tool. Getting Real gettingreal.37signals.com This book by 37signals will help you discover the smarter, faster, easier way to build a successful Web-based application. Ruby on Rails www.rubyonrails.org An open-source Web framework created by 37signals. Acknowledgments Very special thanks go to Matthew Linderman. Matt was 37signals’ first employee in 1999—and he’s still with the company today. This book wouldn’t have come together without Matt. In addition to writing original content, he helped merge the distinctly different writing styles of the coauthors into a focused, cohesive book.


pages: 470 words: 109,589

Apache Solr 3 Enterprise Search Server by Unknown

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

bioinformatics, continuous integration, database schema, en.wikipedia.org, fault tolerance, Firefox, full text search, information retrieval, Internet Archive, natural language processing, performance metric, platform as a service, Ruby on Rails, web application

Acquia's hosted search product is a great example of Platform as a Service (PaaS), and hosted Solr search is a very common integration approach for many organizations that don't wish to manage their own Java infrastructure or need to customize the behavior of Solr drastically. For a list of all the companies offering hosted Solr search please visit http://wiki.apache.org/solr/SolrHostingProviders. Ruby on Rails integrations There has been a lot of churn in the Ruby on Rails world for adding Solr support, with a number of competing libraries attempting to support Solr in the most Rails-native way. Rails brought to the forefront the idea of Convention over Configuration, the principle that sane defaults and simple rules should suffice in most situations versus complex configuration expressed in long XML files. The various libraries for integrating Solr in Ruby on Rails applications establish conventions in how they interact with Solr. However, often there are a lot of conventions to learn, such as suffixing String object field names with _s to match up with the dynamic field definition for String in Solr's schema.xml.

This chapter is structured as follows: Communicating with Solr Sending data in Solr's Update-XML format Commit, optimize, rollback, and deleting Sending data in CSV format Direct database and XML import through Solr's DataImportHandler (the DIH) Extracting text from rich documents through Solr's ExtractingRequestHandler (also known as Solr Cell) Document post-processing with UpdateRequestProcessors You will also find some related options in Chapter 9, Integrating Solr that have to do with language bindings and framework integration, including a web crawler. Most use Solr's Update-XML format. In a hurry? There are many approaches to get data into Solr and you don't need to be well versed in all of them. The section on commit and optimize is important for everyone because it is universal. If you plan to use a Solr integration framework that handles indexing data, such as Sunspot for Ruby on Rails, then you can follow the documentation for that framework and skip this chapter for now. Otherwise, the DataImportHandler will likely satisfy your needs. Communicating with Solr There are quite a few options in communicating with Solr to import data. In this section we'll look at a few choices to be made, and then follow up with interaction examples. Details on specific formats such as Solr's Update-XML comes later.

ajaxsolr is an example of building a fully featured Solr Search UI using just JavaScript. php is a barebones example of PHP integration with Solr. solr-php-client is a richer example of integrating Solr results into a PHP based application. Solritas, a web search UI using template files in the /cores/mbtypes/conf/velocity directory. jquery_autocomplete is an example of using the jQuery Autocomplete library to provide search suggestions based on Solr searches. myfaves is a Ruby on Rails application using the Ruby Solr client library Sunspot to search for music artists. nutch is a simple example of the Nutch web crawler integrated with Solr. crawler is a more complex example of doing web crawling and indexing into Solr using the SolrJ Java client and Heritrix crawler. Solritas, the integrated search UI The contrib module velocity, nicknamed Solritas, is a simple template engine that lets you build user interfaces directly in Solr using Apache Velocity, a very simple macro language to generate the HTML.


pages: 420 words: 79,867

Developing Backbone.js Applications by Addy Osmani

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Airbnb, anti-pattern, create, read, update, delete, database schema, don't repeat yourself, Firefox, full text search, Google Chrome, Khan Academy, loose coupling, MVC pattern, node package manager, pull request, Ruby on Rails, side project, single page application, web application

Once the request initiator (e.g. a browser) gets a response the connection is closed. This fact creates a completely different context when compared to one of the operating systems on which many of the original MVC ideas were developed. The MVC implementation has to conform to the web context. An example of a server-side web application framework which tries to apply MVC to the web context is Ruby On Rails. At its core are the three MVC components we would expect - the Model, View and Controller architecture. In Rails: Models represent the data in an application and are typically used to manage rules for interacting with a specific database table. You generally have one table corresponding to one model with much of your application’s business logic living within these models. Views represent your user interface, often taking the form of HTML that will be sent down to the browser.

Controllers In our Todo application, a Controller would be responsible for handling changes the user made in the edit View for a particular Todo, updating a specific Todo Model when a user has finished editing. It’s with Controllers that most JavaScript MVC frameworks depart from the traditional interpretation of the MVC pattern. The reasons for this vary, but in my opinion, JavaScript framework authors likely initially looked at server-side interpretations of MVC (such as Ruby on Rails), realized that the approach didn’t translate 1:1 on the client-side, and so re-interpreted the C in MVC to solve their state management problem. This was a clever approach, but it can make it hard for developers coming to MVC for the first time to understand both the classical MVC pattern and the “proper” role of Controllers in other JavaScript frameworks. So does Backbone.js have Controllers?

Since all persistence is handled by the Backbone.sync function, an alternative persistence layer can be used by simply overriding Backbone.sync with a function that has the same signature: Backbone.sync = function(method, model, options) { }; The methodMap below is used by the standard sync implementation to map the method parameter to an HTTP operation and illustrates the type of action required by each method argument: var methodMap = { 'create': 'POST', 'update': 'PUT', 'patch': 'PATCH', 'delete': 'DELETE', 'read': 'GET' }; If we wanted to replace the standard sync implementation with one that simply logged the calls to sync, we could do this: var id_counter = 1; Backbone.sync = function(method, model) { console.log("I've been passed " + method + " with " + JSON.stringify(model)); if(method === 'create'){ model.set('id', id_counter++); } }; Note that we assign a unique id to any created models. The Backbone.sync method is intended to be overridden to support other persistence backends. The built-in method is tailored to a certain breed of RESTful JSON APIs - Backbone was originally extracted from a Ruby on Rails application, which uses HTTP methods like PUT in the same way. The sync method is called with three parameters: method: One of create, update, patch, delete, or read model: The Backbone model object options: May include success and error methods Implementing a new sync method can use the following pattern: Backbone.sync = function(method, model, options) { function success(result) { // Handle successful results from MyAPI if (options.success) { options.success(result); } } function error(result) { // Handle error results from MyAPI if (options.error) { options.error(result); } } options || (options = {}); switch (method) { case 'create': return MyAPI.create(model, success, error); case 'update': return MyAPI.update(model, success, error); case 'patch': return MyAPI.patch(model, success, error); case 'delete': return MyAPI.destroy(model, success, error); case 'read': if (model.cid) { return MyAPI.find(model, success, error); } else { return MyAPI.findAll(model, success, error); } } }; This pattern delegates API calls to a new object (MyAPI), which could be a Backbone-style class that supports events.

Deep Work: Rules for Focused Success in a Distracted World by Cal Newport

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

8-hour work day, Albert Einstein, barriers to entry, business climate, Cal Newport, Capital in the Twenty-First Century by Thomas Piketty, Clayton Christensen, David Brooks, David Heinemeier Hansson, deliberate practice, Donald Knuth, Donald Trump, Downton Abbey, en.wikipedia.org, Erik Brynjolfsson, experimental subject, follow your passion, Frank Gehry, informal economy, information retrieval, Internet Archive, Jaron Lanier, knowledge worker, Mark Zuckerberg, Marshall McLuhan, Merlin Mann, Nate Silver, new economy, Nicholas Carr, popular electronics, remote working, Richard Feynman, Richard Feynman, Ruby on Rails, Silicon Valley, Silicon Valley startup, Snapchat, statistical model, the medium is the message, Watson beat the top human players on Jeopardy!, web application, winner-take-all economy, zero-sum game

Now consider the second core ability from the list shown earlier: producing at an elite level. If you want to become a superstar, mastering the relevant skills is necessary, but not sufficient. You must then transform that latent potential into tangible results that people value. Many developers, for example, can program computers well, but David Hansson, our example superstar from earlier, leveraged this ability to produce Ruby on Rails, the project that made his reputation. Ruby on Rails required Hansson to push his current skills to their limit and produce unambiguously valuable and concrete results. This ability to produce also applies to those looking to master intelligent machines. It wasn’t enough for Nate Silver to learn how to manipulate large data sets and run statistical analyses; he needed to then show that he could use this skill to tease information from these machines that a large audience cared about.

Less than a year later, ESPN and ABC News lured Silver away from the Times (which tried to retain him by promising a staff of up to a dozen writers) in a major deal that would give Silver’s operation a role in everything from sports to weather to network news segments to, improbably enough, Academy Awards telecasts. Though there’s debate about the methodological rigor of Silver’s hand-tuned models, there are few who deny that in 2012 this thirty-five-year-old data whiz was a winner in our economy. Another winner is David Heinemeier Hansson, a computer programming star who created the Ruby on Rails website development framework, which currently provides the foundation for some of the Web’s most popular destinations, including Twitter and Hulu. Hansson is a partner in the influential development firm Basecamp (called 37signals until 2014). Hansson doesn’t talk publicly about the magnitude of his profit share from Basecamp or his other revenue sources, but we can assume they’re lucrative given that Hansson splits his time between Chicago, Malibu, and Marbella, Spain, where he dabbles in high-performance race-car driving.


pages: 468 words: 233,091

Founders at Work: Stories of Startups' Early Days by Jessica Livingston

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

8-hour work day, affirmative action, AltaVista, Apple II, Brewster Kahle, business process, Byte Shop, Danny Hillis, David Heinemeier Hansson, don't be evil, fear of failure, financial independence, Firefox, full text search, game design, Googley, HyperCard, illegal immigration, Internet Archive, Jeff Bezos, Justin.tv, Larry Wall, Maui Hawaii, Menlo Park, nuclear winter, Paul Buchheit, Paul Graham, Peter Thiel, Richard Feynman, Richard Feynman, Robert Metcalfe, Ruby on Rails, Sand Hill Road, side project, Silicon Valley, slashdot, social software, software patent, South of Market, San Francisco, Startup school, stealth mode startup, Steve Ballmer, Steve Jobs, Steve Wozniak, web application, Y Combinator

VisiCorp), 73, 76, 89–91 personnel decisions, 66–67 Phillips, 182, 199 Phoenix, 395 Phone Boy, 64 photographs, 259 Photoshop, 290 PLATO Notes, 103 podcasting company, 111 PointCast, 155 Polese, Kim, 155–156 pornography, 136 PostScript, 281, 287, 289 Powazek, Derek, 117 PR campaign, 21 President’s Award, 159 product development, 15, 154–155, 176 product distribution, 175 product naming, 8 Professor Jackson, 80 program guide, 196, 198 programmable gate array, 175 programmers, 166, 324–325 project management, 310 Pryor, Michael, 345 public relations, 137–138 Pyra Labs (Blogger.com), 111–126 Q QuickTime, 174 R Rackspace, 380 Rails (Ruby on Rails). See Ruby on Rails Rakuten, 215 Ramsay, Mike, 191–203 Red Hat, 341 Reddit, 450 Reese, John, 77 Regulation FD, 435–436, 442 reliability issues, 24 Replay, 200–201, 202 Request for Proposal bid, 300 Research In Motion, 141–151 Richman, Herb, 444 Rocketmail, 25, 135 Roizen, Heidi, 307 Rosen, Ben, 84, 96 Rosenfeld, Eric, 90 Ross, Blake, 395–404 Ruby on Rails, 309, 313–314, 359 Ryan, George, 301 Ryner, Brian, 396 S Sachs, Jonathan, 89, 95, 109 Saltzer, Jerry, 80 Sarbanes-Oxley, 442 464 Index scalability, 12 Schachter, Joshua, 223–232 Schwartz Communications, 215 Scott, Mike, 46 Scull, John, 287 search button deal, 69–71 search engine, 67 search feature, 162 search technology, 63 Season Pass, 200 second-system syndrome, 338 security, 1 security company, 10 Sega video games, 174 Senate, 270 Sequoia, 300 Server Fund Drive, 119 servers, 21 Sevin Rosen, 96 sex category, 136 Seybold Conference, 292 SGI, 193 Shanny, Nick, 361 Shareholder Direct service, 442–443 shareholder lawsuits, 159 Shareholder.com, 427–446 Shear, Emmett, 449 Shellen, Jason, 122 Shugart floppy controller, 53–54 Shugart floppy disk drive, 53 Signal vs.

When someone cuts through a lot of crap and says, “You know, it doesn’t really matter.” Joel Spolsky 359 For example, Ruby on Rails is a framework that you can use with the Ruby programming language to access databases. It is the first framework that you can use from any programming language for accessing databases to realize that it’s OK to require that the names of the columns in the database have a specific format. Everybody else thought, “You need to be allowed to use whatever name you want in the database and whatever name you want in the application.” Therefore you have to create all this code to map between the name in the database and the name in the application. Ruby on Rails finally said, “It’s no big deal if you’re just forced to use the same name in both places. You know, it doesn’t really matter.”

C H A P T E 23 R David Heinemeier Hansson Partner, 37signals David Heinemeier Hansson helped transform 37signals from a consulting company to a product company in early 2004. He wrote the company’s first product, Basecamp, an online project management tool. He also wrote companion products Backpack, Ta-da List, and Campfire. In July 2004, he released the layer of software that underlies these applications as an open source web development framework. Ruby on Rails has since become one of the most popular tools among web developers and won Heinemeier Hansson the Hacker of the Year award at OSCON in 2005. In July 2006 (after this interview), 37signals president Jason Fried announced on the company’s blog that Jeff Bezos had made a minority private equity investment. Livingston: 37signals wasn’t begun as a startup, correct? Heinemeier Hansson: 37signals was founded by Jason Fried as a web design shop in 1999.

Django Book by Matt Behrens

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Benevolent Dictator For Life (BDFL), create, read, update, delete, database schema, distributed revision control, don't repeat yourself, en.wikipedia.org, Firefox, full text search, loose coupling, MVC pattern, revision control, Ruby on Rails, school choice, slashdot, web application

This layer contains the logic that access the model and defers to the appropriate template(s). You can think of it as the bridge between models and templates. If you’re familiar with other MVC Web-development frameworks, such as Ruby on Rails, you may consider Django views to be the “controllers” and Django templates to be the “views.” This is an unfortunate confusion brought about by differing interpretations of MVC. In Django’s interpretation of MVC, the “view” describes the data that gets presented to the user; it’s not necessarily just how the data looks, but which data is presented. In contrast, Ruby on Rails and similar frameworks suggest that the controller’s job includes deciding which data gets presented to the user, whereas the view is strictly how the data looks, not which data is presented. Neither interpretation is more “correct” than the other.

But PHP has its own problems; its very ease of use encourages sloppy, repetitive, ill-conceived code. Worse, PHP does little to protect programmers from security vulnerabilities, and thus many PHP developers found themselves learning about security only once it was too late. These and similar frustrations led directly to the development of the current crop of “third-generation” Web development frameworks. These frameworks – Django and Ruby on Rails appear to be the most popular these days – recognize that the Web’s importance has escalated of late. With this new explosion of Web development comes yet another increase in ambition; Web developers are expected to do more and more every day. Django was invented to meet these new ambitions. Django lets you build deep, dynamic, interesting sites in an extremely short time. Django is designed to let you focus on the fun, interesting parts of your job while easing the pain of the repetitive bits.

It’s only a matter of time before she can discover the correct number of dots to successfully access, say, ../../../../../etc/passwd. Anything that reads files without proper escaping is vulnerable to this problem. Views that write files are just as vulnerable, but the consequences are doubly dire. Another permutation of this problem lies in code that dynamically loads modules based on the URL or other request information. A well-publicized example came from the world of Ruby on Rails. Prior to mid-2006, Rails used URLs like http://example.com/person/poke/1 directly to load modules and call methods. The result was that a carefully constructed URL could automatically load arbitrary code, including a database reset script! The Solution If your code ever needs to read or write files based on user input, you need to sanitize the requested path very carefully to ensure that an attacker isn’t able to escape from the base directory you’re restricting access to.


pages: 372 words: 89,876

The Connected Company by Dave Gray, Thomas Vander Wal

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

A Pattern Language, Albert Einstein, Amazon Mechanical Turk, Amazon Web Services, Atul Gawande, Berlin Wall, business process, call centre, Clayton Christensen, commoditize, complexity theory, creative destruction, David Heinemeier Hansson, en.wikipedia.org, factory automation, Googley, index card, industrial cluster, interchangeable parts, inventory management, Jeff Bezos, John Markoff, Kevin Kelly, loose coupling, market design, minimum viable product, more computing power than Apollo, profit maximization, Richard Florida, Ruby on Rails, self-driving car, shareholder value, side project, Silicon Valley, skunkworks, software as a service, South of Market, San Francisco, Steve Jobs, Steven Levy, Stewart Brand, The Wealth of Nations by Adam Smith, Tony Hsieh, Toyota Production System, Vanguard fund, web application, WikiLeaks, Zipcar

As he worked, Heinemeier Hansson developed a series of libraries and frameworks that made it easier for him to do the work. At some point about halfway through the project, he realized that the tools he had created constituted a work environment that made it much easier to program web applications. So he decided to share it with other developers. He open-sourced the framework and called it Ruby on Rails. Rails was an immediate hit with programmers, because it allowed them to do more work more elegantly and efficiently than they could in any other language. The developer community that rallied around Rails helped build out and improve the framework, adding new functionality, fixing bugs, adding patches, and so on. By sharing the Rails platform with a developer community, 37signals was able to recruit an army of developers that collectively extended and strengthened it in ways that the company never could have done by itself.

And once again, they have distributed control of the system to customers and partners so those folks can manage the complexity of the system. With this kind of approach, a company can avoid many of the conflicting constraints that come with growth. Complexity can be managed locally and doesn’t have to be controlled by the organization. Notes for Chapter Fifteen US MILITARY INTERNET PROTOCOL Next-Generation Internet Protocol to Enable Net-Centric Operations, US Department of Defense, news release no. 413–03, June 13, 2003. RUBY ON RAILS David Heinemeier Hansson, “Good Programming is Like Good Writing,” BigThink, August 3, 2010, http://bigthink.com/ideas/21598. PROPRIETARY TECHNOLOGIES Miriah Meyer, “Gamer cracks code, finds jewel,” The Chicago Tribune, August 28, 2006. Chapter 16. How connected companies learn You can’t make a recipe for something as complicated as surgery. Instead, you can make a recipe for how to have a team that’s prepared for the unexpected

Cellular, Common Threads, Launch a Pilot Pod to Shift to a New Business Model Requisite Variety Law, The Law of Requisite Variety Research in Motion (RIM), Cascading Effects Can be Initiated by Senior Executives response principle, Three Principles of Network Power return on assets, Return on Assets is Dwindling revisionist history, Level One: How Entrepreneurs Learn RIM (Research in Motion), Cascading Effects Can be Initiated by Senior Executives risk-avoidant cultures, Risk-Avoidant Cultures risks in connected companies, Pod Failure, Platform Failure–Failure of Purpose, Over-Controlling the Platform, Over-Controlling the Platform, Over-Controlling the Platform–Customers First, Failure of Purpose, Customers First platform failure, Platform Failure–Failure of Purpose, Over-Controlling the Platform, Over-Controlling the Platform, Failure of Purpose pod failure, Pod Failure purpose failure, Over-Controlling the Platform–Customers First, Customers First Ritz-Carlton Hotel, Purpose Sets the Context for Organizations to Learn, Net Promoter at Apple, Absorbing Variety, Diversity, Too Much Autonomy Apple recruitment from, Net Promoter at Apple, Diversity customer issue resolution, Absorbing Variety employee autonomy, Too Much Autonomy purpose for, Purpose Sets the Context for Organizations to Learn Rosedale, Philip, Rely on Peer-to-Peer Reinforcement Whenever Possible Rothschild, Nathan, An Age of Abundance Ruby language, You don’t have to be Big Ruby on Rails framework, You don’t have to be Big–Well-Designed Platforms Absorb Variety, You don’t have to be Big, Well-Designed Platforms Absorb Variety Rudisin, Jerry, Self-Organizing Teams at Rational Software rules, The Problem with Procedures–The Front Line is not a Production Line, The Front Line is not a Production Line, Standards cultural standards and, Standards problem with, The Problem with Procedures–The Front Line is not a Production Line, The Front Line is not a Production Line S S&P 500, Fewer and Fewer Companies are Surviving in the Long Term Salah, George, Density Sarasvathy, Saras, Level One: How Entrepreneurs Learn SAS Airlines, Moments of Truth Sasser, W.


pages: 169 words: 56,250

Startup Communities: Building an Entrepreneurial Ecosystem in Your City by Brad Feld

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

barriers to entry, cleantech, cloud computing, corporate social responsibility, Grace Hopper, job satisfaction, Kickstarter, labour mobility, Lean Startup, minimum viable product, Network effects, Peter Thiel, place-making, pre–internet, Richard Florida, Ruby on Rails, Silicon Valley, Silicon Valley startup, smart cities, software as a service, Steve Jobs, text mining, Y Combinator, zero-sum game, Zipcar

This worked, and we learned an important lesson: a small amount of structure could be used to help guide the event’s flow without disrupting the culture. We tried fancy Twitter walls and other services, but in the end, the simplicity of our hacked solution worked and is still used today. Toward the end of year two, the community was growing at a steady pace and was asking for more specific events like a Ruby on Rails Meetup or a JavaScript Meetup. Instead of trying to create and manage an events business, we added an announcement section to the beginning of the event. Anyone could promote any tech-related event. We were also getting regular requests for nametags. Surprisingly, the event still felt intimate, even though it was 40 percent new and averaged 250 people per month. We opted to try something different and went for chaos over formality.

This had an extra benefit of getting the word out about the special things going on in Boulder, as many of the people from out of town blogged about the awesomeness of Boulder. The week started with a bang—there were 11 events on day one. We had 11 other events each day for the full week. Each event was packed, and many of the public venues we had booked shut down their other business activities to accommodate the events. We had blogger, programmer, designer, marketer, and event organizer Meetups. The yoga session was a hit. The Ruby on Rails Meetup resulted in four job offers in one afternoon. The largest event was 1,350 people at Ignite Boulder; the smallest was 11 people who did the Easy Bike Tour of Boulder. Of the 55 events, 40 had a focus on technology. The week flew by and we watched the community double as hundreds of new people, many living in Boulder, discovered an amazing set of people to spend time with. I moved away from Boulder two years later to follow my dream of traveling around the world.

Pulling Strings With Puppet: Configuration Management Made Easy by James Turnbull

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Debian, en.wikipedia.org, revision control, Ruby on Rails, source of truth

Resources There are a lot of examples of Puppet configurations, especially modules. Listed here are some of these examples: • Reductive Labs Puppet module page, which includes modules for xen, git, and ntp, among others: http://reductivelabs.com/trac/puppet/wiki/PuppetModules • Reductive Labs wiki page, which details module organization: http://reductivelabs.com/trac/puppet/wiki/ModuleOrganisation • Puppet Show—a Ruby on Rails tool for managing Puppet including nodes and configuration: http://reductivelabs.com/trac/puppet/wiki/PuppetShow • A CPAN-like way of distributing Puppet modules: http://reductivelabs.com/trac/puppet/wiki/PuppetRecipeManager • A collection of Puppet recipes for configuring a variety of resources, applications, and daemons: http://reductivelabs.com/trac/puppet/tags/puppet%2Crecipe Turnbull Using Puppet 120 • A Git repository containing a collection of modules: http://modules.reductivelabs.com/ • David Schmitt’s collection of Puppet configuration and modules: http://git.black.co.at/?

In this section, I’m going to explain how to make use of this method to allow your Puppet environment to service a larger number of clients. Note ➡ Version 0.23.1 or later of Puppet is required to support this approach. Puppet masters and clients using earlier versions do not correctly sign certificates. The Puppet master daemon, puppetmasterd, normally uses the WEBrick web server internally to connect clients, but Puppet also supports using Mongrel as an alternative web server. Mongrel is commonly used as a web server by Ruby on Rails applications, and you can learn more about it at http://mongrel.rubyforge.org/. With Mongrel integrated with Puppet, multiple puppetmasterd daemons can be run, each on a different port. A web server, in our case Apache, is placed in front of these instances, and the mod_proxy and mod_proxy_balancer modules are used to load balance connections to these instances. Turnbull Advanced Puppet 143 Tip ➡ Rather than Apache, you could also use other web servers.


pages: 77 words: 14,578

Manage Partitions With GParted (How-To) by Unknown

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Debian, en.wikipedia.org, Ruby on Rails

About the Reviewers Andrew Bradford has been a developer on the Cross Linux From Scratch (http://cross-lfs.org) project and an active participant in the BeagleBoard.org community (http://beagleboard.org) since 2010. He's been using Linux since RedHat 7 and since then, except for 1 year with a Mac, has been running Linux on the desktop quite successfully. His current interests involve Debian, embedded Linux, flash memories, and Ruby on Rails. I'd like to thank my wife, Meghan, and my daughter, Erin. They're both amazing and they inspire me every day. Peter Wu is a Software Science student at the University of Technology at Eindhoven (The Netherlands). He is an enthusiastic supporter of open source software, helping other users and contributing code. Beyond installing and administrating various systems with Linux distributions, he has also been required to make sane partitioning schemes.


pages: 90 words: 17,297

Deploying OpenStack by Ken Pepple

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Amazon Web Services, cloud computing, database schema, Infrastructure as a Service, Ruby on Rails, web application, x509 certificate

Database The nova-manage db command is rarely used except for troubleshooting and upgrades. It has two subcommands: sync and version. The sync subcommand will upgrade the database scheme for new versions of Nova and the version will report the current version. Note Nova uses a database abstraction library called SQL-Alchemy to interact with its database. A complimentary package called sqlalchemy-migrate is used to manage the database schema. Inspired by Ruby on Rails’ migrations feature, it provides a programmatic way to handle database schema changes. For Nova administrators, this only applies when they are upgrading versions. To upgrade scheme versions, use the nova-manage db sync. This should be rarely used unless you are installing from source or upgrading your installation. If there are pending scheme migrations, it will apply those to your database.


pages: 122 words: 19,807

Tmux: Productive Mouse-Free Development by Brian P. Hogan

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

en.wikipedia.org, Ruby on Rails, Skype, web application

Remove to use default socket​ ​rvm: 1.9.2@rails_project​ ​pre: sudo /etc/rc.d/mysqld start​ ​tabs:​ ​ - editor:​ ​ layout: main-vertical​ ​ panes:​ ​ - vim​ ​ - #empty, will just run plain bash​ ​ - top​ ​ - shell: git pull​ ​ - database: rails db​ ​ - server: rails s​ ​ - logs: tail -f logs/development.log​ ​ - console: rails c​ ​ - capistrano:​ ​ - server: ssh me@myhost​ This is an environment that a Ruby on Rails developer who works with Git might really appreciate. This creates a tmux session with eight windows. The first window is divided into three panes, using the main-vertical layout scheme. The rest of the windows launch various servers and consoles, as you can see in Figure 11, ​A Rails environment using tmuxinator's defaults​. * * * Figure 11. A Rails environment using tmuxinator’s defaults As you can see, tmuxinator makes it trivial to define not only the windows and panes, but also what commands we want to execute in each one.


pages: 56 words: 16,788

The New Kingmakers by Stephen O'Grady

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Amazon Web Services, barriers to entry, cloud computing, correlation does not imply causation, crowdsourcing, David Heinemeier Hansson, DevOps, Jeff Bezos, Khan Academy, Kickstarter, Marc Andreessen, Mark Zuckerberg, Netflix Prize, Paul Graham, Ruby on Rails, Silicon Valley, Skype, software as a service, software is eating the world, Steve Ballmer, Steve Jobs, Tim Cook: Apple, Y Combinator

Worse, there were more than a hundred standards, each with its own set of documentation—and the documentation for each standard often exceeded a hundred pages. What made sense from the perspective of a business made no sense whatsoever to the legions of developers actually building the Web. Among developers, the web services efforts were often treated as a punchline. David Heinemeier Hansson, the creator of the popular Ruby on Rails web framework, referred to them as the “WS-Deathstar.” Beyond the inherent difficulties of pushing dozens of highly specialized, business-oriented specifications onto an unwilling developer population, the WS-* set of standards had to contend with an alternative called Representational State Transfer (REST). Originally introduced and defined by Roy Fielding in 2000 in his doctoral dissertation, REST was everything that WS-* was not.


pages: 62 words: 15,274

Sass for Web Designers by Dan Cederholm

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

c2.com, don't repeat yourself, Firefox, Ruby on Rails, web application

LiveReload LiveReload (http://bkaprt.com/sass/8/) monitors any file changes, including Sass compiling, as you work and automatically reloads the browser. It’s available for both Mac and Windows (Fig 2.6). FIG 2.6: The LiveReload website. Compass.app Compass.app (http://bkaprt.com/sass/9/) is a little menu bar app for Mac, Windows, and Linux that watches and compiles Sass files for you (Fig 2.7). FIG 2.7: Compass.app’s menubar options. In addition to desktop apps, some development frameworks have built-in support for Sass. Ruby on Rails, for instance, will auto-compile Sass files into CSS files when the stylesheets are requested. Again, no command line required. So, you can see there are several options should you find yourself allergic to the command-line, though I hope it’s clear that the commands for running Sass are few and uncomplicated. Now that we have Sass installed and ready to watch files, let’s move on and talk about output formatting, commenting, and nesting.


pages: 247 words: 71,698

Avogadro Corp by William Hertling

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Any sufficiently advanced technology is indistinguishable from magic, cloud computing, crowdsourcing, Hacker Ethic, hive mind, invisible hand, natural language processing, Netflix Prize, private military company, Ray Kurzweil, recommendation engine, Richard Stallman, Ruby on Rails, technological singularity, Turing test, web application

He eagerly put his fingers on the keyboard and starting searching. When his first Avogadro search for ‘email to web service’ within seconds turned up an existing design posted by some IBM guys, his excitement grew. After reading through the design, he realized he could implement it all in a couple of hours. His other work forgotten, Pete started in on the project. He used the existing Internal Tools servers, and created a new Ruby on Rails web application that converted web pages to emails, and emails into web page form submissions. It was easier than expected, and by lunch he had a simple prototype running. He tried the prototype on the Internal Tools Request tool, and discovered some bugs. Puzzling over the details in his head, he mindlessly rushed down the hall to the coffee station for a refill. * * * Mike left his office, nodded to a few teammates he passed, and headed downstairs for the nearest outside door.

He had cut and pasted code from a dozen different websites, and wrapped it all up with some virtual duct tape. It was a real kludge that he wouldn’t want to show off in a coding style contest. On the other hand, it worked, by golly! He tested it against the Internal Tools web service, the Procurement web application, and have a dozen other web sites. It seemed to work for everything. He drummed his thumbs excitedly against the desk. Using off the shelf libraries that other people had written for Ruby on Rails, his favorite programming environment, he had been able to glue together the relevant pieces quickly. The ability to do in hours what would have once taken weeks in an old language like Java was the magic of modern programming environments like Ruby. It was easy to understand why startups built products in a weekend now and were launched on shoestring budgets when they had such powerful tools.


pages: 243 words: 74,452

Do Over: Rescue Monday, Reinvent Your Work, and Never Get Stuck by Jon Acuff

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Albert Einstein, fear of failure, Johann Wolfgang von Goethe, Mark Zuckerberg, Ruby on Rails, Skype, Steve Jobs, Tony Hsieh

This is an unfortunate approach to take in life because new skills open the doors to so many wonderful things. Like new jobs. New jobs always require learning new skills, even if that just means learning a different way a new company prefers to do something. They file their time sheets in a way you’re not familiar with. Guess what, you have to learn a new skill. New skills always lead to better resumes. Having Ruby on Rails on your resume if you’re a developer will help you stand out in jobs that require Ruby on Rails skills. If you get them, that portion of the job market just opened up to you. If, on the other hand, you are confused why some lady named Ruby has a dangerous fascination with railroads, there’s a chance you won’t get that job. New skills lead to better opportunities at the job you already have. “You know who we should fire, that guy who keeps learning how to do his job even better,” said no one ever.


pages: 319 words: 72,969

Nginx HTTP Server Second Edition by Clement Nedelcu

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Debian, fault tolerance, Firefox, Google Chrome, Ruby on Rails, web application

In this chapter, we will study the ability of Nginx to interact with these applications. We have selected two for different reasons. The first one is obviously PHP. According to a January 2013 Netcraft survey, nearly 40 percent of the World Wide Web is powered by PHP. The second one is Python. The reason being the way it's installed and configured to work with Nginx. The mechanism effortlessly applies to other applications such as Perl or Ruby on Rails. This chapter covers the following topics: • Discovering the CGI and FastCGI technologies • The Nginx FastCGI and similar modules • Load balancing via the Upstream module • Setting up PHP and PHP-FPM • Setting up Python and Django • Configuring Nginx to work with PHP and Python Introduction to FastCGI Before we begin, you should know that (as the name suggests) FastCGI is actually a variation of CGI.

Note that on most web servers, including Nginx and Apache, the implementation of FastCGI does not (or at least not fully) support multiplexing. • Since FastCGI is a socket-based protocol, it can be implemented on any platform with any programming language. Throughout this chapter, we will be setting up PHP and Python via FastCGI. Additionally, you will find the mechanism to be relatively similar in the case of other applications, such as Perl or Ruby on Rails. Designing a FastCGI-powered architecture is actually not as complex as one might imagine. As long as you have the web server and the processing application running, the only difficulty that remains is to establish the connection between both parties. The first step in that perspective is to configure the way Nginx will communicate with the FastCGI application. FastCGI compatibility with Nginx is introduced by the FastCGI module.


pages: 713 words: 93,944

Seven Databases in Seven Weeks: A Guide to Modern Databases and the NoSQL Movement by Eric Redmond, Jim Wilson, Jim R. Wilson

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Amazon Web Services, create, read, update, delete, data is the new oil, database schema, Debian, domain-specific language, en.wikipedia.org, fault tolerance, full text search, general-purpose programming language, linked data, MVC pattern, natural language processing, node package manager, random walk, recommendation engine, Ruby on Rails, Skype, social graph, web application

To index the starts column with a B-tree, use this: ​​CREATE INDEX events_starts​​ ​​ ON events USING btree (starts);​​ Now our query over a range of dates will avoid a full table scan. It makes a huge difference when scanning millions or billions of rows. We can inspect our work with this command to list all indexes in the schema: ​​book=# \di​​ It’s worth noting that when you set a FOREIGN KEY constraint, PostgreSQL will automatically create an index on the targeted column(s). Even if you don’t like using database constraints (that’s right, we’re looking at you, Ruby on Rails developers), you will often find yourself creating indexes on columns you plan to join against in order to help speed up foreign key joins. Day 1 Wrap-Up We sped through a lot today and covered many terms. Here’s a recap: Term Definition Column A domain of values of a certain type, sometimes called an attribute Row An object comprised as a set of column values, sometimes called a tuple Table A set of rows with the same columns, sometimes called a relation Primary key The unique value that pinpoints a specific row CRUD Create, Read, Update, Delete SQL Structured Query Language, the lingua franca of a relational database Join Combining two tables into one by some matching columns Left join Combining two tables into one by some matching columns or NULL if nothing matches the left table Index A data structure to optimize selection of a specific set of columns B-tree A good standard index; values are stored as a balanced tree data structure; very flexible Relational databases have been the de facto data management strategy for forty years—many of us began our careers in the midst of their evolution.

map = function(v) {​​ ​​ var parsedData = JSON.parse(v.values[0].data);​​ ​​ if(parsedData.country === 'CA')​​ ​​ return [{count : 1}];​​ ​​ else​​ ​​ return [{count : 0}];​​ ​​}​​ ​​​​ ​​reduce = function(mappedVals) {​​ ​​ var sums = {count : 0};​​ ​​ for (var i in mappedVals) {​​ ​​ sums[count] += mappedVals[i][count];​​ ​​ }​​ ​​ return [sums];​​ ​​}​​ In one way, mapreduce is the opposite of how we normally run queries. A Ruby on Rails system might grab data like this (via its ActiveRecord interface): ​​# Construct a Hash to store room capacity count keyed by room style​​ ​​capacity_by_style = {}​​ ​​rooms = Room.all​​ ​​for room in rooms​​ ​​ total_count = capacity_by_style[room.style]​​ ​​ capacity_by_style[room.style] = total_count.to_i + room.capacity​​ ​​end​​ Room.all runs an SQL query against the backing database similar to this: ​​SELECT * FROM rooms;​​ The database sends all of the results to the app server, and the app server code performs some action on that data.


pages: 304 words: 93,494

Hatching Twitter by Nick Bilton

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

4chan, Airbus A320, Burning Man, friendly fire, index card, Jeff Bezos, John Markoff, Kevin Kelly, Mahatma Gandhi, Mark Zuckerberg, pets.com, rolodex, Ruby on Rails, Saturday Night Live, side project, Silicon Valley, Skype, social web, Steve Ballmer, Steve Jobs, Steven Levy, technology bubble, traveling salesman, US Airways Flight 1549, WikiLeaks

After all, Ev had been down this road before, losing all of his friends when Pyra and Blogger had imploded a few years earlier. “Come on!” Noah said confidently. “We can work together and be friends too.” He finally wore Ev down, convincing him to fork over the money he needed to get started. Noah took off on the project, posting a freelance job listing for a start-up called Citizenware. A few e-mails started to trickle in from programmers applying for the gig, but one stood out. It was from a hacker who knew “Ruby on Rails,” a hip new programming language. After a few back-and-forth e-mails, an interview was arranged at a coffee shop in the Mission. The interviewee introduced himself as Rabble, even though his real name was Evan Henshaw-Plath. He was tall, his head and shoulders leaning forward slightly as a drunk slouches on a pole to keep from falling to the ground. “Tell me about yourself,” Noah said, his arms crossed.

So the cutting began: “Worship” ensured that people received every single update from someone they followed. (Gone.) “Sleep” allowed people to pause updates they received. (Too unclear.) And a long list of other options were nixed. There were, of course, much bigger problems than the question of which verbs to use on Twitter. Since the site had been built as a prototype in two weeks using a relatively new programming language called Ruby on Rails, it was rife with shortcuts and code problems. It was as if someone had rushed to build a skyscraper and in the time crunch had chosen to put together the structure with cardboard, glue, and tape, rather than nails, wood, and concrete. Worse, people were now moving into the building before construction crews could replace the flimsy materials with real ones. And then there was the biggest problem of them all: trying to explain to people what Twitter actually was.


pages: 319 words: 90,965

The End of College: Creating the Future of Learning and the University of Everywhere by Kevin Carey

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Albert Einstein, barriers to entry, Bayesian statistics, Berlin Wall, business intelligence, carbon-based life, Claude Shannon: information theory, complexity theory, David Heinemeier Hansson, declining real wages, deliberate practice, discrete time, double helix, Douglas Engelbart, Douglas Engelbart, Downton Abbey, Drosophila, Firefox, Frank Gehry, Google X / Alphabet X, informal economy, invention of the printing press, inventory management, John Markoff, Khan Academy, Kickstarter, low skilled workers, Lyft, Marc Andreessen, Mark Zuckerberg, meta analysis, meta-analysis, natural language processing, Network effects, open borders, pattern recognition, Peter Thiel, pez dispenser, ride hailing / ride sharing, Ronald Reagan, Ruby on Rails, Sand Hill Road, self-driving car, Silicon Valley, Silicon Valley startup, social web, South of Market, San Francisco, speech recognition, Steve Jobs, technoutopianism, transcontinental railway, Vannevar Bush

With ubiquitous broadband, cheap computers, and the cloud, the only physical thing you need to make software is a bunch of ergonomically designed black office chairs for your programmers to sit on and tables where they can rest their MacBooks and empty pizza boxes. It doesn’t take tens of thousands of programmers to make great software; in fact, once you add too many cooks to the development kitchen, software tends to get worse. Michael Staton and his buddies speak with awe about coders like David Heinemeier Hansson, a thirty-four-year-old Danish wunderkind, the “Elvis of software engineers,” who created the popular Ruby on Rails Web development framework, races sports cars in his spare time, and is, they say, worth one hundred ordinary men. The cost of reproducing software is essentially zero, which means large profit margins on every copy you sell or every customer you add after the first one. And unlike hardware, which is always on the precipice of commodification, software becomes more valuable as more people adopt it—the first mover’s advantage.

., 90 NLS/Augment, 125 Nobel Prize, 3, 45, 59, 78, 80, 176 Northeastern University, 64 Northern Arizona University, 229–30 Health and Learning Center, 230 Northern Iowa, University of, 55 Norvig, Peter, 149, 170, 227–28, 232 Notre Dame (Paris), cathedral school at, 18 Nurkiewicz, Tomasz, 218 Obama, Barack, 2 Oberlin College, 46 O’Brien, Conan, 166 Oklahoma, University of, 90 Omdurman Islamic University, 88 oNLine system, 125–26 Open Badges, 207 Open source materials and software, 177, 205–6, 215, 223, 232 Organisation for Economic Co-operation and Development, 9, 224 Overeducated American, The (Freeman), 56 Oxford University, 19, 21, 23, 24, 92, 135 Packard, David, 123 Parkinson’s disease, 70 Paris, University of, 18–19, 21, 137 Pauli, Wolfgang, 176 Pauling, Linus, 70 Pausch, Randy, 71–72 Peace Corps, 125 Pellar, Ronald (“Doctor Dante”), 208 Pell Grant Program, 56 Penguin Random House, 146 Pennsylvania, University of, 23, 24, 31 Wharton Business School, 155 Pennsylvania State University, 53 People magazine, 57 Pez dispensers, 146 Phaedrus (Socrates), 20, 98 PhDs, 7, 55, 117, 141, 193, 237, 250, 254 adjunct faculty replacing, 252 college rankings based on number of scholars with, 59 regional universities and community colleges and, 60, 64, 253 as requirement for teaching in hybrid universities, 31–33, 35, 50, 60, 224 Silicon Valley attitude toward, 66 Philadelphia, College of, 23 Philip of Macedon, 92 Phoenix, University of, 114 Piaget, Jean, 84, 227 Piazza, 132 Pittsburgh, University of, 73–76 Pixar, 146 Planck, Max, 45 Plato, 16, 17, 21, 31, 44, 250–51 Portman, Natalie, 165 Powell, Walter, 50, 117 Princeton University, 1–2, 23, 112, 134, 161, 245 Principia (Newton), 190 Protestantism, 24 Public universities, 7, 55, 177, 224, 253 Purdue University, 96, 208 Puritans, 22–24 Queens College, 23 Quizlet, 133 Rafter, 131–32 Raphael, 16, 17 Reader’s Guide to Periodical Literature, 87 Reagan, Ronald, 56 Regional universities, 55, 60, 64 Reid, Harry, 42 Renaissance, 19 Rhode Island, College of, 23 Rhodes Scholarships, 2 Rice University, 204 RNA, 3 Rockstar Games, 230 Roksa, Josipa, 9, 36, 85, 244 Romans, ancient, 16 Roosevelt, Theodore, 165 Ruby on Rails Web development framework, 144 Rutgers University, 23 Sample, Steven, 64 Samsung, 146 San Jose State University, 177 Sandel, Michael, 177 SAT scores, 63, 136–37, 171, 195, 213 Saylor, Michael, 186–93, 199, 201 Saylor.org, 191, 223, 231 Schelling, Friedrich Wilhelm Joseph, 45 School of Athens, The (Raphael), 16 Schopenhauer, Arthur, 45 Science: The Endless Frontier (Bush), 51 Scientific American, 92, 155 Scientific Research and Development, U.S.


pages: 193 words: 36,189

Html5 Boilerplate Web Development by Divya Manian

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

en.wikipedia.org, Firefox, Google Chrome, node package manager, pull request, Ruby on Rails, search engine result page

web.config HTML5 Boilerplate's web.config file is used to configure options for your site running on an IIS7 server or higher. As with the .htaccess file, merely having it in the root folder of your website allows it to be recognized and used to configure an IIS7 server. lighttpd.conf As with the other configuration files, place it in the root folder for the Lighttpd server to configure the server. nginx.conf Nginx is a lightweight server popular with websites using the Ruby on Rails framework. As with the .htaccess file, place this file in the root folder of your website. In addition, make sure nginx-mime.types is also in the root folder. This file is required for Ngnix to make sure it sends each file with the right MIME type. node.js With the node.js configuration file, the usage is different. The configuration file assumes you are using the Express/Connect framework for managing resource requests for your app.


pages: 999 words: 194,942

Clojure Programming by Chas Emerick, Brian Carper, Christophe Grand

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Amazon Web Services, Benoit Mandelbrot, cloud computing, continuous integration, database schema, domain-specific language, don't repeat yourself, en.wikipedia.org, failed state, finite state, Firefox, game design, general-purpose programming language, Guido van Rossum, Larry Wall, mandelbrot fractal, Paul Graham, platform as a service, premature optimization, random walk, Ruby on Rails, Schrödinger's Cat, semantic web, software as a service, sorting algorithm, Turing complete, type inference, web application

Now, rather than constantly defining them in their entirety, we can build queries incrementally and execute them when we like by using the exec function; this lets us reuse parts of queries and encapsulate query transformations in reusable functions, all ways to cut down on code repetition. The latest versions of Ruby on Rails’ venerable ActiveRecord (version 3.0 as of this writing) has moved to a very similar method of forming SQL queries using method calls on query objects. In Ruby on Rails, you might write something like this: employees = Person.where(:type => "employee") # ... later ... managers = employees.where(:role => "manager").order(:last_name) managers.all.each do |e| ... end Doing this with Korma is very similar: (def employees (where (select* employees) {:type "employee"})) ;; ... later ...

The result will be a simple URL-shortening HTTP service,[403] similar to bit.ly, tinyurl.com, and so on; such services allow users to specify and use shorter URLs that redirect to their canonical counterparts. To do this, we’ll use Compojure (https://github.com/weavejester/compojure), the most popular library for defining routes for Ring applications, and one that has taken cues from the URL routing features in many frameworks you may be familiar with already, including Ruby on Rails and Django. Let’s start a new REPL session with Compojure included in our project’s dependencies, which should now include both Compojure and Ring: [compojure "1.0.1"] [ring "1.0.1"] We should first consider what kind of model we should have for storing URLs and their shorter identifiers. We want to focus on building the web side of things, so let’s just keep this state in a map in memory using a reference type.[404] Which reference types should we use?


pages: 458 words: 135,206

CTOs at Work by Scott Donaldson, Stanley Siegel, Gary Donaldson

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Amazon Web Services, bioinformatics, business intelligence, business process, call centre, centre right, cloud computing, computer vision, connected car, crowdsourcing, data acquisition, distributed generation, domain-specific language, glass ceiling, pattern recognition, Pluto: dwarf planet, QR code, Richard Feynman, Richard Feynman, Ruby on Rails, shareholder value, Silicon Valley, Skype, smart grid, smart meter, software patent, thinkpad, web application, zero day, zero-sum game

That tactically means managing several groups of engineers working on several products, some of which are externally facing, some of which are internally facing; sitting down and problem solving with those engineers, whether they have a technical problem or a people problem or a requirements problem; keeping communication flowing between business stakeholders, product managers, and the engineers doing the delivery. That's the bulk of my CTO responsibilities. Siegel: Could you give a specific example of what you just described? Ballard: Sure. Down to the technology level, just this week, I had to sit down with one of my engineers who was having trouble automating the installation of a Ruby on Rails app because he's never actually done it before. I helped him write a shell script and a make file in order to configure his environment. I help with very low-level programming detail, all the way up to thinking through product features. We've had conference calls and preparations for board meetings where we were talking about which product features we designed and are implementing in 2012, to a meeting I had with a product manager just yesterday talking about the workflow, to how and when we prioritize certain tasks.

And that is a much simpler programming model compared to what folks are doing with the layering, so paying attention to what you can get away with on one decent, say, $15,000 server. That's the most important technology difference to me. You can use these modern data management products, for example MongoDB, to implement this fractal architecture. Let's say you're building an intranet portal application to search one of your proprietary databases. You can load MongoDB data in a full-text indexing package such as Apache Lucene. Let's say that you're using Ruby on Rails and Nginx. You can pack that all onto a single machine and then you have the benefit that the application doesn't incur any network latency internally. The web request comes in over the network and everything stays on the machine from there, and so you can have much lower latency, which is a quick and easy way to get much higher performance on an individual user basis. Given MongoDB's replication set capability, you then set up another server that sits there, replicate the data, and use your load balancer as your fundamental fail mechanism.

Python Web Development With Django by Jeff Forcier

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

create, read, update, delete, database schema, Debian, don't repeat yourself, en.wikipedia.org, Firefox, full text search, Guido van Rossum, loose coupling, MVC pattern, revision control, Ruby on Rails, Silicon Valley, slashdot, web application

Without further ado, here’s a quick rundown of the best-known Ajax toolkits and where to get them. n n n n n Dojo: (dojotoolkit.org) One of the larger Ajax libraries, Dojo has absorbed a few smaller libraries and offers multiple download options. jQuery: (jquery.com) A newer library that provides a powerful “chaining” syntax for selecting and operating on multiple page elements at the same time. MochiKit: (mochikit.com) One of the more “Pythonic” JavaScript libraries, which has taken inspiration from sources such as Python and Objective-C. MooTools: (mootools.net) MooTools has an extremely modular download system, enabling for a very customizable library setup. Prototype: (prototypejs.org) Originated from the Ruby on Rails Web framework, but has since branched out to be a stand-alone library. 207 208 Chapter 9 Liveblog n Yahoo! User Interface (YUI): (developer.yahoo.com/yui) The best of Yahoo!’s recent and ongoing JavaScript UI work, packaged for community use. In our example application, we are using jQuery, although this is largely an arbitrary choice on the part of the authors.The simple Ajax functionality we use here would be possible in any of the previous frameworks.

Git Something of a rival to Mercurial, in that both tools vie with Bazaar for open-source DVC mindshare, is Git (http://git.or.cz).Written in C, by Linus Torvalds and other Linux kernel team members, Git is a Unix-inspired tool and was originally created to help deal 315 316 Appendix C Tools for Practical Django Development with the extremely complex source-control needs of the Linux kernel project, which uses it today. Git has also been embraced by the Ruby on Rails project and many other projects in Rails’ sphere of influence, in addition to the WINE project, X.org (the Linux graphics system), the Fedora Linux distribution, and others. Version Control for Your Project Here’s a basic walkthrough for the uninitiated of using version control on a Django project. In this example we use Mercurial (the hg command). We start with a skeletal Django project. $ django-admin.py startproject stuff_dev_site $ cd stuff_dev_site $ .


pages: 559 words: 155,372

Chaos Monkeys: Obscene Fortune and Random Failure in Silicon Valley by Antonio Garcia Martinez

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Airbnb, airport security, always be closing, Amazon Web Services, Burning Man, Celtic Tiger, centralized clearinghouse, cognitive dissonance, collective bargaining, corporate governance, Credit Default Swap, crowdsourcing, death of newspapers, drone strike, El Camino Real, Elon Musk, Emanuel Derman, financial independence, global supply chain, Goldman Sachs: Vampire Squid, hive mind, income inequality, information asymmetry, interest rate swap, intermodal, Jeff Bezos, Malcom McLean invented shipping containers, Marc Andreessen, Mark Zuckerberg, Maui Hawaii, means of production, Menlo Park, minimum viable product, move fast and break things, move fast and break things, Network effects, Paul Graham, performance metric, Peter Thiel, Ponzi scheme, pre–internet, Ralph Waldo Emerson, random walk, Ruby on Rails, Sand Hill Road, Scientific racism, second-price auction, self-driving car, Silicon Valley, Silicon Valley startup, Skype, Snapchat, social graph, social web, Socratic dialogue, source of truth, Steve Jobs, telemarketer, urban renewal, Y Combinator, zero-sum game, éminence grise

Angels who used to write $20,000 checks on a deal could now easily write one for $200,000 or more (e.g., our boy Sacca). In tandem, the popularity of accelerators like Y Combinator, plus a general acceptance of entrepreneurship as a career, meant lots of very skilled engineers and product people were skipping the corporate trajectory and building exciting products. The emergence of turnkey, on-demand computation like Amazon Web Services, plus off-the-shelf Web-development frameworks like Ruby on Rails, meant that new ideas were easier than ever to test. Many entrepreneurs chose to build shovels rather than dig for gold, creating more complex software building blocks to underpin the innovation, such as back-end services like Parse, accelerating the startup explosion in an almost exponential way. The net of all this change was that seed rounds were now reaching levels of former A rounds; a two-month-old company with a persuasive CEO raising $2 million and calling it a “seed” was not shocking news.

Somerset, 200 Mayer, Marissa, 78 Mayfield Capital, 154, 156, 159, 162–63 McAfee, 382 McCorvie, Ryan, 16–17 McDonald’s, 82, 450 McEachen, Matthew (“MRM”), 41, 46, 62–63 call to, 123 CEO position, 249 chaos monkey suggestion, 103 codebase and, 66, 73, 184, 234 coding, 146 comrade-in-arms, 91 as daredevil, 136–37 deal details and, 251–52 earnestness, 68 Facebook and, 223, 225 family, 135, 205 getting to know, 88 irritation, 102–3 lost with, 109 paying off mortgage, 494 as resourceful savior, 100–101 as steadfast, 67 McGarraugh, Charlie, 14–15 McLean, Malcom, 447 media publishers, 387 MediaMath, 390 Menlo Park, 84 bedroom community, 338 conferences, 119 headquarters, 469 moving to, 337 schools, 306 meritocracy, 74 Merkle, 384 mesothelioma, 81 Miami drug trade, 304 Michelangelo, 334 Microsoft Adchemy and, 153–54, 161–62 Atlas, 383, 453–55 calendar, 340 dogfooding, 43 monopolist, 286 program managers, 272 middle managers, 359 Miller, Arthur, 104 Miller, Frank, 434 Milton, John, 475 minimum viable product (MVP), 434 miracles, 51 misleading, offensive, or sexually inappropriate (MOSI), 310 Mixpanel, 62 mobile commerce, 484–89 mobile data, 382, 477, 484, 486 Mobile Marketing Association (MMA), 448 monetary value, 317–19 monetization bet, 4 data-per-pixel, 274 digital, 184 Facebook, 5, 209, 275, 278, 298, 318, 425, 444 folly, 361–72 Google, 186 growth, 141 influences, 9 savvy, 486–89 tug-of-war, 379 Twitter, 190 zero-sum game, 319 money fuck-you money, 102, 415–16 investors, 74 outside, 155 pre-money valuation, 212 seed, 96 of VCs, 174 Moore’s law, 25 MoPub, 476–77, 479–81 morality, 226, 256, 284 Morgenstern, Jared, 218 Morishige, Sara, 183 Morris, Robert Tappan, 60–61 Mortal Kombat 3, 178 Moscone, George, 181 Moskovitz, Dustin, 284 Motwani, Rajeev, 138 Museum of Natural History, 366 My Life as a Quant (Derman), 16 MySpace, 283–84 N00b, 269 Nanigans, 480–81 Narasin, Ben, 128–31, 143–44 NASDAQ, 405, 410 National Socialism, 356 native ad formats, 448–49 Neko, 482 Netflix, 83, 103, 328 Netscape Navigator, 286 Neustar, 384, 386 New Rich, 357 New York Times, 448, 486 New Zealand, 318 News Feed addictive, 482 ads, 482–84, 488, 492 click-through rates, 487 content, 309 creation, 2 distribution, 364 as magic real estate, 362 spamming users, 372 versions, 444 newspaper advertising, 36–37 Nielsen, 385 1984 (Orwell), 433 noncash valuation, 212 no-shop contract, 201 Nukala, Murthy crossing paths, 167–68 ego, 42–43 greed, 44 hazing by, 71 immigrant worker, 72 lecture from, 65–66 manipulative rage, 136 pep rally, 36 saying good-bye to, 73 self-preservation and, 162–63 tantrums, 45 as tyrant, 158 vindictiveness, 134 wooing by, 154 Obama, Barack, 299–300 obscenity, 268 OkCupid, 54 Olivan, Javier, 410 Omnicom, 437, 443 on-boarding, 260–67, 271 one shot, one kill motto, 298 one-on-one, 434, 457, 469 online dating, 54–55 Opel, John, 148 Open Graph, 280, 364 optimization, 276, 302 Oracle investors, 111 job at, 193 logo, 124 product shindigs, 181 recruiting, 70 Orkut, 379 Orrick, Herrington & Sutcliffe, 193, 203, 253 Orwell, George, 433 outside money, 155 Ovid, 316 Oxford English Dictionary, 80 Page, Larry, 112, 428, 431 Pahl, Sebastien, 119 Palantir, 272 Palihapitiya, Chamath, 265–66 Palo Alto bosom of, 116 climate, 123 downtown, 333, 338 East, 404 hub, 109 old, 112, 158 posh, 84 shuttles, 289, 339 Stanford grads, 63 Pamplona running of bulls, 106–7 Pan-Arabism, 356 Pansari, Ambar, 210 Paper, 283 Parse, 155 Patel, Satya, 249–50 Patton, 369 Payne, Jim, 476 PayPal, 78, 124 personal wealth, 415 personally identifiable information (PII), 395 photo sharing, 286, 490–91, 493 photo-comparison software, 310 Pickens, Slim, 102 Piepgrass, Brian, 374 pings, 188, 327, 422 PMMess, 347–51, 407, 409 poker playing, 396–97 polyandry, 483 Polybius, 172, 316, 336 Pong, 150 Ponzi scheme, 16 pornography, 167, 262, 268, 312, 314, 315 post-valuation, 212 pregnancy, 58–59 pre-money valuation, 212 La Presse, 37 privacy Facebook and, 316–29 Irish Data Privacy Audit, 278, 320–23 PRIZM Segments, 385 product development, 47, 94, 191, 220, 334, 370, 389 product managers (PMs) as Afghan warlords, 273 earning money, 302 everyday work, 294 Facebook, 4, 6–7, 10, 91, 97, 202, 210, 271–79 Google, 192 habitat, 341 high-value, 246 ideal, 219 information and, 295 internal and external forces and, 316–17 last on buck-passing chain, 327 managing, 276 stupidity, 313 tech companies, 272 tiebreaker role, 292 product marketing manager (PMM), 277, 366 product navigators, 272 production, 94 product-market fit, 175 programmatic media-buying technology, 38 Project Chorizo, 296 pseudorandomness, 75 publishers, 37, 39 Putnam, Chris, 284 Qualcomm, 70 quants, 16–18, 24, 29, 141, 207 Quick and Dirty Operating System (QDOS), 149 Rabkin, Mark, 3, 312, 389, 398, 435 Rajaram, Gokul, 8, 10 accepting offer from, 248 banter with, 472–73 as boss, 3 bribery, 471 FBX and, 435 go big or go home ethos, 300 in great debate, 459 influence, 202 insubordination toward, 465 interview with, 221–22 leadership, 309 loss of trust, 468 lot with, 373 management of, 434 middle manager, 463–64 one-on-one and, 469 as product leader, 276–77 riding by, 346 stripping of duties, 452 word of, 252 Ralston, Geoff, 93 Rapportive, 96–97, 106 real-time bidding (RTB), 40–41 real-time data synchronization, 38 Red Rock Coffee, 84 RedLaser, 51 Reesman, Ben, 308, 389, 399–400, 475, 477 relativity, 25 replicating portfolio, 247–48 retargeting, 9, 381, 395, 438, 461 return of advertising spend (ROAS), 81 revenue dashboards, 274–75, 295–96 Right Media, 37–38 The Road Warrior, 134 Roetter, Alex, 185, 190, 493–94 romantic liaisons, 55–56 Romper Stomper, 202 Rosenblum, Rich, 21–22 Rosenn, Itamar, 368 Rosenthal, Brian, 389, 390 Ross, Blake, 444 Rossetti, Dante Gabriel, 303 rounds, 156 routing system, 324 Rubinstein, Dan, 312–13 Ruby on Rails, 155 Russia, 375–76 Sacca, Chris, 128, 141, 143 acquisition advice, 187–88, 212–13, 245–47 on deals, 205–7 ignoring inquiries, 201 pseudoangel, 113, 117–19 wisdom, 202 Safari, 484 safe sex, 58 safeguarding role, 315 sailboat living, 307, 332, 337–38 salaries, 358 San Francisco Museum of Modern Art (SFMOMA), 181 Sandberg, Sheryl, 2, 10 data joining and, 465 gatekeeper, 4–5 intimates, 3–4 leadership, 410 managerial prowess, 311–13 meetings, 371, 382, 459 PowerPoint and, 7 recommendations to, 462 schmoozing, 367 wiles of, 408 Sarna, Chander, 67–68, 71, 72 sausage grinder, 296 scale, 300 Scalps@Facebook, 314 scavenging foray, 116 schadenfreude, 16–17 Schopenhauer, Arthur, 282 Schrage, Elliot, 3–4, 410 Schreier, Bryan, 123–25 Schrock, Nick, 400 Schroepfer, Mike, 2 Schultz, Alex, 374 scientific racism, 122 Scoble, Robert, 100 Scott, George C., 24, 369 security, 314–15 seed money, 96 Sequoia, 122–25, 130, 159 severance package, 470–71 severity-level-one bug (SEV1), 323 sexual molestation, 17 Shaffer, Justin, 219–21, 444 Shakespeare, William, 120, 427, 456 Shapiro, Scott, 378, 459 Shelly, Percy Bysshe, 337 Shockley, William, 122 shuttles, 289, 339 Siegelman, Russell, 146, 201, 213, 397 angel investor, 110–13 commitment, 141–43 negotiations, 116–17 Silicon Valley.


pages: 352 words: 64,282

MongoDB: The Definitive Guide by Kristina Chodorow, Michael Dirolf

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

create, read, update, delete, Debian, pattern recognition, Ruby on Rails, web application

Ruby Object Mappers and Using MongoDB with Rails There are several libraries written on top of the basic Ruby driver to provide things like models, validations, and associations for MongoDB documents. The most popular of these tools seem to be MongoMapper and Mongoid. If you’re used to working with tools like ActiveRecord or DataMapper, you might consider using one of these object mappers in addition to the basic Ruby driver. MongoDB also works nicely with Ruby on Rails, especially when working with one of the previously mentioned mappers. There are up-to-date instructions on integrating MongoDB with Rails on the MongoDB site. Custom Submission Forms: Ruby | 167 Real-Time Analytics: Python The Python driver for MongoDB is called PyMongo. In this section, we’ll use PyMongo to implement some real-time tracking of metrics for a web application. The most upto-date documentation on PyMongo is available at http://api.mongodb.org/python.

Catalyst 5.8: The Perl MVC Framework by Antano Solar John, Jonathan Rockway, Solar John Antano

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

c2.com, create, read, update, delete, database schema, Debian, en.wikipedia.org, Firefox, MVC pattern, Ruby on Rails, web application

Other papers by Antano include "802.11 MAC Enhancements-Breaking Barriers of Wireless Speed" that was published in the IEEE Journal, "Learning to Develop in the Open Source World", and so on. Owing to his experience as a consultant and trainer, Antano has designed course structure and content for corporate learners at different levels on subjects such as Object Oriented Perl, Unix System Fundamentals, Shell basic, Ruby on Rails, and so on. In association with MaFoi Ranstad, Antano entirely designed and implemented a structured course for transitioning web designers into developers through a one-day blended learning program called "Learn". Antano has been keenly focusing on Accelerated Learning. He has conducted workshops at various reputed colleges and corporate events on how to learn quickly and effectively-technology languages and platforms using strategies that he has developed.


pages: 203 words: 14,242

Ship It!: A Practical Guide to Successful Software Projects by Jared R. Richardson, William A. Gwaltney

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

continuous integration, David Heinemeier Hansson, Donald Knuth, index card, MVC pattern, place-making, Ruby on Rails, web application

. $29.95 Visit our secure online store: Facets of Ruby Series Learn how to use the popular Ruby programming language from the Pragmatic Programmers: your definitive source for reference and tutorials on the Ruby language and exciting new application development tools based on Ruby. The Facets of Ruby series includes the definitive guide to Ruby, widely known as the PickAxe book. Upcoming titles in this series feature the Ruby on Rails web application framework and other exciting new technologies. • The definitive guide for Ruby programmers. • Up-to-date and expanded for Ruby version 1.8. • Complete documentation of all built-in classes, modules, and methods. • Complete descriptions of all ninety-eight standard libraries. • 200+ pages of new content in this edition. • Learn more about Ruby’s web tools, unit testing, and programming philosophy.


pages: 266 words: 38,397

Mastering Ember.js by Mitchel Kelonye

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Firefox, MVC pattern, Ruby on Rails, single page application, web application, WebRTC, WebSocket

We may however specify that the contacts route handler should manage this path as: this.resource('contacts', {path: '/'}, function(){ }); Therefore, to specify an alternative path for a route, simply pass the desired route in a hash as the second argument during resource definition. This also applies when defining routes. The second reason would be when a resource contains dynamic segments. For example, our contact resource handles contacts who should obviously have different URLs linking back to them. Ember.js uses URL pattern matching techniques used by other open source projects such as Ruby on Rails, Sinatra, and Express.js. Therefore, our contact resource should be defined as: this.resource('contact', {path: '/:contact_id'}, function(){ }); In the preceding snippet, /:contact_id is the dynamic segment that will be replaced by the actual contact's ID. One thing to note is that nested resources prefix their paths with those of parent resources. Therefore, the contact resource's full path would be /contacts/:contact_id.


pages: 274 words: 58,675

Puppet 3 Cookbook by John Arundel

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Amazon Web Services, cloud computing, continuous integration, Debian, defense in depth, don't repeat yourself, GnuPG, Larry Wall, place-making, Ruby on Rails, web application

Written in a simple, practical style by a professional systems administrator and Puppet expert, every recipe has detailed step-by-step instructions showing you the exact commands and configuration settings you need Please check www.PacktPub.com for information on our titles Instant Puppet 3 Starter ISBN: 978-1-78216-174-5 Paperback: 50 pages Gain complete consistency from your systems with minimal effort using Istant Puppet 3 Starter 1. Learn something new in an Instant! A short, fast, focused guide delivering immediate results 2. Learn how deterministic results can vastly reduce your workload 3. Deploy Puppet Server as a Ruby-on-Rails application to handle thousands of clients 4. Design your own module for complex configurations OpenStack Cloud Computing Cookbook ISBN: 978-1-84951-732-4 Paperback: 318 pages Over 100 recipes to successfully set up and manage your OpenStack cloud environments with complete coverage of Nova, Swift, Keystone, Glance and Horizon 1. Learn how to install and configure all the core components of OpenStack to run an environment that can be managed and operated just like AWS or Rackspace 2.


pages: 458 words: 46,761

Essential Sqlalchemy by Jason Myers, Rick Copeland

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

create, read, update, delete, database schema, Ruby on Rails, side project, web application

It is focused around the domain model of the application and leverages the Unit of Work pattern to maintain object state. It also provides a high-level abstraction on top of the SQL Expression Language that enables the user to work in a more idiomatic way. You can mix and match use of the ORM with the SQL Expression Language to create very powerful applications. The ORM leverages a declarative system that is similar to the active-record systems used by many other ORMs such as the one found in Ruby on Rails. While the ORM is extremely useful, you must keep in mind that there is a difference between the way classes can be related, and how the underlying database relationships work. We’ll more fully explore the ways in which this can affect your implementation in Chapter 6. Choosing Between SQLAlchemy Core and ORM Before you begin building applications with SQLAlchemy, you will need to decide if you are going to primarly use the ORM or Core.

Backbone.js Cookbook by Vadim Mirgorod

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Airbnb, create, read, update, delete, en.wikipedia.org, Firefox, Google Chrome, MVC pattern, QR code, rolodex, Ruby on Rails, web application

See also HTML 5 canvas reference could be found at http://www.w3schools.com/html/html5_canvas.asp. 178 7 REST and Storage In this chapter, we will cover the following recipes: ff Architecting the REST API for the backend ff Prototyping a RESTful backend with MongoLab ff Synchronizing models and collections with a RESTful service ff Building a RESTful frontend with Backbone ff Using the polling technique to fetch data ff Working with local storage Introduction This chapter focuses on the way Backbone.js synchronizes models and collections with a RESTful backend, or stores them in the HTML5 local storage. We will learn how to design the REST API for our backend, which can be implemented with almost any programming framework, such as Symphony, Ruby on Rails, Django, or Node.js. Throughout the chapter, we will use MongoLab (http://mongolab.com), which is the cloud version of MongoDB, with a RESTful interface. We will also learn what tools to use to debug the RESTful service when the frontend app has not been built yet. Finally we will make the Backbone application communicate with the RESTful service, performing full set of CRUD operations supported by the REST server.


pages: 536 words: 73,482

Programming Clojure by Stuart Halloway, Aaron Bedra

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

continuous integration, en.wikipedia.org, general-purpose programming language, Gödel, Escher, Bach, Paul Graham, Ruby on Rails, type inference, web application

There are a couple of new things pulled in from noir here that haven’t been introduced yet, though. The :keys destructuring after defpage is dealing with the arguments passed in from the browser. session/remove! does exactly what you think it might do. The interesting bits start with session/flash-put!. This will add something to the session for the request immediately following to consume, and then it will disappear. It is similar to the Ruby on Rails flash method. Finally, the render function calls the route with the arguments that follow. With just a few modifications, we will be ready to give the game a try. Our / route needs to be able to accept the arguments that it is passed via the call to render that we just wrote. Let’s fix that. First modify the board partial to accept and destructure arguments passed to it and render results: clojurebreaker/src/clojurebreaker/views/welcome.clj ​(defpartial board [{:keys [one two three four exact unordered]}]​ ​ (when (and exact unordered)​ ​ [:div "Exact: " exact " Unordered: " unordered])​ ​ (form-to [:post "/guess"]​ ​ (text-field "one" one)​ ​ (text-field "two" two)​ ​ (text-field "three" three)​ ​ (text-field "four" four)​ ​ (submit-button "Guess")))​ Here we have changed the rendering of the board to respond to the player’s guesses.

Exploring Everyday Things with R and Ruby by Sau Sheong Chang

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Alfred Russel Wallace, bioinformatics, business process, butterfly effect, cloud computing, Craig Reynolds: boids flock, Debian, Edward Lorenz: Chaos theory, Gini coefficient, income inequality, invisible hand, p-value, price stability, Ruby on Rails, Skype, statistical model, stem cell, Stephen Hawking, text mining, The Wealth of Nations by Adam Smith, We are the 99%, web application, wikimedia commons

:), in Ruby ternary conditional expression, if and unless R R Development Core Team, Introducing R R language, Packing Your Bags, Introducing R–Introducing R, Introducing R, Introducing R, Using R–Using R, The R Console–The R Console, The R Console, The R Console, Sourcing Files and the Command Line–Sourcing Files and the Command Line, Sourcing Files and the Command Line, Packages–Using packages, Programming R, Variables and Functions, Variables and Functions–Variables and Functions, Variables and Functions–Variables and Functions, Conditionals and Loops, Conditionals and Loops–Conditionals and Loops, Vectors–Vectors, Lists–Lists, Matrices–Matrices, Arrays–Arrays, Factors–Factors, Data frames–Data frames, Importing Data–Importing data from a database, Charting–Adjustments, Basic Graphs, MailMiner–MailMiner arrays, Arrays–Arrays assignment operators, Variables and Functions batch mode, Sourcing Files and the Command Line charting, Charting–Adjustments conditionals, Conditionals and Loops console for, The R Console–The R Console data frames, Data frames–Data frames expressions, Programming R factors, Factors–Factors functions, Variables and Functions–Variables and Functions importing data, Importing Data–Importing data from a database installing, Introducing R lists, Lists–Lists loops, Conditionals and Loops–Conditionals and Loops matrices, Matrices–Matrices output formats, Basic Graphs packages for, Packages–Using packages packages for, creating, MailMiner–MailMiner running, Using R–Using R running code from a file, Sourcing Files and the Command Line–Sourcing Files and the Command Line statistical functions, The R Console variables, Variables and Functions–Variables and Functions vectors, The R Console, Vectors–Vectors version of, Introducing R R-Forge repository, Packages .rb file extension, Running Ruby rbind() function, R, Data frames read() function, R, Importing data from text files read.table() function, R, Interpreting the Data, Number of Messages by Day of the Month repeat loop, R, Conditionals and Loops require statement, Ruby, Requiring External Libraries restrooms example, Offices and Restrooms–The Final Simulation, Offices and Restrooms, The Simple Scenario–The Simple Scenario, The Simple Scenario–The First Simulation, Representing Restrooms and Such, Representing Restrooms and Such, Representing Restrooms and Such, Interpreting the Data–Interpreting the Data, Interpreting the Data–Interpreting the Data, The Second Simulation–The Final Simulation, The Second Simulation, The Second Simulation–The Second Simulation, The Third Simulation–The Third Simulation, The Final Simulation–The Final Simulation charts for, Interpreting the Data–Interpreting the Data, The Second Simulation, The Second Simulation–The Second Simulation, The Third Simulation–The Third Simulation, The Final Simulation–The Final Simulation data results, interpreting, Interpreting the Data–Interpreting the Data Facility class for, Representing Restrooms and Such HSE (Health and Safety Executive) data regarding, Offices and Restrooms modeling, The Simple Scenario–The Simple Scenario Person class for, Representing Restrooms and Such Restroom class for, Representing Restrooms and Such simulations for, The Simple Scenario–The First Simulation, The Second Simulation–The Final Simulation return keyword, R, Variables and Functions return keyword, Ruby, Methods Reynolds, Craig (creator of Boids algorithm), Schooling Fish and Flocking Birds RIFF format, Extracting Data from Sound right angle bracket (>), The R Console, Variables and Functions -> assignment operator, R, Variables and Functions > R console prompt, The R Console RMagick library, Extracting Data from Video, Extracting Data from Video Ruby language, Packing Your Bags, Ruby–Why Ruby, Why Ruby, Installing Ruby–Installing Ruby using your platform’s package management tool, Installing Ruby from source, Running Ruby–Running Ruby, Running Ruby, Running Ruby, Requiring External Libraries–Requiring External Libraries, Strings–Strings, Strings, Arrays and hashes–Arrays and hashes, Arrays and hashes–Arrays and hashes, Arrays and hashes, Symbols, Conditionals and loops–case expression, Loops, Classes and objects–Classes and objects, Classes and objects–Classes and objects, Methods, Class methods and variables, Class methods and variables–Class methods and variables, Inheritance–Inheritance, Inheritance–Inheritance, Inheritance, Inheritance, Code like a duck–Code like a duck, Code like a duck–Code like a duck, Shoes–Shoes doodler, Roids arrays, Arrays and hashes–Arrays and hashes, Arrays and hashes class methods, Class methods and variables class variables, Class methods and variables–Class methods and variables classes, Classes and objects–Classes and objects compiling from source code, Installing Ruby from source conditionals, Conditionals and loops–case expression duck typing, Code like a duck–Code like a duck dynamic typing, Code like a duck–Code like a duck external libraries for, Requiring External Libraries–Requiring External Libraries hashes, Arrays and hashes–Arrays and hashes here-documents, Strings inheritance, Inheritance–Inheritance installing, Installing Ruby–Installing Ruby using your platform’s package management tool interactive tool for, Running Ruby interpreter for, Running Ruby loops, Loops methods, Methods mixin mechanism, Inheritance modules, Inheritance objects, Classes and objects–Classes and objects open classes, Roids running, Running Ruby–Running Ruby Shoes toolkit for, Shoes–Shoes doodler strings, Strings–Strings subclassing, Inheritance–Inheritance symbols, Symbols website for, Why Ruby Ruby Version Manager (RVM), Ruby Version Manager (RVM) RubyGems package manager, Requiring External Libraries RubyInstaller, RubyInstaller RVideo library, Extracting Data from Video RVM (Ruby Version Manager), Ruby Version Manager (RVM) S saccadic masking, Data, Data, Everywhere sample frame, Extracting Data from Sound sample points, Extracting Data from Sound sapply() function, R, Variables and Functions scale_shape_manual() function, Interpreting the Data scale_x_continuous() function, Interpreting the Data scale_y_continuous() function, Interpreting the Data scatterplot, R, The R Console, Sourcing Files and the Command Line scatterplots, Interpreting the Data–Interpreting the Data, The Second Simulation, The Third Simulation–The Third Simulation, The Final Simulation–The Final Simulation, Number of Messages by Day of the Month–Number of Messages by Hour of the Day, Implementation schools of fish, Schooling Fish and Flocking Birds (see flocking example) sd() function, R, The R Console self keyword, Ruby, Class methods and variables seq() function, R, Vectors Shapiro-Wilk test, Money Shoes toolkit, Shoes–Shoes doodler, A Rainbow of Shoes, Installing Shoes–Installing Shoes, Programming Shoes–Shoes doodler, Shoes stopwatch, Shoes stopwatch, Shoes stopwatch, Simulation–Simulation, Roids–Roids flows, Shoes stopwatch installing, Installing Shoes–Installing Shoes programming in, Programming Shoes–Shoes doodler slots, Shoes stopwatch stacks, Shoes stopwatch versions (colors) of, A Rainbow of Shoes simulations, Bringing the World to Us, The Simple Scenario–The First Simulation, The Simple Scenario–The First Simulation, The Second Simulation–The Final Simulation, The Simulation–The Simulation, The Simulation–The Simulation, Simulation–Simulation, The Boid Flocking Rules–Putting in Obstacles economics example, The Simulation–The Simulation, The Simulation–The Simulation flocking example, Simulation–Simulation, The Boid Flocking Rules–Putting in Obstacles Monte Carlo method, The Simple Scenario–The First Simulation restrooms example, The Simple Scenario–The First Simulation, The Second Simulation–The Final Simulation single quotes (' '), enclosing Ruby strings, Strings slots, Shoes, Shoes stopwatch Smith, Adam (author), The Invisible Hand An Inquiry into the Nature and Causes of the Wealth of Nations (University of Chicago Press), The Invisible Hand source() function, R, Sourcing Files and the Command Line square brackets ([ ]), Vectors, Matrices, Data frames accessing subset of R data frame, Data frames enclosing R matrix indexes, Matrices enclosing R vector indexes, Vectors square brackets, double ([[ ]]), enclosing single R vector index, Vectors stacks, Shoes, Shoes stopwatch standard deviation, R, The R Console Standard library, Ruby, Requiring External Libraries Starlings in Flight (STARFLAG) project, A Variation on the Rules statistical functions, R, The R Console, Packages, Interpreting the Data–Interpreting the Data stats package, R, Packages stat_bin() function, R, Statistical transformation, Statistical transformation stethoscope, homemade, Homemade Digital Stethoscope stopwatch example, Shoes stopwatch–Shoes stopwatch String class, Extracting Data from Sound strings, Ruby, Strings–Strings subclassing, Ruby, Inheritance–Inheritance sudo command, Installing Ruby using your platform’s package management tool symbols, Ruby, Symbols T table() function, R, Interpreting the Data, Number of Messages by Day of the Month term-document matrix, Text Mining ternary conditional expression, Ruby, if and unless text document, Text Mining text files, Importing data from text files, Importing data from text files, The Emailing Habits of Enron Executives (see also CSV files) email message data in, The Emailing Habits of Enron Executives importing data from, R, Importing data from text files text mining, Text Mining–Text Mining The Grammar of Graphics (Springer), Introducing ggplot2 tm library, Text Mining U Ubuntu system, installing Ruby on, Installing Ruby using your platform’s package management tool UI toolkits, Shoes toolkit, Shoes–Shoes doodler unless expression, Ruby, if and unless unpack method, String class, Extracting Data from Sound until loop, Ruby, Loops Utopia example, It’s a Good Life, It’s a Good Life, Money–Money, Money–Money, Money–Money, Sex–The Changes, Birth and Death, The Changes–The Changes, Evolution–Implementation, Implementation, Implementation charts for, Money–Money, Implementation data, analyzing, Money–Money, The Changes–The Changes, Implementation evolution added to simulation, Evolution–Implementation flocking roids, as basis for simulation, It’s a Good Life food added to simulation, Money–Money mortality added to simulation, Birth and Death procreation added to simulation, Sex–The Changes research regarding, It’s a Good Life V variables, R, Variables and Functions–Variables and Functions Vector class, Ruby, Roids vectors, R, The R Console, Vectors–Vectors video file, extracting data from, Extracting Data from Video–Extracting Data from Video W WAV files, Homemade Digital Stethoscope, Extracting Data from Sound–Extracting Data from Sound, Extracting Data from Sound extracting to CSV file, Extracting Data from Sound–Extracting Data from Sound format of, Extracting Data from Sound recording audio to, Homemade Digital Stethoscope waveforms, Generating the Heart Sounds Waveform–Generating the Heart Sounds Waveform, Generating the Heartbeat Waveform and Calculating the Heart Rate–Generating the Heartbeat Waveform and Calculating the Heart Rate webcam, pulse oximeter using, Homemade Pulse Oximeter website resources, How to Contact Us, Why Ruby, Installing Ruby from source, Ruby Version Manager (RVM), RubyInstaller, Introducing R, Packages, The Emailing Habits of Enron Executives, The Emailing Habits of Enron Executives Enron email data, The Emailing Habits of Enron Executives for this book, How to Contact Us Internet Message Format, The Emailing Habits of Enron Executives R language, Introducing R R packages, Packages Ruby language, Why Ruby Ruby source code, Installing Ruby from source RubyInstaller, RubyInstaller RVM (Ruby Version Manager), Ruby Version Manager (RVM) weight example, The R Console (see height and weight example) while loop, R, Conditionals and Loops while loop, Ruby, Loops Wickham, Hadley (creator of ggplot2 package), Introducing ggplot2 Wilkinson, Leland (author), Introducing ggplot2 The Grammar of Graphics (Springer), Introducing ggplot2 win.metafile() function, R, Basic Graphs Windows, RubyInstaller, Installing Shoes, Using R, Basic Graphs installing Ruby on, RubyInstaller installing Shoes on, Installing Shoes opening graphics device, Basic Graphs R user interface for, Using R windows() function, R, Basic Graphs with() function, R, Data frames, Importing data from a database write() method, Ruby, The Simulation X X11() function, R, Basic Graphs About the Author Sau Sheong Chang has been in software development, mostly web applications and recently cloud- and data-related systems, for almost 17 years and is still a keen and enthusiastic programmer. He has been active in programming with Ruby for the past 6 years and recently started with R for the past year. He is active in the local developer communities, especially in the Singapore Ruby Brigade. In April 2011 he co-organized the first and largest Ruby conferences in Southeast Asia, the RedDotRubyConf. He has published 2 books, the first in 2008 titled Ruby on Rails Mashup Projects and the second in 2010, titled Cloning Internet Applications with Ruby. Both books were published by Packt Publishing. Mr. Chang is currently the Director of Applied Research in HP Labs Singapore, with research focusing on cloud computing and big data. His previous roles include a stint as the CTO of a popular online gaming company and Director of Engineering for Yahoo! Southeast Asia.


pages: 504 words: 67,845

Designing Web Interfaces: Principles and Patterns for Rich Interactions by Bill Scott, Theresa Neil

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

A Pattern Language, anti-pattern, en.wikipedia.org, Firefox, recommendation engine, Ruby on Rails, Silicon Valley, web application

It provides a nice way to toggle open additional content without losing the context of the summary information. Expand/Collapse as Overlay A slight variation is to have content Expand/Collapse appear as an Overlay on the page. Instead of pushing content down or out of the way, the panels simply slide out from some part of the page into a layer above the rest of the items on the page. The panel slides out, anchored to the activating control. Five Runs is a Ruby on Rails application-monitoring tool. It provides a window into the inner workings of Rail's apps, helping IT groups track down system issues. The Five Runs web application uses slide-out panels for additional controls (Figure 11-6). Figure 11-6. Five Runs animates expanding and collapsing panels with additional controls as overlays to the interface Be careful to not overuse Expand. For example, in a photo application, if you provide a rollover to expand photos from thumbnail to a larger size, the transitions will become annoying because the user will see them back-to-back.


pages: 315 words: 85,791

Technical Blogging: Turn Your Expertise Into a Remarkable Online Presence by Antonio Cangiano

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Albert Einstein, anti-pattern, bitcoin, bounce rate, cloud computing, en.wikipedia.org, John Gruber, Lean Startup, Network effects, revision control, Ruby on Rails, search engine result page, slashdot, software as a service, web application

Define the Main Theme for Your General Blog If you intend to publish a blog on programming in general, web development, or a similarly broad topic in another industry, you don’t have to worry about the possibility of running out of ideas or having too small of an audience to capture. Your pre-setup exercise is a bit different from the niche one then. Instead of listing articles, come up with a main theme for your blog, then list ten relevant topics that you are passionate about and have some degree of expertise in. For example, if you’re dealing with a blog about web development as your main theme, you might write down the following topics: Ruby on Rails HTML5/CSS3 JavaScript/CoffeeScript Ajax Deployment Scaling web applications Security issues NoSQL databases UI/UX/Usability Using and creating RESTful APIs As you can see, these are very broad topics, each of which would roughly correspond to different categories for your blog. This task is not just meant to help you figure out what kind of topics you’ll be covering in your blog.


pages: 394 words: 118,929

Dreaming in Code: Two Dozen Programmers, Three Years, 4,732 Bugs, and One Quest for Transcendent Software by Scott Rosenberg

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

A Pattern Language, Benevolent Dictator For Life (BDFL), Berlin Wall, c2.com, call centre, collaborative editing, conceptual framework, continuous integration, Donald Knuth, Douglas Engelbart, Douglas Engelbart, Douglas Hofstadter, Dynabook, en.wikipedia.org, Firefox, Ford paid five dollars a day, Francis Fukuyama: the end of history, George Santayana, Grace Hopper, Guido van Rossum, Gödel, Escher, Bach, Howard Rheingold, index card, Internet Archive, inventory management, Jaron Lanier, John Markoff, John von Neumann, knowledge worker, Larry Wall, life extension, Loma Prieta earthquake, Menlo Park, Merlin Mann, new economy, Nicholas Carr, Norbert Wiener, pattern recognition, Paul Graham, Potemkin village, RAND corporation, Ray Kurzweil, Richard Stallman, Ronald Reagan, Ruby on Rails, semantic web, side project, Silicon Valley, Singularitarianism, slashdot, software studies, source of truth, South of Market, San Francisco, speech recognition, stealth mode startup, stem cell, Stephen Hawking, Steve Jobs, Stewart Brand, Ted Nelson, Therac-25, thinkpad, Turing test, VA Linux, Vannevar Bush, Vernor Vinge, web application, Whole Earth Catalog, Y2K

Fried said it’s not uncommon for his team to spend hours debating each word and button and box displayed on them. 37 Signals set out to create some small programs, not to build an ambitious new platform or application framework. But in the course of building Basecamp, Hansson had written some useful and innovative code that streamlined and simplified the basic chores that all Web applications had to perform in the course of storing and retrieving data. After Basecamp’s launch, he and 37 Signals decided to take that work and release it as an open source platform called Ruby on Rails. Rails, as it came to be called, made writing Web applications easier, in part by limiting the programmer’s options. “Flexibility is overrated. Constraints are liberating,” Hansson says. And Rails was ready-made for the AJAX-style interface enhancements that were making those Web-based programs credible competition to their desktop equivalents. Just as 37 Signals had extracted the Rails framework from the Basecamp code, it extracted a design philosophy from the Basecamp experience, encoded in a handy series of aphorisms: “Less software.”


pages: 468 words: 124,573

How to Build a Billion Dollar App: Discover the Secrets of the Most Successful Entrepreneurs of Our Time by George Berkowski

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Airbnb, Amazon Web Services, barriers to entry, Black Swan, business intelligence, call centre, crowdsourcing, en.wikipedia.org, game design, Google Glasses, Google Hangouts, Google X / Alphabet X, iterative process, Jeff Bezos, Jony Ive, Kickstarter, knowledge worker, Lean Startup, loose coupling, Marc Andreessen, Mark Zuckerberg, minimum viable product, move fast and break things, move fast and break things, Network effects, Oculus Rift, Paul Graham, QR code, Ruby on Rails, self-driving car, Silicon Valley, Silicon Valley startup, Skype, Snapchat, social graph, software as a service, software is eating the world, Steve Jobs, Steven Levy, Y Combinator

For big-budget players like Pepsi it makes sense to outsource anything you want – but it makes no sense for a startup. If you use these guys to develop your app you will have no control over your app architecture, the quality of code and much else. Pointless if you’re trying to build a technology company. And very expensive. DEVELOPMENT AGENCIES. These are the interesting agencies. In effect they specialise in delivering software. They are usually focused on specific technology platforms, such as Ruby on Rails, PHP and Android development. They will help you on all levels: from architecture and database design, to API development, to app development and testing. They can be useful to fill in technology or skill gaps – but, as we’ve seen, they need strong direction. There are truly spectacular companies in the UK – such as Thoughtworks – that charge truly eye-popping day rates, but the further you voyage, the more cost-effective they can be.


pages: 373 words: 112,822

The Upstarts: How Uber, Airbnb, and the Killer Companies of the New Silicon Valley Are Changing the World by Brad Stone

Affordable Care Act / Obamacare, Airbnb, AltaVista, Amazon Web Services, Andy Kessler, autonomous vehicles, Burning Man, call centre, Chuck Templeton: OpenTable, collaborative consumption, East Village, fixed income, Google X / Alphabet X, housing crisis, inflight wifi, Jeff Bezos, Justin.tv, Kickstarter, Lyft, Marc Andreessen, Mark Zuckerberg, Menlo Park, Necker cube, obamacare, Paul Graham, peer-to-peer, Peter Thiel, race to the bottom, rent control, ride hailing / ride sharing, Ruby on Rails, Sand Hill Road, self-driving car, semantic web, sharing economy, side project, Silicon Valley, Silicon Valley startup, Skype, South of Market, San Francisco, Startup school, Steve Jobs, TaskRabbit, Tony Hsieh, transportation-network company, Uber and Lyft, Uber for X, Y Combinator, Y2K, Zipcar

To understand the spark that finally ignited the Airbnb inferno, it’s imperative to explore the background of Nathan Blecharczyk, the tall, seemingly unflappable engineer of the group, the co-founder who always stayed behind while his partners traveled the world. Blecharczyk was twenty-four at this point but was already a technical wizard. He had coded the entire site himself, using what was then a new open-source programming language called Ruby on Rails. He devised a flexible, global payment system that allowed Airbnb to collect fees from guests and then remit them to hosts, minus the company’s commission, using a variety of online services such as PayPal. He had also presciently hosted the site on the nascent Amazon Web Services, a division of the e-commerce giant that allowed companies to rent remote Amazon servers via the internet only when they needed them, a huge cost savings and efficiency advantage that would power an entire wave of new businesses.


pages: 496 words: 174,084

Masterminds of Programming: Conversations With the Creators of Major Programming Languages by Federico Biancuzzi, Shane Warden

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Benevolent Dictator For Life (BDFL), business intelligence, business process, cellular automata, cloud computing, commoditize, complexity theory, conceptual framework, continuous integration, data acquisition, domain-specific language, Douglas Hofstadter, Fellow of the Royal Society, finite state, Firefox, follow your passion, Frank Gehry, general-purpose programming language, Guido van Rossum, HyperCard, information retrieval, iterative process, John von Neumann, Larry Wall, linear programming, loose coupling, Mars Rover, millennium bug, NP-complete, Paul Graham, performance metric, Perl 6, QWERTY keyboard, RAND corporation, randomized controlled trial, Renaissance Technologies, Ruby on Rails, Sapir-Whorf hypothesis, Silicon Valley, slashdot, software as a service, software patent, sorting algorithm, Steve Jobs, traveling salesman, Turing complete, type inference, Valgrind, Von Neumann architecture, web application

There’s a lot of truism to this dream of domain-specific languages, yet we somehow have not found the right vehicle to implement them, I feel like. Yet. So that does remain a challenge. Right now, we’re seeing this interesting resurgence of dynamic programming languages. I actually feel it is really in spite of the languages being dynamic and more because they have great metaprogramming capabilities. Like if you look at Ruby on Rails, it’s all powered by Ruby’s metaprogramming capabilities, not so much the fact that it’s dynamic. It just so happens that eval and metaprogramming are a lot easier in a dynamic language than in a static language. On the other hand, it’s a high price to pay to give up your statement completion and your compile-time error checking and so forth. The argument I’ve seen from lots of people who’ve been around dynamic languages for a while is Smalltalk’s browser.


pages: 1,201 words: 233,519

Coders at Work by Peter Seibel

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

Ada Lovelace, bioinformatics, cloud computing, Conway's Game of Life, domain-specific language, don't repeat yourself, Donald Knuth, fault tolerance, Fermat's Last Theorem, Firefox, George Gilder, glass ceiling, Guido van Rossum, HyperCard, information retrieval, Larry Wall, loose coupling, Marc Andreessen, Menlo Park, Metcalfe's law, Perl 6, premature optimization, publish or perish, random walk, revision control, Richard Stallman, rolodex, Ruby on Rails, Saturday Night Live, side project, slashdot, speech recognition, the scientific method, Therac-25, Turing complete, Turing machine, Turing test, type inference, Valgrind, web application

Seibel: Do you think that learning to work on teams that way also enables you to actually work on bigger things even by yourself when you're sort of a team spread across time? Norvig: I think that's true and that's certainly something I see in the younger programmers that are coming out now. Another difference between now and then is it seems like it's much more assembling pieces now rather than writing everything from scratch. Now, for a school assignment, someone says, “OK, I needed a website, so I used Ruby on Rails for this, and I used Drupal for that part, and then I had this Python script, and then I downloaded this statistical routine,” and it's all scripting to put together these pieces rather than writing everything from scratch. So I think understanding interfaces and how they go together is more important than all the details of the insides of these packages. Seibel: And do you think that changes the kind of people who can be successful at programming now?


pages: 671 words: 228,348

Pro AngularJS by Adam Freeman

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

business process, create, read, update, delete, en.wikipedia.org, Google Chrome, information retrieval, inventory management, MVC pattern, place-making, premature optimization, revision control, Ruby on Rails, single page application, web application

Understanding the MVC Pattern The term Model-View-Controller has been in use since the late 1970s and arose from the Smalltalk project at Xerox PARC where it was conceived as a way to organize some early GUI applications. Some of the fine detail of the original MVC pattern was tied to Smalltalk-specific concepts, such as screens and tools, but the broader ideas are still applicable to applications, and they are especially well-suited to web applications. The MVC pattern first took hold in the server-side end of web development, through toolkits like Ruby on Rails and the ASP.NET MVC Framework. In recent years, the MVC pattern has been seen as a way to manage the growing richness and complexity of client-side web development as well, and it is in this environment that AngularJS has emerged. The key to applying the MVC pattern is to implement the key premise of a separation of concerns, in which the data model in the application is decoupled from the business and presentation logic.


pages: 834 words: 180,700

The Architecture of Open Source Applications by Amy Brown, Greg Wilson

Amazon: amazon.comamazon.co.ukamazon.deamazon.fr

8-hour work day, anti-pattern, bioinformatics, c2.com, cloud computing, collaborative editing, combinatorial explosion, computer vision, continuous integration, create, read, update, delete, David Heinemeier Hansson, Debian, domain-specific language, Donald Knuth, en.wikipedia.org, fault tolerance, finite state, Firefox, friendly fire, Guido van Rossum, linked data, load shedding, locality of reference, loose coupling, Mars Rover, MVC pattern, peer-to-peer, Perl 6, premature optimization, recommendation engine, revision control, Ruby on Rails, side project, Skype, slashdot, social web, speech recognition, the scientific method, The Wisdom of Crowds, web application, WebSocket

This would not be possible in traditional open source projects, where most conversation takes place on IRC and mailing lists and the wiki (if present) is only used for documentations and links to development resources. For a newcomer, it's much more difficult to reconstruct context from unstructured IRC logs and mail archives. 19.8.3. Embrace Time Zone Differences David Heinemeier Hansson, creator of Ruby on Rails, once remarked on the benefit of distributed teams when he first joined 37signals. "The seven time zones between Copenhagen and Chicago actually meant that we got a lot done with few interruptions." With nine time zones between Taipei and Palo Alto, that was true for us during SocialCalc's development as well. We often completed an entire Design-Development-QA feedback cycle within a 24-hour day, with each aspect taking one person's 8-hour work day in their local daytime.


PostGIS in Action, 2nd Edition by Regina O. Obe, Leo S. Hsu

call centre, crowdsourcing, database schema, Debian, domain-specific language, en.wikipedia.org, Firefox, Google Earth, job automation, McMansion, megacity, Mercator projection, Network effects, openstreetmap, planetary scale, profit maximization, Ruby on Rails, Skype, South of Market, San Francisco, traveling salesman, web application

EnterpriseDB one-click installers will work for any desktop Linux system (32-bit and 64-bit), Windows 32-bit and 64-bit systems (2000, XP, 2003, 2008), and Mac OS X. The installer comes with the following prepackaged goods:  PostgreSQL Server  pgAdmin III (GUI database administration tool)  Application StackBuilder—Allows you to install PostgreSQL add-ons such as PostGIS, JDBC, and ODBC, plus application development environments such as Apache and Ruby on Rails, the PostgreSQL Tuning Wizard (to help you quickly configure memory and other settings for your desired profile), and the MySQL Migration Wizard (requires Java to be installed) Turn off User Account Control If you run into issues installing on Windows, try turning off User Account Control (UAC) located in Control Panel > User Accounts. In most cases, the newer PostgreSQL installers seem capable of creating a Postgres account on their own.