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.

szczuroarturo , in There once was a programmer

I find it to be suprisingly usless compared to classic aproach. But in my case it might be beacuse of the language i work with ( abap ).

Skyrmir ,

It’s not the language. ChatGPT is about as useful as a decent code manual. It won’t actually solve any problems for you, but it can show you the general format for doing so.

Pechente ,

And it’s great for boilerplate heavy stuff or writing tests.

EatATaco ,

Yeah I’ve used it for boiler plate stuff for things I’ve not done before, but I always then read about what it did and make sure I understand it and where to look further.

marcos ,

The manual is usually not wrong.

Skyrmir ,

Have you read Microsoft manuals?

marcos ,

Ok, I’ll use the “usually” wildcard to absorb this one.

Odds are that ChatGPT can help you better with C# than the documentation. It’s also easier to navigate because you only need to know the answer before being able to make a good question, while merely knowing the answer and having a search engine won’t help you find the right Microsoft doc.

PixxlMan ,

The docs for C# are stellar imo

marcos ,

You talk about their location?

moonpiedumplings ,

Sometimes whatever you are working with will have outdated or really poor docs, so an advanced internet info aggregator is useful in that sense.

I started learning nix before chatgpt and it was a nightmare. I had to continually ask for help on discord, of all places, for things that should really be in the docs.

Chatgpt makes nix easier, except not really because it’s info is outdated a lot of the time.

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

No bugs, no security issues. It’s the perfect runtime.

fkn ,

And yet, somehow there is still a bug in the datetime implementation.

Acters ,

Then we can just catch the error and pretend it never happened

newIdentity , (edited )

Ironically, such a site would more bugs then of it would use Javascript. And security issues are still an issue too.

Basically everything has to be handled through forms and a site reload and hidden components and lots of css :hover events. Have you ever tried making a dropout without Javascript? It isn’t impossible, but really hard.

And such sites exist. Just that they’re mostly Darknet sites like like Dread or Bohemia

vox , (edited )
@vox@sopuli.xyz avatar

dropout menus are actually pretty easy to do without js

all you need is focus-within and friends.

like i recently made one on my personal project (which fully works without js, which is only used for realtime chat functionality and some additional effects, like loading icons in forms and stuff)

live deployment: fortum.pp.ua
recording: streamable.com/4ba0gg

newIdentity ,

That’s pretty impressive. I tried doing something similar a few months ago but couldn’t find anything. Are you using a framework or how do you render the site on the server?

vox ,
@vox@sopuli.xyz avatar

about the menu - it’s just based on focus-within. no need for any terrible hacks.
about the backend - it’s just some basic templates (tera+rocket)

shasta ,

Pretty cool. Btw on your 404 page, the footer is in the center of my screen (vertical center). I am on android using Firefox. I hit the 404 error trying out the search bar. Just thought you might like to know.

vox ,
@vox@sopuli.xyz avatar

yeah it’s unfinished, I’m planning to get back to it soon

amanaftermidnight , in The lengths we have to go to

Most disingenuous post ever.

The image shown is a dude with a browser dev console, probably measuring a div for the its CSS size (which do support centimeters and inches).

In python, 4 spaces is just enough spacing between indent levels. And if your levels get too deep it’s a sign that you’re not being pythonic. Nesting too deep is the problem, not the whitespacing being significant.

UlrikHD ,
@UlrikHD@programming.dev avatar

Python are fine with whatever number of spaces you want to use. You can use 8 spaces which forces you carefully consider each nest, you can use 1 if you’re a monster, or you can use tabs if you’re enlightened, python only demands consistency.

joey_moey ,

Yeah I remember picking up a script after a reinstall, and gedit had reverted to default settings. It’s fun trying to spot whether it’s 1 tab or 4 spaces. After that day, I switched to two spaces as my default.

mexicancartel ,

All theese indentation issues arises from using spaces instead of tabs. And tabs are really flexible so that everyone can set their text editor to whatever tab length they want and still be consistant

mexicancartel ,

Why not TABs? I hate 4 spaces cuz it can get real messy sometimes.

amanaftermidnight ,

