Wednesday, February 4, 2015

I Found A Lump - Why All Men Should Learn TSE

Normally I write here only on tech issues.

Last year I found a lump and I thought I'd share my experience in the hope that it helps other men. The story does have a happy ending, and I have a challenge for you to complete.

Late last year I started feeling sore on the right side of the scrotum, and so I checked for lumps using a technique called Testicular Self Examination, or TSE. This is not something I have done often, usually only when reminded of it after hearing or reading something about it in the press.

I found several lumps, one about twice the size of a pea. I booked to see the doctor immediately.

The visit was fairly routine. He examined both testicles, carefully as I was in much pain. His initial diagnosis was an infection of the didymus. This is the small tube that transports sperm manufactured in the testicle to inside the body.

He prescribed some fairly strong antibiotics to settle things down, and said I should book for an ultrasound when I got back from holiday.

My main concern was the time-frame. The doctor assured my that if it was cancer - and he was fairly sure at this point that it was not - that a few weeks would not have a negative impact difference in on the outcome.

When I got back from leave I dutifully went and got the ultrasound. The technician told me quite quickly that she could find no lumps at all on either testicle, but did confirm very small remains from the infection.

The doctor called me to confirm the result that day, and said if I have further issues come right back.

What did I learn from this?

Firstly, don't panic. All lumps are not cancer. If they are, you have about a 98% chance of survival if they are caught early. They key word here is early.

You are you own first line of defence.

Secondly, get over any embarrassment.

You will do TSE in private - no one will know you do it unless you blog about it. I think we are past that sort of thing now, aren't we?

Doctors look at body parts all day. They know how to handle patients who may be stressed and/or embarrassed. Get over it.

A special note on having an ultrasound exam. The process was discreet and respectful. Each step was explained before it happened and only the area to be examined is visible. There is no physical contact between you and the technician and it does not hurt.

My challenge to you is this: start TSE today, and do it regularly.

It is vital that you learn what your testicles normally feel like. I'd suggest doing it once a week for a couple of months until you get used it. If I had been doing that already, I don't think this would have been as stressful.

When you find anything of concern get it checked by a doctor as soon as practicable.

If you do take this challenge up, please mention it on social media, link back here and challenge others to do the same.

Can partners help? Yes, you can. If you are woman, perhaps get your man to start when you have your next smear, or you can make breast self exams and TSE something you do together. Guy partners? You are not exempt!

Please, encourage your man to take the challenge today, and stick to it.

Resources

How to do testicular self examination.

And another with links to resources.

The NZ Testicular Cancer Website

Wednesday, November 19, 2014

How to monitor HTTP headers in near real-time

Unix has many tools that you can stitch together to do useful things.

For example, if you want to watch your site headers in near real-time you can use watch and curl.

You might want to do that if you need to build information headers (like X-Cache-Info) and you want to quickly try out different ideas.

In my case I use it during a patch window to monitor when our site's proxy server has changed so that the (now inactive) proxy can have updates applied.

The command that you run in a terminal is:

watch "curl -I -s www.example.com"

-I is headers only, while -s is silent. It'll print the headers every two seconds by default. If you want to update every second it is:



watch -n 1 "curl -I -s www.example.com"

Thursday, October 23, 2014

How to ignore alihack requests using your nginx config

If you are getting the following error in your Rails app:

   unexpected token at 'alihack<%eval request("alihack.com")%>


...it can be blocked in your nginx config.

The following snippet can be placed inside the server block and returns a  '400 Bad Request' with a text message in the body.

A big assumption here is that your app is not using json - it blocks all JSON PUT requests. This could be refined to check for third header that your own app sets, if that is a problem.

You could change this to a redirect or a json response if you want (commented out below).

# ali.txt attempt on any URL
if ($content_type = "application/json") { 
  set $ali_txt JSON; 
} 
if ($request_method = PUT) {
  set $ali_txt "${ali_txt}_PUT"; 
} 
if ($ali_txt = JSON_PUT) {
 return 400 "Bad request - ignoring"; 
 # return 444;
 # return 301 http://www.example.com/some-page
}

This should not be placed inside a location block.

Sunday, September 21, 2014

Radio NZ Browser and OS stats for September 2014

This is the September 2014 release of browser and OS stats for www.radionz.co.nz and The Wireless.

Overall, the Chrome browser is increasing its market share, and the shift from desktop to mobile continues. Windows has dropped to under 50%.

