Hi!

Soon I’ll have my little nephew (13) in my company to check out software development for a week.

I’m working with large industry machines in real time Linux systems, so obviously I’d show him my test machine and if the customer agrees, I can show him some robots as well.
Also, he will get some crash course in computer basics.

He is an avid gamer - although not really good with computers.

I’ve gifted him a still nice laptop with Linux and Steam installed 1-2 years ago and he happily played Minecraft, but after some time he went back to his Switch 2.

Now he uses my Steam Deck - although that doesn’t make that much of a difference…

I’d like to give him something fun as an exercise, that’s is early rewarding.

Perfect would be, if he could code himself a little computer game, but that’s completely out of my normal work stuff and I don’t know what good options are available.

I guess starting with C++ and an Unreal engine or similar is more than an overkill.

Is there something, that is teaching the basics and gives rather quick rewards, which can produce a little something after 2-3 days?

Thank you all in advance!

  • bold_omi@lemmy.today
    link
    fedilink
    arrow-up
    2
    ·
    20 days ago

    As a person who started with high-level languages, I will say that they severely hinder one’s understanding of how systems really work. I recommend having him start out with the C programming language or a similar low-level language.

    Some exercises that you could have him do include:

    • Programming a ranked-choice-voting algorithm
    • Writing a program that takes a PPM image (I have never seen an easier image file format to work with) and performs a box blur with the surrounding pixels, spitting out the new image to a file
    • Writing a text adventure in the terminal. Don’t force him to use regex, though. Just have it have numbered options.

    On programming games:

    If you want him to program a game for himself, I would recommend SDL (SDL2 or SDL3) if he’s doing it in C. It may be in his interests to program the game in another language than C, though, since C can be difficult to program games in, for beginners.

    Some good ideas for a game to start out with are Yahtzee (like the KDE program Kiriki), Minesweeper, Pong, or Breakout. If he’s doing it with a game engine, I recommend having him start out with Godot. It’s FLOSS, and GDScript is easy to learn.

    • naeap@sopuli.xyzOP
      link
      fedilink
      arrow-up
      1
      ·
      20 days ago

      Yeah, I started with turbo Pascal and C/C++, and that gave me quite some advantage to understand more modern concepts

      But he is too computer illiterate for that at the moment.

      I’m not sure, if this will be too much just to have some hello world and calculator examples done, that probably aren’t as exciting.

      He probably won’t be a developer in the future, but I want to give him some understanding and insight on the fun with it.

      If he would be with me for a month, C/C++ and an automatic cat toilet control would be the task.

      But a week isn’t much.

      I’ll probably make one day, where I show different coding language concepts.

      I’ll probably do also a day about logic gates and elementary logic. Maybe here a C++ hello world could actually spice up things ;⁠-⁠)

      • bold_omi@lemmy.today
        link
        fedilink
        arrow-up
        2
        ·
        20 days ago

        Maybe. C++ is very complex, and has a lot of footguns, which is why I recommend avoiding it when possible. Giving a memory-unsafe language like C object-oriented capabilities was like giving a toddler a gun.

        I think Minesweeper or Breakout in Godot would be good projects to give him that would take him a few hours. I wish you well in teaching him!

  • endless_nameless@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    27 days ago

    Please not javascript or python. You have the right idea starting with C++ but C might be an even better place to start. 13 is old enough to comprehend the fundamentals. I learned programming on my own by starting at the top and working down, and I really regret it. Starting from the bottom and working up would have made me a much stronger programmer much sooner. I was 10 at the time and I wouldn’t have been able to comprehend it all, but by 13 I would have been able, with a good teacher.

  • rozodru@piefed.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    27 days ago

    Godot has a series of tutorials focused at kids looking to make their first game. should check that out. Godot is really easy to use.

    Or you could go the route that many of us did way back in the day with geocities and set up a neocities account and learn the basics of HTML. they can set up their own little website for whatever their passion is. HTML, IMHO, is a great introduction to coding.

    • naeap@sopuli.xyzOP
      link
      fedilink
      arrow-up
      1
      ·
      27 days ago

      Sending Godot recommendation

      Ok, I’ll need to look into that, thanks :⁠-⁠)

  • Akagigahara@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    27 days ago

    I can recommend a game called “The Farmer was Replaced”. It’s a game about controlling a drone over a field via python scripts. You can use an in-game editor or you can use a third-party editor. Personally, I quite enjoy the game for playfully interacting with coding.

    • naeap@sopuli.xyzOP
      link
      fedilink
      arrow-up
      1
      ·
      27 days ago

      Uh, that sounds pretty cool

      Thank you!

      Edit: ok, had a first look, but I think, this is a winner
      Thank you very much, that seems to be absolutely perfect!

    • naeap@sopuli.xyzOP
      link
      fedilink
      arrow-up
      1
      ·
      27 days ago

      Yeah, scratch rings a bell

      I think, I even installed it on his laptop as I set it up

      Maybe that’s a good starting point, thanks