I’ve always wanted to understand what is actually meant by this. I have wanted to get into programming for years, did some basic python and c, but could never really progress. Not necessarily a linux question but I know since most distros come with libraries already, it’s popular to use for programming.

I have trouble understanding what people are actually programming if it isn’t their job. Like, you go to your computer and start working on…what? I don’t know enough to make an entire program or debug a game, so im just unsure what people do especially when starting out.

Also I don’t really want to learn it for a job. I just want to learn it to know it. But im not sure how to apply it to anything realistic.

  • dream_weasel@sh.itjust.works
    link
    fedilink
    arrow-up
    10
    ·
    edit-2
    21 hours ago

    I wrote a little bit of code to tell me if or when my electricity would be cheaper if I used on demand pricing instead of flat rate. Basically anything you might use excel for could be a programming problem.

    For other hobby projects and “why Linux” it’s easier to sew things together than windows, generally speaking.

    Example:

    Every time I sit down at my PC the first thing I usually do is open a terminal: it is both my launcher and my file manager. I have several programs with TUI (terminal user interface) or text based API (which is an applied programming interface) and I keep my notes in plain text. One type of note I keep is an “atomic” note inside my zettelkasten (this is a fancy way of keeping track of ideas and the way they connect together, but you need to revisit them for it to be useful. Kinda like anki / spaced reputation I guess).

    So enough background, here’s the idea and the programming:

    • If I always open a terminal, it’s a good place to put stuff I want to see.

    • There are two things I want to see: twice a day I want to see a note, the rest of the time I want to see the 3 or 4 most important tasks on my todo list

    • I want randomized notes and I want it to be automatic.

    One of the easiest things you can do in a terminal is “echo” text. So I started by, in my terminal “rc” file (the configuration file that tells the terminal what to do when you start it) echoing my todo list as the very last step in the start process. Then it’s refinement. First don’t give me the whole list, use shell tools to show the head of the list. Now make a conditional statement that says “if there’s a file called “temp” in some folder give me the Todo list, otherwise do nothing”. Basically we follow the incremental logic train until you get the final product:

    • If no file exists, print a note (at random) and then make the file
    • If the file exists write part of the todo list
    • Every 6 hours, delete the file automatically with cron

    Neat you just programmed a lame, but useful tool.