Get a mop and wipe it up!


How to get your Windows Azure hosted WordPress contact form working

, posted: 9-Mar-2014 12:22

I'm building a WordPress ecommerce website, and hosting it in Windows Azure. My contact form would not send email, despite everything appearing to be configured correctly.


In your Azure portal:
1. From the Gallery, install SendGrid for your Azure region. (It is free for up to 25,000 emails per month.)
2. Configure your Account Settings.
3. Click on Connection Info to see your Username and Password. We will use this later.

In your WordPress Dashboard:
1. Install Swift Mailer plug-in for WordPress. Ignore the warning that it hasn't been tested with the latest version of WP.
2. Install the SendGrid plug-in for WordPress.
3. Click on SendGrid Settings and enter the Username and Password from the Azure Connection Info (above). I chose "API" for sending mail.
4. Add appropriate Mail settings. Eg your website name for Name, and an email address within your domain for Sending Address.
5. Click on Update Settings.
6. Send a test email (on the same Settings page).

This worked for me. Good luck!



Open Letter to Minister of Police: Don't Lower "Ticketing" Speed Limits

, posted: 29-Nov-2013 07:24

The Automobile Association was established in Britain in 1905 specifically to help drivers to avoid police speed traps. In NZ, in 2006, AA Members expressed opposition to lowering of the speed tolerance from 10 to 5 km/h. In 2007 a majority of AA Members said that speeding tickets in urban areas should not be issued below 60 km/h.

For several years the NZ Police have enforce speed limits with a reduced tolerance (from 10 to 4 km/h) over holiday weekends. This has coincided with lower crash and death counts. Police credit the lower speeds, though it could be argued that the greater police presence, and greater concentration by motorists due to the need for higher vigilance to avoid speeding tickets is the cause. The Police website presents several reasons for applying this policy to holiday weekends:
Police policy on speed tolerance (Nov 2013)

 
The unilateral announcement by the Minister of Police and NZTA that speed tolerances would be lowered from 10 to 4 km/h for all of December and January is unwarranted and unwise. At most, NZTA could apply this measure to the Christmas holiday road toll period, as this is the interval in which their stated conditions apply.
 
The more insidious announcement, though, was the “softening up blow” of saying the 4 km/h speed tolerance could apply all year. This is a perverse incentive for motorists – if you drive safely we will reward you with slower commutes, greater frustration and a less efficient economy! And we haven’t considered the increased public hostility towards the Police for revenue collecting instead of targeting the recidivist bad motorists (excessively fast or slow or inebriated or erratic).

NZ speed limits have remained static for many years, despite the improvements in road engineering and vehicle passive and active safety features (such as ABS brakes and stability control). 
 
As a rule of thumb, posted speed limits should be the 85th percentile speed. That is, in free-flowing traffic, only 15% of vehicle would be exceeding the posted speed limit. Drivers travelling much faster OR much slower than the 85th percentile speed are significantly over-represented in crashes.
 
Even NZTA acknowledges that Speed limits must make sense to drivers. Motorists are less likely to comply with speed limits that are seen as too low for the road. Yet the fact that, on most roads, the majority of motorists exceed the posted speeds, and drive up to the speed tolerance, indicates that the limits are set too low.
 
Proposed Solution
 
Rather than a 100 km/h maximum speed limit plus a 10 km/h ticketing tolerance, I suggest that the open road speed limit be changed to 110 km/h with a zero tolerance. Similarly, urban limits of 50 + 10 km/h would become 60 km/h with zero tolerance, and so forth.
 
This would have the following benefits:
 
  • Motorists’ support for speed limits. Suddenly the majority of drivers would not be breaking the law any more.
  • Less speeding, allowing Police to concentrate on the problem driving offenders, and resulting in greater goodwill between motorists and Police.
  • Promotion of accurate speedometers, as the driver is responsible for knowing whether their indicated speed is “high” or “low”. (Calibration is easier nowadays with most smartphones including a GPS speed function.)
  • Less slower drivers, since the current “law-abiding” ones can cease to hold up the average motorists, reducing the need for overtaking.
 
The Future
 
There are some non-arterial urban roads where 60 km/h is too high – particularly narrow cul de sacs. Lowering limits for such roads should not affect travel times or safety, as motorists should already be travelling slowly in such areas.
 
Conversely, on the motorways built to high safety standards, higher speed limits should be considered.
 
Immediate Action
 
I respectfully request the Minister of Police to instruct her department to abandon their plans of imposing the 4 km/h speed tolerance for all of December and January, and revert to just the Christmas/New Year holiday period.
 
Yours sincerely,
David White
 
BE (Mech), PhD (Vehicle Stability)



If you, dear reader, agree with me, please email the Minister of Police (a.tolley@ministers.govt.nz) and calmly tell her so. 
 



