News for hackers. Stuff that matters.

gregzav

Re:Google I/O Live Stream on Tuesday May 10, 2011 @12:45PM (#2533141)
Works for me from the UK
Re:Microsoft to buy Skype for $7 billion on Tuesday May 10, 2011 @05:26AM (#2531917)
Selling my Microsoft shares... Bought them a year ago thinking they could at least make one step in the right direction.
Re:How Effective are Technical Interviews? on Thursday February 03, 2011 @03:28PM (#2176649)
I'm a Java person, but I forced myself to implement it in C.

  #include <stdio.h>
  
  int main() {
  	int integer = -1231232342;
  	int negative = integer < 0 ? -1 : 1;
  	integer = integer * negative;
  	char c[11];
  	int index = 0;
  	while(integer != 0) {
  		int position = integer % 10;
  		c[index++] = 48 + position;
  		integer = integer / 10;
  	}
  	if(negative == -1)
  		c[index++] = '-';
  	int swap = 0;
  	while(swap < index / 2) {
  		char t = c[swap];
  		c[swap] = c[index - swap - 1];
  		c[index - swap++ - 1] = t;
  	}
  	printf("%s\n", c);
  	return 10;
  }