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.

Flax_vert , in Three monitors, and i feel insulted

One monitor connected to a thinkpad, mechanical computer from early 2000s, it’s software engineering time.

tengkuizdihar , in Rebase Supremacy
@tengkuizdihar@programming.dev avatar

Please for the love of god don’t use merge, especially in a crowded repository. Don’t be me and suffer the consequences. I mistakenly mention every person with a commit between the time I created the branch until current master.

nialv7 ,

That was you! I remember this.

tengkuizdihar ,
@tengkuizdihar@programming.dev avatar
bear ,

There’s 102 people mentioned in that commit and two of them happen to meet in the comments of a meme thread on Lemmy of all places. I love the Internet.

Atemu ,
@Atemu@lemmy.ml avatar

Merge is not the issue here, rebase would do the same.

tengkuizdihar ,
@tengkuizdihar@programming.dev avatar

really? how come? I thought they are mentioned because of the diffs if compared to master, which merge basically just… merge on top of my branch (?)

Atemu ,
@Atemu@lemmy.ml avatar

They were mentioned because a file they are the code owner of was modified in the PR.

The modifications came from another branch which you accidentally(?) merged into yours. The problem is that those commits weren’t in master yet, so GH considers them to be part of the changeset of your branch. If they were in master already, GH would only consider the merge commit itself part of the change set and it does not contain any changes itself (unless you resolved a conflict).

If you had rebased atop of the other branch, you would have still had the commits of the other branch in your changeset; it’d be as if you tried to merge the other branch into master + your changes.

Bourff ,

Just for the record, I think you’re conflating git and GitHub. They are not the same thing, even if GH would like you to think so.

Atemu ,
@Atemu@lemmy.ml avatar

I am not. Read the context mate.

jaemo ,

Could have been worse. I mean, like, imagine of you were using like CVS and you put a watch on the root! Haha and then like every trivial commit in the repo caused everyone to in the entire org to get an email and it crashed the email servers.

Like who’d even DO that?! Though, I bet if you met that guy he’d be ok. Like not a jerk, and pretty sorry for all those emails. A cool guy.

droans ,

You sent over twenty-two thousand notifications lmao.

And then the bot added about as many tags to the PR.

Aceticon , in New language

I would say that over a decade of my career was coming in as a freelancer to fix codebases where a couple of people tought they knew better than the previous ones and proceeded to add yet another very different block to a codebase already spaghetiffied by a couple such people.

Sometimes it was coding style, sometimes it was software design, sometimes it was even a different language.

I reckon thinking that just deploying one’s EliteZ skills on top of an existing code base without actually refactoring the whole thing will make it better is a phase we all go through when we’re still puppy-coders.

ChickenLadyLovesLife ,

The majority of puppy-coders I’ve encountered (including myself) actually want to refactor rather than just add onto. They are fundamentally correct in this, but they don’t grasp that 1) few companies want to acknowledge that the code base which is their greatest tangible “asset” is actually complete shit, and 2) that due to their inexperience, their refactored replacement is probably going to end up as bad as or worse than the original.

riskable , in New language
@riskable@programming.dev avatar

I’m failing to see the problem. As long as one of the languages isn’t PHP they’re still probably better off 🤷

CanadaPlus ,

We’re talking about Java, not JavaScript, right?

KairuByte ,
@KairuByte@lemmy.dbzer0.com avatar

Both are fine tbh. Javascript has come a long way from a decade ago, and mixing in a decent framework like jquery does wonders.

CanadaPlus , (edited )

The type system is still really bad, and apparently TypeScript gets mixed with native libraries in common practice, which makes a bad situation worse when something breaks.

Edit: Messed up the name, fixed.

KairuByte ,
@KairuByte@lemmy.dbzer0.com avatar

The typing system is just a “quirk”. As long as you understand the (admittedly annoying) exceptions to the way your brain expects typing to work, everything works quite well.

And tbh, transpiled TypeScript libraries can be called from JavaScript as if it was JavaScript… because it is JavaScript. There’s no need to worry about typing unless you’re doing something like passing a string into a function that expects an int, and you’d run into those same problems if the function was originally JavaScript.

Edit: a word

CanadaPlus ,

