3 ms·
So maybe write your own version to see how it works, then use the already existing, time and battle tested solution.
by knicholes 6y ago
So maybe write your own version to see how it works, then use the already existing, time and battle tested solution.
- sanjay_316 6y agoAnd in exceptional cases, your similar program will be just different enough in a few key ways that it will open up new use cases. Redis is just a hashmap (and LRU). A load balancer is also just a hashmap (and routing). There are plenty of interesting questions about which particular hashmaps to use in each case.
- sumtechguy 6y agoAlso dragging in a second library also means you are pulling in their issues too. Sometimes a quick little function is all you need. Sometimes though it is so wildly better than what you have it is worth doing. It is about time and cost. One project I wrote a whole subsystem to do a particular thing. On a revision of the OS they had the same thing but way better. Tossed out every line of code I had written and used that. But without writing that thing I would not have know if it was worth it or not.
- sanjay_316 6y ago> One project I wrote a whole subsystem to do a particular thing. On a revision of the OS they had the same thing but way better. Tossed out every line of code I had written and used that. But without writing that thing I would not have know if it was worth it or not. This sounds like it could be a good story to learn from if you wrote it out.
- sumtechguy 6y agoNot very. It was 2 custom controls. The OS came out with built in ones that did the same thing but fit the tooling better and had a few extra things my code didnt. Great learning exp on writing custom controls though! It brought forth my 3 rules of windows programming. Always read the docs (then re-read them). If MS has a bit of GUI that does something there is usually a control in there to do it. For every function in windows there is usually an 'anti' function, they are to be called FILO.
- diehunde 6y agoI wouldn't say "just a hashmap". That would be like saying Kafka is just a log. But I see your point. You could replace some of the very basic functionalities with those data structures.