Problem: Oracle error maximum number of expressions in a list is 1000
Solution:
-- Instead of
select * from foo where id in (List)
-- use
select * from foo where id in (Sub-query)
Problem: Oracle error maximum number of expressions in a list is 1000
Solution:
-- Instead of
select * from foo where id in (List)
-- use
select * from foo where id in (Sub-query)
An interesting usability issue that affects the people with a color vision deficiency (CVD) – like me :). Here is how Canon and Sony chose to indicate the charging status for 2 battery chargers that I own:

Both chargers have a LED indicator.
Canon LED blinks if it’s charging, and is always on if the charging is done.
Sony LED changes color when the charging is done.
For me, this means that I can tell when the Canon device finished charging, but I have no way to tell when the Sony device finished its job.
GG Canon 🙂
Written on 14 December 2014, 10:05pm
Tagged with: books, coldfusion, geek, performance, SF, the big bang theory
I recently had to deal with some ColdFusion page optimization. Although the result was not 1000 better like in this case, the approach was more or less similar. Instead of SQL indexes + rewriting queries inside loops + caching queries, I only had to do a combination of:
– reducing the number of DB queries by moving them outside loops
– using cfqueryparam. In addition to making things more secure, turns out it also has a significant impact on performance tuning.
Update: Some more improvements:
– ColdFusion whitespace management
– getting rid of the old cfform
– gzipping the content transferred to the browser
The end result was a 30x-50x performance improvement.
Apparently helping others is embedded in every human’s DNA. Here’s an excerpt (no spoilers) from Andy Meir’s ‘The Martian’ – one of the best SF novels I ever read:
Every human being has a basic instinct to help each other out. It might not seem that way sometimes, but it’s true. […] This is so fundamentally human that it’s found in every culture without exception. Yes, there are assholes who just don’t care, buy they’re massively outnumbered by the people who do.
– The Martian (coming in a theater near you in 2015)
The downside of this ‘feature’ of the human behavior is that it can be exploited. For example, in computer security, individuals who are attempting to social engineer some piece of information strongly rely on this aspect of the human nature:
Don’t rely on network safeguards and firewalls to protect your information. Look to your most vulnerable spot. You’ll usually find that vulnerability lies in your people. […]
Most people generally want to help somebody who is requesting help.
– CompTIA Security
The Rosie project is an amazingly enjoyable book about a socially-challenged scientist who is working his way through the process of finding a life partner. Also recommended by Bill Gates. If anyone makes a movie out of it, I hope they pick Jim Parsons for the main role 🙂