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.

F04118F , in A lot of YAML

Home Assistant back in 2019…

TwistedTurtle ,

It’s been satisfying watching my configuration.yaml file shrink over the years as more and more things get handled by the UI.

Sigmatics , in They used coding and algorithms

Very high effort reddit screenshot repost

Mr_Lobster , in There once was a programmer

I literally cannot comprehend coding with ChatGPT- How can I expect something to work if I don’t understand it, and how can I understand it if I don’t code and debug it myself? How can you expect to troubleshoot any issues afterwards if you don’t understand the code? I wouldn’t trust GPT for anything more complex than Hello World.

mild_deviation ,

Just yesterday, I wrote a first version of a fairly complex method, then pasted it into GPT-4. It explained my code to me clearly, I was able to have a conversation with it about the code, and when I asked it to write a better version, that version ended up having a couple significant logical simplifications. (And a silly defect that I corrected it on.)

The damn thing hallucinates sometimes (especially with more obscure/deep topics) and occasionally makes stupid mistakes, so it keeps you on your toes a bit, but it is nevertheless a very valuable tool.

philm ,

That only really works, if the method is self-contained, and written in a language that GPT has seen often (such as python). I stopped using it, because for 1 in 10 successful tries I waste time for the other 9 tries…

philm ,

This.

If I’m writing something slightly more complex, ChatGPT(4) is mostly failing.

If I’m writing complex code, I don’t even get the idea of using ChatGPT, because I’m only getting disappointed, and in the end waste more time trying to “engineer” the prompt, only to get disappointed again.

I currently cannot imagine using ChatGPT for coding, I was excited in the beginning, and it’s sometimes useful, but mostly not really for coding…

worldsayshi ,

If you’re already knee deep in existing code and looking for bugs or need to write quite specific algorithms it seems not very useful. But if you for some reason need to write stuff that has the slightest feeling of boilerplate, like how do I interact with well established framework or service X while doing A, B C it can be really useful.

oldfart ,

Also it’s often doing a great job if you paste a stack trace into it and maybe some surrounding code. I used it to fix someone else’s Java code as well as to upgrade some 3rd party Wordpress junk to latest PHP. I barely know Java and stopped following PHP news around version 5.6.

worldsayshi , (edited )

You shouldn’t use code that you don’t understand. Chatgpt outputs quite readable and understandable code and makes sure to explain a lot of it and you can ask questions about it.

It can save quite a lot of effort, especially for tasks that are more tedious than hard. Even more if you have a general idea of what you want to do but you’re not familiar with the specific tools and libraries that you want to use for the task.

III ,

It’s also wrong a lot. Hence the requirement for understanding. It can be helpful to get through a stretch but it will fuck up before too long and relying on it entirely is a bad idea.

1984 ,
@1984@lemmy.today avatar

Often the code is self explanitory. I understand the code very often, but I still couldn’t write it correctly from scratch. You never feel like that?

This is how code examples in books works too. You get some code to look at and try to understand it. Otherwise it’s like you would ignore code examples while learning programming.

Psythik ,

I haven’t been in web development in over 20 years; thanks to ChatGPT, I was able to get up-to-speed and start building websites again, when in the past I would have never been able to do so.

GPT is a powerful tool that can allow anyone to do anything if they’re willing to put in the effort. We should be praising it, not making fun of it. It’s as revolutionary as the internet itself.

corsicanguppy ,

I use it to give me prototypes for ansible because Ansible is junk. Then I build my stuff from the mishmash and have GPT check it. Cuts a lot of time down that I’d rather be doing any-bloody-thing else with.

Somewhereunknown7351 , (edited ) in There once was a programmer
@Somewhereunknown7351@kbin.social avatar

There was once a programmer that wrote his own code

threelonmusketeers ,

Of course the first programmer did, but everyone who came after just copied her work and tweaked it a bit to suit their needs.

namingthingsiseasy ,

Basically, yeah. Dennis Ritchie wrote the C compiler because he knew exactly what her wanted to use it for and the kinds of code that he wanted to write. Then he went on to write the book that everyone used to learn the language.

This is true of probably every language, library, framework, etc. The original designer writes it because he knows what he wants to do with it and does so. Then everyone else follows. People then add more features and provide demonstrations of how to use them, and others copy them. It is extremely hard to just look at an API and use that to figure out exactly which calls should be made and in what order. Everyone just reads from the examples and adapts them as needed.

Potatos_are_not_friends , in I'm just at home heating up my no-code offering in the microwave...

Full-stack boot camp devs - ideally you find a direction.

Be open to everything as a junior. But in your first three years, lean towards something specific and then be a master at it.

oce ,
@oce@jlai.lu avatar

Be open to everything as a junior. But in your first three years, lean towards something specific

Do you mean pick a direction after three years? Cause < 3 years is junior (unless you’re working at a consultancy giant meat grinder then that would be senior and close to retirement from consultancy).

sheogorath ,

I started my career at a consultancy and after working in a myriad of other types of companies I’m back at working in a consultancy. The trick to work on an IT consulting company is to find one with ex-engineers at management.

