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)
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)
They don't seem to be worth it (185)
Very useful sort in scenarios where context is tied to a date (437)
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)
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)
The early daysIn the beginning there was the all-powerful onclick:<button onclick="javascript: increment()">Increment</button><div id="count">0</div><... (835)
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)
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)
A small tweak is needed to get the first day of the week correctly. (146)
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)
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)
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)
A while ago I was working on the audit log and wanted to store both the user and the name. That way the name remains and can be shown if the user is deleted. The audited gem sto... (178)
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)
Been experimenting with Flutter recently and had a use case where I wanted to access SharedPrefernces in Flutter and in native. Surprisingly it was a bit tricky and took a bit o... (288)
I found the example of sending messages between Flutter and native code overly complicated because it’s part of a larger tutorial that includes several different things and does... (598)
Previously I’ve written how to pass messages between native code and Dart. Sometimes though you might want to just execute code and don’t care about getting the result back. Thi... (185)
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)
With Supplybunny’s growth in suppliers and products there’s been a significant increase in traffic due to spiders crawling the site.Human traffic is very smooth and predictable ... (723)
Notes from when we switched from file to object storage: In the uploaders storage :file should be changed to storage fog. Set development to file:if Rails.env.development? sto... (206)
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)
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)
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)
Mysql2::Error: Got error 28 from storage engine is not actually an error in MySQL but is an error reported by the OS to MySQL and then forwarded to Rails. It is an OS error. Sid... (224)
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)