5 Reasons Why You Should Hear Christopher Monckton

, posted: 6-Apr-2013 15:10

  1. Climate change is a multi-billion dollar enterprise. Is the expense justified? Government policy should be based on credible science*. Thus it is important to know whether or not to support such policies.
  2. All news sources in North Korea are state-controlled. Similarly, most of what you hear or read about Christopher Monckton is filtered through hostile media. You owe it to yourself to hear directly from the "original source".
  3. Christopher Monckton is careful to include sources for all data that he quotes. Much of it comes directly from IPCC reports.
  4. He attracts strange detractors to his meetings. None are willing to debate him publicly - or on broadcast media - but they attend purely to garner attention to themselves, or disrupt polite discourse. This makes for an amusing sideshow.
  5. It's cheaper -- and better researched -- than listening to Al Gore.
Check him out for yourself. I did. Tour itinerary.



* "Credible science" is my term. It is science where all data (including confidence intervals), methodologies, and analysis algorithms are published so that independent researchers can confirm the results. The data presentation accurately represents the underlying measurements without resorting to dubious methods (such as carefully selecting time series ranges). The conclusions are scientific -- not political.



NuPeek - a local NuGet and Symbol Server for .NET

, posted: 2-Mar-2013 13:55

Summary

Describes the benefits of a local NuGet and Symbol Server, and reviews NuPeek (Open Source).

1. What/Why?


A NuGet server is a repository for NuGet packages. The advantages of a local NuGet server are:

* Secure dispensing of proprietary content
* Local control of third party content (eg you choose when to upgrade open source packages)

A Symbol Server is a repository for debugging information (such as source files and pdb files), commonly distributed via symbol packages. As source, it is even more important to keep it in-house.

2. How?

NuPeek is an open source project, comprising a simple web site and a collection of tools. It assumes that you can generate .nupkg and .symbols.nupkg files for your assembly. (I do that during my TeamCity continuous integration builds.)

Using NuGet commandline, you PUSH your packages to your NuPeek website where it processes them and adds them to its repository folders.

NuPeek also exposes feeds to the stored packages and source. In Visual Studio you configure the Package Manager to point to your local NuGet feed, and use it to add assemblies and references in the usual way.

3. No binaries in source control

Merely commit the packages.config file. All your fellow developers, provided that they have also configured Visual Studio correctly, will receive the packages too. As will your build server. Even if the internet is down.

4. Debug into your packages

Similarly, you can configure Visual Studio to look for debugging symbols from your NuPeek symbol server. It is tricky to get it right, but once set up, you can set breakpoints and step right into the source code of your packaged assemblies -- even though those projects are no longer included in your solution!

This means faster solution loading, less memory consumption, and less "noise".

5. Where?

Download NuPeek from https://bitbucket.org/thinkbeforecoding/nupeek. Kudos to Jérémie Chassaing for writing NuPeek and making it OSS.



Survey Companies Cheating On Participants

, posted: 19-Sep-2012 19:12

There are various internet survey companies who pay their panels of members at below minimum wage to fill in online surveys.

The attraction to the public is a little pocket money. The survey company is attracted by the low cost -- far cheaper than paying staff to phone random telephone numbers. So a WIN-WIN situation.

Or is it?

For any survey, the company needs to know if it has reached its quota for each demographic sector, normally split by gender, age bracket, and location, and sometimes by other criteria, such as ethnic group, income, and survey-specific factors.

So, how are the companies cheating?

By asking actual survey questions, disguised as questions to filter out participants, before eliminating potential respondents. For example, I'd regard it as a reasonable filter question to ask about broadband v dialup internet. But to then ask which broadband company and which mobile phone company a person uses before the door is slammed shut...
Thank you for your interest.
We have reached our target number of participants and the survey is now closed.
There is normally no indication when the Actual survey questions begin. Nor any opportunity to comment on the filtering questions.

How is this cheating?

Because the survey company is gathering all the answers to these questions for free. There is no compensation for the time taken by participants to reach that point.

It is time for smarter survey companies.

Some companies maintain a detailed profile of participants to pre-filter surveys to better match their panelists. This is to be commended as it wastes less time. Companies should establish a reputation system to determine which participants on their panels are the most valuable -- across such metrics as Honesty (via consistency of answers), Availability (via speed of response), Intelligence (via comprehension of trickier concepts), and Suitability (as a measure of broadness of surveys for which they meet the filter conditions). I'm sure there are others.

With such an infrastructure, the survey companies would reject less participants, and gather higher quality data faster. They could afford to pay their quality panelists higher, attracting more people with quicker surveys (less mind-numbing filter questions) and more interesting surveys (aimed at a higher intelligence level).

Who will do it?

 



dmw's profile

David White
Auckland
New Zealand


Goon fan, .NET developer, contrarian seeker of truth