Oh no

From Juneday education
Jump to: navigation, search

This page contains the worst mistakes or delibarate stupidities we've encountered related to programming. If you feel pointed out, you have every right to feel that. But at least we don't have your name here. This page is named after a great Frank Zappa song called "Oh no" on the album Weasels Ripped My Flesh - go check it out now!


In a course where we were giving guest lectures a while ago the students had been told that client/server could be achieved by putting two classes in different Java packages. We argued a bit about it with the other teachers and told the students our version. We agreed to disagree....

But, come on! Really! Packages "simulating client/server". This will not do.

Let's discuss this a bit. Every Java class using String, which can be found in the package java.lang would be in a client server relation. We certainly do not agree that the following code has anything to do with client/server:

public class Main {
  public static void main(String[] args) {
    String s = "Are you kidding me";

Note: in the code above, even if you're avoiding to use a package name which makes your class default to the nameless package, your class, Main, and String are in different packages.

Simulate a LinkedList with an ArrayList

Empty objects

'An array is initialized with empty objects'