It’s been a breath of fresh air when you can have management back you up when dealing with client’s bullshit. TBH in some cases it’s also less stressful because your value to the company can be calculated much easily based on how much you’re assigned in a project, so it’s given me a lot of “fuel” to renegotiate my contract several times.

oce ,
@oce@jlai.lu avatar

I think there’s a cycle of consultants getting senior, being tired of the higher ups commission and starting their own little consulting company. This company is small, efficient and friendly for a while, but it grows because everyone wants more money or it is sold to someone else. So eventually it becomes another one of those meat grinders and the cycle continues.

Agent641 ,

Lean towards something specific, like farming corn, or busking with a hurdy-gurdy.

JoeHill , in Microsoft Edge could use a win

I switched from Chrome to Edge and initially was really impressed. But then Microsoft had to go and Bing it all up. So now it’s back to Firefox after a 15 year hiatus.

netchami ,

You want something even better? Check out LibreWolf. It’s Firefox with all the privacy features preconfigured, uBlock Origin preinstalled and all the crap like Pocket and sponsored websites removed. And of course it uses DuckDuckGo instead of Google by default.

WoodenBleachers ,
@WoodenBleachers@lemmy.basedcount.com avatar

That duckduckgo default is the thing that aggravates me the most. Sometimes those results just don’t cut it but I don’t even have the option to chance my default browser. I had to bookmark google

netchami ,

Use Startpage or an instance of Whoogle. They are both meta search engines for Google, they allow you to search on Google without exposing your data to Google. If you are a user of Mullvad VPN, you can also use Leta, their own Google meta search engine.

amanaftermidnight , in Schrödinger's date format

This is why I don’t get why the 9th of November is such a big deal.

dukk ,

Are you kidding? They opened the Berlin Wall!

Speiser0 ,
breadsmasher , in Steal What Is Stolen
@breadsmasher@lemmy.world avatar

does this meme really need to be reposted every day?

starman ,
@starman@programming.dev avatar

Man, I stole your meme

It’s not my meme

unreachable ,
@unreachable@lemmy.world avatar

humor achieved

Jakylla ,
@Jakylla@sh.itjust.works avatar
SpeakinTelnet ,
@SpeakinTelnet@sh.itjust.works avatar

Especially considering all the fuss in programming about copyright laws.

muntedcrocodile , in D or d come on
@muntedcrocodile@lemmy.world avatar

Doesn’t fish basically fix this?

pgp ,

This is not a bug, it doesn’t need to be fixed.

avonarret1 ,

It’s funny that you’re getting down voted for telling the truth. Nothing to be subjective about either. 😅

muntedcrocodile ,
@muntedcrocodile@lemmy.world avatar

Would hope so

mindbleach ,

There are solid technical reasons whenever someone’s computer doesn’t work the way they expect.

They don’t matter.

The software can do what people want, or it can be wrong.

pgp ,

Wrong, it does matter. Just because it’s not working as you want, doesn’t mean it’s not working as expected.

mindbleach ,

It literally does.

xoggy ,
@xoggy@programming.dev avatar

You can set bash or zsh to case-insensitive tab completion as well.

muntedcrocodile ,
@muntedcrocodile@lemmy.world avatar

Seems like poor configuration either default or not

d_k_bo ,
Astaroth ,

yeah Fish tab completion works, but one thing I’ve noticed though is that tab completion for wrong case only works if there’s no option with the correct case

e.g. if I have Downloads and Downloads2 then d with tab completion will become Downloads, but if I have Downloads and downloads2 it will tab complete to downloads2 and D will complete to Downloads

I’ve been meaning to look through the Fish documentation to see if I can change that and fuzzy search for history but never got around to it

Damage , in D or d come on

Use zsh and press tab

BeanCounter ,

zsh is so much nicer to work with

killeronthecorner ,
@killeronthecorner@lemmy.world avatar

The only thing that annoys me is having to wrap wildcard expressions in quotes when using e.g. the find command.

But then it looks more correct, so it’s hard to argue with.

toynbee ,

You can escape the wildcards as an alternative.

killeronthecorner ,
@killeronthecorner@lemmy.world avatar

Nice, I didn’t know that. I habitually forget the closing quote so this might save me some ire

HurgletOfficial ,

Bloat

bdonvr ,

Just uninstall bash after

funkajunk ,
@funkajunk@lemm.ee avatar

Everyone’s playing checkers while my man’s playing chess

funkajunk ,
@funkajunk@lemm.ee avatar

Everyone’s playing checkers while my man’s playing chess

HurgletOfficial ,

No thanks, Ash/Dash is all I need

mojo ,

This. Except don’t use zsh because this is default in every single shell

chris ,
@chris@l.roofo.cc avatar

Nope. Bash (at least by default on Ubuntu) doesn’t have case insensitive tab completion.

PupBiru ,
@PupBiru@kbin.social avatar

afaik there’s options you can turn on that enable it

search .inputrc and set completion-ignore-case On

newIdentity ,

Still not a default. Also it’s not the same thing.

Damage ,

Bash never does this by default

mojo ,

Bash has never not had tab completion out of the box for me

Damage ,

