There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

sj_zero , in Zero to Hero in 1 hour

Unrelated, I love those stairs. They seem like a disaster waiting to happen but I love them.

lightnsfw ,

Break grandma’s hip in 10 easy steps!

KIM_JONG ,

My grandma is so hip, she uses kubernetes.

milkjug ,
@milkjug@lemmy.world avatar

Yo she alright but does she even know how to exit vim

KIM_JONG ,

Bitch, my g-ma :wq yo ass :1,$s/Twice on Sunday//g

PersnickityPenguin ,

Lol 1 easy step

TheBat ,
@TheBat@lemmy.world avatar

Your grandma sounds kinky ngl

my_blackest_day ,

Children injury in 5 easy steps! Available now!

LegionEris ,

Yeah, I am, without sarcasm, super agile and coordinated. I would love to have these steps. It would be fun for me every time. And I’d feel so safe at the top of my tricky stairs. Unfortunately my wife would never. She’d just be trapped downstairs.

sj_zero ,

"My wife" aka the lady you brought down before the drugs wore off who can never leave your basement.

:P

LegionEris ,

Psh. The drugs never wear off. She smokes weed all day every day.

ChickenLadyLovesLife ,

I run 6 miles every other day. A local rails-to-trails path near me is exactly 2.5 miles long, so I have to find some way of getting in an extra mile on my runs. The trail ends at a real railroad track, so for a while I tried running a half mile on the track and back, between the rails landing on every other tie as I ran since the distance perfectly matched my stride. This went on for a couple of years until one day I was doing it and actually started thinking “wow, this is pretty amazing that I can do this and not fall”. Not five seconds later I tripped and fell, landing both elbows and both knees on tie.

Somehow I was only bruised and didn’t break anything, and after ten minutes of groaning I was able to drag myself up and even complete my run. That was my last time running on railroad ties though.

LegionEris ,

Yeah, never take it for granted. You gotta do it on purpose with your feet every time. Learning to purposely activate intuitive motion is the goal. In a way, they’re extraordinarily zen stairs. You have to be right there on the stairs every time.

PersnickityPenguin ,

You should try the Oahu Diamond Head hike then. Its like a half mile of hiking up a funicular track.

GbyBE ,

Perfect stairs to your man cave 🙂

LegionEris ,

Except I’m not a man, and I don’t have a cave. I’m a woman, and I have a cage. But it has to be accessible to my wife so she can let me out eventually o_o So again, no agility stairs allowed.

GbyBE ,

Sorry, I somehow failed to notice the [she/her]. Didn’t mean to offend.

LegionEris ,

Oh you’re good. I actually put it in there after seeing your post. You and the Hexbears inspired me.

PersnickityPenguin ,

“Seem?”

As an architect this is honestly insane. First rule is to do no harm, but someone obviously is a psychopath, and thats the designer.

There is no way that thin metal can even structurally support a person.

GbyBE ,

Of course the metal can support a person. It’s not like one side is floating in thin air. The way this is constructed, both sides of each step are supported and the metal seems thick enough to support quite a bit of weight.

The only thing that bothers me is that forward/backward motion of the steps would put a lot of strain on the connection to the wall or floor. With normal use, that motion is quite limited though.

I’m quite confident the designer of those stairs used the right thickness for the material used, which you can’t judge from a picture.

discostjohn ,

My concern would be if someone slipped and got their leg wedged between two of the steps

GbyBE ,

I guess that would also be a legitimate concern, as the steps are rather short. It would look a bit less sleek with longer steps, but making the steps longer while keeping the supports narrow would still look good in my opinion.

r1veRRR , in Zero to Hero in 1 hour

Kubernetes is so easy! Unless you’re insane enough to have any state at all in your app. But who does that?

knobbysideup , in The lengths we have to go to

Programming languages that use white space to delimit structure are annoying at best. I get annoyed at yaml too, but I’m ok once I have a few templates set up.

corytheboyd ,
@corytheboyd@kbin.social avatar

YAML comes with its own unique pains in the ass https://ruudvanasseldonk.com/2023/01/11/the-yaml-document-from-hell

These things actually matter, come up often enough to actually be annoying, and are a bit difficult to explain and learn into people. You’re basically fine if you just string quote everything that you can, but nobody does that.

lemmylommy ,

That was interesting. And possibly the most Dutch name I have ever heard of.

Scribbd ,

Is Dutch name. Source: am Dutch.

mexicancartel ,

