you are viewing a single comment's thread
view the rest of the comments
[–] 44 points 2 years ago* (4 children)

My Java classes at uni:

Here's a piece of code that does nothing. Make it do nothing, but in compliance with this design pattern.

When I say it did nothing, I mean it had literally empty function bodies.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 25 points 2 years ago* (last edited 2 years ago)

    Yeah that's object oriented programming and interfaces. It's shit to teach people without a practical example but it's a completely passable way to do OOP in industry, you start by writing interfaces to structure your program and fill in the implementation later.

    Now, is it a good practice? Probably not, imo software design is impossible to get right without iteration, but people still use this method... good to understand why it sucks

  • source
  • parent
  • [–] 8 points 2 years ago (1 child)

    So what? You also learn math with exercises that 'do nothing'. If it bothers you so much add some print statements to the function bodies.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 2 years ago

    Mine were actually useful, gotta respect my uni for that. The only bits we didn't manually program ourselves were the driver and the tomcat server, near the end of the semester we were writing our own Reflections to properly guess the object type from a database query.

  • source
  • parent