6 ms·
It’s possible the architect of the article is actually a marketeer who wanted to publicise the company and its “careful approach” to IOT. Be careful what you
by urbandw311er 5y ago
It’s possible the architect of the article is actually a marketeer who wanted to publicise the company and its “careful approach” to IOT. Be careful what you wish for! Now your engineers just look a little inexperienced as a result.
- unwind 5y agoI had to check the author ...learned that Thingiverse are Swedish, based in Stockholm even. The article was written Adam Dunkels who is certainly not without creds in the embedded world. Why whould he show the code to rand_r() in an article about rand()? So confused now.
- AlotOfReading 5y agoYou shouldn't be confused if you read the article. The actual PRNG is implemented in rand_r() and is the first place most people would look. The issue is in the reentrant wrapper in rand().
- unwind 5y agoI seem to be catching downvotes, but I did read the article. The text right before the rand_r() code box reads: This is the code of the rand() function, which looks familiar: That has to count as at least a typo, but I think it's a bigger editing-type problem.
- adunk 5y agoOP here. I think part of the message here is to not be afraid to come off as inexperienced as an engineer. This particular call to rand() was written by a person with decades of experience with writing code like this. This person maybe isn't a starninjarock developer, but definitely experienced. Who did it? Let's git blame the code: 13a3029435b core/lib/random.c (adamdunkels 2009-02-11 11:09:59 +0000 52) return (unsigned short)rand(); (Yep, that's me!)