Tab completion is default, but completing an uppercase word by typing a lowercase letter is not

aleq ,
@aleq@lemmy.world avatar

I remember having that when I used OhMyZsh, but after going back to a more bespoke config it doesn’t work anymore. Also tried using zsh as a different user to ignore my own configs, that doesn’t work either.

tldr, it’s not default zsh behavior.

1984 ,
@1984@lemmy.today avatar

It’s not default in zsh maybe, but it’s default in the oh-my-zsh config most people use.

I ran zsh for a while without that config and manually configured everything and it also works, but takes quite a bit of web searching to find all the knobs to turn.

aleq ,
@aleq@lemmy.world avatar

I don’t think most people use oh-my-zsh. It’s very popular, and a lot of people use it, but I think most is a stretch.

Either way, it’s just a set of plugins and configs so of course you can get it to work on any setup. Just saying that it’s not inherent to zsh, and you can probably get similar behavior in most shells with a similar config.

Templa ,

I can’t relate to this issue at all exactly because I use zsh. Also a little bit related but the fuck

saltesc , in haha patents

I feel like proprietary software is made by someone that left the company shortly after the project was finished. They never documented in the knowledge management system, so no other employee is able to continue with it.

sbv ,

left the company shortly after the project was finished.

That’s a short way of saying: the original team was partially downsized, primary functions were offshored to a disengaged team in a different timezone, and a bunch of conflicting requirements were piled on to version 2.

Isoprenoid , in Stop doing Computer Science

Can someone explain this joke to me

“I’m writing a recursive method with threads to optimize the CPU usage in a 0.02%

I understand everything apart from the “in a 0.02%”. What does that mean? How can something be in a percentage?

Sheik ,

I think they meant « by ».

obosob ,
@obosob@feddit.uk avatar

It’s a nonsensical statement to us programmers too.

peopleproblems ,

It’s a double joke. For programmers, it’s pretty useless unless your in high performance computing.

If you’re on the nitty gritty OS or CPU itself, 0.02% optimization can mean significant improvememt of different things but because it is otherwise unitless, it is equally useless to the reader.

snowe ,
@snowe@programming.dev avatar

“In a .02%” is nonsensical. They meant “by”. So it’s just a fail, not a joke.

user224 , in Welp, guess I'm going to hell
@user224@lemmy.sdf.org avatar

“Best viewed with Netscape navigator”

xusontha OP ,
user224 ,
@user224@lemmy.sdf.org avatar

The image embed doesn’t work. Lemmy supports embedding media only if HTTPS is used. This website is HTTP.

xusontha OP ,

I already fixed it, but I didn’t know that! That’s really cool!

mounderfod ,
@mounderfod@lemmy.sdf.org avatar

it’s not just lemmy; HTTPS websites aren’t allowed to serve HTTP content
developer.mozilla.org/en-US/docs/…/Mixed_content

user224 ,
@user224@lemmy.sdf.org avatar

Sorry, my bad. And thanks for the info.

mounderfod ,
@mounderfod@lemmy.sdf.org avatar

No worries, I find the intricacies of protocols like this super interesting 😊

user224 ,
@user224@lemmy.sdf.org avatar

You can also embed images inside links, by the way (click the button):
https://getfirefox.com

[![Get Firefox](https://i.imgur.com/KpmYhB1.gif)](https://getfirefox.com)

Also if say you have image/animation/audio/video link without extension (e.g.: .jpg), you can fool Lemmy using a fragment identifier at the end of URL #.jpg which would usually be used to jump to the fragment id in document. e.g.: https://example.org/image#.jpg

xusontha OP ,

Wowzers that’s fancy, I’ll have to save that for the future

x4740N ,
@x4740N@lemmy.world avatar

Now I’m wondering if someone in bad faith could link an tracking image and just rip ip addressees in the background

I guess it depends on if lemmy clients query the link to fetch fetch images or just grab a cached copy of the image from the lemmy instance

user224 ,
@user224@lemmy.sdf.org avatar

Images in comments don’t get cached, so absolutely yes. But I mean, public IP + User Agent is like minimum of information anyway. Any website you visit gets it.

dullbananas ,
@dullbananas@lemmy.ca avatar

Vatican website

spez , in Every Single Freaking Time

Kitty has the feature that if you have text selected it will copy and if not then it will interrupt the command

lappy ,

Yeah I love this feature. I love it so much that I’ll also tell everyone who cares to listen how you can use it. Edit your ~/.config/kitty/kitty.conf file to include map ctrl+c copy_and_clear_or_interrupt and you are good to go. Only issue I have that it doesn’t seem to work in the vscode terminal.

spez ,

Any keybinds I have set don’t work in vscodium terminal for me too. I mainly use neovim for those things.

4am ,

Oh what a great way to further entrench a bad habbit! Hang on I need to remedy some refactored code with rm -rf * which Kitty made safe if I’m in a directory with my project files 🙄

gamey , in They tried
@gamey@feddit.rocks avatar

I generally agree with the statment under that image and it’s certainly a funny meme but also Illegal, sadly the enforcment is a joke but that’s not really the laws fault!

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