Why I Haven’t Been Using AI Coding Tools, and Why I Code Quant/Algo-Heavy Infra in Node.js

by Justin Skycak on

Want to get notified about new posts? Join the mailing list.

A lot of people are surprised when I tell them I don’t use any AI coding tools… like, have I been living under a rock?

The truth is that I periodically try them out and so far they just haven’t been helpful in my use case. Here’s a little story of what I mean.

I tested out a new code-autocomplete AI last month because the field seems to have moved forward since I last tried several years ago… but unfortunately it choked on everything outside the kind of standard logic you’d commonly see in other codebases (and there is shockingly little of that with the stuff I’m working on).

There was one moment where I got a little excited that it initially seemed to write a conditional statement correctly that required a small amount of niche context / domain expertise, but that was only because I hadn’t thought it through.

Once I did think it through, it was clear that the AI had produced something that seemed surface-level plausible if you’re skimming but it was actually incorrect and would have introduced a bug if I hadn’t thought it through carefully myself and caught it.

Which is, like, the worst! It reminds me of the occasional time when I was tutoring/teaching and I’d look at a student’s math steps or code and be like “wait… that looks about right, but why isn’t the result coming out right?” And then I’d work it myself, things would come out right, and it would turn out that there was some issue in the student’s work that I didn’t see at first glance.

I don’t want that happening when I’m writing code! :(

Why I Code Quant/Algo-Heavy Infra in Node.js

If you’re triggered by my not using AI coding tools then let me tell you about how all of my quant/algo-heavy infra is written in Node.js ;)

Why? Because

  1. it's easy to build quick prototypes -- it feels like writing Python except the code actually runs fast
  2. it integrates super easily with the rest of the app which is also written in Node.js

I’ll admit that years ago when Jason suggested for me to use Node.js I was like “Whaaaat? Writing quant stuff in Javascript???”

But that’s the thing about first-principles thinking: you end up making some decisions that look weird on surface level but they work out perfectly.

Initially, I was a bit frustrated by Javascript’s loosey-goosey approach to looking up and propagating null values, but it turned out I just needed to write more sanity check validations within the code, something that I had previously neglected coming from the world of Python.

Interestingly, once I leveled up my validation skills, I actually got to the point that I preferred writing Node.js as opposed to Python (and I know that sounds really weird coming from a quant/algo guy).

Yes, it felt harder at first, but it really forced me to write good validations, which I came to learn are critical when the codebase grows to a massive size, no matter what language you’re working in.

Now, if we ever get to needing deep learning or other super compute-heavy tensor-based models then maybe we’ll need to bring in some Python-wrapped C…

But I actually don’t anticipate that coming up in the future, at least, not as far as I can see.

Why not? Because all of our quant/algo stuff is more like physics modeling + expert systems and less like machine learning.

Our system is meant to emulate the decisions of an expert and we have the domain expertise to know what those decisions would be.

It’s not like the system has to entirely figure things out on its own from the data – it’s more like we codify our own decision processes and roughly calibrate those to data.

We know what the underlying decision structure needs to be, and just have to wrangle the complexity of

  • coding up that decision structure,
  • constructing the inputs that represent "physical" quantities on which the decisions are based, and
  • calibrating various parameters to data.


Want to get notified about new posts? Join the mailing list.