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.

flumph , in Need a rust version too.
@flumph@programming.dev avatar

I’m going to have to print out the Go version for all future “it’s idiomatic” and “but the community!” debates at work

SnipingNinja ,

I’m curious about this but I’m barely a programmer now, so if anyone is up to explain

flumph ,
@flumph@programming.dev avatar

The go community is strongly opinionated in unique ways. For example, using libraries is generally frowned upon. You either use something included in the language itself (standard library) or copy/paste the code you wrote in another project. There’s also advocacy for shorter variable names which generally seems counter to the normal “write descriptive variable name” mantra.

All in all, I hope the ideas / opinions came from a good place and then some people took them as black & white rules. But they also come off as one or two people’s pet peeves who got to build a language around them.

r00ty Admin , in Need a rust version too.
r00ty avatar

C# is about right. LINQ was meant to make things easier, or at least the code easier to read. Instead, you gain this addiction to seeing how much functional logic you can fit into one line of code (or a single multi-line query) while still remaining readable.

Curdie ,

I feel personally attacked.

stebo02 , in Need a rust version too.
@stebo02@sopuli.xyz avatar

no python? how are normie programmers like me supposed to relate to this?

aniki ,

The artist is still waiting for the python cells to render.

scratchresistor ,

Rescuing is only I/O bounded; your argument is irrelevant.

troyunrau ,
@troyunrau@lemmy.ca avatar

You have python. You import antigravity. The princess flies off into space. You monkey patch the princess so she has wings.

stebo02 ,
@stebo02@sopuli.xyz avatar

And this is how I learned about the antigravity module. Pretty cool!

aniki ,

Same! I also learned about


<span style="font-weight:bold;color:#a71d5d;">import </span><span style="color:#323232;">this
</span>
HerbalGamer ,
@HerbalGamer@sh.itjust.works avatar

import this

“In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you’re Dutch.”

lol

iAvicenna ,
@iAvicenna@lemmy.world avatar

import army

CanadaPlus ,

Which is a library written in C, of course.

psud ,

No perl either. Much like python you find a relevant library (in cpan), but unlike python there will be seven different implementations, and any four perl devs will come up with at least ten solutions, nine of which will successfully rescue the princess

evranch ,

Everything will seem to be be going great, but to actually gain access to the castle you’ll have to compare your situation to successful rescues to find the undocumented drawbridge control

CodeMonkey ,

Python: You send someone else to rescue the princess on your behalf. That someone else is the C knight.

scratchresistor ,

Only if you have to rescue many princesses in a short period of time

agent_flounder , in Need a rust version too.
@agent_flounder@lemmy.world avatar

Omg Lisp. I’m dying. Our object oriented programming class in college involved programming in Scheme. This was… a while ago.

Saving this forever.

lastunusedusername2 ,

I did the same thing in Scheme. It was mine expanding.

Lawyerator ,

Yup, Scheme was the only programming language taught in our comp-sci department so we could “learn how to learn.” Two years and a broken parentheses button later, and I switched to being a theatre major.

Today, my legal career stands as a testament to the pointlessness of a declared major.

nailbar , in Need a rust version too.

PHP 8 makes it finally possible to rescue the princess, but you accidentally princess the rescue instead.

ISMETA ,

PHP 8 makes it possible to rescue the princess but your 83 legacy princesses are all still PHP 5.

nailbar ,

I did not want to be reminded of that today 😡

remotedev , in Need a rust version too.

Ruby: there is a built in method called free_the_princess()

karmiclychee ,

On Castle, no less.

CmdrKeen ,
@CmdrKeen@lemmy.today avatar

<span style="color:#323232;">require 'castle'
</span><span style="color:#323232;">
</span><span style="color:#323232;">begin
</span><span style="color:#323232;">  Castle.attack
</span><span style="color:#323232;">rescue Princess
</span><span style="color:#323232;">  puts "Done"
</span><span style="color:#323232;">end
</span>
uid0gid0 , in Need a rust version too.

The Patsy from Monty Python in the PHP section got me

AnUnusualRelic ,
@AnUnusualRelic@lemmy.world avatar

“Message for you sir!”

argh

troyunrau ,
@troyunrau@lemmy.ca avatar

I have that as my cell phone notification. It’s amazing.

Here’s a download link if anyone else wants it: drive.google.com/file/d/…/view?usp=sharing

