Learn to code by coding - try our free CS courses

How to Recursively Traverse JSON Objects

photo 1527266237111 a4989d028b4b

I’ve found that it’s pretty rare that I need recursion in application code, but every once in a while I need to write a function that operates on a tree of unknown depth, such as a JSON object, and that’s often best solved recursively. Even though recursion is rare, it is important to recognize when …

Read more

Secure Random Numbers in Node JS

http://thehobbyts.com/fun-dice-games-ultimate-list/

Randomness is a hard problem for computers. Most functions that generate randomness are not considered cryptographically secure. What this means is that it’s possible for attackers to take a good guess at what number a non-secure randomness generator generated. In the case of guessing a randomly generated private key, for example, this can be catastrophic. …

Read more