Strangely Perfect Crawling Across Chaos and Time Without End

Mona Vie Name in your URL

27th August, 2010 · Posted in Bad Web

Hacker Attack?

digital attackThis article is a copy of one formally at this web address.  This is currently down and is repeated here in its entirety as a public service!  It's suspected of being hacked, as described here on LazyManAndMoney.  This page will be removed if all is okay. (scheduled to release at midnight Friday 27/08/2010)

Mona Vie Name in your URL!

Mona Vie: Don’t use our name in your URL, unless you’re Wikipedia (and we’re doing the editing), By the author of Expert Fraud Investigation and Essentials of Corporate Fraud , Tracy Coenen "No, MonaVie doesn't endorse or approve me writing about them. In fact, they'll probably get mad that I'm mentioning them. I don't like MonaVie".- Tracy Coenen Earlier this week I wrote about the MonaVie lawyers going after bloggers who do unflattering critiques of the company. Their premise was silly: You can’t use our name in a URL. Here’s exactly what they said in their threatening letter to blogger “Lazy Man”: "As a network marketing company MonaVie does not permit its name to be used in any URL or email address and the company must take necessary action to protect its intellectual property. It is not permitted for a third party vendor to use the MonaVie trade name in any form." So no use of their name in a URL, and no user of their name in any form? Gotcha. Except it’s not so cut and dried. Lots of references to MonaVie in the titles of articles makes it so that their name is in the URL: But the best example of a URL that includes “Mona Vie” and would therefore violate the bogus legal threats of the company comes from Wikipedia: http://en.wikipedia.org/wiki/MonaVie It gets better, though. Not only does Wikipedia use the MonaVie name in a URL (horrors!)… people at MonaVie headquarters actually participate in editing the article about Mona Vie!!! A lot!!! Here’s the link showing edits done by 65.44.117.2: http://en.wikipedia.org/wiki/Special:Contributions/65.44.117.2. You can see lots of edits to the MonaVie article. And here’s the proof that the IP address doing these edits is owned by MonaVie: http://centralops.net/co/DomainDossier.aspx?addr=65.44.117.2&dom_whois=true&dom_dns=true&traceroute=true&net_whois=true&svc_scan=true For now, let’s ignore the fact that Wikipedia rules prohibit a company or its employees from editing articles about the company. That’s a conflict of interest (they obviously have an interest in slanting article material in a positive direction). But I don’t care so much about that, however. What I care about is the fact that use of the MonaVie name in a URL seems to only be frowned upon when the URL is for an article with negative information and opinions. Have the lawyers gone after Inc.com for using their name in the URL? Or MarketWatch? Or Facebook? Here’s the best part about the edits of the Mona Vie page on Wikipedia, though… This edit removed the company’s Income Disclosure Statement from the article. Interesting, isn’t it? Especially since the link is to a page on the official MonaVie website. How could they object to that? Easy. The MonaVie Income Disclosure Statement, if looked at carefully enough, is a damning piece of information. It proves that almost no one is making any money from the “wonderful opportunity” that Mona Vie is offering. Here’s an explanation of the statement, which clearly shows that 99% of MonaVie distributors are making $3.75 a week. What an opportunity. So what is it, Mona Vie lawyers? Can we use your name in a URL or not? Or do your made up restrictions only apply to negative opinions? This article was taken from the " the Fraud Files blog" at www.sequenceinc.com

Random Post: London and Victoria Insurance and Bad Statistics

14th February, 2009 · Posted in Cycling, Freedom, Politics, Science

CTC & Guardian

[amazon-product align="left" alink="0000FF" bordercolor="FFFFFF" height="240" region="uk"]000728487X[/amazon-product]I'm indebted to this week's CTC newsletter for pointing out an article by Ben Goldacre in the Guardian last Saturday (a week ago).   I've used one of Mr Goldacre's articles before in some presentations I've done at work when pointing out the poor and devious ways that good statistics can be presented and the poor data collection and usages that follow. LV (formerly London & Victoria amongst other  in/ass-urance names), did a survey, badly, and then got a plug on TV to talk about it. They said it's got really bad being a cyclist because the accident statistics have gone up.
Now read this link (Perils on the road to PR-reviewed data) and see Mr Goldacre pull the rubbish apart.
Of course, the trouble is that the damage is done.  Comparing the demographics and sheer numerical difference between Saturday Guardian readers and GMTV viewers (lots of children there..) makes the impact of the crap so much worse.  Even the words of the world's oldest and largest cycling organisation were no avail.

