imposters-handbook / feedback

General typos, issues, clarifications etc for The Imposter's Handbook
78 stars 2 forks source link

big o, More info #145

Closed jholt456 closed 8 years ago

jholt456 commented 8 years ago

Rob Great book so far! I was looking over the itsy bitsy data structures project and felt some of the Big-o stuff @thejameskyle talks about in his comments would fit into a nice summary section in the big-o chapter of the book. Just wanted to pass it along.

jamiebuilds commented 8 years ago

All the content in https://github.com/thejameskyle/itsy-bitsy-data-structures and https://github.com/thejameskyle/the-super-tiny-compiler as well as the other related projects I'm working on are/will be licensed in creative commons so you can feel free to use them commercially and I don't care.

However @jholt456, instead of using resources like the imposter handbook I would encourage you to find the free resources out there it is inevitably based on. Charging money for other's work is gross. The free resources tend to be better anyways.

You can find free resources for just about everything within here: https://github.com/sindresorhus/awesome

jholt456 commented 8 years ago

I simply liked the info presented in your comments, and thought mentioning/linking to your work as additional reading might help others reading the book, and trying to grasp the concepts.

robconery commented 8 years ago

@thejameskyle Thanks for dropping by and shitting on a year's hard work. I've given a lot to the community over the years and, occasionally, I charge for what I do. I think we need more of this - people willing to go the extra mile, to go deeper, to create something of extraordinary value.

I read through your stuff and it's pretty good. I like how you've woven JavaScript examples in with the concepts. The ASCII art stuff is cutesy and your humor is distracting but aside from that it's dense and well organized. Who knows - with a few months effort you could round this out to something quite interesting.

For instance: I was just reading through your LinkedList code and it's all of 100 lines of description and then some JS. It doesn't seem like you spent much time on this. There's so much more to add here!

There's no mention of singly vs. doubly linked lists. No mention of null termination. There's no mention of the big O for retrieving a single item O(N) as compared to O(1) for random array access - which is really important to understand as it's one of the reasons speed-hungry apps in older languages favor arrays. I'm not suggesting you don't know this - I'm suggesting that it just needs more of your time.

Your description of Hash Tables is lacking in a number of ways as well. This quote makes my point:

So the hashing algorithm needs to limit the size, which means that there are a limited number of addresses for an unlimited number of values. The result is that you can end up with collisions. Places where two keys get turned into the same address. Any real world hash table implementation would have to deal with this, however we are just going to glaze over it and pretend that doesn't happen.

"Glaze over it and pretend it didn't happen"? Really? And you're going to drop in here and claim that this work is superior to mine?

What about hashing functions and how they're derived? Separate chaining? Linear probing? How about the Big-O for searching a hash table vs. a linked list vs. an array?

Writing about these things properly and completely takes time, doesn't it? What you have amounts to a really long blog post and that's just dandy for people who want something to read while they're sitting on the toilet. But as you know, there is so much more to these topics. Dredging these details takes some serious effort, mostly in just finding and cross-checking the resources! Free resources do not cover things in this much detail, as you assert, above. I did not "base" this book on stuff I could simply Google; I spent hundreds of dollars on reference books alone!

One of the books I bought (and loved) is Algorithms and Data Structures by Mehlhorn and Sanders. You should check out chapter 3.1 for a great explanation of a LinkedList, and then all of chapter 4 on Hash Tables. I think you'll see what I mean when I say "you can do so much more" then just 20 lines of Rick Astley jokes.

I encourage you to do that - we need more good work out there. More spreading of knowledge and less HackerNewsy "shit all over it" mentality.