Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Counter.java

Name: Anonymous 2014-09-04 11:02

why the fuck do retards have to invent a goddamned class just to use a goddamned integer? have people no shame?

Counter.java

/**
* A simple counter class that can be initialized to
* a specific value, incremented, and cleared.
* @author Owen Astrachan
*/

public class Counter
{
int myCount;

/**
* Construct a counter whose value is zero.
*/
public Counter()
{
myCount = 0;
}

/**
* Construct a counter with given initial value.
* @param init is the initial value of the counter
*/

public Counter(int init)
{
myCount = init;
}

/**
* Returns the value of the counter.
* @return the value of the counter
*/
public int getValue()
{
return myCount;
}

/**
* Zeros the counter so getValue() == 0.
*/
public void clear()
{
myCount = 0;
}

/**
* Increase the value of the counter by one.
*/
public void increment()
{
myCount++;
}

/**
* Return a string representing the value of this counter.
* @return a string representation of the value
*/

public String toString()
{
return ""+myCount;
}
}

Name: Cudder !MhMRSATORI 2014-09-07 13:42

>>29,31
votes[candidate]++;

OOP and the rest of that ENTERPRISE BULLSHITE is in some way really clever; it makes it far easier for many people to get paid doing what looks like really productive work. It's a great method of expanding work to keep people employed at all costs. A single person with a few days would probably be enough to write the whole software for a voting machine, at very little cost, but when the job is given to some huge company it ends up turning into a bloated monstrosity "requiring" tens or even hundreds of people over months or years and going overbudget, and the product still contains bugs!

You don't even need a database to count votes; assuming there are less than 257 candidates in any single vote, the largest country in the world still requires less than 2GB if every single person in it (and that's including people who can't vote) got a byte to put their choice in.

The costs of running a database - which probably means licensing fees, server costs (disk, OS, power, etc.), and a team of overpaid DBAs and "developers", can be replaced by a single memory device costing less than $10.

Of course they'll probably complain and give all sorts of reasons why a database is "needed", but that's just because they're desperate to keep their jobs... no, I think a DB is absolutely NOT needed for this application. Vote data is vote data. It's created to be counted. It doesn't need anywhere near the processing flexibility that a database gives.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List