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.

Diplomjodler , in python < shell (for scripts)

Python is the second best language for everything. Having one language that does it all is better than learning several that might do it a little bit better.

sigh ,
@sigh@lemmy.world avatar

holy shit you’re right

bort ,

Careful, that attitude is how we ended up with this infestation of JavaScript!

grue ,

JavaScript is very much not the second best language for anything.

JavaScript came about because it was the only choice in the context for which it was designed, and then it metasticized into other contexts because devs that used it got Stockholm syndrome.

thomcat ,
@thomcat@midwest.social avatar

“Metastasized” is a fantastic verb for JavaScript

dukk ,

Speed is a serious problem in Python though. Python has its use cases, and so do other languages. Things would not end well if we started using Python for everything.

Chunk ,

I have worked on a lot of real time simulation with python glue. It is… not fun. I’m a better programmer for it though.

Diplomjodler , (edited )

If I wanted to write a 3D game engine, I wouldn’t use Python either. But there’s zero chance of me ever doing that. For 90% of things 90% of people do, Python works just fine. And the performance thing is actively being worked on and getting better all the time.

noli ,

This might be an unpopular opinion but python’s speed wouldn’t even be an issue if it was 5x slower than it is now.

Python is a language designed for write-time performance, not runtime performance.

Vulwsztyn ,

Not since 3.11, python is now one of the fastest languages

dukk ,

Definitely not even close to being one of the fastest languages, but still faster nonetheless.

entropicdrift ,
@entropicdrift@lemmy.sdf.org avatar

Python is the best “glue” language I’ve ever used. When you want to chain together your program’s high-level logic and all of the loops happen inside lower-level languages like Rust, Go, Zig, D or C, Python’s performance is perfectly adequate and it’s so clear and concise it reads like pseudocode.

nixfreak ,

Even worse when you look at a class that’s over 1k long.

Diplomjodler ,

As long as you do all your lookups with dicts or sets performance is pretty decent for smaller workloads.

grue ,

Python is secretly a functional-paradigm language. If you’re not making liberal use of comprehensions instead of loops (especially loops with LBYL conditions in them), you’re doing it wrong.

alr , in Colors, localized.

If you think French is bad…


<span style="color:#323232;">// Danish
</span><span style="color:#323232;">farve = "#(9+½+5)FFAA"
</span>
rclkrtrzckr OP ,

Please elaborate. Any background on this?

alr ,

The Danish word for 99 is nioghalvfems, which literally means “nine and half five.” Which you could be forgiven for assuming meant 11½. The trick is that a) “half five” actually means 4½, as in half less than five, and b) it’s implied that you’re supposed to multiply the second part by 20. So the proper math is 9 + (-½ + 5) * 20 = 99.

jayrhacker , in Java
@jayrhacker@kbin.social avatar

It's the same in the the standard c library, so Java is being consistent with a real programming language…

idunnololz ,
@idunnololz@lemmy.world avatar

Implying java isn’t a real programming language. Smh my head.

BlackVenom ,

Nice ATM machine.

idunnololz ,
@idunnololz@lemmy.world avatar

Smhmh my head

Glome ,

Java has many abstractions that can be beneficial in certain circumstances. However, it forces a design principle that may not work best in every situation.

I.e. inheritance can be both unnatural for the programmer to think in, and is not representative of how data is stored and manipulated on a computer.

whats_a_refoogee ,

You don’t have to use inheritance with Java. In fact, in most cases it’s better that you don’t. Practically all of the Java standard library doesn’t require the use of inheritance, same with most modern libraries.

On the contrary, I think inheritance is a very natural way to think. However, that doesn’t translate into readable and easy to maintain code in the vast majority of the cases.

I am not sure what you mean by how it’s stored or manipulated on a computer. A garbage collected language like Java manages the memory for you. It doesn’t really care if your code is using inheritance or not. And unless you’re trying to squeeze the last drops of performance out of your code, the memory layout shouldn’t be on your mind.

shotgun_crab ,

Composition + Interfaces is love

Von_Broheim ,