Hazzia ,

Thank you for your contribution to the betterment of society.

AnUnusualRelic ,
@AnUnusualRelic@lemmy.world avatar

Duh. I can’t believe I never thought of it, just because it was a model.

HiddenLayer5 , in Need a rust version too.

You have Rust.

Forget rescuing the princess, that’s unsafe. Lock her down even more!

PhlubbaDubba , in Need a rust version too.

Rust:

You crushed the princess under the weight of all the crates you imported

fallingcats ,

Nothing against the singularity that is a node_modules directory

ilinamorato , in Need a rust version too.

You have Rust. (the knight in this panel looks very cool, wears sunglasses, and probably has a ponytail)

You’ve been told how easy it is to rescue the princess. Absolutely nothing will get in your way, they say; nobody can possibly get access to your plan, and you can even rescue multiple princesses simultaneously! (in this panel, the knight is imagining rescuing three princesses from three different castles at the same time)

You start working on your plan. It’s elegant and beautiful. You write articles on Medium to tell other knights how to rescue their princess. You tell everyone who will listen about your plan. You become a Rust zealot. You never rescue the princess. (In this panel, the knight is nowhere to be seen, and the princess looks bored in her tower. The knight is across the field, at a festival with the banner “RUSTCONF” flying overhead)

lseif ,

yeah but memory safety tho

WaterWaiver ,

Yeah not one mention of “I’ll never forget you Princess”

ilinamorato ,

Great punch-up. I wish I’d thought of it.

wolo ,

I’ll never std::mem::forget you…

akash_rawal , in Need a rust version too.

You have rust.

You get a horse and arrive at the castle within seconds but the horse is too old and doesn’t work with the castle.

You remove the horse, destructure the castle and rescue the princess within seconds, but now you have no horse.

While you’re finding a compatible horse and thinking whether you should write your own horse, Bowser recaptures the princess and moves her to another castle.

Aceticon , in Need a rust version too.

You use Assembly.

You describe each and every leg movement and each and every step to the castle and over the castle bridge and inside the castle.

You somehow end up in the castle kitchen.

sunbeam60 ,

Or more precisely. You end up in a dark room. You’re not sure it’s in the castle.

nilloc ,

And the only way back is by counting every step you took on the way in, and if you miss one, the castle buries you.

mindbleach ,

But if you’re right, you have the princess and return home before the guards are done drawing their swords.

kSPvhmTOlwvMd7Y7E , (edited ) in Need a rust version too.

So let me summarise this:

Only C and Lisp actually completed the initial task of getting the princess free, and Author clearly favors C over the drooling and homeless lisp hacker. Also, turns out, C greatest weakness helped to save not only the princess but everything she ever possessed! How convenient!

Shareni ,

Naah, C stabbed himself in both of his feet while planning. The rest of it is his dying mind hallucinating saving the princess.

Lisp is the true hero, but the author has parenthophobia

4onen , in what's the difference?

Git is a program your computer runs to have a single folder have source control. It does all the hashing and commit chaining that you’re used to, branches, that sort of thing.

But if you want it to be on more than one computer, you need to do this complicated “Bare” repository setup on a server computer to do the “git push” stuff you’re used to.

Most people, being too lazy to learn bare repositories and the general sysadmin necessary to host a git server themselves, instead just use Microsoft’s Github which is a web interface for the server use of git the program.

Microsoft then proceeded with their classic mantra of “Embrace, Extend, Extinguish” and started slapping on more and more features that are incompatible with any other git hosting service: actions, CI, their web VSCode instances, etc. That’s all in GitHub too. But it’s all just web interface for git the open source program, at the end of the day.

rtxn ,

GitHub was independent from Microsoft for a long time, and was only acquired in 2018.

xmunk ,

I like shitting on M$FT as much as the next bloke but if you believe Github started being evil when Microsoft entered the picture then your memory is pretty awful.

From it’s inception github pushed proprietary tagging and issue numbers that have no meaning outside their platform and a difficult export process to trap projects - especially commercial ones - on their platform.

4onen ,

I was being diplomatic because I was uncertain how people felt about the issue and PR tracking, considering how Bitbucket and GitLab replicate it. Felt simpler to focus on the since-M$ft egregious steps.

Phen ,

