Jump to content

C Programming

Br3tt96
Quote

I also find that, if you're one the ppl who have learned things the hard way, by muddling trough the assembler and/or some low level languages, it's a bit too simplistic to look back and say: "What a mistake that was, this whole ordeal would've been so much simpler if only I chose one of these new simple languages". Perhaps the fact that you climbed that mountain by hand and are now standing on the top is what gives you this clear view in the first place ?

I also find that, if you're one of the people who spells "people" incorrectly, you're unlikely to be able to stand on the peak of the person who's done both and can thus criticise both.

Additionally, he who reinvents his own language may reinvent all of the mistakes; perhaps children adopting this language don't get the benefit of reading the warning labels, which were never translated...

I'd just like to point out that your technology has warning labels, and they're in the manuals. You should familiarise yourself, so that you know how to correctly operate your machinery. The C programming language also has warning labels, and they're in the manuals referred to as "the C standards".

Relating this back to the initial discussion: I discourage C as a programming languages for students who haven't yet experienced another form of procedural programming, as the only tried and tested ways to learn C which exist today seem to assume this minimum entry level of knowledge. That alone should suffice to say, but there are always going to be people who argue that their home-grown or tutorial extremely outdated book taught them, as though their interpretation of the world restricted by the experiences they've lived is absolute. I've seen plenty of those, but none have taught C.

Moving on, why would I recommend JS or Python instead of Scheme or C?

  • Both JS and Python are procedural enough that they'll learn core requirements for C later on.
  • Neither JS nor Python have undefined behaviour.
Quote

Why is my multi-threaded code slower then a single threaded solution, even tough the problem is perfectly divisible and there is nothing wrong with my code ? (false sharing)

Alternatively, why is your multithreaded code slower than a single-threaded solution on your system but faster on someone elses system?


I don't know... what does your profiler say [on both computers]?

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×