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.

lobut , in Openheimer in programming

I mean, it should be a protected branch to prevent against that.

BeigeAgenda ,
@BeigeAgenda@lemmy.ca avatar

Sometimes there’s no other option when someone merged develop into master just before a critical bug was found.

F04118F ,

You can always revert (i.e. undo in a new commit) the faulty commit. That will keep the history. This meme is not just about pushing straight to master, it’s about push --force which overwrites the remote branch completely, changing history.

BeigeAgenda ,
@BeigeAgenda@lemmy.ca avatar

Sometimes there’s only the nuclear option left, I have only done it a few times, someone merged a major refactoring and we ended up reverting by changing history.

I have also observed that when you revert with git revert and then merge back some time later git can get confused about if a commit was merged or not.

Mind you we didn’t use git flow or other smart processes to our own regret.

Double_A ,
@Double_A@discuss.tchncs.de avatar

git can get confused about if a commit was merged or not.

You have to revert the revert before re-merging the branch. Otherwise git keeps track of the commits that you reverted and doesn’t apply them ever again.

See: github.com/git/git/…/revert-a-faulty-merge.txt

BeigeAgenda ,
@BeigeAgenda@lemmy.ca avatar

Thanks for the info, I think that’s exactly what we didn’t do.

mrmanager , in B-bug? What bug?
@mrmanager@lemmy.today avatar

I try to always rewrite complicated code. As an example, another dev who left the team had written a program in Elixir that nobody knew or understood. I rewrote it in python (with his help, since I still had contact with him over chat). After that, everyone in the team could understand the code and we could make changes very easily to it and document it.

Another program he wrote in python was kind of complicated and we would have bugs in it that we didn’t know how to fix. So I rewrote it with a completely different architecture with focus on simplicity. And again, now everyone could just read the code and understand it.

I think many devs are writing code that is not simple to understand for others. Then rewriting it can be worth it to avoid the pain of trying to fix bugs in complicated code.

Phoenix ,
@Phoenix@programming.dev avatar

That’s only the first stage. Once you get tired enough you start writing code that not even you can understand the next morning, but which you’re loathe to change because “it just works”.

mrmanager ,
@mrmanager@lemmy.today avatar

Yeah I’ve had that experience too. But sometimes I write a lot of hackish code to get it to work, and then after spend time rewriting it so it’s easy to understand. But it depends on mood. Sometimes I don’t change it because it’s complicated and it would be too much thinking required to make it better. :)

Programmers are often lazy by nature…

Phoenix ,
@Phoenix@programming.dev avatar

Lazy is right. Spending fifty hours to automate a task that doesn’t take even five minutes is commonplace.

It takes laziness to new, artful heights.

Kolanaki , in Shit
@Kolanaki@yiffit.net avatar

It’s dumb to me that New York city is not the capital of New York state. It could have been perfect. But noooooo! They had to make it Albany!

xoggy , in Some people just can't pace themselves
@xoggy@programming.dev avatar

Think about it though. When people say they want to “code AI” what they typically mean is they want to play with prompts and waste electricity on garbage models, not actually write any of the underlying models that power AI.

dimath ,

Well yes, but also people can use TenserFlow and other AI tools without learning how to properly code. And they can also get the results they want. So be afraid of the question “do you really need to know how to code” anymore.

Phoenix ,
@Phoenix@programming.dev avatar

If you want to disabuse yourself of the notion that AI is close to replacing programmers for anything but the most mundane and trivial tasks, try to have GPT 4 generate a novel implementation of moderate complexity and watch it import mystery libraries that do exactly what you want the code to do, but that don’t actually exist.

Yeah, you can do a lot without writing a single line of code. You can certainly interact with the models because others who can have already done the leg work. But someone still has to do it.

CeeBee ,

There’s a huge gap between “playing with prompts” and “writing the underlying models” and they entire gap is all coding.

Phoenix ,
@Phoenix@programming.dev avatar

It really is big. From baby’s first prompting on big corpo model learning how tokens work, to setting up your own environment to run models locally (Because hey, not everyone knows how to use git), to soft prompting, to training your own weights.

Nobody is realistically writing fundamental models unless they work with Google or whatever though.

mrnotoriousman ,

I've even heard people try and call slightly complex bots "AI" and claim they can code them (or their friend totally can lol). It's infuriating and hilarious at the same time.

Phoenix ,
@Phoenix@programming.dev avatar

w++ is a programming language now 🤡

ImpossibleRubiksCube , in Some people just can't pace themselves

“AI” means nothing. If you want to learn about machine learning algorithms, neutral network programming (actual programming), heuristic collective intelligence, or path finding, then maybe we can have a conversation.

wischi ,

Of course AI does mean something - but it’s a very broad term. It’s a bit like saying you want to buy a vehicle. Could be a boat, car, truck or even a zeppelin.

Xylight , in Some people just can't pace themselves
@Xylight@lemmy.xylight.dev avatar

Same community reposts are back on Lemmy 😔