I remember moving a project from github to gitlab years ago (before MS) and the process to move all the non-git data from github was just as easy as moving the git repo itself. Thanks to gitlab’s efforts perhaps, but I didn’t expect github to have made it difficult for them based on the experience I ended up having.

Archr ,

Just a few comments on this. Most people aren’t “lazy”, they just understand that the effort to run a bare repository is greater than basically any other solution. Also your incompatible features list implies that other git repo sites (gitlab, codecommit, bitbucket, etc) don’t have their own form of proprietary stuff that you have to learn. In fact the newest version of gitlab actually changes their web ide into vscode web, because of the obvious, it is much better than their old ide.

purelynonfunctional , (edited ) in what's the difference?

It’s not, though. Git is a means of distributing content, not the content itself. The thing analogous to PornHub’s porn on GitHub is the source code in the repos hosted there, not Git itself.

CanadaPlus , (edited )

If only there was a website called “StreamHub” or something.

Honestly the content vs. characteristic method of delivery distinction is subtle enough this is still a great way of explaining.

purelynonfunctional ,

Depends on to whom. If you’re explaining to your grandma, a small child, a co-worker, or a student under your tutelage, you probably don’t want an explanation that relies on reference to a porn site.

And if you’re explaining to a novice developer or to an IT person who sometimes might have to work with Git, they deserve an explanation that leaves them with a basic understanding (or at least the names) of the kinds of things Git and GitHub are (VCSes and SCM forges, respectively), not just an inkling that GitHub is not unique in being ‘a place to host (some?) Git, whatever that is’.

So… if you don’t mind that it suggests ‘GitHub is for uploading Git(s)’, that line is an okay way to teach ‘the difference between Git and GitHub’ to non-technical, non-elderly adults who don’t really need to know what Git is (and don’t work with you or study under you).

That’s an explanation of pretty damn narrow usefulness, to put it generously.

It is pithy and memorable, though.

CanadaPlus ,

How often does grandpa ask you what GitHub is?

emptiestplace ,

You’re right, we probably should’ve noticed sooner.

spiderplant ,

I agree that porn is a nsfw way to explain something in a lot of scenarios but I disagree about people needing to know at least the names of a technology from an explanation.

Most people don’t need to know or care about the names to understand or use them. Knowing the names after I learnt the commands did not give me greater insight into how the tool works.

If they are just being introduced to git and github then they are likely new to programming and have much more important things to care about like learning their first programming language or understanding how their teams project actually works.

A place to host gits is a perfectly good explanation for anyone who is new to it.

merc ,

Git is a DVCS. GitHub is a place where DVCS repositories are hosted. There are many other places where DVCS repositories can be hosted, but GitHub is the most famous one… Porn is a type of content. PornHub is a place where porn is hosted. There are many other places where porn can be hosted, but PornHub is the most famous one. It’s a pretty good analogy.

dan ,
@dan@upvote.au avatar

There are many other places where DVCS repositories can be hosted

I mean… Everyone that’s cloned the repo has a full copy of it. You could clone it directly off someone else if you wanted to.

merc ,

Sure… and you could pass around porn on thumb drives. But, having a central website where you can browse public repos and clone the interesting ones is a pretty key part of Open Source / Free Software development.

dan ,
@dan@upvote.au avatar

How many people use Github for discovery though? I usually find interesting projects through a search engine, through word of mouth, through posts on here, etc. at which point it doesn’t really matter where the repo is hosted. A lot of the useful projects I use aren’t even on Github.

As far as I know, Gitea is current working on federation support, which will be great. It’d be like Lemmy where you can browse repos, submit issues, etc from one instance even if the repo is hosted at a different one. Git was really designed for a model like that, not for a centralized one.

spiderplant ,

How many people use Pornhub for discovery though? I usually find interesting content through a search engine, through word of mouth, through posts on here, etc. at which point it doesn’t really matter where the porn is hosted. A lot of the useful content I use aren’t even on Pornhub.

Seriously though, I agree with you, githubs value to open source is not it’s discover-ability. Personally I think its value comes from the stability, as much as I’m an advocate for self-hosting I know from the amount of dead links on the internet that we could have lost a lot of projects or at least they would move about as hosts went down.

I quite like the idea of federated gitea, although technically there is already a federated platform for porn if you count Lemmy and/or mastadon.

docAvid ,

But it’s a categorical error. The analogy is about “git”, not “git repositories” or “DVCS repositories”.

merc ,

k

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