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

Pages: 1-

My goal is to annoy other programmers

Name: Anonymous 2010-06-13 16:34

I bet some of you do this, too.

In my C code, I use C++ keywords for my variable names whenever I can. I'll use variable names like "private" and "catch" in header files, so they can't be included in C++ code. I name my variables "old" and "new", or "this" and "that". I also deliberately skip casts in situations where they'd be perfectly ok in C but invalid in C++.

If I do have to use C++, I make sure to use every possible feature of the language. I strive to systematically piss off anyone who forces me to deal with C++, so that everyone else quits. Then, I will rewrite the entire system in straight C, cut the codebase to a quarter of the size, and make it ten times more readable.

For very large tasks, I will first design a sexp-based domain-specific language, and then proceed to write the entire project in that language. I will make sure that it is slightly different from every existing Lisp implementation, because my boss might have read somewhere that Lisp was antiquated and inefficient.

I am the programmer that employers hate.

Name: Anonymous 2010-06-13 16:39

I heard that a previous developer that left before I joined a company I once worked for had used char vectors as strings and made cunt and penis objects

Name: Anonymous 2010-06-13 16:40

If your code is efficient, and you write it fast, what is the issue?

If you get shit done, nobody should care.

Name: Anonymous 2010-06-13 16:46

If your code is efficient, and you write it fast, what is the issue?
What about correctness? If he wrote his program incorrectly, it doesn't matter how efficient it is. A bug is a bug, and trying to translate code from retarded to normal just to give yourself a chance of finding it is annoying.

Name: Anonymous 2010-06-13 16:47

>>4
I would file that under 'get shit done'. If you both do this and write bad code then you are just an asshole.

Name: Anonymous 2010-06-13 17:00

>>5
I write test cases, so I know my code works.

I have found that, for some reason, using a test that they didn't bother writing to show people that their code is broken tends to annoy them. It's nice, because these are the very same sort of lazy programmers that I would love to get rid of.

Name: Anonymous 2010-06-13 17:18

I'd say I write Lisp in braces but you'd all know I'm lying because Lisp isn't used in the real world.

Name: Anonymous 2010-06-13 17:35

I write test cases, so I know my test cases pass.
[/pedantry]

Name: Anonymous 2010-06-13 17:38

C with C++ keywords
Solved with a simple parser/variable renamer.
abusing SEPPLES
Good job wasting your time. I hope you enjoy maintaining it, oh wait, you said you're going to rewrite it in straight C, which brings us to the first point.
Sexp-based languages
Most of the code I write is in CL, I have no problem with this, but I do think it's overkill to invoke Greenspun's rule that much. Using a real Lisp will give you much better performance, not to mention that you'll be able to take advantage of existing libraries and the excellent macro support and other language features which you'd have to write from scratch.

Name: Anonymous 2010-06-13 18:18

I don't know how to write tests :|  I want to learn though.  I just don't understand it or something.

Name: Anonymous 2010-06-13 19:22

>>1
I lol'd.
But wouldn't extern "C" { ... } solve the problem with C++ keywords?

Name: Anonymous 2010-06-13 21:03

>>9
Refactoring tools are beyond the realm of the typical idiot code-monkeys who fawn over Sepples like it's the fucking second coming of Jesus. I'd use Scheme where applicable; it's typically not installed and beyond the realm of familiarity of those calling the shots to what gets installed and used.

>>11
No:


$ cat main.cc
#include <iostream>
extern "C" {
#include "other.h"
};
int main(int argc, char **argv) {
    std::cout << other(1, 2, 3, 4) << std::endl;
    return 0;
}

$ cat other.h
int other(int this, int that, int new, int old);
$ cat other.c
int other(int this, int that, int new, int old) {
    return this + that + new + old;
}

$ gcc -Wall -c other.c
$ g++ -Wall -c main.cc

In file included from main.cc:4:0:
other.h:1:15: error: expected ‘,’ or ‘...’ before ‘this’
main.cc: In function ‘int main(int, char**)’:
main.cc:10:38: error: too many arguments to function ‘int other(int)’
other.h:1:5: note: declared here

Name: Anonymous 2010-06-13 21:59

>>12
Oh.
But what's with that .cc, shouldn't it be .cpp?

Name: Anonymous 2010-06-13 22:31

Name: Anonymous 2010-06-13 23:51

>>13
.cc is way more elegant.

Name: Anonymous 2010-06-14 0:15

>>13
What's with that .cpp, shouldn't it be .c++?

Name: Anonymous 2010-06-14 0:18

>>16
Sepples developers only develop on broken filesystems.

Name: Anonymous 2010-06-14 0:21

>>16
Not all OS's support the “+” within the filename.

Name: Anonymous 2010-06-14 0:27

>>18
Please learn the difference between operating systems and filesystems.

Name: Anonymous 2010-06-14 0:34

>>19
File-systems are generally considered part of the Operating Systems.

Name: Anonymous 2010-06-14 0:37

>>20
About as much as drivers are.

Users can write drivers just as well.

Name: Anonymous 2010-06-14 0:38

>>21
Now you have two problems.

Name: Anonymous 2010-06-14 0:41

>>20
Only by morons. If I use NTFS I can't use + in my filenames, but if I use ext3 on the exact same operating system, I can. Which filesystem makes Linux Linux and OpenBDSM OpenBDSM?

Name: Anonymous 2010-06-14 0:54

>>13,15,16
Technically, it should be .C, case-sensitive.

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