Struggling to Remember Passwords?

Much has been said about Passwords and their importance. The problem of course is that “security” itself is a hindrance to the memory as well as to man’s ability to fulfill a desired function. I often get stuck visiting different website, where I registered 1 year ago, or when I last accessed 2 years ago.

I like any ordinary programmer, would prefer using in Memory Cache (my brain), as opposed to using some tool to manage it with the possibility that it might be intercepted via keystroke or the password cracked to provide every one of your details.

Instead what I have done is a simple concept; I have a Password Structure that is dependent on the Website I visit. An example;

Structure: <Last 4 Letters of Surname><Website Name><First 4 Numbers of Cell Phone>

So if I visited Gmail;

My password would be:


Now instead of having to run some stupid password generation tool, or even bother with opening KeyPass; I have a generic structure to which I can approach any site and know my password.

Holding the Key to the Door, Makes it Much Easier to Turn the Knob.



Don't be shellfish...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInShare on TumblrEmail this to someone

Preventing ‘Stop running this script’ in Browsers


On all major versions of IE you may run into this error – “This page contains a script which is taking an unusually long time to finish. To end this script now, click Cancel”. This is beyond irritating especially when the code is live and is affecting customers. Microsoft has a fix for it, but obviously we cannot ask a customer to do this.


What we are going to try and do is create a “for loop” that builds an array. But consisting of 100000 items.

Using the code

I’ve include a sample project – it’s always so much easier when you can play with the code yourself. Have fun!

Before we get into the code, Kudos completely to Guido Tapia for his code and implementation.

I’ve modified the code and made it slightly mode applicable to me, and also to external readers who do not have the context of the code. There was also some bugs which I ironed out. But again, Kudos to him.

 Collapse | Copy Code
 // Make an Object
RepeatOperation = function (anonymousOperation, whenToYield) {
    var count = 0;
    return function () {
        if (++count >= whenToYield) {
            count = 0;
            setTimeout(function () { anonymousOperation(); }, 100);
        else {

Above we create a simple Object called “RepeatOperation”. In it we have to arguments. One will be our (or your) anonymous operation (work that needs to get done). The second argument, will be the when to yield, or when to fire the Time Out.

In side the function, is a basic count to determine where we are in the “process”. Every time our anonymous operation is called it will come back in here and increment count. When it reaches the yield count, it will then set the Time Out letting the Browser know that this is no an infinite loop.

 Collapse | Copy Code
// Implementation
var i = 0;
var myArray = new Array(noInArray);
var yieldAfter = 100;
var noInArray = 100000;
var ro = new RepeatOperation(function () {  // Anonymous function which is our work that we need 2 
    myArray[i] = i * 1;
    if (++i < noInArray) {
    else {
        // Finished with Operation
        $("#txtBox").val("Completed Operation and no Browser Warning!");
}, yieldAfter);

// Let's begin

Now we get to the meat – remembering that state is maintained across the calls due to that little thing called “closure”. For a better understanding of this implementation, look at this, it’s a wonderful read.

Moving along, we create an instance of RepeatOperation, passing in our “operation” as well as when to yield (after x number of iterations). We then begin by calling RepeatOperation through ro(); Remembering in light of closures, this will now call the “return” function found in RepeatOperation, and where it will validate where we are, and set the Time Out if necessary.

The code will continuously call itself back, and while doing so, build the array that we need or get the work done that we need. When done, it will finish and add the text to our “txtBox”.

Don't be shellfish...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInShare on TumblrEmail this to someone

SignalR – Building Blocks

If you are not aware, to ensure communications of messages, SignalR uses three techniques (found across browsers) [ in this order ];

  1. WebSockets (support in HTML5): This is an HTML 5 specification for a single socket connection (full-duplex) [ Javascript Interface] over which messages can be sent between client and server.
  2. ServerSideEvents (support in other browsers): Also called Event Source. It’s a push technology for sending notifications from the server to a client in the form of DOM Events.
  3. ForeverFrames (support in IE): This makes use of Chunking as found in the HTTP specification, but simiplistically is a Hidden iFrame in a Page that maintains a long-lived connection. Chunking is the process of breaking down large data and sending it incrementally and that same concept exists here with the Hidden iFrame.
  4. Long Polling: Like Polling except the server does not return to client until it is complete (getting the data)
So it will make use of each of these 4 technologies as it sees fit, where it is supported or not.

Hope this helps.


Don't be shellfish...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInShare on TumblrEmail this to someone

Helpful Windows Apps You May Not Know About

  1. Batch Compiler – converts Batch files to Exe
  2. SymLinker – smybolic link creator for windows (like Linux)
  3. FastPreview – View Image Preview in Context Menu
  4. Duplicate Commander – Find and remove duplicate files 
  5. MyWebSQL – Great MySql Web Administration Tool
  6. Code Chameleon – Source Code Formatter / Beautifier and Editor
  7. IP Seizer – Find those duplicate IP and whose using them
  8. RED – Remove Empty Directories (batch delete)
  9. CSVed – Powerful CSV File Editor
  10. Free Studio – All in one package bundling all free multimedia apps
  11. Log Expert – Tail for Windows But Better
  12. Visual Trace Route – From WhatsUp Gold
  13. Sweet Home 3D – Free Interior Design Application
Don't be shellfish...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInShare on TumblrEmail this to someone

Notes On JavaScript

  1. JavaScript has nothing to do with “Java”, not is it an incomplete language because of that latter – “script”.
  2. JavaScript is a “Functional” programming language
  3. Best Book on JavaScript –
  4. JavaScript has Prototypal Inheritance – where objects inherit from other objects. Not classes. This is a class free language.
  5. Javascript makes use of Lamba – use of functions as first class objects
  6. Only one number type in JavaScript – and represented by a 64-bit floating point (double)
  7. NAN – not a number (divide something by zero = NAN). It’s toxic – any arithmetic operation with NAN as an input will have NaN as a result. NAN is not equal to anything; NAN is not NAN
  8. Number(value) – converts 
  9. parseInt(value, radix) – good to put in radix (10 – decimal)
  10. Most useful Math function – takes the integer part of a Number
  11. Strings are “immutable”
  12. Strings you can use double or singe quotes
  13. Strings and Char are the same
  14. String(value) – turns number to string
  15. Null – isn’t anything
  16. Undefined – a variable uninitalized is initialized to Undefined
  17. Falsy Values – false, null, undefined, “”, 0, NAN
  18. All other values are “truthy”
  19. It is a object-orientated language
  20. Loosly – any value can be used, any function
  21. Use === for exact equals (yes three)
  22. JavaScript – every function will return a value 
  23. Object is unordered collection of name value pairs
  24. Object Literal – var myObject = {name: “Jack”, ‘goto’: ‘Jail’, grade: ‘A’} 
Don't be shellfish...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInShare on TumblrEmail this to someone