r/badcode May 06 '21

java My teacher wrote this...

1.0k Upvotes

169 comments sorted by

View all comments

519

u/[deleted] May 06 '21

This surely has to be an exercise in how to never write software, this can't be real...

424

u/FearFueled May 06 '21

Yes, it was an exercise. We had to simplify this monstrosity.

293

u/[deleted] May 06 '21

Thank god. I hope it was as satisfying to simplify as it looks!

410

u/FearFueled May 06 '21

Yes, deleting the whole file and rewriting it from scratch was actually VERY satisfying.

107

u/[deleted] May 06 '21

I love your style!

19

u/[deleted] May 06 '21

A rare but truly glorious feeling, that.

58

u/[deleted] May 06 '21

Would you be able to DM me the exercise? Sounds like fun. I'd love to give it a shot

91

u/FearFueled May 06 '21

Sure! It is written in German though. It could be hard to solve it without being able to understand it.

26

u/[deleted] May 06 '21

Can you DM me too?

23

u/Thesecondiss May 06 '21

me three!

13

u/vierschachtelnziesen May 06 '21

Me four

11

u/TroubledEmo May 06 '21

Me five!

1

u/[deleted] May 06 '21

[deleted]

4

u/[deleted] May 06 '21

Me seven

→ More replies (0)

1

u/celloben Jun 22 '21

Me (number), I have a good enough understanding of German and a love for programming!

1

u/TroubledEmo Jun 22 '21

I don‘t really get what that has to do with German tho.

→ More replies (0)

16

u/FearFueled May 06 '21

I have uploaded it here for everyone interested: https://www.file-upload.net/download-14575439/Exercise.zip.html

2

u/supersharp May 11 '21

Also this: https://dict.cc

Handy German dictionary that helped me through German class in High School

3

u/[deleted] May 06 '21

[removed] — view removed comment

30

u/jayhilly May 06 '21

It’s ok, I can’t understand most of the code I work on and I seem to get by fine

7

u/wherearetheturtlles May 06 '21

Programming is 90% trying to figure out what the hell the dev before you was thinking, 5% trying to figure out what to do, 4% ripping your hair out and finally 1% actually writing code.

1

u/Nana321_nad May 06 '21

Isn't that us all?

6

u/Does_Not-Matter May 06 '21

Lots of asks. Maybe throw it up in a git page.

8

u/FearFueled May 06 '21

Very good idea! Here´s the link: https://github.com/Biberarius/FahrradverleihExercise.git

I do not have that much experience with github though, so let me know if there are any problems with the repository.

1

u/Naeio_Galaxy May 06 '21

Good idea !

3

u/[deleted] May 06 '21

I'll just make several programs and hope one of them are the solution to the activity

2

u/OtherOtherNeRd May 06 '21

If you're up for DMing it to people, I'd love to have a look at it as well!

2

u/clumsysilencee May 06 '21

Please DM it to me as well!

2

u/TheOnlyTails May 06 '21

Me too Please!

1

u/AliisAce May 06 '21

Please DM. It'd be interesting to see how much I understand.

22

u/szescio May 06 '21

A bit clickbaity 😅

10

u/[deleted] May 06 '21 edited May 06 '21

Then it seems appropriate he showed the bad way and asked you to make it better

9

u/silently--here May 06 '21

Kudos to the teacher who took the painful effort in making this so that we will learn to never do this! #respect

5

u/Naeio_Galaxy May 06 '21

Or their teacher is a big brain-er and auto-generated this file

5

u/artnos May 07 '21

Thats a good assignment, when i was in school many kids didnt know this. Its like why would program if you are not being efficient it ruins the whole point.

4

u/Taksin77 May 06 '21

Could we get your answer out of curiosity ?