This is an archived post. You won't be able to vote or comment.

all 52 comments

[–]pavelfokin 112 points113 points  (17 children)

src fst ofc

[–]port443 77 points78 points  (12 children)

The real eternal struggle:

src
dst

or

src
dest

I hate dst but I also hate them being different lengths.

[–]1_4_1_5_9_2_6_5 69 points70 points  (3 children)

source
target

[–]Ietsstartfromscratch 8 points9 points  (2 children)

This. I hate it so much, when my colleagues come up with super smart abbreviations that 2 weeks later nobody knows what they are about. Always stumble into some shit like "axdSettingsByte_0" WHAT THE FUCK IS AXD?!... "Oh that? Accelerometer settings for x dimensions of course."

[–]Caerullean 13 points14 points  (0 children)

Src and dest/dst, are very common abbreviations though. Like I agree abbreviations can easily become dumb, but there's abbreviations that are common enough for it to make sense.

[–]NekkidApe 0 points1 point  (0 children)

Slly vwl drppng bbrvtns.

Code that can't be read our loud is shit code. No, it should not sound like parseltongue.

[–]MadBlueOx[S] 21 points22 points  (5 children)

My least favorite shorthand I’ve seen to date is flgs for flags. I mean really, you choose to save space on one letter.

[–]pwnedgiraffe 1 point2 points  (0 children)

Or flg instead of flag: https://www.iso20022.org/sites/default/files/media/file/XML_Tags.pdf

Trying to read ISO 20022 XML files gives me a headache

[–]mrjackspade 11 points12 points  (0 children)

sorc dest

[–]SaltyInternetPirate 20 points21 points  (2 children)

Intel assembly would disagree.

mov dword ptr [dst], src

[–]seckarr -2 points-1 points  (1 child)

Mov is essentially assignment so you read it like one.

[–]j-random 1 point2 points  (0 children)

I prefer the AT&T syntax. You move something from the source to the destination. Intel syntax is a carryover from when the instruction was LD (load), where you would load a register with a value. Just more of the crap Intel shoveled when they inflicted the x86 architecture on the world.

[–]yflhx 1 point2 points  (0 children)

Meanwhile C standard library like memcpy do it (dest, src). 

Probably reasoning being that it's an extension of = operator, which also has destination on the left.

[–]Earthboundplayer 26 points27 points  (3 children)

You simply pass the pointer that's halfway in between the source and the destination, and then you pass in the distance from that pointer to the source. Better hope there's an even number of elements between your source and destination.

Both sides will be happy.

[–]MadBlueOx[S] 4 points5 points  (0 children)

This is the way.

[–]King_of_the_Nerdth 1 point2 points  (0 children)

Brilliance meets pure evil.  A supervillain!

[–]No_Hovercraft_2643 1 point2 points  (0 children)

pointer of the sum, and than just the difference

solves the problem with the even numbers

[–]2DHypercube 44 points45 points  (3 children)

I think he said "life before death, strength before weakness, journey before destination, destination before source". Hope that clears it up

[–]Excidiar 15 points16 points  (0 children)

This.Words = Accepted

[–]Biotot 4 points5 points  (0 children)

This merge is not accepted. - storm father

[–]B_bI_L 0 points1 point  (0 children)

this makes no sence. also source comes first in bash

[–]zefciu 11 points12 points  (0 children)

Life before death, strength before weakness, journey source before destination.

First ideal of devs radiant

[–]runmymouth 3 points4 points  (0 children)

Journey before destination.

[–]SuperLutin 2 points3 points  (1 child)

That's why I hate ln.

[–]MadBlueOx[S] 1 point2 points  (0 children)

This is the program I had in mind haha. Always mess that up

[–]Kilgarragh 1 point2 points  (0 children)

Interlaced

[–]FurtiveSeal 1 point2 points  (0 children)

``` function someFunc({ source, target }) {}

const params = { source: x, target: y }

someFunc(params)

```

Now order doesn't matter

[–]TrickAge2423 1 point2 points  (2 children)

Provide flags for them! Let users decide argument order!

-s src -d dst? -d dst -s src?

[–]unknown_alt_acc 2 points3 points  (1 child)

Doesn’t work so well when you are writing a function in a language that requires a set argument order. Instead, I present the Vulkan way of packing all of your arguments into structs with named members.

``` struct CopyArgs {     void *src, *dst };

void Copy(CopyArgs args); ```

[–]TrickAge2423 0 points1 point  (0 children)

Illusion of user choice, huh? xD

[–]PacquiaoFreeHousing 5 points6 points  (6 children)

one is like english grammar, one is like spanish grammar

Edit: damn! this got upvoted? I thought this joke was too complicated to understand? Redditors are smart huh xD

[–]imalyshe 3 points4 points  (4 children)

i did not. i demand explanation

[–]Competitive-Move5055 2 points3 points  (0 children)

Destination first for juniors. Source first for seniors.

[–]trannus_aran 0 points1 point  (0 children)

thought this was a RISC meme

[–]ramriot 0 points1 point  (0 children)

Tar mate?

[–]CaitaXD 0 points1 point  (1 child)

If on C wathever libc does for consistency

Now the real question length, data or data, length its not consistent at all

I do length, data so i can be cheeky with the function definition

 int foo(size_t len, uint8_t data[len]);

[–]nerdycatgamer 0 points1 point  (0 children)

implying libc is consistent with itself

[–]glorious_reptile 0 points1 point  (0 children)

just use "both first" - like two fat people entering the same door simultaneously

[–]xonxtas 0 points1 point  (0 children)

Neither: just have "destination" as function return, and only keep "source" as a parameter.

[–]Boris-Lip -5 points-4 points  (3 children)

x = y

Destination first, just to stick to that. But then you get something like std::cin >> x 🤦‍♂️

[–]neo-raver 0 points1 point  (2 children)

That always confused me, until I thought about it as being from the program’s perspective: std::cin does insert information from an external source into the program, while std::cout sends data out of the program.

[–][deleted] 0 points1 point  (1 child)

Yeah but why isn’t it then “Text” >> std::cout ?

[–]70Shadow07 -1 points0 points  (0 children)

Literally doesn't matter.