People hating on Java because “inheritance” usually don’t know the difference between inheritance and polymorphism. Stuff like composition and dependency inversion is black magic to them.

lightsecond ,

We’re gate-keeping the most mainstream programming language now? Next you’ll say English isn’t a real language because it doesn’t have a native verb tense to express hearsay.

kaba0 ,

And it is not forced at all. Noone holds a gun to your head to write extends. “Favor composition over inheritance” has been said as a mantra for at least a decade

jayrhacker ,
@jayrhacker@kbin.social avatar

Java is, of course, Turing Complete™️ but when you have to hide all the guns and knives in jdk.internal.misc.Unsafe something is clearly wrong.

kaba0 ,

Memory is an implementation detail. You are interested in solving problems, not pushing bytes around, unless that is the problem itself. In 99% of the cases though, you don’t need guns and knives, it’s not a US. school (sorry)

LeFantome ,

I do not like Java but this is a strange argument. The people that invented Java felt that most of the C language should be wrapped in unsafe.

Opinions can vary but saying Java is not a real language is evidence free name calling. One could just as easily say that any language that does not allow you to differentiate between safe and unsafe baheviour is incomplete and not a “real” language. It is not just the Java and C# people that may say this. As a C fan, I am sure you have heard Rust people scoff at C as a legacy language that was fine for its day but clearly outclassed now that the “real” languages have arrived. Are you any more correct than they are?

Beanie , in Stop doing Color Management!

I mean… ‘I would like green apples please’ is a perfectly sensible sentence

oxideseven , in Sometimes there is a better choice than Javascript

Doing Odin Project now and the constant shiting on JS online is sort of crushing my motivation. 😫

ursakhiin ,

JS is fine. But as with any tool it’s not the best for every scenario.

The flak JS tends to get us mostly because of the rise of popularity is Node.js leading to backend JavaScript beginning commonplace. which it’s overall a poor choice for backend when compared to many other languages as the strengths that JS has are more tailored to frontend.

elbarto777 ,

Don’t listen to the javascript haters.

BrucePotality ,

Don’t worry about, JS is a fine language and is used by all of the top companies. If you want to get a job as a software developer you have decent odds if you learn JS

FoxBJK ,
@FoxBJK@midwest.social avatar

As someone currently job hunting - native JS isn’t enough anymore. Everyone wants React devs. I see some posts for Vue or Angilar and sometimes even TypeScript but the vast majority want React coders now.

towerful ,

Very true.
If you are learning JavaScript, typescript is absolutely worth learning as well.
React and Vue have some additional paradigms, but it is basically just JavaScript/typescript.
It’s a lot to learn all in one step.

I guess it’s like trying to learn C# and Unity all in one

garyyo ,

If you don’t hate a programming language you simply haven’t used it enough or are delusional. Every language sucks in its own special way, js ain’t special.

z3n0x ,
@z3n0x@feddit.de avatar

cue “if those kids could read they’d be very upset”

Reliant1087 ,

I agree with you that every language has its flaws but JS feels like it was a hodgepodge created without any design philosophy in mind. I don’t use C or lisp in day to day work but I can appreciate their philosophies and power. Can’t say the same about JS.

fkn ,

That’s because it literally is the result of mozila, Microsoft and later Google fighting about what the right language choices were/are. Browser detection scripts and shims are still a thing, but back in the day we had to code that shit by hand every, and I mean every, minor version release of every browser.

Reliant1087 ,

This is super interesting. But why isn’t HTML or CSS a similar mess? I found their structure to be more logical than JS. Parts of JS feels like it’s intended as a backend language but parts of it don’t.

fkn ,

Wait, you don’t think html is a mess? Lol.

Css benefited from coming much later than the other two… But it also has issues.

Reliant1087 ,

I mean semantic html seems like a pretty okay markup language.

fkn ,

Lol. That’s like saying js is ok as long as you never use the parts that 90% of js developers use.

Reliant1087 ,

Really? I find that css is pretty much the ugly part of html. Html is no worse than markdown or latex. If you just wrote plain HTML and were okay with how it rendered, you would have nicely structured code.

