Comments on: 322: TZ Discussion – My Code Bot https://techzinglive.com/page/1663/322-tz-discussion-my-code-bot If you're a hacker, you'll probably like our show ;) Tue, 01 Jun 2021 18:16:00 +0000 hourly 1 https://wordpress.org/?v=6.5.5 By: Danilo Celic https://techzinglive.com/page/1663/322-tz-discussion-my-code-bot/comment-page-1#comment-21840 Tue, 14 May 2019 14:55:21 +0000 http://techzinglive.com/?p=1663#comment-21840 I want a Code Bot, and I want it now, daddy!

Unfortunately my comment got lost in the aether, so you’ll just have to assume it was witty. 🙂

Thanks for the increased frequency guys!

]]>
By: Jason https://techzinglive.com/page/1663/322-tz-discussion-my-code-bot/comment-page-1#comment-21837 Wed, 08 May 2019 23:08:51 +0000 http://techzinglive.com/?p=1663#comment-21837 @Michael Rakita – Yeah, I looked into PM2 as an option, but I eneded up going with systemd, mostly because Justin put it in my brain. Anyway, it seems to work well, and it restarts the crashed process within a matter of a couple hundred milliseconds, which I think is probably quick enough.

]]>
By: Jason https://techzinglive.com/page/1663/322-tz-discussion-my-code-bot/comment-page-1#comment-21836 Wed, 08 May 2019 23:05:55 +0000 http://techzinglive.com/?p=1663#comment-21836 @Caleb – The Node.js memory limit is an interesting hypothesis, but according to top, it doesn’t appear to be the problem.

]]>
By: Jason https://techzinglive.com/page/1663/322-tz-discussion-my-code-bot/comment-page-1#comment-21835 Wed, 08 May 2019 20:55:30 +0000 http://techzinglive.com/?p=1663#comment-21835 @Mark – Thanks so much for that. Running Math Academy is just an incredible amount of work and it never seems to abate, but every time I talk with the kids or parents it reminds me how worth it it all is.

I’m sorry to hear your academic experience turned out to be so frustrating, but it’s really impressive that you were able to do that kind of math on your own.

]]>
By: Michael Rakita https://techzinglive.com/page/1663/322-tz-discussion-my-code-bot/comment-page-1#comment-21833 Sun, 05 May 2019 22:49:54 +0000 http://techzinglive.com/?p=1663#comment-21833 Hey Jason,

For node process management you can use something like PM2:

https://github.com/Unitech/pm2

PM2 restarts a failed node process in 10-20ms. It also has a nice API so you can monitor/control child processes from your main node app. No Linux admin bot is needed 🙂

And you don’t have to re-invent the wheel with sockets for inter-process communication. ZeroMQ is super fast and very reliable. With 0MQ pub/sub a publisher or a subscriber can be restarted at any time and connection will be re-established automatically, you don’t need to write any code. There is no loss of data when a subscriber restarts quickly because the data is queued on the publisher’s side.

]]>
By: Caleb https://techzinglive.com/page/1663/322-tz-discussion-my-code-bot/comment-page-1#comment-21832 Sat, 04 May 2019 03:30:41 +0000 http://techzinglive.com/?p=1663#comment-21832 With the crashing node process it could be that process is running out of memory. Node by default only allows the process to use 1400MB of memory and if it exceeds that you won’t get an exception that you can handle.

One simple thing to do is just to write a bash script that loops starting your node process. That way when it crashes bash will start it again immediately. For simple things like dealing with processes that crash occasionally I’ve found the bash script approach works pretty well.

]]>
By: Mark https://techzinglive.com/page/1663/322-tz-discussion-my-code-bot/comment-page-1#comment-21831 Fri, 03 May 2019 16:56:12 +0000 http://techzinglive.com/?p=1663#comment-21831 @Jason The value in what you’re doing at Math Academy is really hard to overestimate, even with “just” a few hundred students. My entire life would have been different with access to a program like that. I’m not sure how I did, but I studied on a very similar time scale as your students. I got into a college my family couldn’t afford before high school, was doing linear algebra, discrete math and abstract algebra when I was 14 and I was completely alone.

Nobody else at school was my age and none of my friends even knew anyone else doing something similar. I got good grades for a couple of years and then went back to high school and hated it. It was good socially, but I struggled to even keep the minimum grades to stay on sports teams. I didn’t graduate. Later, when I went back to college at the normal age, I still wasn’t a very good student and I didn’t actually finish my B.A. until age 24. Even today, I know less math than I did at 14 or 15. That said, a portion did stick and probably helped my successful transition into software in my 30s, thanks to whiteboard interviews.

In the long run, I definitely think Math Academy is more important than what you did at Uber. It, or at least Lyft, would have existed anyway. One thing I’d love to see would be training towards GRE subject tests in pure math, applied math or physics. Unlike every MOOC credential I’ve seen that would carry weight that neither universities nor most employers would deny.

]]>