Other Do you want to learn 12 or just 8 programming languages next year?

Classroom teaching and passing exams gives you some initial familiarity, but you really need to work on a real project or two that you can get your teeth stuck into, to learn much about programming; that's when it starts to "sink in". Best of all is to work in a team of other good people with different levels of experience and expertise, and learn from each other by doing real work solving complex problems. Of course this isn't unusual or unique to programming, most acquired skills work like this.
Agree 100% (or more if I can). The best way for me to learn something is to have a need. Work, writing code? Requirements, what language? I'll do more than learn syntax. My best work/team stuff was me doing technical lead (system engineer) others implementing in a language I had minimal exposure to. I learned syntax so I could understand stuff for code reviews but that let me be more effective in telling the team "this is what the code needs to do"

And yes it's not unique to programming. I would toss out "try cooking a family recipe with grandma watching" (yes I can sautee onions but....)
 
I am sad to hear that.
Na, me not. More or less it worked out, and where I really didn't get what I wanted, that was in a different realm.

I just had hoped that in my later days I could still do some consulting, for fun and to have entertainment.
But maybe that is not my destiny. Maybe I should rather do "Foundation": prepare the civilisation for the coming dark age.
 
I don't know how others feel, but for me another obstacle is that many marketable languages are not fun.

C++ is huge and grows every 3 years by a degree that I disapprove of. But at least it has a sane library mechanism - just stuff everything into Boost. And plain C libraries for interfacing to things. And direct access to all of Posix' C interface. Works for me.

Rust is supposed to be hard to code for, especially protoityping and it has a package mechanism that many disapprove of. And no POSIX access. The way I read AARs Rust doesn't allow a prototype and forces much of production quality before anything runs. I am not sure that is what I want all the time.

Golang looks like more fun, though. Very large standard library, so less exposure to random packages on the market. Stupid name, though, you can't google "go".
 
Golang (I hate that) looks more like a real evolution from C than the others, and comes from the same stable. It does look more fun. I guess google must have thrown some money their way which is why "Go", but it's s silly name. I suppose 'D' was already taken...

C++ isn't my idea of fun. I haven't looked into rust in any depth yet so I'll suspend judgement until I find the time to have a look at it, but it has a lousy rep from what I've heard so far.
 
I've gotten more than a few snickers over the decades about my writing style.

First and foremost, I write for clarity and ease of reading.
The compiler doesn't care at all, and produces the same output.

Back in the 80s, I wrote the fastest file finder on the planet for MSDOS, all in Assember.
It used every shitty trick in the book, such as self-modifying code at runtime.
I needed extra registers so I dipped into using the 8087 for this.
I loaded my own copy of the file allocation table into RAM for faster access than constantly going to disk.

Fortunately, my writing style was very clear, and every line heavily commented.
I looked at that code some 40 years later, and thought "WTF was I thinking..."
It would be impossible for me (in my old age) to read it, without that clarity.
 
Candidate : "Excuse me, how do Hilbert space and eigenstates fit into a programming job?"
HR : "Our web stack is written in Perl."
Candidate : "Understandable. I have no further questions."
We had a guy join our test team years ago who had just done a PhD in string theory. I don't think his string theory helped him much in his new test job, but he said it paid better than being a physicist.
 
That's the number coming out of a survey:


Code:
Those learning to code want to try more languages
next year compared to their professional counterparts.
On average, each user who is learning to code wants
to try 12 other languages in the next year versus users
who are professional devs who want to try eight.

I mean... As far as I can tell I learned an above average number of languages (slowed down by rising complexity of C++ mainly). But this is just nuatz. And of course many of these people also call themselves "full-stack" developers, which would require input bandwidth way out of proportion.
I used to work for an IBM mainframe shop that used assembly language for everything. Part of this was because some of the code had to work closely with the operating system, but a lot of it was inertia. About a year before I retired, they company decided to start using METAL C, an embedded C for the mainframe that had a minimal runtime, and could run in authorized state (unlike regular C).

