this post was submitted on 20 Jul 2024
123 points (96.9% liked)

Programming

18333 readers
103 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 2 years ago
MODERATORS
(page 3) 50 comments
sorted by: hot top controversial new old
[–] [email protected] 25 points 7 months ago* (last edited 7 months ago) (20 children)

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.

[–] [email protected] 10 points 7 months ago (1 children)

I'm curious why you think Python is unsuitable. Both of my kids picked up Python pretty easily.

[–] [email protected] 18 points 7 months ago (28 children)
  • object-oriented (this is their FIRST proper programming language - they don't even know how to write loops yet and you want us to teach them OOP at the same time?! And as it turns out, I had one student who literally could NOT work out how to use a loop - kept writing 20 variables for 20 iterations. i.e. her variables never varied!)
  • variables are weakly-typed (use it for anything, whether it's what you first used it for or not, Python doesn't care)
  • indentation has to be exact (i.e. no brackets, just exact indentation). I had one student whose program wasn't working, and it even took ME a while to find what was wrong with it (a missing space).

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.

load more comments (28 replies)
load more comments (19 replies)
[–] [email protected] 8 points 7 months ago* (last edited 7 months ago) (1 children)

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.

load more comments (1 replies)
[–] [email protected] 12 points 7 months ago

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.

[–] [email protected] 24 points 7 months ago
[–] [email protected] 13 points 7 months ago (1 children)

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.

[–] [email protected] 6 points 7 months ago (1 children)

please tell me you created a dick object for the project which is exactly the same as a dict object.

[–] [email protected] 8 points 7 months ago
error: dict not found. Were you looking for dick?
[–] [email protected] 19 points 7 months ago (2 children)

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.

[–] [email protected] 7 points 7 months ago

Sounds like you had the wrong indent after they shifted you around.

[–] [email protected] 13 points 7 months ago (1 children)

I learned a bit of FORTH because an old Minecraft mod (Redpower 2) had a computer that could run it.

[–] [email protected] 8 points 7 months ago (1 children)

I wonder how many people learned Lua for this reason (CC and friends).

load more comments (1 replies)
[–] [email protected] 9 points 7 months ago* (last edited 7 months ago)

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.

[–] [email protected] 23 points 7 months ago (1 children)

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

load more comments (1 replies)
[–] [email protected] 46 points 7 months ago* (last edited 7 months ago) (1 children)

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 🙄

[–] [email protected] 4 points 7 months ago (3 children)

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?

load more comments (3 replies)
[–] [email protected] 7 points 7 months ago

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".

[–] [email protected] 44 points 7 months ago (1 children)

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.

load more comments (1 replies)
load more comments
view more: ‹ prev next ›