Post more of these
Post more of these
bump
...
Bump
whats wrong with this code?
Too edgy for Sup Forums.
Could easily use a loop, and reduce the code by 90%. Also allows multiplication by a factor larger than 10.
...
tits or gtfo
...
Are they even around somewhere else in the web or are those a Sup Forums special?
...
...
>tfw never did any stupid shit like this because it was the lazier option to just learn this shit.
:^)
How can anyone teaching be this much of a shitter.
>Using the smiley face with the carat nose
Nothing, Sup Forums just hates women >.
I've always found deeply embedded software architecture design flaws more amusing than these extremely simple "beginner mistakes".
Bad comp sci graduates are more likely to do the former than the latter, but we never get those examples in this thread, probably because Sup Forums doesn't understand what real anti-patterns look like.
...
This is my favourite
for b-- > 0
a =+ a
return a
heh, this is actually pretty good
That's brilliant kek
It's the only one I ever saved because it's so creative
...
...
...
...
...
>not using a loop to build a string which you then feed into eval()
What a newbie
...
...
...
What's the problem here?
Returning a pointer to an char array that goes out of scope when the function returns.
...
...
Ah right.
data could be a global variable though :^)
data could be, but that's not what the returned pointer returns to. It returns to an anonymous array declared in the return statement.
I hope you are ready for this one.
Please tell me this is a real thing
can someone explain this to me
That would be a lot of effort just for a joke.
This is from a syntax highlighter of mine, think it qualifies?
Base64 is a hash function, not an encryption function. Encryption can't be reversed like hashes can.
Base 64 is an encoding function, not an encryption function (which should be evident since the guy doesn't even talk about keys)
The joke is PHP.
You're retarded, hashes can't by design just be reversed.
It just looks like any good old regular expression. I've seen worse: ex-parrot.com
Base64 is an encoding. You can easily decode a Base64 string. Hashes are one way, you can't construct the data from only the hash string.
imgur.com/a/lGOvs
found an imgur album
>That link
Geez
so using that function means if one card gets comromised all of them do
isnt this basically same with encrypting a a file filled with card numbers?
My bad niggers, didn't have my coffee yet. I did mean encoding.
It's faster using hardcoded values, that's why someone did that, I think
Base64 is not a hash function. Base64 converts data to a base64 standard and is fully reversable. It is commonly used when you need to exchange binary data but the transfer method can only deal with text strings (and restricts those text strings to printable characters only)
No, it means they could just run base64_decode on the "encrypted" card info if the DB ever got leaked whereas with a real hash they would need to bruteforce it (good luck with that).
ah so it literally just converts a number to base 64
okay i get it now
It means the shit is not encrypted at all, anyone who sees it either at target or in transit now has your credit card number.
This actually true.
The algorithm is called "down algorithm" and it's actually pretty fast.
Here is a paper about it:
ams.org
>Base64 is a hash function
Nope
...
see
You are like a little baby. Watch this:
int a, b, c;
printf("Enter two numbers: \n");
scanf("%d\n%d", &a, &b);
c = a;
while (b > 1) {
a += a;
b /= 2;
}
if (b == 1)
a += c;
printf("Their product is: %d\n", a);
Buggy code, doesn't account for DST, depending on the situation, you could get today, tomorrow, or the day after tomorrow.
No.
It's like converting your card number to hexadecimal and thinking that makes it secret.
...
How would one accomplish this? I assume reading the source file and printing it out wouldn't work.
This is interesting.
What if it's compiled? How would one do this without code duplication?
N-nani?!
It's called a quine.
Python example:
l='l=%s;print l%%`l`';print l%`l`
Male dominated field.
That's what happens when there's no competition.
That's why we need more women in tech.
...
...
...
>latter
>less readable
>less efficient
When will the functional meme finally die??
Actual two types of programmers:
for(int i = 0;;++i)
for(int i = 0;;i++)
normie fa/g/ here, which one is better and why?
>everything I don't agree with is bait
Top one for readability, bottom one to show your computer e-penis skills.
Top one for everything, function calls are extremely expensive.
I would fire the second programmer. It's less readable than the first, and has no performance benefits.
I would bet the second programmer would probably consider himself "smarter" since he used standard library functions instead of simple statements, but the opposite is in fact true.
i would punch them in the heart
I love these
...
...
mainly just inefficient, also capped at b=10
just do a loop over b and keep adding a
...
This doesn't seem that unreasonable.
What's wrong with that? Should it just return true / false? Maybe it uses the string it returns?
Hahahahhaha
I have no fucking idea what is going on in this thread
what the shit is the purpose of doing that?
Making the code less readable and harder to maintain?
>there may be unknown bugs caused due to this
I fucking hate this shit so much.
>coworkers writes some shit
>tells me to pull
>"It's not tested though :^)"
I mostly agree, but 2nd version is better if it's lazily evaluated (is it? Haven't really done php7). Memory usage should be kept down.
I did similar things, it can be a lot faster.
>What's wrong with that?
needlessly long I assume.
just split the string, grab the info you need from it and then return it