One of my coworkers said "I retire in seven years. I'm not learning a new language."

I was kind of amazed, since I learn new languages all the time, whenever they are needed for some project. Most of these guys were in their 50s or 60s, had been coding assembler their whole lives, and had no interest in learning anything new.
 
I've gotten more than a few snickers over the decades about my writing style.

First and foremost, I write for clarity and ease of reading.
The compiler doesn't care at all, and produces the same output.

Back in the 80s, I wrote the fastest file finder on the planet for MSDOS, all in Assember.
It used every shitty trick in the book, such as self-modifying code at runtime.
I needed extra registers so I dipped into using the 8087 for this.
I loaded my own copy of the file allocation table into RAM for faster access than constantly going to disk.

Fortunately, my writing style was very clear, and every line heavily commented.
I looked at that code some 40 years later, and thought "WTF was I thinking..."
It would be impossible for me (in my old age) to read it, without that clarity.
Good comments FTW. More than once in my career, I have looked at code I wrote a year or two ago, and said, "What was I thinking? This code is all wrong.", then, just as I was finishing up fixing it, remembered why I wrote it that way.

It only took me a couple episodes like that to start leaving good comments about anything weird. Sometimes you have to do stuff that does not align with the current Best Practices. A comment explaining what the issue was, and why you had to deviate works wonders.

I always try to be kind to the next person who will be looking at my code, especially since the next person is frequently a slightly-older me.
 
Ahh comments. Some "styles" think you need a comment for every line, which leads to comments like "increment X" for a line like X++.
I've always commented heavily for the sections that took me way too long to figure out because I know I'm revisiting this in the future.

Good comments are priceless, bad comments make you miss the good ones.
 
When writing ASM it is often helpful to leave a comment about INC ECX as to “why”

I use symbolic names instead of displacements for index registers because they are more intelligible.

Mov AX, ESI [cTagOffset]
Mov AX, ESI [0]

These are self commenting
 
  • Like
Reactions: mer
When writing ASM it is often helpful to leave a comment about INC ECX as to “why”

I use symbolic names instead of displacements for index registers because they are more intelligible.

Mov AX, ESI [cTagOffset]
Mov AX, ESI [0]

These are self commenting
ASM is a special case (in my opinion) because of "registers". A comment that hints "at this point in the code this register has a value that points to that thing over there in memory" is drastically different from a comment in C saying "increment X".
Symbolic names are (almost) self commenting.
 

Three comment maturity levels :​

  1. Describe what the code does (beginner)
  2. Explain the logic’s purpose (intermediate)
  3. Refactor code so comments are often unnecessary (advanced)
Useless :
Code:
timeout = 1000; // set timeout to 1000
bettrer :
Code:
if(x < 42) // 42 is the max sensor reading before overflow
No comment needed :
Code:
modules[driver_ID].status = MODULES_DRIVER_STATUS_DEFAULT;
 
I needed extra registers so I dipped into using the 8087 for this.
That was the cool thing about the 68K processor. Lots of registers. And that reminded me of a meeting I had with a programmer at work years ago.

I was developing the hardware--a standalone computer with a real time operating system--and my good friend, Gideon, was writing the application and hardware interface software in assembly. Gideon spoke very good English but sometimes there were still misunderstandings.

One week, he came in and asked me about all those registers I told him the 68000 had. "So I can have eight registers to do X?" he asked. "Sure," I said. "Well can I have eight for doing Y?" to which I gave an affirmation.

These question went on for several days and I couldn't understand why Gideon was so excited but the questions stopped and he went plugging along writing his code.

Then, one day, I found out Gideon thought these were all unique registers to hold unique values at the same time! He was up to something over 68 registers for different tasks and all his mixed C and assembly code was based on that!

Gideon was a pretty smart guy but you would never know it based on that story.
 
Back
Top