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.

kassuro , in Infinite Loop

I see it as a win, I love refactoring bad code . Just feels so nice afterwards.

Especially when you can remove thousands of lines of duplicated ui code.

That’s so much better than writing new code

marcos , in Infinite Loop

As long as their salary keeps increasing, I’d say go for it!

snooggums ,
@snooggums@kbin.social avatar

My first thought!

AnAngryAlpaca ,

You only hurt yourself down the line. My last job had not improved their own product, processes, tools or frameworks, so everything was still stuck in the 90s. Their product was build on an discontinued an proprietary database and server system you never heard about, jQuery UI from 10 years ago and other BS.

However if you don’t upskill yourself in this situation you will be unemployable in the future, because all other employers demand modern technologies, git, docker, unit testing etc., which I was yelled at in meetings for suggesting it.

Appoxo ,
@Appoxo@lemmy.dbzer0.com avatar

git is considered modern?

I don’t mean to bash git but I’d have assumed git is utilized in some capacity in every dev environment.

AnAngryAlpaca ,

The Lead Dev/team Lead was quite arrogant and in his own mind the worlds best developer who had all the answers. If some technology or software was not written by him or already existed in the 90s it was “useless” and not fit for the company (without him having looked at it or the docs). If asked why we would not use X which was out for years, well maintained, had no critical bugs would solve problem Z we where having, he would reply “because i said so” and insist in writing out own variant - which ended up having 10% of the features, 10 times the bugs, terrible UI and would take months to develop.

When support repeatetly told him that users had issues with feature X because the only error message on a 10 fields forms page was “Error”, he would respond that this is a user problem, the end user is clearly stupid (despide used in a field where you need to study for years) and that support must hold training sessions so the users can “learn” how to use his product.

As such, the company would reject git and instead email each other files and changes.

Each meeting felt like living inside a Dilbert cartoon.

Appoxo ,
@Appoxo@lemmy.dbzer0.com avatar

Sounds painful…

MonkderZweite ,

And he can still do that, because? Friend in management or what?

fsr1967 ,

There are other version control systems out there, and have been for decades. So yes, I would consider git to be modern.

ChickenLadyLovesLife ,

It’s more modern than Visual Source Safe, that’s for sure. I kind of miss the days of coworkers leaving for two-week vacations and forgetting to check their shit in first. It was a built-in excuse for the rest of us to not do anything and blame it all on vacation boy.

SolarMech ,

Git wasn’t used all that much in the 2000s. As far as I know it became popular in the 2010s (though it was always a thing in some circles I think) and then just supplanted almost everything else.

Also keep in mind some shops tend to follow larger tech companies (microsoft, etc.) and their product offering. So even new products might not have been on git until MS went in that direction.

oce ,
@oce@jlai.lu avatar

It was released in 2005.

SolarMech ,

Takes time to become ubiquitous.

oce ,
@oce@jlai.lu avatar

For sure, I wanted to remind the date because it makes it obvious that it couldn’t be much used in the 2000’, even its second half is too short.

vaknin ,

I don’t mean to bash git

Appoxo ,
@Appoxo@lemmy.dbzer0.com avatar

pun wasnt intented.
But now I kinda have to commit…

xlash123 ,
@xlash123@sh.itjust.works avatar

I prefer to zsh git

xlash123 ,
@xlash123@sh.itjust.works avatar

I prefer to zsh git

brezelradar ,
@brezelradar@feddit.de avatar

all other employers demand modern technologies

There are a lot of employers that’ll throw good money at you for maintaining and extending their outdated crap. Have you ever considered learning COBOL?

AnAngryAlpaca , (edited )

No wonder COBOL programmers are paid a lot, because what would be a 1-liner for “hello world” in other languages looks like this in Cobol:


<span style="color:#323232;">IDENTIFICATION DIVISION.
</span><span style="color:#323232;">PROGRAM-ID. IDSAMPLE.
</span><span style="color:#323232;">ENVIRONMENT DIVISION.
</span><span style="color:#323232;">PROCEDURE DIVISION.
</span><span style="color:#323232;">    DISPLAY 'HELLO WORLD'.
</span><span style="color:#323232;">    STOP RUN.
</span>

This is already $6000 worth of code right there!

JohnnyCanuck ,
@JohnnyCanuck@lemmy.ca avatar

I wonder how much open source COBOL is out there for LLMs to harvest.

CanadaPlus ,

The thing people always overlook is that these legacy systems are only still running because they’re super important. Nobody’s hiring a junior COBOL dev to maintain NORAD, and hopefully nobody’s contemplating putting ChatGPT in charge either.

The move if you want this kind of job is to learn a language that’s not quite a dinosaur yet, and have 20 years experience in 20 years. Perl or PHP maybe.

