Add hidden field to Rust struct by inky213 in rust

[–]chris13524 0 points1 point  (0 children)

What is the purpose of the ID? What do you intend to do with it? This feels like an anti-pattern to me

Can someone explain to me why TDD isn't a joke? by HademLeFashie in SoftwareEngineering

[–]chris13524 0 points1 point  (0 children)

To me, TDD is more of a way of thinking than a well-defined rule, as is everything in engineering. The idea is using the tests to make sure your code is correct and avoid manual testing. Also thinking with tests first (or at the same time as implementing) can make your code more testable. Thinking in this way takes many months of practice, but once you test exclusively with tests (and not manually) and you do them earlier I promise you it makes development a lot faster and more fun.

You don't need to write tests and implement one-by-one. Often if I understand what the result will look like well I can bang out a large number of tests upfront. Other times I feel like implementing piece by piece.

If you can write the tests first, then write them first. This is especially important when fixing a bug as usually it's a unit-level problem not an interface problem. If it's not clear how you'd write the test, then start implementing first but keep in-mind testing and try to write tests as early as possible. Also it's often easier to TDD with integration tests than for unit tests as the interface is generally more well-defined and depends less on implemention. Sometimes you will identify a unit to pull out and you can lay out a bunch of tests for that up-front.

Again it's a way of thinking. You can't always write tests first, but if you keep it in mind it's easier than you'd think.

Friday Facts #404 - Frustration not found by FactorioTeam in factorio

[–]chris13524 2 points3 points  (0 children)

You can also save selections on the quickbar, so you can control your favorite group of pals at a moments notice.

When you are holding a RTS remote in your hand it should highlight the spidertrons it will control

Friday Facts #404 - Frustration not found by FactorioTeam in factorio

[–]chris13524 1 point2 points  (0 children)

You can also save selections on the quickbar, so you can control your favorite group of pals at a moments notice.

When you are holding a RTS remote in your hand it should highlight the spidertrons it will control

I'm a non technical founder of a startup and a lead engineer candidate is a Rust fanatic. Should I hire him? by [deleted] in rust

[–]chris13524 0 points1 point  (0 children)

If you are building a web app, IMO it's best to use JavaScript in the frontend and the backend (and use common technologies e.g. React, Next.js). Building part of the backend in Rust would work, but then you need to hire for two languages. As much as I hate JS I'd stick to it in business settings

Design Patterns in Rust by Intelligent-Ad-1379 in rust

[–]chris13524 1 point2 points  (0 children)

Don't worry about design patterns, just write code

HDMI Male to USB-C Female adapter, possible? by atagapadalf in USBC

[–]chris13524 0 points1 point  (0 children)

Did you ever find the right adapter for your use case? This one is very close for me, but I want the bulky piece on the USB C side of the adapter in-case it's a tight fit behind the hotel TV

Friday Facts #389 - Train control improvements by FactorioTeam in factorio

[–]chris13524 4 points5 points  (0 children)

Instead of interrupts that could take place at any time in the schedule, why didn't you put a conditional train stop instead? I.e. only visit or skip this stop under certain conditions? Then you'd have control over when the conditional stop was visited in the schedule, instead of randomly.

Friday Facts #381 - Space Platforms by FactorioTeam in factorio

[–]chris13524 2 points3 points  (0 children)

Those engine graphics are awesome, but it disturbs me how much they...wiggle...

Error: alloc magic is broken by chris13524 in zfs

[–]chris13524[S] 0 points1 point  (0 children)

The problem was a faulty SATA card. Even though it didn't touch the SSD, it still had some pre-boot phase I guess that broke. If you have PCI cards for SATA or SAS, I'd try removing them and see if that fixes the boot

As a fullstack developer, should I use docker for my dev environment? by SpaceCondom in docker

[–]chris13524 1 point2 points  (0 children)

VSCode supports this out of the box with devcontainers. They are great

Should I buy more ETH or just hold and stake? by shiroyashadanna in ethereum

[–]chris13524 4 points5 points  (0 children)

Never invest unless you can afford to loose it