NegativeLookBehind , in Some people just can't pace themselves
@NegativeLookBehind@kbin.social avatar

Hello world AI

ArcaneSlime , in Some people just can't pace themselves

I’m still struggling with understanding for loops tbh. I kinda get them, but I can’t “make my own” so I don’t really understand them.

I’ve never had any schooling coding, just made some scripts with internet help when I switched to linux, and I have ADHD like fuck so I haven’t really tried to understand them in months, but yeah if anyone knows of a good website to help learn for loops and how to create them (when to use what variables and brackets and shit, etc) I’m taking recomendations.

For i in website do $(tell me please);

(That can’t be right lol, see, I need help!)

coloredgrayscale ,

Don’t let yourself down because you don’t know the syntax off the top of your head.

Even after 15 years of programming, and studying computer science, I would have to look up how to write loops, conditions, variable assignments in bash / sh / batch.

Coming to python from a primarily java focus background wasn’t any different. I knew what steps the program should do, but had to look up how to translate it into whatever language. And for further improvements what features the language has to express the things “in the style of the language”

ArcaneSlime ,

Thanks, that encouragement is definitely helpful, it felt like I was struggling with something most programmers would consider should be mastered day 1, right after lunch because hello world is before lunch haha. Glad to know people still have to look it up even after a while sometimes.

Jedi , in I think I'm switching, I like the new UI
@Jedi@bolha.forum avatar

I’ve made the move a few years ago. I really like the “IDE” experience instead of the “code editor” one.

“Oh, but it takes so much RAM”, yup… So does all those electron apps I have to use alongside VSCode, that are built in webstorm…

glad_cat , in Writing C++ is easy.

Rust is nice, unless you have a traits compilation error from a 3rd party library using types that are more difficult to write than C++ templates.

philm ,

yeah as nice as it is what you can achieve with trait-bounds there are definitely trade-offs, being compile time and error messages, and sometimes mental complexity, understanding what the trait-bounds exactly mean… I really hope, that this area gets improvement on at least the error-messages and compile time (incremental cached type-checking via something like salsa)

Flipper ,

I much prefer getting told of that it doesn’t match a trait than get 600 characters of which the majority is implementation detail of global allocators und from what exactly the string is derived.

philm ,

Depends on what trait bound error messages you have had yet, I had 1000 lines long already, where it’s not obvious at all what is meant (and is often a very simple fix). But I’m sure this will get better over time, there’s already a bigger ongoing redesign of the type system solver, so maybe it will be integrated into stable rust soon.

snor10 , in Writing C++ is easy.

Yeah, but which one i cooler?

corm ,

Rust because having a package manager is important.

Even C has a package manager

cabbage , in Writing C++ is easy.

Sounds like Rust propaganda to me >:(

JakeHimself ,

Tbf, you have to be pretty far with Rust to get to a point where Rust’s compiler errors stop helping you (at least, as far as I’ve seen). After that, it’s pretty much the same

philm ,

Yep use a little bit more deeply cascaded generic rust code with a lot of fancy trait-bounds and error messages will explode and be similar as C++ (though to be fair they are still likely way more helpful than C++ template based error messages). Really hope that the compiler/error devs will improve in this area

Boinketh ,

Rust has better runtime errors, too. If you run a dev build, it should pretty much never segfault unless you use unsafe and will instead tell you what went wrong and where, no valgrind necessary.

JakeHimself ,

Would know, I’ve never had a runtime error in Rust /s

eth0p ,

Can’t have a runtime error if you don’t have a compiled binary taps forehead

(For the record, I say this as someone who enjoys Rust)

asdfasdfasdf ,

This is actually unironically a major benefit of Rust - compile time errors are supposed to be for dev mistakes and runtime errors supposed to be for user mistakes. Way easier to debug something at compile time instead of runtime.

Beanie ,

‘it should pretty much never segfault’ uh, isn’t that the entire point of Rust? Unless you’re counting failing a bounds check as a segfault

manpacket , in Writing C++ is easy.

Then there's Haskell that would remove (well, used to at some point) your source code file if you made any errors: https://gitlab.haskell.org/ghc/ghc/-/issues/163

CanadaPlus ,

The world’s angriest compiler.

ihavenopeopleskills , in Writing C++ is easy.
@ihavenopeopleskills@kbin.social avatar

C just shrugs and says "Seg Fault."

frostwhitewolf ,

Probably forgot a semicolon

Hexarei ,
@Hexarei@programming.dev avatar

This joke is never funny; Forgetting a semicolon in c results in compile time errors, not runtime errors

FreeloadingSponger , in Writing C++ is easy.

MySQL: you have an error near here.

Me: What’s the error?

MySQL: It’s near here.

Me: You’re not going to tell me what the error is? Okay, near where? Here?

MySQL: warmer… warmer…

marcos ,

Oracle: You have this error in line 1

User: Hey, no, there isn’t anything to cause this error in line 1

Oracle: I’m telling you, it’s in line 1

User: Hum… How many lines are in my 10 lines query?

Oracle: 1

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