I mean, sure, but taking that argument to it’s logical extreme we should still be programming in assembly, because you can if you just know enough to do it.

A language is a tool. If it’s harder to use successfully than the next tool it’s a worse tool.

KairuByte ,
@KairuByte@lemmy.dbzer0.com avatar

No? How is that the logical conclusion? You need to understand any language, and any quirk of that language, in order to effectively write in it. JavaScript is powerful, and moving farther every iteration. Strong typing is just not something it takes into consideration. In the same way that C# doesn’t take white space into consideration, and python doesn’t terminate its instructions with semicolons.

Each language is different, each language has its own quirks that you need to understand and get used to. If that wasn’t the case, we would have one objectively “perfect” programming language to use in all situations, on all machines, for every use case.

CanadaPlus , (edited )

You need to understand any language, and any quirk of that language, in order to effectively write in it.

That seems to imply they all have the same amount of quirks, which I think most people here would agree is untrue

Something like Haskell has far, far fewer quirks than x86 assembly code. It really only has quirks to do with interactivity; everything else is very predictable and visible in the code. Meanwhile, assembly code is but a maximally useful set of quirks in a specific electronic circuit.

Ditto if you look at older languages. FORTRAN is unpleasantly quirky, which is why it’s almost obsolete.

If that wasn’t the case, we would have one objectively “perfect” programming language to use in all situations, on all machines, for every use case.

I mean, I hold out hope that that will eventually happen, at least for the vast majority of use cases and machines. Obviously we’re not there yet.

There have been languages that basically dominate their own niche. C/C++ was almost the only game in town for performance coding until someone discovered a way to compile mid-level code while also guaranteeing memory safety. Memory errors were a terrible quirk, so now Rust might steal its crown.

sacredfire ,

I personally don’t think that’s the issue with the typing system. With vanilla js if I’m looking at a function that has say four parameters that are not trivial objects like strings but are actually complex (think dependency injection) it’s very difficult for me to know what these objects are other than reading through the code of the function.

Actually, even if the parameters are simple, I’m not sure of that until I look into the function and see what it’s doing. This is a huge pain in the ass most the time, because I just wanna look at the function name its parameters and move on. However, that being said, most of this can be remedied with jsdocs and a good linter/lsp.

brian ,

decent framework

jquery

It’s current year, you have to choose one. there really isn’t any reason to use jquery other than legacy code

KairuByte ,
@KairuByte@lemmy.dbzer0.com avatar

Jquery is still extremely relevant. React exists as well, and is also a good framework. I just happened to think of jquery first.

brian ,

what does jquery give you that vanilla js doesn’t? it was good before browser inconsistencies got ironed out and js didn’t have as many features built in, but nowadays I have no idea why someone would need it

dezvous ,

What’s wrong with PHP?

Restaldt ,

PHP5 was basically the Adolf Hitler of programming languages

You know how something can be so terrible it ruins something forever? Like the hitler stache

msage ,

5.3 was a big leap for PHP. It became actually very good at that point.

I learned it when it was on 4 and boy oh boy was that something.

But nowadays, with 8, it works great, tooling is fantastic. I just kinda wish the documentation, which is absolutely top notch for 90% of the language, was this good for the rest 10%.

I want to play around with Fibers, but I just don’t get the info I want to.

pthreads were so out of date in docs it was shameful.

But the language is good, typing is coming along nicely, and basically the only thing I want PHP to do is to call Postgres and encode the output to json. Works like a charm.

Restaldt ,

Yeah i’ve heard good things about it recently. I’ve always liked how easy curl can be in php.

Adding typing seems like it would fix most of the problems i did run into but

Has PHP raised its standards on function naming? Or do you still have batshit situations like realEscapeString2() because the first 30 other functions for escaping strings are deprecated?

isVeryLoud ,

I’m actually sad about the Hitler stache, it was also the Chaplin stache.

dezvous ,

Lol okay maybe that’s true :) but PHP is great nowadays and with frameworks like Symfony and Larvel it’s easier than ever to build applications

MyNamesNotRobert , (edited )

If you get even 1 thing wrong, the entire program stops working and you don’t get any information about it. Turns out those cryptic errors like “error: object reference not set to instance of an object at address 0x007e00” are kind of important information to have. Unless you specifically know where it’s crashing, finding the source of the problem is like finding a needle in a haystack. If it’s your own code it’s borderline manageable but you’ll regret every decision that led you up to that point. If it’s someone else’s code such as an old project from 9 years ago that doesn’t work anymore, absolutely forget about it.

The only advantage of php is that it’s incredibly lightweight. I was running an Athlon XP home server on Gentoo as late as 2022 and still had php running despite only having the SSE1 instruction set and a cpu less powerful than whats probably on a modern led lightbulb.

But ACKTCHUALLY I think django and python bottles can be run on even shittier computers than php can since it uses python and python has been demonstrated to be runnable on a pentium 1. So there is no reason to use php.

soulfirethewolf , in kno.wled.ge

Aside from the fact that it’s owned by alphabet, what’s so bad about .xyz?

SpaceMan9000 ,

Insanely bad reputation, one hosting provider decided to sell .XYZ domains for 1 dollar per year.

This resulted in people with malicious intent buying up domains en masse to use it for malware delivery/phishing/whatever.

bisby ,

I didn’t realize that. I use a .xyz for a lot of my personal stuff and didn’t realize this. I wanted basically .website … i didnt want .com or .org or anything with tld that meant something, so xyz felt nice. Also, the domain I wanted with any popular tld was insanely expensive and i got my xyz for cheap when it was brand new (not for 1 dollar though).

Maybe I need to look into new domains, but I probably will just stick with it since its primarily for personal use anyway.

JohnEdwa ,

Alphabet uses it for abc.xyz because it’s funny, but the .xyz registrar is the British Team Internet/CentralNic.

Just like how they use youtu.be and goo.gl, but Alphabet doesn’t own Belgium or Greenland either. At least, not yet.

Feathercrown , in Should it just be called JASM?

WASM, also known as Javascript Java

devfuuu , in Should it just be called JASM?

Java applets from 20 years: what am I to you?

KairuByte , in New language
@KairuByte@lemmy.dbzer0.com avatar

Write your business critical process in brainfuck and have job security for life.

onion ,

Sprinkle in some whitespace code…

MoonJellyfish , in New language
@MoonJellyfish@lemmy.today avatar

I like typescript:)

MyNamesNotRobert , in New language

How to go from only being able to compile the project on a Windows machine (due to obscure dependencies that every other Java project has for some reason) to not being able to compile on anyone’s machine in just 1 simple step.

kaffiene ,

I’ve worked with Java since v1. 5 and I’ve never seen a build system that was Windows only

python , in Hilarious

I’ll do you one better

function* sorry() { yield “I’m sorry”; }

Call sorry.next().value as many times as you need to baby, hell you can even use it in a for-of loop because Generator functions are Iterable. I fucking love JavaScript

brian ,

lol that doesn’t work either tho. it yields the string once and then is done. you still need a loop inside

python ,

You’re right! That’s actually a really cool point about Generator functions too, them having while(true) loops is very unproblematic :D

I’m correcting myself to:

function* sorry() { while(true){ yield “I’m sorry”; } }

moosetwin , in kno.wled.ge
@moosetwin@lemmy.dbzer0.com avatar

if your website has .gg in the name it is 99% likely a phishing site

what is wrong with .club and .cool? is it because they are words?

Zehzin , in kno.wled.ge
@Zehzin@lemmy.world avatar

.dev?

nickwitha_k , in New language

Seems reasonable to me. A scripting language, a compiled language, SQL, some CI/CD DSL, and a dealer’s choice.

Java isn’t bad but, I’m not a fan of how verbose and convoluted it is. That said, I’ll take Java over here JS any day of the week.

Sanctus , in kno.wled.ge
@Sanctus@lemmy.world avatar

I personally like .dev and .studio

haui_lemmy ,

I looked at a .dev domain today but its just too expensive imo. I dont have that much just to throw it at a name I like.

bbuez ,

What provider? Mine off of porkbun was 30$ for 3 years at 14$ a year after discount and I managed to snag a relatively personal & unique name

haui_lemmy ,

Wooow! It was 45 $ per year for the one I wanted. Might be due to the shortness of the domain. I cant remember the provider. But namecheap was 130 $ a year and godaddy as well.

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