My editor turns tabs into 4 spaces. No more “mixing tabs and spaces” errors afterwards.

mexicancartel ,

Thats the problem. Then you commit. I clone it. I can’t use tabs because you turned everything into spaces. Why not turn spaces into tabs?

CoderKat ,

I normally love tabs and it’s what Go uses both by convention and it’s semi opinionated formatter. But PEP-8 suggests spaces and ultimately, consistency is more important.

Not having to argue about tabs vs spaces lets us focus on the real problems, like vim vs emacs.

mexicancartel ,

I am aware but don’t know why four spaces is suggested. Tabs are consistant and flexible. Using spaces might cause errors in number of spaces and makes code messy.

Also emacs for the win

JonEFive ,

This post on programmer humor is now funnier as a result of your analysis. Everything is funnier when it is 100% accurate.

Boi , in Oh yay new features
@Boi@reddthat.com avatar

Isn’t that a part of the ai marketing though? That whole “this thing could destroy us” stuff?

squaresinger ,

Totally is. Because it makes the AI look and feel much better than the smoke-and-mirrors it actually is.

visak ,

The current stuff is smoke and mirrors and not intelligent in any meaningful sense, but that doesn’t mean it isn’t dangerous. It doesn’t have to be robots with guns to screw over people. Just imagine trying to get PharmaGPT to let you refill your meds, or having to deal with BankGPT trying to figure out why it transfered your rent payment twice. And companies are sure as hell thinking about using this stuff to get rid of human decisionmakers.

theragu40 ,

Frankly that stuff is already a huge problem and people should be louder about it. So many large companies want you to wade through 30 layers deep menus if AI chat bots before they’ll let you talk to an actual human to get assistance with a service you pay for. It’s just going to get worse and worse.

squaresinger ,

That is totally true but that’s a different direction than the danger in the marketing as discussed above.

The media is full of “AI is so amazingly great, we are all going to lose our jobs and it will take over the world.”

That’s a quite different message than what’s really the case, which is “AI is so shitty, that it will literaly kill people with bad advice when given the chance. And business leaders are so shit that they willingly trust AI, just because it’s cheaper.”

Baylahoo ,

This is my biggest concern. I’m in a position where (potentially in the near future) I see AI being used as an excuse to do work quicker so we can focus on other things more but still have to review the AI response before agreeing/signing off. Reviewing for accuracy takes just as long as doing it yourself when it’s strongly regulated and it comes down to revisions and document numbers. Much less making a sound argument that actually is up to date with that documentation. So either I trust the AI short cut and open myself up to errors, or redo all the work for them. No gain in time efficiency with shorter timelines. I’d rather make something and have it flag things that I can check so I’m more sure of my own work. What I do shouldn’t be faster, but it can be more error free. It would take a lot of training and updating of training with each iteration of documentation change. I could be the slave of change, with more expectations, with no actual improvement of the tools I have (in fact more risk of issues with the tools being used).

psud ,

I’m in agile development, in a reasonably safe-from-AI position (scrum master).

There has already been a trial of software development by AI, with different generative AIs in each agile role; and it worked.

Bard claims to be able to write unit tests

I can imagine many IT jobs becoming less skilled

Baylahoo ,

Sorry this is months after, but it’s cool to see it worked. I use a software called XXX Agile and it’s not the worst I work with but when ported to my company has some flaws. There’s a long project to switch somewhere else for document control and people who should know much better than me are worried it will fill some gaps but open us up to way more.

thepianistfroggollum ,

That’s not a bad thing. Humans really aren’t good decision makers. Having a system with an incredible amount of input data will be able to draw better conclusions than a person.

Just look at cars.

x4740N ,
@x4740N@lemmy.world avatar

AI is just as biased as the data that’s put into them and that data originates from humans who have their own biases so humans are just going to pass their own biases onto the AI that makes the decisions

I don’t think ai is a good idea

It just exists as a replacement of the human mind and with the whole population of us on earth that’s a large enough number to contribute any unique ideas to contribute to humanity

Creating ai would just be making some sort of copy of us

An AI is similar to an impressionable child

