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

Most C programmers are faggots

Name: Anonymous 2012-01-29 19:36

I'm getting really irritated at a lot of self proclaimed C programmers for abusing the fuck out structures and pointers. It's easy to get out of hand and make your code look like shit and it seems people want to do it even when it's not necessary. The problem is even a lot of legitimately experienced C programmers do the same shit. Go look at the source to your favorite software written in C.

A good example is that stupid dubs checker thread that faggot just made. It should be written like this


#include <stdio.h>

#define base 10

int check(int i, int b) {
  return(i%b == (i/b)%b);
}

int main(void) {
  int i = 1;
 
  while(i++ < 100)
    if(check(i, base))
      puts("nice dubs bro");
     
  return(0);
}

Name: Anonymous 2012-01-30 7:06

I am the guy who did the checker yesterday.

While the formula i%b == (i/b)%b is a *very* nice hack, what if I want to include trips and quads later? While it is flexible by accepting any given base, it's only a boolean for answer. NOT what I had in mind. I had in mind telling what the number might be too, not just saying "hey, there's dubs in base 13. to find it, go fuck yourself".

My solution unites the hackish of dealing with basic pointers and structures with ENTERPRISE level possibilities of expanding. With basically a little loop and a pointer change, the program is able to see dubs, trips, quads... The user name it.

All in my first program in pure C. Sorry if it isn't a compiler.

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