Julik Tarkhanov logo
  • Pleased to meet you!

  • Streamlining Web App Development With Zeroconf

     · 15 May 2025

    The sites which are using Shardine do not only have separate data storage - they all have their own domain names. I frequently need to validate that every site is able to work correctly with the changes I am making. At Cheddar we are also using multiple domains, which is a good security practice due to CORS and...

  • A Can of Shardines: SQLite Multitenancy With Rails

     · 25 Apr 2025

    There is a pattern I am very fond of - “one database per tenant” in web applications with multiple, isolated users. Recently, I needed to fix an application I had for a long time where this database-per-tenant multitenancy utterly broke down, because I was doing connection management wrong. Which begat the question: how do you even approach doing it right?

    ...
  • Template-Scoped CSS in Rails

     · 09 Apr 2025

    Hot on the heels of the previous article I was asked about my idea of having co-located CSS. Now is the time to share, so read on!

  • A Supermarket Bag And a Truckload Of FOMO

     · 26 Mar 2025

    The day was nearing to a close. The sun has already set, but that Friday evening in Amsterdam was still warm. Unusually warm, in fact, for those late days in March – as if spring decided to bless my pilgrimage, for that pilgrimage was not jovial.

    I was sitting at a ramen joint, sipping on the broth. To my left,...

  • UI Algorithms: A Tiny Undo Stack

     · 22 Mar 2025

    I’ve needed this before - a couple of times. Third time I figured I needed something small, nimble - yet complete. And - at the same time - wondering about how to do it in a very simple manner. I think it worked out great, so let’s dig in.

    Most UIs will have some form of undo functionality. Now, there...

  • Musings on Module Registration (And Why It Could Be Better in Rails)

     · 17 Feb 2025

    Having the same architecture problems over and over does give you perspective. We all love making fun of the enterprise FizzBuzz but there are cases where those Factories, Adapters and Facades are genuinely very useful, and so is dependency injection. Since I had to do dependency injection combined with adapters a wee many times now, it seems like a good...

  • The Surcharge of Big Tech

     · 09 Feb 2025

    There is a lot of talk that big-tech companies are willing to pay way more, way up north of the market to the local rates. They all seem similar:

    • Pre-IPO or public
    • Looking for senior software engineers or staff engineers
    • Salary brackets never published, and even recruiters stay fairly tight lipped
    • So-described “transparent” interview process - usually a marathon...
  • Disownership, Pull Requests And De-Facto Architects

     · 25 Jan 2025

    A while ago I got really triggered by by the following two tweets - one by Avdi and another by Pete

    This essay was on my mind - and lying dormant - for a couple of years, but I think it didnt lose its relevance.

  • Supercharge SQLite with Ruby Functions

     · 23 Jan 2025

    An interesting twist in my recent usage of SQLite was the fact that I noticed my research scripts and the database intertwine more. SQLite is unique in that it really lives in-process, unlike standalone database servers. There is a feature to that which does not get used very frequently, but can be indispensable in some situations.

    By the way, the...

  • Maximum Speed SQLite Inserts

     · 01 Jan 2025

    In my work I tend to reach for SQLite more and more. The type of work I find it useful for most these days is quickly amalgamating, dissecting, collecting and analyzing large data sets. As I have outlined in my Euruko talk on scheduling, a key element of the project was writing a simulator. That simulator outputs metrics...

  • Joke Accounts Are a Bitter Necessity

     · 20 Apr 2024

    Joke Accounts and the BOFH are Garbage by Aurynn Shaw struck a chord with me back in the day. After all, who wants to exclude people? Who wants to make them feel unwelcome? Having survived some amount of difficult working experiences I have changed my mind on this drastically. The joke accounts are a bitter necessity, and I’ll try...

  • Reviving zip_tricks as zip_kit

     · 09 Apr 2024

    Well-made software has a lifetime, and the lifetime is finite. However, sometimes software becomes neglected way before its lifetime comes to an end. Not obsoleted, not replaced - just.. neglected. Recently I have decided to resurrect one such piece of software.

    See, zip_tricks holds a special place in my heart. It was quite difficult to make, tricky, but exceptionally...

  • Exploring Batch Caching of Trees

     · 02 Apr 2024

    From my other posts it might seem that I am a bit of a React hater - not at all. React and related frameworks have introduced a very powerful concept into the web development field - the concept of materialised trees. In fact, we have been dealing with those in Rails for years now as well. Standard Rails rendering has...

  • Testing a Thousand Applications With Flipper

     · 20 Mar 2024

    Feature flags are amazing. No, really, did I tell you that feature flags are amazing? They are. But you might be running a thousand applications. When this kind of complexity gets involved you might need to test combinations of feature flags, sometimes - dozens of those combinations. Exhaustive testing to the rescue!

  • Tool Complexity Might Have a Cure: Those Pesky People Who Say No

     · 19 Mar 2024

    Marco Rogers started a remarkable thread on Mastodon, which absolutely struck it home for me. Teams absolutely do get mired up in complex tooling. They absolutely can be unprepared, and there absolutely is a skew between the newly-minted “frontend” and “backend” ecosystems. I might have a few things to say about this.

  • Your Might Be Running A Thousand Applications

     · 02 Mar 2024

    Feature flags are awesome. But just like user preferences or settings they have the tendency of turning your application into multiple applications, all embedded in one.

  • Changing Your Mind is Not My Job

     · 29 Feb 2024

    There is a popular meme that has been going around for years now, This is in fact close to heart for every passionate technologist. Most of use have either been the guy at the desk, or an innocent passer-by willing to enter the conversation. With fairly expected results.

  • Versioned Business Logic With ActiveRecord

     · 27 Feb 2024

    Every succesful application evolves. Business logic is often one of the things that evolves the most, but it is customary to have data which changes over time. Sometimes - over months or years. A lot of spots have logic related to “data over time”. For example: you collect payments from users, but some users were not getting charged VAT. Your...

  • On the Value of Interfaces (and when you Need One)

     · 15 Feb 2024

    It is curious how people tend to bash DDD. I must admit - I never worked in a full-on DDD codebase or on a team that practices it, but looking at the mentioned articles like this one does make me shudder a little. There is little worse than a premature abstraction, and a there is a noticeable jump (or...

  • UI Algorithms: Drag-reordering

     · 22 Oct 2022

    A list where you can reorder items is one of entrenched widgets in UIs. Everyone knows how they are supposed to work, they are cheap to build, intuitive and handy. The problem is that they often get built wrong (not the “just grab Sortable.js and be done with it”-kind-of-wrong, but the “Sortable.js does not provide good user experience”-kind-of-wrong). I’ve built...

  • The Unreasonable Effectiveness of Leaky Buckets (and how to Make One)

     · 23 Aug 2022

    One of the joys of approaching the same problem multiple times is narrowing down on a number of solutions to specific problems which damn work. One of those are idempotency keys - the other are, undoubtedly, rate limiters based on the leaky bucket algorithm. That one algorithm truly blew my mind the first time Wander implemented it back...

  • Two Other Possible Reasons Juniors are Having it Tough on the job Market

     · 01 Jan 2022

    It has recently become a hot topic that junior developers are having difficulties finding a job, even though the market is very hot at the moment. Market for senior talent is, yes, but for juniors - not so much. As a matter of fact it has been flagged that it is harder than ever for a beginner to start...

  • Actually Creating a gem for Idempotency Keys

     · 25 Dec 2021

    I’ve already touched on it a bit in the article about doing the scariest thing first – one of the things we managed to do at WeTransfer before I left was implementing proper idempotency keys for our storage management system (called Storm). The resulting gem is called idempo and you use it about like this:

  • The Value of not Having to be Right

     · 21 Dec 2021

    In software we pride ourselves in being “data-informed”, “metrics driven”, and “formally proven” is the highest praise. Few things feel as satisfying as being actually right, with no shadow of a doubt and no way of escape for our opponents. Being tech people, we cling to this idea that “the more correct” idea, or the one which is “objectively right”,...

  • Art, Science, Taste and "Clean Code"

     · 22 Nov 2021

    Science establishes concepts that describe nature, and is often able to signal binary answers to questions. “Can acceleration be non-0 when velocity is 0?” “What is the circumference of a circle?” “How many chromosomes does a fruit fly genome contain?”

    Art, unlike science, speaks to our emotion. Great art is great exactly because - in addition to execution - it...

  • Do the Scariest Thing First

     · 11 Nov 2021

    I know the pieces fit, cause I watched them fall apart

    Kir recently wrote about fragmented prototyping which struck a nerve. I use a very similar approach for gnarly engineering and system design problems, so figured I could share while we are at it. I call it the maximum pain upfront approach. Another name could be do...

  • Why we can't Have Proper Mentorship

     · 10 Oct 2021

    This article really made me jump out of my seat. The topic of mentoring isn’t covered properly in our industry, and after having some experience in mentoring and being a mentee – both in software and elsewhere – I believe it has to do with the fact that our approach is deeply flawed to begin with.

    Over the years...

  • There Is No "Heroku, but internal"

     · 08 Aug 2021

    A few times a year it seems there are lamentations that “a lot of companies want something like Heroku, but on their internal infrastructure”. Kubernetes does provide something vaguely similar, but apparently isn’t there as far as features go. And time and time again there is this assumption that “if only we had internal Heroku” the amount of tantalizing choices...

  • Some Thoughts on Streaming Responses

     · 03 Jul 2021

    Simon Willison has recently touched on the topic of streaming responses - for him it is in Python, and he was collecting experiences people have had for serving them.

    I’ve done a lion’s share of streaming from Ruby so far, and I believe at the moment WeTransfer is running one of the largest Ruby streaming applications - our download servers....

  • What is a Reduction and why Fibers are the Answer for Ruby Concurrency

     · 06 Feb 2021

    In the Ruby 3 features, a lot of attention went to Ractors - a new parallelism primitive which provides what can best be described as “Web Workers” - separate threads of execution with memory isolation from the spawning thread. However, there was also a release of a seemingly “nerdy” feature which is the FiberScheduler.

    Ractors still have to prove...

  • Testing Concurrent Code With Ruby Fibers

     · 22 Jan 2021

    A second time I stumble upon a situation where I have a method which takes a block, and runs that block in a certain context. This is the Ruby pattern we are all familiar “with” (pun intended):

    with_database_connection do |conn| conn.batch_insert(records) end 

    The...

  • Stealing the Better Parts of go Libraries Into Ruby: Interval_response

     · 06 Dec 2020

    The Go programming language is a curious piece of a kit. Unquestionably successful, no doubt about it - and lots of high-profile Rubyists have taken a liking to it or even moved wholesale (and then espoused vibes to the tune of “I am not using a testing library, look why I am morally superior” and “I run 2 servers instead...

  • Super Fast Signing of s3 URLs

     · 11 Oct 2020

    This post was written by Luca Suriano and myself. Luca deserves most of the credit and has done the bulk of the work on the software mentioned. Special thanks to Jonathan Rochkind who stimulated us to finally share this post by publishing his own research into the matter.

    We all know how boring it is to...

  • Workstations are Underrated

     · 06 Jul 2020

    We live in interesting times, and it has finally dawned: many software engineers and designers who wanted to work from home are finally able to. And this brings us to the subject how we work as well.

    A number of years ago it has become fashionable to work off of laptops. It had a large number of advantages, but in...

  • Why Your Should Keep Project Management out of Your Commit Titles

     · 03 Apr 2020

    It is pretty usual to prefix the commit titles in your repository with the ticket number of what this issue resolves. Something like this:

    A rather long Git commit title in Github

    I would like to make a compelling case for why this is not a very good idea to begin with, with one small exception.

    As...

  • Your Minimum Viable Rails Service Pattern

     · 12 Nov 2016

    Service objects seem to be coming into fashion every year or so. I would love to share an approach that I use for service objects (which are actually service modules). It works very nicely, promised!

    Update: this article calls for the same approach more or less

  • Oh, Sprockets

     · 24 Oct 2016

    There’s been this whole conversation on Sprockets lately. I must admit I tried hard to stay away from the discussion for the most part, but I thought that maybe providing a slightly different perspective might be interesting (or at least entertaining) for some.

    The reason for writing this piece is, among others, because I feel let down. I must admit...

  • Bad API Design: a Whirlwind Tour of Strong_parameters

     · 19 Jun 2016

    Lately I have been doing time upgrading an application from Rails 3 to Rails 4. Obviously, one of the key parts of the operation in that case becomes a move from attribute protection (attr_accessible'/attr_protected’) to strong parameters. Doing so, I have actually struggled a great deal. And after a number of hours spent on reflecting on the whole...

  • On a Small Team, not Being Dicks Sometimes Trumps Efficiency

     · 10 Apr 2016

    There is an inherent difficulty to maintaining velocity. We always want things more streamlined, more efficient, more lean - sky is the limit, really, if the technical realm of a product is not micromanaged by the higher echelons of the company management, but is upgraded by grassroots effort. A good team of engineers worth their salt will, as wel know,...

  • The sad State of Human Arrogance Today

     · 23 Sep 2015

    Lately an article has been making rounds on HackerNews where eevee laments on his tribulations when installing Discourse.

    I’ve read it cover to cover, and I must admit it did strike a few notes with me, especially because I write Ruby web apps for a good decade now, with Rails and without. Most of the points named in...

  • Quitting VFX, one Year On

     · 27 Aug 2015

    So that might be a surprize to some people reading this – if someone still reads this blog at all. But around Christmas 2013 I have decided that I had enough. Enough of the being pleasant. Enough of the wonderful Aeron chairs and enough of the Flame. I was just sick to my stomach.

    Throughout my life I have been...

  • Matchmover tip: Obtaining the Actual Field of View for any Lens Using a Survey Solve

     · 22 Jul 2015

    The best camera is the one that’s with you Henri Cartier-Bresson

    For a long time we have used a great technique at HecticElectric for computing the lens field of view (FOV) values. When you go to film something, you usually record the millimeter values of the focal length of the lenses you use (or “whereabouts”...

  • Building Nuke Plugins on macOS, Christmas 2014 Edition

     · 13 Dec 2014

    Building Nuke plugins on the Mac, Christmas 2014 edition

    As 2014 is folding to a fanfare close, we here at julik live would like to take you, dear reader, to 2009. To recap what happened in 2009:

    • The Icelandic government and banking system collapse
    • Albania and Croatia are admitted to the North Atlantic Treaty Organization (NATO).
    • The Treaty of...
  • On the Benefits of Laptop Stands

     · 13 Jul 2014

    When you look at pictures from trendy startup offices you often see laptop riser stands.

    One might think that you would do that to make your desk look neater. Or that it is for better posture. Or just to have yet another neat Apple-y looking apparatus in your vicinity for more hipster look. However, there is a benefit to...

  • Checking the Real HTTP Headers With Curl

     · 13 Dec 2013

    curl, the seminal swiss army knife of HTTP requests, is quite good at many things. Practically everybody knows that you can show headers using the -I flag:

    $curl -I http://example.com/req 

    However, this is plain wrong in a subtle way. See, I sends a HEAD request, which is sometimes...

  • Tracksperanto is Fully Ruby 2.0 Ready

     · 16 May 2013

    Just added Ruby 2.0.0 to Tracksperanto’s Travis config and the results are in. Our compatibility matrix now looks like this:

    all green

    So now we also happily run 2.0.0 in addition to 1.8.7 and 1.9.x. Feels nice to stay compatible and current at the same time.

    This also means that likely...

  • Checklist for Custom Form Controls in Your wep App

     · 15 Mar 2013

    Recently I had a privilege of reviewing a web app that is directly relevant to my work field. It is in fact an iteration on the system we are actively using at the company. After having a poke here and there, I was surprised to find that the custom controls epidemic was not over for some people.

    All popup menus...

  • Running .Command Files on OSX in Other Interpreters Than `sh`

     · 12 Mar 2013

    We all know that on OSX you can create so-called .command files. In a nutshell, they are renamed shell scripts. When you make them executable and double-click them, they will run by themselves within Terminal.app.

    A little less known fact about them is that you can actually script them in any language of your choosing. For...

  • Gracefully Handling NFS Mounts on OSX Laptops

     · 07 Oct 2012

    For the last few years, all the work I do has been equally split between Flame systems running on Linux and a couple of Macbook Pro’s running OSX. At Hectic we make use of NFS to make the same servers available to all of our client workstations which are an equal mix between Linux and Windows (Macs do not...

  • Messages Versus Slots - two OOP Paradigms

     · 09 Aug 2012

    I’ve had this discussion with Oleg before, but this still keeps coming up again and again. See, alot of people are pissed at Ruby that you cannot do this

    something = lambda do # execute things end something() # won't work 

    and also cannot do this

    meth = some_object.method(:length) meth(with_argument)...
    
            
  • Sequencing AJAX Requests on "Send-last Basis"

     · 15 Jul 2011

    So imagine you have this autocomplete thingo. Or a dynamic search field. Anything that updates something via AJAX when it’s value changes.

    Now, it’s tempting to do this (I am speaking prototype.js here, jQuery would be approximately the same.

     function updateResults(field) { new Ajax.Request('/s', { method:'get', parameters: {"term": field.value}, onSuccess: function(transport){ var archiveList =...
    
            
  • Matchmover tip: Making use of EXIF Comments to Know Your Field of View

     · 18 Feb 2011

    So you got this batch of reference photos and just into doing some image - based modeling. Awesome! Except that you vaguely remember that there was a zoom lens used on the photo camera. So you’d say “not possible” right?

    Nothing further from the truth! Canons actually have these smart lenses that report their current focal length to the camera,...

  • Tracing a Ruby IO Object for Reads

     · 18 Feb 2010

    So Tracksperanto has a progress bar. Actually both the commandline and the web version have one, which helps to improve the user experience a great deal (some files uploaded on the site were converting for more than a few minutes). However, we need to display this progress bar somehow and to do it we need to quantify the progress made.

    ...
  • Outputting Overscan Action Scenes With 3-d Cameras

     · 17 Dec 2009

    When you do set extensions, and especially when you use tracked cameras, it is often necessary to do 2-d transformations outside of your original frame. The most common thing to do is zoom out on your original footage, revealing your set extension. For this, you basically need two images, with one image being bigger and with both of them perfectly...

  • Architecture Behind Tracksperanto-web

     · 21 Nov 2009

    So it’s been quite a while since tracksperanto-web went production, with more than 300 files converted so far with great results. I hope some sleepless nights for matchmovers worldwide have already been preserved and nothing could be better.

    I would like to bring a little breakdown on how Tracksperanto on the web is put together (interesting case for background...

  • Announcing Tracksperanto, a 2D Tracking Converter

     · 21 Sep 2009

    I’ve released Tracksperanto, a small app that can convert 2D tracking data between many apps. In my work I often have to do 2D tracking and then transition to camera solves - some apps do it better, some apps do it worse and you seldom know which solver will give you a better result. I’ve taken a look at Mincho...

  • Stop the red Tape Before it Gets any Further

     · 22 Feb 2009

    The industry is in an interesting state now. As VFX get more adoption across all disciplines of filmmaking, there’s more and more demand for our work ad at the same time things get devalued. There is much less experimentation (except at the top-notch facilities like ILM and DD), much less exploration - but the amount of work is actually increasing....

  • `_path` Routes Considered Harmful

     · 22 Feb 2009

    There’s been some talks lately on relative versus absolute routes and where they should be used.

    Personally, I consider the point moot. If you have such a powerful tool at your disposal (Rails) there is one thing you certainly should do, once and for all - make all URLs both absolute and canonical. Here is the reasoning for...

  • The Culture ain't It

     · 04 Feb 2009

    So let’s imagine we want to run a CI server. And we want it to work with both githubs and gits and subversions and pwn everything. We skip CruiseControl.rb (after all it’s not awares of githubs right?) and decide to try out the new kid on the block. First of all, we immediately find out that:

  • Nemacs, nevim

     · 27 Jan 2009

    Had a discussion recently with Yaroslav on switching to Emacs or vi. And I tried again and I failed. The reason is so stupidly obvious it’s hard to explain. You see, I got this:

    kbs.png

    This is not a cultural thing. I need to switch my keyboard layout, hundreds of times a day....

  • EDL Ruby Module Hits the Streets

     · 20 Jan 2009

    As promised in an earlier entry, here comes the announcement for the EDL library for Ruby. It allows you to parse EDL files and examine their content in a relatively sane way. Example:

    edl_part = '020 008C V C 08:04:24:24 08:04:25:19 01:00:25:22 01:00:26:17' list = EDL::Parser
          
  • Some new Ruby Libraries to Boot

     · 28 Dec 2008

    Hot on the heels of the recent graduation project activity I’ve released a few infrastructure libraries in Ruby that I use to manage the indie pipeline here. These are Depix, EDL and Timecode.

    Timecode is a value class for SMPTE timecode information. It stores the framerate and the number of frames and supports all basic calculations (like addition,...

  • Flame Tricks: Setup Render Prefixes

     · 23 Sep 2008

    Here comes another Flame workflow tip. This one is used by colleagues of mine, but I found it very useful as well. One of the things that sometimes takes too much time is figuring out where has a clip come from. Your colleague has worked a project for a while, your library is full of clips and you are called...

  • The Lifted Offset of the Gained Gamma

     · 27 Aug 2008

    When you are told about the gamma, offset and gain, you can see it as the following Photoshop curve alterations:

    For lift (or offset) this is the value that will be added to every input color:

    log-lift.jpg

    For gain, this is the value that will be added to the absolute white of the channel and will...

  • Flame Tricks: Transfer Output

     · 27 Aug 2008

    This one is just too good to be true, and few flame ops seem to use it.

    Pull a clip into Batch, do something with it and prepare an output. See how unhandily the output is 100 frames while the input is only twenty? Also, the input clip has timecode attached to it, which is useful to have on the...

  • XMLRPC and Builder, a Marriage Made in Heaven

     · 26 Jul 2008

    This one is an example of why if you do XML you better do it right. I’ve written this blog with an aim for spotless MetaWeblog API support (I hate Web UI’s and I own both MarsEdit and Ecto licenses). I also don’t have an aversion to Dave Winer, and Atompub is not there yet IMO.

    So I’ve implemented...

  • Brutal Fragment Cache (with automatic transmission)

     · 16 Jul 2008

    Recently I’ve hit that painful mark, y’know… A page on a Rails site I’ve been developing crossed the dreaded “1 second” request time. This can’t be happening, thought I - it’s just a list of objects! One SQL request, bonafide, no associations fetched, all indexes are in place… and the most aggravating was - the SQL request itself was a...

  • Organized Thread Collisions

     · 15 Jul 2008

    We don’t like when things collide.

    Absolutely no head on collisions

    Photo by szlea

    But what if we need them to? What if we want to ensure that should a collision between threads happen, things will not go out of hand?

    This is remarkably easy...

© Julik Tarkhanov 2025