Use TABS guys TABS.

AntEater ,
@AntEater@discuss.tchncs.de avatar

Tabs suck. Use a real editor and spaces work fine.

PreachHard ,

Yeah who tf isn’t using tabs as spaces, it isn’t 2010

mexicancartel ,

Why tabs suck? Explain.

Tabs are neat.

Does you app have too many nested functions?

Use tab width = 2

Do your app have too less nested functions?

Use tab width = 8

Is your app having average number of nested fns?

Use tab width = 4(mostly default)

And all theese can happen without modifying a single byte in the source file, unlike spaces!

merc ,

Except that you have to either indent with only tabs or indent with only spaces. Any time you mix tabs and spaces you are just asking for disaster.

If you indent with only tabs you can’t align things except on tab boundaries. If you have a function that takes 10 parameters and want to do it on multiple lines, the alignment of the extra parameters is going to be ugly.

If you indent with only spaces, you can indent things so that all the parameters line up directly underneath the parenthesis, for example.

mexicancartel ,

I agree we shouldn’t mix tabs with spaces. But use tabs always. I could line up parameters together but may not be just under parentheris, and it looks good and readable for me

merc ,

I think it looks like ass, so only spaces for me.

seitanic , in I'll just sort it myself
@seitanic@lemmy.sdf.org avatar
StarkillerX42 , (edited )

“Actually, this one isn’t ‘Wat’, it’s part of what makes Ruby awesome and powerful, unless of course you actually do this, at which point it’s ‘Wat’”

Zeragamba ,
@Zeragamba@lemmy.ca avatar

let’s talk about Ruby

Ruby like most programming languages doesn’t support bare words, [undefined variable exception]

but if you define a particular method_missing, suddenly Ruby supports bare words. [ruby repeating what was typed]

Now this isn’t deserving of wat. this actually shows just how awesome Ruby is. [Drummer_t-rex.jpg]

But if you actually do this then…

Wat

fraction ,

Based on this you can Take Shit even further with jsfuck

zqwzzle ,
NegativeLookBehind , in Zero to Hero in 1 hour
@NegativeLookBehind@kbin.social avatar

Ok so just learn Kubernetes. And then realize that for it to be useful in a production environment, it needs like 10 other third party things, which you’ll also have to learn, and you’re done!

u_tamtam ,
@u_tamtam@programming.dev avatar

Rule of thumb for kubernetes, if you are learning it “for fun” or on your own, you are not gonna need it :)

alphacyberranger OP ,
@alphacyberranger@sh.itjust.works avatar

Thanks for saying that…I thought I was the only one who thought like that.

CanadaPlus ,

I just want to understand in detail what it is and how it works. Advice?

ramius345 ,
CanadaPlus ,

Thanks. So TL;DR it allows you to set up a little cloud computing service on your own physical machines, minus load balancing which you have to add on?

ramius345 ,

It can be used to scale cloud computing services as much as you want. It’s a scalable container runtime at its core. It provides a means for scaling an overlay network with service discovery and uniform ingress configuration.

u_tamtam ,
@u_tamtam@programming.dev avatar

I’ve found it best explained in some stackoverflow answer mentioning the pet vs cattle analogy. In short, if you know how many servers you have from the tip of your tongue, and what they do more or less, then they are akin to pets: you treat them well and keep an eye on each of them.
Kubernetes is meant for when you have so many of them, that come and go without you even noticing or caring, bearing a number for the sake of production/cost control, this is cattle. Needless to say that this is not your typical app/company running at such a scale, and that there is a 24/7 team of “ranchers” keeping an eye on the herd.

smik ,
@smik@discuss.tchncs.de avatar

10 is a bit exaggerating. What do you really need?

ExternalDNS is nice so you don’t have to config your DNS manually. You might need to install your own Ingress controller. If you want to automatically add and renew certificates cert-manager is great. Security is important! Speaking of, you should add some kind of secret management (something like sealed-secrets, vault or Secrets Store CSI Driver).

A really important thing is monitoring so you know your pods and the cluster itself is healthy. Prometheus is still king in that regard in my opinion. PromQL isn’t that hard. Of course some kind of alerting like AlertManager is a must for prod environments. Be aware that the front ends of those tools are not behind a login so something like oauth2-proxy and dex is vital! You might want to have some visualisation too so Grafana is a nice addition. If you add Loki too you got your OPs covered.

Keeping track of all of your stuff is the hard part so some GitOps is highly recommended. ArgoCD or FluxCD are popular for a reason!

