# Learn to code!!!!

**URL:** <https://boards.straightdope.com/t/learn-to-code/94358>\
**Category:** The BBQ Pit\
**Created:** [November 20, 2001, 7:22am UTC](https://boards.straightdope.com/t/learn-to-code/94358 "2001-11-20T07:22:18Z")\
**Posts on this page:** 18\
**Page:** 2

<div class="post-metadata">

**Author:** ![Ferrous](https://avatars.discourse-cdn.com/v4/letter/f/8e7dd6/32.png) [@Ferrous](https://boards.straightdope.com/u/Ferrous)\
**Post date:** [November 21, 2001, 12:10am UTC](https://boards.straightdope.com/t/learn-to-code/94358/21 "2001-11-21T00:10:19Z")

</div>

::slaps **thinksnow** with glove::

Suh, you have insulted mah honuh. Ah _demand_ satisfaction.

---

<div class="post-metadata">

**Author:** ![thinksnow](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/thinksnow/32/2849_2.png) [@thinksnow](https://boards.straightdope.com/u/thinksnow)\
**Post date:** [November 21, 2001, 2:37am UTC](https://boards.straightdope.com/t/learn-to-code/94358/22 "2001-11-21T02:37:40Z")

</div>

Renderings at 10-paces?

---

<div class="post-metadata">

**Author:** ![Ferrous](https://avatars.discourse-cdn.com/v4/letter/f/8e7dd6/32.png) [@Ferrous](https://boards.straightdope.com/u/Ferrous)\
**Post date:** [November 21, 2001, 5:43pm UTC](https://boards.straightdope.com/t/learn-to-code/94358/23 "2001-11-21T17:43:30Z")

</div>

D’oh! You have bested me, sir, as I cannot render worth a damn. Don’t suppose you’d settle for 3-view structural steel equipment stand design? Piping diagrams at dawn?

---

<div class="post-metadata">

**Author:** ![UncleBeer](https://avatars.discourse-cdn.com/v4/letter/u/977dab/32.png) [@UncleBeer](https://boards.straightdope.com/u/UncleBeer)\
**Post date:** [November 21, 2001, 6:18pm UTC](https://boards.straightdope.com/t/learn-to-code/94358/24 "2001-11-21T18:18:34Z")

</div>

> [@](#):
>
> Microstation is a _real_ CAD tool.

Then explain those flippin’ plot driver text files. And why in the name of Christ, would anyone ever want so many friggin’ dialog boxes open at once? I spend most of my Microstation time just moved those goddamned things around so I can see my work. And I’m usin’ a _two_-monitor system.

In my not so fucking humble opinion, you simply can’t beat AutoCAD’s command line. Of course, they’ve fucked up AutoCAD now, too with Release 2002. R14 was the last decent one.

---

<div class="post-metadata">

**Author:** ![thinksnow](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/thinksnow/32/2849_2.png) [@thinksnow](https://boards.straightdope.com/u/thinksnow)\
**Post date:** [November 21, 2001, 6:26pm UTC](https://boards.straightdope.com/t/learn-to-code/94358/25 "2001-11-21T18:26:47Z")

</div>

Very well, thank you.

Yeah, in truth, I never cared for all the open windows, either. FWIW, I did like R14, too, but we were saddled with Bentley, so you work with what ya got. Something about inaccurate layering conversions or something…it’s been a while, but I blame the Brits, since they ran the show (until they closed the office, that is.)

---

<div class="post-metadata">

**Author:** ![Why\_A\_Duck](https://avatars.discourse-cdn.com/v4/letter/w/13edae/32.png) [@Why\_A\_Duck](https://boards.straightdope.com/u/Why_A_Duck)\
**Post date:** [November 21, 2001, 6:30pm UTC](https://boards.straightdope.com/t/learn-to-code/94358/26 "2001-11-21T18:30:01Z")

</div>

Bah. Real designers use CATIA.

---

<div class="post-metadata">

**Author:** ![Ferrous](https://avatars.discourse-cdn.com/v4/letter/f/8e7dd6/32.png) [@Ferrous](https://boards.straightdope.com/u/Ferrous)\
**Post date:** [November 21, 2001, 6:38pm UTC](https://boards.straightdope.com/t/learn-to-code/94358/27 "2001-11-21T18:38:18Z")

</div>

> [@](#):
>
> Of course, they’ve fucked up AutoCAD now, too with Release 2002. R14 was the last decent one.

Amen. We just switched over to 2002 from R14. I want my R14 back! (Although I do like to be able to have multiple drawings open in one session.)

---

<div class="post-metadata">

**Author:** ![Shayna](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/shayna/32/17976_2.png) [@Shayna](https://boards.straightdope.com/u/Shayna)\
**Post date:** [November 21, 2001, 6:46pm UTC](https://boards.straightdope.com/t/learn-to-code/94358/28 "2001-11-21T18:46:58Z")

</div>

> [@](#):
>
> Wanna see what it looks like when I try too hard to multitask ?
> 
> \<screendump\>  
> as01proll.stg#conf t  
> Enter configuration commands, one per line. End with CNTL/Z.  
> as01proll.stg(config)#router eigrp 40  
> as01proll.stg(config-router)#I love you RIGHT back  
> ^  
> % Invalid input detected at ‘^’ marker.
> 
> as01proll.stg(config)#  
> \<screendump ends\>
> 
> - my router doesn’t love me, sniff…

But _I_ sure do. 🙂 hehehe

---

<div class="post-metadata">

**Author:** ![Bill\_H](https://avatars.discourse-cdn.com/v4/letter/b/a5b964/32.png) [@Bill\_H](https://boards.straightdope.com/u/Bill_H)\
**Post date:** [November 22, 2001, 11:11am UTC](https://boards.straightdope.com/t/learn-to-code/94358/29 "2001-11-22T11:11:40Z")

</div>

May I recommend [http://www.ioccc.org](http://www.ioccc.org)?

---

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [November 23, 2001, 12:22pm UTC](https://boards.straightdope.com/t/learn-to-code/94358/30 "2001-11-23T12:22:39Z")

</div>

Your Beerness, that was simply … mindblowing. Huge. Complex. Your parenthesis keys must be worn to tiny little nubbins, barely able to perform their assigned duties.

Here’s mine!

```auto

#!/usr/bin/perl -w

use strict;

my $O0O = "I love freedom";
my $OO0 = "I love you!
";
my $nope = "untrue";

# Yeah, the program is patriotic and loving. Or is it?

unless (!($nope)){
   if ($O0O =~ /^.\b/){
      my $l1 = "Fuck";
   if ($OO0 =~ /\b.$/){
      my $I1 = "you";
   my $O0O = $l1 . I1;
}

print $O0O;

```

What will it print?

😃

---

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [November 23, 2001, 12:29pm UTC](https://boards.straightdope.com/t/learn-to-code/94358/31 "2001-11-23T12:29:32Z")

</div>

Those variable names were meant to be difficult, not impossible. Read my code in Times New Roman or another typeface that makes clearer the distinction between uppercase Os and zeros and lowercase ls and ones.

(Neat fact: In Perl, variable names can’t start with numbers.)

---

<div class="post-metadata">

**Author:** ![Heath\_Doolin](https://avatars.discourse-cdn.com/v4/letter/h/5f9b8f/32.png) [@Heath\_Doolin](https://boards.straightdope.com/u/Heath_Doolin)\
**Post date:** [November 23, 2001, 6:46pm UTC](https://boards.straightdope.com/t/learn-to-code/94358/32 "2001-11-23T18:46:16Z")

</div>

God I have no life

I am cackling at the coding here and someone came up, looked at it and said “What the hell is so funny?”

---

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [November 24, 2001, 12:41am UTC](https://boards.straightdope.com/t/learn-to-code/94358/33 "2001-11-24T00:41:53Z")

</div>

Damn. I really should have used some text editor that checked for dumb stuff like leaving out curly brackets.

I really should have been sleeping at 5:30 AM, too, instead of writing really weird Perl.

😃

---

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [November 24, 2001, 9:32pm UTC](https://boards.straightdope.com/t/learn-to-code/94358/34 "2001-11-24T21:32:22Z")

</div>

Here’s my debugged code:

```auto

#!/usr/bin/perl -w

use strict;

my $l1;
my $I1;

my $O0O = "I love freedom";
my $OO0 = "I love you!
";
my $nope = "untrue";

# Yeah, the program is patriotic and loving. Or is it?

unless (!($nope)){
   if ($O0O =~ /^.\b/){
      $l1 = "Fuck";}
   if ($OO0 =~ /\b.$/){
      $I1 = "you";}
   my $O0O = $l1 . I1;
}

print $O0O;

```

It functions as intended, so Perl freaks, set your scopes on it.

😃

---

<div class="post-metadata">

**Author:** ![Monocracy](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/monocracy/32/4493_2.png) [@Monocracy](https://boards.straightdope.com/u/Monocracy)\
**Post date:** [November 24, 2001, 10:48pm UTC](https://boards.straightdope.com/t/learn-to-code/94358/35 "2001-11-24T22:48:00Z")

</div>

Let’s go back to the BASICs

```auto

10 LPRINT "I hate my boss."
20 GOTO 10

```

---

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [November 24, 2001, 11:22pm UTC](https://boards.straightdope.com/t/learn-to-code/94358/36 "2001-11-24T23:22:45Z")

</div>

**Monocracy** :  
What dialect of Basic are you using? First, I’ve never heard of LPRINT, and second, your program needs a third line: “30 END”, even though control is never passed there.

I used GW-BASIC back when I used Windows 3.1.1. I messed around with Q-Basic, but I’ve never gotten comfortable in it. And, of course, my TI-83 and my Casio both use their own idiomatic Basic dialects. 🙂 I’ve never heard of LPRINT, and In GW-BASIC, and your code looks like GW-BASIC code, all programs need an END statment, even if it is superfluous.

---

<div class="post-metadata">

**Author:** ![JimOfAllTrades](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@JimOfAllTrades](https://boards.straightdope.com/u/JimOfAllTrades)\
**Post date:** [November 25, 2001, 12:33am UTC](https://boards.straightdope.com/t/learn-to-code/94358/37 "2001-11-25T00:33:19Z")

</div>

Derleth:

> [@](#):
>
> Monocracy:  
> What dialect of Basic are you using? First, I’ve never heard of LPRINT, and second, your program needs a third line: “30 END”, even though control is never passed there.

**Monocracy’s** code runs fine as is under QBasic. The LPRINT is the line print command, it dumps output to the DOS print device instead of the screen. And QBasic seems to assume the END statement if it isn’t explicitly in the code.

Ugly

---

<div class="post-metadata">

**Author:** ![SDP](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@SDP](https://boards.straightdope.com/u/SDP)\
**Post date:** [November 25, 2001, 12:33am UTC](https://boards.straightdope.com/t/learn-to-code/94358/38 "2001-11-25T00:33:43Z")

</div>

```auto

.data

msg:
        .string "Fuck you!
"
        len = . - msg

.text
    .global _start
	
_start:

        movl $len,%edx
        movl $msg,%ecx
        movl $1,%ebx
        movl $4,%eax
        int $0x80
        movl $0,%ebx
        movl $1,%eax
        int $0x80

```

[Previous page](https://boards.straightdope.com/t/learn-to-code/94358.md?page=1)
