News for hackers. Stuff that matters.
Re:Computer Science Degree – Is it worthy it? Should You Get... by imoverclocked on Tuesday December 01, 2020 @09:45PM (#25272722)
I agree. This article is an N of 1 from the perspective of a fairly new grad. It's useful for what it is.

I've worked with a lot of software engineers who would do a lot better for themselves if they understood the basics of how a computer works (eg: what's a program counter.) There is definitely a rift of "engineers" whose discipline amounts to gut feeling and whatever code works at the time. This is ok for ephemeral software but isn't for complex projects.

Getting an education has value. Getting a good education is valuable. Getting the right education pays dividends.

Finally, learning how to think critically and solve problems is where it's at. (IMHO)

Re:Computer Science Degree – Is it worthy it? Should You Get... by souprock on Tuesday December 01, 2020 @10:39PM (#25272999)
Program counter:

1. something which counts programs, for example "find . -executable | wc -l"

2. misnomer for the instruction pointer, which is a CPU register that points at instructions

Re:Computer Science Degree – Is it worthy it? Should You Get... by crdotson on Tuesday December 01, 2020 @10:43PM (#25273016)
I must fight pedantry with pedantry! Historically it has been correctly nomered as a Program Counter, such as on the 6502 (https://en.m.wikipedia.org/wiki/MOS_Technology_6502#Register...)
Re:Computer Science Degree – Is it worthy it? Should You Get... by souprock on Tuesday December 01, 2020 @11:07PM (#25273138)
People aren't just wrong on the internet. People were wrong before the internet existed. It's even possible to be smart enough to design a CPU and still be wrong.

The register points at instructions. It does not count programs.

The register is correctly named in some hardware manuals, including those for PowerPC and x86.

Re:Computer Science Degree – Is it worthy it? Should You Get... by loopz on Wednesday December 02, 2020 @12:52AM (#25273630)
Program Counter = Counter used for programs. Counts bytes for position of next instruction.

Within an early context and machine code vs hw level, not totally unreasonable as a legacy term. "Counter" was often used as name, even when starting at 0.

Wrong before internet or just pioneers? And what wrongs do we now do, or not?

Re:Computer Science Degree – Is it worthy it? Should You Get... by souprock on Wednesday December 02, 2020 @03:00AM (#25274180)
It sometimes seems to count, but then an interrupt happens or there is a backwards jump. That isn't counting. 42, 45, 47, 3, 4, 7, 37953, 37955, 37959, 11, 12, 15...

Actual counting on real hardware does happen. For example, x86 has the CX/ECX/RCX register for string operations. That has a far better justification for being called a program counter, but still that would be awful terminology. Another example is the CTR register of PowerPC, commonly used with an instruction that decrements it and then conditionally branches to do a loop. Even a cycle counter has better justification for being called a program counter.

Re:Computer Science Degree – Is it worthy it? Should You Get... by loopz on Wednesday December 02, 2020 @12:38PM (#25278902)
Yes, I let go of "counters" some two decades ago. Personally prefer index or just i, instead.

The way it used to go. Call something counter. Increment it each loop. Use goto for looping. Over time, add more gotos and change "counter" value. It tends to creep in, and clear names are important.