ColdFusion Posts Around the World
TIL
dt {
font-weight: bold;
margin-top: 15px;
}
dd {
margin-bottom: 10px;
}
h2 {
margin-top: 10px;
}
If you know me you're aware that I love SQL and relational databases. Of all of the databases I have used, PostgreSQL is by far my favorite. SQL is the o...
TIL
One thing you'll want to learn if you use PostgreSQL for any length of time is how to use EXPLAIN. At my job at Vendr, like my previous roles, we are no exception. The good and bad thing is that in many cases you can go pretty far before y...
TIL
Something I have a need to do often but can be difficult to do at times in SQL is to create a pivot table. As an example imagine wanting to see customer...
TIL
An alternate title for this post might be Processing API Requests with a Queue. We recently had a project where we were expecting a burst of high traffic and heavy load on some API endpoints. We wanted to make sure that we could handle all of the traffic, even if the processing time was affected - d...
TIL
Recently I came across an error using postgres that stumped me for a while so I wanted to document it for next time. I was issuing an update statement to a table that had no numeric columns, but received the error: ERROR: value overflows numeric format. Not only did my statement not affect any num...
TIL
Today I learned that postgres allows you to use a subselect in an update statement using a special syntax. This allows you to update a record from other data in the system easily (without remembering the weird update-with-join syntax) or to have an update syntax that more closely resembles an inser...
TIL
There are few things I have learned in my programming career that have paid off like higher order functions. Map, Reduce and Filter with their cousins, along with the concept of passing functions as data in general make code easier to reason about, easier to write, easier to test. I find myself ev...
TIL
At MotorsportReg we have customers all over the world so there is never a good time for maintenance or downtime. Historically, we used multiple application servers with sticky CFML sessions on the load balancer. Deploying code often meant interrupting users to deploy changes which is unacceptable. W...
TIL
During the development of Sidecar, an external session management plugin for ColdFusion, we selected Redis as our storage backend to support sessions in a cluster. Without relying on sticky sessions, we quickly realized that we needed a way to ensure that we wouldn't step on our own toes as multiple...
TIL
Want to build your own URL shortener? Have a bunch of sequential ID's but don't want it to be obvious what the next or previous in the sequence is? Base62 might be a good fit. Instead of 10 possible characters per digit you have 62, compressing the size of your identifier. Plus with a custom alphab...
TIL
Every CFML engine I can find - Adobe ColdFusion 10, 11 and 2016, Lucee 4.5 and 5 - has a bug where if you try to use randRange() on 231-1 (MAX_INT) it will overflow and give you a negative number. See for yourself: http://trycf.com/gist/726e96e5c5e9498b32a2/acf2016. Here is a better way that suppo...
TIL
You rarely want to set a request timeout to a particular value - meaning that you want it to time out if it takes a certain amount of time. What you do want is to declare that a particular process might take at least some amount of time to complete. This is what 's requestTimeout parame...
TIL
With a dynamic application with lots of shared templates it can sometimes be easy to use the same ID for two different elements on the same page. Sometimes this can manifest itself by your JS not working quite right but it isn't apparent what the problem is. Here is a quick script you can paste in...
|