Mostly Grey former ginger with a preference for Rust. Leads wg-rustup, sorry about the mess. He/Him or They/Their Now @kinnison@fosstodon.org too

Manchester
Joined December 2008
Filter
Exclude
Time range
-
Near
Replying to @jogbert
Past me was a dick who wrote bad commit messages. Present me is trying to do better so that future me doesn't hate present me quite so much when he's past me :D
1
1
Replying to @jogbert
Heck yes, good commit messages are valuable, though sometimes a one-liner is sufficient tbf. What I hate is people who don't clean up their commits, I view commits as a way to break down a change to understand it better; and as a forward-view to when you have to `git blame`.
1
Replying to @jogbert
That you do that pre-PR code review for yourself is a wonderful thing. Encouraging my colleagues to actually *look* at what they're proposing before they ask others to review it has been a theme of my last 2 years of work :D
2
1
1
Replying to @jmtd
Things can be used in huge success stories and still be thought of as awful by some. cf. C, C++, Java, Windows, etc.
1
TFW you look at MyFitnessPal and realise that a pint of halo top is within your remaining calorie budget for the day.
2
Reasons to love SSDs nr 12652 When you are overcome with toe-tapping goodness on the hifi, your laptop doesn't get sad at being bounced around while it's compiling stuff.
4
Fortunately this library is pretty much 100% data manipulation so I don't think I need much in the way of mocking, but that's useful ideas to put in my toolbelt.
1
Yeah that's how I feel I ought to be treating this -- the doctests just show that I've not written bad examples. I'm just trying to decide between unit tests and integration tests for this. Perhaps I should sleep on the problem :D
1
Replying to @mmstick @rustlang
Yeah, but where do I draw the line when 99% of the API is public? Do I bother with unit tests for specific testing, or do I try and cover all the code by means of integration tests? What about examples, do they count for coverage, or not? Such are my Monday evening ponderings.
2
1
Replying to @marshray @rustlang
Yeah, for non-public content, unit tests makes perfect sense; but given 99% of the library is public API, I wonder if it ought to be in tests/*.rs
1
1
Question for all the @rustlang hackers out there -- Do you prefer #[cfg(test)] stuff in your crate, or code in the tests/*.rs files for testing the majority of your code when your library is almost entirely public API?
13
2
1
14
Replying to @grhmc
Well, I hope I *did* manage to give you something useful in the end, though "good luck" remains my parting comment on the matter :-D
2
I'd forgotten just how rewarding it can be to write code for fun. #rustlang has reignited my love of coding for the heck of it. Though I should probably write more unit tests since 65+ doctests doesn't quite cut it any more.
6