• xuv
        link
        fedilink
        arrow-up
        11
        ·
        edit-2
        2 months ago

        I almost did this for a different reason, people choose python because it has some pretty good web automation/scraping libraries to work with.

      • BrianTheeBiscuiteer@lemmy.world
        link
        fedilink
        arrow-up
        6
        ·
        2 months ago

        This was over 10 years ago, maybe 20. I wanted to pick up a new language and I seemed pretty driven, at the time, to hack a certain site. I think I gave up on it and as usual I enjoyed writing the code more than using the app.

        It didn’t use webscraping or anything too sophisticated. I just applied a few dictionaries I found online and ran everything through a series of anonymous proxies. Very brute force.

        • AwkwardLookMonkeyPuppet@lemmy.world
          link
          fedilink
          English
          arrow-up
          3
          ·
          2 months ago

          Ha! I tried the same thing with some random sites like 20 years ago. I managed to get into a few of them and emailed the registered owner that they needed better security.

  • 1hitsong@lemmy.ml
    link
    fedilink
    arrow-up
    45
    ·
    edit-2
    2 months ago

    Because I wanted to listen to music while doing the dishes.

    The Jellyfin Roku client didn’t support audio playback, so I wrote it myself… while learning Roku’s proprietary language 🙄

    • Flatfire@lemmy.ca
      link
      fedilink
      arrow-up
      4
      ·
      2 months ago

      It occurs to me I’ve literally never tried to play my music library through Roku. I usually just cast to a speaker with my phone. Is it part of the main branch?

  • Ephera@lemmy.ml
    link
    fedilink
    arrow-up
    44
    ·
    2 months ago

    I was playing this really simple mobile phone game, where you basically go on these mining trips, then you tap the screen as quickly as possible. So, I thought to myself, I wonder if there’s a way to simulate screen taps, to tap at superhuman speeds.

    I found an app for that, this app had its own scripting language. Admittedly, there weren’t many concepts to learn in this language, but wait, there’s more.

    Then I thought, maybe I can also automate the menus, between the mining trips.
    But this language didn’t have support for multiple files, nor functions, you couldn’t even use labels in your goto statements, meaning my code started to get quite complicated.

    So, I actually sort of implemented support for goto labels / shitty functions within my program.

    Basically, at the start of the file, I had an if-else block, which read the value of a variable and based on that, it would select between different goto statements.
    So, if I wanted to “call a function”, I would set the variable to the function/label name and then goto 0.

    If I remember correctly, I did still need to manually update the line numbers in that lookup table at the start, but at least, I didn’t have to do it everywhere in the code anymore.

    And yes, I did manage to completely automate grinding that game, using this shitty scripting language.
    It was an offline game, and not a good one, I didn’t actually care about making progress in it. But scripting it was significantly more fun than playing it myself.

    • Luvon@beehaw.org
      link
      fedilink
      arrow-up
      5
      ·
      2 months ago

      There’s a game called something like “oh no the farmer is gone” which is about programming a little robot to harvest the fields and the programming is built directly into the game

  • SpaceNoodle@lemmy.world
    link
    fedilink
    arrow-up
    40
    ·
    2 months ago

    I had totally forgotten until this post reminded me: I originally started to learn Python in order to fix a crossword puzzle program.

  • I, as a teacher, have had to learn several languages, but that’s not the dumb reason bit. The dumb reason bit was WHY I had to teach Python, which once I learnt it (so I cold teach it) I could see right away was NOT a suitable language for teaching to Year 7 (who up to now have only used Scratch). I was teaching the U.K. curriculum, and I found out that teaching C# was also allowed - still not ideal, but better than Python for learners -but pretty much all schools were teaching Python. When I dug into it I found I was far from alone in not wanting to use Python… and I also found out the reason schools were teaching Python. It was because from an ADMINISTRATIVE point of view it was much easier for the schools to have us teaching Python. In other words, the office-workers who didn’t have to teach it, only had to admin it, were forcing everyone to teach Python because they wanted the lower overhead that came with installing/maintaining that vs. C#. ARGH! All the teachers who wanted to teach C# were running into exactly the same road-block.

    • kureta@lemmy.ml
      link
      fedilink
      arrow-up
      41
      ·
      2 months ago

      I’m really surprised to hear that teaching C# to 7th graders is easer than teaching them python. Python was invented to teach. It looks like pseudo code. I have almost zero experience in teaching so I trust your experience. But can you elaborate a little? What makes teaching C# easier?

            • apolo399@lemmy.world
              link
              fedilink
              arrow-up
              5
              ·
              edit-2
              2 months ago

              I hate having to cater to the lowest common denominator, I had to struggle with un-engaging classes all throughout elementary and middle school. I’ve seriously thought about becoming a teacher so I’d like to ask, in your experience, what happens to the children that are able to process more advanced information? Can something be done to keep them engaged and nurture their development too?

              Edited an unfortunate typo

              • Oh definitely! Different students have different learning styles - some learn by memorising rules (ROTE), some learn by understanding the rules (Constructivist), some are visual learners, some are better at learning in group activities, etc. - and we have to cater to them ALL, to keep them all engaged (here’s WHY we have this rule, here’s a video about it, here’s a group activity about it, here’s a worksheet to practise it). But I was referring to the TOOLS that we use with class. We can’t use a tool that the advanced students have no trouble with but the less adept students struggle with - we have to use a tool that the whole class can use, and that’s what I meant about catering to the lowest common denominator.

                Also some (not all) schools have special classes for gifted and talented (G&T) students. And in fact one class I’ve had in my time is a class which was comprised of half the students had various learning difficulties (such as being dyslexic), though they weren’t told that (these days it’s all about trying to keep them in the mainstream as much as possible. So in this class the dyslexic student had a regular student sitting next to him for immediate help with reading anything, which left me free to only need to help him with actual educational issues).

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

        it looks like pseudo code

        Does it though? I imagine most pseudocode looks like the language the writer is most familiar with. My pseudocode definitely doesn’t look like python.

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

      I’ve always seriously questioned why python has become the defacto beginner language. Sure, a simple print hello world is short, but I feel like static languages are easier to see what’s going on.

    • 0xDREADBEEF@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      2 months ago

      Honestly, I taught myself JS in like 2009 as my first programming language. My high school taught Java, but I didn’t get OOP. I understand functional programming though, so after JS I taught myself Elixir, then OCaml and Haskell. I really wish I was just taught Clojure or another lisp-like in school though. Python is… okay… I need expressions in my language, though, and Python is not that.

    • mke@lemmy.world
      link
      fedilink
      arrow-up
      14
      ·
      edit-2
      2 months ago

      That is such a sweet reason! Whimsical decisions like this can be some of the best. Life demands a bit of whimsy every now and then.

      Edit: I don’t know if you’re still interested in this, but have you considered WSL? Assuming you’re on Windows, that is. I haven’t looked into it, but I don’t see any obvious reason why it wouldn’t work.

      • andioop@programming.devOP
        link
        fedilink
        English
        arrow-up
        6
        ·
        2 months ago

        Hey, thanks for the suggestion! I was considering firing up a VM just for Hare, but thanks for bringing this option to my attention.

    • best_username_ever@sh.itjust.works
      link
      fedilink
      arrow-up
      3
      ·
      2 months ago

      God. I didn’t knew that Drew was such a language nazi. If you want to write a Go clone, it must be useful for everyone. Even Emacs is available on Windows officially.

      • mke@lemmy.world
        link
        fedilink
        arrow-up
        15
        ·
        edit-2
        2 months ago

        What a harebrained comment.

        …Sorry, it felt like such a waste not to say it! The puns!

        But, language Nazi? Don’t you think that’s a bit much? And it must be useful for everyone? Why? I also think it hinders growth, but it’s their project. It’s well within their right to choose whether they put in the effort to support a platform or not, regardless of the reasoning and how much effort it’d actually take.

        They don’t even seem to be against the idea, they just don’t care enough to be the ones to do it:

        According to DeVault, while there’s currently no plan to support non-free platforms like macOS or Windows, a third-party implementation or fork could try to make that work. The Register

        Even Emacs is available on windows, you say? I think some context is needed, here. See what GNU has to say about the availability of Emacs on proprietary systems:

        However, GNU Emacs includes support for some other systems that volunteers choose to support.

        Emphasis mine.

        To improve the use of proprietary systems is a misguided goal. Our aim, rather, is to eliminate them. We include support for some proprietary systems in GNU Emacs in the hope that running Emacs on them will give users a taste of freedom and thus lead them to free themselves.

        Taken from the official download and install page.

          • mke@lemmy.world
            link
            fedilink
            arrow-up
            13
            ·
            edit-2
            2 months ago

            Sure, and that matters because…? What negative effects is this choice having on hare that go against hare’s objectives?

            You seem to be treating hare as something it doesn’t want, nor care to be.

            I like to describe Hare as a simple, conservative, modern update to C, with a FOSS ethos. It doesn’t try to break computer science ground, or promise to solve a million dollar problem.

            Guess you could say they’re probably not friends of million-hares. Ha, ha.

            And upstream Hare will not support non-libre operating systems. That’s a lot of conviction, but Hare isn’t trying to take over the world. It will coexist with the diversity of languages out there, and thrive in its own niche. In short, the Hare project develops for a libre future and for the deliberate programmer, not the corporate, the ephemeral and the reckless.

            From Torres, one of the core contributors.

            Their wants and metrics for success aren’t the same as yours.

  • neomachino@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    23
    ·
    2 months ago

    Not really a dumb reason, but back in the day I was stuck in the WordPress developer loop and tired of it. I was pretty familiar with a handful of languages, but wasn’t doing much more than setting up themes and building out pages with builders.

    One day I heard the CTO talking about a tool he would love to have but couldn’t find anything that worked how he needed it to. The CTO was a big buzzword guy and recently shared an article with my manager at the time about how C++ was “the best language”. So naturally I chimed in and told him I could build that tool easy peasy and I would use C++ obviously because it’s the best language.

    It was such a simple tool, basically just matching phrases and categories and spitting out a list of options. It took me months to make, but I learned a lot and it kind of worked for the most part and everyone was happy. I eventually got a de-facto department in the company where I would just build internal tools and handle some legacy codebases that they were previously outsourcing.

    I later on got my current job because of that leap.

    TLDR: I learned C++ because I was bored and lied that I already knew it.

  • Solemarc@lemmy.world
    link
    fedilink
    arrow-up
    22
    ·
    2 months ago

    I started learning Lua for a WoW add-on. Not even making my own add-on, just tweaking someone else’s.

    • Oka@sopuli.xyz
      link
      fedilink
      arrow-up
      4
      ·
      2 months ago

      I learned Minecraft’s data pack language for the same reason. 20w14infinite needed a Portal gun, I found a working one, but tweaked it to my liking

  • BehindTheBarrier@programming.dev
    link
    fedilink
    arrow-up
    21
    ·
    edit-2
    2 months ago

    It’s hyperbole, but I learned my first language because I wanted to be a god.

    I saw these magic windows that popped up, that had buttons, and I was jealous of these godly creators holding the power to make them do as they wanted. So, I learned it myself. I peeked at another program I was using, it was using python and PyQt so that’s what I set out with to become my own god of the desktop.

    My first program was a GUI wrapper around the YouTube-dl CLI, and I still use it frequently.

    • AwkwardLookMonkeyPuppet@lemmy.world
      link
      fedilink
      English
      arrow-up
      8
      ·
      2 months ago

      Hey, that’s similar to me! Except I’d call it a wizard rather than a god. I wanted to learn the cryptic combinations of words that willed things into existence in the digital world. 23 years later I’m a senior professional, doing the same thing, and still learning too.

  • Ogeon@programming.dev
    link
    fedilink
    arrow-up
    19
    ·
    2 months ago

    I was a teacher’s assistant in beginner’s programming at university for a bit. I expected them to learn C, which I knew enough of, but I got assigned to a group that learned Python instead. I had never used Python at the time. I ended up having to speed learn it while trying to teach it, to not be completely useless.

  • Admiral Patrick@dubvee.org
    link
    fedilink
    English
    arrow-up
    19
    ·
    2 months ago

    Lemmy UI constantly pissed me off, Photon didn’t quite do what I wanted, so I forked it and learned Svelte. lol

  • Donnywholovedbowling@lemmy.world
    link
    fedilink
    arrow-up
    18
    ·
    2 months ago

    I wanted to make a scripted version of pinochle because my friends and I play it a bunch on tabletop sim and there was nothing available, so I learned LUA

    • Oka@sopuli.xyz
      link
      fedilink
      arrow-up
      1
      ·
      2 months ago

      I learned pinochle as a kid, but can’t remember how to play now.

      I learned Lua as a programming student but can’t remember how to use it now.

  • PortugalSpaceMoon@infosec.pub
    link
    fedilink
    arrow-up
    17
    ·
    edit-2
    2 months ago

    I wanted to see what the COBOL job market looked like. So I learned the superficial basics of COBOL in a day or two, just so I wouldn’t be a complete fraud when I put it into my linkedin profile as a skill to see what happens.

      • PortugalSpaceMoon@infosec.pub
        link
        fedilink
        arrow-up
        12
        ·
        2 months ago

        Didn’t get a single reqeust, so this had less impact than expected. Thought there was more old rusty companies looking for a non-retired engineer.

        • FizzyOrange@programming.dev
          link
          fedilink
          arrow-up
          12
          ·
          edit-2
          2 months ago

          Yeah I think that’s mostly a myth. When I looked up salaries they were definitely good (for programming; amazing for the average person), but not “I would write COBOL for that” good.

          There aren’t really that many old COBOL systems around. I think it’s mostly just over-reported because you can write an article about how some government department still uses COBOL but you can’t write about one that switched to Java.