British Judge & Bike Hat Stats

In another nutty bit of legal weaselling,  a case where a cyclist and motorcyclist collided (Smith v Finch 2009), the judge, Mr Justice Griffith Williams, ruled that the cyclist could have been found partly liable if wearing a helmet would have prevented or reduced his or her injuries On the face of it, this appears sound.  However, the statistics from long-term data collection disprove the efficacy of cycle helmets except for very young children who have large heads relative to their thin, weak necks. There are a host of reasons why. But as an example of how statistics could be used in future.
Suppose I crashed in my car and damaged my head.  Using statistics, it can be proven that if I was wearing a helmet in my car, that would have reduced my risk of brain damage and the very same logic of the judge could be applied to me.
It sounds daft, but if everyone in the UK was forced to wear helmets when driving, at least 300 deaths a year would be saved. But wait!  Many deaths "on the roads" aren't in cars - they're pedestrians!!! So really, when you leave the house to pop to the shop, you should wear a crash helmet because another 500 people a year will be saved!  When a car hits a person, the pedestrian's head nearly always hits the top edge of the windscreen.  Ouch.
Now that's the power of stupidly using statistics.

And using the judge's logic, everyone killed walking down the street or mown down at a bus-stop by a car - it's your fault!!!  (Only 0.7% of hospital admissions for head injury are cyclists involved in road traffic accidents)

Links & Reading:

How to Clean Up Outlook Contact Phone Numbers using VBA

12th August, 2010 · Posted in Computing

Introduction

[caption id="attachment_7856" align="alignright" width="300" caption="VBA for Fix Phone Numbers"]VBA for Fix Phone Numbers[/caption] I got a new phone and when synchronised with Microsoft Outlook, the phone numbers don't dial out properly because of spaces & STD bracketing.  It's an LG - the previous Nokia was great, as was it's synchronising software!

Solution

I used VBA in a workaround via Microsoft Excel!  (If you don't have Excel, this won't work...).  It will convert phone numbers like (+44) 1234 456789 to 0044123456789.  It also removes "-" entries and ones with multiple spaces as a number, like "   " which are invisible but muck stuff up!  [but see later addendum for later code additions, code is here: FixPhoneNumbers - SP]

First Step

Export the "Contacts" folder from Outlook as an Excel spreadsheet to your hard drive.  Give it a sensible name!

Second Step

Open the Excel file and then press Alt + F11 to open the Visual Basic Editor (VBE).  We're gonna write code now!

Third Step

Insert a new code module.  You can give it a name if you like.  I didn't and just left it as it was.

Fourth Step

