HN user

rertrree

18 karma
Posts0
Comments13
View on HN
No posts found.

Don't correlate creating games with money. He was really lucky; there were other very similar games on the scene at that time, his just happened to stick.

The observation should really be: creating anything interesting gives you potential to be wealthy.

I'd be careful if I were him. His income is gone as far as I know. Unless he does some smart investing with the current cash reserve he could be broke in ~10 years.

Just an interesting observation; Minecraft was sold for 2.5B $, let's assume Notch got 1.5B $ out of it. Buying that house alone cost him 5% of his entire wealth.

Windows are getting better and better.

95/98 crashed all the time, xp crashed if you really tried. Windows 7 hasn't crashed once after two years of daily usage, and/or keeping it running without a restart for months. Even when the system locks up due to user abuse( me ), and would require a reboot on anything older, you just wait a minute and it recovers.

You assumption that a separate case that prints fizzbuzz will break the code is not correct. With correct code, you get three if checks either way, but the readability is higher, code complexity is lower and cases are nicely separated.

  bool is3 = i%3 == 0 ;
  bool is5 = i%5 == 0 ;	
  
  if( is3 && is5 )
  {
  	printf("fizzbuzz\n") ;
  }
  else if( is3 )
  {
  	printf("fizz\n") ;
  }
  else if( is5 )
  {
  	printf("buzz\n") ;
  }
  else
  {
  	printf("%d\n" , i ) ;
  }

This is equivalent code in C if anyone is interested.

  #include <stdio.h>
  #include <stdlib.h>

  const char* table[] = { "%d\n" , "Fizz\n" , "Buzz\n" , "FizzBuzz\n" } ;

  void E( int i )
	{
	    exit( 0 ) ;
	}

  void F( int i )
	{
	        size_t c = !( i%3 ) + !( i%5 )*2 ;
		printf( table[c] , i ) ;
	}

  void ( *func[2] )( int ) = { F , E } ;

  int main( void )
	{
		int p = 1 ;
		while( 1 )
		{
			func[p/102]( p++ ) ;
		}

		return 0 ;
	}
This of course only avoids conditional branches.

EDIT: I just noticed I have undefined behavior in my code.

Bonus internet points for the first one to point it out!

I suggest you read on North Korean military equipment, supplies and operational readiness.

It is all about the details:

They have the largest submarine force in the world; but every one of them is an outdated diesel-electric.

They have a couple hundred fighter airplanes, but their trained pilots get 10-20 hours of practice every year.

And so on...

They aren't capable of a prolonged attack as they don't have enough food( literally ). At best they can defend for a long time and cause a lot of collateral damage with chemical weapons and short range nukes, which is enough to keep their enemies away.

The future of transportation is; separate different modes of transportation as much as possible.

When I was younger, I was regularly biking in between the car lanes( sometimes very risky ), skipping the bicycle paths since they were much slower or simply missing. I would almost always get there before I would with a car or a bus, and parking wasn't a problem. If the lanes were completely separated this could be done safely.

From my experience the roundabouts where the bicycle lane isn't separated, are the least safe for bicyclists, out of any type of intersection. I think the cause is that apart from normal intersections with stop signs or lights, where stopping is the usual procedure, the roundabouts are fluid where drivers stop much less and thus "prefer" not to stop or just think they have the right of way.