Ask Lemmy
A Fediverse community for open-ended, thought provoking questions
Rules: (interactive)
1) Be nice and; have fun
Doxxing, trolling, sealioning, racism, and toxicity are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them
2) All posts must end with a '?'
This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?
3) No spam
Please do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.
4) NSFW is okay, within reason
Just remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either !asklemmyafterdark@lemmy.world or !asklemmynsfw@lemmynsfw.com.
NSFW comments should be restricted to posts tagged [NSFW].
5) This is not a support community.
It is not a place for 'how do I?', type questions.
If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email info@lemmy.world. For other questions check our partnered communities list, or use the search function.
6) No US Politics.
Please don't post about current US Politics. If you need to do this, try !politicaldiscussion@lemmy.world or !askusa@discuss.online
Reminder: The terms of service apply here too.
Partnered Communities:
Logo design credit goes to: tubbadu
view the rest of the comments
I tightly curated my feeds to stick to trusted sources on specific topics. The most "controversial" topic in my feed might be how to cook certain things certain ways or maybe business analysis. The rest of my topics are known, trustworthy primary sources for things such as software, electrical, and mechanical engineering, culinary science and techniques.
There's also a bunch of "how to more efficiently do [thing that I already do] with [system I already use/own]." It's pretty difficult to get suckered into misinformation on techniques for automatic code generation in C# or how to cook a carbonara sauce from the author whose books I already own.
Something that really helps is never clicking on anything like "I should have bought this years ago" or any similar shit. I realize that I might be missing out on things that would actually make a certain task easier. But if it's really life changing, I'm sure one of my trusted sources, online or otherwise, will get around to suggesting it to me.
Staying away from talking heads, even ones I like, goes a very long way to preventing blatant bullshit ever getting suggested. I click quite often on "don't suggest again." It's a chunk of effort up front, but then it's a small amount of maintenance from there.
Is automatic code generation LLM?
I'd be into a video about how to do that without falling into the pitfalls
Not at all. In my case, automatic code generation is a process of automated parsing of an existing Ruby on Rails API code plus some machine-readable comments/syntax I created in the RoR codebase. The way this API was built and versioned, no existing Gem could be used to generate docs. The code generation part is a set of C# "templates" and a parser I built. The parser takes the Ruby API code plus my comments, and generates unit and integration tests for nUnit. This is probably the most common use case for automatic code generation. But... doesn't building unit tests based on existing code potentially create a bad unit test? I'm glad you asked!
The API endpoints are vetted and have their own RoR tests. We rebuilt this API in something more performant than Ruby before we moved it to the cloud. I also built generators that output ASP.NET API endpoint stubs with documentation. So the stubs just get filled out and the test suite is already built. Run Swashbuckle on the new code and out comes the OpenAPI spec, which is then used to build our documentation site and SDKs. The SDKs and docs site are updated in lockstep with any changes to the API.
Edit: extra word and spaces
That is really cool! I am not educated enough to understand details. But is it similar to how a compiler uses high level syntax to generate low level assembly code?
Is compiling a type of automatic code generation?
This is an apt comparison, actually.
This is also an apt comparison. Most modern languages are interpreted rather than compiled. C#*, Java, Ruby, Python, Perl... these all sit on top of runtimes or virtual machines such as .NET or JVM. Compilation is a process of turning human-readable language into assembly. Interpreting turns human-readable programming language into instructions for the runtime; in the case of .NET, C# gets interpreted into MSIL which tells the .NET runtime what to do, which in turn tells the hardware what to do.
Automatic code generation is more of "Hey computer, look at that code. Now translate that code to do different things, but use these templates I made."
FWIW, compilers was two semesters in engineering school, so I'm trying to keep this discussion accessible.
*Before anyone rightfully and correctly jumps on my shit about C#, yes, I know C# is technically a compiled language.
Thanks, this is all very interesting. I never knew what .NET was before. Now it makes sense that programs require you to host the specific runtime required for that version of the instructions for the runtime to work.