10
neeno
4y

(inspired by another rant I read here)

Last semester we were learning Java in the Programming Fundamentals class and a friend of mine asked for help with an assignment.

The objective was to make a virtual store (as a console app) in which the user would be able to select a few products, customize some of them and then the program would print out a receipt, with a list of all products, their prices, and the total cost.

Simple enough I thought, but there was a catch: you were not allowed to use arrays because the teacher hadn't taught that to the class yet. So I was like "how the fuck are you supposed to do this then?". Turns out the way to do it was to just append text to a string in order to generate the receipt. This is stupidly simple, so stupid that it didn't even cross my mind.

It's just that it's an awful way to architecture your code, it's just plain shit. Sure, if you're learning programming that's completely ok, but using that code on production is just completely unfeasible and I think that's why it didn't even cross my mind to do it this way. I'm just constantly worrying about performance and good code architecture and organization that the simplest of all solutions slipped my mind. When I finally discovered the way the teacher wanted us to do it I just wanted to kill myself...

Comments
  • 2
    Yeah there are classes where they tell you to do a thing because it is time to do a thing....even though it's kinda pointless until the next chapter...

    Sometimes half way doing something wonky is a path to understanding, other times it is just stupid.

    Like even a basic array introduction...like man just do that.
  • 2
    My Teacher is great. Really he is.
    Except he only teaches the pseudocode and algorithms and not. The. Fucking. SYNTAX.

    Nobody in my Java Course has any idea how to write a main method.
    They don't even know what a fucking String is and therefore would fail at your course task as well.

    I mean why the fuck would you just grab a StringBuilder and just constantly .append("garbage"); ?
    I DON'T GET YOUR TEACHER
  • 1
    It might cause problems if you want to delete an item from middle, so, simple is not always best (or scalable)
Add Comment