67 points

“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…”

permalink
report
reply
8 points

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.

permalink
report
parent
reply
20 points

Incorrect. Perl does the same just as well, and it’s a language that actually makes sense while also being uglier.

permalink
report
parent
reply
8 points

In my experience Perl is a write-only language. Coming in behind someone else and fixing or writing their code is often slower than just rewriting it

permalink
report
parent
reply
2 points

I’ll admit, I have zero experience with Pearl. I do like the uglier point you made though. 50+ DKP

permalink
report
parent
reply
7 points

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.

permalink
report
parent
reply
3 points

What’s this install nonsense? I just looked up Deno and it’s part of an NPM stack. With PHP you just

  1. Open an Apache server

  2. Write code

  3. ???

  4. Profit!

permalink
report
parent
reply
1 point

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

permalink
report
parent
reply
1 point

PHP is native in Linux then?

How is that different to something like powershell?

permalink
report
parent
reply
2 points

You can’t run a website off powershell. PHP can render HTML to the browser, so it’s perfect for website development. 99% of the web was PHP back in the wild West days.

permalink
report
parent
reply
2 points

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.

Anti Commercial-AI license

permalink
report
parent
reply
54 points

Learned Python to try and hack into a porn site.

permalink
report
reply
15 points

Well, were you able to hack into the porn site? Python seems like an odd choice for hacking a website.

permalink
report
parent
reply
11 points
*

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

permalink
report
parent
reply
6 points

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.

permalink
report
parent
reply
3 points

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.

permalink
report
parent
reply
14 points

I learned Python and regular expressions to download hundreds of pictures from 4chan. Good times.

permalink
report
parent
reply
3 points

Ah, the good ol’ regex html parser.

permalink
report
parent
reply
2 points

Seems like a good way to get put on a ‘list’.

permalink
report
parent
reply
45 points
*

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 🙄

permalink
report
reply
4 points

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?

permalink
report
parent
reply
3 points

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

permalink
report
parent
reply
5 points

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.

permalink
report
parent
reply
44 points

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.

permalink
report
reply
5 points

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

permalink
report
parent
reply
40 points

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

permalink
report
reply
10 points

That’s a good reason. I used my Java skills to crack a shareware (a solitaire game) because I had no money.

permalink
report
parent
reply
14 points

Now you can use Java to have lots of money

permalink
report
parent
reply

Programming

!programming@programming.dev

Create post

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 !webdev@programming.dev



Community stats

  • 3.4K

    Monthly active users

  • 754

    Posts

  • 5.8K

    Comments