The RSpec Book About this Book 450 pages Published: Release: P2.1 (2012-09-13) ISBN: 978-1-93435-637-1 You’ll get started right away with RSpec 2 and Cucumber by developing a simple game, using Cucumber to express high-level requirements in language your customer understands, and RSpec to express more granular requirements that focus on the behavior of individual objects in the system. You’ll learn how to use test doubles (mocks and stubs) to control the environment and focus the RSpec examples on one object at a time, and how to customize RSpec to “speak” in the language of your domain. You’ll develop Rails 3 applications and use companion tools such as Webrat and Selenium to express requirements for web applications both in memory and in the browser. Whether you’re developing applications, frameworks, or the libraries that power them, The RSpec Book will help you write better code, better tests, and deliver better software to happier users. Foreword Caution! No. I’m not sure I should tell you.
LimeJS HTML5 Game Framework The Cucumber Book About this Book 336 pages Published: Release: P3.0 (2014-03-28) ISBN: 978-1-93435-680-7 Matt Wynne and Aslak Hellesøy show you how to express your customers’ wild ideas as a set of clear, executable specifications that everyone on the team can read. You’ll learn how to feed those examples into Cucumber and let it guide your development. You’ll build just the right code to keep your customers happy, and not a line more. Although it was born in the Ruby community, you can use Cucumber to test almost any system, from a simple shell script or Perl script, to web applications written in PHP, Java, or any platform. In Part 1, you’ll get started by using the core features of Cucumber and working with Cucumber’s Gherkin DSL to describe—in plain language—the behavior your customers want from the system. In Part 2, you’ll consolidate the knowledge you’ve gained with a worked example, where you’ll learn more advanced Cucumber techniques. About the Author Upcoming Author Events
HTML5 Canvas Particles Fountain Explosion with Gravity | Code Theory One of my previous posts talked about implementing gravity in our canvas experiments. Eventually, we made a realistic bouncing ball. We’ll kind of extend that experiment to make a quick fountain explosion on canvas obeying gravity. Demo I have made a demo as a codecast. Understanding the Logic First, there’s all those basic code where we get the 2d context of canvas and set our gravity value along with particles count. The initial velocities on both axis are randomly generated. It is important to note that vy must be negative initially. Finally, let’s talk a bit about the main part of the code that does the animation along with other tasks like applying gravity, repositioning the particles when they move off the canvas and clearing off the canvas to prevent the particle trails from showing up. Initially, we clear the entire canvas in renderFrame so that the particles do not leave trails when moving. Just re-setting the x and y positions is not enough. Still confused ? Final Words Share:
Scripted GUI Testing with Ruby If you need to automatically test a user interface, this book is for you. Whether it’s Windows, a Java platform (including Mac, Linux, and others) or a web app, you’ll see how to test it reliably and repeatably. Many automated test frameworks promise the world and deliver nothing but headaches. This book is for people who want to get their hands dirty on examples from the real world—and who know that testing can be a joy when the tools don’t get in the way. eBook This version, last updated Jan 2012, refreshes the RSpec examples for version 2.x.
Absolutely No Machete Juggling » Scala Second Impressions In December, I posted about my early thoughts on Scala after using it for a short time. Initially, I thought that using Scala didn't buy very much - the functional style could be adopted in in Java, and the syntax and libraries could be ugly. Since that time, I've been using Scala almost exclusively, and I wish to revise my view: Scala is awesome. While some of my initial thoughts still stand, particularly that Scala APIs often overuse operator overloading, much of my perception has shifted otherwise. A great deal of my perception shift has been due to familiarity and training. Read the entirety of Odersky et. al.' All of these resources, combined with a continued daily use of Scala, led to me using Scala in a much meatier way than previously, enabling me to write some extremely expressive code. I really like how strict Scala is in terms of the compiler. Pattern matching is simply awesome. There are a few nags I have about Scala.
Continuous Testing About this Book 160 pages Published: Release: P1.0 (2011-06-27) ISBN: 978-1-93435-670-8 Now you can immediately detect problems in code—before it’s too late, and before problems spread. It isn’t magic, but a clever combination of tests, tools, and techniques that tells you right away when there’s a problem. Not minutes, hours or days from now, but right now, when it’s easiest to fix. Spend more of your time writing valuable software, and less time slogging through code line-by-line and second-guessing your decisions. We’ll show you how to set up and run automated tests that check your work continuously as you write code. You’ll discover the fundamentals of creating and maintaining a test suite that’s fast, informative, reliable, and exhaustive. You’ll start with examples in Ruby, Rails, and JavaScript, but you’ll learn general techniques you can apply to a wide range of languages and frameworks. About the Author
Scala: The Scalable JVM Language Cheat Sheet from DZone Refcardz The Scalable JVM Language By Jesper de Jong What is Scala? Scala is a general-purpose programming language that has both object oriented and functional programming language features. It is statically typed, with an advanced type system that is more powerful than that of other languages such as Java and C#. The name Scala comes from scalable language: scalable in the sense that the core language constructs of Scala are so modular that new features can merely be added by libraries instead of adjusting the language. Downloading and Installing Scala You can download Scala at www.scala-lang.org. Using the REPL Scala comes with an interactive interpreter, the REPL (for Read, Evaluate, Print Loop). $ scala Welcome to Scala version 2.9.1.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_02). You can type statements and expressions at the prompt, and the REPL will evaluate these and print the results. Scala as a Scripting Language #! ::#! Using the Scala Compiler Build Tools IDE support Types Tuples
Ruby Basics - Data Types This is the first in a new series on beginning development with Ruby. Each entry in the series will cover a different basic programming concept starting with data types. All modern programming languages have a defined set of data types, most of which are shared between languages. The classes for these data types are: BooleanNumberStringArrayHashesSymbols Boolean I want you to remember back to when you were in elementary school passing the pretty girl a note asking her if she like likes you, check yes or no. For more information on booleans, check out the Ruby Documentation here and here. Number The two most commonly used types of numbers are integers and floats. Integers are whole numbers, or numbers that do not have a decimal place or fraction. Floats are the equivalent to Decimals in .Net and hold numbers with a decimal place. Check the out Ruby Documentation on integers here. String Strings are one or more characters of letters, numbers, and punctuation. “Hello \nBacon” = Hello = Bacon
Rails Rumble Winners - Gem Teardown - DwellableTrends Welcome to the Gem Teardown for the 2013 Rails Rumble. For background, the Rails Rumble is a competition where teams have 48 hours to build a Rails app from scratch. Teams compete for fame and sweet prizes provided by the Rails Rumble sponsors. The contest wrapped up last week and the winners have been announced. Congratulations to everyone who participated! The Rails Rumble organizers (especially Tom Mango and Zach Inglis) were kind enough to collect Gemfiles from the teams and provide them to me for analysis. I analyzed 221 Gemfiles. The stack The basic Rails stack: Rails - 83% used Rails 4, the rest stuck with Rails 3. Note for the pedantic: Yes, I know that Coffeescript and Sass are both included in the default Rails Gemfile. First surprise - Turbo unlinked This was an eye opener for me - a ton of the Rails 4 teams turned off Turbolinks. MySQL and Postgres are duking it out MySQL and Postgres were evenly matched at 43% and 37% respectively. Javascript MVC - not Testing frameworks
Basics of Implementing Gravity with HTML5 Canvas | Code Theory When creating some canvas experiments like a particle emission system or a game, gravity can be a key feature to implement. Figuring out how to implement gravity on an object in terms of coding can be a bit confusing. We’ll try to comprehend it, by putting it into code in a simplified manner. I liek simplicity! Understanding Gravity You probably already know what gravity is. When an object falls, it’s direction is downwards. Getting to Code First we’ll code a little canvas experiment where a ball moves upwards and then downwards. Simple and basic stuff, right ? A Simple Ball Constructor with properties for radius, x position, y position and drawing the ball. The renderFrame method moves the ball upwards which is quite easy. It is very important to understand that vx and vy are just constant values that are added on the x and y positions of the ball, that’s it. You can relate this entire demo to a kid who stands in a playground, holding a ball in his hands. Gravity as Acceleration Yes! Hey!
shopify.github.com/dashing/