Choosing a password…

My wife received an email from a good friend recently that contained a link to a website. My wife is pretty internet-savvy, so she was wary of the link, despite the source, as the email contained just the link, no subject and no other content. However, it did throw her a little because it was sent to other mutual friends as well (listed in the to field).

It was evident that the source friends email account had been compromised*, which prompted me to write this blog post about passwords and what makes a good choice of password.

There are many good articles on password selection that I highly recommend you read:

However, these are the rules of thumb that I generally keep:

  • Never use a single dictionary word or name;
  • Make sure it’s more than 8-10 characters;
  • Use punctuation marks or other characters (e.g. !, ?, #, $, & etc);
  • If you’re worried about forgetting your password, use a password manager app (The WordPress article above lists a few).
  • Change them, if you can, regularly (the password manager app helps with this).

If you have any other suggestions or articles on password security, feel free to post them in the comments section.

* I have no knowledge of the strength of my wife’s friends password, I just thought it would be good to reiterate password strength in light of the situation.

OSX 10.7+ Flush your DNS cache

Have you been trying to flush your DNS cache in Apple’s OSX with dscacheutil -flushcache and wondering why it doesn’t work?

Well, they changed it in 10.7 and 10.8. Sheesh, the nerve of them! To flush your DNS cache now, you need to use the following command:

sudo killall -HUP mDNSResponder

OS X keeps a local cache of resolved DNS queries for a time defined by the DNS server, but sometimes it may be necessary to reset the cache immediately and re-query a DNS server. For example, you might do this after an entry on the server is changed or a new entry is added.”

Job done! Enjoy.

JQuery UI’s Accordion and Internet Explorer 7/8

Recently utilised jQuery UI’s accordion widget for a client and found that we had some issues with Internet Explorer 7 and 8 where it wouldn’t open the other tabs. It was reporting an error:

Unexpected call to method or property access

Referring to a line in jQuery:

prepend: function() {
    return this.domManip(arguments, true, function( elem ) {
        if ( this.nodeType === 1 ) {
5855:           this.insertBefore( elem, this.firstChild );
        }
    });
},

It turned out that, as you may or may not know, Internet Explorer is very finicky when it comes to strict HTML code and after close inspection of my HTML code around the accordion, I had a hidden input field inside the accordion selector div (I was using the accordion to display a LOT of radio fields). Once I moved this hidden field outside the accordion div, it worked fine.

So, just keep in mind, for your accordion div, just keep it to the H3 heading and content div for each tab. Anything else will basically break it in IE7 & 8.

Turn Off Firefox’s New Mixed Content Blocker

With version 23 of the Firefox browser, they’ve implemented a mixed content blocker. This will block content that has been loaded from an non secure source, if you’re viewing a secure page (i.e. https).  However, it’s been shipped with a bug in that it if you allow the content to be shown, it only remembers it for that page load.

This turns into a rather tedious repetition of allowing the content. When you’re developing web content in a devel environment, that may include mixed content, it’s rather annoying.

Until that bug is fixed (reportedly in Firefox 24), you can turn it off in Firefox’s advanced config. Please note, that you should only do this if you know what you are doing and that the content you are browsing is indeed safe.

To do this, go to ‘about:config‘. In the search box, type ‘mixed’.

In the options that should appear:

  • security.mixed_content.block_active_content
  • security.mixed_content.block_display_content

Change block_active_content to false and leave block_display_content as false. This should enable the content without the blocking notification/actual blocking.

OSX Mountain Lion & AWOL Web Sharing

I just discovered that Apple had removed the Web Sharing preference from OSX Mountain Lion (10.8) when I tried to access my MySQL server on my MacBook Pro.

If you had discovered the same thing and are wondering how to get it back, I found this great guide by Neil Gee that fixed me right up.

Titanium – Always add a className to your table view rows!

Something that I’ve found to be increasingly temperamental is Ti Android’s differing ability (or inability) to handle different types of table view rows.  I’ve recently had a few situations where I’ve been stuck on a ‘WTF’ moment, trying to figure out what the hell is going on with my app in Android and why it wasn’t working.  Each time, it’s been one single thing that has been causing all the heartache and hear-tearing. The className parameter.

At the time of writing, Titanium’s SDK is up to version 2.1.1. I started writing Ti apps around about 1.5-ish and it was considered that the className property was more a performance helper in iOS than anything else. These days, it’s becoming more and more clear that it’s a necessity if you’re releasing an Android app.

So, remember kids, don’t forget the className parameter. If your table rows vary in any way other than the value of the title, then give it a different className.

Titanium – Gotcha with using events to update views in Android

While developing an app with Titanium Mobile which consisted of displaying messages (a bit like email), I was getting a crash in Android when I checked for new messages and updated the table views, however it was only crashing after I’d viewed the message list in a category and gone back to the main screen for a refresh. The frustrating thing is that it ran fine in iOS but not in Android. Read more of this post

Follow

Get every new post delivered to your Inbox.

Join 160 other followers