Ognjen Regoje bio photo

MY NAME IS
Ognjen Regoje
BUT YOU CAN CALL ME OGGY


I make things that run on the web (mostly).
More /ABOUT me.

me@ognjen.io Twitter LinkedIn Github
Check out
The Marketplace Guide
A collection of lessons for the early stages of building a marketplace startup.
https://themarketplace.guide

#technical - page 2

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... (600)

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

When starting new substantial functionality one of the first questions that pops up is: “What should we do first?”That question is deceptively simple but you’ll get different an... (541)

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)

August 03, 2019

Getting that 1-0-0 SEO score on Lighthouse

In the normal course of work ran a Lighthouse audit on Supplybunny. Not awful, but could definitely be better: I think a 6.5/10.The SEO score is impacted by the fact that robots... (411)

April 27, 2019

ActorModel pattern in Rails

Something I’ve been using that I’ve referred to as ActorModels. Not sure if I’ve seen it documented elsewhere.Basically, it’s subclassing a model based on who’s using it and kee... (438)

April 10, 2019

Google Analytics events mapping to Rails

I keep having to revisit this so I’m hoping that by writing it down my retention will increase from seconds to at least a day.When creating Google Analytics events within a Rail... (115)

July 18, 2018

Simple Raspberry Pi file sync

Doing some experimentation with Raspberry Pi and looked into how to automate code copying.To copy files it’s simple enough to use rsync:rsync -rvaz --delete ./ pi@192.168.0.108:... (178)

April 15, 2018

Relay not working with Raspberry Pi GPIO

Was experimenting with Raspberry Pi and a relay recently (to turn lights on and off of-course) and had an issue with a GPIO pin being set to low not turn the relay off.Turns out... (96)