Skip Navigation
Software Engineering Documentation Best Practice?
  • Code should be self-documenting. That way it is never outdated. Here's an example of this similar to what you can expect to see in practice:

    def nabla_descent(X, y, theta, alpha, delta, nabla):
        m = len(y)
        for _ in range(delta):
            h = X.dot(theta)
            nabla = (1/m) * X.T.dot(h - y)
            theta = theta - alpha * nabla
        return theta
    
  • Making GUIs, how do you pick?
  • I (probably unreasonably) despise using web front-ends for desktop applications.

    GTK is OK. QT is very feature rich, but that adds complexity. Both can be cross-compiled to most systems and shipped with all the required libraries pretty easily.

    I haven't used it in a long while, but I remember liking Java Swing for some reason. Java should be "write once, run anywhere." But, cross-compiling isn't usually too hard, so not sure how much that matters. There's more modern frameworks for JVM-based languages now, but I haven't tried them.

    I've noticed Gradio is popular in the ML community (web-tech based, and mostly used for quick demos/prototypes).

    Edit: For web applications, I prefer Angular's more traditional architecture over React's hook architecture.

  • Showerhead clogged or spraying weird? Soak in it white vinegar, it'll work like new.
  • I tried this with a faucet, but used agricultural 30% vinegar. It stripped the finish off, lol.

    Edit: you can usually just unscrew the faucet cap, and replace the little aerator or soak the old one in vinegar. In my case, I was replacing the sink, so already had the faucet out, and there was lime build-up on the faucet itself.

  • Do you often write scripts to parse a codebase and get familiar with it?
  • Haven't tried Gemini; may work. But, in my experience with other LLMs, even if text doesn't exceed the token limit, LLMs start making more mistakes and sometimes behave strangely more often as the size of context grows.

  • In this post, I wrote about the sad experience of having a friend use AI to wish me a happy birthday. https://robertkingett.com/posts/6627/ #AI #Blog #Blogging #Blogs @fuck_ai
  • I'm pro-AI, but not pro-AI in the sense of, "turn these bullet-points into a verbose email," and not pro-AI for personal communication like this. I hope this kind of stuff doesn't become common. It's like going in the opposite direction of "SMS language" (which I view favorably).

  • What languages/frameworks for small, very low usage apps on limited hardware?
  • Python is quite slow, so will use more CPU cycles than many other languages. If you're doing data-heavy stuff, it'll probably also use more RAM than, say C, where you can control types and memory layout of structs.

    That being said, for services, I typically use FastAPI, because it's just so quick to develop stuff in Python. I don't do heavy stuff in Python; that's done by packages that wrap binaries complied from C, C++, Fortran, or CUDA. If I need tight-loops, I either entirely switch to a different language (Rust, lately), or I write a library and interact with it with ctypes.

  • Pro-Trump ad uses Latin to target Latino voters
  • With the Hispanic people I know that prefer Trump, it's the usual trumpist/Republican reasoning. Even down to anti-immigration, from a person who's father was an undocumented immigrant. Propaganda and desire to be in the in-group among your peers is wild.

  • Editorial: The teen arrested in Georgia school shooting is not an adult, and shouldn't be treated like one
  • I don't think anyone is advocating for a "slap on the wrist." The U.S. criminal justice system is the most draconian in the West, and doesn't do "slaps on the wrist," unless you're in a particular economic or social classes.

    IMO, ideally, he would be sentenced for as long as it takes to rehabilitate him. Could be 5 years, 10 years, 30 years, or never, IDK, I'm not a psychologist. But, the U.S. prison system isn't really designed for rehabilitation either.

  • The Irony of 'You Wouldn't Download a Car' Making a Comeback in AI Debates
  • Production AI is highly tuned by training data selection and human feedback. Every model has its own style that many people helped tune. In the open model world there are thousands of different models targeting various styles. Waifu Diffusion and GPT-4chan, for example.

  • The Irony of 'You Wouldn't Download a Car' Making a Comeback in AI Debates
  • AI are people, my friend. /s

    But, really, I think people should be able to run algorithms on whatever data they want. It's whether the output is sufficiently different or "transformative" that matters (and other laws like using people's likeness). Otherwise, I think the laws will get complex and nonsensical once you start adding special cases for "AI." And I'd bet if new laws are written, they'd be written by lobbiests to further erode the threat of competition (from free software, for instance).

  • To fight AI, we need 'personhood credentials,' say AI firms
    www.theregister.com To fight AI, we need 'personhood credentials,' say AI firms

    It's going to take more than CAPTCHA to prove you're real

    To fight AI, we need 'personhood credentials,' say AI firms

    AI firms propose 'personhood credentials' to combat online deception, offering a cryptographically authenticated way to verify real people without sacrificing privacy—though critics warn it may empower governments to control who speaks online.

    30
    Google Shopping "nearby" alternative?

    I use Google Shopping (the “Shopping” tab on Google) to see if local stores carry certain products, what they cost, how far away each store is, etc. It seems to mostly search national or large regional chains, but it was still pretty useful.

    Is there any alternative to this (in the US)? The “nearby” function has unfortunately got shittier and shittier over the past year or so. It's gotten less “deterministic," just mixing results from local stores with e-commerce stores, further reducing usefulness.

    1
    Television @lemmy.world 31337 @sh.itjust.works
    Thoughts on "The Decamarone?"

    I don’t remember how I heard of it, but just binged-watched it over the past few days. Ratings seem a little bit above average, but I found it very enjoyable. I liked that the mood oscillates between modern comedy and tragic comedy; and that it seems to implicitely critique modern society. The series almost feels like an allegory (or perhaps I’m reading too much in to it).

    3
    Training "AI" On Public Data Is Totally Fine And Not Stealing.

    I've recently noticed this opinion seems unpopular, at least on Lemmy.

    There is nothing wrong with downloading public data and doing statistical analysis on it, which is pretty much what these ML models do. They are not redistributing other peoples' works (well, sometimes they do, unintentionally, and safeguards to prevent this are usually built-in). The training data is generally much, much larger than the model sizes, so it is generally not possible for the models to reconstruct random specific works. They are not creating derivative works, in the legal sense, because they do not copy and modify the original works; they generate "new" content based on probabilities.

    My opinion on the subject is pretty much in agreement with this document from the EFF: https://www.eff.org/document/eff-two-pager-ai

    I understand the hate for companies using data you would reasonably expect would be private. I understand hate for purposely over-fitting the model on data to reproduce people's "likeness." I understand the hate for AI generated shit (because it is shit). I really don't understand where all this hate for using public data for building a "statistical" model to "learn" general patterns is coming from.

    I can also understand the anxiety people may feel, if they believe all the AI hype, that it will eliminate jobs. I don't think AI is going to be able to directly replace people any time soon. It will probably improve productivity (with stuff like background-removers, better autocomplete, etc), which might eliminate some jobs, but that's really just a problem with capitalism, and productivity increases are generally considered good.

    66
    Teamsters president Sean O’Brien speaks at the GOP convention as his union flirts with endorsing Trump - The Boston Globe
    www.bostonglobe.com Teamsters president Sean O’Brien speaks at the GOP convention as his union flirts with endorsing Trump - The Boston Globe

    O’Brien acknowledges Biden has been a “great” president for organized labor. But he told the Globe that Biden hasn’t delivered on all his promises and the Teamsters are worried their backing is being taken for granted.

    Teamsters president Sean O’Brien speaks at the GOP convention as his union flirts with endorsing Trump - The Boston Globe
    68
    The ‘Climate Crisis’ Fades Out

    As the energy transition inches through the ‘issue attention’ cycle, a wiser approach should emerge.

    4
    Mark Zuckerberg indicates Meta is spending billions of dollars on Nvidia AI chips
    www.cnbc.com Mark Zuckerberg indicates Meta is spending billions of dollars on Nvidia AI chips

    Meta appears poised to spend billions of dollars by the end of this year on Nvidia's popular computer chips that are widely used for AI projects

    Mark Zuckerberg indicates Meta is spending billions of dollars on Nvidia AI chips

    Summary: Meta, led by CEO Mark Zuckerberg, is investing billions in Nvidia's H100 graphics cards to build a massive compute infrastructure for AI research and projects. By end of 2024, Meta aims to have 350,000 of these GPUs, with total expenditures potentially reaching $9 billion. This move is part of Meta's focus on developing artificial general intelligence (AGI), competing with firms like OpenAI and Google's DeepMind. The company's AI and computing investments are a key part of its 2024 budget, emphasizing AI as their largest investment area.

    51
    Home Improvement @lemmy.world 31337 @sh.itjust.works
    Mount electric sub-panel over lapped hardie board siding?

    I'm out of room for breakers in my main breaker box, so would like to add 6-breaker sub-panel to install mini-splits, an outdoor electrical outlet, lighting, etc. What's the correct way to mount an exterior sub-panel on a house with lapped hardie-board siding?

    I suppose the easiest thing would be to drill holes in the siding then attach the panel with screws to a stud and the exterior sheathing, but I don't know if that's a proper way to do things.

    I also suppose I could somehow cut a rectangular hole in the siding and mount the subpanel directly on the sheathing. I'm not sure how to prevent water intrusion in that case (is some kind of flashing needed, or is just cock ok?). Seems like it would be hard to cut a clean rectangle in lapped fiber-cement siding on a vertical surface.

    3
    Is there any commercial API that serves anything similar to DeepFloyd IF?

    I'm working on a prototype application, and for my use-case DeepFloyd IF gives me the best results by far. I was using replicate.ai, but the reliability and cold start times are unacceptable for my purposes (and DeepFloyd IF cannot be used in commercial products).

    I think what made IF so good for my use-case is that it starts by generating a very small image. I need images generated with a single subject taking up most of the image and minimal background. I think IF is biased to these kinds of images since it starts with a very small image.

    Currently using Dall-E 2, which is ok, but not nearly as good as IF. Stable Diffusion sometimes produces very weird images (haven't tried SD XL yet).

    0
    Strange browser "back button" behavior?

    I'm seeing strange behavior when I click on a post, then click the "back button" in my browser. Sometimes if I'm on the "subscribed" tab, click on an article, then press back, it seems to show me "all" or "local" posts. Sometimes it shows me a different list if I'm on the "all" tab, click on a post, then press back. Same behavior on Firefox mobile and desktop version.

    Haven't went into in-depth testing, but I can't be the only one seeing this right?

    Guessing it's something to do with browser, CDN, or server-side cache?

    2
    InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)31
    31337 @sh.itjust.works
    Posts 21
    Comments 542