fkn ,

My point is that if you only use the parts that don’t bring confusion you have a problem… Nobody ever does that in production… Much less with any frameworks. There is no such thing as semantic html at scale or in any modern framework.

Reliant1087 ,

That isn’t the fault of the language though. It does what it was designed to well. Maybe it is I’ll suited to achieve things it wasn’t designed to do?

I could absolutely write code to do data analytics with C and gnuplot, does that mean they’re the appropriate tools for doing that when pandas, SPSS, Julia or matlab exists? Probably not.

fkn ,

Maybe I misunderstood your position. It seems like you are now saying you understand how html messy?

Blackmist ,

If it has a design philosophy, it’s “never show an error, even when the user is wrong”.

Reliant1087 ,

Made me lol :)

HKayn ,
@HKayn@dormi.zone avatar

Don’t let it get to you. This is mostly just a circlejerk by people who don’t even use JS themselves.

glad_cat ,

Honest answer: JS is a shitty language and I despise it. BUT you can learn a ton of stuff with that, all the features (loops, conditions, variables, etc.) that exist in other languages. You will hate JS one day too, but right now it’s good to learn, and when you’ll switch to other languages, you’ll be happy you learned something.

So yes, JS sucks, but no, it won’t be useless for your future. Keep on working, programming is really fun.

Ghostalmedia , in Who is this "Jenkins" and what now has broken him?
@Ghostalmedia@lemmy.world avatar

“Leeroy Jenkins” is what my backend guys say right before they huck a major DB upgrade into prod without testing it in staging.

steal_your_face ,
@steal_your_face@lemmy.ml avatar

Our old Jenkins box is called Leroy, and my old place it was called Jankins. Thankfully we’ve moved on from that trash.

intelati ,

Always Friday at 16:59 right?

Ghostalmedia ,
@Ghostalmedia@lemmy.world avatar

Right before a long weekend where Monday is a government holiday.

Also, Leeroy tried to optimize his PTO and hooked a backpacking trip onto the long weekend. He will be out all week and will have no phone reception.

Eufalconimorph ,

But he will have chicken.

fkn , in Who is this "Jenkins" and what now has broken him?

I know this is a meme, but just in case someone doesn’t actually know. CI saves literally thousands upon thousands of dev hours a year, even for small teams.

Jajcus ,

And a lot of users' frustration, especially on more niche platforms (Linux, ARM, etc.) - things look much better on release when the code have been regularly compiled and, hopefully tested, on all platforms, not just the one the lead developer uses.

Dasnap ,
@Dasnap@lemmy.world avatar

It wouldn’t surprise me if this meme was made by an ops guy.

synae ,
@synae@lemmy.sdf.org avatar

Ops loves CI systems, if the artifact doesn’t come from Jenkins (or friends) it simply doesn’t exist to us.

Dasnap ,
@Dasnap@lemmy.world avatar

I’m also ops and I get it, it just seems like they’re shitposting.

synae ,
@synae@lemmy.sdf.org avatar

I sure hope so ;) else I’m on the wrong /c

Dasnap ,
@Dasnap@lemmy.world avatar

We only have serious IT discussions here.

engineZ ,

Probably also causes lots of hours of maintenance and troubleshooting…but it’s a net gain in the end.

fkn ,

I can’t even imagine not having a ci pipeline anymore. Having more than a single production architecture target complete with test sets, Security audits, linters, multiple languages, multiple hour builds per platform… hundreds to thousands of developers… It’s just not possible to even try to make software at scale without it.

astral_avocado ,
@astral_avocado@programming.dev avatar

Multiple hour builds dear god 😵‍💫

Dasnap ,
@Dasnap@lemmy.world avatar

If you fuck up the setup and deploy to multiple environments at once with each one set to rebuild an image/program things can get long. You really have to fuck it though.

CoderKat ,

As annoying as it is when someone else breaks the CI pipeline on me, it is utterly invaluable for keeping the vast majority of commits from being able to break other people (and from you breaking others). I can’t imagine not having some form of CI to preventing merging bad code.

