Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Mesothelioma
Jan 6, 2009

Your favorite mineral related cancer!
There is so much wrong with that chunk of code I don't even know where to begin. Who wrote that?

Adbot
ADBOT LOVES YOU

Mesothelioma
Jan 6, 2009

Your favorite mineral related cancer!
I"m a pretty new programmer, but couldn't poor design be a reason why minecraft runs like garbage? I don't think notch ever expected to add this many features to his game in the first place.

Mesothelioma
Jan 6, 2009

Your favorite mineral related cancer!
I'm really curious to see how the port of minecraft to the 360 will run.

Mesothelioma
Jan 6, 2009

Your favorite mineral related cancer!
I just found out that changing the screen orientation on android closes the app. Welp

Mesothelioma
Jan 6, 2009

Your favorite mineral related cancer!

bucketmouse posted:

I did a very bad thing today. This is in response (revenge?) to a person wanting me to write him a shell that uses fork() for Totally Not A School Assignment.

Why did you write this?

Mesothelioma
Jan 6, 2009

Your favorite mineral related cancer!
Every time I look at my buddy's methods he ALWAYS returns the object Boolean instead of a regular boolean. When I ask him why he uses the object instead of the primitive he stares blankly at me.

Adbot
ADBOT LOVES YOU

Mesothelioma
Jan 6, 2009

Your favorite mineral related cancer!

Optimus Prime Ribs posted:

On different forums I post on I convinced another dude to learn Python, and as an exercise to help him learn he wrote a function for determining if a given number is prime.
That's all well and good, but the solution he came up with is something else:
Python code:
def isPrime(num):
        primeCount = 0
        notPrimeCount = 0
        prime = 0
        for i in range(2,num - 1):
                if num % i == 0:
                        notPrimeCount += 1
                if num % i != 0:
                        primeCount += 1
 
        if notPrimeCount == 0:
                prime = "Prime"
        else:
                prime = "Not Prime"
 
        return prime
 
print isPrime(4)
I get that the guy is still learning Python, but Jesus Christ, how the hell do people think like this? :psyduck:
It's even worse because the guy is apparently employed as a programmer somewhere (according to him, that is).

Why not just link him to code academy?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply