• Welcome to the new Internet Infidels Discussion Board, formerly Talk Freethought.

The Programming Thread

For me, the sheer beauty of some computer programs has often been as important as their utility, or the fact that they could earn me my bread and butter.
For example, if you've never seen it before, are you amazed that the following  FRACTRAN program prints out the entire sequence of prime numbers?

17/91, 78/85, 19/51, 23/38, 29/33, 77/29, 95/23, 77/19, 1/17, 11/13, 13/11, 15/14, 15/2, 55/1.​
 
I started programming in the mid 1960's and it has been both my profession and hobby ever since. (I've also designed digital circuits — somewhat similar to low-level coding — and troubleshot mainframes — somewhat similar to debugging complex software systems.) I've worked in a variety of domains, especially kernels, device drivers, and image processing. Toward the end of my career I was an algorithm designer — my "deliverables" were patent applications, not code. Now I've been retired for several years but still dabble at coding quite a bit.

I've written code in over a dozen different machine languages, if custom microcodes are included. My high-level language repertoire is much more limited. I learned C in 1980 and it quickly became, and remains, my favorite language. (I don't like Javascript but have written some for my personal hobbyist website.)
Javascript ain't so bad once you realize it's only suppose to look like Java, but it's actually more similar to LISP.
 
I started programming in the mid 1960's and it has been both my profession and hobby ever since. (I've also designed digital circuits — somewhat similar to low-level coding — and troubleshot mainframes — somewhat similar to debugging complex software systems.) I've worked in a variety of domains, especially kernels, device drivers, and image processing. Toward the end of my career I was an algorithm designer — my "deliverables" were patent applications, not code. Now I've been retired for several years but still dabble at coding quite a bit.

I've written code in over a dozen different machine languages, if custom microcodes are included. My high-level language repertoire is much more limited. I learned C in 1980 and it quickly became, and remains, my favorite language. (I don't like Javascript but have written some for my personal hobbyist website.)
Javascript ain't so bad once you realize it's only suppose to look like Java, but it's actually more similar to LISP.

It can be a headache until you wrap your head around all the dumb stuff it does. I always found the biggest challenge with it is getting up to speed on frameworks like Backbone, Angular, and React, where there's too much magic, and too little documentation. Where you're learning the framework, and not the language.

Can't say I have any beef with it, though, after coding in COBOL for four months. Nothing else I've ever written in has been near as painful as my time with COBOL.
 
Javascript ain't so bad once you realize it's only suppose to look like Java, but it's actually more similar to LISP.

To me the big problem with Javascript is it's extreme willingness to accept crap.

I want a language to be as strongly typed as possible. It's so much easier to find errors when the compiler gripes than when you have to hunt down the misbehavior.
 
Two roads diverged in a shallow road and I ... took the one that led me to lower- and lower-level programming languages. Instead of pursuing my ill-formed dream of writing code in Lisp or Prolog, I detoured into digital circuit design — a very low-level "machine language." But low-level languages did seem to fit my temperament.

I have written some fairly complex code in Javascript, and I know there are languages that would irritate me much more, but consider code like
alert("4.7" - 1 + 1);
alert("4.7" + 1 - 1);
alert("4.7" | 0);​
Very cutesy behavior, I'm sure (and discussing trade-offs would take a while). I just prefer the elegant simplicity and easily specified determinism of C.

ETA: Can you Javascript coders reconstruct this table from memory? I guess I'm definitely a Javascript novice: I'd never heard of a === b ::gak::
 
Last edited:
Javascript ain't so bad once you realize it's only suppose to look like Java, but it's actually more similar to LISP.

To me the big problem with Javascript is it's extreme willingness to accept crap.

I want a language to be as strongly typed as possible. It's so much easier to find errors when the compiler gripes than when you have to hunt down the misbehavior.

