4
submitted 2 months ago by [email protected] to c/[email protected]
top 50 comments
sorted by: hot top controversial new old
[-] [email protected] 4 points 2 months ago

Wanting to get into the videogames industry.

[-] [email protected] 3 points 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.

[-] [email protected] 2 points 2 months ago

I learned bash instead of python because my 8 year old brain saw all the parentheses and thought "ew no"...

[-] [email protected] 2 points 2 months ago

Experienced me sees a language where parentheses are optional and I think "ew no"

[-] [email protected] 2 points 2 months ago

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.

[-] [email protected] 2 points 2 months ago

I learned lolcode in college because we had to write a sorting algorithm in assembly and "any other programming language."

[-] [email protected] 2 points 2 months ago

I liked the OCaml website

[-] [email protected] 2 points 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.

[-] [email protected] 1 points 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

[-] [email protected] 1 points 2 months ago

To understand memes

[-] [email protected] 1 points 2 months ago* (last edited 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 🙄

[-] [email protected] 1 points 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?

[-] [email protected] 0 points 2 months ago

Yep. That code was merged and released roughly 2 years ago.

[-] [email protected] 1 points 2 months ago

Well I thank you for your contribution regardless. Roku is all I've got, so it helps to have people like you annoyed enough, and knowledgable enough to contribute.

[-] [email protected] 1 points 2 months ago
[-] [email protected] 1 points 2 months ago

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

load more comments (3 replies)
[-] [email protected] 1 points 2 months ago* (last edited 2 months ago)

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] 2 points 2 months ago* (last edited 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.

[-] [email protected] 2 points 2 months ago

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.

[-] [email protected] 1 points 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?

[-] [email protected] 0 points 2 months ago

Surely an unpopular opinion lol.

Python is a great first language.

[-] [email protected] 2 points 2 months ago

...and riding a bike is easy. Now go watch some kids who have never ridden a bike before and see how that's working out for them.

[-] [email protected] 0 points 2 months ago

I just replied to someone else with the same question. Less can go wrong (but in either case a non-OOP language, like Pascal, is a much better starting point. You should only ever teach students one concept at a time).

[-] [email protected] 1 points 2 months ago

Pascal was my first language. Self-taught. It was pretty good.

[-] [email protected] 0 points 2 months ago

As it is, when we had to teach them HTML, the resources we were given were using PHP at the same time, so I scrapped that and just taught them HTML myself. We never teach more than one concept at a time, so I don't know how these other things found their way into the curriculum/resources.

[-] [email protected] 1 points 2 months ago

It looks like pseudo code

P.S. as a teacher, I can tell you I have seen students who even struggle to write pseudo code. It's like trying to teach them Greek (not all students, but some, and we need to cater to the lowest common denominator).

[-] [email protected] 1 points 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.

[-] [email protected] 1 points 2 months ago

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!

[-] [email protected] 0 points 2 months ago

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

[-] [email protected] 2 points 2 months ago
  • 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 (13 replies)
[-] [email protected] 1 points 2 months ago

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] 1 points 2 months ago

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

[-] [email protected] 1 points 2 months ago
error: dict not found. Were you looking for dick?
[-] [email protected] 0 points 2 months ago

to prank people using school computers

[-] [email protected] 0 points 2 months ago

Ah the olden days of using windows accessibility features to replace ".com" with ".corn"

[-] [email protected] 1 points 2 months ago

You were more subtle than my friends. In the computer lab, we would just change "the" to "fuck"

[-] [email protected] 1 points 2 months ago

We started there of course. The subtlety has far more to do with needing to get clever than with us being clever. Eventually it got to the point where I had to write a python script to reinstall all our .corn antics back on every school machine because the school took to resetting all accessibility dictionaries every night

[-] [email protected] 0 points 2 months ago

I learned Go because I really liked the keyword go

[-] [email protected] 1 points 2 months ago* (last edited 2 months ago)

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.

load more comments
view more: next ›
this post was submitted on 20 Jul 2024
4 points (100.0% liked)

Programming

17077 readers
310 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 1 year ago
MODERATORS