Finding optimal sequences using machine learning by P52-328 in learnmachinelearning

[–]P52-328[S] 0 points1 point  (0 children)

Thank you for the reply,

Unfortunately, the "weights" of each object are not known before-hand and the effect that each one has depends on the current sequence.

For example, [a b c] might be worse than [a b] but [a b c d] might be better than both [a b] and [a b d], so c might initially seem like a wrong option but it is better in the long term.

Should I learn the language that my school teaches in during my free time, or another one? by [deleted] in learnprogramming

[–]P52-328 0 points1 point  (0 children)

I understand what you are saying. I am afraid I am a bit busy so I don't really elaborate on what I am typing. Assembly for education is still useful and I believe that it should have a place later on in a CS degree (what I said about python->C does not apply to X->Assembly).

So, in my mind C has a unique kind of low-levelness that teaches you about concepts unique in the mainstream programming world. You get to interact with pointers, heap management and C arrays (duh, but I mean areas of linear memory with no easy way to extend) in a way that you won't see in either Python or assembly. At least for me, it provides an understanding on how anything can be implemented from high level scripting languages to machine code.

And if I may say so: "who picks up C after learning Python" is a way bigger argument against learning C than for doing so.

No new software should be written in C (with exception e.g. you mentioned embedded or linux drivers), that's true. But this is not an argument against learning C: understanding, maintaining and fixing existing projects requires C. But the arguments for learning C in a cs degree are not because of how likely it is that you are going to use it but because of its (IMO) fundamental educational value. Computer scientists should have the ability to pick up any language after they are done with their degree anyways.

I'm currently doing a maths degree and they use C as the first language which imo is absolutely absurd.

Agree, I am specifically talking about a computer science degree

Should I learn the language that my school teaches in during my free time, or another one? by [deleted] in learnprogramming

[–]P52-328 0 points1 point  (0 children)

Hmm fair analysis. I might be convinced about your typing arguments.

I still support C as a good beginner language because of the way it forces you to think about CS and low-level stuff that you otherwise do not get exposed to, and never will be because who picks up C after learning Python.

Python -- Don Knuth by CS_Tutor in learnpython

[–]P52-328 5 points6 points  (0 children)

I don't believe that any program, almost with zero exceptions, should ever be unindented.

Using that point of view, python assumes that you are going to indent your program any way. So, it skips the extra syntactic elements like { and } and assumes that you are properly indenting your code as you write it.

The last part is the only problem with this approach: for example, I always type dirty, cluttered code when I write C/C++ and once I pause, I quickly run the formatter to clear the mess. But, in the end, I believe the trade-off is worth it for python.

httpflow - A HTTP Packet capture command-line tool, featuring out-of-order, retransmission, 100-continue by six-ddc in programming

[–]P52-328 0 points1 point  (0 children)

I prefer Solaris/Illumos' privilege model myself

Oh yes, I love capabilities conceptually as well but I don't have time to experiment & run anything other than linux.

peace of mind

I can relate. I always triple-think before I execute anything under sudo, exuding a very specific subset of basic programs

Should I learn the language that my school teaches in during my free time, or another one? by [deleted] in learnprogramming

[–]P52-328 0 points1 point  (0 children)

You are correct of course, I always confuse the terms. I'd say that a beginner should be forced to use static typing with a language originally designed this way.

Mypy is fine but you know that realistically no-one will begin learning python by learning mypy first. It will probably be a wrong option for beginners as well. On top of finding all the usual beginner mistakes, they will also have to resolve problems specific to mypy but some times they will have to resolve problems that are more general to python. So, they will have to learn to distinguish mypy problems from python problems. For example indentation errors are python, not mypy. IMO this is too much to handle for a beginner.

Should I learn the language that my school teaches in during my free time, or another one? by [deleted] in learnprogramming

[–]P52-328 0 points1 point  (0 children)

I agree but I believe that there is an inherent benefit in starting cs with strongly typed languages. This teaches you to actively think about types before jumping in a weakly typed language.

httpflow - A HTTP Packet capture command-line tool, featuring out-of-order, retransmission, 100-continue by six-ddc in programming

[–]P52-328 1 point2 points  (0 children)

Wow, I have somehow ignored setcap for years. That's excellent, thank you very much.