The article uses nano throughout. Is nano a popularly used editor? I have not seen anyone around using nano. I see vim, atom, sublime, vs code but never nano. Just curious if nano is popular. If nano is popular what are its pros and cons?
Nano is the easiest-to-use terminal-based editor that you're likely to find on a Unix system by default. All the important key commands are listed at the bottom of the screen and everything! It's a great editor to recommend in beginner tutorials since it requires very little setup or learning to use, but if you're already happy with a different one there's probably no reason to switch.
Getting started with C
101–106 of 106 posts
Re: Getting started with C
#102One of my biggest bugbears on C / C++ programming is return 0; I wish people would #include / and use EXIT_SUCCESS / EXIT_FAILURE just to make the code more obvious for the beginner on what the intent is. :-) To quote the "zen of python" "Explicit is better than implicit" we know what "SUCCESS" or "FAILURE" is! And we can use enums for other exit values.
Re: Getting started with C
#103Earlier quoted context omitted.
If an absolute beginner were to use K&R as a start they'd be learning C from 35 or so years ago. It's well written, but not helpful as a reference. Even something as simple as how a function is organized has changed. C Programming: a Modern Approach teaches C89 and C99, pointing out the differences in features when appropriate. Having used it myself this year, I found it much more helpful than K&R
If you start with the second edition (C89 / "ANSI C"), you'll discover that C has barely changed.
Re: Getting started with C
#104Re: Getting started with C
#105The absolute beginner technical guide may be the most difficult kind of writing there is. You have to know what's already in the head of the absolute beginner. If it's garbage, you need to set that straight before anything else can happen. You also have to know what's not in the head of an absolute beginner. Then you need to fill the gaps with background material. Not too much or your audience will tune out. Not too…
Yea, if I were writing something with the bold title "Absolute Beginner's Guide To..." I'd want to test it on my 8-year old who only knows how to launch the web browser and Minecraft. If she can use it successfully to cobble together a working Hello World program, then it's indeed an absolute beginner's guide.
Re: Getting started with C
#106Earlier quoted context omitted.
It kind of depends on what you need out of C. The only real reasons left to use C in the wild are: * Legacy code * Embedded (including drivers, bare metal etc.) * Portability, FFI, etc. Performance used to be another major reason, but in $CURRENT_YEAR, if that's your goal, C++ and Rust are just as performant and there's very little reason not to opt into them. The other major reason to learn C is that it's a great "h…
I would still suggest that people learn C before attempting C++; while someone with C# or Java experience could probably do well in a "modern C++" codebase, as soon as they go off-piste into memory allocation and pointers they're in for surprises. (Is there anyone who learns Rust who isn't already a proficient but frustrated C++ programmer?)