Heeeellllooooo friends!
Hope you're having a good week. Mine was busy, which is better than boring. Let's get scootin.
Web links of the week
How to create a Neural Network in JavaScript in only 30 lines of code
The What and Why of Redux
Typical JavaScript interview exercises (explained)
How My 10-Year-Old Learned Javascript
Something that interested me this week
This week, I wrote
a tweet that got pretty popular (before tell me how to quit vim: I know how to quit vim)!
As my phone started to rapidly die from the notifications, I started looking into how to find out what made the tweet so popular (besides my amazing sense of humor).
First of all, I found out that
Twitter Analytics is free and pretty easy, which was a pleasant surprise. It seems more geared towards businesses, but it's fun to see the number of impressions you make over time (my tweet pushed me to over a million for the past month!) and the amount of engagement around each tweet. I also learned, fun fact, you're limited to making 1,000 tweets per day (which is a LOT of tweeting, so I doubt that'd be an issue for anyone). Anyway, after hunting around for tools, I struggled to find out which retweets pushed it out to the most people.
Twitonomy was helpful, but only showed the most recent 100 retweeters on their free plan.
TweetStats was also interesting, but mostly just showed graphs of who you reply to most often (that's what I found most tools to do). In the end, just from scrolling on the tweet itself, I did see that
Tim Pope,
SwiftOnSecurity,
Stack Overflow, and
the GIMP retweeted it, but that's probably as far as I'll get (without paying for a business tool, which really, I don't need). Anyway. On with the show!
Interview question of the week
Write a function that takes in an integer n that prints a ”spiral” of n × n numbers, using constant space (no arrays allowed).
For example, here’s what the spiral looks like for n = 10:
99 98 97 96 95 94 93 92 91 90
64 63 62 61 60 59 58 57 56 89
65 36 35 34 33 32 31 30 55 88
66 37 16 15 14 13 12 29 54 87
67 38 17 4 3 2 11 28 53 86
68 39 18 5 0 1 10 27 52 85
69 40 19 6 7 8 9 26 51 84
70 41 20 21 22 23 24 25 50 83
71 42 43 44 45 46 47 48 49 82
72 73 74 75 76 77 78 79 80 81