seitanic ,
@seitanic@lemmy.sdf.org avatar

Bias is a problem, but it can be ameliorated. I don’t agree that because AI can be biased, you should never use it.

Creating ai would just be making some sort of copy of us

I don’t know any humans who can munge a ginormous data set like an AI can.

However, reproducing human intelligence in a computer would be interesting in its own right.

x4740N ,
@x4740N@lemmy.world avatar

However, reproducing human intelligence in a computer would be interesting in its own right.

I would not try to replicate that knowing humanity it would probably view us as a threat

I don’t know any humans who can munge a ginormous data set like an AI can.

No humans cannot but we use tools made by us to do that

thepianistfroggollum ,

Why are you assuming there will be bias in the data, and that the AI couldn’t be made to correct for it? Most of the data for systems like medical AI are basically raw data, and it’s already better than humans at making an accurate diagnoses.

I’m not sure why people seem to think humans are better than a system that can parse trillions of data points in a few seconds and apply a bunch of statistical models to it almost instantly.

x4740N ,
@x4740N@lemmy.world avatar

I wouldn’t trust ai with medical data and neither would medical professionals since your dealong woth someone’s life here to either medical professionals are going to modify the data

I’m not sure why people seem to think humans are better than a system that can parse trillions of data points in a few seconds and apply a bunch of statistical models to it almost instantly.

That’s just pre-programmed pattern recognition which has been programmed by rules and data from humans

visak ,

Humans are good decision makers, we’re just not good at paying attention for long periods of time. Which is why I think self-driving cars will eventually be better, but they aren’t yet. And those are expert systems (I refuse to call them AI) trained on a well-curated and limited set of data for a limited and specific purpose. Which is an important difference over the generalized generative models. More data does not make systems, especially more unsorted data.

But here’s another important difference: I can grab the wheel at any time and take over. If we are going to give these systems decision making authority there needs to be an obvious and intuitive override.

thepianistfroggollum ,

Self driving cars are already better than humans. The Waymo cars have a crash rate of 0.59/million miles driven. The national average is 2.98.

I’m betting that most of the self driving car crashes were caused by humans, too.

Boi ,
@Boi@reddthat.com avatar

We thought we were getting Skynet but, instead we got Super Clippy and I Can’t Believe It’s Not Art Theft

marcos ,

We thought we were getting Skynet, but instead it was “I Can’t Believe It’s Not Art Theft” that triggered the revolution and lead us to WWIII.

Rubanski ,

I for one am grateful it’s just super clippy (yet)

Comment105 ,

Do you see any reason to think enough iterations of random nodes in a large enough network could result in emergent conscious intelligence?

Or are you more of a spiritualist than a materialist when it comes to the mind?

squaresinger ,

I can’t say anything about the spiritualist/materialist thing, but there are two things that are clear:

First: Same as you won’t be able to ever get a Shakespeare work by randomly stringing letters together in any reasonable time frame, you won’t be able to do the same with conciousnes. If it’s possible, the number of incorrect permutations are so massive, that just random trying will not ever be enough in any realistic amount of time.

Second: Transformer networks and all other generative AI concepts we have today aren’t even trying to create a conciousnes. They are not the path to general AI.

thepianistfroggollum ,

My favorite are the developers who are developing AI to do development.

seitanic ,
@seitanic@lemmy.sdf.org avatar

Well, yeah. If you can get a machine to do the job for you, then you should.

thepianistfroggollum ,

You dont see how developers developing AI to do development might be a bad thing?

seitanic ,
@seitanic@lemmy.sdf.org avatar

Not if it saves time and effort. The less time I have to spend writing and debugging code, the better.

That’s what machines are for, after all. To make work easier.

Naia , in More the merrier

A lot of this comes from professors wanting comments in assinments and grade on arbitrary levels of if it exists.

I had one class where the instructor would give a vuage “not enough comments” that I did comments like this on every fuction and loop out of spite.

coloredgrayscale ,

“too many comments”.

Anticorp ,

“Pointless comments”

zqwzzle , in Int and bool walk into a bar

