Can you code?

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).

Pages

AuthorTopic: Can you code?
Shock Trooper
Member # 55
Profile Homepage #25
If I could pick one programming language to know, it would be C++. If I could pick two, they would be C++ and COBOL, just to screw people up.

(And I can't code worth a whisker, although I do nice things with PennMUSH softcode and my HTML is fairly good. Neither of those really count, though.)
Posts: 236 | Registered: Wednesday, October 3 2001 07:00
Law Bringer
Member # 2984
Profile Homepage #26
quote:
Originally written by Lord Bob:

If I could pick one programming language to know, it would be C++. If I could pick two, they would be C++ and COBOL, just to screw people up.

(And I can't code worth a whisker, although I do nice things with PennMUSH softcode and my HTML is fairly good. Neither of those really count, though.)

What is COBOL like, actually? I've heard it being referred to, variously, as a spawn of the devil and the ultimate lobotomy, etc etc. But what makes it so bad?

--------------------
Encyclopaedia ErmarianaForum ArchivesForum StatisticsRSS [Topic / Forum]
My BlogPolarisI eat novels for breakfast.
Polaris is dead, long live Polaris.
Look on my works, ye mighty, and despair.
Posts: 8752 | Registered: Wednesday, May 14 2003 07:00
...b10010b...
Member # 869
Profile Homepage #27
COBOL was designed to look as much like natural English as possible, and to make sure that programmers adequately commented their code. The actual effect of both of these "features" is mostly to force people to type lots of long sentences (which still have to be perfectly syntactically correct, of course).

Early COBOL compilers were ridiculously strict about syntax, even to the point of requiring correct capitalisation and indentation, although this has become less true in recent years.

[ Thursday, November 10, 2005 05:15: Message edited by: Cubic Zirconia Cattle Wrangler ]

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Shock Trooper
Member # 4557
Profile #28
quote:
Originally written by Khoth:

C++ doesn't have built-in garbage collection, but you can add one. It's not perfect, but our project is one where manual memory management would be very difficult.
If you don't mind me asking, what exactly is your project about?

quote:

I don't like references because you can't tell whether calling foo(i) will modify i without going and digging into the definition of foo. With foo(&i) it's much clearer.

Careful use of the const keyword can fix this, but is only useful in very high-level programming. I use references mainly to separate single objects that are to be modified, with pointers that are to be themselves modified through pointer arithmetic. In the end it's really just a matter of preference.
Posts: 264 | Registered: Wednesday, June 16 2004 07:00
? Man, ? Amazing
Member # 5755
Profile #29
Try this out. Try to tell the killer coders from the cold-blooded killers.

*this message sponsored by gump enterprises*

--------------------
quote:
Originally written by Kelandon:

Well, I'm at least pretty sure that Salmon is losing.


Posts: 4114 | Registered: Monday, April 25 2005 07:00
Post Navel Trauma ^_^
Member # 67
Profile Homepage #30
Yes, use of const in the function declaration helps, but you still have to go and look at the function declaration.

The project is a compile-to-bytecode-then-interpreter for a scripting language, so if the C++ wasn't garbage collected we'd have to write a garbage collector for the scripting objects.

--------------------
Barcoorah: I even did it to a big dorset ram.

desperance.net - Don't follow this link
Posts: 1798 | Registered: Thursday, October 4 2001 07:00
...b10010b...
Member # 869
Profile Homepage #31
quote:
Originally written by Jumpin' Salmon:

Try to tell the killer coders from the cold-blooded killers.
8/10 on the first try. Pretty impressive considering that I didn't actually recognise any of them.

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Law Bringer
Member # 2984
Profile Homepage #32
6/10. "Avoid a career in law enforcement or IT recruiting".

Damn but some of those coders look psychotic. The killers are the smiling ones.

--------------------
Encyclopaedia ErmarianaForum ArchivesForum StatisticsRSS [Topic / Forum]
My BlogPolarisI eat novels for breakfast.
Polaris is dead, long live Polaris.
Look on my works, ye mighty, and despair.
Posts: 8752 | Registered: Wednesday, May 14 2003 07:00
Shock Trooper
Member # 4557
Profile #33
quote:
The project is a compile-to-bytecode-then-interpreter for a scripting language, so if the C++ wasn't garbage collected we'd have to write a garbage collector for the scripting objects.
That reminds me of an idea I had a while ago for a library that allowed a generic way for creating scripting languages. The basic idea was that you could write a class/function and directly translate it into a primitive/function for the scripting language, by looking at the particular class' operators. I can't remember how much I did, if anything, with this, but I do remember I couldn't find a viable, efficient way to manage memory. Garbage collection would fix this.

[ Thursday, November 10, 2005 21:38: Message edited by: KernelKnowledge12 ]
Posts: 264 | Registered: Wednesday, June 16 2004 07:00
Shock Trooper
Member # 1249
Profile Homepage #34
6/10. Same here, I didn't recognise any of them. Not even the serial killers.
Posts: 259 | Registered: Saturday, June 1 2002 07:00
? Man, ? Amazing
Member # 5755
Profile #35
I got 7/10, but it was luck. I fingered the shotgun wielding Ukranian as a coder, but he looked more like a mountain climber. Nice guy... I do wonder about those coders though, ever heard of a barber?

I am proud to say that I recognized the Son of Sam, I remember my parents got excited when they finally caught the guy. I was more worried about how the Bruins were doing.

*this message sponsored by geekforum.org*

--------------------
quote:
Originally written by Kelandon:

Well, I'm at least pretty sure that Salmon is losing.


Posts: 4114 | Registered: Monday, April 25 2005 07:00
Lifecrafter
Member # 34
Profile Homepage #36
Over the course of about 4 days, I slammed about 266 lines of code into my graphing calculator so it would fill the screen with this:

()()()()()()()()
)()()()()()()()(
()()()()()()()()
)()()()()()()()(
()()()()()()()()
)()()()()()()()(
()()()()()()()()
)()()()()()()()(

Then this:

)()()()()()()()(
()()()()()()()()
)()()()()()()()(
()()()()()()()()
)()()()()()()()(
()()()()()()()()
)()()()()()()()(
()()()()()()()()

and then alternate between the two images for all eternity or until I hit the 'on' button. Needless to say, it was completely worthless and strangely satisfying.

[ Thursday, November 10, 2005 16:44: Message edited by: An error of type -13 occured ]

--------------------
Frisbeetarianism is the belief that when you die, your soul goes up on the roof and gets stuck.

'Spiderweb Software' anagrammmed: 'Word-bereft A**wipe'
Posts: 702 | Registered: Wednesday, October 3 2001 07:00
Master
Member # 4614
Profile Homepage #37
Or to see how big of a matrix of zeros you can fit in the screen.

Anyway, I got 9/10 on that test. Apparently my instincts are better that my observations.

--------------------
-ben4808
Posts: 3360 | Registered: Friday, June 25 2004 07:00
Infiltrator
Member # 5806
Profile Homepage #38
quote:
Originally written by Jumpin' Salmon:

Try this out. Try to tell the killer coders from the cold-blooded killers.

*this message sponsored by gump enterprises*

That was quite easy. I got 8/10.

EDIT: I read psycology on my spare time. My guesses were entirely based on what I learnt from there. Murderers and criminals often act the complete opposite of what they are. Hitler, for example, was a great animal friend. Denial of this kind and of most other, too, are psycological defenses since the truth is too painful and would lead to lost sanity.

[ Thursday, November 10, 2005 23:31: Message edited by: Exiled Eagle - Bats are tasty. ]
Posts: 437 | Registered: Friday, May 13 2005 07:00
Law Bringer
Member # 2984
Profile Homepage #39
However, programmers are actually saints and therefore can pretend to be twisted sickos without any problem. :nods:;

Ouch. It appears I've been coding for so long just now that I get the urge to add a semicolon at the end of a paragraph.;

[ Friday, November 11, 2005 00:44: Message edited by: NaNoWriMo ]

--------------------
Encyclopaedia ErmarianaForum ArchivesForum StatisticsRSS [Topic / Forum]
My BlogPolarisI eat novels for breakfast.
Polaris is dead, long live Polaris.
Look on my works, ye mighty, and despair.
Posts: 8752 | Registered: Wednesday, May 14 2003 07:00
Lifecrafter
Member # 34
Profile Homepage #40
Just for the record, I spent today's Pre-Calc class reprogramming my amazing work to do the same thign with commas and periods instead of parentheses. Where will the amazingness end?

--------------------
Frisbeetarianism is the belief that when you die, your soul goes up on the roof and gets stuck.

'Spiderweb Software' anagrammmed: 'Word-bereft A**wipe'
Posts: 702 | Registered: Wednesday, October 3 2001 07:00
Law Bringer
Member # 2984
Profile Homepage #41
Just out of curiosity, have you thought about asking the teacher to please make the Pre-Calc course a bit more challenging, seeing as you must be bored out of your skull? :P

--------------------
Encyclopaedia ErmarianaForum ArchivesForum StatisticsRSS [Topic / Forum]
My BlogPolarisI eat novels for breakfast.
Polaris is dead, long live Polaris.
Look on my works, ye mighty, and despair.
Posts: 8752 | Registered: Wednesday, May 14 2003 07:00
...b10010b...
Member # 869
Profile Homepage #42
Better still, write programs to simplify common mathematical tasks and then distribute them to your classmates. I became rather popular that way. :P

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Master
Member # 4614
Profile Homepage #43
Or even better, distributing them with games. :D

--------------------
-ben4808
Posts: 3360 | Registered: Friday, June 25 2004 07:00
Lifecrafter
Member # 34
Profile Homepage #44
Sadly, we have a student teacher. :o And so far the only command I've managed to make any sense of is 'output', so I'm making the most of it with gusto. :P

--------------------
Frisbeetarianism is the belief that when you die, your soul goes up on the roof and gets stuck.

'Spiderweb Software' anagrammmed: 'Word-bereft A**wipe'
Posts: 702 | Registered: Wednesday, October 3 2001 07:00
Lifecrafter
Member # 1468
Profile Homepage #45
quote:
Better still, write programs to simplify common mathematical tasks and then distribute them to your classmates. I became rather popular that way.
I did that as well, but I didn't distribute them, mainly because I was one of the few with a graphing calculator. I did a program that converted from decimal to any radix up to 36, and one to convert back, which really helped in electronics class.

--------------------
"We can learn a lot from crayons. Some are short, some are dull, some are sharp, some are tall. Some have funny names and they are all different colors, but they all learn to live in the same box."

"Happy is the man that has wisdom and gets discernment. For having wisdom as gain is better than having silver as gain and having wisdom as produce is better than gold itself" Proverbs 3:14-3:15

The horrible part about life is, you'll never get out of it alive.

Currently boycotting: AngelFire, GameFAQ's, Macintosh PC's
Posts: 818 | Registered: Tuesday, July 9 2002 07:00
Law Bringer
Member # 2984
Profile Homepage #46
Did the same for some physical formulas (gas laws, gravity, etc.) but apparently there was little demand for that. They were pretty useful, especially since we could use them in exams.

--------------------
Encyclopaedia ErmarianaForum ArchivesForum StatisticsRSS [Topic / Forum]
My BlogPolarisI eat novels for breakfast.
Polaris is dead, long live Polaris.
Look on my works, ye mighty, and despair.
Posts: 8752 | Registered: Wednesday, May 14 2003 07:00
...b10010b...
Member # 869
Profile Homepage #47
I've written a program to solve quadratic equations, and another to divide a cubic polynomial by a linear one (that one was tricky to write and I never used it much; I did it mostly because I was so pleasantly surprised to realise I could actually figure out a way to do it at all). Unfortunately both were lost to me when my graphing calculator was stolen. Ah well; I no longer have any particular need for it anyway.

[ Sunday, November 13, 2005 18:12: Message edited by: Thuryl ]

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Law Bringer
Member # 2984
Profile Homepage #48
Someone stole your graphic calculator? I mean, the only reason people even looked at mine a bit oddly was that it was shaped a bit like some kind of gameboy.

That led to a lot of strange questions in trains.

"Hey, what game are you playing?"

"I am trying to write a program to calculate the relative probabilities of any outcome when throwing a given number of dice x with a certain number of sides y."

"Uh... huh."

I never did manage to write that program, by the way. It was practically impossible to do without arrays (or at least a thousand times as difficult), and if arrays are even available in BASIC, I did not know how to make one. However, it was the first program I wrote in Java after "Hello world". :D

[ Sunday, November 13, 2005 22:13: Message edited by: NaNoWriMo ]

--------------------
Encyclopaedia ErmarianaForum ArchivesForum StatisticsRSS [Topic / Forum]
My BlogPolarisI eat novels for breakfast.
Polaris is dead, long live Polaris.
Look on my works, ye mighty, and despair.
Posts: 8752 | Registered: Wednesday, May 14 2003 07:00
...b10010b...
Member # 869
Profile Homepage #49
quote:
Originally written by NaNoWriMo:

Someone stole your graphic calculator?
My own damned fault. I inadvertently left a pencilcase with the calculator in it under my seat after a lecture. I guess whoever found it decided against handing it in to the lost property office.

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00

Pages