Videos provided by RubyKaigi via their YouTube Channel
Rails endorses fixtures to build and maintain test data in our web apps. Fixtures look very easy at first. Just a YAML file and we auto-magically get users(:john) in our tests.
As our requirements grow, we start fighting with fixtures. How to get ordered records. How to use my own values for ids, timestamps? How to maintain associations? How to generate on the fly dynamic data?
Lets seek answers to these questions by going deep down fixtures internals. In the process we will also see how others like FactoryGirl are doing this task of generating and maintaining test data.
Oracle Enhanced Adapter is one of the 3rd party ActiveRecord database adapters. It supports Rails from 2.3 to 4.1. It has been developing well since version 1.5.0 was released on the day same day Rails 4.0.1 was out, November 1st 2013. Now we are on the way to support Rails 4.2.
In Rails world MySQL and PostgreSQL are two giant databases, Oracle database does not have much presense here. Although it has better features such as good optimizers it also has some non-standard features like handling empty string as NULL. However, this situation has been changing. Finally Oracle 12c implements row limits and offset then developers can write better Top-N queries without dirty subquery and rownum statements. I'll introduce a experimental Arel implementations without ugly order_hacks method.
I have been working for Oracle enhanced adapter since August 2011, starting from Rails 4 support. It is still the first 3 years. Fortunately I'm still enjoying to do that, yes I'm not burned out yet. I'm sorry that I have nothing to do with your license fee but we can keep contributing source code to resolve your technical issues. I'd be glad to hear that anyone start using Oracle database and Oracle enhanced adapter with your Rails applications.
Oracle Enhanced Adapterは、ActiveRecord 3rd partyデータベースアダプタです。Rails 2.3から4.1に対応しており、Rails 4への対応も4.0.1がリリースされた2013年11月1日と同日から対応するなど、着実なサポートが継続されており、現在はRails 4.2の対応が進んでいます。
ご存じの通り、Railsの世界ではMySQLとPostgreSQLのふたつのデータベースが大きなシェアをもっており、Oracleの利用報告はごくわずかです。優れたオプティマイザなどの機能を持つ反面、NULLと空文字を同様に扱うなど、"標準"とはことなる独自の実装がなされてきましたが、近年では他データベースでの便利な機能やSQL標準の対応もされるようになりました。なかでも、Oracle 12cでは、row limits、offsetの対応が追加され、ようやくまともなTop-N queryが書けるようになりました。これにより、悩ましいArelでのorder_hacksが削除されたシンプルなArel実装を紹介します。
私は2011年の8月からOracle enhanced adapterのRails4対応から、まだ最初の3年間ではありますが、燃え尽きることなくやってくることができました。 ライセンス費用は私にはどうすることもできませんが、Railsで利用するための技術的な課題が解決されることで、OracleをRailsのデータベースとして採用するきっかけとなれば幸いです。
In this presentation we'll cover performance improvements we've been making to Rails for the 4.2 release. We'll cover improvements to Active Record for speeding up database interactions, and performance improvements to Action View for speeding up rendering. We will also discuss techniques that can be used in your application for performance testing and improvements.
We have been working on payment market with embedded applications for 3 years, providing a development platform for machines of Point Of Sale, it was develop only for some devices with our own Virtual Machine. After made so many mistakes in our own Virtual Machine We found MRuby as new Virtual Machine and We had a big jump in quality. Improving tests, time to support new devices, code beauty, user development experience and including expand the platform for mobiles. This presentation is focused on the testimony of this path. Let's talk about others technologies We leave to get MRuby. The difficulties, solutions and how We managed to link MRuby with many devices.
This talk will cover tools and techniques used at github.com to keep our ruby code running fast. We'll highlight new APIs available with Ruby 2.1 for easier cpu profiling, object allocation tracking and heap dumping. Each technique will be presented with a variety of real-world examples of how it was used to solve problems in a high-traffic rails application.
RailsGirls is an activity to introduce Ruby and Rails to women, ranging from beginners to programmers familiar with other languages. There are nine events held in Japan so far with more than 300 participants.
The speaker first participated RailsGirls Tokyo 2nd as a trainee (aka girl), and then Tokyo 3rd as a coach.
In this session, she will introduce what RailsGirls is and how you can contribute to the activity and why you want. Also she will discuss about why we need more women in software engineering and why diversity is necessary.
When you start seeing the problem for your production app, what would you do? How would you look into that problem? As a support engineer, I've seen many Rails apps that are having various problems. This talk will cover what you can do when you see the problem, and what you should start doing right now to prevent the problem from happening, based on a real experience.
Continuous Delivery (CD) is the practice of building software that is ready to be deployed to production at all times. CD requires a stable, automated build pipeline, with simple, push button deployments, guided by feedback and metrics on the health of the production system. By refining and shortening feedback loops throughout the entire software process, it is possible to continually be delivering high-quality, working software to happy customers.
At GitHub, we deploy hundreds of times in the course of an average day. We practice continuous delivery from design, development and ops, through our release processes and into customer support. This talk will cover many of the techniques and tools we use for continuous delivery at GitHub, including pull requests, feature toggles, chat ops and continuous integration and deployment. We will also discuss core principles so you can apply these lessons in your own Ruby deployment environment, software process, and business.
Are you getting tired of using many kinds of assertions when you write test code? Power Assert provides a simple answer for it. This presentation shows its concept and how to implement it.
For 30+ years, console video games have captured the imagination of children and adults alike. This presentation describes how a childhood love of video games can translate into a love of programming and a general understanding of low-level computing through the hobby known as ROM hacking. We’ll also review everything you need to know in Ruby for it to be your ROM hacking language of choice.
Over 13 years ago I learned to program as I was motivated to write tools that would allow me and my friends to more easily translate the ROMs of Japanese Famicom and Super Famicom games that had never been released in English (for our NES and Super NES.) Through ROM hacking, my love of video games helped lay the groundwork for my college education and career in software development. As Ruby became my language of choice professionally, I also began writing all my ROM hacking tools in Ruby as well.
Even for experienced developers who have cut their teeth on higher-level programming languages like Ruby and web frameworks like Rails, an overview of ROM hacking with Ruby provides a fun opportunity to understand the basics of some important lower-level computing concepts:
Pointers, stack, memory pages, etc.
Binary file handling.
Binary file format concepts.
Writing simple command line tools.
Assembler and binary disassembly.
It will be fun to review these concepts in the context of video games and ROM hacking, but they’re also broadly applicable and a level-up for any developer.
Ruby is a so enjoyable programming language.
One of the biggest attraction of Ruby is that it is easy to "meta-programming".
The words "meta-programming" sounds that are complex and not very common, but it is very familiar in Ruby. Many popular features of Ruby, eg attr_accessor() or has_many() on Rails, are also built with Ruby's meta-programming mechanism.
Although meta-programming is familiar in Ruby, the knack is required in order to use it well. Unreserved use of reflection API easily makes a code hard to maintenance.
In this presentation, I want to tell you ideas for using practical meta-programming without too much increase the complexity. I hope that people feels meta-programming more familiar and easy to maintenance, and they enjoys Ruby programming more.
This story is based on the presentation I hold at Ruby Association seminar. I'm going to update towards the September 2014, the time with Ruby 2.1 is.
In modern development environment, developers use pull requests to review all changes of code. "bundle update" generates diff of Gemfile.lock, so why not review it on pull request as well?
I want to have better experience around "bundle update". At RubyKaigi 2013 , I also shared an idea about "bundle update" and pull request integration. But after that, I noticed another problem: the diff of Gemfile.lock is not easy to review.
In this talk, I will introduce Compare Linker , a tool to make GitHub's compare view URL  for upgraded and/or downgraded gems from difference of Gemfile.lock.
I will talk about my challenge to make "bundle update" more fun to review. I will show my solution (what I made), motivation (why I needed it) and implementation (how I solved problem).
I also will share my precious findings from this challenge.
This talk will demonstrate some tips about how Ruby can process streaming. And take Camera Remote API (using Sony camera) for instance. Integrate with Sinatra, and finally display camera live preview in web page.
For non C-programmer, it is difficult to take his/her first step toward reading implementation of Ruby interpreter.
I’m now trying to read it. At the last the last Rubyconf.tw 2014, I talked about ""how to take the first step"", titled ""walking-around-the-ruby-forest"": introduced the books for reference, glanced Ruby source files, and showed basic ruby data-structure. https://speakerdeck.com/yotii23/walki....
In RubyKaigi 2014, I’ll talk about one more step, more detailed Ruby Implementation.
Ruby by default comes bundled with synchronous mechanisms for asynchronous programming. Most applications work fine with existing libraries, so for many people these synchronous mechanisms are taken for granted.
However, occasionally you may have the inclination to design your own synchronous mechanisms. Maybe you just learned about some elegant synchronous mechanism (Linda), or about popular mechanisms in other languages (channels in Go), or maybe you were pressured by the creators of popular libraries to come up with a better design yourself. All this leads you to consider the "primitives" of synchronous programming, and give your ideas a try.
In this session, we will learn techniques for implementing synchronous mechanisms, like channels in Go, in Ruby, by actually designing and implementing some of your own. Together we will discover the joy of designing a minimal interface, and the joy of implementing one.
This talk describes three Ruby usages:
Implementing high-level interface by Ruby.
Using Ruby as a glue language.
Embedding Ruby into a C program for flexibility.
All of them have pros and cons. They are trade-off. If a case can ignore cons, we will have pros for the case.
Most of Rubyists implement their Ruby applications only by Ruby. This talk shows another options to use Ruby as your convenient tool.
If you know another options and trade-offs of them, you will implement your Ruby applications more effectively.
This talk uses Droonga, a distributed full-text search engine, as a sample application to describe these Ruby usages. Droonga uses these three Ruby usages.
About implementing high-level interface by Ruby:
High-level interface is Ruby on Rails (contrasted with Rack), Web API (contrasted with library API) and so on.
Ruby itself and its libraries provide many convenience features for text processing, networking, process management and so on.
We can use Ruby to implement high-level interface rapidly and robustly.
On the other hand, Ruby is not the fastest programming language in the most cases. An application that implements high-level interface by Ruby may be slow.
About using Ruby as a glue language:
A glue language exports features in language1 to language2.
We can use Ruby as a glue language. If we implement a well-written glue, users never notice that the exported features aren't implemented in Ruby.
We can speed up our applications by using features implemented in C. C is faster than Ruby for most cases. This fact can improve Ruby's disadvantage in performance.
If we can use well-written glues, we still live in Ruby world with high performance. We don't need to think about other languages.
About embedding Ruby into a C program for flexibility:
Ruby is easy to try and error. We can improve development speed (not application performance) to implement features by Ruby instead of C.
It will reduce application performance. But if features replaced by Ruby are not performance critical features, replacing by Ruby has more merits than demerits.
This talk will demonstrate some tips about how Ruby can process streaming. And take Camera Remote API (using Sony camera) for instance. Integrate with Sinatra, and finally display camera live preview in web page.
ServerEngine is a framework which can make robust multi-process / multi-thread like Unicorn. With ServerEngine, we use Ruby as a reliable environment to write system programs for 24/7 services.
This presentaion will talk ServerEngine architecture and functionality, how ServerEngine simplied real appliations, and how to apply ServerEngine to your systems.
There are many cases we need to change ruby code besides implementing features, e.g. we will change old hash / lambda to new syntax when upgrading ruby to 1.9 or newer, every time when we upgrade rails, we have to replace old deprecated syntax or configs with new ones. Most of changes are repetitive, boring and time-consuming, I will introduce you how to write some simple ruby code to do these changes automatically, it saves your time and you don't need to repeat yourself again.
In the 1980's, Nintendo had plans for making a knitting add-on to the NES, with an interface that resembled Mariopaint, but with patterned mittens, sweaters, and scarves as output. Sadly, this product never saw the light of day.
Devastated upon hearing this and dreaming about what could have been, a group of Airbnb engineers (who knew nothing about machine knitting) set out to hack a knitting machine from the 1980's to be computer-controlled, using a tutorial from adafruit as a starting point.
Hear about our struggles and triumphs, which ranged from learning to replace knitting machine needles and conduct basic repairs, to emulating a floppy drive and hacking together a custom cable cable to send our own patterns to the machine, to writing our own yarn printer API in ruby/sinatra and printing our first doge meme in yarn. And watch us as we send images and knit requests to our yarn server, and behold as it knits ugly sweaters from those images!
I'll introduce Symbol GC for Ruby 2.2.0.
I'll talk about these topics.
Is Symbol of other programming languages collectable?
How difficult do CRuby collect Symbol.
How do I implement Symbol GC.
As the increase of large-scale Web services, Web applications are increasingly sophisticated. The increase of smartphones makes traffic to Web servers increase each day. Management of Web servers is increasingly important. When a Web server receives resource-hungry requests, administrators of the web server must control the resources flexibly. However, existing resource control methods process mandatorily such as denial, disconnect or the like of the request when the number of simultaneous connections, request per unit time, CPU used time or memory utilization exceed a certain threshold value. These methods can’t control resources processing request. In this situation, if one request has the potential to occupy a majority of computer resources, the server process can process other request in principle by separating resources of the server process temporarily without using up the saving of computer resources. In this paper, we propose a resources control architecture scripting with mruby for a Web server separating computer resources virtually by a HTTP request using mod_mruby and mruby-cgroup. Each HTTP request processing is allocated virtual computer resources temporarily and the request is process within the limit of the allocated computer resources in our architecture. Therefore, each request processing has a very small effect if clients access to contents heavily or a particular content occupy a majority of computer resources. If a request has the potential to occupy a majority of computer resources, our architecture can process the request continually within the limit of the allocated computer resources without denying or disconnecting requests mandatorily.
Reish is an unix shell for rubyist.
While Ruby doesn't have a "There should be one, and preferably only one way to do it" philosophy like Python, writing the best code using the best algorithm to solve the problem will save you time and money and is going to be better in the long run. Come join us in this little game show where everyone guesses which code snippet is the best way to solve a particular problem. Do you think you can spot the better code?
How do you feel about your controller testing strategy? Do you feel begrudgingly obligated to write them? Do you find yourself stubbing methods like find_by only to feel a vague sense of dissatisfaction? Is your test suite soul-crushingly slow because you’re relying on integration specs to test controllers? Do you write controller specs at all?
Rails controllers are wonderfully idiomatic and declarative to the point of being almost redundant. This is a good thing; it keeps many concerns like authentication and server response consistent while keeping business logic in models where it belongs. But this same simplicity leaves many developers conflicted about how and what to test in controller specs. To properly test Rails controllers we need a testing strategy as declarative as the controllers themselves. Come find out how to write controller specs that are as simple and concise as well written Rails controllers!
If you've ever misspelled a word while searching on Google, you've benefitted from decades of distance algorithm development. In this talk we'll break down some popular distance measurements and see how they can be implemented in Ruby. We'll look at real world applications with some live demos. It won't matter if you get your kicks "Hamming" it up, if you drink your coffee in a "Levenshtein", or if you're new to Ruby: this talk is Rated R, for "all Rubyists". You'll be guaranteed to walk away with O(n^n) expectations met.
Single page apps are becoming more and more ubiquitous in today's market. While the role of the ruby backend has receded, there is still an important role to play for web servers.
I will discuss common problems introduced by a client-first approach to development. As well as provide some ways to leverage ruby to provide solutions to these problems. In addition, looking forward, I'll outline ways you can squeeze out some extra performance from your stack by backing your single page app with a ruby backend.
Fluentd is a fully free and open-source log management tool designed for processing data streams.
In this presentation, I will explain the internal implementation details of Fluentd such as:
The bootstrap sequence of Fluentd, and how Fluentd loads plugins
How Fluentd parses the configuration file
How an input plugin passes the data to output plugins internally
How a BufferedOutput plugin processes data
The event-driven programming using cool.io, and effects of GVL
I will describe the behavior together with the knowledge obtained in the operation at production. While such detailed knowledge is not essential in the use of Fluentd, it should provide you a variety of useful findings for your operation.
DISCLAIMER: In this presentation, I do not explain, what is Fluentd, and how to use Fluentd. Audiences who have following experiences are desirable:
Have ever used Fluentd
Have ever written Fluentd plugin(s)
というわけで、今年のRubyKaigi最終日は、日本を代表するRuby on Rails採用企業の開発者によるパネルディスカッションから始まります。「イマドキのRailsアプリケーションってどうやって開発するのがベストなの？」から「なお、Railsブームから10年経った模様」みたいな話まで、Railsアプリケーション開発現場の最前線でバリバリに活躍している人たちから、パネル形式でホンネを引き出しちゃいます！
RubyMotion is a Ruby-based toolchain for iOS and OS X development, and it now supports Android development.
RubyMotion for Android features a brand-new runtime based on Java. It is a new implementation of Ruby.
In this case, we will go inside RubyMotion for Android and cover how things work. Java API call, memory management, application static compilation, etc. It will be very technical.
JRuby is a fast, compliant Ruby implementation which can make use of many features of the Java platform. We are rapidly nearing completion of our next version, JRuby 9000. JRuby 9000 is a major release featuring Ruby 2.1 compliance, a new runtime implementation, rewritten IO subsystem, and several other large changes. We are also making some new tooling to make memory management problems easier to diagnose as a Ruby programmer. Come hear about the status of JRuby 9000 and why this will be our best release yet.