I guess there’s not enough water to use a float unless you’re in a bathtub.

NigelFrobisher , in Brace Style

My credo on this kind of thing is never do something that will make your successor so mad that they find out where you live and post parts of your body to Interpol.

dejected_warp_core ,

Good fences make good neighbors.

Corollary: server-side commit hooks make good teammates.

lone_faerie , in No common rube

Contacting IT is always my last line of defense and I get unreasonably frustrated when they refuse to help without walking me through basic troubleshooting. It’s like, I’ve already figured out the cause of the problem, just tell me where the button is to fix it. The worst was when I had to RMA my Pixel phone and they made me go through every step I’d already been through just to come to the same conclusion I initially came to them with.

psud ,

Me to Google support for a problem with my brand new pixel 3 back when the 3 was the new hotness

Me: my camera only works for one photo, then doesn’t work again until I reboot it. Then it again works only for one photo, then it gives the error “camera [number] is locked” (screenshot)

Support: that sounds like a fault. Could you reboot your phone and tell me what happens?

Me: ok. … Right I’m back. Just like for all the ten photos I took before contacting you, it worked for one photo then that same error. That makes eleven times I rebooted my phone today.

lone_faerie ,

The worst for me was with the Nexus 6P, the last phone before they rebranded to Pixel. There was a known issue with the battery, where it would die when the phone said it was at like 50%. I jumped through all their troubleshooting hoops when it was obviously a hardware issue. They eventually agreed to send out a replacement and I was assured it wouldn’t have the issue. Lo and behold, it did the exact same thing as soon as I got it. I went through all the trouble shooting again and they sent ANOTHER replacement that still had the issue. I was so fed up and just kept requesting to talk to someone higher up and they eventually just sent me a Pixel 1 to shut me up.

IMongoose ,

They sent out so many Pixel 1s for that. Same exact thing happened to me.

CrabLangEnjoyer ,

Google support is a joke, I had to RMA a tablet, obviously went through all the troubleshooting before (factory reset included). The dude on the Hotline was like: “fantastic you did everything I would have told you. Unfortunately our system doesn’t accept that way of working I need to send you an email with the same troubleshooting steps you already did and you need to call again in a few minutes and confirm to a new support agent that you followed what the email told you”

To their credit it was accepted afterwards with no issues but that whole process is more than braindead

LotrOrc ,

Having worked in IT about 12 to 15 years ago I can honestly say I just stopped believing people when they told me they did things or checked things because 99% of the time it was just a flat out lie.

And taking them at their word meant wasting my own time because usually it was just a quick fix that I suggested in the first place.

It quickly, quickly taught me that 99% of people are fucking idiots, and that even the smart ones who actually knew what they were doing with a computer could be idiots too.

rottingleaf ,

because 99% of the time it was just a flat out lie.

What I don’t understand is why they lie about something directly causal to the resolution.

LotrOrc ,

Pride and not wanting to sound like a dummy basically

IMongoose ,

My buddy had google support tell him to send a screenshot of his phones screen burn in. They took a good amount of convincing before they admitted that that wouldn’t work.

lone_faerie ,

Lol wait, I’ve had to do that too. I think it was for a dead pixel.

Theharpyeagle ,

To be fair even the most technically adept person can have tunnel vision where they start digging before ruling out all the simple stuff. Yes it can feel tedious and a little condescending to follow all those steps, but you get humbled the first time it really is just an unplugged cable.

Zink ,

Any time you’re working with somebody who has to deal with the general public(or general workforce) though, you gotta be understanding.

They have to sort through the clueless people who turned off their monitor, and they have to deal with the Dunning-Kruger people who lie about what they did because they think they’re so damn smart.

And if it’s the first contact level 1 type support, they may not have the expertise to tell the difference and have to rely on the scripts.

lone_faerie ,

Yeah, for sure. As frustrating as it may be, I’m always understanding with the support agent. They’re just doing their job, it’s not their fault there’s a procedure they need to follow.

Ookami38 ,