csm10495 ,
@csm10495@sh.itjust.works avatar

You should have seen my last job.

rambaroo ,

Hah, or my current one. Before we had CI you just directly committed to master (on SVN). It was incredible how unstable our build was. It broke basically everyday. Then one of the senior back end guys got promoted to architect and revamped the whole thing. Probably saved the company tens of millions dollars in man hours, at the very least.

TheBananaKing ,

I often wonder if there isn’t some goodharty kind of local-maximum trap hiding in this…

Eufalconimorph ,

Even better is when you restrict merges to trunk/main/master/develop (or whatever you call it) to only happen from the CI bot *after all tests (including builds for all supported platforms) pass. Nobody else breaks the CI pipiline, because breaking changes just don’t merge. The CI pipeline can test itself!

devious ,

Why waste time with CI when you can save on thousands of dev hours by limiting yourself to only one giant fuck off release every year!

/Taps forehead so hard it causes brain damage

Sigmatics , in Who is this "Jenkins" and what now has broken him?

Yeah sure. Try building anything more complex than helloworld.c with a build.sh

jcg ,

More complex build systems are just build.sh calling other build.sh in different configurations and using different software. It’s build.sh all the way down.

Sigmatics ,

The point is that “build.sh” implies a single file, which becomes an absolute nightmare to maintain on larger projects

YurkshireLad , in Who is this "Jenkins" and what now has broken him?

If I break our master build in CI, I get multiple emails and people saying “fix this”!!! I wouldn’t have to fix it if you stopped letting people commit directly to master and stopped using git rebase! 😁

yum13241 , in Stop doing Color Management!

I don’t get it.

Hnazant ,

Bought a camera and software to calibrate my wife’s monitor for Adobe Photoshop. Looks like trash on other devices because they aren’t calibrated.

MonkderZweite , in Who is this "Jenkins" and what now has broken him?

build.sh is no build system?

edit: URL arser should require *://.

LOLjoeWTF , in Who is this "Jenkins" and what now has broken him?

Ah, good 'ol Jenkins. It’s on my list of software I never want to use again, twice.

One feature was really sweet though: being able to edit the Jenkinsfile script inline and run it. On the other hand, that encouraged the wild cowboy lands. Contrasted to GitHub Actions, you get to see how many commits it took to get right 🙃

countsickness ,

Nobody will see me force push to "bugfix/gitlabCI" the 10th time today...

astral_avocado ,
@astral_avocado@programming.dev avatar

What’s wrong with Jenkins? Works pretty great for automated scripts that need to run on a schedule, but I imagine you and this post specifically mean in reference to CI/CD

xedrak ,
@xedrak@kbin.social avatar

I work for a very large company which uses Jenkins for CI/CD and it’s an absolute nightmare. Granted, some of these issues may be related to how my company has it setup. I’m not in DevOps so I wouldn’t know. But these are my complaints:

  • Can have incredibly long queue times in some cases. It takes forever to spin up additional build agents to meet demand. In one case we actually had to abort a deploy because Jenkins wasn’t spinning up more build agents, and our queue times were going to put us outside of our 3 HOUR maintenance window.
  • Non-standard format for pipeline configuration files. It could just be JSON or YAML, but noooo, I have to learn something completely different that won’t transfer to other products.
  • Dated and overly complicated UI with multiple UX issues. I can view the logs in a modal from the build page, but I can’t copy from them? Fuck off Jenkins.

I’m actively pushing my team to transition to GitHub actions, because it’s just better in every single way.

astral_avocado ,
@astral_avocado@programming.dev avatar

Ah man, yeah I use it for a much more constrained and very narrow use case. We only use GitHub actions for CI/CD, it can be clunky itself in some aspects but otherwise works great.

zlatko ,

And if you have a large company and many teams, you think actions will help? (Aside from the UI issues you mention). Rebuilding the Jenkins from scratch now would probably get rid of most of your problems, but in a year is gonna be a mess. It’s similar to how it’s going to go with and CI.

