The website is down

Written on 6 December 2014, 12:02pm

Tagged with: , , ,

From a business perspective:

– 1. Think Ahead and Anticipate
– 2. Say Something
– 3. Know the Law
– 4. Remember, Youโ€™re Not Alone
What to Do When Your Website Gets Hacked

From a technical perspective:

1. Check That It Has Actually Gone Down
2. Figure Out What Has Gone Down
3. How Bad Is It?
4. Check Your Web Server Software
5. Logging Into Your Server
6. Has It Run Out Of Space?
7. Has It Run Out Of Memory?
8. Has Something Crashed?
What To Do When Your Website Goes Down

And remember, don’t just stand there, reboot something ๐Ÿ™‚

From a fun perspective:

Bonus: What Flickr did when their website went down:

AARRON WALTER: Designing for emotion
In July 2006, a storage failure struck Flickr, the popular photo sharing service. Though photos were safe and no data was lost, thousands of enthusiastic users were inconvenienced as
their favorite photo site took a temporary nap (roughly three hours). Tensions ran high as engineers worked to bring the site back online. Inquiries from concerned users poured in.
During the crisis, the Flickr team had a stroke of genius.
[..] They posted a message that explained the outage, asked users to print a page, and do something creative with it to win a free, one-year Flickr Pro account:

flickr 404

ColdFusion performance: compare to 0 in cfloop

Written on 6 December 2014, 11:31am

Tagged with: ,

The piece of code below proves that in ColdFusion comparing to 0 and using a negative step is more efficient than the traditional way of looping.

<cfset LOOPS1 = 5>
<cfset LOOPS2 = 100*1000>

<cfset STEPS = 10>

<cfloop index="k" to="0" from="#STEPS#" step="-1">
	<cfset start = GetTickCount()>
	<cfloop index='i' from='0' to='#LOOPS1#' step='1'>
		<cfloop index='j' from='0' to='#LOOPS2#' step='1'>
		</cfloop>
	</cfloop>
	<cfset exectime1 = GetTickCount() - start>



	<cfset start = GetTickCount()>
	<cfloop index='i' from='#LOOPS1#' to='0' step='-1'>
		<cfloop index='j' from='#LOOPS2#' to='0' step='-1'>
		</cfloop>
	</cfloop>
	<cfset exectime2 = GetTickCount() - start>

	<cfset diff = exectime1 - exectime2>
	<cfoutput>#diff#</cfoutput><br><cfflush>
</cfloop>

Ran on Railo 4.2 produced the following output:

123
20
33
37
17
19
9
12
22
47
11

Productivity: know your tools!

Written on 4 December 2014, 11:38pm

Tagged with: ,

I’m always surprised by the fact that a considerable number of people in our field don’t really know how to make the best use of their tools. I’ll try to put together a set of good practices and possible improvements.

1. Hardware

Display: Know what type of monitor is better for your job (designer vs developer). Know the difference between IPS and TN panels, between fps and refresh rate, between LCD and LED technologies. If you are using a dual monitor configuration, know what is the set up that works best for your workflow. On the same page, you need to know how to sit correctly (or maybe stand?) and about the…
Ambient light: know what temperature of light is fit for what purpose (TL;DR: warm white for relaxation, cool white for work). Use f.lux to automatically adjust the screen color temperature according to the time of the day. Know that a dark color scheme is easier on the eyes compared to a light one.
Keyboard: Here the most important part is not the keyboard itself, but the way you type. Touch typing is mandatory at this level. If you don’t master it yet, get on it now.
I personally prefer this keyboard because it’s classic, it has a great touch feeling and – as a bonus – has separate multimedia keys that work with Spotify ๐Ÿ™‚
Mouse/trackpad: no matter which one you use, it should allow you to be fast. In my experience the mouse is always faster on a day-to-day use, but if you are mostly browsing/reading and you need less pointing precision then the trackpad is probably enough. Just know how to use 2-fingers scroll and stuff like that. I personally use this mouse, after using 3 or 4 pieces from the older generation. After 8 years of using them I settled for the following configuration:
– button next to the wheel – middle click (=closing tabs)
– left/right wheel buttons – volume down/up
– left button 1 – minimize window
– left button 2 – mute toggle

Almost 2 years later, the mapping changed:
– button next to the wheel – middle click (=closing tabs)
– left/right wheel buttons – ctrl+shift+tab/ctrl+tab (switching tabs)
– left button 1 – ctrl+t (new tab)
– left button 2 – minimize window

Headphones (for music or conference): Ideally you would like to have some headphones with noise cancellation, but if you are video-conferencing a lot then you need to have some headphones with a good microphone.

2. Software

Here the motto is Learn the shortcuts. Since I am mostly using Windows, the tips below concern that operating system, but some of them are more general.

(more…)