1. Improve ColdFusion performance by 1000x?

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.

2. About helping others

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

3. The Rosie Project

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 :)

A few question and a thought

Written on 10 December 2014, 10:50pm

Tagged with: , ,

iPhone sensors

1. proximity sensor (to turn off the screen when you talk)
2. ambient light sensor(to dim the screen on low light)
3. barometer (to determine pressure/altitude; starting iPhone 6)
4. accelerometer (measures acceleration; analyze the direction in which the device is moving)
5. gyroscope (measure rotation/orientation)
6. magnetometer (measure the strength or direction of magnetic fields)
In addition to that there is the GPS signal receiver. Read more about
the differences between accelero/gyro/magneto sensors.

That being said, I would like to know:
1. Which sensors are turned off in airplane mode (accelero/gyro/magneto/GPS)
Apparently only the GPS. Even though even that is not really necessary, since it only receives signal. In fact, some Android-powered phones do not turn off GPS in airplane mode.
Note: Apple says that airplane mode disables cellular, wi-fi, bluetooth, GPS and location services. Saying that airplane mode disables location services is a bit redundant since the location services uses a combination of cellular, Wi-Fi, Bluetooth, and GPS to determine your location.

2. which sensors are used by the compass app (app partially works in airplane mode)
According to my tests (so based on empirical data :) ) – the compass app works with a combination of 3 (accelero/gyro/magneto) sensors available in airplane mode. If GPS is also available, then the latitude/longitude are also displayed.

3. which sensors are used by Room Scan app (app works fine in airplane mode)
Again, based on empirical data – a combination of accelero/gyro/magneto. No GPS use.

I did not find the answer yet. Keep digging.

Can machines determine what’s beautiful?

Services like Foap or EyeEm try to sell your casual smartphone pictures. Not a bad idea, considering the huge number of ‘mobile’ photos and the success of instagram.
But what I find a bit over the line is this:

Now that the company has the layer of machine learning up and running (and learning new concepts every day), EyeEm is “training” its algorithms to identify which photos actually look good. By looking at things like which objects are in focus and blurred, what’s located at each third of a photo, and other identifiers of “beauty,” the ranking algorithms determine an EyeRank of aesthetic quality for each photo and applies an aggregated score to each photographer.

Because sure, let’s leave the machines tell us what’s beautiful. Humans are not good at it anymore. Makes sense.
On a completely unrelated news, some smart people see the threat in the Artificial Intelligence and forecast that the development of full artificial intelligence could spell the end of the human race.

moon steps

cfsilent night…

Written on 9 December 2014, 09:12pm

Tagged with:

An interesting bit about the cfsilent tag.
The official example from Adobe on the cfsilent page is the following:


<cfset a = 100>
<cfset b = 99>
<cfset c = b-a>
<cfoutput>Inside cfsilent block<br>
b-a = #c#</cfoutput><br>

<p>Even information within cfoutput tags does not display within a 
cfsilent block.<br>
b-a = #c#

As expected, nothing between the cfsilent tags is displayed:

But what do you think it happens if you add a cfabort on line 9, right before closing the cfsilent tag? :)