Oh yeah. That, implied global variables (and indeed, an over-reliance on global variables in general) lead to all sorts of messes. The fact that there are `==` *and* `===` operators is just... staggering. But, if you avoid the bad parts, it's a fun little language, and, for better or for worse, it's here to stay, and it's become quite formidable on with the V8 compilation engine and the node.js runtime.

I much prefer Python as far as scripting languages go anyhow... But I will say one more thing, at least Javascript isn't PHP.
 
ETA: Can you Javascript coders reconstruct this table from memory?

Nope, and some of that behaviour looks like it was cooked up so that programmers could write less code without considering that it makes the language harder to learn, read and maintain.

In a similar vein, I find the spread operator difficult to read; Coding is only part of my work, and JS is only part of that, so I prefer code that says what it does on the tin.

I much prefer Python as far as scripting languages go anyhow...

I would dearly love for web browsers to adopt Python as a standard client-side scripting language.
 
I started programming in the mid 1960's and it has been both my profession and hobby ever since. (I've also designed digital circuits — somewhat similar to low-level coding — and troubleshot mainframes — somewhat similar to debugging complex software systems.) I've worked in a variety of domains, especially kernels, device drivers, and image processing. Toward the end of my career I was an algorithm designer — my "deliverables" were patent applications, not code. Now I've been retired for several years but still dabble at coding quite a bit.

I've written code in over a dozen different machine languages, if custom microcodes are included. My high-level language repertoire is much more limited. I learned C in 1980 and it quickly became, and remains, my favorite language. (I don't like Javascript but have written some for my personal hobbyist website.)
Javascript ain't so bad once you realize it's only suppose to look like Java, but it's actually more similar to LISP.

It can be a headache until you wrap your head around all the dumb stuff it does. I always found the biggest challenge with it is getting up to speed on frameworks like Backbone, Angular, and React, where there's too much magic, and too little documentation. Where you're learning the framework, and not the language.

Can't say I have any beef with it, though, after coding in COBOL for four months. Nothing else I've ever written in has been near as painful as my time with COBOL.
Christ. I think I'd rather just be poor.

Yeah, the framework ecosystem is a mess. But holy hell, I'd rather be sifting through that madness than COBOL.
 
It can be a headache until you wrap your head around all the dumb stuff it does. I always found the biggest challenge with it is getting up to speed on frameworks like Backbone, Angular, and React, where there's too much magic, and too little documentation. Where you're learning the framework, and not the language.

Mind you, ReactJS (especially JSX) is pretty fucking cool.
 
... I much prefer Python as far as scripting languages go anyhow... But I will say one more thing, at least Javascript isn't PHP.
What do you mean by that? Is there anything especially horrible about PHP?
 
(on JavaScript frameworks...) Can't say I have any beef with it, though, after coding in COBOL for four months. Nothing else I've ever written in has been near as painful as my time with COBOL.
Is there anything positive that anyone has ever had to say about COBOL?

As I understand it, it was intended to be easily readable by non-programmers. Thus, one would write

ADD A TO B GIVING C

But someone introduced the "COMPUTE" command:

COMPUTE C = A*B

using the syntax introduced by Fortran and copied by most other high-level languages.
 
(on JavaScript frameworks...) Can't say I have any beef with it, though, after coding in COBOL for four months. Nothing else I've ever written in has been near as painful as my time with COBOL.
Is there anything positive that anyone has ever had to say about COBOL?

I was never a COBOL fan, but yes there are positives:
- It did it's job
- A lot of programmers made a lot of money off of it
- a lot of business made a lot of money from it
- there are still businesses today running on it

And of course who doesn't love https://en.wikipedia.org/wiki/Grace_Hopper .
 
It can be a headache until you wrap your head around all the dumb stuff it does. I always found the biggest challenge with it is getting up to speed on frameworks like Backbone, Angular, and React, where there's too much magic, and too little documentation. Where you're learning the framework, and not the language.

Mind you, ReactJS (especially JSX) is pretty fucking cool.

I haven't actually done much React yet, but spent some time a few months ago going through their tutorial.

