PHP is Wack. (Coding in a Random Language Every Day)

PHP is Wack. (Coding in a Random Language Every Day)

Low Level

1 год назад

66,430 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@blahblahblahblah761
@blahblahblahblah761 - 09.12.2023 02:34

News: man does not know about prag_match_all, creates unnecessary for_each

Ответить
@MrKasenom
@MrKasenom - 09.12.2023 11:53

I love how Pascal is in the same category as brainfuck for him 😂

Ответить
@mage3690
@mage3690 - 10.12.2023 17:40

You can do this is in regex? I didn't. I can't even imagine how you would do it in regex. Well, I also did it in C, so that might've had something to do with it.

Ответить
@phpannotated
@phpannotated - 11.12.2023 16:09

Always fun to see how people that don't know PHP write PHP 😂 Great video!

Ответить
@chinoto1
@chinoto1 - 11.12.2023 21:40

Treating `echo` like a function bothered me more than it should.

Ответить
@d33rf0rce
@d33rf0rce - 13.12.2023 02:59

the bro just set up a whole web server instead of just using the interpreter 💀

Ответить
@DIYDaveOK
@DIYDaveOK - 17.12.2023 02:58

Love this series. Don't love the profanity.

Ответить
@Rockyzach88
@Rockyzach88 - 19.12.2023 05:09

Maybe I should make my own videos. All you need to do is check what the number is before the letter 'r', 'g', 'b' for each line. You don't even need to parse the game ID as you can use a counter because the gameIDs are sequential. Also, I just subtracted bad games from the sum(1 to 100) = 5050. Because you only need 1 bad pull and the series of pulls is bad.

EDIT: I do commend you on getting the answer correct the first time though. I usually have to miss a few times and tinker my way to success.

Ответить
@mattatobin
@mattatobin - 19.12.2023 19:55

To be honest, no one who actually enjoys PHP codes php this way. If they did, they'd not like it so much. See: PHP The Wrong Way for the correct methods.

Ответить
@daniels-mo9ol
@daniels-mo9ol - 22.12.2023 22:43

One liner: 'sudo apt-get install php-cli -y' done.

Ответить
@patrickoberholzer4278
@patrickoberholzer4278 - 25.12.2023 22:13

Love how at the beginning Haskell was put in the same category as Brainf**k.

Ответить
@jmon24ify
@jmon24ify - 27.12.2023 21:14

This was hard to watch with rudimentary skills of PHP

Ответить
@LandonEmma
@LandonEmma - 28.12.2023 22:15

ah... I love PHP, the coding for forums...

Ответить
@paulchamberlain7942
@paulchamberlain7942 - 13.01.2024 15:21

I never learned grep, can i take your review to mean its still not worth learning?

Ответить
@ZotyLisu
@ZotyLisu - 17.01.2024 01:43

tbh it's not PHP's fault that you decided to do this without getting info on what errors are throwing

Ответить
@soundzthevibewalker
@soundzthevibewalker - 23.01.2024 05:48

It's interesting how stereotypes about php are still stuck in the heads of people. But the most interesting thing is that your code feels old. I get that feeling about c and c++ code a lot. It always feels like it was written about 20 years ago

Ответить
@mossawirtech2531
@mossawirtech2531 - 16.02.2024 23:40

i am just pissed when FULL stack says he hates one particular language. he actually hates English as well :D

Ответить
@jongeduard
@jongeduard - 18.02.2024 20:40

I haven't touched PHP in years, but this was clearly not the best code ever. :P
Regex is great by the way, I have solved so many problems with regex in the years, in many different situations and many different languages, it's really a worth to learn it.
However the parsing here does have to be done with regex, if you do this job with a bit of functional programming in Rust for example, it's quite trivial to split, map and collect everything into a data structure. Main level is the split at the semicolons, inside that you have the comas end eventually you simply split at space, all in a nice flow of code.
Not a single loop needs to be written.
Especially great if you make enum and struct fields for the color names and numbers.

Ответить
@BIGININ
@BIGININ - 23.02.2024 00:14

You can read the entire file directly into an array: $lines = file("day2.txt");

Ответить
@petruciucur
@petruciucur - 29.02.2024 18:07

This guy do not know PHP

Ответить
@mandokir
@mandokir - 31.03.2024 16:17

