Ejaad-Nama 0x0B: The Golden Hammer
Ejaad-Nama (Urdu: Letters of Invention). A fortnight newsletter about Science, Electronics, Makers, DIY, and everything technical. We talk about lemons, acid batteries, and anything in between.
If you have not subscribed yet, here is your chance. Add your email and click the subscribe button. (This email may end up in your Promotion or Update tab. If you see that happening, take an appropriate action).
—————————————————————————
Law of the Instrument, (aka) The golden hammer is a concept attributed to the two Abrahams (Maslow and Kaplan). Abraham Maslow, an American psychologist stated:
if the only tool you have is a hammer, to treat everything as if it were a nail. ]
While Abraham Kaplan, an American philosopher explained it:
I call it the law of the instrument, and it may be formulated as follows: Give a small boy a hammer, and he will find that everything he encounters needs pounding.
However, I think the best explanation can only come from Thor, who has the finest hammer:
This concept is also known as Birmingham screwdriver in British and it is a cognitive bias where we rely on our previous experiences and familiarity with our tools to solve a particular problem. It is also very closely related to the Einstellung effect where we tend to solve the problem based on familiarity with the problem in the past even though there could be a simpler way to solve a problem. Obviously, the Maslows hammer points to our narrow mindedness as we get more and more familiar with a particular tool.
I am not big with programming nor do I call myself a proficient programmer, but obsessive use of object-oriented programming was the first thing that came to my mind when I was thinking about the golden hammer. Maybe I just got myself into trouble with this controversial statement, but if you are a programmer reading, I would like to know what you think about it in the comments below.
Personally, I think I have been guilty of using the golden hammer, particularly with 3d printing. Whenever I encounter a problem, I think of using the 3d printer to solve the problem such as 3d printing a kitchen counter trash can which as pointed out by many of my online and offline friends would have been just cheaper to buy from a dollar store. It took about 48 hours to print and over 240 grams of plastic. (it made my wife happy though, there is no price on that :D)
However, I do think (cue: another controversial statement) that some time golden hammer is also the best thing to use. The realization came when I wanted to solder some circuit boards at home and desperately needed a clamp or a vise. A clamp is something which by design and requirement needs to be strong. A clamp that breaks before the object that it is supposed to clamp, is technically not a clamp. I was skeptical of 3d printing on this one and I did not want to spend much but I wanted quicker (you know how it is!).
3d printers print in small horizontal layers. Thin layers of plastic are stacked onto each other to make a 3-dimensional object. Each layer bonds to the layer previously laid out as plastic solidifies while cooling down. However, this bond is also the weakest in a 3d printed object which is where the orientation of the object being printed becomes an important point. Picture taken from 3dhubs.
However, I came across this design on Thingiverse which I did end up printing and using. The design is well explained in this video. However, to summarize, TheGoofyDesigner, first modeled all the forces and their direction which will act on that part. He divided the whole design in separate printable parts so that when in use the forces and tension acting on the load are always parallel to the layers. Here is one example from the video where he explains the forces acting on the base and how it should not be oriented while printing.
In the video, he tests 3d printed bars printed in different orientations and measures the load at which they break. For the final design, by pre-considering the direction of the load, he has divided the parts to optimize the maximum strength a 3d printed machine vice could have. I was particularly impressed by the shape of 3d printed fasteners (the six white prints) which hold the base of the machine vice together.
so far, I have been using it soldering and it has worked like a charm. This brings me back to the Maslow's Hammer. Any engineer with a 3d printer could get trapped into the golden hammer law. However, I feel sometimes the limitation of the instrument can help you get more creative.
—————————————————————————
One way traffic for password hashing by Aqeel ⚒ Arshad
One day, while logging on over the internet, the browser asked me a question that if I want to store my username and password. I was curious about how these passwords are stored. In fact, the password is a secret text only to be remembered but not to be stored. This made me think: how do all these companies process and store the password information online? Do they store it in just plain text? how do the passwords get leaked?
Once, you create a new username and password online, the password is(should) never stored in plain text format. Instead, its cryptographically hashed with proven algorithms like PBKDF2, Argon2, Scrypt, or Bcrypt. Hashing is a "one way only" function for mapping the message. To authenticate, the website asks the user their plain text password and then hashes it again to compare against the stores hash. This is the reason that one cannot reverse the hash to produce the plain text password. Hackers use methods like brute-forcing and Rainbow tables to match the hash.
Data breaches are common these days and if the stolen data includes the username and passwords, the hacker can use tools to recover the passwords. In 2012, hackers stole the user database of Linkedin. This database also included the SHA1 hashed passwords. The hackers were able to recover the password because of the outdated hashing algorithm and no salt. The data has ever since been available online. The most used password found inside the database was "12345678".
Now, how do the browsers store these passwords? The browsers store the password in plain text and some use a master key to encrypt but then you must remember the master key. Anyone having physical or remote access to the device can read the passwords, if not protected by a master key. Here is a post by "Wordfence", about password authentication and cracking them.
Tip: if your password has been leaked, check "';--have I been pwned? "
—————————————————————————
If you would like to send in your projects and hacks to be part of the newsletter, please do comment below, or email me: a.nadeem89@gmail.com. Leave your feedback in the comments about the content. and subscribe here, and share the newsletter with your friend.