Posted: Apr 11, 2021
In the team I work we try to see what can be improved in our projects before it hits us, performance is one of those topics.
In general, I like to play with different profilers. Especially, we are on Heroku, thus if we can optimize something we can...
Posted: Apr 12, 2020
Grape offers a mount method for combining parts (endpoints) of API.
class AddressAPI < Grape::API
get '/addresses' do
# logic here
# params declaration
post '/address' do
# logic here
Posted: Dec 8, 2019
By default Grape uses ActiveSupport::HashWithIndifferentAccess as a parameter builder. The most important thing about
ActiveSupport::HashWithIndifferentAccess is that symbols are mapped to strings when used as keys.
So, if your routers refer to parameters...
Posted: May 25, 2019
Most likely, you've heard of Cache storage API and Service worker which might be used for caching resources and serving them later from the cache. One use case for that is prefetching resources before users need them.
I've been working on a project
Posted: Mar 23, 2019
Sinon.js is a nice library which I've used in a number of projects for stubbing XMLHttpRequest. However, technologies have changed since the library was created.
Now, we have Service Workers which are capable of doing even more.
As you might know...
Posted: Apr 8, 2018
Nobody likes to wait. When a user clicks on a link, they want to get an immediate response. If it takes a while, the user might switch to another tab and completely forget about the opened site which is loading. In fact, it means lost customers for...
Posted: Jan 27, 2018
There are lots of sites with different content. In most cases, similar information a user looks for can be found on a few resources. Thus, if a site is slow or it doesn't respond, the user will choose another one. To win this competition, your site...
Posted: Dec 9, 2017
A topic about stubs in tests appears now and then. There are people who think that stubs/mocks (there are differences between them, but I will refer to them as stubs. I am sorry, this post isn't about differences between them) are very helpful and...
Posted: Aug 13, 2017
Recently, I've read Pete Corey's article about recurring tasks in Elixir. It was quite interesting, because a few months ago I solved the same problem by applying an alternative solution.
After getting an experience in Erlang OTP, I feel like it is...
Posted: Jun 5, 2017
A few months ago I wrote an article about prerendering pages in browsers. The idea looked quite simple. There were a few technologies (Elixir and Neo4j) which I wanted to try. So, I started implementing the solution as a project. Currently, the project...
Posted: Oct 29, 2016
Polymer.js doesn't provide a straightforward way to use a custom template in place of the template supplied by a component. Also, HTML code embedded into a component doesn't have access to properties of the component.
Posted: Sep 27, 2016
I guess lots of people might have heard about the prerender feature supplied by most of the browsers. The idea of it is very simple. A site can tell the browser which the next page should be prerendered for the current user. As a result, when the user...
Posted: May 1, 2016
Data binding is a default approach to setup data sharing between web-components built on Polymer.js.
Posted: Apr 16, 2015
For one of my projects I decided to use Padrino instead of Rails. I worked with Sinatra, therefore I thought that Padrino would work for me as well. Actually, I guess even Sinatra matches my needs, but start of a project with Sinatra is slower, because...
Posted: Dec 16, 2014
I heard about DataMapper 2 (predecessor of ROM) in 2012 at RubyShift conference in Kyiv, Ukraine. Piotr Solnica explained the idea of this project. The info from the presentation looked awesome. Three layers to work with data were supposed to be there...
Posted: Dec 10, 2014
Recently I have had to stub API responses in our tests when an user uses pagination. We have the pagination similar to the pagination of Facebook: you scroll down and you receive new items in the list. It was challenging, because SitePrism.Vcr only...
Posted: Nov 24, 2014
Most of the developers don't like to work with legacy code even when it was created by them. A good developer should grow. If you take a look at code which you wrote last year and you don't want to improve it, it is a sign that you didn't grow since...
Posted: Nov 16, 2014
The project I work on consists from a few parts which are written on PHP, Ruby and Java. To write proper acceptance tests on Ruby part, we have been using VCR which stubs external API. In our case we stubbed all interactions with PHP and Java parts...
Posted: Dec 10, 2013
We have released a new version of SitePrism.Vcr gem. Thanks to Roman Rott for helping me with this release.
- dependencies. Now gem depends on Vcr 2.8.0 and SitePrism 2.5.
- re-factored the way how Vcr cassettes could be applying for any event...
Posted: Oct 30, 2013
Last years we hear more and more about SOA (service oriented architecture). Actually, it is very naturally, because it gives you huge flexibility. Instead of coupling all functionality into one monolithic application we can spread functionality on...