Browsers

Browser 09/2014 03/2014 11/201306/201211/201111/201011/200911/2008
Chrome 30.8 25.23 23.7 14.6 13.8 8.75 4.2 1.47
IE 18.9 24.02 26.337.541.250.65663
Safari 18.8 18.94 17.5217.35.613.1105.66
Firefox 14.5 14.81 16.619.823.225.5227.527.73
Android 9.0 11.71 117.5
Opera 0.4 0.46 0.690.70.91.021.08

IE is still in decline, and IE6 is 0.22%, IE7 1.2%, IE8 14%, IE9 19.2%, IE10 12.9%. IE11 is at 51%.

At The Wireless things are very different: Chrome 45%, Safari (in app) 15%, Firefox 13%, Safari 12.6%, IE 7.4%, Android 4.7%

Operating System

OS 09/2014 03/2014 11/201306/201211/201111/201011/200911/2008
Windows 48.9 52.9 5867.3728184.889.3
iOS 18.4 16.6 147.88
Android 17 16.5 13.77.793.60.30.020
Mac 11.7 10.7 13.414.715.614.212.68.5
iPhone 2.51.40.560.19
iPad 2.40.6300
Linux 1.6 1.9 1.81.271.531.41.451.72
Win Phone 0.57 0.44 0.39
iPod 0.50.350.220.08

And at The Wireless, Windows 40.9%, iOS 22.8%, Mac 18.7%, Android 15%, Linux 1.4%, Win Phone 0.6%

Mobile

In June 2012 mobile was 16% of our traffic. In November 2013 it was 29%. In March 2014 it was 23.4% mobile and 10.8% for tablet, making 34.2%. Now it is 61.8%, 26.3% mobile and 11.8% for tablet.

The most popular devices are still the same as last time - iPad (24.8%), iPhone (22.7%), and Samsung GT-I9300 Galaxy S III (3.9%)

Over at The Wireless 39% of the traffic is mobile, with popular devices being iPhone (41%), iPad (16.9%) Galaxy S III (4.3%).


Wednesday, September 17, 2014

How news events impact web traffic

This short post shows how news events impact website traffic on radionz.co.nz, and how we handle it technically.




On 18 August Guyon Espiner interviewed the Prime Minister about the claims in the book Dirty Politics. Within 10 minutes of the interview airing and being posted on the site traffic jumped to nearly twice normal levels, and stayed up for 12 hours. The interview was the most listened to audio on our site with around 18,000 listens.

On 26 August we saw a huge peak as our story about Manchester United signing Di Maria was linked from a UK news aggregator. This sometimes happens with our international coverage because our news cycle is 12 hours different from the UK.

Judith Collins resigned on 30 August and while there was a slight increase in traffic on the day, the interviews the following week were a big driver of visits.

On 15 September Morning Report interview the PM about the GCSB, which was followed by Glen Greenwald. He was interviewed again by Kathryn Ryan. These three interviews were the most listened to that day, and the next.

Against these peak events we've seen an overall increase in baseline visits to the site. This is partly to our excellent election section where the news team has put a lot of work into the coverage, and also to our election interview collection. The biggest stories have been our running Fact Or Fiction feature and the Poll of Polls where Colin James analyses the most recent Polls. The leader video profiles have also been popular.

There was a big peak on Tuesday 16 September as people came to view the live stream of examination of the Colossal Squid at Te Papa.

And then there are the regular visits to audio and other news coverage right across the whole site.

The Technical Side

Some of these fast-moving events can cause sudden and large increases in traffic, and that presents some technical challenges.

Firstly, the news team have to be able to update the story quickly and often while the site is under high load. We have a publishing system that allows our newsroom editing system to update our CMS directly with the press of one key. No messing about with HTML and image placement and a single story can be updated in under 5 seconds. The news subs can also update up to 100 stories (if they needed to) in under 30 seconds.

As an aside, we can typically publish audio interviews within 5 minutes of broadcast.

The traffic peaks are handled using a front-end cache, although this is setup to still allow frequent updates. We use Varnish which is reputed to be able to easily handle 10,000 requests a second, although we've never gotten to that number.

The content management system - our own bespoke design, built with the Ruby on Rails framework - has been optimised to have quick page load times, even over dial up and slow mobile connections.

All of these makes it a breeze (IMHO) to deliver news and audio content quickly to an increasingly demanding audience.