Live data from Hacker News

Just write a test for it

kobzol.github.io

1–10 of 62 posts

Re: Just write a test for it

#3
Sidenote : i found this code quite readable. I'm usually reading Rust code here on HN that's full of weird lifetime annotations or Dyn or super long generic types. As a non-rust dev this freaked me out.

How common is this kind of code in practice ?

Re: Just write a test for it

#4
post #3

Sidenote : i found this code quite readable. I'm usually reading Rust code here on HN that's full of weird lifetime annotations or Dyn or super long generic types. As a non-rust dev this freaked me out. How common is this kind of code in practice ?

Specifying lifetimes and types is mostly used when writing libraries. Writing Rust "as a user" is pretty readable and comfortable.

Re: Just write a test for it

#5
This is a whole ̶l̶o̶n̶g̶ blog post about someone who was surprised that he could use a crate to parse SQL queries in Rust. A bit of an underwhelming read to me personally.

Re: Just write a test for it

#8
post #5

This is a whole ̶l̶o̶n̶g̶ blog post about someone who was surprised that he could use a crate to parse SQL queries in Rust. A bit of an underwhelming read to me personally.

Not even that long, but I agree on the "underwhelming"...

"Oh I found some niche issue that bothered me and wrote some code to fix it."

-> HN Front Page

Re: Just write a test for it

#9

Sounds like this might make for an excellent general SQL lint tool. I thought sqlint[0] was this, but it’s more for syntax than semantics, it looks like. [0]: https://github.com/purcell/sqlint

I wrote a linter for schemas (Postgres only): [link redacted]

I've found it to be a pretty useful way of establishing patterns for data modelling in a team.

Re: Just write a test for it

#10
post #5

This is a whole ̶l̶o̶n̶g̶ blog post about someone who was surprised that he could use a crate to parse SQL queries in Rust. A bit of an underwhelming read to me personally.

It’s actually a great reminder that a good framing and sales pitch matter a whole lot.

The author isn’t just recounting their story, they’re selling it as a lesson in a generic approach that will make you a better engineer.

Whether they can deliver on that promise doesn’t matter. It’s the feeling that’s clickable.

Post reply on HN