What's the dumbest reason you've learned a programming language?
What's the dumbest reason you've learned a programming language?
What's the dumbest reason you've learned a programming language?
"Gods, that's stupid. Why is it being done this way? Have they never heard of naming conventions? Is the language really that awfully designed?"
Learns PHP to find out more.
"Yup..."
HEY! Is PHP ugly? Yes. Does it use stupid naming conventions? Also yes! But it's an awesome language when you want to get shit done. There's no other languages out there where you can just write some code in VIM directly on the server through SSH and immediately see your results without any further setup. No frameworks required, no packages, no imports, no buzzwords and hubub, just pure unadulterated utility.
Incorrect. Perl does the same just as well, and it's a language that actually makes sense while also being uglier.
Nonsense, there are tons of systems like that now. I've been playing with Deno & Fresh, it's great. Trivial to install, a pretty great language, Fresh doesn't force everything to be client side - you can easily write old school completely server side rendered sites if you want but you get to use TSX which is waaaaay superior to the old text based templating systems we used to use (Handlebars, Jinja, etc.).
It also has built in hot reloading by default so even faster than PHP. Literally hit save and you see the results.
PHP is native in Linux then?
How is that different to something like powershell?
no other languages out there where you can just write some code in VIM directly on the server through SSH and immediately see your results without any further setup
laughs in coldfusion
R. because it's really easy to work on spreadsheets. i know there's pandas for python but at that time RStudio made it look really attractive. i will do anything not to work on excel.
When I took biostatistics in college I asked to use python instead of R to do my assignments and they said no
My only real complaint at the time was using <- to define variables but I felt really strongly about it and that I wanted to use fancy snake language
PHP is a scourge. I wish less server software were written in it. You'll stumble upon some opensource project with a cool UI, run into a problem and find out the docker container has apache, postgres, and PHP in it. Debugging PHP is such a pain and setting up a developer environment is such a hassle because they haven't discovered docker for dev envs yet.
Terrible experience all around.
Learned Python to try and hack into a porn site.
Well, were you able to hack into the porn site? Python seems like an odd choice for hacking a website.
I almost did this for a different reason, people choose python because it has some pretty good web automation/scraping libraries to work with.
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.
I learned Python and regular expressions to download hundreds of pictures from 4chan. Good times.
Ah, the good ol' regex html parser.
Seems like a good way to get put on a 'list'.
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 🙄
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?
Yep. That code was merged and released roughly 2 years 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.
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
I had totally forgotten until this post reminded me: I originally started to learn Python in order to fix a crossword puzzle program.
That’s a good reason. I used my Java skills to crack a shareware (a solitaire game) because I had no money.
Now you can use Java to have lots of money
To get a career in IT.
That's a pretty solid reason.
Close your eyes to feel it
I was going to learn !hare@programming.dev just because it is called "Hare" and I like rabbits, but then I saw that I am not on a supported OS.
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.
Hey, thanks for the suggestion! I was considering firing up a VM just for Hare, but thanks for bringing this option to my attention.
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.
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.
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.
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?
Surely an unpopular opinion lol.
Python is a great first language.
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.
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.
Well, I'm only speaking here for my experience with teaching the U.K. curriculum, but probably the same thing applies elsewhere. I know this much - as a teacher, it's very frustrating!
I'm curious why you think Python is unsuitable. Both of my kids picked up Python pretty easily.
I think there was more, but that's what I remember off the top of my head. If it was up to me then I would've used Pascal - that's what it's designed for! But at least C# has strongly-typed variables, and doesn't care about your indentation (and unfortunately there was no non-OOP language choice available - I'm not sure how this got in the curriculum when every teacher knows you only teach one concept at a time). As I said, many other teachers felt the same way, but couldn't get it past their school admin's.
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.
My high school taught Java, but I didn’t get OOP
Yes, the correct sequence of events - one thing at a time, basic programming, then OOP. :-)
Python is not that.
It's not a lot of things, which makes it poor for a teaching language.
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.
Income
To understand memes
A man of culture
I started learning Lua for a WoW add-on. Not even making my own add-on, just tweaking someone else's.
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
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.
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.
Lemmy UI constantly pissed me off, Photon didn't quite do what I wanted, so I forked it and learned Svelte. lol
dubvee.org and tesseract
I needed some context, but woah this is super slick lemmy. Awesome project, like the work I'm seeing on the moderation side.
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.
Sounds like you had the wrong indent after they shifted you around.
See my comment
That's silly. Luckily, I don't think this was the same situation. This was at a university and they had classes with other languages. The beginner classes were split into two variants, where some students (mostly CS students) learned C, and other students (economy, etc.) learned Python. I suppose they figured it was more useful to them or something.
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
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.
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.
How did that turn out for you?
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.
For work.
I liked the OCaml website
Wanting to get into the videogames industry.
I inherited a C# code base that had a custom runtime loader for APL modules. Over half of the app was actually written in APL with C# just hosting the API.. so yeah, had to learn that. I don't recommend it but some people seem to really love the language. Those people are often statisticians, not programmers.
I learned a bit of FORTH because an old Minecraft mod (Redpower 2) had a computer that could run it.
I wonder how many people learned Lua for this reason (CC and friends).
I did! I picked it up specifically for CC, then I found a window manager that was also configured in Lua.
Arduino and Python to create a sexy machine that syncs up to videos. Oh I also made the sex machine part, like machining metal parts and soldering electronics.
please tell me you created a dick
object for the project which is exactly the same as a dict
object.
undefined
error: dict not found. Were you looking for dick?
I learned lolcode in college because we had to write a sorting algorithm in assembly and "any other programming language."
Maybe not dumb but I've definitely been forced to at least partly learn a few terrible languages so I could use some system:
ityp
, nsec
, ef_bin
... The sort of names where you already need to know what they are. We found a RCE on a server during pentest. In KOBOL.
Learning how to make a reverse shell in KOBOL was pretty unique experience. Thankfully, we found another path to DA ajd didn't have to continue, but maan, learning KOBOL, especially of your use-case is niche, is borderline esoteric.
to prank people using school computers
Ah the olden days of using windows accessibility features to replace ".com" with ".corn"
You were more subtle than my friends. In the computer lab, we would just change "the" to "fuck"
this isn't dumb at all
I was trying to rank up in Codewars, and there was a 1kyu (hardest and worth the most points) kata only available in OCaml, so I learned it in order to solve.
I learned bash instead of python because my 8 year old brain saw all the parentheses and thought "ew no"...
Experienced me sees a language where parentheses are optional and I think "ew no"
Learned flash in the 90's to make terrible games.
Ruby because it was the first popular Japanese language. I wrote a few useful scripts and it was nice. Then it was swallowed by Rails, and killed by Python. No one uses it around me but it was fun.
Had to learn Javascript for web development class.
In all seriousness, I found out about Nim from the debug log of a discord bot and decided to give it a shot. It's now my favorite programming language.
I learned a bit of KOBOL after hearing it was the weirdest, hardest, and most unused programming language back in highschool. But only really enough to do a hello world and other very simplistic programs. More because finding resources at that time was difficult.
I tried to learn some back around 2019. I don't remember why, but there was something going on relating to it at the time? Maybe it was as simple as me reading an article about Cobol devs retiring.
I was forced to do it during my conscription service to implement an excel merge in VBA because that was the programming installed on the system. Fuck VBA and the integraded VBA Editor in Excel
Österreich oder? Hab ich damals auch bei einem HTL Praktikum gemacht.
Ja genau war während des GWDs befohlen worden VBA zu lernen um die ganzen Excel und Access Anwendungen zu erweitern, wo hast du VBA geschrieben?
Objects weren't properly saving in a game, so the developer showed me what code I could copy paste to enable objects to save. Much like Thanos, "fine, I'll do it myself".
Perl because a system I worked on was just a bunch of Perl scripts in a trench coat pretending to be a program.
I learned it because the ancient beast kept breaking because it just a bunch of Perl scripts in a trench coat cobbled together over generations.
because a system I worked on was just a bunch of Perl scripts in a trench coat pretending to be a program.
Hmm... OpenBSD ports system and package manager?
Lol. Oh no I hope not, but a totally different system.
Python. To write mods for renpy 'games'.
Same as everyone, to produce reports.
Because I couldn't find any dev to help me make the game I wanted to make.
This is actually reasonable. You didn't know what work is needed to make a game, but your reason to learn a programming language because you couldn't get help is absolutely not dumb in my opinion.
Actually I did know the amount and kind of work it required, as I have being working on game projects before (I'm sound designer, music composer and game designer).
It's not really dumb yes, but a bit sad when you think about it.
Somewhere before 2010, when I was still on Windows on my laptop and using AutoHotkey, I learned a dialect of Basic. To write an application starter on my USB stick, when going to internet cafes. The starters job was just to run my AutoHotkey script with AutoHotkey interpreter. I never used the Basic language again. I actually forgot which dialect, maybe FreeBasic.
Because it was the new hotness
Which js framework was it?
We should be able to figure this out. Which year, month, date and hour of the day was it?
Might not be dumb, but I learned programming to create things and learn how things worked. Started with entering in hundreds of lines of BASIC printed in magazines, including debugging font typos.
Then learned MUF, or Multi-User Forth, a stack-based text language for creating text based dungeons, and managed to stop some malicious users spying and people's privacy in the server.
Every so often, I pick up a new language to test it to see if it does cool stuff or help me further learn more about how things function.
Needed to write a syntax highlighter for VB.Net but I couldn't find any weirdly written edge cases online, so I had to make some myself.
I learned Go because I really liked the keyword go
This feels like me wanting to learn Hare because I like rabbits, which I bring up because someone left this reply for me and I think it applies to you too:
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.
Yes I think it’s really beneficial to operate by vibes sometimes lol. Trust your instincts !
To have an easier time with another language (which the first language’s valid syntax is a superset of) which it papers over the faults of. And usually it’s pretty thin paper.
C and C++?
Profit.
I learned Applesoft BASIC to draw a surprise Dickbutt.
If we're counting machine code, I learned 6502 ASM for faster division on NES, because it was half the CPU time on my first-person shooter. After many iterations pushing it down to mere hundreds of cycles, I slapped my forehead and implemented log tables in like 512 bytes and 45 cycles. It's negligible now. And supports constant fractional scaling. And has overflow / underflow saturation. Really, 6502 ASM is fantastic to fuck around in, even though the rest of the NES's hardware suuucks.
from googling I see wikipedia has a book for it: https://en.wikibooks.org/wiki/6502_Assembly
I mostly used this page to know what's possible, and occasionally reinvented the wheel. Conditional jumps are still arcane and fragile in my hands. But I benchmarked all kinds of sequential memory access patterns before realizing the 6502 does not give a dang about reusing the same address.
On Z80, you want to load two registers, use them as a pointer, and tweak the low byte. The 6502 can just take an address and an offset in four cycles. So if you want to access $3000 as an array and read index 4, 5, 6, 7, you don't LDX 4 and INC X, you LDX 4 and then LDA $3000,X, LDA $3001,X, LDA $3002,X, LDA $3004,X. For e.g. controller reads, you can hardcode bare addresses and it's twice as fast.