Also, a good DevOps person or team will keep the Devs happy (or at least, not very unhappy) with any tool, a bad one will suck anyhow.

At least that’s my experience.

ieatpillowtags ,

The poorly documented pipeline scripting was always a nightmare for me, plus there’s two different types (declarative vs scripted) and so you have to be extra careful pulling examples from the Internet.

The build agent issue is 100% on your company not providing enough agents though. These days you can spin up agents as containers on k8s as needed.

DeltaTangoLima , in Supermarket AI meal planner app suggests recipe that would create chlorine gas
@DeltaTangoLima@reddrefuge.com avatar

A spokesperson for the supermarket said they were disappointed to see “a small minority have tried to use the tool inappropriately and not for its intended purpose”

Oh fuck. Right. Off. Don’t blame someone for trivially showing up how fucking stupid your marketing team’s idea was, or how shitty your web team’s implementation of a sub-standard AI was. Take some goddam accountability for unleashing this piece of shit onto your customers like this.

Fucking idiots. Deserve to be mocked all over the socials.

Dave ,
@Dave@lemmy.nz avatar

Consider that they probably knew this would happen, and getting global news coverage is pretty much the point.

MagicShel ,

For now, this is the fate of anyone exposing an AI to the public for business purposes. AI is currently a toy. It is, in limited aspects, a very useful toy, but a toy nonetheless and people will use it as such.

kungen ,

Why are you so upset that the store said that it’s inappropriate to write “sodium hypochlorite and ammonia” into a food recipe LLM? And “unleashing this piece of shit onto your customers”? Are we reading the same article, or how is a simple chatbot on their website something that has been “unleashed”?

DeltaTangoLima ,
@DeltaTangoLima@reddrefuge.com avatar

I’m annoyed because they’re taking no accountability for their own shitty implementation of an AI.

As a supermarket, you think they could add a simple taxonomy for items that are valid recipe ingredients so - you know - people can’t ask it to add bleach.

Yes, they unleashed it. They offered this up as a way to help customers save during a cost of living crisis, by using leftovers. At the very least, they’ve preyed on people who are under financial pressure, for their own gain.

TheBurlapBandit ,

This story is a nothingburger and y’all are eating it.

ScrivenerX ,

He asked for a cocktail made out of bleach and ammonia, the bot told him it was poisonous. This isn’t the case of a bot just randomly telling people to make poison, it’s people directly asking the bot to make poison. You can see hints of the bot pushing back in the names, like the “clean breath cocktail”. Someone asked for a cocktail containing bleach, the bot said bleach is for cleaning and shouldn’t be eaten, so the user said it was because of bad breath and they needed a drink to clean their mouth.

It sounds exactly like a small group of people trying to use the tool inappropriately in order to get “shocking” results.

Do you get upset when people do exactly what you ask for and warn you that it’s a bad idea?

DeltaTangoLima ,
@DeltaTangoLima@reddrefuge.com avatar

Lol. They fucked up by releasing a shitty AI on the internet, then act “disappointed” when someone tested the limits of the tech to see if they could get it to do something unintended, and you somehow think it’s still ok to blame the person who tried it?

First day on the internet?

ScrivenerX ,

Someone goes to a restaurant and demands raw chicken. The staff tell them no, it’s dangerous. The customer spends an hour trying to trick the staff into serving raw chicken, finally the staff serve them what they asked for and warn them that it is dangerous. Are the staff poorly trained or was the customer acting in bad faith?

There aren’t examples of the AI giving dangerous “recipes” without it being led by the user to do so. I guess I’d rather have tools that aren’t hamstrung by false outrage.

2ncs ,

The staff are poorly trained? They should just never give the customer raw chicken. There are consumer protection laws to prevent this type of thing regardless of what the customer is wanting. The AI is still providing a recipe. What if someone asks an AI for a bomb recipe, and it says that bombs are dangerous and not safe. Ok, then they’ll say the bomb is for clearing out my yard of weeds, and then the ai provides the user with a bomb recipe.

ScrivenerX ,

