10
submitted 1 year ago* (last edited 1 year ago) by jpfreely@programming.dev to c/rust@programming.dev

When returning an immutable reference to a private struct field. (On mobile and used vertical bars instead of a bunch of HTML codes)

24
submitted 1 year ago* (last edited 1 year ago) by jpfreely@programming.dev to c/rust@programming.dev

I started off avoiding mod.rs because it's the old way and I prefer having the module name as the filename. However, if the module needs a folder for submodules anyway, then there's a reason to tuck it away as mod.rs, especially if not doing so leaves lots of duplicate names (a.rs, b.rs, c.rs, ..., a/, b/, c/).

But then I don't really like to have much else in mod.rs other than mod declarations and pub use. Maybe a utility fn or a not-unwieldly implementation of struct "Foo", the module's namesake.

6

Hi everyone! I started learning rust about 3 months ago and had a sort of working version of this for my own needs, but spent some time (maybe lots) cleaning it up, testing it, and making it worthy of publishing.

https://crates.io/crates/cypher-dto

It's for working with Neo4j (cypher query language). It aims to assist in creating manual queries but provides unitary CRUD operations for nodes and relationships out of the box. Some other niceties:

Generates new(), getter methods, and a builder struct, and copies doc comments to them.

Has 'smart' handling of created/updated timestamp fields.

Supports multi-valued primary keys; uses the term "identifier" for that set of fields.

[-] jpfreely@programming.dev 5 points 1 year ago* (last edited 1 year ago)

One time we got around the security for a shared windows folder (Win98). Another time a couple of us printed fake midterms for ourselves on official headered paper. But the one that sticks out is this trojan program I got from my older brother called deepthroat. I put it on a couple of other people's computers that I wanted to mess with, and proceeded to open their cd tray, pop up fake warnings/errors, and other random stuff that a friend and I thought was hilarious at the time. It all stopped when I popped up a message that said "Contacting [name]'s parents..." on this girls computer and she got the teacher's attention about it. He knew what was up and scanned all the computers. He was mad but we didn't really get in trouble. We also did the fake desktop screenshot stuff :D

[-] jpfreely@programming.dev 12 points 1 year ago

Must have forgot to write it down

29
[-] jpfreely@programming.dev 4 points 1 year ago

What user data is visible by and admin on a federated server?

[-] jpfreely@programming.dev 28 points 1 year ago

I'm not. How bad was it?

[-] jpfreely@programming.dev 8 points 1 year ago

My understanding of trunk based development is that it allows for short lived branches and keeps longer work behind feature flags as it is merged in pieces. The common CI approach with pull/merge requests having to pass tests still applies.

[-] jpfreely@programming.dev 3 points 1 year ago

This is awesome. Scary

[-] jpfreely@programming.dev 11 points 1 year ago

That's the one problem. An LLM enhanced terminal sounds great. Sharing every command with the cloud does not.

[-] jpfreely@programming.dev 8 points 1 year ago

You should check that your stuff isn't undeleted by Reddit. Some other people have reported them doing that.

[-] jpfreely@programming.dev 4 points 1 year ago

You missed the point that op is trying to help the engineers understand where their work comes from and the effects it has. Giving them or letting them be part of the bigger picture aids in the decision making process when doing the actual engineering.

9

Wasn't sure where to post this. It's pretty funny but also sad. As a human, I feel that way.

[-] jpfreely@programming.dev 7 points 1 year ago* (last edited 1 year ago)

I've had that article saved for years, it's still the best way to break down documentation imo.

Another key point for code documentation is that the closer it is to the code it's describing, the more likely it is to be read and maintained. The book "A philosophy of software design" has a section on it.

1
submitted 1 year ago* (last edited 1 year ago) by jpfreely@programming.dev to c/dart@programming.dev

This is c/dart (!dart?). See also c/flutter.

Edit: there's also https://lemmy.world/c/dartlang

1
[-] jpfreely@programming.dev 4 points 1 year ago

I love making a good dev experience, it's a positive feedback loop of productivity and satisfaction/relief.

view more: next ›

jpfreely

joined 1 year ago