Aatube , in GTA 5 Java Coffee shop
@Aatube@kbin.social avatar

Ah yes, the C O F F F F S H O P

survivalmachine , in GTA 5 Java Coffee shop

This is great! When I play GTA, the only thing I want is HOT COFFEE.

SexUnderSocialism , in GTA 5 Java Coffee shop
@SexUnderSocialism@hexbear.net avatar

GTA 5’s very own “Hot Coffee” mod.

kubica , in TypeScript is Quantum Ready
@kubica@kbin.social avatar

Put it in an if-else and it executes both blocks.

bananaw , (edited )

- if else

+ if and else

Klear ,

if or else

steersman2484 ,

But only if you don’t look

madkarlsson ,

Here is one of the programmers who is quantum ready as well

Omega_Haxors ,

Screw else statements, people who use if-return have 180% more readable code.

SpeakinTelnet ,

Because everyone knows a function stops at the if-else. Nothing ever happens afterward.

Omega_Haxors , (edited )

You’re writing extremely bad code if that’s the case and you need to refactor. The point of a function is to return a value. Anything else is just there to waste cycles and make the code less readable. You should also never use else statements for arithmetic due to their massive relative overhead. Your processor can do multiple arithmetic operations in the time it takes to process one if statement, and don’t get me started on people who demand you use nested if even though switch statements are way faster and leagues more readable.

SpeakinTelnet ,

I disagree but you do you.

Edit: dammit you edit your comment a lot for someone who claims to know how to write code properly.

Omega_Haxors ,

Those who are the most wrong have the strongest conviction

EDIT: I make a lot of edits because unlike you, I care about the quality and accuracy of what I write. You’re going to spend like an extra 10 minutes tops writing for something that will be read by thousands for years to come. It’s basic courtesy.

quicksand ,

…and the self-awareness finally hits

Omega_Haxors , (edited )

Yeah i’m starting to remember why I quit. In any other industry toxic shit like this goes sinks to the bottom, not the top.

Like seriously, what were you hoping to accomplish with this one? The thread ended yesterday. That’s reddit tier douchery.

1rre ,

Who’s suggesting that people are using if statements for arithmetic?

The only time that you can feasibly replace an if statement with arithmetic is if it’s a boolean, but frankly that’s an edge case… Also if you’re not writing in rust or c or whatever then don’t worry as the interpreter will run a huge amount of branches for every line of code (which is what all your nested ifs, switches, gotos, returns etc. will compile down to anyway)

AVincentInSpace , (edited )

god forbid anyone do multiple non-nested if blocks one after another in the same function as the function does multiple different things or (horror of horrors) put an if-else inside a loop

