Jump to content

  • Log In with Google      Sign In   
  • Create Account


Unmaintainable code

  • You cannot reply to this topic
55 replies to this topic

#41 Sik_the_hedgehog   Crossbones+   -  Reputation: 1496

Like
0Likes
Like

Posted 21 November 2013 - 07:05 PM

At first I thought my computer was being so slow it wasn't loading at all... then after a minute or so I decided to scroll for some reason. Oh god, what's with all that indentation O_O


Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.

Sponsor:

#42 L. Spiro   Crossbones+   -  Reputation: 12343

Like
6Likes
Like

Posted 21 November 2013 - 07:12 PM

According to the copyright he worked on this for 7 years.

How do you…

 

 

Words fail.

 

 

L. Spiro


It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#43 gfxCahd   Members   -  Reputation: 192

Like
6Likes
Like

Posted 15 January 2014 - 09:12 AM

A timelapse video of the development cycle:

 

Bloody_typing_by_Rai_hime1995.gif


Edited by gfxCahd, 15 January 2014 - 09:13 AM.


#44 ferrous   Members   -  Reputation: 1605

Like
0Likes
Like

Posted 15 January 2014 - 03:29 PM

According to the copyright he worked on this for 7 years.

How do you…

 

 

Words fail.

 

 

L. Spiro

 

I always did wonder why the game was in development for so long.  Not anymore =)



#45 YodamanJer   Members   -  Reputation: 433

Like
0Likes
Like

Posted 08 February 2014 - 12:02 AM

Yeesh, and I thought my code formatting was bad!

This code is what the results of taking a .cpp file and sticking it into a blender would look like. 

Bad bad bad bad bad!


My website, featuring all kinds of geeky things! yodamanjer.com

Follow me on Twitter! @jwg1991
 


#46 Bacterius   Crossbones+   -  Reputation: 8188

Like
1Likes
Like

Posted 09 February 2014 - 02:04 AM

Yeesh, and I thought my code formatting was bad!

This code is what the results of taking a .cpp file and sticking it into a blender would look like. 

Bad bad bad bad bad!

 

It looks more like C with classes than C++ to be honest. I mean, he's using raw arrays, raw pointers, etc.. pretty much using classes only for polymorphism (if even), hardly ever using the standard library. Instead of initializing a hash map - or even just using a switch statement - the code runs through an entire array every time it needs to convert between a character and its enum value (check out WinInput.cpp). It's a nightmare and one wonders how it even works together at all.


The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis


#47 ambershee   Members   -  Reputation: 524

Like
0Likes
Like

Posted 28 February 2014 - 09:55 AM

This is utterly incredible. I'm actually flabbergasted that this could ever conceivably have become a product that someone could actually sell.



#48 SimonForsman   Crossbones+   -  Reputation: 5810

Like
2Likes
Like

Posted 28 February 2014 - 01:04 PM

 

This program looks like it might have been developed using the following rule: you can only add new code, you can never delete or change existing code.Actually, that gives me an idea...


I like this new paradigm, I think the first two years of college should strictly enforce this, just to drive into the minds of students how vital it is to think ahead, before you begin writing anything.

Is their any formal name for this scheme, or should it be called the rip-off programming paradigm.

 

 

write-only programming ?


I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#49 smr   Members   -  Reputation: 1559

Like
0Likes
Like

Posted 28 February 2014 - 02:24 PM

I also thought for sure that this was generated code...

#50 tanzanite7   Members   -  Reputation: 1148

Like
0Likes
Like

Posted 28 February 2014 - 09:05 PM

write-only programming ?

That is a new one, but strangely familiar.

We used to have (20y+ ago) some custom engineered computers available in school, worked well. Except the floppy drive (which was not custom made, probably just whatever was the cheapest around) - its ability to read what it wrote was kind of hit-and-miss. So, everyone called their floppies write-only storage.

Yeah. The only time "The **** ate my programming homework." was actually accepted by teachers (i swear, i am not making this up).

Oh, good old days.

#51 TheComet   Members   -  Reputation: 1388

Like
1Likes
Like

Posted 04 March 2014 - 07:11 AM

I refuse to believe this is how it was programmed.

 

He's got to be screwing with us. Obfuscation, perhaps?


YOUR_OPINION >/dev/null


#52 TheChubu   Crossbones+   -  Reputation: 3760

Like
1Likes
Like

Posted 04 March 2014 - 08:40 AM

I refuse to believe this is how it was programmed.

 

He's got to be screwing with us. Obfuscation, perhaps?

Ohhh that would be quite the entertaining possibility :D


"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

 

My journals: dustArtemis ECS framework and Making a Terrain Generator


#53 Shoruke   Members   -  Reputation: 107

Like
0Likes
Like

Posted 29 March 2014 - 11:01 AM

When I opened that link, for some reason it dropped me 2/3 of the way down the page. There was code on the far right side of my screen... none of it looked remotely intelligible...

I scrolled up a few lines, and noticed there were comments that were equally unintelligible...

I thought to myself, "I bet they have a whole bunch of uncommented global variables with less-than-perfectly descriptive names." I wasn't disappointed. Then I realized I was, in fact, *very* disappointed.

 

At least comparing my code to theirs makes me feel a little better about myself as a programmer.



#54 Alundra   Members   -  Reputation: 776

Like
0Likes
Like

Posted 26 April 2014 - 06:08 PM

According to the copyright he worked on this for 7 years.

How do you…

 

 

Words fail.

 

 

L. Spiro

mouhouhaha, I love.



#55 vleugel   Members   -  Reputation: 252

Like
0Likes
Like

Posted 27 April 2014 - 02:21 AM

Wow theres one hell of an if statement in there:

 

if(((((findLengthfast(&rotatetarget)>150&&(i!=0&&k!=0))||(findLengthfast(&rotatetarget)>50&&player[0].rabbitkickragdoll/*currentanimation==rabbitkickanim*/&&(i==0||k==0)))&&normaldotproduct(rotatetarget,player[k].coords-player[i].coords)>0)&&((i==0||k==0)||((player[i].skeleton.oldfree==1&&k!=0&&animation[player[k].currentanimation].attack==neutral)||(player[k].skeleton.oldfree==1&&i!=0&&animation[player[i].currentanimation].attack==neutral)||(player[i].isFlip()&&!player[i].skeleton.oldfree&&(i==0||k==0))||(player[k].isFlip()&&!player[k].skeleton.oldfree&&(i==0||k==0))||(i==0||k==0))))||((player[i].targetanimation==jumpupanim||player[i].targetanimation==jumpdownanim||player[i].isFlip())&&(player[k].targetanimation==jumpupanim||player[k].targetanimation==jumpdownanim||player[k].isFlip())&&(i==0||k==0)&&(!player[i].skeleton.oldfree&&!player[k].skeleton.oldfree)))


#56 Alundra   Members   -  Reputation: 776

Like
1Likes
Like

Posted 27 April 2014 - 05:25 AM

Wow theres one hell of an if statement in there:

You can see a lot of hard coded value in this hell too, this file is a joke from A to Z.

Imagine the scene : "We have to change the jump height value"
Programmer of this file : "WHAT ?!"


Edited by Alundra, 27 April 2014 - 05:25 AM.






PARTNERS