CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    Join Date
    Jun 2015
    Posts
    175

    Do C++ programmers need to know Linux perfectly as well?

    Hello guys, I'm not sure whether I'm asking this question on a correct forum or not. If not, my apologise.

    I'm an intermediate-level programmer of C++ and have recently started studying Qt, QML and OpenGL. Since they are mostly using C++, the task is not that bewildering.

    About Linux and its flavor Ubuntu, I have little knowledge about it. It may take some time to be skilled on it and use the command line well.

    What now? Well, I at times see employers list several items as requirements for employees that include terms like: working on Linux by C++ or using C++ on/for Linux.
    To be honest, I can't understand that completely, what they really mean, but whatever it is, it's something popular and required for getting good jobs regarding C++ programmers.
    Would you please guide me? What they mean and what is the relationship between C++ and Linux?

  2. #2
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,765

    Re: Do C++ programmers need to know Linux perfectly as well?

    No, Linux is an operating system, whether it refers to the kernel of the said operating system, or the surrounding distributions thereof. Hence, if you wish to find work in areas that involve Linux, then of course you need to know Linux, but if not, you may well program in C++ say, solely for Windows.
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

  3. #3
    Join Date
    Jun 2015
    Posts
    175

    Re: Do C++ programmers need to know Linux perfectly as well?

    Thanks. So it mainly depends upon the place where the programmer works in, as you said. So one other question, don't you think knowing Linux is a good privilege for a programmer in a general manner and a C++ programmer in a specific manner? Or, isn't using Linux popular in most places a (C++) programmer might work in?

  4. #4
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,825

    Re: Do C++ programmers need to know Linux perfectly as well?

    what is the relationship between C++ and Linux
    c++ is a programming language, Linux (and Windows) is an operating system. c++ is almost OS independent. A pure c++ program should compile and execute on Linux or Windows or... with the right compiler. Qt et all are x-platform. Again, a pure Qt/c++ program should compile and execute on any appropriate OS. The issues come with non x-platform code. For Windows, there is the WIN32 API set of functions that can be used within c++. For Linux there are the Linux API functions (API - Application Programming Interface). These are not the same. Then there are the Posix functions which should be the same on all systems that support Posix... There is also 'knowing how to use an OS', 'knowing how to program for an OS' and 'knowing how to use the compiler tools et all' for a particular toolset. I use VS2017 under Windows. if I had to use Linux to produce c++ programs then I would have to learn to completely new set of tools - even though c++ itself would be very, very similar on the two systems.

    So an advert for using c++ on Linux probably required knowledge of c++, the Linux toolset for producing/debugging programs and the Linux APIs. Similarly an advert for c++ on Windows would probably require knowledge of c++, the Windows toolset for producing/debugging programs and the Windows APIs.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  5. #5
    Join Date
    Jun 2015
    Posts
    175

    Re: Do C++ programmers need to know Linux perfectly as well?

    Thanks.
    the Linux toolset for producing/debugging programs and the Linux APIs
    I'm reading a tut for being familiar with Ubuntu. After that I think (according to your talks) I ought to read about Linux toolset and APIs after that. Agree?

    And:
    on Windows ..., the Windows toolset for producing/debugging programs and the Windows APIs.
    Until now for C++ programming I've coded on VS (currently 2017) and used Win32 Console Application (which is an API) and also Win32 Project which sounds to be another API. The process has been fine and I haven't been told about Windows toolset and its usage in C++ on Windows. What do you mean by that in this specific case please?

  6. #6
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,825

    Re: Do C++ programmers need to know Linux perfectly as well?

    I've coded on VS (currently 2017) and used Win32 Console Application (which is an API) and also Win32 Project which sounds to be another API.
    Not quite. These are c++ templates within VS for starting a particular type of project. VS is one Windows toolset for producing/debugging programs (there are others). The Windows APIs and the Linux APIs are different. They are a set of classes/functions provided to interface with the OS. The Windows APIs are documented here https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx Note that some OS specific APIs to do with multi-threads and file/folder access now have c++ equivalents as part of the language.
    Last edited by 2kaud; October 13th, 2017 at 12:17 PM.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  7. #7
    Join Date
    Jun 2015
    Posts
    175

    Re: Do C++ programmers need to know Linux perfectly as well?

    Thank you.

  8. #8
    Join Date
    Feb 2017
    Posts
    677

    Re: Do C++ programmers need to know Linux perfectly as well?

    Quote Originally Posted by tomy12 View Post
    I at times see employers list several items as requirements for employees that include terms like: working on Linux by C++ or using C++ on/for Linux.
    To be honest, I can't understand that completely, what they really mean, but whatever it is, it's something popular and required for getting good jobs regarding C++ programmers.
    Would you please guide me? What they mean and what is the relationship between C++ and Linux?
    If a company is looking for a C++ programmer and requires Linux skills then Linux most likely is the OS they normally use for their developments. They want someone who fits right in.

    But the Linux requirement also gives you an indication of the ambience of the workplace. Linux has something of a cult following and with that follow pretty strong views,

    - Microsoft is evil so Windows is bad.
    - C is the best language now and forever.
    - C++ is not an improvement over C, it's a degradation (*).
    - The only language that comes even close to C is Python.

    These are generalisations of course but quite close I think to what you can expect to hear at a Linux dominated work-place.

    So to thrive in a Linux environment as C++ programmer you must stand your ground. You must know the ins and outs of C. You must understand how all data structures of the C++ standard library are implemented in C. You must be able to argue for OO and functional design against the C imperative programming model, etcetera. In short you need to be an accomplished C++ programmer to take on a Linux devotee.

    No OS is a requirement for a C++ programmer. You typically specialize in one but there's no disadvantage of knowing several of course. Still, before considering Linux you should be aware that the Linux community is special in many ways and make sure to walk in with eyes open.

    ---

    (*) Just look at what Linus Torvalds, the very inventor of Linux, says about C++,

    http://harmful.cat-v.org/software/c++/linus
    Last edited by wolle; October 15th, 2017 at 11:34 PM. Reason: Removed offensive stuff

  9. #9
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Do C++ programmers need to know Linux perfectly as well?

    As others have said, not only do you need to understand a particular language, its development environment and its toolsets, but it is important to know what features the OS has to offer (so you can leverage the features and not reinvent them). Understanding this on Windows is quite a journey through learning the api and ins and outs of the file system, printing, COM, MSMQ and other sub systems. There's a lot there - I can't imagine doing it on flavors of Linux (I only focus on Windows).

    Wolle is correct about Windows/Linux cultural differences. I worked for a company where web sites and databases were hosted on Linux. To me it was like stepping back in time working with primitive cmd line tools and crappy development IDEs. The Linux guys thought it was the greatest thing ever.

    Big difference in attitude too: frequently you'll hear Linux devs complain about Windows or Microsoft but the reverse is rarely true (except for my post here <g>). It would be rare for a group of Windows developers to be sitting around complaining about Linux. Linux just isn't on their radar - if other devs want to prgm non-windows, they wouldn't care in the least.

  10. #10
    Join Date
    Jun 2015
    Posts
    175

    Re: Do C++ programmers need to know Linux perfectly as well?

    Well, thank you about those comments and for your time.
    The topics are rather high-level for me. But I use C++ and read tuts on Linux. I also think the most important part of Linux is working with Terminal. I have it in mind.

    I refreshed the page and saw someone's post vanished! The post was talking about c and C++. Well, old habits die hard, and since I don't have old habits with C, it's like a traditional typewriter for me, while C++ an electric typewriter.

  11. #11
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,825

    Re: Do C++ programmers need to know Linux perfectly as well?

    I refreshed the page and saw someone's post vanished!
    Yeah, Wolle deleted his post (moderators can still see it though!) - naughty. [Wolle, do you want it restored as that post is referenced in subsequent posts?]

    I agree about the cultural differences.

    Just look at what Linus Torvalds, the very inventor of Linux, says about C++,

    http://harmful.cat-v.org/software/c++/linus
    This basically sums it up!
    Last edited by 2kaud; October 14th, 2017 at 03:40 AM.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  12. #12
    Join Date
    Jun 2015
    Posts
    175

    Re: Do C++ programmers need to know Linux perfectly as well?

    This basically sums it up!
    Do you think C++ is a horrible language? I see you here spend your time much on C++ helping people!
    It sounds that Torvalds is the real enemy of C++!

  13. #13
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,825

    Re: Do C++ programmers need to know Linux perfectly as well?

    Do you think C++ is a horrible language?
    No, I like c++. I'd hate to go back to coding in pure c. I'm currently doing some work with a large c application (as everyone else here has a dozen excuses as to why it couldn't possibly be them!) - and it's a **** nightmare! I'd forgotten how bad pure c code could be. If it wasn't such a large project I'd have re-coded it in c++ but for its size and code complexity it would have to be a re-design and complete re-write and for what is needed to be changed it isn't VFM.

    To paraphrase an old saying,

    c is a simple language that can produce complex code
    c++ is a complex language that can produce simple code

    I rest my case.
    Last edited by 2kaud; October 14th, 2017 at 01:39 PM.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  14. #14
    Join Date
    Jun 2015
    Posts
    175

    Re: Do C++ programmers need to know Linux perfectly as well?

    Going to C is backing one step, while a clever person moves frontwards. I'm a fan of C++ and will never leave it for c.
    Thanks very much for your comments.

  15. #15
    Join Date
    Feb 2017
    Posts
    677

    Re: Do C++ programmers need to know Linux perfectly as well?

    Quote Originally Posted by 2kaud View Post
    Yeah, Wolle deleted his post (moderators can still see it though!) - naughty. [Wolle, do you want it restored as that post is referenced in subsequent posts?]
    I deleted the post on my own initiative because I realized it might be offensive to Linux/C programmers.

    Each forum has a limit for what's passable and I didn't want to push it but if you feel it's acceptable please restore it.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured