Your foundation in C will prepare you to take on other popular coding languages

Ha! C++ is so easy to learn that they had to pad the instruction time to get to 5 hours. (/s)

Conversations like this one tend to devolve into ascertaining the lesser evils. You need to treat this like the current presidential campaign. Let me arrange 5 h̻̘̻͙͚͠ọ̢̤̟̠͇urs̳̞ ̡̭͙o̵̻̲͚̩͉̣̻f̶̨̨͍͖̺̝̗̰̟̣̙̠̰̞ A͖̟͔͈͈͇͙̫͘P̨̗̟̳͙͎̬̼ͅL̸̼͙̝̦͇͞ ̣̕ͅţ̻͍r̞̻̙̙̠̻͕͈a͝͏̶͈̮͈̪̙i̬͈̜͈̭̳̯̜͞ņ̲͡i͏̤̟̳̗̣̥̘̭ņ̲͍̫̣͍̝̞́͘g̜͙̳̝̘̰̪͡ ̡̨͓͈̘f̡̦̳̟̰o͕̤̺͕̲r̲̠̭̲͜͜ ͖̗̩̣̀͘͡y̴̤͎͓̳͙̮͘o̥̲͉̰͕̜͉̮͞ù̦͙̭͈̞͘͜ ̪̠͙̰ͅa̶̹̘̯̜l̶̰̩̺̜̙̯̗̗̻͠l̵̹̻̙̭͝,҉̤̞̲ ̸͈̝̰̬̫̹̟a͖̹̝͚̼̱̖̮͈͝n̢͕͚̫͔̦͚̠ͅd̰̮̼̦̩̪͢͝͡ͅ ̛̛̺̟͜y̵̡̘ờ͎̦̫̲ṵ̷͞ ̴͎̬͓̤͉w̶͓͉̲̖̗̹͓̮͟i͓͕̰͢͜l̨̯̱̣͟ͅl̗̭͓̪͎͙̘̮͞ ̸̝̺̕b̩͔̺̘͈̗̤̲̀e̵̢̞̭̪͘ ̴̸̲̼̫̕a̠͍̪b͈͉̫̠̪ĺ̵̥̥͖e̶̜̻͙̪͉̰ ̵͈̮̮̪̗̼̺͕t̻̫͎̖͔̗̪͟͢o̶̪͇̻ ̗̖͇̜̤̲͔͢͢ḩ͔͖̟̺̠̱̘͈́͢͝e̷̢̢̫̮̙̣̪̗l̶͍͔̘̳̰̤̀͘̕͞p͔̬͎͖̫̝̰͢͞ ̸̵̘̯̘̘̙͉͖́͘͡L̮̫̬͈̲͈͘͡ơ͏̠̩̼͔̙̲̥̞̤͖̖̠̭ͅr̢҉̬̼̻̪͉̙̗̫͈͚̙̪͚͈͟͝d̵̨̡̠̺̬̖̫͎̺͓͚̻̭̦̱́ ̧̛̲͈̱͉͍̺̳̣͈͓͞C̠̠͙̞͖͎̫̞͍̟̱̯̀͡͡t̸͓͚͇͍̺̥̘͍̰̭͈̮͔͟͠h͙̘̫͎̝̞̲̖̙̭͔̦̠̹̯̩͟͠u̷̱͇̖͎̲̠̞̺͜͢ͅl̷̲͚̠̩̞̩̱̺͇̬̲͕͔̹͖̪h̨͏̧̲̫̥̞̝̥͈͘͢u҉̯̪̞̫̖̙͙̹̯̦̖͖̞͙̱̼͢ ̷̶̧̡̝̭̹͇͈̪̟͔͈̩͙̕w̴̤̪̞̟͓͓͎̯̬̹͇͈̣̟̯̲̬͉̜͟͡͝ì̷̳̦̥͕̥̲̻͎͙͓̼͔ͅͅͅt̵̶̨̡͚͖͔̙͇̬̩̲̗̻̘͝h̨͙̲͚̮͔̠̪̱̖̮̣̖̕͜ͅ ̴̝̱͇̝̳̜̀͠͠h̨̟͖̰̮̥͜͡i̡͈̰̣͚͇̳͝s̸̼͚̼̣͍̬̪͙̪͚̣͍͞ ̼̱̣̭̺͙̫͚͇̰̥̣̼̮̕͝ṕ̴̨̝̼̘̲̪͓̞̬̰̰͍̞̪̥̺̞͢͞r̢̡̛͓̬̠̣e͞͏̢̳̣̙͕͠͝s̵̷̘̱̖̯̝̖̠̮̝̠̜͓̕̕͟ͅi͏̴̧̝͚̯̠͙̣͚̦̩̝͎̻̕͟d̴̸͔̥͕͔̪̖͝e̷͜͏̢͉̙͇͎͕͕̥͇͔̯ņ͏̦̣̲̱͈̯̺̟t̴̸͎̦͍̣̲͍͉͎̬̳í̷͚̞̱̹̦͓̗a̵̢̛̪̯̱̱̞͔̟̠͎͉̻̻̬̫ĺ̷̹̣͎̤̳ ̢̦͕̖̞ć̨̢̰͖̞͕̜̪̯̘̖͍̙͍̠͓̦̹̖͢͟ͅá̴̵̞̟̯̞̱̗͎̯m̷̶̷͚͕̙̜̫͙̜̺̟͓͉͠͠p̴͎͉͇̲̜̥̘̹̯̼̗͖̤̰̭̮͓̩͝a̷̧̛̻̱͕͎̹͝ͅi̷̻̹͈̜͎̰̞͙̹͈̣̪̺͉̭͓g͏͔̞̣̲̫̦͓̣͓͝n̶̝͈̯̪̳̟̣͔̠̥̪̯͓̹̣.̢̺̼̣̙̳̦̥̝̖̭͓ͅͅ

W͜͡҉͚̝͈͇̞̼̣̻h̶̹͔̖̝̩̤͔̦͈y͚͔͉̻̤̰͈̣̻ ̳͙̠̼̖͔̦͍ş̮̗e̡͕̠̪͞͡t̨͓͎̝͔̺͉̹̙͟ͅt̴̵̟̟̬̟l̵͚̗e̙͚͕̺̖͕̦͔͟͡ͅ ̭̝̹̖̺̳͚͈͔͠f̡͉̗̩͔͜͝ơ̴̦̳͔̪̯̼͔̰ŗ̵͈͔̠͖̰̘ͅ ̵̟̬̳͉͖̹̟a̧̹̣͚̹̟̣͞ ͍̻̜̪̩͘͡ͅl̜̦͢e̼̝̯̗s̸̝̖̥̟ş̴̥̳̦͕e̸̡̨̝͚͔̫̪͈r̨͙͉̦̠̳͞ ̡̦͓͈̟̮͚̤̲́ȩ̸̺̯̯̬͉ͅv̢̮̤̠̘̕ị̝̩̰͍͠l͔̭̱͕?̵̘

10 Likes

Yeah. Mono is CSharp on linux-- or macosx’s bsd.

2 Likes

It is still the best way of hooking new modules into Matlab, and for almost any large numerical project Fortran will be significantly faster than the alternatives, especially if there is parallelization involved.

There is probably important work still being done in most “legacy” languages. (Well, maybe not PL/1 or Algol.) I wouldn’t be surprised if there were telescopes somewhere still being run by Forth code.

5 Likes

10 Likes

Nor I. I don’t think it’s possible for an interpreted language to get more low level. and very few languages are near as easily extensible. What kept Forth a niche language all these decades has been that everything refers to the stack - C, the old “portable assembler”, operates at a higher level of abstraction.

3 Likes

L̫͎̭̻̣o̝͖̦v̮̗̠̙̕e̘̤͇̗̳̗͠ͅ ̘̰̼i̻̭̳̱̘̯͍t̘̲̲!̪̮̠̭̮ͅ

3 Likes

Also that it is freaking hard to read. I recently ran across some old Forth printouts of mine that did…something, I have no clue what, and I was a pretty careful commenter, using an editor that mirrored every code page with a comment page.

2 Likes

W͖̳̥̭ͅe̡͎̣̹̬̩ͅll̬̱̼̹̤͙̪,͇̮̺̙̥͕͟ ̦̼͕i̖̙̘̯ț̞͉̤’͞s͉̫̬̯̬͈ ͏n̮ͅo̻͉̞̱ͅt ̺̳̤̯̳̩͖q̼̪͝uì̱̝̬̦t̪̰̙͙̟͕͜e̩̰ ̡͇A̶P̻̼̤͈̫̦̞L̬̤̣̰̯.̹̠͕͚̰͠.̤͔. ̲̣̰̗͚ :wink:

3 Likes

I learned Forth as an undergraduate Electrical Engineering student in the 1990s. I had a course that covered it on a perfunctory level. I was irritated by it, but I was twice as fascinated as I was irritated.

I use this C code a lot, which is a direct translation from the Forth:

A swap is just three of the same XOR’s in a row.

5 Likes

Have have checked out Scala? It’s far less verbose, has a buch of functional language features, and runs on the JVM. You can use Java libraries with it, or write code to be called from Java.

2 Likes

Languages are tools. I use whatever one is handy or optimal for the case.

That being said, C++ is an abomination, and C# looks pretty good, but there is no language more portable than C. It will run on a mainframe or a Z80.

Learning C - really learning C, in the trenches - will make you a better programmer. That being said, digging privies for twenty years will make you strong. Is it worth it? It was for me. You have to decide what you want to devote to your trade.

4 Likes

Insisting on being fluent in C will only confuse and dishearten potential new programmers. I’d look toward Java or Python, leave C for crazy arduino projects.

3 Likes

I totally agree with the fact that the language isn’t the hard part. But C# combines a lot of different paradigms and concepts, and almost always assumes those libraries and tools and other additional complexity. You start in VS by creating a project which asks you a bunch of questions a beginner wouldn’t know the answer to, and there are so many decisions and concepts - WPF, Winforms, XNA, XAML, Win32, DLLs, MVVC, LINQ, delegates, managed vs unmanaged memory, the CLR, etc. It’s bewildering if you are just a beginner.

I tried learning windows programming long ago and was a bit overwhelmed just by having to figure out OWL, Win32, Winforms, the IDE, and the language all at once, along with event-driven programming and taking OOP to the next level.

IMO a language for a beginner lets you go a step at a time, starting with the language and working your way up through the tools, libraries, patterns, concepts of software development, and environment. C# is a great destination, but doesn’t seem to be a good beginner onramp.

Most certainly. Forth is an amazing language, extremely elegant, but has found limited acceptance due to being totally reliant upon some bits that require a totally different way of thinking. For those who don’t know, in Forth, your program builds up from lower levels to higher levels. At the higher levels, it’s a thing of beauty. It makes perfect clear sense. You can write Forth such that people who don’t know anything about programming could read it and understand it easily. But at the lower levels, it’s kind of like the code equivalent of an Escher painting.

4 Likes

I wish I could think that this was satire. Of all the languages you could learn first, C is well towards the bottom.

Next up: “Learn to code with Haskell! The rigorous foundation in functional programming will serve you well, when you move on to more advanced and abstract languages like Python!”

4 Likes

I have a first edition of The C Programming Language in my office that was given to me as a gift by my brother in law. That in itself isn’t very interesting. What makes it interesting I was looking through it and found a hand written receipt from 1987 for some time share usage of a mainframe being used as a bookmark.

6 Likes

That’s more a fault of Visual Studio, though. It’s pretty damn impenetrable for a beginner. I’ve been using it for some 12 years now and I’m still finding new stuff I never knew about.

Also programming on Windows can be a real shit show. So many APIs and SDKs, so many ways to do things, and it’s always changing. Choose wrong and you can be in for a world of pain. For instance, WPF is an amazing and modern UI framework and I love it. Now WPF is basically dead and UWP is the future, yet UWP is completely immature and lacking in tooling and documentation.

Joel Spolsky has had many wonderful articles on this but this one is a good start, and still rings true today: How Microsoft Lost the API War – Joel on Software

4 Likes

I kind of consider it as Anders Hejlsberg’s second system (in the sense that Fred Brooks would have used the expression) - somewhat Baroque and full of features because they could be implemented, but not entirely user-friendly.

Delphi/Object Pascal/DCL was a real pleasure to work with, even for people unfamiliar with Windows programming (as I certainly was): incredibly fast incremental compiler, an OOPL that wasn’t too complicated, a framework that made sense, and RAD tools that were easy to work with. I was obliged to work with early Visual C++ and Visual Basic at work (DEC), but Delphi was much more elegantly organised.

I’m out of touch with this sort of thing now - I write music rather than code - but I see an open source version available as Lazarus. I wonder if some of the old magic still sticks…

4 Likes

Just because I love this so much, here’s a picture:

I also love how on the inside of the book, it says:

Hardcore.

15 Likes

Well, that’s the point, innit? Really good coders are nearly all C literate. Really bad programmers are typically stuck in a single language (usually Java these days).

Perhaps there are enough abysmally awful programmers driving down salaries and inflicting bad code on the world already.

OK, I’m not really serious, but I do hear that point of view from time to time.

3 Likes

Agreed. For a good programmer there should be no real problems being a polyglot. I do almost all of my professional coding in C# but if I needed to change gear completely to a different language I’m sure I could pick it up after a couple of weeks. I mean, ok, changing paradigms like from procedural to functional can be a real mindfuck, but at the heart of it that’s all just syntax and abstraction.

Even if you’re stuck in Java you should be able to at least have a basic understanding of what’s going on in a typical C program with careful consideration. I mean, sure, things can get confusing with pointers and references (I don’t regularly code in C, but I have years of experience with it and this still screws me up sometimes – especially with Win32 programming with its liberal use of double and triple pointers) but you should at least be able to follow along with what’s happening.

You joke, but I am not laughing. :slight_smile:

4 Likes