Announcement

Collapse
No announcement yet.

Programming advice please

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Programming advice please

    I would like to try my hand at programming and am not at all sure where to start.

    I don't need coding for work, I am looking at trying it as a hobby. Maybe try making a little strategy game if I enjoy it.

    Which programming language would you recommend for a complete novice?

    i do not wish to spend money on anything expensive as this is just for personal interest.

    Thanks

  • #2
    I'd suggest starting with Assembler. It's a low level language so it's perfect for beginners.
    Libraries are state sanctioned, so they're technically engaged in privateering. - Felch
    I thought we're trying to have a serious discussion? It says serious in the thread title!- Al. B. Sure

    Comment


    • #3
      There are a couple of things to consider:

      1. Memory management: it's easier to learn a language that uses automatic memory management than a language that uses manual memory management, so when starting out you should steer clear of C/C++/Objective-C in favor of Java/C#/Scala/Python/Javascript/Ruby, and I also recommend steering clear of Swift as it's in a bit of an odd place in terms of memory management (it's "mostly" automatic but the programmer still needs to do some bookkeeping)

      2. Portability: C# isn't entirely supported outside of Windows (there's an implementation of the .net framework called Mono that you can run on Linux etc, but it usually doesn't support the full framework). Java/Scala/Python/Javascript/Ruby don't have this problem.

      3. Type system: Java and C# use a static type system, Scala uses a static type system with some type inference thrown in to eliminate some of the bookkeeping, Python/Javascript/Ruby use a dynamic type system. This is largely a matter of taste - static type systems require more programmer bookkeeping but also eliminate a lot of surprises at runtime, whereas dynamic type systems produce more compact code but can produce bugs that a static type system could have eliminated. I love static type systems, but YMMV.

      4. Language category: Javascript is a functional language, Scala is a functional/object-oriented hybrid, Java/C#/Python/Ruby are object-oriented. Functional languages encourage thinking in terms of immutable (fixed/constant/non-variable) data that's manipulated through chains of function calls, object-oriented languages encourage thinking in terms of mutable data that's hidden from parts of the program that shouldn't be ****ing with them. Object-oriented design tends to scale up better than functional design because there are some concepts that are difficult to express functionally (like shared state).

      5. Learning curve: I'd rank them in order of easiest to learn to most difficult to learn, Python > Ruby/Java/C# > Javascript > Scala

      *****

      So long story short, go with either Python or Java depending on whether you want a dynamic or static type system (or try them both to see which you prefer). They've both got a boatload of free tutorials online

      Also, I use Eclipse for my IDE (integrated development environment), which supports both Java and Python. IDEs are nice for learning programming because it'll do syntax highlighting and will flag your errors etc., and is also nice for intermediate/advanced programming because of things like debuggers (which let you step through a program's execution)
      <p style="font-size:1024px">HTML is disabled in signatures </p>

      Comment


      • #4
        Languages to avoid:

        Perl: Steep learning curve
        PHP: Awful garbage language for dummies
        Visual Basic: Learn C# instead
        SQL: You'll need to learn this eventually when you start talking to databases, but skip it for now
        Lisp: If you want to go into functional programming then there are better languages to learn
        <p style="font-size:1024px">HTML is disabled in signatures </p>

        Comment


        • #5
          Also, here's a rinky-dink example of what I mean by static vs dynamic types

          Compile-time is the stage when source code is translated into machine code or some intermediate code format (e.g. Java gets turned into bytecode, C# gets turned into CLR code, C++ gets turned into machine code). Runtime is when you actually execute the program.

          In a statically typed language I'd say
          int intNumber = 5;
          String strNumber = "5";
          int sum = intNumber + strNumber;

          "int" means that intNumber is an integer, "String" means that strNumber is a character string; the language won't let me add these two things together because they have incompatible types, so the "int sum = ..." line will produce an error at compile-time

          In a dynamically typed language I'd say something like
          var intNumber = 5;
          var strNumber = "5";
          var sum = intNumber + strNumber;

          The runtime system will see this and will automatically convert strNumber into an integer, so sum will equal 10. However,
          var sum = strNumber + intNumber
          will automatically convert intNumber into a string, so sum will equal "55". And
          5 + "wutang"
          will throw a runtime error because the runtime system can't convert "wutang" into a number (or in the case of awful garbage languages like PHP the runtime system might convert "wutang" into some bizarre number just for the hell of it). So dynamic type systems will let you do some things that static type systems won't allow, at the cost of being less predictable than static type systems.
          <p style="font-size:1024px">HTML is disabled in signatures </p>

          Comment


          • #6
            I started on QBasic 20ish years ago. The QBasic editor I used let you choose your background and foreground color. Early on, I decided on black and blue, and that's been my favorite color combination since. In conclusion, QBasic is the best programming language.
            Click here if you're having trouble sleeping.
            "We confess our little faults to persuade people that we have no large ones." - François de La Rochefoucauld

            Comment


            • #7
              In a normal dynamically typed language I'd say something like
              var intNumber = 5;
              var strNumber = "5";
              var sum = intNumber + strNumber;

              And the runtime will give me an error because autoconverting strings to numbers is retarded.

              I would personally recommend learning TypeScript. JavaScript is there to stay, and by learning TS you learn the better parts of JS as well.

              Combine it with Java/Kotlin or C# (which now runs on Linux) later and you're good to go.
              Graffiti in a public toilet
              Do not require skill or wit
              Among the **** we all are poets
              Among the poets we are ****.

              Comment


              • #8
                Thanks gents.

                I'll look at Python and Javascript recommended by Loinburger, including the "Typescript" recommended by Onodera

                Comment


                • #9
                  Since you're interested in games, C# ... mainly for Unity.

                  Dive right in with Unity (game engine) tutorials. You won't have much clue about the programming side of things, but can still do some pretty cool stuff right off the bat and their tutorials are pretty good at giving you some intermediate coding lessons. You will have to backfill on the language later, but you can still have a working (simple) game up in an hour or two.

                  Free tutorials, courses, and guided pathways for mastering real-time 3D development skills to make video games, VR, AR, and more.


                  Or you could do the same sort of thing with javascript if you're interested in open source.

                  Comment


                  • #10
                    Aeson. Those tutorials in the link seem to focus on "shooter" type games, which are of absolutely no interest to me.

                    Also, I'd rather a learn a bit of programming as who knows where that might lead if I find it interesting, and if I have an aptitude for it.

                    I did a very small amount of "BASIC" at University 20 years ago and it seems interesting.

                    Comment


                    • #11
                      The type of game isn't important.

                      Comment


                      • #12
                        Originally posted by onodera View Post
                        In a normal dynamically typed language
                        I figured my bias against dynamic typing was going to creep into that example...
                        <p style="font-size:1024px">HTML is disabled in signatures </p>

                        Comment


                        • #13
                          Reasons for not using php. (Try to ignore the Aeson color scheme)
                          With or without religion, you would have good people doing good things and evil people doing evil things. But for good people to do evil things, that takes religion.

                          Steven Weinberg

                          Comment


                          • #14
                            That looks nothing like orange soda.
                            No, I did not steal that from somebody on Something Awful.

                            Comment


                            • #15
                              I don't get why people whine about PHP. If you don't like it, there's plenty of other options. The vast majority of people building a website just want to one-click install their CMS or forum and be done with it, at most making some tweaks to the theme or layout (often enough not even touching the code then). This is why Wordpress alone powers abouut 25% of the internet, and why on sites with server side scripting, about 80% of them are using PHP. If all the people whining about PHP would build suitable platforms for doing that in other languages instead of whining about PHP maybe everyone wouldn't be using PHP.

                              And yah ... green ... WTF? I don't do black backgrounds either. Hurts my eyes and gives me flashbacks to the early 80's. I program in pastel colors on a clean white backdrop

                              Comment

                              Working...
                              X