Coding in China be like

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ต.ค. 2024
  • Part2: • Coding In China Be Lik...
    Font used:
    PT Mono
    if (you_liked(this_video)) {
    subscribe_to(SENTRY);
    } else if (you_disliked(this_video)) {
    subscribe_to(SENTRY);
    } else {
    subscribe_to(SENTRY);
    }

ความคิดเห็น • 939

  • @appeiroon
    @appeiroon 2 ปีที่แล้ว +12351

    The joke is that the program is asking for input, but in China public's opinion is not allowed.

    • @JaishyamRB
      @JaishyamRB 2 ปีที่แล้ว +688

      This also makes sense, but scanf function is generally unsafe as it may cause stack buffer overflow vulnerability

    • @VivekYadav-ds8oz
      @VivekYadav-ds8oz 2 ปีที่แล้ว +75

      I wrote the exact same comment but somehow yours escaped me. Honestly this is funnier to me 🤣

    • @CentralProcessingUnitCore
      @CentralProcessingUnitCore 2 ปีที่แล้ว +29

      Oh ok, I only rly code in python and java and a bit of c++

    • @poofj7916
      @poofj7916 2 ปีที่แล้ว +15

      thats alao untrue

    • @laur-unstagenameactuallyca1587
      @laur-unstagenameactuallyca1587 2 ปีที่แล้ว +17

      that's not the joke but that's a funny take on it

  • @joaogarcia6170
    @joaogarcia6170 2 ปีที่แล้ว +2054

    Started my CS major last year, teacher wouldn't shut up about scanf the entire semester, so this is what his classes felt like.

    • @nolanfaught6974
      @nolanfaught6974 2 ปีที่แล้ว +98

      Okay but it's easy to avoid buffer overflows with scanf if your format specifier gives a maximum length. Regardless, you should be taught to read raw data, SANITIZE YOUR INPUTS, and then parse with `sscanf` and use proper return values. scanf is incredibly fast and powerful when used properly, not like that clunky cin/cout business with c++

    • @marceldabrowskii
      @marceldabrowskii 2 ปีที่แล้ว +1

      i love this comment

    • @stevefan8283
      @stevefan8283 2 ปีที่แล้ว +7

      why use scanf when you have std::cin

    • @jianghan4086
      @jianghan4086 2 ปีที่แล้ว +68

      Because this is C, not C++

    • @nwah816
      @nwah816 2 ปีที่แล้ว +30

      @@stevefan8283 Because coding in c++ is a sin

  • @VivekYadav-ds8oz
    @VivekYadav-ds8oz 2 ปีที่แล้ว +7136

    I thought the negative social credits were because you asked for user's opinions rather than hard-coding the government's.

    • @Manu-se5tx
      @Manu-se5tx 2 ปีที่แล้ว +156

      Though so too and honestly this version is funnier

    • @hashtags_YT
      @hashtags_YT 2 ปีที่แล้ว +24

      @@Manu-se5tx Even online I still have no idea what "this" refers to...

    • @Manu-se5tx
      @Manu-se5tx 2 ปีที่แล้ว +8

      @@hashtags_YT OP's version

    • @w1z4rd9
      @w1z4rd9 2 ปีที่แล้ว +7

      My stupid ass technically thought that was the reason.

    • @different_stuff
      @different_stuff 2 ปีที่แล้ว +4

      government is the user as well

  • @minoroyale1226
    @minoroyale1226 2 ปีที่แล้ว +6121

    I'll save this video. Go learn C and comeback to get it.
    Edit : i end up learning python

    • @SENTRY456123
      @SENTRY456123  2 ปีที่แล้ว +686

      Googling "scanf unsafe" will probably help you a lot.

    • @wmpowell8
      @wmpowell8 2 ปีที่แล้ว +184

      I tried to use scanf once and my compiler, Clang, warned me that it was deprecated and unsafe.
      If you're ever working with buffers in C, make sure you check to make sure the stuff that you put in the buffer isn't bigger than the buffer itself in order to avoid a buffer overflow exploit.
      Also be wary of buffer underflow exploits; this is a good case because C strings are null-terminated. If the stuff you're copying has length mismatches, don't even bother with it due to buffer over/underflow exploits.

    • @BSPNode
      @BSPNode 2 ปีที่แล้ว +17

      @@wmpowell8 I don't know if I should do this, but I create a buffer of a fixed amount, and use fgets to read from "stdin". Then I just parse the buffer for the data I actually want.

    • @geto6242
      @geto6242 2 ปีที่แล้ว +5

      @@BSPNode I do the same thing! That's definitely safe

    • @Someone-ve7yn
      @Someone-ve7yn 2 ปีที่แล้ว +7

      @@SENTRY456123 Scanf is unsecure with strings because it has no fixed length

  • @Rsparing
    @Rsparing ปีที่แล้ว +482

    The Actual reason for the unsafe code is that when he put "scanf("%s", input); There was a chance that when the user put more than 9 characters (including the null symbol) that scanf could override some data in next to that point in memory and write your input on some critical information.
    He also asked for an opinion

    • @SomeRandomPiggo
      @SomeRandomPiggo ปีที่แล้ว +7

      I think the OS stops that from happening and kills it with a segmentation fault

    • @lex-ch3xv
      @lex-ch3xv ปีที่แล้ว +35

      ​@@SomeRandomPiggo it only happens if input rewrites memory of other processes/programs. However, if it rewrites memory of only this process, you will deal with bugs and probably undefined behavior

    • @sfs8730
      @sfs8730 ปีที่แล้ว

      Fuck that sounds terrible

    • @budgetarms
      @budgetarms ปีที่แล้ว +5

      and write your input on some critical information is like a horrible way of explaining what is going on, if you are a programmer, I mean it is killing me.

    • @davidmovsisyan1280
      @davidmovsisyan1280 9 หลายเดือนก่อน

      mayeb you can say more like disallowed memory location (e.g. due to lack of priviliges or just straight illegal) because it's not that easy to access other processes when they are all isolated by virtual memory technique. @@lex-ch3xv

  • @cat-.-
    @cat-.- 2 ปีที่แล้ว +1148

    It is rumored that when you divide 6 by 4 with '/' operator you will be invited to the local police station for tea

    • @heroes-of-balkan
      @heroes-of-balkan 2 ปีที่แล้ว +37

      Jokes aside, why?

    • @yeaboi3593
      @yeaboi3593 2 ปีที่แล้ว +244

      Date of the Tianmen square massacre

    • @davidugono3727
      @davidugono3727 2 ปีที่แล้ว +189

      @@yeaboi3593 -999,999,999,999 SOCIAL CREDIT!!!

    • @izergaer
      @izergaer 2 ปีที่แล้ว +103

      @@yeaboi3593 nothing happened in Tiananmen Square

    • @yeaboi3593
      @yeaboi3593 2 ปีที่แล้ว +9

      @@davidugono3727 nooooooo

  • @migueljara9399
    @migueljara9399 2 ปีที่แล้ว +481

    We need a new ".ccp" file format

    • @thatchapthere
      @thatchapthere 2 ปีที่แล้ว +112

      Ah yes, the CC+ language

    • @davidciprys7811
      @davidciprys7811 2 ปีที่แล้ว +46

      +25 social credit

    • @suntzu1409
      @suntzu1409 2 ปีที่แล้ว +34

      @@thatchapthere *CCP+ language
      -999999 social credit for you

    • @suntzu1409
      @suntzu1409 2 ปีที่แล้ว +9

      Let me guess:
      Only CCP can write programs in this language

    • @winmen5279
      @winmen5279 ปีที่แล้ว +2

      @@suntzu1409 its CPC not CCP, -1/0 social credit for xenophobic act

  • @sprytnychomik
    @sprytnychomik 2 ปีที่แล้ว +4138

    Just replace 'input' with '(char *)argv'. If there's not enough memory then at least it's not your fault.

    • @SENTRY456123
      @SENTRY456123  2 ปีที่แล้ว +388

      Also, if you want to automate the program, using arguments instead of using scanf() is much more suitable.

    • @EvilSapphireR
      @EvilSapphireR 2 ปีที่แล้ว +21

      You'd destroy the entire command line parameter array

    • @w花b
      @w花b 2 ปีที่แล้ว +7

      @@shu3684 which stands for scanf secured amirite

    • @Snail5008
      @Snail5008 2 ปีที่แล้ว +43

      @@shu3684 Nah, real programmers use gets.
      /s

    • @Marco-uo9ww
      @Marco-uo9ww 2 ปีที่แล้ว +5

      This is so 5Head I can't believe it.

  • @futuristic-
    @futuristic- ปีที่แล้ว +458

    In China they don’t learn C. They learn A+

    • @clidlove
      @clidlove ปีที่แล้ว

      Are you sure?😅we don't learn c?😅

    • @clidlove
      @clidlove ปีที่แล้ว

      stereotype😅😅

    • @sjegannath6295
      @sjegannath6295 ปีที่แล้ว +56

      No they learn A++

    • @陸
      @陸 ปีที่แล้ว

      @@clidlove its a joke dumbass

    • @SmallLemonPRO
      @SmallLemonPRO ปีที่แล้ว +28

      Nah
      We learn 共产党+

  • @benjaminwaltermauss3349
    @benjaminwaltermauss3349 2 ปีที่แล้ว +534

    For those do didn't understand, this code is vulnerable to stack/buffer overflow

    • @voicedrewxyz
      @voicedrewxyz 2 ปีที่แล้ว +114

      My brother in christ I don't know what that means

    • @noarvd8236
      @noarvd8236 2 ปีที่แล้ว +14

      In non coding language?

    • @whong09
      @whong09 2 ปีที่แล้ว +209

      It means very bad wrongthink. You will be reeducated. A stack is what your cpu uses to store local variables (memory). In C the stack is only as big as you allocate (reserve...) - in this case 10 bytes. Scanf loads input data in this case onto the stack but there's no guarantee the input data is less than 10 bytes (10 characters), but C will happily write your extra data past the allocated stack memory thus causing all kinds of bad things to be possible ranging from your program crashing to you getting hacked.
      Like if you take your backpack and keep shoving shit in it it's going to rip and spill everything out. That's a stack overflow.

    • @dingel_91716
      @dingel_91716 2 ปีที่แล้ว +9

      If that is a string so it must be has null at the last element automatically right? If that so , Will the bufferflow occurs when we type more than 9 characters or more than 10 characters?

    • @bravish
      @bravish 2 ปีที่แล้ว +4

      Yh I remember my first c project I had to clear the buffer every couple lines cuz I was too lazy to rewrite any code.

  • @mr.haiwan
    @mr.haiwan 2 ปีที่แล้ว +187

    the code says: "Taiwan is a country"

    • @onichan6897
      @onichan6897 2 ปีที่แล้ว +35

      social_credit -= 999999;

    • @moister3727
      @moister3727 2 ปีที่แล้ว

      Social credit deducted
      Your execution will be in 2 hours

    • @Rubenz343
      @Rubenz343 2 ปีที่แล้ว

      "WARNING: Your execution is scheduled for tomorrow at 8 am."

    • @呀咧呀咧
      @呀咧呀咧 ปีที่แล้ว +17

      Execution date: now

    • @sophiatheczech1918
      @sophiatheczech1918 ปีที่แล้ว

      @@onichan6897 execute(user);

  • @jpheitman1
    @jpheitman1 2 ปีที่แล้ว +1147

    If you're ever coding date systems or anything that uses a calendar in China, just remember: June 3rd is immediately followed by June 5th. There is nothing in between.

    • @thegamingengine4537
      @thegamingengine4537 2 ปีที่แล้ว +231

      Nothing happened on June 4th, 1989. I can confirm as I wasn’t there since nothing happened.

    • @aravindpadmanabham6385
      @aravindpadmanabham6385 2 ปีที่แล้ว +20

      Yeah we ain't seen nothing

    • @lostzhengli1060
      @lostzhengli1060 2 ปีที่แล้ว +5

      Huh no, im chinese

    • @jpheitman1
      @jpheitman1 2 ปีที่แล้ว +1

      @@lostzhengli1060 金水桥

    • @CutieFakeKirby
      @CutieFakeKirby 2 ปีที่แล้ว +41

      June 3 and June 5 are both 36 hours long, there is no June 4th

  • @LinkEX
    @LinkEX 2 ปีที่แล้ว +94

    0:23 Does anyone know where those corny smileys came from that keep getting used ironically in memes?
    I do remember that they could be used in ICQ. Which makes them ancient by internet standards.

    • @Pumpkin-Link
      @Pumpkin-Link 2 ปีที่แล้ว +4

      They look like those emoticon packs for MSN messenger that installed a virus in you PC

    • @suspicioussand
      @suspicioussand 6 หลายเดือนก่อน +1

      I don't know but I'd like to, as well

  • @deleater
    @deleater 2 ปีที่แล้ว +185

    This is why Chinese have the best quality Linux wifi drivers.

    • @captainvenom7252
      @captainvenom7252 2 ปีที่แล้ว +1

      Including 802.11n

    • @suntzu1409
      @suntzu1409 2 ปีที่แล้ว +3

      And highest quality of basically every kind of electronics you can imagine

    • @captainvenom7252
      @captainvenom7252 2 ปีที่แล้ว

      @@suntzu1409 dude anyone can make better quality electronics but to claim a price is a game of import and export data

    • @razpaqhvh7501
      @razpaqhvh7501 2 ปีที่แล้ว +8

      @@suntzu1409 a relative of mine is an embedded software developer and likes to tinker with electronics so naturally he had to go to shenzhen. What he said, is mind blowing to me. You can obtain a GTX 1080 (example) for 1/4 the price, because they make them and those are for the chinese market. They had some off brand processors that were really interesting spec wise, although I forgot their name it was something in chinese. I'm 100% sure they have 4000 RTX series there already, it's just that the western media block everything good about china and just spread propaganda how people in china live in mudhuts etc... Even though an average Chinese citizen is actually richer than an average USA citizen, now ofcourse, china's standard is lower and so are the salaries but it doesn't make a difference when you don't import only export.

    • @lostzhengli1060
      @lostzhengli1060 2 ปีที่แล้ว

      @@razpaqhvh7501 THANK YOU FOR FINALLY SAYING THE TRUTH

  • @Nekhaevalex
    @Nekhaevalex ปีที่แล้ว +23

    After being a programmer for a few years, I got a new phobia: I'm afraid of pressing any buttons in GUI applications. When I see buttons, I make sure that any progress I made was saved at least 3 times, and when the button is pressed, I pray for the application not to fall, I pray for OS to overcome such a stressful process as handling function binded to that button and I feel totally happy when I see no BSODs on the screen after the button released.
    Why am I saying it in comments after this video? Cause if Chinese programs are really written this way, there is still a hope that this world's software can be usable

  • @pasijutaulietuviuesas9174
    @pasijutaulietuviuesas9174 2 ปีที่แล้ว +194

    Redundant code in the description. -100 social credit.

    • @SENTRY456123
      @SENTRY456123  2 ปีที่แล้ว +63

      Just execute the code, not me.

    • @suntzu1409
      @suntzu1409 2 ปีที่แล้ว +9

      @@SENTRY456123
      Just execute the code?
      More -♾️♾️♾️♾️ social credit
      Your execution date is tommorow

    • @Φωτό-ρ7π
      @Φωτό-ρ7π ปีที่แล้ว

      @@SENTRY456123 captain philips has entered the chat: i know (evangelion ed lyrics)

  • @jopaslona1
    @jopaslona1 2 ปีที่แล้ว +89

    As a programming student studying in China I can relate. Except we are coding in Dev-C++ in gcc 4.8

    • @juliangonzalez1207
      @juliangonzalez1207 2 ปีที่แล้ว +9

      If I may ask, why are you using an old version of gcc? Here in my country when we use something outdated is because the University schedule hasn't been updated since it's creation but I thought that in China you would use the latest technology

    • @jopaslona1
      @jopaslona1 2 ปีที่แล้ว +30

      @@juliangonzalez1207 I thought to myself that if I go to Chinese University that literraly launches robots to Mars and makes software for Olympic games I would be a great programmer and demanded specialist but the only thing I left with is studying C language using outdated software and tons of physics and chinese edition of electrical enginiring.

    • @jopaslona1
      @jopaslona1 2 ปีที่แล้ว

      @@juliangonzalez1207 Chinese Universities has the same issue as yours. They just can't keep up with modern technologies that everyone use. And overall the technological progress in China is really overrated. Take a look at any chinese website. They really bring some 90-s vibes

    • @DeerJerky
      @DeerJerky 2 ปีที่แล้ว

      @@jopaslona1 That sucks, good luck mate

    • @zuccburger7293
      @zuccburger7293 2 ปีที่แล้ว

      @@jopaslona1 either your faculty is shit or the uni you go to is shit, may I ask which uni you went to?

  • @alexwang007
    @alexwang007 2 ปีที่แล้ว +33

    Not enough comments, *-5,000 social credits*

    • @Someone-ve7yn
      @Someone-ve7yn 2 ปีที่แล้ว +1

      Non conventional main signature, *-1,000 social credits*

  • @joshuaorthodox
    @joshuaorthodox ปีที่แล้ว +30

    Back after 10 months, thank you for getting me to learn C, it's my favourite language now :)

  • @623-x7b
    @623-x7b 2 ปีที่แล้ว +37

    hint: scanf("%9s", string); // leave room for the null terminator.
    should use char input[10] = {0}

    • @korn6657
      @korn6657 2 ปีที่แล้ว +3

      Bruh moment

    • @heroes-of-balkan
      @heroes-of-balkan 2 ปีที่แล้ว

      Wouldn't that cause an error? How to put an integer to a character array?

    • @BSPNode
      @BSPNode 2 ปีที่แล้ว +5

      @@heroes-of-balkan It's just initializing the array to the value of zero, which in ASCII is a null value.

    • @pyrodynamic4144
      @pyrodynamic4144 2 ปีที่แล้ว +2

      @@heroes-of-balkan characters are numbers (in C). 1 byte numbers. They represent the ASCII code of the character but nothing is stopping you from using them like a regular number (not recommended). You can even perform arithmetic on them - 'a' + 1 is 'b'.

    • @heroes-of-balkan
      @heroes-of-balkan 2 ปีที่แล้ว

      @@pyrodynamic4144 that is true, but 4 bytes in 1 element that can store 1 byte made me scratch my head

  • @SmallLemonPRO
    @SmallLemonPRO ปีที่แล้ว +11

    As a chinese which learning C++ I can confirm that if I don't return 0; , I'll get arrest

  • @aerglass9816
    @aerglass9816 2 ปีที่แล้ว +66

    life is too short to be coding in china

    • @AByteofCode
      @AByteofCode 2 ปีที่แล้ว +7

      *life is too short __because__ coding in china

    • @TheGeorey
      @TheGeorey 2 ปีที่แล้ว

      you mean life gets short if you code in china

    • @suntzu1409
      @suntzu1409 2 ปีที่แล้ว +9

      Life is too short because of living in china

  • @vivekpallikona8094
    @vivekpallikona8094 2 ปีที่แล้ว +15

    I like how the video turned from a meme for entertainment to an educational content..

  • @呀咧呀咧
    @呀咧呀咧 ปีที่แล้ว +5

    printf(“Zao shang hao! Wo you yi ge bing chilling”);

  • @ananttiwari1337
    @ananttiwari1337 2 ปีที่แล้ว +33

    epitome of 21st century comedy

  • @Rundik
    @Rundik ปีที่แล้ว +2

    He did not thank the goverment for the opportunity. That was a first mistake. He also did not provide a backdoor for the secret service. Oh wait, he did

  • @Zephyroths
    @Zephyroths 2 ปีที่แล้ว +12

    using VS Code, social credit -1000000

    • @OneMilian
      @OneMilian ปีที่แล้ว

      Either church of emacs or cult of vim.
      i use evil-mode its the best of both. But everyone has their pref.

    • @DatBoi_TheGudBIAS
      @DatBoi_TheGudBIAS 6 หลายเดือนก่อน

      Me using vs code cuz idgaf and just want a text editor with embedded terminal so I don't need 2 programs opened at once

  • @tttttttttttttttttt0
    @tttttttttttttttttt0 2 หลายเดือนก่อน +2

    Fun fact: the “return 0” actually isn’t useless, it sets your social credit to 0

  • @MatheusKlSch
    @MatheusKlSch 2 ปีที่แล้ว +128

    ah yes
    scanf
    controversial
    but the most dangerous thing is strings themselves, not scanf
    *meanwhile me reading thousands of lines from a file and parsing it's contents*

    • @dingel_91716
      @dingel_91716 2 ปีที่แล้ว +2

      If that is a string so it must be has null at the last element automatically right? If that so , Will the bufferflow occurs when we type more than 9 characters or more than 10 characters?

    • @DatBoi_TheGudBIAS
      @DatBoi_TheGudBIAS 6 หลายเดือนก่อน

      ​@dingel_91716 10. But if u write 10 chars, ur string wont be terminated and if u try to print it, ull get some trash characters from the next bytes in memory, till it hits a 0

  • @stevenhe3462
    @stevenhe3462 2 ปีที่แล้ว +5

    Chinese programmers write comments in Chinese. Other than that…
    (You can use Chinese for variable and function names as well because they are unicode characters and does not include spaces)

  • @sleebu
    @sleebu 2 ปีที่แล้ว +3

    I really thought he was gonna create *public* variables in class

  • @xpellidagoat
    @xpellidagoat ปีที่แล้ว +3

    im from china and the government authorities once showed up in my house because I tried to run a dangerous hello world program

  • @CalebHigginbotham
    @CalebHigginbotham 2 ปีที่แล้ว +3

    The scream at the end: 🤣💀

  • @RAZREXE
    @RAZREXE 2 ปีที่แล้ว +40

    As someone who has never been to China, I can confirm this to be accurate

  • @funnymanhaha8386
    @funnymanhaha8386 ปีที่แล้ว +4

    1. 事实胜于雄辩。 (Shìshí shèng yú xióngbiàn)
    - Facts beat eloquence.
    From Lu Xun's "Hot Wind" (鲁迅《热风题记》), it's like, "Actions speak louder than words."
    2. 一言既出,驷马难追。(Yìyán jì chū, sìmǎ nán zhuī / 'a word already produced, team-of-4-horses difficult chase')

  • @이현규-b7i
    @이현규-b7i 2 ปีที่แล้ว +7

    Is there no "#define _CRT_SECURE_NO_WARNINGS" in China? LOL

  • @p13k4r3
    @p13k4r3 ปีที่แล้ว +32

    The code reads input from the user using the scanf() function and stores it in the input array of characters. However, there are several potential problems with this code that could lead to errors or unexpected behavior:
    The size of the input array is limited to 10 characters, but there is no check to ensure that the user's input does not exceed this limit. This can result in a buffer overflow, which can lead to a program crash or other security issues.
    The %s format specifier used with scanf() can read a string of characters terminated by whitespace or a newline character. If the user inputs a string that is longer than the size of the input array, or contains whitespace, the behavior of the program is undefined.
    The scanf() function returns the number of input items successfully matched and assigned, but the code does not check this return value. If the user enters input that cannot be assigned to the input array (e.g., a non-string value or a string longer than the array), the program will not know that an error has occurred.
    To address these issues, you could modify the code to use a safer input function such as fgets() instead of scanf(), and add checks to ensure that the user's input does not exceed the size of the array.
    For example
    #include
    #include
    int main(void) {
    char input[10];
    printf("Enter input (up to 9 characters): ");
    fgets(input, sizeof(input), stdin);

    // Remove trailing newline character from input
    size_t len = strlen(input);
    if (len > 0 && input[len-1] == '
    ') {
    input[len-1] = '\0';
    }

    return 0;
    }
    In this modified code, fgets() is used to read input from the user, and the sizeof() operator is used to ensure that the input does not exceed the size of the input array. The code also removes any trailing newline character from the input using strlen() and input[len-1] = '\0'. Additionally, you could check the return value of fgets() to ensure that input was successfully read, and handle any errors accordingly.
    source: ChatGPT

    • @timesnewrman
      @timesnewrman ปีที่แล้ว +7

      I thought it was legitimate programming comment

    • @DatBoi_TheGudBIAS
      @DatBoi_TheGudBIAS 6 หลายเดือนก่อน

      scanf("%9s", input)
      Then make a function for buffer clearing, most known one is:
      Int c;
      while ((c = getchar()) != 10 && c != -1);

    • @DatBoi_TheGudBIAS
      @DatBoi_TheGudBIAS 6 หลายเดือนก่อน

      (I forgot it if is an AND or an OR)

  • @srgeyt
    @srgeyt ปีที่แล้ว +1

    why has this video been recommended to me so many times this week wtf...

  • @JackieJKENVtuber
    @JackieJKENVtuber 2 ปีที่แล้ว +5

    You've seen China's security, clearly no one would get executed for that

  • @Palexite
    @Palexite 2 ปีที่แล้ว +1

    this is definitely the entire matrix code of what happened in tiananmen Square. apsolutely nothing.

  • @fhs9441
    @fhs9441 2 ปีที่แล้ว +4

    Memory leak: -1000000 social credit

  • @ВладДок-д8щ
    @ВладДок-д8щ 2 ปีที่แล้ว +10

    I thought it would be about him using char instead of wchar_t. That's very illegal for chinese input

  • @ik2254
    @ik2254 2 ปีที่แล้ว +54

    In China JavaScript is called TaiwanScript

    • @sal_strazzullo
      @sal_strazzullo 6 หลายเดือนก่อน

      It makes no sense but ok

  • @PhilfreezeCH
    @PhilfreezeCH 2 ปีที่แล้ว +47

    At least they are one of a few governments that is trying to ditch Windows in favor of Linux for their state apparatus, which I think is a great thing to do.

    • @dumbstuff2809
      @dumbstuff2809 2 ปีที่แล้ว +19

      Well, North Korea did it first.

    • @spl420
      @spl420 2 ปีที่แล้ว

      @@dumbstuff2809 they violated gnu GPL, so fuck them.

    • @honkhonk8009
      @honkhonk8009 2 ปีที่แล้ว +1

      The US just uses another OS specifically designed for government use. Its not linux but its based off UNIX like linux was.
      They use windows sometimes but mostly uses that specific OS.
      Especially on the F35

    • @Nick-vd7cg
      @Nick-vd7cg 2 ปีที่แล้ว +4

      @@honkhonk8009 most backends everywhere run on Linux. Even Microsoft themselves use Linux backends. Clouds,servers whatever.. all Linux

    • @Φωτό-ρ7π
      @Φωτό-ρ7π ปีที่แล้ว +2

      @@Nick-vd7cg torvalds moment

  • @GordenRamsi20
    @GordenRamsi20 2 ปีที่แล้ว +6

    When so I'm guessing next up is China++?

  • @defi100nt9
    @defi100nt9 2 ปีที่แล้ว +2

    I got a weird ad in Chinese before playing the video

  • @demonking3673
    @demonking3673 ปีที่แล้ว +11

    Coding for Genshin Impact be like:

  • @facundoacosta595
    @facundoacosta595 ปีที่แล้ว +1

    Why TH-cam recommend me a add from Albion online, but Chinese

  • @insalatadipomodoro7824
    @insalatadipomodoro7824 2 ปีที่แล้ว +12

    //DEBUG BE LIKE:
    class Person{
    private: ...
    ^
    Error: cannot use private property, -1000 Social Credit!

    • @dragonlordsaviour7005
      @dragonlordsaviour7005 2 ปีที่แล้ว +1

      wait a second,properties are private by default in cpp. -1gazilllion social credits.

    • @insalatadipomodoro7824
      @insalatadipomodoro7824 2 ปีที่แล้ว

      @@dragonlordsaviour7005 This is why the revolution had to take place, the world is capitalist by definition!!!!i!

  • @그냥사람-e9f
    @그냥사람-e9f 2 ปีที่แล้ว +1

    "Yeah you gotta compile it to javasc[censored]t it can't run typesc[censored]t natively"

  • @reouneru_
    @reouneru_ 2 ปีที่แล้ว +5

    this makes me laugh even when i only know python lol

  • @edunery
    @edunery 2 ปีที่แล้ว +7

    You can limit scanf using some notation in the formating. My professor used that in vietnam.

    • @phillipanselmo8540
      @phillipanselmo8540 2 ปีที่แล้ว +1

      your professor is a war veteran and computer scientist?? based

    • @lagseeing8341
      @lagseeing8341 2 ปีที่แล้ว +2

      And we still lost the war?

    • @DatBoi_TheGudBIAS
      @DatBoi_TheGudBIAS 6 หลายเดือนก่อน

      Just add a number lol
      %9s

    • @edunery
      @edunery 6 หลายเดือนก่อน

      @@DatBoi_TheGudBIASthat's one way to do it. using [^
      ] takes until the line break.

    • @DatBoi_TheGudBIAS
      @DatBoi_TheGudBIAS 6 หลายเดือนก่อน

      @@edunery ye, I use this tactic too when I want to read not only a word, but a whole string like phrase

  • @aezravito9717
    @aezravito9717 3 หลายเดือนก่อน +2

    Very true
    Had my cousin work there and now he's gone.

  • @realrazoblast
    @realrazoblast 2 ปีที่แล้ว +3

    Oh well, I guess I have to use my power.
    **insecure*

  • @frytura
    @frytura 5 หลายเดือนก่อน +1

    missed the opportunity to make the vscode logo into a wechat or something

    • @Mizu2023
      @Mizu2023 2 หลายเดือนก่อน

      wecode lmao

  • @yarik_superpro
    @yarik_superpro ปีที่แล้ว +3

    😇👍
    🇨🇳+ 15 social credits 📈

  • @KrispyKremesKubbler-sx7mz
    @KrispyKremesKubbler-sx7mz 6 หลายเดือนก่อน +4

    i use this as music for studying

  • @eagletgriff
    @eagletgriff 6 หลายเดือนก่อน +2

    New favorite channel

  • @TechnoSan09
    @TechnoSan09 2 ปีที่แล้ว +4

    This joke is brilliant
    Scanf is bad at getting string inputs
    And also getting a opinion from a public(getting input from user) is not allowed in china

  • @poweroff1225
    @poweroff1225 4 หลายเดือนก่อน +1

    i deadass though using scanf made codes unsecure and i started worrying so much😭😭

  • @msjahun
    @msjahun ปีที่แล้ว +12

    I was thinking since I know a little C and programming I will live as a hero with high social credit in China but then I remember all the unsafe code I've written 😂😂

  • @fluffsquirrel
    @fluffsquirrel ปีที่แล้ว +1

    Chef's kiss, Willy scream.

  • @AzH489
    @AzH489 2 ปีที่แล้ว +3

    I’ll start learning C just so I can understand this meme

  • @legendrags
    @legendrags ปีที่แล้ว +2

    Me who was about to release an entire stacked app in china:

  • @segefjord
    @segefjord 2 ปีที่แล้ว +5

    This had so many layers lmfao

  • @hrishikeshkashyap3715
    @hrishikeshkashyap3715 6 หลายเดือนก่อน +1

    He forgot to give the "&" symbol before "input" in the scanf statement.

  • @houba1263
    @houba1263 2 ปีที่แล้ว +4

    Buffer overflow incoming

  • @icarojose6316
    @icarojose6316 2 ปีที่แล้ว +2

    in china they force company do use Vue in favor of React because Vue was created by an american of chinese descent.

    • @OneMilian
      @OneMilian ปีที่แล้ว

      I like vue way more than react because mvvm was the first architecture i learned and loved

  • @lunedefroid8817
    @lunedefroid8817 ปีที่แล้ว +3

    China: your code is unsafe, -100 social credit, code better next time
    US: thanks for your input, we really appreciate your contribution, unfortunately we cannot accept your PR , if there is something you wish to talk about, please contact the employee satisfaction insurance team

  • @joanestradaramos1541
    @joanestradaramos1541 ปีที่แล้ว +1

    The joke is that great tech companies use chinese code

  • @defacube
    @defacube 2 ปีที่แล้ว +12

    for most people who don't know C, including me, scanf() is like the main thing for every input.
    For example:
    scanf("%i", &inputvariable)
    printf("%i")
    Output:
    (the thing you entered in the input)
    Atleast I'm pretty sure it's like that...

    • @briscola324
      @briscola324 2 ปีที่แล้ว

      No , it's not

    • @skylo706
      @skylo706 2 ปีที่แล้ว +4

      Basically yes but its more complicated than that

    • @zerg350
      @zerg350 ปีที่แล้ว +2

      it's just like cin in C++?

    • @schwingedeshaehers
      @schwingedeshaehers ปีที่แล้ว

      Than enter a really long input, and you write something In storage, that is probably used for something else

  • @user__
    @user__ 3 หลายเดือนก่อน +1

    no joke, I literally started learning C to understand this meme 🤣

  • @oneofthechannelsofalltime
    @oneofthechannelsofalltime ปีที่แล้ว +10

    You know there are too many programmers in the world when there are designated TH-cam channels shitting out "relatable" programming memes.

    • @randomness6956
      @randomness6956 ปีที่แล้ว +1

      relatable for me

    • @SomeRandomPiggo
      @SomeRandomPiggo 11 หลายเดือนก่อน

      Most of the people who like "programmer humor" aren't even that competent

    • @oneofthechannelsofalltime
      @oneofthechannelsofalltime 11 หลายเดือนก่อน

      @@SomeRandomPiggo I see what you did there ;-)

  • @heferh4320
    @heferh4320 ปีที่แล้ว +1

    dang, i didn't knew that scanf was that lethal

  • @eliaquimjorras257
    @eliaquimjorras257 2 ปีที่แล้ว +13

    I'm learning C and I read string with scanf, why not recommended to use it? What is recommended to read strings in C?

    • @Lukyen
      @Lukyen 2 ปีที่แล้ว +16

      You are vulnerable to a stack overflow. You limit the string to 10 characters in the stack but the string you get is not limited to 10 characters. So it can overflow and overwrite memory in certain places you dont want it to. Causing problems.

    • @eliaquimjorras257
      @eliaquimjorras257 2 ปีที่แล้ว +3

      @@Lukyen thanks

    • @quangvanduy1151
      @quangvanduy1151 2 ปีที่แล้ว +2

      use fgets instead

    • @raymundhofmann7661
      @raymundhofmann7661 2 ปีที่แล้ว +11

      Either use "scanf("%9s", input)" to limit the number of characters read to 9 and have the zero terminator to get 10 or better C++ and std::string.

    • @daybot1634
      @daybot1634 2 ปีที่แล้ว

      Your output would be like this "HelloWorld�[�G�"

  • @elotkarloketh166
    @elotkarloketh166 ปีที่แล้ว +1

    We can't make choice on our device with the latest version of softwares, this is what big tech have done and I think big tech really love "China"(government)

  • @siyustuff213
    @siyustuff213 2 ปีที่แล้ว +3

    aight time to go learn C so I can come back and understand this meme

    • @siyustuff213
      @siyustuff213 ปีที่แล้ว

      update: i learned c and am chinese but still do not understand this meme. send help.

    • @jlalbuquerq
      @jlalbuquerq ปีที่แล้ว

      Buffer overflow

    • @DatBoi_TheGudBIAS
      @DatBoi_TheGudBIAS 6 หลายเดือนก่อน

      ​@@siyustuff213unsafe scanf
      Using %s reads a string of any size, thus the user has the hability to write like 60 chars and write beyond the allocated input array. It should be %9s to limit it to 9 chars read, cuz 10th slot is for \0

  • @palmsk123
    @palmsk123 หลายเดือนก่อน

    Reserve word in China’s C language are 1989, Great Leap Forward,Tiananmen,Mao

  • @buizelmeme6288
    @buizelmeme6288 2 ปีที่แล้ว +3

    0:29 I hear "in Hong Kong" in Chinese XD

  • @aiuno
    @aiuno 8 หลายเดือนก่อน +1

    wait until you learn about the engineer leaking the police database credentials, leading to every person in shanghai getting their full name, address and phone numbers leaked.

  • @Dark_Brandon_2024
    @Dark_Brandon_2024 ปีที่แล้ว +4

    print("Tiananmen square massacre 1989")

  • @Jewbender
    @Jewbender 2 ปีที่แล้ว +38

    scanf("%9s", input)

  • @manosmakris8308
    @manosmakris8308 2 ปีที่แล้ว +5

    I think the joke is that using the scanf for a string input can work fine if the user enters only one word but if he enters multiple words you need to use gets.

  • @TheAbad1
    @TheAbad1 ปีที่แล้ว +1

    how did i know it was going to be this song before i clicked on the video

  • @zjz1
    @zjz1 2 ปีที่แล้ว +11

    You are supposed to code in E (易) not C.
    调试输出("Hello, world!")

  • @monder4703
    @monder4703 2 ปีที่แล้ว +4

    I subscribed you only because of your description. Good Job lol

  • @iexist_nt
    @iexist_nt 9 วันที่ผ่านมา

    someone needs to make a language called CCP where you use a value called "Social Credit" to allocate memory, kinda like how rust had lifetimes

  • @mfThump
    @mfThump 2 ปีที่แล้ว +6

    "VSCode LMAO"

  • @joshk7893
    @joshk7893 2 ปีที่แล้ว +2

    after coming back from learning C, I get it

  • @raianmr2843
    @raianmr2843 2 ปีที่แล้ว +5

    no wonder Go is so popular there lmao

    • @joshuao.9590
      @joshuao.9590 2 ปีที่แล้ว +1

      This needs more likes

  • @danielawesome36
    @danielawesome36 2 ปีที่แล้ว +1

    Bruh why am I getting coding memes on my Recommended I don't even😭😭😭

  • @claudio169
    @claudio169 2 ปีที่แล้ว +4

    To everyone that doesn't understand... i don't get it either. But the siren was funny

  • @desmoedrichtofen5375
    @desmoedrichtofen5375 ปีที่แล้ว +1

    In China you need a VPN to download and use these applications, and it is illegal to use a VPN that is not controlled by the government in China.

  • @Adomas_B
    @Adomas_B 2 ปีที่แล้ว +9

    -0.5 credits for not putting the first curly bracket in a new line

    • @xxportalxx.
      @xxportalxx. 2 ปีที่แล้ว +1

      Only if your name is Linus Torvalds lol

    • @SLayeR-ud9ji
      @SLayeR-ud9ji 2 ปีที่แล้ว +3

      this is the most controversial comment you could've left.
      BTW, scope openings belong to the same line, the condition or a definition has been declared on.

    • @vor946
      @vor946 2 ปีที่แล้ว

      +100.5 for doing so

    • @disk38
      @disk38 2 ปีที่แล้ว

      who tf cares about that
      -100000000000000 credit for pointing it out

    • @Adomas_B
      @Adomas_B 19 วันที่ผ่านมา

      ​@@SLayeR-ud9jiNo, a more controversial one would be that tabs > spaces

  • @sanneoi6323
    @sanneoi6323 5 หลายเดือนก่อน +1

    We like to keep all our code very secure. Not even our video games can be hacked and we like it that way.

  • @RenderingUser
    @RenderingUser 2 ปีที่แล้ว +3

    I suppose China only uses Rust then

  • @dawnwatching6382
    @dawnwatching6382 2 ปีที่แล้ว +2

    I thought this was gonna be a C++ file extension joke

  • @miradata9886
    @miradata9886 5 หลายเดือนก่อน +1

    Main () or void Main (), have been compiling with turbo C or VC 6.0 …

  • @justplay2508
    @justplay2508 7 หลายเดือนก่อน +3

    You're using vs code a western software you already messed up

  • @GigaJinGaming3711
    @GigaJinGaming3711 ปีที่แล้ว +1

    The incident of Tiananmen Square protests and massacre happened In june 4th, 1989. this incident was primarily caused by the death of General Secretary Hu Yaobang, economic reforms, overinflation and corruption, to which the results led to Many students during their demonstrations being killed by Chinese troops, Pro-Democracy movements and enforcement of martial law.

    • @SENTRY456123
      @SENTRY456123  ปีที่แล้ว

      -999999 social credits 💀💀💀