• 0 Posts
  • 8 Comments
Joined 2 years ago
cake
Cake day: July 4th, 2023

help-circle

  • But is it similar to how a compiler uses high level syntax to generate low level assembly code?

    This is an apt comparison, actually.

    Is compiling a type of automatic code generation?

    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.


  • Is automatic code generation LLM

    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


  • 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.


  • I heard this so much in my “misguided liberal” youth. Now I’m in my 50s, and I have learned so much, seen so much, and can confidently be sure of*** even less than that of which I was sure in my teens and 20s***!

    All of the people who told me “you’ll understand when you’re older” were full of shit. Some of them are still alive and one thing that I understand for sure: they stopped learning, stopped paying attention, and they are confidently incorrect about things that stopped being true during the first and second Reagan administrations.

    Here’s a great example: my damned Conservative, MAGA, kick-the-ladder-out-from-behind-her mother. “You should just stay with an employer, stop changing jobs, and they’ll give you a pension.” Uh, yeah Mom, pensions are no longer a thing. Also, job hopping is how we get meaningful salary increases.


  • It absolutely happens. Most of my long term partners were that “sparks at first sight” energy. In high school, my first girlfriend and I saw each other from across the bus waiting zone, and it was on. Even our parents were blown away by our chemistry. Unfortunately, she died of acute lymphocytic leukemia two years later. My first wife and I spotted each other from across a nightclub dancefloor. I thought she gave me a fake phone number, but turned out to be real. I was on a bike tour, stopped at a winery, and met an amazing woman who became my second wife 18 months later.

    But here’s the problem with that instant connection: it’s almost always a very bad sign. Those instant sparks are indicative of non-verbal cues that both people fit a mutually faulty template. For people who have unaddressed trauma, that template is just waiting to be matched, and it produces disastrous results in the majority of relationships. John Gottman at University of Washington has studied intimate interpersonal dynamics in depth; he and his lab have literally written the book(s) on how to have healthy, fulfilling relationships. Spoiler alert: instant attraction should be a red flag for about 99% of the population.

    But yeah, get professional help.