Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: C, C++ and C# beginner's questions  (Read 14441 times)

0 Members and 1 Guest are viewing this topic.

MIRKOSOFT

    Topic Starter


    Hopeful

    Thanked: 2
    C, C++ and C# beginner's questions
    « on: August 23, 2018, 06:14:34 PM »
    Hi!

    I want to learn step by step following programming languages:
    C
    C++
    C#

    I know good VB6, in VB.NET have not so big skills and assemblers of 8-bit computers families perfectly.

    My Qs are for me important and new way to programming between platforms.
    So C.
    I want to begin with this basic PL and Q is simple - is C++ backward fully compatible with C?
    Why? Writting code in Visual C++ will make any problems with code written in C?

    Q2: C# is sucessor of C++ - or it is mistake? If is successor, is backward compatible with C++ or even C?

    Thank you for helping me how to decide which IDE to select at begin.

    Miro

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: C, C++ and C# beginner's questions
    « Reply #1 on: August 23, 2018, 11:09:05 PM »
    Provide more information about yourself.
    Not personal, but give everyone an idea about your age, education and background.
    More important, what are your goals?

    C++ is now already an old horse. If you are a good coder, you can get a job now. But  some point in time you will not advance unless you are an exceptional individual.

    What I want to say is there is more than the  the choice of what tool your use to do your work.  Future technology is making code creation a lessor skill.  Computers can generate code as good as most people. The people who advance have a skill set grater that just knowing programming languages and doing just code.

    What other skills  or interests do you have outside of computers?
    Do you play a musical instrument?
    Have you traveled to other countries?
    In school, did you get top grades in math?
    What is your favorite for of recreation?
    Can you fly a plane?
    Do you play basketball with friends?
    Can you repair a sewing machine?
    What kind of work have done well outside of computers?
    Did you ever wok tin construction?
    You answers might make a difference in your choices.

    Back to your question. Some experts say C++ will become less important. But it will  not disappear, but it will yield to a better method of solving problems.

    Not what I say. Look at what they say:
    http://trevorjim.com/c-and-c++-are-dead-like-cobol-in-2017/
    Quote
    And yet, I am confident in saying that C and C++ are, essentially, dead, like a chicken without a head that is still wandering the barnyard.

    Teach Yourself Programming in Ten Years
    Quote
    Researchers (Bloom (1985), Bryan & Harter (1899), Hayes (1989), Simmon & Chase (1973)) have shown it takes about ten years to develop expertise in any of a wide variety of areas, including chess playing, music composition, telegraph operation, painting, piano playing, swimming, tennis, and research in neuropsychology and topology. The key is deliberative practice: not just doing it again and again

    Robotics is now and future. It has a wide range of tools
    https://blog.robotiq.com/what-is-the-best-programming-language-for-robotics
    Quote
    It's a question that a lot of new roboticists will ask at least once in their career. Unfortunately, it's also a question which doesn’t have a simple answer. In this post, we’ll look at the top 10 most popular programming languages used in robotics. We’ll discuss their strengths and weaknesses, as well as reasons for and against using them.

    Those three offer a wide variety of ideas about what is important.
    Now look at this after yum read the above links.
    https://www.cnbc.com/2018/04/12/the-10-best-cities-for-job-seekers-in-2018.html
    Are you willing to move to any of these high tech cities?
    If your are really good, they will offer you  a job in California.
    (No, I am not saying that just because I worked as a programmer once in Santa Clara. Actually, I was not a good programmer,  I was hired barbecue I was a super technician. No joke. There was a need for who could test hardware.)  :D
    « Last Edit: August 23, 2018, 11:24:53 PM by Geek-9pm »

    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: C, C++ and C# beginner's questions
    « Reply #2 on: August 24, 2018, 12:23:00 AM »
    is C++ backward fully compatible with C?
    Except for Minor details, C++ is a superset of C.

    Quote
    Why? Writting code in Visual C++ will make any problems with code written in C?

    If you give the source files the .C file extension, then MS Visual C++ will treat those source files as C code.

    Quote
    Q2: C# is sucessor of C++ - or it is mistake? If is successor, is backward compatible with C++ or even C?
    C# is a wholly and completely different programming language from either C or C++. A better example of a language that is a "successor" to C++ would probably be The D Programming Language.


    Quote
    C++ is now already an old horse. If you are a good coder, you can get a job now. But  some point in time you will not advance unless you are an exceptional individual.

    I imagine you aren't keeping up with stuff in this domain, but C++ has been updated relatively frequently and standardized versions are released every few years. The majority of modern software is written in C++. The browser you are using was probably written in C++, for example. Most Popular 'mainstream' video games are written in C++ as well.

    Quote
    Not what I say. Look at what they say:
    http://trevorjim.com/c-and-c++-are-dead-like-cobol-in-2017/

    A lot of people say C and/or C++ are dead. A lot of people have been saying that for years. C/C++ was "dead like COBOL" to people like the author in 1996 because Java would take over the world; The problem is that people like the author of that post live in some kind of strange fantasy world, where every use case can scale horizontally and nobody cares about clock cycles and performance anymore.

    From the article:

    Quote
    The web is being written in Ruby, PHP, and Javascript

    Quote
    “Enterprise” applications are being written in Java and .NET languages

    Quote
    Smartphone applications are being written in Java and Swift

    Quote
    Academia uses Python, R, Haskell, Ocaml

    Ironically, this presents a good argument against C/C++ being "dead". Ruby, PHP, Javascript, Java, .NET, Swift and  Python are all written in C or C++. Only Haskell and OCaml are self-hosting and both had to be "bootstrapped" via a C implementation.

    The author is clearly ignorant to how pervasive both C and C++ are. It's ubiquitous for most embedded programming, for example, You aren't going to waste precious memory and waste clock cycles running  a language interpreter for another language because that language is "safe" (however he defines that, I don't know!). even on any other platform, where some trendy hippie developer like this guy chooses Ruby on Rails or Sapphire on Train Tracks or Bactrian OCaml in the Desert or whatever is trendy, it is still relying on an Operating System, Application Stack, Libraries, Development software, and probably even the language implementation itself written and maintained in C/C++. You dig deep enough- there's C/C++. Android is written in C/C++.

    He brings up Android for example. " Android has always used Java"... Well, yeah, for the actual Platform. Android *itself* is written in C++. I wonder why Android is written in a "dead language"?

    And he uses the TIOBE index as a data source here. the TIOBE index is basically an indicator of what languages are currently "trendy" for new development. It doesn't indicate what languages are *getting things done right now*.
    I was trying to dereference Null Pointers before it was cool.

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: C, C++ and C# beginner's questions
    « Reply #3 on: August 24, 2018, 09:07:47 AM »
    The old languages are dead in the sense that they are seldom, if ever, used for new work. This is not my observation, it comes from people in the industry who are working now on modern problems.

    For  what it is worth, COBOL was the only thing for which I  got formal taring. When I finally got a real job it was for development of hard drive platter test  machines written in 8080 assembly.  Earlier I had taught myself how to write assembly from a short article written by Bill Gates.


    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: C, C++ and C# beginner's questions
    « Reply #4 on: August 24, 2018, 11:29:55 AM »
    The old languages are dead in the sense that they are seldom, if ever, used for new work.
    And yet they aren't dead in the sense that they are used to construct and maintain the "new languages" that *are* used for "new work", (are the language interpreter/compilers somehow not new work?) Even those that aren't written in C/C++ directly rely on software which itself is maintained in those languages. For example, Rust, the programming language that the author of  the aforementioned article seems to prefer, wasn't written in C/C++... but, it uses LLVM which *is* written and maintained in C/C++.

    Also worthwhile to mention that most software development work isn't "new" work to begin with- it's maintenance on "old" work.
    I was trying to dereference Null Pointers before it was cool.

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: C, C++ and C# beginner's questions
    « Reply #5 on: August 24, 2018, 12:56:08 PM »
    BC, your argument is invalid.
    Think about it.
    Everything s written in machine code at the lowest level.

    Here something for you:
    http://www.aosabook.org/en/500L/a-python-interpreter-written-in-python.html
    Quote
    Byterun is a Python interpreter implemented in Python. Through my work on Byterun, I was surprised and delighted to discover that the fundamental structure of the Python interpreter fits easily into the 500-line size restriction. This chapter will walk through the structure of the interpreter and give you enough context to explore it further. The goal is not to explain everything there is to know about interpreters—like so many interesting areas of programming and computer science, you could devote years to developing a deep understanding of the topic.

    This is also true of other 'High-Level' languages.
    « Last Edit: August 24, 2018, 01:08:29 PM by Geek-9pm »

    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: C, C++ and C# beginner's questions
    « Reply #6 on: August 24, 2018, 05:55:15 PM »
    Everything s written in machine code at the lowest level.

    At the lowest level everything is executed in machine code. But it is not written in machine code. It's not the same thing. The basis of my argument is not that running a high level language means that code needs to get "translated" to C/C++, because it doesn't, but that there is literal software directly written, by people, in C/C++ that makes it happen. Microsoft Windows is written in C/C++. Linux is written in C. The official releases of the .NET Runtime as with the Java runtime are both written in and actively maintained in C/C++. PHP is written and actively Maintained in C/C++, as is Ruby and many other Trendy high level languages that pepper the CVs of today's scarf-wearing, soylent drinking "developers".

    It's an altogether different scenario from your analogy with the underlying Machine code because the C/C++ codebases are being actively developed; they aren't an intermediary result generated automatically.

    Quote
    ere something for you:
    http://www.aosabook.org/en/500L/a-python-interpreter-written-in-python.html
    This is also true of other 'High-Level' languages.

    As explained in an early paragraph, that is a Python Interpreter in the sense that it is for interpreting the Python Bytecode generated by the parser/lexer. There is no parser/lexer implemented here- you cannot run a Python script with this, and it's not designed that way. In any case, Python is already "bootstrapped" via PyPy, but it's not the standard CPython implementation and has not replaced CPython. PyPy is an example where C is "present" but wouldn't be part of my argument- PyPy can compile itself by translating to C and then compiling with C, but it's not "written" in C nor maintained in C.

    Unlike compilers this problem may be somewhat inescapable for many languages, though. With many of the languages in question they simply don't have the low level chops to allow them to self-bootstrap their own runtimes. The D Programming language that I mentioned before is "bootstrapped" because it's compiler and it's runtime are now written in D: this is possible largely because with D you can basically turn off a lot of features like Garbage collection and have D function at a very low level, Which allows the environment to be constructed from a base- the D runtime is written in D, but it doesn't need a D Runtime itself because it's "low-level" D. The same story is true for Rust; it has some advanced features like those found in higher level language frameworks, but they are not "mandatory" features so it was possible to write the appropriate runtime for Rust within Rust itself without also depending on another Rust implementation.

    Anyway, as a result, languages that cannot self-bootstrap need to have their runtimes and/or compilers written in languages that can, and this has almost exclusively been C/C++.
    I was trying to dereference Null Pointers before it was cool.

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: C, C++ and C# beginner's questions
    « Reply #7 on: August 24, 2018, 09:24:52 PM »
    The Sun JVM is written in C, JVM run on your machine is a platform-dependent executable and hence could have been originally written in any language. The Oracle JVM (HotSpot) is written in the C++ programming language . Java Compiler provided By Oracle is written in Java itself..Jan 15, 201

    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: C, C++ and C# beginner's questions
    « Reply #8 on: August 25, 2018, 01:17:59 AM »
    JVM run on your machine is a platform-dependent executable and hence could have been originally written in any language.
    It would be effectively impossible to write The Java Virtual Machine directly in Pure Java because Java itself must run on top of an existing Virtual Machine. Without the ability for a language to run without that runtime, it would be impossible to write the required runtime for the language in said language. The Rust/D example is prominent here. With D for example you can have a garbage collected, managed environment somewhat like Java or C#. However you can also "turn that all off" and run much "closer to the metal"; As I mentioned, this what allowed D to be fully "bootstrapped" with D as it allowed the D Runtimes that provide garbage collection to be written in D.




    Quote
    Java Compiler provided By Oracle is written in Java itself..Jan 15, 2010

    Yep, javac has been written in Java for a while. This is one specific example why I said "languages that cannot self-bootstrap need to have their runtimes and/or compilers written in languages that can". What makes relatively more recent languages unique in terms of this sort of bootstrapping is that the "compilers" are actually compiling to an intermediate language which requires yet another piece of software to actually run. This makes 'complete' bootstrapping quite difficult. Writing the compiler is one thing, writing a run-time in the language that requires that very run-time is another. With Java for example it would be quite possible to write a run-time in Java; but that runtime would itself be running on another more conventional Java run-time... If you were to run that run-time on an instance of itself, than that instance would need to also run on a run-time and so on. "Bootstrapping" in this context unfortunately requires language/platform features that aren't available in all languages- specifically, the ability to "turn off" and not require specific runtime aspects so that you can then write those aspects in that language.
    I was trying to dereference Null Pointers before it was cool.

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: C, C++ and C# beginner's questions
    « Reply #9 on: August 25, 2018, 10:47:50 AM »
    The OP has not responded.
    My original point was that he ought to consider his own goals before spending a lot of time getting into stuff that will be used only by a small group of very smart people.

    He might not be the kind of person that would do well in system-level programming. In the future, most work will be done at  another area outside of traditional C and c++ stuff that some think is the most important thing in their life.

    MIRKOSOFT

      Topic Starter


      Hopeful

      Thanked: 2
      Re: C, C++ and C# beginner's questions
      « Reply #10 on: August 25, 2018, 07:57:09 PM »
      Hi!

      Many thanks for all recommendations.
      But really simple Q began big discussion or war of programmers...

      Now I know the main for me: I can use C in Visual C++ and later use C++ in the same.
      C# will go aside.

      To low and high level programming languages:

      For many people looks assembler like lowest level PL.
      No, exist lower - and it is machine language monitor - but even this is not lowest.
      MLM in style provides no labels, macros etc., only values and addresses and by naming opcodes it makes more easier to use.
      But when we want to find lower level - look at command M in machine language monitor:
      M 1000 F800
      displays values and their ASCII codes in range of $1000 to $F800 of memory of computer or disk or other media and we can edit values by typing hexadecial numbers to wished positions.
      But again - it is not lowest level, computer works with bits and bit is like switch - state on - or 1, and state off - or 0.
      When we want to represent 8-bit number we need to set 8 switches.
      Even lower?
      Yes - but it is outside programming and going to design - switches - and now really switches and swapping their position is manual working with bits or so - and it was only one level of computer control in age of their birth.

      So - what I want to say? I don't want to make me any wise man - I want to show to you all that talking about what is compiled by or what is lowest level or what needs to compile is all outside my Q and it is for each programmer personal Q.
      Somebody preferre one, another preferree other - no matter what needs/compiles or is lowest/native level.

      My Q was sucesfully answered in post what can compile Visual C++ and what is C#. Answer is that for using C and C++ is enough Visual C++ and C# is not successor of C++.
      Please don't crucify me for written lines and my decision for Visual C++.

      Thank you all.
      Miro

      Geek-9pm


        Mastermind
      • Geek After Dark
      • Thanked: 1026
        • Gekk9pm bnlog
      • Certifications: List
      • Computer: Specs
      • Experience: Expert
      • OS: Windows 10
      Re: C, C++ and C# beginner's questions
      « Reply #11 on: August 25, 2018, 10:22:13 PM »
      MIRKOSOFT,
      C ad C++ are good for medium and low level programming at the present time.
      In the future other tools will be used. But which ones is not yet certain.  ;)

      You can get free version of Microsoft Visual Studio, which can be used for a very wide range of applications.  For more info see:
      https://visualstudio.microsoft.com/free-developer-offers/

      MIRKOSOFT

        Topic Starter


        Hopeful

        Thanked: 2
        Re: C, C++ and C# beginner's questions
        « Reply #12 on: August 26, 2018, 08:18:01 AM »
        I know about Visual Studio and using it for years.
        Yet only Visual Basic.

        Other development tools for assembly programming of 8 and 16-bit computers are not common for allplatforms I'm using.
        There's no that way, some only in cross platform tools.

        Thank you for recommendation.
        I own long time paid version of VS6 which gave me friend as a gift to realize myself. I know that VS6 is from year 1998...
        At that time I knew not full price of that gift - if I could know, I could buy him car or house :)
        Maybe you think it was stolen software - really not, he was asking his chief in software development company and it was successful 'cause his knowledge for company was important.
        Sometimes happens anything like from dreams...

        Miro

        Geek-9pm


          Mastermind
        • Geek After Dark
        • Thanked: 1026
          • Gekk9pm bnlog
        • Certifications: List
        • Computer: Specs
        • Experience: Expert
        • OS: Windows 10
        Re: C, C++ and C# beginner's questions
        « Reply #13 on: August 26, 2018, 02:41:42 PM »
        MIRKOSOFT,
        Thank you for sharing.
        Many years ago I studied VB6 for awhile. But I had never used it for commercial work.
        If you consider yourself good at VB6, you can get a job doing maintenance on legacy code. **

        For new applicationsVB6  is no longer a good choice. Because Microsoft has moved on to offer other tools for developers, you would want to use the newer products.
        Quote
        Many of us have ""moved on"". Some of us long ago.
        Having used .NET since '05, I wish I hadn't held onto VB6 for as long as I did. It held me back, it held my company back, and it cost me tons of money converting all of the code we wrote in VB6 to .NET later.
        Now that I'm done with it, I can honestly say that there's no amount of money that would get me to take any job using VB6.
        That said, you'll find a few of groups of people that still work with it.
        From: https://it.toolbox.com/question/whats-the-future-of-vb6-042914

        ** Do a search on :
        jobs for VB6 programming
        There are well over 100 employers looking for good VB6 people. Now.

        You might consider joining linkedin.com. Look at this:
        https://www.linkedin.com/jobs/vb6-jobs
        Quote
        Job description
        Our company is Norman Window Fashions and we have been in the window covering industry for more than 30 years, we are growing and we are seeking candidates for our Programmer/Analyst position here at our Corporate Office in Santa Fe Springs.
        Under direction and supervision, the VB/Vb.Net Developer will provide technical programming and database expertise to solve complex business processes. Formulates and devises application scope and objectives. The Programmer/ Analyst will prepare detailed specifications, program design, program coding, testing, debugging and documentation in support of existing and new Care1st application systems.

        Linkedin is a social forum like Facebook. Many professionals are there.
        Hope you find want you want.  :)

        MIRKOSOFT

          Topic Starter


          Hopeful

          Thanked: 2
          Re: C, C++ and C# beginner's questions
          « Reply #14 on: August 28, 2018, 05:19:42 PM »
          Thank you for offers.

          Here's problem - I'm living in Eastern Europe - Slovakia, so these offers are for me not relevant.
          But it is good to know that somewhere is possible to get work by VB6.

          Really what I'll do for now - learning C and then C++.
          I'm unemployed, but I'm invalid pensioner, so I have bit of money each month, but it is not good choice.

          I'm coding for my hobby and also in hobby are retrocomputers too.
          So, my knowledge is from more ways.
          When I was on high school, I got ill and it caused going to hospital for long time and my parents must to end my studying.
          This is reason why to get work is near impossible - not finished high school...

          Ok, lot of things which are personal, but I wrote it 'cause I'm not liar and I believe in truth.

          Thank you again.
          Miro