Programming

This magazine is not receiving updates (last activity 3 day(s) ago). Subscribe to start receiving updates.

haui_lemmy , in Struggling database company MariaDB could be taken private in $37M deal
@haui_lemmy@lemmy.giftedmc.com avatar

I didnt know there was a mariadb company and that they were public. Does this have implications for mariadb as a product?

lemmyvore ,

It really doesn't matter much anymore. MariaDB doesn't have the significance it once had. Worst case scenario if it were to disappear people would switch to Postgres and that's that.

daq ,

Huh? Postgresql is not mysql compatible. Mariadb is very popular in a ton of businesses around the world as a not stupidly expensive sql database with great support.

doesnt_use_lemmy , in Particle Life - Beautiful simulations arising from incredibly simple rules

I saw this a while back - super inspiring. Absolutely top marks from me!

vext01 , in Particle Life - Beautiful simulations arising from incredibly simple rules
@vext01@lemmy.sdf.org avatar

Avoid a route straight through what is known as....

GammaGames , in Should a toggle button show its current state or the state to which it will change?
@GammaGames@beehaw.org avatar

Why is this 13 year old stack overflow question being reposted

lambda ,
@lambda@programming.dev avatar

Weird, but I found it a super interesting read. It made me think of Home Assistant as one of the only software that I could think of that uses a toggle button from the top of my head. I think it handles these states wonderfully.

Off-big
On-big
Off-smallOn-small

Edit: The big one I rarely see. But, either one seems quite intuitive.

Solemarc , in How do you approach learning a new programming language or framework?

Either I come up with a new project or I rewrite an old project in the new language.

I used to do those old school language tutorials where we start with how to write a variable, then how to write a function, etc. but I think that's better for complete beginners just starting out.

rutrum ,
@rutrum@lm.paradisus.day avatar

I've done project rewrites. This minimizes the problem solving to mostly just syntax, sometimes a new paradigm if the framework is different enough. But in my experience a rewrites goes so much faster than I expect it, since theres a very clear goal to achieve while rewriting. If someone has an existing project to rewrite, I recommend it. If not, you could implement some project in a framework your comfortable with, and then do a rewrite in the new thing.

rutrum , in Everything about TOML format - Orchard Dweller
@rutrum@lm.paradisus.day avatar

Just gonna throw out HJSON as another alternative: https://hjson.github.io/

I thinks a great idea but I have never seen it used in the wild, unforunately.

NewPerspective , in Everything about TOML format - Orchard Dweller

TOML and YAML both have the problem that if you receive an incomplete document, there's a decent chance you can't tell. JSON doesn't have that because of the closing curly.

AMDmi3 ,

That's not a problem of a format and should be handled by transport or storage.

brettvitaz , in Everything about TOML format - Orchard Dweller

Every time I have reached for TOML I have ended up using JSON. The first reason is that Python standard library can read but not write TOML, which is generally useless for me. The second reason is TOML does not add any benefit over JSON. It’s not that much easier to read and IMO JSON is easier to write by hand because the syntax rules are completely obvious.

eager_eagle ,
@eager_eagle@lemmy.world avatar

TOML is mainly for humans to write, certainly not a good choice if you're programmatically writing files - comments and formatting would be lost.

brettvitaz ,

Agreed. Except that it’s not easier to write imo

spartanatreyu ,
@spartanatreyu@programming.dev avatar

Where do you put your comments in JSON files?

Quetzalcutlass ,

I've seen them included as part of the data.

"//": "Comment goes here",

Example here.

suy ,

The very first moment that I had to use JSON as a configuration format, and I was desperate to find a way to make a long string into a JSON field. JSON is great for many things, but it's not good at all for a configuration format where you need users to make it pretty, and need features like comments or multi-line strings (because you don't want to fix a merge conflict in a 400 character-wide line).

brokenlcd , in Do any of you program on non-US keyboard layouts?

I program with the italian layout and i's fine, the only annoyances are that to use the slash you need to use shift, all while the backslash has a dedicated key; also you need to use alt codes to type a tilde.

Nerd02 ,
@Nerd02@lemmy.basedcount.com avatar

I mainly write JS and not having a backtick on my keyboard annoys the fuck out of me. Other than that the Italian keyboard is alright, never had any other problems with it.

uthredii , in New GitHub Copilot Research Finds 'Downward Pressure on Code Quality'

In this regard, AI-generated code resembles an itinerant contributor, prone to violate the DRY-ness [don't repeat yourself] of the repos visited.

So I guess previously people might first look inside their repo's for examples of code they want to make, if they find and example they might import it instead of copy and pasting.

When using LLM generated code they (and the LLM) won't be checking their repo for existing code so it ends up being a copy pasta soup.

GammaGames ,
@GammaGames@beehaw.org avatar

Makes sense, even if it’s not good practice.

It is really useful for hobby projects, though! I needed a recursive function to find a path between two nodes in a graph and it wrote me something that worked with my data in a few seconds, saved a bit of time

MonkderZweite ,

saved a bit of time.

For now.

GammaGames ,
@GammaGames@beehaw.org avatar

?

MonkderZweite ,

Best practices exist to save you time and nerves in debugging.

GammaGames ,
@GammaGames@beehaw.org avatar

Meh, I knew that my graph would never have loops and would only ever have one path from A to B, so it did it well enough. Pretty easy to test!

MajorHavoc , in You probably don't need GraphQL

"GraphQL got a lot of hype because it enabled building typesafe APIs with a better developer experience than any other API"

Haha.

No.

The experience was awful.

Come at me, type-safe bros. Your favorite tech still sucks.

Actually, that's true, across the board. Your favorite technology, it has serious flaws. Frankly, it sucks.

Now get off my lawn.

Unless it's that medicine that prolonged your favorite grandparent's life and quality. That technology is pretty great. But the rest still sucks.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • programming@programming.dev
  • test
  • worldmews
  • mews
  • All magazines