Category Archives: programming

SQL Antipatterns: Then and Now

I am an absolute fan of Bill Karwin’s SQL Antipatterns book. I rate it amongst my top 3 database books together with Martin Kleppmann’s Designing Data-Intensive Applications. However, its good to think twice about some of the advice in the … Continue reading

Posted in Computers, programming, Software | Tagged , | Leave a comment

Understanding concurrency control in Postgres and comparing with MySQL

Concurrency control is one of the key things to understand in any database. It is the I in ACID. From MySQL docs (applies to Postgres as well): the isolation level is the setting that fine-tunes the balance between performance and … Continue reading

Posted in Computers, programming, Software | Tagged | Leave a comment

Do we need NUMERIC data type to store financial data in Postgres?

TL;DR: Conventional wisdom dictates that one should use the NUMERIC data type to store financial data to protect from rounding errors that happen with floating point arithmetic (refer IEEE 754 standard). And on JS side we should use a library … Continue reading

Posted in Computers, programming, Software | Tagged | Leave a comment

If you could only install 10 applications on your Mac

what would they be? here is my list: let me know yours.

Posted in Computers, programming, Software | Tagged | Leave a comment

Guide to using Sequelize with Postgres

Note that you can JOIN tables with Sequelize without creating foreign keys. Refer this. Further Reading

Posted in Computers, programming, Software | Tagged | Leave a comment

Postgres Command Line Reference

Posted in Computers, programming, Software | Tagged | Leave a comment

Copying data from BigQuery to Postgres (Cloud SQL)

Google provides a database migration service but at time of this writing it does not support copying data from BigQuery to Postgres (Cloud SQL). You can DIY in a couple of ways. Here I describe a way to do it … Continue reading

Posted in Computers, programming, Software | Tagged , | Leave a comment

Learning to use `pdb`- Python command line debugger

Posted in Computers, programming, Software | Tagged , , , | Leave a comment

Teradata: Common Queries

Get all tables in a database Get all Views in a database Get # of rows in a table Get Column Info (information about columns) in a table Get Table Size (size of table)

Posted in Computers, programming, Software | Leave a comment

How to build a rate-limiter in JavaScript or Node.js

In this post we show how to build a rate-limiter in JavaScript or Node.js. A rate-limiter as its name suggests is used to limit the amount of traffic being sent to a server. Think of it as a dam that … Continue reading

Posted in Computers, programming, Software | Tagged , | Leave a comment