Live data from Hacker News

The “Build Your Own Redis” Book Is Completed

build-your-own.org

51–60 of 131 posts

Re: The “Build Your Own Redis” Book Is Completed

#51

Earlier quoted context omitted.

So expensive IMO, only reason I'm avoiding it.

We now have a free tier, so you should be able to try it out :-)

Do you provide educational licenses/pricing? It looks really interesting but I can't afford it as a student.

Re: The “Build Your Own Redis” Book Is Completed

#52
post #49
post #18

Earlier quoted context omitted.

I would ask chatgpt to refactor his text rather than waiting him to do so... I think poor english as an excuse will be a thing of past.

When I see poorly written prose, it makes me distrust the technology imparted. If you can't take time to get the grammar right, why should I believe that you got the code right?

It's possible to be good at coding yet poor at grammar.

Re: The “Build Your Own Redis” Book Is Completed

#53

Sorry for being a little off topic, but the Mini Redis tutorial [1] was really fun when I did it a few years ago. It has you implement a server and client in Rust using the Tokio library. I think Redis is a great server to “build yourself” as you don’t need to start with much to get it going. [1] https://tokio.rs/tokio/tutorial/setup

If anyone is looking at this stuff and thinking it’s intimidating then think again: Redis is mostly a lot of fuss around a hash map. There are cool features sure but the idea is mainly “what if a hash map were accessible from two or more servers”. If you only have one or two servers, you only want a cache, and you don’t anticipate scaling up soon (be honest) you can just use a hash map with expiry checking and not ha…

And some languages will even have this built in to the standard library, like C#'s MemoryCache class.

Re: The “Build Your Own Redis” Book Is Completed

#54

One of my pet peeves when I was learning programming is that I couldn't find any books that would teach how to write tests in real world. There was that chicken and egg problem then, when potential employers would skip my CV because I didn't have any TDD experience and I couldn't find anywhere how to learn this. Before I even learned that something like testing exist, I was so confident like "oh I could write somethi…

It’s right there in the name TDD. You write a test and then you change the code to make the test pass. There are no secrets, that’s all there is to it. If you can do that you can do TDD. That’s why everyone else is putting it on their CV and you aren’t: you think there’s something more to it. There isn’t. It’s a very basic technique.

> how to write code so that it can be proven it works the way intended and that it can handle unhappy paths and edge cases

That is not what TDD promises. All TDD does is ensure you have some tests at all, which is a good base on which to add more tests, so that when you find edge cases you can do more TDD, and TDD is a nice way to work. Nobody in history has come up with a way to make testing comprehensive. You can try quickcheck and fuzzing to generate lots and lots of test cases, but they are still sampling from the input space rather than covering it. You can cover the input space for a single 32-bit number input, but that’s about it. The only way to do better is to formally prove your software is correct using mathematical logic. TDD does not provide this and never will. You might have seen “100% test coverage”, but that claim is close to meaningless with respect to the range of possible inputs that your code is meant to handle. All it says is that every edge case that you did think of has a test that exercises it. A function consisting of “return 0” only will have 100% test coverage with a single test in the suite. Doesn’t mean it works. See SQLite, which still finds bugs despite 100% test coverage.

What you seem to be looking for is someone to teach you how to think of edge cases. That’s a skill that can’t really be taught. Just have a go. When you find an edge case later that you didn’t think of, great, maybe you will think of similar ones next time.

Re: The “Build Your Own Redis” Book Is Completed

#55
post #7

i love this! is there a book like this to learn rust with? it would be amazing to have a working system at the end. (not looking for a beginner, but say, intermediate level book).

You should check out Rust in Action. It teaches rust through a bunch of system programming projects.

Re: The “Build Your Own Redis” Book Is Completed

#56
post #49
post #18

Earlier quoted context omitted.

I would ask chatgpt to refactor his text rather than waiting him to do so... I think poor english as an excuse will be a thing of past.

When I see poorly written prose, it makes me distrust the technology imparted. If you can't take time to get the grammar right, why should I believe that you got the code right?

Not everyone speaks English as their native language.

Re: The “Build Your Own Redis” Book Is Completed

#57

Earlier quoted context omitted.

If anyone is looking at this stuff and thinking it’s intimidating then think again: Redis is mostly a lot of fuss around a hash map. There are cool features sure but the idea is mainly “what if a hash map were accessible from two or more servers”. If you only have one or two servers, you only want a cache, and you don’t anticipate scaling up soon (be honest) you can just use a hash map with expiry checking and not ha…

And some languages will even have this built in to the standard library, like C#'s MemoryCache class.

IIRC there’s a nice abstraction in .NET Core for caching, which has a swappable backend that means you can upgrade from MemoryCache to Redis if you ever need it. If only all software was this good. One of the least-leaky abstractions of all time.

Re: The “Build Your Own Redis” Book Is Completed

#58

Sorry for being a little off topic, but the Mini Redis tutorial [1] was really fun when I did it a few years ago. It has you implement a server and client in Rust using the Tokio library. I think Redis is a great server to “build yourself” as you don’t need to start with much to get it going. [1] https://tokio.rs/tokio/tutorial/setup

If anyone is looking at this stuff and thinking it’s intimidating then think again: Redis is mostly a lot of fuss around a hash map. There are cool features sure but the idea is mainly “what if a hash map were accessible from two or more servers”. If you only have one or two servers, you only want a cache, and you don’t anticipate scaling up soon (be honest) you can just use a hash map with expiry checking and not ha…

Redis offeres alot more then just a key value store. The fuss is the data structures it provides.

And just using a hash map in memory isn't sufficient. You'll have unbounded growth. You need a max size and need to evict. Then you want to do that efficiently so your not wasting space on useless keys...

Re: The “Build Your Own Redis” Book Is Completed

#59
post #20

Earlier quoted context omitted.

Curious if anyone else has checked out their content yet? If so, hows the quality?

The idea is very good - the tests approach is effective and stimulating; they also provide a range of products to study/experiment with. However, I think that the approach to the learning material is "love it or hate it". By design, the service doesn't provide any documentation; it provides references to existing technical documentation (of any kind, including blog posts). Those who expect a focused introduction to e…

Sounds like I might as well not pay them a penny though if its research that I can do myself instead.

Re: The “Build Your Own Redis” Book Is Completed

#60
post #15

Earlier quoted context omitted.

You're probably thinking of https://codecrafters.io/ . I've been meaning to check them out with my education stipend from work, just haven't had the time to devote to it.

So expensive IMO, only reason I'm avoiding it.

This is more than any software engineering learning subscription I have currently per month.
Post reply on HN