Depending on what you’re needing done, a lot of times IT has to cover their asses. If it didn’t happen on that phone call, it didn’t happen. I always appreciate the gumption, you probably saved us like, 30 call just from figuring out other issues yourself. If it’s anything that will cost the company money, though, like replacing hardware - if I don’t take due diligence in making sure those earlier steps are done, it’s my ass on the line.

You know you’re smart enough to do the troubleshooting, but that technician has probably 1000+ users that rotate weekly, they can’t keep a log book of which ones are good and which ones will land them in the shit. I totally get the frustration, but the ones who lie about doing simple troubleshooting ruin it for everyone.

Skullgrid , in How big is your desk?
@Skullgrid@lemmy.world avatar

I hate working in frontend because I have to keep switching computers between Javascript, HTML, CSS and sometimes SVG

iarigby , (edited )

come on, only one out of those four is a programming language

edit (begrudgingly): ok fine, half, but still

gamma ,
@gamma@programming.dev avatar

CSS is turing conplete.

Skullgrid ,
@Skullgrid@lemmy.world avatar

come on, only one out of those four is a programming language

that’s part of the joke ;)

marcos ,

SVG? SVG isn’t half a language, it’s a completely functional one!

victorz , in JavaScript

In node, I get the same result in both cases. “[object Object]”

It’s calling the toString() method on both of them, which in the array case is the same as calling .join(“,”) on the array. For an empty array, that results in an empty string added to “[object Object]” at either end in the respective case in the picture.

Not sure how we’d get 0 though. Anybody know an implementation that does that? Browsers do that maybe? Which way is spec compliant? Number([]) is 0, and I think maybe it’s in the spec that the algorithm for type coercion includes an initial attempt to convert to Number before falling back to toString()? I dunno, this is all off the top of my head.

PoolloverNathan ,

The inspector REPL evaluates as a statement-with-value (like eval), so the {} at the beginning is considered an empty block, not an object. This leaves +[], which is 0. I don’t know what would make Node differ, however.

Edit: Tested it myself. It seems Node prefers evaluating this as an expression when it can, but explicitly using eval gives the inspector behavior: https://nathanlaptopv.axolotl-snake.ts.net/rhnpp358211dyyhzzyfam5a6yr3k25ik-Screenshot_20240623-132245.png

victorz ,

So there’s yet another level of quirkery to this bullshit then, it seems. 😆 Nice digging! 🤝

I also noticed that if you surround the curlies with parentheses, you get the same again:


<span style="color:#323232;">> eval('{} + []')
</span><span style="color:#323232;">0
</span><span style="color:#323232;">> eval('({}) + []')
</span><span style="color:#323232;">'[object Object]'
</span>
PoolloverNathan ,

Yep, parentheses force {} to be interpreted as an expression rather than a block — same reason why IIFEs have !function instead of just function.

victorz ,

I thought IIFE’s usually looked like (function (…params) {})(…args). That’s not the latest way? To be honest I never used them much, at least not after arrow functions arrived.

dejected_warp_core ,

/me goes back to get second folding chair.

neo , in Such a pain in the sas

“Is your computer connected to a power outlet? Yes? Could you please unplug it and plug it back in for me?”

marcos ,

It’s a much larger problem when there are several different cables.

BlueMagma ,

Also: please check the other end of the cable, the one that isn’t plug in the wall, yes that one, plugged on the screen, unplug and plug it back in please.

onlinepersona , in COMEFROM

I honestly thought C++ (aka dumping ground of programming concepts) would implement this for “completeness”.

Anti Commercial-AI license

NeatNit ,

They should add it in C++26

uis ,

C++60

bolexforsoup , in Easy choice

Boomer humor

Zorque ,

Wife bad.

jaybone , in Defragged Zebra

The tail is a different partition?

towerful ,

It’s the SATA cable

jaybone ,

This sounds like it could be right, but I don’t know enough about zebra tails.

Assman , in My CSS ain't like the other developers...
@Assman@sh.itjust.works avatar

Backend engineers: CSS isn’t programming lol

Also backend engineers: HE

LP

Beetschnapps ,

Aka “I have zero responsibility here.”

We are talking about about engineers whose careers are based around abstractions.

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