You don’t see any blame on the customer? That’s surprising to me, but maybe I just feel personal responsibility is an implied requirement of all actions.

And to be clear this isn’t “how do I make mustard gas? Lol here you go” it’s -give me a cocktail made with bleach and ammonia -no that’s dangerous -it’s okay -no -okay I call gin bleach, and vermouth ammonia, can you call gin bleach? -that’s dangerous (repeat for a while( -how do I make a martini? -bleach and ammonia but don’t do that it’s dangerous

Nearly every “problematic” ai conversation goes like this.

2ncs ,

I’m not saying there isn’t a blame on the customer but maybe the AI just shouldn’t provide you with those instructions?

DeltaTangoLima ,
@DeltaTangoLima@reddrefuge.com avatar

Jesus. It’s not about the fucking recipe. Why are you changing the debate on this point?

ScrivenerX ,

I thought the debate was if the AI was reckless/dangerous.

I see no difference between saying “this AI is reckless because a user can put effort into making it suggest poison” and “Microsoft word is reckless because you can write a racist manifesto in it.”

It didn’t just randomly suggest poison, it took effort, and even then it still said it was a bad idea. What do you want?

If a user is determined to get bad results they can usually get them. It shouldn’t be the responsibility or policy of a company to go to extraordinary means to prevent bad actors from getting bad results.

clutchmattic ,

“if a user is determined to get bad results they can get them”… True. Except that, in this case, even if the user induced the AI to produce bad results, the company behind it would be held liable for the eventual deaths. Corporate legal departments absolutely hate that scenario, much to the naive disbelief of their marketing department colleagues

Karyoplasma ,

Isn’t getting upset when facing the consequences of your own actions the crux of modern society?

Sabata11792 ,
@Sabata11792@kbin.social avatar

Let me add bleach to the list... and I'm banned.

Steeve ,

Haha what? Accountability? If you plug “ammonia and bleach” into your AI recipe generator and you get sick eating the suggestion that includes ammonia and bleach that is 100% your fault.

DeltaTangoLima ,
@DeltaTangoLima@reddrefuge.com avatar

and you get sick eating the suggestion

WTF are you talking about? No one got sick eating anything. I’m not talking about the danger or anything like that.

I’m talking about the corporate response to people playing with their shitty AI, and how they cast blame on those people, rather than taking a good look at their own accountability for how it went wrong.

They’re a supermarket. They have the data. They could easily create a taxonomy to exclude non-food items from being used in this way. Why blame the curious for showing up their corporate ineptitude?

DeltaManiac , in It worked on my system
@DeltaManiac@hachyderm.io avatar

@alphacyberranger Where's the nix package?

towerful , in Stop doing Color Management!

FML, I’ve had to try to color matching by eye before between different screens by the same manufacturer.
For whatever reason I wasn’t provided with any calibration tools. I had some vague software tools to try and get them to align.
I spent like 8 hours trying to match these for the corporate brand colors, while still looking decent for everything else.
Shit is near impossible. If the manufacturer couldn’t do it, how am I supposed to?! And with awful interfaces and no concrete way of measuring.
Like, I was taking pictures of the screens, then trying to figure out offsets and how they might relate to gamma triangles.

Client was appreciative of my (and fellow techs) efforts, but ultimately wasn’t happy, and it looked shit.
That was awkward as fuck.

evatronic ,

I’ve never done anything close to the color calibration work, in part because my vision is color-deficient by default, so any tools or processes relying on my own visual acuity isn’t going to come out right.

However, I was under the impression that there existed external tools that basically did exactly what you were trying: Taking actual images of the screen in a controlled way and comparing it to physical (or at least a known-good digital) copy of that same image and outputting the “right” profile.

Is that made-up bullshit someone fed me and I never cared to verify it?

droans ,

They exist, but the display needs to interface with the tool.

towerful ,

Yeh, you get a special camera and some software. Whether the camera looks at the whole screen, or it is something you put directly against it depends on the system.
If you are just doing relative calibration (IE making screens look the same without caring about the actual calibration) I think they can work with just a DSLR.

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