I was going to try to mess around with it a little while back but getting setup was going to take me longer than 10 minutes so I just sighed and put it off. Will have to dedicate a weekend to it some time.
 
(on JavaScript frameworks...) Can't say I have any beef with it, though, after coding in COBOL for four months. Nothing else I've ever written in has been near as painful as my time with COBOL.
Is there anything positive that anyone has ever had to say about COBOL?

As I understand it, it was intended to be easily readable by non-programmers. Thus, one would write

ADD A TO B GIVING C

But someone introduced the "COMPUTE" command:

COMPUTE C = A*B

using the syntax introduced by Fortran and copied by most other high-level languages.

I coded in it for a class in college, pretty much just for the experience of using it for a while, rather than any desire to use it professionally.

I could go on and on about all the things I didn't like about it, from the language, to the editor, to documentation. If nothing else it gave me a heavy appreciation for tools like Eclipse and Visual Studio along with their associated languages.
 
Two roads diverged in a shallow road and I ... took the one that led me to lower- and lower-level programming languages. Instead of pursuing my ill-formed dream of writing code in Lisp or Prolog, I detoured into digital circuit design — a very low-level "machine language." But low-level languages did seem to fit my temperament.

I have written some fairly complex code in Javascript, and I know there are languages that would irritate me much more, but consider code like
alert("4.7" - 1 + 1);
alert("4.7" + 1 - 1);
alert("4.7" | 0);​
Very cutesy behavior, I'm sure (and discussing trade-offs would take a while). I just prefer the elegant simplicity and easily specified determinism of C.

ETA: Can you Javascript coders reconstruct this table from memory? I guess I'm definitely a Javascript novice: I'd never heard of a === b ::gak::

I'd enjoy coding in something like, say, C++ professionally but unlikely it'll ever happen.

So far in my career I've less pursued languages as much as I've pursued my now fiancee, which meant finding work in the city we're in, which if I wanted to make a decent salary meant Java.

So now I'm at something resembling a senior level in Java, with a burning desire to code in something interesting and new for a while, but trapped by a pair of golden hand-cuffs.
 
My dad taught COBOL programming to high school students in the '60s and '70s. I learned BASIC on my own in the '70's and later borrowed my dad's books to teach myself COBOL. I was astounded at how much more effort it took to do a simple thing like print your name or add 2 numbers, compared to BASIC. I gave up pretty quickly as it felt like a big waste of time. I gave him a lot of shit about COBOL. For some reason, he was true believer in it to the very end. Never could figure out his love for it.
 
Two roads diverged in a shallow road and I ... took the one that led me to lower- and lower-level programming languages. Instead of pursuing my ill-formed dream of writing code in Lisp or Prolog, I detoured into digital circuit design — a very low-level "machine language." But low-level languages did seem to fit my temperament.

I have written some fairly complex code in Javascript, and I know there are languages that would irritate me much more, but consider code like
alert("4.7" - 1 + 1);
alert("4.7" + 1 - 1);
alert("4.7" | 0);​
Very cutesy behavior, I'm sure (and discussing trade-offs would take a while). I just prefer the elegant simplicity and easily specified determinism of C.

ETA: Can you Javascript coders reconstruct this table from memory? I guess I'm definitely a Javascript novice: I'd never heard of a === b ::gak::

Cutesy but just asking for problems. Give me a type mismatch error! If I really mean something like this I'll cast! (Although I wouldn't mind a string-to-numeric converting cast.)
 
Ways in which the mental exertion required for programming are analogous to the exertion required for physical work:

These days I notice when I've reached my mental limit. If I code hard and long enough eventually I reach a point where I simply cannot anymore. Yesterday this happened around mid-afternoon and I started struggling to get anything done. So I took the rest of the day off to relax and start again this morning.

And this morning, with a fresh mind, I came in and solved a problem I was struggling with yesterday in roughly 10 minutes.
 
Back
Top Bottom