Ognjen Regoje bio photo

Ognjen Regoje

I make things that run on the web (mostly).

More /ABOUT me.

And about /PROJECTS I've been involved in.

Email me at me@ognjen.io

me@ognjen.io Twitter LinkedIn Instagram Github


May 16, 2020

Challenges in implementing ant colony optimization

Here are the more technical details of ACO implementation are discussed. The reasoning behind it and the conclusion are in a separate post.ImplementationI started off with an ex... (1795)

May 07, 2020

How Supplybunny handled a 10x spike in traffic

The beginning of the MCO was quite stressful but I’m happy about a small victory shown in this screenshot:Supplybunny site was live and taking orders the entire time, handling p... (280)

May 07, 2020

A small victory in the MCO war

The beginning of the MCO was quite stressful but I’m happy about a small victory shown in this screenshot:Supplybunny site was live and taking orders the entire time, handling p... (280)

April 25, 2020

Tools for PWA icons

I keep having to look for these four tools when making PWA icons. Convert SVG to PNGhttps://ezgif.com/svg-to-png/ (set the width to at least 512) Make sure the icon ... (92)

March 21, 2020

Rails pattern: state params

A useful pattern that I didn’t see documented before is what I call “state params”: returning different permitted params based on the state of the record.If there is an order mo... (180)

March 21, 2020

mysql2 - activerecord version compatibility list

In the course of doing upgrades for an older project I’ve discovered that not every activerecord version is compatible with every mysql2 version. The adapters use ~> to lock ... (147)

March 01, 2020

Pro-tip when diagnosing a performance issue

When diagnosing a performance issue look for the end-points that don’t appear in the logs as frequently as they should.If the entire application slows down and all requests are ... (49)

December 20, 2019

Examples of sofware design patterns

A running list of examples of design patterns listed in Design Patterns: Elements of Reusable Object-Oriented Software.Periodically updated.CreationalCreate objects, rather than... (596)

December 14, 2019

Overriding preform in Carrierwave Backgrounder gem

Carrierwave Backgrounder is a gem that makes it easier to process assets in background. Resizing and optimization can be done on Sidekiq rather than in the main thread. Very use... (251)

December 14, 2019

Evolution of templates in JS

The early daysIn the beginning there was the all-powerful onclick:<button onclick="javascript: increment()">Increment</button><div id="count">0</div><... (835)

December 02, 2019

How to decide where to start building from

“What should we do first?” is always asked when developing a new thing. It’s deceptively simple but can be answered differently depending on who you ask and what you’re building... (375)

November 16, 2019

Combining cached and live JSON in Rails

Had a scenario for the Supplybunny API where an endpoint needed to return a combination of live and cached data.The cached part was already in use in a few places. The new endpo... (132)

October 23, 2019

Another Firefox trial run

I mainly use Chrome but switch to Firefox every once in a while, just to check how it’s doing. This time I thought I’d write down my opinion, in no particular order.ProsAddons o... (384)

October 16, 2019

4 useful custom validators for jQuery validate

jQuery is still very useful and jQuery validate is great for validation. I’ve written before about how to make custom validators for it. Here are four more (all in coffeescript)... (491)

October 05, 2019

My favorite part of Backbone.js is the collections

I mostly use Vue.js due to it’s very intuitive templating system and excellent reactivity. But I still very much miss one specific feature of Backbone.js: collections.In particu... (651)

September 18, 2019

Formula for weighing ratings by their count

I experimented with sorting items by their average rating and the number of ratings. I wanted to have products with higher number of ratings appear before ones with equal averag... (328)