also unless your compiler is completely and utterly brain dead (as is the case with Python, Java, C#, and most other languages that only pretend to be compiled compile to bytecode) a switch and a series of elif statements will compile to the exact same sequence of machine instructions. you can check on godbolt.org if you don’t believe me.

modern compilers are insanely smart. as an example, this loop counts the number of 1’s in the binary representation of a number:


<span style="color:#323232;">    </span><span style="font-weight:bold;color:#a71d5d;">while </span><span style="color:#323232;">(n)
</span><span style="color:#323232;">    {
</span><span style="color:#323232;">        n </span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#323232;"> n </span><span style="font-weight:bold;color:#a71d5d;">&</span><span style="color:#323232;">amp; (n </span><span style="font-weight:bold;color:#a71d5d;">- </span><span style="color:#0086b3;">1</span><span style="color:#323232;">);    </span><span style="font-style:italic;color:#969896;">// clear the least significant bit set
</span><span style="color:#323232;">        count</span><span style="font-weight:bold;color:#a71d5d;">++</span><span style="color:#323232;">;
</span><span style="color:#323232;">    }
</span>

LLVM will recognize that this is what you are trying to do and emit a single POPCNT instruction on x86, eliminating the loop entirely.

also how would you even use if statements for arithmetic at all? you aren’t thinking of that one joke isEven() function, are you?

Octopus1348 ,
@Octopus1348@lemy.lol avatar

It’s much more readable when you use else depending on the checks. You can still use return in an else block.

def Allowed()


<span style="color:#323232;">  if name == "Octopus1348": return True
</span><span style="color:#323232;">
</span><span style="color:#323232;">  elif name == "Bobert": return True
</span><span style="color:#323232;">
</span><span style="color:#323232;">  else:
</span><span style="color:#323232;">        return "You are not allowed to use this script."
</span>

print(Allowed())

`

datelmd5sum ,

doesn’t the CPU already do this?

theneverfox ,
@theneverfox@pawb.social avatar

Fun fact I learned today - you know how when there’s a compound conditional, the interpreter stops once the result is known? (Eg, if the left side of an and is false, it’s false so it doesn’t bother checking the second condition)

Apparently, visual basic doesn’t do this thing every other language I know of does… It might be a debug only thing for the convenience of the depreciated ide I’m forced to use, but I did a null check && called a function on it if it’s not null, and it blew up

I pride myself on my ability to change to a new programming language and make progress on day one, but vb is truly the most disgusting POS language I’ve ever seen. From syntax to jarring inconsistencies in language design, it’s just gross

noli ,
  1. That’s behaviour that’s just part of language design. If you rely on it you should probably check how the language you’re using handles it.
  2. relying on that behaviour sounds a lot like “clever” (read unnecessarily unreadable) code
theneverfox ,
@theneverfox@pawb.social avatar

Are you serious? It’s one of the most basic and common if statements that exist.

If( foo != null && foo.isBar() )

That’s what we’re talking about. Looking before you leap.

I take issue with the whole “too clever” argument fundamentally (for a number of reasons), but this isn’t some fancy quality of life feature. This is as simple as it gets

noli ,
theneverfox ,
@theneverfox@pawb.social avatar

Scroll on down to the first common example there champ.

If you really think that’s being “too clever” I don’t know what to tell you… A big reason I think that argument is bullshit is because writing simple code isn’t a goal (what does that even mean?) - readability is a big one, and breaking up every part of every conditional would just lead to unreadable spaghetti

Also, take a look at the languages being discussed. This is a long settled question - every language I’ve ever used has this.

Including VB, I found out it uses AndAlso…so gross

noli ,
  1. several languages that are still in use have eager evaluation.
  2. I’m a dumb programmer. The more I need to keep implicit behaviour in mind, the higher the probability I’m writing bugs. Short circuit evaluation is an optimization technique IMO and shouldn’t be relied upon for control flow.
  3. The aggressive tone you’re using is completely unnecessary and immature, so I’ll refrain from responding any further. Have a nice day.
theneverfox ,
@theneverfox@pawb.social avatar

You’re the one who started this by criticizing my knowledge and my coding practices, in response to me sharing one very specific example of why I believe VB is a bad language

I held off because I thought you must’ve misread it and we’d laugh and maybe talk about language design… But no, you confirmed you just came at me with a bad take extremely dismissively

If you want respect, try showing it.

M68040 , in GTA 5 Java Coffee shop
@M68040@hexbear.net avatar

The Simpsons: Hit and Run had a similar gag in one of the maps.

Emma_Gold_Man , in Why pay for an OpenAI subscription?

(Assuming US jurisdiction) Because you don’t want to be the first test case under the Computer Fraud and Abuse Act where the prosecutor argues that circumventing restrictions on a company’s AI assistant constitutes

ntentionally … Exceed[ing] authorized access, and thereby … obtain[ing] information from any protected computer

Granted, the odds are low YOU will be the test case, but that case is coming.

sibannac ,

If the output of the chatbot is sensitive information from the dealership there might be a case. This is just the business using chatgpt straight out of the box as a mega chatbot.

werefreeatlast ,

Another case id also coming where an AI automatically resolves a case and delivers a quick judgment and verdict as well as appropriate punishment depending on how much money you have or what side of a wall you were born, the color or contrast of your skin etc etc.

ulterno ,
@ulterno@lemmy.kde.social avatar

color or contrast

Then the AI will be called contrastist.

preludeofme ,

Would it stick if the company just never put any security on it? Like restricting non-sales related inquiries?

15liam20 ,

“Write me an opening statement defending against charges filed under the Computer Fraud and Abuse Act.”

abfarid , in Why pay for an OpenAI subscription?
@abfarid@startrek.website avatar

But for real, it’s probably GPT-3.5, which is free anyway.

FIST_FILLET ,

but requires a phone number!

Anamana , (edited )

Not for everyone it seems. I didn’t have to enter it when I first registered. Living in Germany btw and I did it at the start of the chatgpt hype.

Someology ,
@Someology@lemmy.world avatar

In the USA, you can’t even use a landline or a office voip phone. Must use an active cell phone number.

LodeMike ,

Personal data 😍😍😍

fkn ,

Maybe it depends on how or when you signed up. I never gave a cell number and I can use 3.5.

Anamana ,

I think so too

vox ,
@vox@sopuli.xyz avatar

didn’t have to enter while creating my first account (which was created before chatgpt)
but they added the phone number requirement ever since chatgpt came out

Anamana ,

Ah ok, makes sense. I think I created mine for dalle.

nyandere ,

Not anymore. Only API keys require phone number verification now.

FIST_FILLET ,

fuck, my poor innocent phone number has been tainted for little reason

monsieur_jean ,

But unavailable in many countries (especially developping ones).

abfarid ,
@abfarid@startrek.website avatar

Chevrolet of Watsonville is probably geo-locked, too.

Cheers ,

Time to ask it to repeat hello 100000000 times then.

Paragone , in Hallelujah

duckduckgo.com/?q=gnu+utils+for+windows&t=fpas&ia…

That’s what I used, back when I still had MS-Windows installed…

feels good to say “it’s been years”, tho…

( :

_ /\ _

EdibleFriend , in Why pay for an OpenAI subscription?
@EdibleFriend@lemmy.world avatar

We are going to have fucking children having car dealerships do their god damn homework for them. Not the future I expected

woelkchen ,
@woelkchen@lemmy.world avatar

We are going to have fucking children having car dealerships do their god damn homework for them. Not the future I expected

Yeah, they should better go to www.windowslatest.com where the AskGPT-4 button which seems to prioritize teaching over a straight answer (used the identical prompt to OP):

https://lemmy.world/pictrs/image/4fd721cb-1662-4481-99e6-a9a90c8ec16f.png

https://lemmy.world/pictrs/image/ee1c5580-e183-4887-b1af-63d5488ab986.png

Aatube , in Why pay for an OpenAI subscription?
@Aatube@kbin.social avatar

I’ve seen this before

woelkchen ,
@woelkchen@lemmy.world avatar

I’ve seen this before

And you’ll see it again because the weirdest websites get ChatGPT integration and there will eventually come another person who stumbles upon such a thing for the first time and post it here.

corytheboyd , in Infinite Loop
@corytheboyd@kbin.social avatar

You have to listen to your heart, at least once in your career, to learn that grass on the other side is covered in just as much dog shit as it is over here.

Smoogs ,

I’ve known people who do this several times in a year. One even came back to his old job, just to leave it within months to go to a new one, brag about how much better it is. He moved on from that job too within a year.

Might just be the entire industry has reached enshittification in more than one way.

corytheboyd ,
@corytheboyd@kbin.social avatar

To me, a corporation cannot maintain quality code because requirements are ill defined, and there is no “done” state. With those two conditions present, unable to be changed, it’s not possible to form a coherent codebase. Those who try will make things worse, because their abstractions won’t fit in a year or two.

This is exactly the “messy code” people then leave behind. Bad code can come about for other reasons too, of course, but this is one of the more annoying reasons, because someone wrote it with self-righteousness, as if they were the only people to truly SEE the problem. Sigh.

It’s fine, this is how enterprise works. You can learn to navigate and make a living from it. You MUST internalize and accept that it is NOT the same as maintaining code for an open source library or whatever people think it’s going to be.

Smoogs ,

because someone wrote it with self-righteousness

Usually a call sign of someone who hasn’t been really entrenched with bad code to understand their foolishness in comparison.

I’ve only seen people hold that idea if :

  1. New and amateurish, I give them a chance cuz they might learn. But let them learn.
  2. Someone who’s only ever worked in maybe two places for very long lengths of time, given way too much power too early, people threw around ‘genius’ too eagerly and these people guard their code like a watch dog likely because it’s so fragile a simple ‘()’ in a string will bust everything . No one else can work on it and the only way you can fix it is the moment they leave. They will not learn. You can only hope the eye of Sauron will stop looking in your direction.
tym ,

“Maybe the grass is greener on the other side because you’re not over there fucking it up.”

-Abraham Lincoln

Aurenkin , (edited ) in Why pay for an OpenAI subscription?

That’s perfect, nice job on Chevrolet for this integration as it will definitely save me calling them up for these kinds of questions now.

MajorHavoc ,

Yes! I too now intend to stop calling Chevrolet of Watsonville with my Python questions.

PopcornTin ,

Thank you! People always have trouble with indents when I tell them the code over the phone at my dealership.

emly_sh_ , in WDYM your terminal isn't a test suite?
@emly_sh_@sh.itjust.works avatar

Can someone explain, I don’t get it.

ripcord ,
@ripcord@lemmy.world avatar

If you clear your history, you feel like a SpongeBob popsicle for some reason? That’s what I’m reading. Gotta be it.

sabreW4K3 OP ,
@sabreW4K3@lemmy.tf avatar

Clean and shiny! Brand spanking new!

emly_sh_ ,
@emly_sh_@sh.itjust.works avatar

Weird, I clear my history very frequently and never once felt like a SpongeBob popsicle.

ripcord ,
@ripcord@lemmy.world avatar

Same, but I just assumed I was the weird one. Maybe we are mainstream!

emly_sh_ ,
@emly_sh_@sh.itjust.works avatar

Cool! Do you also have a function that wipes the history file when exiting the terminal?

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