Hi everyone,

TL;DR Completely new to coding and programming, but I want to learn enough to be able to run a home server, my own website and tinker a bit with Arduino. Is there any programming language or path that you could recommend?

I don’t know if those things are related or not. I’ve been looking at books a bout Arduino, but it’s just following instructions to do xyz, but not explanation of the basics.

About the server and website, I’ve wanted to try it out since I stumbled upon the Low tech magazine. Many of the projects there and the philosophy behind it speak to me, so I would like to be more knowledgeable about it and be able to do some stuff myself.

EDIT. You guys are awesome! Thank you so much for the replies. It’s so cool to see Lemmy populated with cool people willing to chat and put knowledge in common :) I might be updating this post when I get to do something about… well all the resources you gave me!

  • ericjmorey@programming.dev
    link
    fedilink
    arrow-up
    11
    arrow-down
    1
    ·
    edit-2
    8 months ago

    The most pragmatic answer is to learn Python.

    The most pragmatic approach to that is Automate The Boring Stuff with Python which is free to read online. But it might be a little dated and you said you want to learn some basics which I take to understand as underling fundamental theory of programming which it doesn’t provide.

    Think Python, 3rd edition, which is also free to read online and was just updated to use Jupyter Notebooks, is a great introduction to the fundamentals of programming theory, but it is lengthier and will take more time to get to practical projects.

    If you really want to get into an introduction to Computer Science theory, it would be hard to find a better introduction than A Data-Centric Introduction to Computing which is used at Brown University as well as others in their introductory Computer Science courses. It’s can also be read online for free.

    For website things, the MDN Web Docs hosted by Mozilla is the best resource out there.

    For Linux server stuff, Linux Upskill Challenge is a wonderful resource.

    Have fun!

    • Beardedleftist@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      8 months ago

      Automate the boring stuff with Python sounds like something I would enjoy reading, even if it’s a bit outdated. Mozilla’s website seems a good approach for me too, since it starts from complete beginners.

      I don’t think I have the time to learn much about computer science theory if it’s not something mandatory. Linux, on the other hand, is something I’m somewhat familiar too (I’ve used it a lot for uni and such as a “distraction free” OS haha) and it looks like any server that I could run on a Raspberry or similar is going to be running Linux.

      Thanks for the information!

      • ericjmorey@programming.dev
        link
        fedilink
        arrow-up
        4
        arrow-down
        1
        ·
        edit-2
        8 months ago

        The good news is that the author has a third edition coming out with updated material. But it won’t be ready until August 2024. I’m assuming you won’t want to wait for that, so I suggest using the current edition to get used to the language and then going through the list of updates and differences in the blog post and “figuring out” how to do some of them on your own.

        Also, the author has a book for people who finished Automate the Boring Stuff and want more guidance on good, effective practices with less focus on people with no prior knowledge of programming, Beyond the Basic Stuff with Python, is also available to read for free online.

        I should mention that if you have the means, I encourage you to pay for the eBook version of these books on the publisher’s website since this allows the author to continue creating updated and high quality content that’s free for those who feel that $35 is a strain on their budget. If not, no worries, that’s why I paid for his first edition a while back. Al is pretty active online and in the fediverse (@[email protected]) and seems like a good dude. He deserves some love, so please give him a thank you at a minimum.

        This was a weirdly long reply, but I hope other people subscribed to the Learn Programming community on Programming.dev see it and find some value in it too.

        • Beardedleftist@lemmy.mlOP
          link
          fedilink
          arrow-up
          2
          arrow-down
          1
          ·
          8 months ago

          I’m all about free use and distribution of all kind of content, but also a big believer of patronage and supporting what actually made a difference in your life (because you learnt from it or just because it brought you enough joy, so to speak). I will definitely chip in!

          I like how posts and replies tend to be longer here than in other platforms. It feels more like talking to actual people, and makes Lemmy less noise polluted I would say, so your reply was a very welcomed read!

  • h3ndrik@feddit.de
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    8 months ago

    Nice picks for hobbies. I’d just like to say that all of that are rabbit holes with quite some span and things to learn… Tinkering with electronics, learning how to program and webservers and sysadmin stuff like networking and services deployment.

    Considering the self-hosting I’d recommend to start out with an out-of-the-box solution. Like yunohost.org or DietPI or a few others. It gets you some results and is usable in the real world without studying textbooks and larning Docker and Linux for a few weeks full-time.

    With programming Arduinos and microcontrollers: Have a look at projects like MicroPython and CircuitPython. You can also install the Arduino IDE and see if you like it but programming in C is a steep learning curve. Maybe less suited as a first programming language. I can recommend the ESP32 microcontrollers. They’re awesome and have wifi and you can do lots of home automation projects in addition to everything an Arduino can do.

    I think neither of that is low-tech. The chips and software itself are state-of-the-art technology. From my perspective you’d need to add the “low”-aspect with some context. Make them solar-powered or host a blog on those services.

    • Beardedleftist@lemmy.mlOP
      link
      fedilink
      arrow-up
      2
      ·
      8 months ago

      It is true that I thought it would be easier to know what learning is essential to me and not. I find myself now saving stuff for later and with loads of new stuff that I didn’t even know that existed before haha So far it’s fun though! I’ll probably stick to python and learn a bit of HTML and CSS for now.

      I think neither of that is low-tech. The chips and software itself are state-of-the-art technology. From my perspective you’d need to add the “low”-aspect with some context. Make them solar-powered or host a blog on those services.

      This is something I plan on doing. Going solar is something I definitely want to do for my website and, to be honest, I want to learn more about electronics for that same reason. It would be a sin not to since I live in Spain lol

      • h3ndrik@feddit.de
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        8 months ago

        Spain? Nice. The low tech magazine is operated from Barcelona. I’m occasionally envious about the amount of sun and the temperatures in late autumn while it’s cloudy and rainy here in Germany…

        Yeah. I’d pick something to start with. Depending on how much you want to delve down, it’s quite some amount of time you can sink into every individual field. And if you’re like me and constantly try too much at the same time, you’ll either get overwhelmed/disappointed from time to time because there isn’t much progress. Or end up with the drawer of unfinished electronics projects we all have 🤣

        But that shouldn’t stop you. And that’s mostly something you should keep in mind while starting out. Luckily we have tons of tutorial videos, online documentation and stuff available to us. If you start with some pre-made stuff and already existing projects it’ll make it considerably easier to get some results early on.

        I mean you do you. I’ve learned programming from textbooks and I think this is the way. At least it teaches you things properly and why you do something instead of just copying code. It takes some patience, though. I don’t know what learning type you are. I think computer stuff and social degrees require a bit different ways of thinking. But it’s not rocket science. Just have fun and explore. If you experience major setbacks or want to get a bit more serious, consider going to the library and get a book on Python or find one online (or a course).

        Hosting stuff on your Raspberry is also rewarding. But I’d really consider starting with something pre-configured. All the sys-admin stuff (when starting from scratch) takes a good amount of knowledge with several topics, and some experience with the specific tools and frameworks. Other people might disagree but I think it’s less rewarding than for example programming and you’ll get a steep learning curve early on. On the other hand it’s super useful to run your own internet services. And we have the projects available that make it easier.

        So, happy tinkering… Keep us posted in case you start another low-tech blog coming from Spain to us. And don’t let any complexity stop you 😊

        • Beardedleftist@lemmy.mlOP
          link
          fedilink
          arrow-up
          2
          ·
          8 months ago

          We’re suffering a serious drought here though, even Barcelona’s tap water might be not available this summer! We should split our sunny and rainy days! We visited Frankfurt and Heidelberg and loved the cold and rainy days… which makes sense: we barely had any winter this year 😅

          You make some good points, and being overwhelmed after trying to bite too much at once is something I’m used to, sadly, so I’ll try to think about how to approach all this. Probably pre-configured hosting as you said, so I can see the website running sooner, and we’ll then see how it goes or what calls my attention!

          So, happy tinkering… Keep us posted in case you start another low-tech blog coming from Spain to us. And don’t let any complexity stop you 😊

          That would be so cool! I don’t know much about practical stuff, but I plan on putting my reflections about morals and society online. It would be nice to have some kind of low-tech website like that and inspire some conversation on the topics. I’ll keep you guys posted for sure!

          PS: I’m pretty sure I had a coffee with Kris, but I didn’t know about the website back then. I thought it was a cool guy, we had a good time (well me at least lol).

          • h3ndrik@feddit.de
            link
            fedilink
            arrow-up
            2
            ·
            edit-2
            8 months ago

            […] serious drought […]

            Sh*t, damn climate. Yeah I remember that being covered on TV and them saying it’s a catastrophe in Catalonia for several consecutive years now. I kind of forgot, because nowadays all the news is about Trump or Putin or Gaza (or our own issues). Wish I could send you some low-pressure weather areas. And I probably also owe some water to the south, because I occasionally buy paprika and other fruits from there. I think this year we got enough rain here in North Rhine-Westphalia so the water levels recovered a bit. I don’t really know what to say… It’s unfair. And one of the major tasks to tackle in the very near future… Probably also a really big investment to sustain a major city.

            I’m pretty sure I had coffee with Kris

            Hehe. Every so often I check that site and see what’s new. I think the solar powered website is an awesome project. I always wanted one, too. And I already have a small solar panel. Unfortunately the house is facing all sorts of directions, but there isn’t any surface pointing to the south. I’ve tried running an Raspberry from it but that draws too much power and I’d need a bigger solar panel for an usual day. Maybe I should try a more efficient ESP32 and see if anyone implemented a proper webserver for that.

  • CameronDev@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    8 months ago

    Regarding home server, get yourself a Raspberry Pi. Doesnt need to be the latest one, whatever you can find. You can install linux and get yourself a webserver up and running in no time. Check out any of the selfhosting communites for more ideas. Be aware that this is not really programming, its more system administration, although the line can get blurry.

    As for arduino, my advice is to hop on aliexpress, and get some ESP32 dev boards (Comes with wifi, bluetooth, and supported by arduino IDE. RP2040 also viable), and some sensors (temp, humidity, airquality, whatever, displays?). Work out how to interface the sensors with the esp32 to output the sensor values to a webpage (or some other interface). All the parts are inexpensive, so I suggest getting multiples as youll probably kill one or two when wiring them up. Youll probably need dupont jumper cables as well, and maybe access to a soldering iron, but you should be able to go a long way with dev boards.

    I personally find learning by doing is going to be better than reading books and articles, but your learning style may be different.

    • Beardedleftist@lemmy.mlOP
      link
      fedilink
      arrow-up
      2
      ·
      8 months ago

      My brother-in-law gave me a Raspberry P1, so I might be able to do something! I’ll be checking those communities, thank you!

      As for Arduino, I bought years ago an Arduino Super (?), but it doesn’t have wifi nor bluetooth is it essential, or I could use this one? I’ll have a look at those sensors. It came with a little screen, so I might be able to do some of that!

      Probably because of my background I’m used to learning and understanding something before getting my hands dirty, so to speak. This might prove as a good chance to try another approach. Thank you!

      • JackbyDev@programming.dev
        link
        fedilink
        English
        arrow-up
        2
        ·
        8 months ago

        Your Arduino not having Bluetooth or WiFi is fine (obviously depending on what you want to do with it). Arduinos are for much lower level projects than PIs. Where a PI might run a webserver, an Arduino might just start and stop things based on timers.

      • CameronDev@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        8 months ago

        No wifi is fine, my first arduino was a regular one, but I’ve found that its kinda limited. Making an LED blink is a bit dull. But given it has a screen, you can probably display the sensor data on it, so its probably worth starting with it? Like i said, parts are inexpensive, so upgrading later is a recompile away.

  • m_randall@sh.itjust.works
    link
    fedilink
    arrow-up
    1
    ·
    8 months ago

    Do you have more specific goals? Running a home server and website isn’t really programming, more sysadmin work. If you want your website to be a web app that’s a different story.

    For arduino work C would be the most directly relatable. It’s a simple language but can be a bit tricky since the language itself doesn’t do much hand holding for you. Arduino does make it a bit easier though.

    The C Programming Language is probably the best programming book ever written for any language.

    • Beardedleftist@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      8 months ago

      Since I don’t quite understand how all this works (in fact, my field are humanities and sociology lol) I can only talk about what I’ve seen surfing. A website that I could host and requires little to run sounds super fun to me and also a nice way to dip my toes in this world, although I might be wrong about that.

      I recently discovered the Fediverse and matrix, and thought it would be neat to try to host my own stuff. But again, I don’t know how literate you need to be to do any of that, and I’m probably a few months away from even understanding the basics.

      Thanks for the reply! I’ll check if I can find the book in the public libraries nearby!

      • m_randall@sh.itjust.works
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        8 months ago

        All good. Learning and exploring is part of the journey! For example hosting a website can be as simple as running a program

        (egwhile true ; do nc -l -p 80 -c ‘echo -e “HTTP/1.1 200 OK\n\n $(date)”’; done)

        or as complicated as an entire application with multiple databases and processes.

        For your first goal - what do you want your website to do? Blog? A bio about yourself? Are you interested in creating the HTML or do you want to focus on getting someone else’s application (eg matrix) up and running?

        • Beardedleftist@lemmy.mlOP
          link
          fedilink
          arrow-up
          1
          ·
          8 months ago

          It would be nice to just have a blog up and running! This morning I stumbled upon this website https://alexw.nyc/, and I would be so happy to be able to make a website like that one, to be honest.

          Being able to host a matrix server o a pixelfed instance for me, family and friends is something that would be awesome, but probably too much for someone like me, at least for now. So I’d rather go with the website.

          PS: Whenever I see something like this I panic lol

          (egwhile true ; do nc -l -p 80 -c ‘echo -e “HTTP/1.1 200 OK\n\n $(date)”’; done)

          • m_randall@sh.itjust.works
            link
            fedilink
            arrow-up
            2
            ·
            8 months ago

            Excellent - that site is nice and basic. A good first project.

            Seek out some resources on HTML, CSS, basic Linux command line and nginx and start playing around. If you’re on a Mac you can do all this locally then rent a small VPS from digital ocean or the like for about $5/mo to host everything on the web when you’re ready. I can’t speak to options on windows.

            On your last comment it looks scary but if we break it down it’s not bad at all.

            while true ; do Programs are (super) basically made up of if “this” then do “this stuff”, and while “this thing” do “some stuff”. While true means run this next bit of code (until done) forever.

            nc -l -p 80 -c

            nc is a program (netcat) that reads/writes data to a network. - in Linux denote options for the program. These are saying listen, listen on port 80, and run a command.

            echo -e “HTTP/1.1 200 OK\n\n $(date)”’;

            The command netcat will run. This is HTTP protocol magicness and $(date) is a Linux command that prints the date.

            done Ends the loop

            Ez pz.

            If you have a Mac you can probably run this in terminal and check out what it does (do take care in running commands from the internet tho).

            • Beardedleftist@lemmy.mlOP
              link
              fedilink
              arrow-up
              1
              ·
              8 months ago

              Thanks for the explanation! Once you give everything a meaning it’s just another language I guess lol

              I’m not on a Mac, but I do have a PC running Ubuntu so maybe that works too (?)

              I’ll be looking for those resources you listed this week since we have some days off and see what I can come up with. With that and all the other suggestions I think I’m ready to do some stuff, build some break some and see how it goes haha

              Thanks again!

                • Beardedleftist@lemmy.mlOP
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  8 months ago

                  When I was a kid I was really into computers, so I met Linux back then. Nowadays, I just use it when I’m fed up with Windows or if I need to get work done since it’s distraction free and workspaces and hot corners make my life so much easier when working with multiple documents :)

                  Saved the website for later on!