Not only could you run PHP CLI, you could just set the content-type to "text/plain". PHP is not the problem; you are.

Ответить
@xorxpert
@xorxpert - 18.04.2024 08:17

php isn’t so bad. there’s way better ways to have accomplished this

Ответить
@seanvogel8067
@seanvogel8067 - 25.04.2024 22:56

I didn’t think part one was going to work because I didn’t see you account for the fact that you can have multiple entries for each color. However, it is kind of hard to follow the code on the iPad. And apparently it did work. 😬

Ответить
@BeautyMarkRush
@BeautyMarkRush - 22.05.2024 03:35

I'm so used to PHP 8.2 by now that I automatically thought of using a match instead of a chain of if's. lol

Ответить
@basedbulgarian511
@basedbulgarian511 - 06.06.2024 01:58

You can send a content type header to the browser and tell it that the PHP output is type text/plain. Then you won't have to use HTML line breaks

Ответить
@keyjayh
@keyjayh - 12.06.2024 17:09

it could be more easy with regex, but is ok doing a lot of explodes... but "$game_possible == True"? - now I am thirsty of blood :) .

Ответить
@alexbork4250
@alexbork4250 - 19.06.2024 12:52

Dude run web-server to make code even worse with all those `echo("<br>")` 😂

Ответить
@DaVince21
@DaVince21 - 21.06.2024 14:58

Regex stands for rejular expression. 😋

Ответить
@YouHaveTrouble
@YouHaveTrouble - 24.06.2024 14:53

bro typing 2005 PHP and complaining it's bad 💀

Ответить
@jevvir
@jevvir - 10.07.2024 19:32

Won't be subscribing

Ответить
@foqsi_
@foqsi_ - 16.07.2024 09:07

IF SERIES, TITLE IT AS SUCK. fuck me man

Ответить
@TheBoBuilder
@TheBoBuilder - 19.07.2024 18:39

There's a lot I don't understand but the few parts I did had me laughing. Awesome! But hasn't PHP improved with Version 8?

Ответить
@julienduseyau703
@julienduseyau703 - 19.07.2024 19:25

Is this guy dumb on purpose?

Ответить
@JS-jh4cy
@JS-jh4cy - 30.07.2024 13:43

The better experienced programmers can make shit into something useful or usable, just hard work and deeper knowledge

Ответить
@adampatterson
@adampatterson - 14.08.2024 05:48

I'm confused, why is type casting really bad in PHP? What language is really good for type casting?

You also don't need to cast a string to an int when the string is a number.

"100" + 1 = 101

Ответить
@tjjumlani1277
@tjjumlani1277 - 18.08.2024 14:08

Use list instead of doing explode, explode, etc. Your code is horrible.

Ответить
@MarkoDankic-v6j
@MarkoDankic-v6j - 06.09.2024 19:16

Why does bro look like potato (joke, dont take it seriously)

Ответить
@MKA667
@MKA667 - 26.09.2024 23:27

Add Assembly and VBA to the wheel

Ответить
@Klinoklaz
@Klinoklaz - 14.10.2024 00:09

i can do this in awk

Ответить
@javabeanz8549
@javabeanz8549 - 20.10.2024 06:06

I didn't catch which PHP version you were using. I know it wasn't 8.4, because that's in the RC stage right now.

Ответить
@zinedine911
@zinedine911 - 21.10.2024 02:45

php is fun, explode, split is better but explode is way more fun

Ответить
@cowingtonpost6837
@cowingtonpost6837 - 21.10.2024 03:31

php noob

Ответить
@javascriptpleb
@javascriptpleb - 17.11.2024 07:27

At the end of the day PHP gets the job done, quickly... that's the reason why we all use it

Ответить
@EasternAlyx
@EasternAlyx - 28.11.2024 10:56

as someone learning rust watching this, this is awful

Ответить
@KONEY.INDUSTRIAL
@KONEY.INDUSTRIAL - 03.12.2024 01:27

just add a <pre> tag (no even need to close it) on top and outside of your script to be able to use \Ns instead of <br>s

Ответить
@arthurminasyan9591
@arthurminasyan9591 - 03.01.2025 00:18

People sometimes write bad PHP code and then blame the language for their bad code

Ответить
@dominick253
@dominick253 - 02.12.2023 17:34

Php = Lambo.

Ответить