Copy this VBA code into the module in the VBE. (That's a screenshot of my code above!)
Option Explicit

Public Sub FixPhoneNumbers()
Dim rg As Range
Dim r As Integer
Dim c As Integer
Dim wks As Worksheet
Dim s As String

Application.ScreenUpdating = False
Set wks = ThisWorkbook.ActiveSheet
r = wks.Cells(1, 1).CurrentRegion.Rows.Count
c = wks.Cells(1, 1).CurrentRegion.Columns.Count

With wks
     .Columns("AD:AT").NumberFormat = "@"

 For c = 30 To 46 Step 1 'all phone fields
      For r = 2 To .Cells(1, 1).CurrentRegion.Rows.Count
      Set rg = .Cells(r, c)
           s = rg.Value
           s = Replace(s, "(", "")
           s = Replace(s, " ", "")
           s = Replace(s, ")", "")
           s = Replace(s, "+44", "0044")
           s = Replace(s, "+", "00")
           s = Replace(s, "-", "")
      If Len(s) < 7 And Len(s) > 0 Then s = "01278" & s 'assume local phone #
          rg.Value = s
      Next r
 Next c
End With

Application.ScreenUpdating = True
Set rg = Nothing
Set wks = Nothing

End Sub
The key is the lines with the Replace function.  Additional lines can be easily added if more gotchas are spotted in your own numbers. If you don't need a line to run, remark (Rem) it out by putting an apostrophe at the line beginning, like this one here... '

Fifth Step

From the Debug menu in the VBE, compile the code.  This ensures that no typos etc have got in. Save the file.

Sixth Step

Now run the procedure called "FixPhoneNumbers".  The simplest way to do this is to make sure the screen cursor is somewhere within the code you've copied in - and then hit F5 on the keyboard. If this is confusing, go to the main Excel screen, hit Alt + F8 and run the macro, which unsurprisingly is called "FixPhoneNumbers"!!

Seventh Step

Save the file again if the changes look alright. If they're not, then close the file without saving, then re-open, and adjust the VBA code to suit your columns, which will be the most likely thing you'll need to adjust. Then do all the above again, from the Fifth Step onwards.

Eighth Step

Import the file back into Outlook. Overwrite old contacts with the new ones. There should be no need to map fields etc because we haven't mucked about with them!

Caveats

  • The code is designed to work with a standard output dump from Outlook.  If you've added or removed fields from the contacts part of Outlook, the export will be different and you'll need to check which columns contain phone numbers.  Modify the VBA code to suit.  In total, there were 92 columns in the export from Outlook, so if you don't have this number then you'll probably need a quick code modification. (That's why I checked the count at the beginning of the code with the CurrentRegion bit so that I could get the dataset size.  In the end, I only needed a row count, but I've left the code in so that you can step through the code using F8 to check yours out.  Clear?  Don't worry. )
  • Some entries I had were local phone numbers.  My code is 01278 so this is added and will need changing to suit your own local STD code if you've entered phone numbers without the exchange.
  • I check that the UK international code is correct.  Change the 44 to your own as appropriate.
  • There's no error checking in the code.  But it should work - it did for me!

ADDENDUM: New Code Version!

This code is smoother and has more features than previously, although I still don't error check. It's advantages are:
  1. It checks all columns and looks for the words "Phone" or "Fax" in the data headings.  In this way, any logical Outlook customisations are taken care of!
  2. It prompts the user for their local STD and National codes, placing these in the correct place.

Next Steps:

  1. I'll turn the code into an xla add-in with a one-click button.
  2. I'll make the whole thing work directly on the Outlook contacts from within Outlook.  I've used the Outlook object model before, just not very often!  So watch this space as current Outlook addins are pricey and a bit of a kludge from what I've read...

The New (Improved) Code Version

Download plain text version: FixPhoneNumbers
Option Explicit

Public Sub FixPhoneNumbers()
Dim rg As Range
Dim r As Integer
Dim c As Integer
Dim wks As Worksheet
Dim s As String
Dim LocalCode As Variant
Dim NationalCode  As Variant

Application.ScreenUpdating = False

LocalCode = InputBox("Do You want Full Code for Local Numbers?" _
                     , "Enter local STD/City dialling code" _
                     , "01278")
NationalCode = InputBox("Do You want cleaned up National Code? e.g. 44=UK" _
                      & vbCrLf _
                      & "+44 goes to 0044" _
                     , "Enter National code" _
                     , "44")

Set wks = ThisWorkbook.ActiveSheet

With wks
       .Range(.Cells(1, 1), .Cells(1, 1).End(xlToRight)).Font.Bold = True

          For c = 1 To .Cells(1, 1).CurrentRegion.Columns.Count Step 1 'all columns
              s = LCase(.Cells(1, c).Value)       's picks up column heading
                                                  'lower case to match search string later
                                                  'as text compare doesn't work
                'now find phone/fax fields and if found, fix numbers
     If (InStr(s, "phone") + InStr(s, "fax")) > 0 Then
            .Columns(c).NumberFormat = "@"      'make text format for tel nos
                                                'allows leading zeroes!

                     For r = 2 To .Cells(1, 1).CurrentRegion.Rows.Count
                         Set rg = .Cells(r, c)
                         s = rg.Value            're-use s
                         s = Replace(s, "(", "")
                         s = Replace(s, " ", "")
                         s = Replace(s, ")", "")
                             If Len(NationalCode) > 0 Then 'not empty string
                                  s = Replace(s, "+" & NationalCode, "00" & NationalCode)
                             End If
                         s = Replace(s, "+", "00")
                         s = Replace(s, "-", "")
                             If Len(s) < 7 And Len(s) > 0 Then s = LocalCode & s
                              rg.Value = s
                     Next r

     Else
        'nowt
     End If
       Next c
End With

Application.ScreenUpdating = True
Set rg = Nothing
Set wks = Nothing

End Sub

Improve the web with Nofollow Reciprocity.

© 2007-2010 Strangely Perfect All Rights Reserved

Easy AdSense by Unreal

Strangely Perfect is Digg proof thanks to caching by WP Super Cache