I think that should cover the basic setup so you may scale your CRUD app without worries!

KIM_JONG ,

I think you covered at least 10 things.

RoyaltyInTraining , in The lengths we have to go to
@RoyaltyInTraining@lemmy.world avatar

I don’t think this is a huge problem with a correctly set up text editor and the right techniques to limit code nesting. Doesn’t change my dislike of python tho.

glad_cat , in YOLO-Driven Development Manifesto

In France we have www.la-rache.com which may be older. I may have to post a translation here because it’s realistic.

ICastFist , in I finally created the perfect JavaScript runtime: No-JS
@ICastFist@programming.dev avatar

It’s not at all compatible with my katamari ball of totally required libraries and dependencies - 0/10

glad_cat , in I finally created the perfect JavaScript runtime: No-JS

But you can’t compress or obfuscate it, that’s a downside.

aksdb OP ,

The runtime doesn’t need to be obfuscated. Only the code you run with it. You can still compress and obfuscate that and it will run just as well as it did before. Actually you can completely scramble your code and it would still run exactly the same.

jadero ,

Sweet! That means I can encrypt my code to keep prying eyes away.

knF , in I finally created the perfect JavaScript runtime: No-JS

Can you share the github link? I’m really eager to use it in one of my key projects where JS is a core component :D

ASK_ME_ABOUT_LOOM ,

This project is so popular that it’s preinstalled on every OS!

knF ,

Ah, is it the famous rm -rf / command?

TrustingZebra ,

GNOME-based distros use JS for extensions.

darcy , in I finally created the perfect JavaScript runtime: No-JS
@darcy@sh.itjust.works avatar

amazing.

rentar42 , in I finally created the perfect JavaScript runtime: No-JS

I really like it and it clearly passed the code review without any issues. But I find the diagnostic messages a bit lacking, it can be hard to debug.

aksdb OP ,

But I find the diagnostic messages a bit lacking

That’s weird. Every line of business logic has an infinite amount of logging. Ticket closed; works for me.

rentar42 ,

Oh, but at the same time every single line of business logic logs nothing of value at all!

aksdb OP ,

Well, it’s best practice to only log errors. So …

lockhart ,

No need to de-bug if there is no bugs taps head

xuxebiko , in I finally created the perfect JavaScript runtime: No-JS

Perfection!

looz , in Zero to Hero in 1 hour

minikube start

somegeek , in The lengths we have to go to

Python syntax is the absolute worst

lemmyingly ,

Why do you believe that?

notabot ,

Not the previous commenter, but using indentation as syntax rather than an aid to understanding tge program structure is just painful when you come from any more conventionally structured language. The meme above may be an exaggeration, but it’s not much of one. An IDE can probably help, but needing one just to be able to more easily read the code is excessive.

That said, it’s a popular language and there are plenty of useful libraries, so sometimes the trade off is worth it.

kevincox ,
@kevincox@lemmy.ml avatar

To each their own. If I’m going to bother intending all of my code may as well benefit from it. I don’t actually use Python that much and don’t love it but I am a fan of significant indentation. But most honestly it isn’t a big deal either way. While I would be happier if my preferred language had significant indentation it is very unlikely to be something that convinces me to use a language or not.

magic_lobster_party ,

I’ve programmed Python mostly without IDE without any problem. It’s no more difficult to understand the structure of the program than a bracketed language.

notabot ,

Don’t get me wrong, I know it’s quite possible, I find it just grates when you’re used to braces and semi-colons. They’re sort of a standard across many languages, and is an extra mental gearshift to python syntax.

Marcbmann ,

Coming from C++ and Java over to Python was challenging. The IDE I used at the time also did not like when I used tabs instead of spaces, which drove me up a wall.

I will say that for beginners where python is their first language, it does a good job at reinforcing good practices for writing legible code.

mexicancartel ,

I even coded my first few python programs in nano text editor without any annoying indentation issues. I use TABs btw. Problems usually happen when people mix tabs with spaces

notabot ,

Ah, now we stray into ‘holy war’ teritory. I’d agree with you should use tabs, but the language style guide says 4 spaces per level. As you saym don’t try to mix them.

garden_boi ,

Most projects nowadays use auto formatting tools for convenience. Any python auto formatting tool will automatically convert tabs to spaces. Tabs are a no no in python, as their rendering might depend on the settings of the IDE. Spaces are nice and constant.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines