サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
新内閣発足
blog.arkency.com
Rails connections, pools and handlers … and check why 5600+ Rails engineers read also this Rails connections, pools and handlers In Active Record there are db connections, connection pools and handlers. To put it shortly: Connection Handler has many Connection Pools has many Connections Connection The connection object is the one you most often directly interact with. You can get hold of it via Ac
Interview with Scott Bellware (Eventide co-creator) about micro-services in Ruby, event sourcing, autonomous services, SOA, dumb pipes, EventStore and mis-representation of terms in IT … and check why 5600+ Rails engineers read also this Interview with Scott Bellware (Eventide co-creator) about micro-services in Ruby, event sourcing, autonomous services, SOA, dumb pipes, EventStore and mis-represe
Could we drop Symbols from Ruby? Don’t know about you, but I personally have been hit a least a dozen times by bugs caused by strings vs symbols distinction. That happened in my own code, and it happened when using some other libraries as well. I like how symbols look in the code, but I don’t like the specific distinction that is made between them and strings. In my (perhaps controversial opinion)
How to safely store API keys in Rails apps Inspired by a question on reddit: Can you store user API keys in the database? I decided to elaborate just a little bit on this topic. Assuming you want store API keys (or passwords for SSL ceritifcate files) what are your options? What are the pros and cons in each case. Save directly in codebaseHow? #config/environments/production.rb config.mailchimp_ap
What I learnt today from reading gems’ code Today I was working on chillout.io client and while I was debugging some parts, I had a look at some Ruby gems. This is always an interesting experience because you can learn how other developers design their API and how different it can be from your approach. Sidekiq So here are some interesting bits from sidekiq code. Sidekiq::Client initializer module
Custom type-casting with ActiveRecord, Virtus and dry-types … and check why 5600+ Rails engineers read also this Custom type-casting with ActiveRecord, Virtus and dry-types In Drop this before validation and just use a setter method I showed you how to avoid a common pattern of using before_validation to fix the data. Instead I proposed you just overwrite the setter, call your custom logic there a
Why classes eventually reach 50 columns and hundreds of methods … and check why 5600+ Rails engineers read also this Why classes eventually reach 50 columns and hundreds of methods There are dozens of small or bigger problems that we can have in our code. Like diseases, they affect our applications and make them harder to maintain, expand and enjoy. They give us a headache and they give bugs to ou
Ruby code I no longer write When we learn programming languages and techniques we go through certain phases: Curiosity Admiration Overdosage Rejection Approval etc. Similarly with other things we enjoy in our life such as ice cream, pizza and sunbathing :) We learn to enjoy them, we try too much of it and learn the consequences. Hopefully some time later we find a good balance. We know, how much o
On upcoming immutable string literals in Ruby … and check why 5600+ Rails engineers read also this On upcoming immutable string literals in Ruby Today I checked one of the solutions made by our Junior Rails Developer class student. As part of the course they make Rails apps but also learn from smaller code examples delivered by exercism.io. I found there an opportunity for him to learn more about
Safer Rails database migrations with Soundcloud's Large Hadron Migrator … and check why 5600+ Rails engineers read also this Safer Rails database migrations with Soundcloud’s Large Hadron Migrator When I first started using Rails years ago I fell in love with the concept of database migrations. Perhaps because at the time I was working on commercial projects in C# which lacked this and I could fee
CQRS example in the Rails app Recently I have worked in a new project for some time. We implement an application where one functionality is to show an organization’s (tree-like) structure. The structure contains information about relations between employees. I have been thinking how to build this feature. I was wondering if I should go typical way implementing all CRUD actions. In this case I woul
Building an Event Sourced application using railseventstore … and check why 5600+ Rails engineers read also this Building an Event Sourced application using rails_event_store Still not sure what is Event Sourcing and CQRS? Looking for a practical example? You’ve just read my previous post Why use EventSourcing and decided to give it a try? No matter why let’s dive into building an Event Sourced ap
Don't forget about eager_load when extending autoload paths … and check why 5600+ Rails engineers read also this Don’t forget about eager_load when extending autoload paths I am sure you know about config.autoload_paths. A setting which allows you to add aditional directories (besides app/* which works out of box) that can be used for placing your .rb files. The documentation mentions a config.aut
How good are your Ruby tests? Testing your tests with mutant … and check why 5600+ Rails engineers read also this How good are your Ruby tests? Testing your tests with mutantNew-feature-bugs vs regression-bugs There are many kinds of bugs. For the sake of simplicity let me divide them into new-feature-bugs and regression-bugs. New-feature-bugs are the ones that show up when you just introduce a to
Start using ES6 with Rails today Source: Asif Salman The thing that made me fond of writing front-end code was CoffeeScript. It didn’t drastically change syntax. Coffee introduced many features that made my life as a web developer much easier (e.g. destruction and existential operators). That was a real game changer for Rails developers. We can write our front-end in language that is similar to Ru
Extract a service object using SimpleDelegator … and check why 5600+ Rails engineers read also this Extract a service object using SimpleDelegator It’s now more than 1 year since I released the first beta release (the final release was ready in December 2014) of the “Fearless Refactoring: Rails controllers” book. Many of the readers were pointing to the one technique which was especially useful to
How to store emoji in a Rails app with a MySQL database … and check why 5600+ Rails engineers read also this How to store emoji in a Rails app with a MySQL database Suppose you have a Rails app and you are storing your data in a MySQL database. You were requested to add emoji support to your application. Probably you are thinking: Oh, that’s simple, it’s just unicode, isn’t it? The answer is: no.
Gulp - a modern approach to asset pipeline for Rails developers … and check why 5600+ Rails engineers read also this Gulp - a modern approach to asset pipeline for Rails developers Rails asset pipeline is one of things that makes Rails great for creating simple applications fast. It solves a big problem of serving our assets efficiently in both development and production environment. While being v
Bring CommonJS to your asset pipeline A few weeks ago, Marcin recommended Gulp as the Rails asset pipeline replacement. Today I am going to tell you how you can benefit from CommonJS modules in your Rails application with asset pipeline enabled. You don’t have to disable asset pipeline in your Rails application in order to use CommonJS module loading in your JavaScripts. One of tools that allows y
Mastering Rails Validations: Contexts Many times Rails programmers ask How can I skip one (or more) validations in Rails. The common usecase for it is that users with higher permissions are granted less strict validation rules. After all, what’s the point of being admin if admin cannot do more than normal user, right? With great power comes great responsibility and all of that yada yada yada. But
Frontend performance tips for web developers Optimization has always been a tough topic. Donald Knuth said that premature optimization is the root of all evil. Performance is something that always causes emotions in web community. When we need it, we tune up our applications, try different and new servers, use load balancers, speed up our applications by playing with threads and processes, but som
How to start using Arrays in Rails with PostgreSQL … and check why 5600+ Rails engineers read also this How to start using Arrays in Rails with PostgreSQL So far we covered a lot of PostgreSQL goodness. We’ve already talked about using uuid or storing hashes in our Rails applications with PostgreSQL database. Now is the time to do something in the middle of these topics (more complex than uuid, bu
React.js and Dynamic Children - Why the Keys are Important … and check why 5600+ Rails engineers read also this React.js and Dynamic Children - Why the Keys are Important Recently I’ve been building a pretty dynamic interface based on google analytics data for one of our customers. There was a bug that I couldn’t quite figure out because of my wrong understanding of how react works. In the end it
RubyMotion app with Facebook SDK This will be short, simple, but painless and useful. We’ll show you how to integrate Facebook SDK with RubyMotion application. Recently we encouraged you to start using RubyMotion and we presented some useful gems to start developing with. Now, we’d like to show you how to integrate Facebook iOS SDK with RubyMotion and create sample application from scratch. Boiler
6 front-end techniques for Rails developers. Part I: From big ball of mud to separated concerns … and check why 5600+ Rails engineers read also this 6 front-end techniques for Rails developers. Part I: From big ball of mud to separated concerns Photo remix available thanks to the courtesy of Clever Cupcakes. CC BY 2.0 Current trends in web development forces us to write more and more front-end cod
4 ways to early return from a rails controller … and check why 5600+ Rails engineers read also this 4 ways to early return from a rails controller When refactoring rails controllers you can stumble upon one gottcha. It’s hard to easily extract code into methods when it escapes flow from the controller method (usually after redirecting and sometimes after rendering). Here is an example: 1. redirect
Microservices - 72 resources Microservices - everyone talks about them nowadays. There’s no common understanding however what they are. I’ve been researching this topic for a while, gathering and evaluating articles, presentations and conference videos. Articles and presentations http://martinfowler.com/articles/microservices.html Good broad introduction to the topic and further references, mentio
From Rails to RubyMotion: basic toolkit Have you noticed the tendency that development is moving strongly towards mobile? There are more and more projects with mobile companion, there are a lot of just-mobile software houses, and there are even only-mobile projects. What if a company has only web developers specialized in Ruby, but want to be really full-stack? Doesn’t matter, with Ruby, it can st
Share your email so Arkency can send you stories about everyday struggles and solutions for building maintainable Rails apps.
次のページ
このページを最初にブックマークしてみませんか?
『| Arkency Blog』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く