this post was submitted on 19 Mar 2024
734 points (98.0% liked)

Programmer Humor

19572 readers
1768 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
all 37 comments
sorted by: hot top controversial new old
[–] Norgur@fedia.io 55 points 8 months ago (2 children)

I wanted to answer but there is a space missing or too much, idk. Long story short: my answer isn't working

[–] marcos@lemmy.world 23 points 8 months ago* (last edited 8 months ago) (1 children)

I, for one, remember editing a YAML file and getting it right on the first try!

Once, of course, but that's enough to show it's possible.

[–] Norgur@fedia.io 7 points 8 months ago

It's possible. I do it daily. I also fuck up YAML files and go space-hunting on the daily.

[–] datelmd5sum@lemmy.world 8 points 8 months ago (1 children)

it's storageConfig instead of storageconfig since the CRDs got upgraded to v0.4+, you idiot.

[–] Norgur@fedia.io 6 points 8 months ago* (last edited 8 months ago)

Yeah, you dimwit! Also, PID now doesn't take a multi-line array anymore but single lines with commas, so what's this

PID:
   - 123354
   - 567673
   - 123456

nonsense you're trying to pull here, eh?!

[–] rimjob_rainer@discuss.tchncs.de 28 points 8 months ago (1 children)
[–] DreadPotato@sopuli.xyz 9 points 8 months ago (2 children)

Maybe home assistant a few years ago...I have a fully functional setup with loads of automations and haven't written a single line of YAML for it.

[–] rimjob_rainer@discuss.tchncs.de 7 points 8 months ago* (last edited 8 months ago) (2 children)

I just started using it a few months ago and most stuff I did was only possible using yaml (templates, custom integrations etc.). I think it depends on your requirements.

[–] min_fapper@iusearchlinux.fyi 3 points 8 months ago (2 children)

It's relative. If you just started, it might feel like a lot of YAML, but if you used it back when everything had to be done in YAML, modern Home Assistant will feel like little to no YAML.

[–] stockRot@lemmy.world 11 points 8 months ago

"haven't written a single line of YAML" doesn't sound relative

[–] rimjob_rainer@discuss.tchncs.de 2 points 8 months ago* (last edited 8 months ago)

I have around 2500 lines of yaml, I think that's relatively much.

[–] DreadPotato@sopuli.xyz 3 points 8 months ago* (last edited 8 months ago) (1 children)

None of my custom integrations are configured with YAML anymore, they've all moved to the GUI. Even a couple of my templates have been made directly in the GUI.

"Not a single line of YAML" is a bit hyperbole, but the only YAML I've got left in my setup are a handful of custom sensors, I haven't checked if that can now be done from the GUI. It's around 100 lines of YAML in total or something like that. But all the home automation stuff is done purely with GUI.

There has been huge improvements on what can be done from the GUI in the last few years since I started with HA.

[–] rimjob_rainer@discuss.tchncs.de 1 points 8 months ago (1 children)

Most of my automations use templates. I have template sensors, I use the KNX integration, which must be configured using yaml and the adaptive lighting integration as well. For my dashboard I used many template cards (evaluation of states with templates to set appropriate icons, colours and text), tabbed cards, card mod for css inside yaml for my custom room cards.

You see, it absolutely depends on your requirements and how sophisticated your dashboard is.

[–] DreadPotato@sopuli.xyz 1 points 8 months ago (1 children)

I use the KNX integration, which must be configured using yaml

This is probably because of the devs behind the integration though and not the fault of HA.

I have my all my cards and dashboards defined through GUI as well, you van make plenty sophisticated interfaces without YAML. A lot of tutorials are probably not up to date with what you can do though and use YAML.

[–] rimjob_rainer@discuss.tchncs.de 3 points 8 months ago* (last edited 8 months ago)

I don't think you can do something like this without yaml (fully custom mushroom template cards, each button opens a popup with the entities in the room, text formatting and unit conversion, also icons change dynamically depending on state and icons appear for open windows):

[–] lone_faerie@lemmy.blahaj.zone 4 points 8 months ago (1 children)

It's still all stored as YAML, there's just a lot more help on the frontend

[–] dan@upvote.au 4 points 8 months ago* (last edited 8 months ago) (1 children)

Stuff you configure in the UI is mostly stored in the database, not as YAML. Nearly everything you've configured using YAML is not editable from the UI. Whenever an integration moves from YAML to the UI (like the Proximity integration in a recent release), the YAML config is deprecated.

There's a few exceptions where YAML is stored in the DB (like if you have dashboard cards with custom configs) but YAML is going away over time as the UI gets more powerful, and is mostly just becoming a power-user thing.

[–] lone_faerie@lemmy.blahaj.zone 3 points 8 months ago (1 children)

That's true, I was thinking more about automations and scripts, which are still stored as YAML

[–] dan@upvote.au 3 points 8 months ago (1 children)

Oh yeah, good point. It might make sense for those to remain YAML to allow for more advanced tweaks. I learned programming in Excel 97 by recording macros and then viewing and tweaking the VBA code behind them, and this feels kinda similar (although YAML isn't a programming language).

[–] lone_faerie@lemmy.blahaj.zone 1 points 8 months ago (1 children)

Oh wow, that must've been painful

[–] dan@upvote.au 1 points 8 months ago* (last edited 8 months ago)

It was a pretty decent way to get started with coding! This was back in the late 90s in Australia. I didn't have internet access or programming books, so all I could do was teach myself. Being able to record a macro and see the code behind it was extremely useful! :)

[–] UnfortunateShort@lemmy.world 10 points 8 months ago (3 children)

I hated YAML at first glance, but it kinda grew on me

[–] asyncrosaurus@programming.dev 5 points 8 months ago

Like a fungus you learn to live with

[–] FooBarrington@lemmy.world 2 points 8 months ago

I hated YAML at first glance, and my hate has only increased since

[–] mynamesnotrick@lemmy.zip 1 points 7 months ago

Pretty accurate... I am just realizing I've moved out of the despise stage and into acceptance.

[–] astraeus@programming.dev 9 points 8 months ago (1 children)

Me seeing this as I have a CloudFormation template pulled up in the background

[–] Unreliable@lemmy.ml 6 points 8 months ago (1 children)
[–] astraeus@programming.dev 4 points 8 months ago

I’m trying to get my folks onto Pulumi, but we’re now just getting somewhere with CFN. Baby steps

[–] MrSpArkle@lemmy.ca 8 points 8 months ago (1 children)

It’s ok, someone will just swing through the window and save you from the complexity and dread of YAML with the gracefulness of pulumi and jsonnet.

[–] zinderic@programming.dev 14 points 8 months ago* (last edited 8 months ago)

Right. Why should someone write 10 lines of yaml when they can program 20 lines of Go? Or python. Or assembly for a risc cpu because it just feels so friendly with that nice instruction set.

[–] FrostyCaveman@lemm.ee 4 points 8 months ago (1 children)

That’s how I spent most of last year..

[–] agressivelyPassive@feddit.de 4 points 8 months ago

It's how I will spend most of this year. That is, the few minutes I'm not on the phone.

[–] Lmaydev@programming.dev 3 points 8 months ago

This is why I convinced my last job to get rancher ui setup.