You know Sup Forums, post your best and more eficient code
Cs graduate
...
...
There's so much wrong with that its amazing.
Don't even be disappointed this is all indie game code
shut up eva
This is the fat people hate thread of Sup Forums?
...
...
dl6.volafile org/get/kHPlj2viU8hx/drgn.txt
It was too big for pastebin, so I put it up here. I don't know who the kid was that shared this, but my word I was taken aback when I saw this.
This is an actual sorting algorithm, it's named pogo sort
main(O){int I,Q,l=O;if(I=l*4){l=6;if(l>5)l+=Q-8?l-(Q=getchar()-2)%2:l;if(Q*=2)O+="has dirtiest IF"[(I/-Q&12)-l/Q%4];}return 8+O%4;}
*bogosort
And it's technically not an algorithm.
Should be if a==b return a+a for the if statement
Jesus fucking Christ
And I thought my Sieve of Eratosthenes that segfaults for values larger than 1919 was bad.
I've never gone on /fit/, do they have any good fph threads?
He used XNA's main loop for the entire game? ebin
Sick mate
For a moment I thought it's compile time code generation then I realized it actually isn't
lmfao
It's one of the few good things they have
...
Of course it's an algorithm, it's just not guaranteed to terminate.
Some definitions of an algorithm exclude bogosort.
The Merriam-Webster Dictionary defines a algorithm as "a procedure for solving a mathematical problem in a finite number of steps that frequently involves repetition of an operation".
Since bogosort isn't guaranteed to find a solution in a finite number of steps, it's excluded.
>using else-if when it can be compressed into one condition
>one equal sign in a condition
>one message has a period while the other does not
>no curly braces
>using iostream
*hurls*
What's wrong with iostream? (I'm new to C++)
There is quite literally nothing wrong with iostream
I heard bad things about x
That means using x is bad
return a
kek
this might work if those variables are booleans.
I've been told it's bad to use
using namespace std;
in your code, and you'd have to do that to get those cout's without an std:: prefacing them.
>wanting std's in your code
ewwww we're not sluts okay
It's bad to use using declarations if it's not scoped. Put it in a function or a class, or at the very least a cpp file. If you put it in a hpp file, you're a sinner.
>using using namespace std
using std cout;
using std cin;
What really woos me is a space in the first condition but none in the second. Jew can tell that there's no structure in (her) life.
>(her){male}
ftfy
Who's code is this even?
>//good luck
Why would somebody write it like this? Like there must be a reason, right?
This must be a joke. Or someone in their first lab just hoping something will compile
Some lovely code I wrote years ago for saving a file into a custom archive
If Save.ShowDialog() = Windows.Forms.DialogResult.OK Then
Dim c As Integer = ListBox1.Items.Count
Dim dtCrap(3) As Byte
Dim fileCount() As Byte = BitConverter.GetBytes(c)
ReDim Preserve fileCount(15)
If My.Computer.FileSystem.FileExists(Save.FileName) Then My.Computer.FileSystem.DeleteFile(Save.FileName)
My.Computer.FileSystem.WriteAllBytes(Save.FileName, Sign, True)
My.Computer.FileSystem.WriteAllBytes(Save.FileName, fileCount, True)
Dim dtOffBase As Integer = 20 + (272 * c)
For i = 0 To c - 1
Dim cFile As String = ListBox1.Items.Item(i).ToString
Dim dt() As Byte = My.Computer.FileSystem.ReadAllBytes(cFile)
Dim dtOffset(3) As Byte
Dim dtDirName As String = IO.Path.GetFileName(cFile)
Dim dtNama(259) As Byte
Dim dtNamb() As Byte = StrToByteArray(dtDirName)
Array.Copy(dtNamb, dtNama, dtNamb.GetLength(0))
If i = Not 0 Then dtOffBase += dt.GetLength(0)
dtOffset = BitConverter.GetBytes(dtOffBase)
Dim dtSize() As Byte = BitConverter.GetBytes(dt.GetLength(0))
My.Computer.FileSystem.WriteAllBytes(Save.FileName, dtNama, True)
My.Computer.FileSystem.WriteAllBytes(Save.FileName, dtOffset, True)
My.Computer.FileSystem.WriteAllBytes(Save.FileName, dtSize, True)
My.Computer.FileSystem.WriteAllBytes(Save.FileName, dtCrap, True)
dtOffBase += dt.GetLength(0)
Next i
For i = 0 To c - 1
Dim cFile As String = ListBox1.Items.Item(i).ToString
Dim dt() As Byte = My.Computer.FileSystem.ReadAllBytes(cFile)
My.Computer.FileSystem.WriteAllBytes(Save.FileName, dt, True)
Next
#pragma once
using std::cout;
using std::endl;
Mine....
>that pastebin
NO
I WILL NOT GO THROUGH THIS AGAIN
This was in the slides the teacher used no joke
I had a script that I wanted to be able to copy to a SSH server and run to quickly get it set up. There are some dot files I wanted to add to, so my solution was just save the file as a giant string then just call echo $file > .filename.
I'm not convinced this was a bad way to do it.
But you want to sum the two arguments of the function user
Reminder that he is working hard on entrepeneuring a financial activity while you sit your fat ass on Sup Forums shitposting without getting anything done.
>projecting
>Sitting on my ass late at night after a day of barely working making more than he does
same lul
>implying I don't contract develop video games
>implying I can't write decent game code
I took the bait. Nice going senpai
>b-but I make 999999999$ a month!
>b-but ur projeting xD
>b-but i write le gud code xd
You can leave the thread now.
Just go back to writing your kusoge YandereDev. And maybe consider reading a book about C# instead of obsessing over your e-mails.
LUL
iostream considered harmful
It is guaranteed based on statistics
>Said user smugly while unzipping his dick "Now a quick one and off to sleep." He was tired of being all day shitposting on Sup Forums and needed some rest.
NEET life best life, I miss those golden years.
Technically it is algorithm with O(n!), so it have finite number of step.
>pastebin.com
honestly dont know if this still works, was my godawful bodge of a program for my computing a level.