SEARCH W7R

Monday, November 28, 2016

Memoization in Simple Terms

w7r.blogspot.com

Memoization in real talk

Memoization is a strategy for solving a problem which requires repeated work in some manner. Instead of actually repeating the same work, we memorize it (by we I mean the running program). The program writes memos (reminders) to itself, and then before trying to perform work, it checks to see if there is a memo for the particular problem. The time spent looking at the memos is relatively small when using a special data structure known as the HashTable, but in many cases a flat array, or list of values suffices. If the memo-lookup doesn't exist for a set of parameters, then you will calculate the solution for that set of parameters and then store the result in the hashtable or list for any future calls with that same parameter set.

Why use memoization?

It can turn a recursive function from exponential runtime to something much simpler such as NlogN runtime. Big Oh of k O(k). It is important to remember that the decision of structure for holding "cached" (previously stored) results will effect the program runtime dramatically.

The Hidden Cost

The hidden cost of memoization is the space required to store all of the memos in their data structure. When space is scarce, memoization would not be a good solution.

Sunday, November 27, 2016

Free Online Encrypt/Decrypt Tool for Securing Messages

w7r.blogspot.com

A Good Tool Sits in the Front of the Drawer

So today, I stumbled upon a great tool that will allow me to message friends code without the risk of it being intercepted by someone browsing their messages.
The use cases for using encryption and decryption tools are endless and often specific, but boil down to one concern: PRIVACY.

Encryption: The Scrambler

Encryption tools utilize algorithms to jumble messages into an unrecognizable form. The unrecognizable text or data is known as an encrypted message.
There is no reason to encrypt a message without a means of restoring the message at some later time.

Decryption: The Descrambler

Decryption tools utilize a related algorithm to decode the encrypted message. In order for the decryption algorithm to properly restore the original message, a parameter for the algorithm, as well as which algorithm must be known. For example, you could use "Blowfish" algorithm and use they key "penguins".

Where Online?

Tools4Noobs Encryption tool (The message sender will need to use this)
Tools4Noobs Decryption tool (The message receiver will need this)

HOW TO


How To Use the the Tools

  1. Go to the Tools4Noobs Encryption Tool and paste your original readable text in to the big box.
  2. Select any encryption algorithm. Making the right selection will depend on if you think the output is hard to "decipher" or interpret without the use of decryption tool.
  3. Enter a key to be used to unlock the message (just like a house key)
  4. By any means (preferably not the same way you sent the decrypted message to your friend), send your friend the decryption tool website URL ( and let them know what KEY you used, and what algorithm you used for encryption.

Practice Makes Perfect

So, here is a message I have for you using key=penguins and the algorithm=Blowfish.

3a/dG/tW/IB8ve7j2VV0vCa33sk6RW0XKB1kj8qC7OoQe6kLtJCZoIMU1c0/MoWZYvvh8H6lTqwiUWeU/n4HdzFFE6iNyTgPdviSFl8DHVKVjtRLC4gZC+ByaWyDmuj+cBT21KXAlYncsIDOx4QVffOEAA4w0N1KssVU7h4j1Khchld6Rugn1WHhoazAL2C6Y7rc67zKbL9DySDjrpyj3pInhr9gta2ThC2xnLBLyZLxgJPMytlKjgx2YXKoIw+6L3gOp7L2EmA=

Sunday, November 20, 2016

Double Equals Vs Triple Equals (Javascript)

w7r.blogspot.com

Are == and === different in Javascript? YES THEY ARE DIFFERENT.

Alternative Syntax Exists for a Reason

The inventors and maintainers of the Javascript language did not include the triple equals to account for typing the '=' character one too many times...

Usage of Double Equals ==

The double equals, ==, is used to compare in a flexible manner. What I mean by a flexible comparison is that type-evaluation and conversion is performed before the expression returns a True or False boolean.

Usage of Triple Equals ===

The triple equals, ===, is used to compare in a strict manner. By strict, I mean that no type conversion will take place before comparing the two arguments to the expression (a === b). If the type of variable a and variable b are different, then the triple equals will return False, no matter what. Only when the triple equals expression has two arguments, a and b, of the same type will the comparison take place, in which if the values of argument a and argument b are the same, true is returned; otherwise false is returned.