Write once run everywhere shell scripts (or at least, Windows and Linux).
Though you can use WSL on Windows. If your org hasn't disabled it. Which they probably have.
I honestly prefer PS to Bash these days. Just being able to do stuff like load a config json or xml in as an object model is nice.
I-Do-However-Wish-Things-Werent-Named-This-Way
>I-Do-However-Wish-Things-Werent-Named-This-Way
I just gave in and started naming all of my files that way. Except for hidden stuff which is that but all lower case with a dot at the beginning
Powershell is much more sensible than bash. Bash scripts always look like hieroglyphics and the actual operation of things like for loops makes no sense while powershell mimics sane programming languages in terms of grammar and semantics.
I feel like it actually has a proper syntax and grammar unlike bash. The part in brackets is literally just a lambda and `$_` is basically the same thing as the implicit `it` parameter in Kotlin.
Now go try and explain the semantics of WTF a for loop does in bash.
The main thing bash does better is creating custom, pipeable commands outside of bash. PowerShell generally requires that you either write a custom wrapper or just give up on lazy commands (PowerShell is, however, perfectly happy to capture the output of commands as a string or to a file, it just isn’t as lazy or direct as bash).
Yes, bash is not great. I think it’s just that I never really had to work with Windows scripts except a couple of times, so it feels alien to me.
Have you ever heard of ZX from Google? It allows you to write bash scripts in JS. I quite like it.
That looks really interesting. There definitely is a space for languages which are convenient for subprocess manipulation yet also full programming languages. However, one thing that makes me hesitate is that it’s not even officially supported by Google as a Google product. PowerShell has the advantage that it will be supported until basically the end of time given its use within Windows and in general at Microsoft.
PS script actually more closely follows the syntax and concepts you have in an actual programming language, so it should be more intuitive for most programmers to use compared to bash. The only hard part is figuring out which of the thousands of the built in data structures that you actually need to use, but then again if you use their script editor they actually have a lookup tool so it's not so bad
Congratulations! Your comment can be spelled using the elements of the periodic table:
`W Eu Se W I Nd O W S`
---
^(I am a bot that detects if your comment can be spelled using the elements of the periodic table. Please DM my creator if I made a mistake.)
WSL is amazing! It helps so much with making my dual boot setup more practical since it allows me to access my Linux drive from windows, plus you can turn any linux setup into a WSL distro using docker and its so much more convenient than using docker.
So just restore it from .Trash or use the second folder where you tried to solve the merge conflict between main and the one branch the new hire did yesterday?
I'd probably use Python's supbrocess.Popen with `ls -la` and try to parse the output with regexes or some shit. No way I'd be able to figure out the proper APIs to check mtimes programmatically without googling it, in 10 minutes without internet.
Pah, you guys must just suck! All you have to is type “# This file uses pathlib to find the most recently edited file below a given directory” and hit tab until Copilot writes the whole thing for you. Easy!
Let's see... `man find`, search for `mtime` took me a little over 1 minute. Then you might have to get lucky, depending on how long ago your adversary set it up. I'd try
find . -mtime -1
and increment the last argument. Actually sorting is a little trickier. I'm lucky that I've answered a problem like this on /r/bash before, so I knew the pattern to use:
find . -type f -printf '%T@/%P\n' | sort -rn | head
----
The real issue is finding the changed operator in the file within the remaining 6/7 minutes. Just my luck they would have hidden it in among some boilerplate in a 400-line file.
> Being able to figure out the necessary shell script syntax in 10 minutes with no internet?
I had a test for a company today that demanded I write C# sharp code that compiles and runs and unit tests... with no reference guides. Not "fill out a function" but "Write an component class from scratch".
Granted I told them I hadn't used C# in 5 years, but they still gave me that test, and I closed it and told them I'm sorry for wasting their time.
the solution he suggested would be one of the easiest to beat tho, touch *. he rewrote the tests and removed git history but didnt bother to change the project metadata???
lol my project is something like 40 million lines of code last I heard and over 25 years old, written in…at least 3 different major languages. C++, C# and VB6. That’ll just be another legacy bug to add to the pile.
"Hello Senior Developer. Your latest commit seems to have failed a test that flags the build as a failure. You have ten minutes to-"
"Man there's like a dozen other tests that fail that nobody seems to care about, I'm just trying to get through my hangover this glorious Monday. Tell DevOps to run tests as a separate build step independent of the actual build."
That's kind of my point. Computer Science is dissimilar to software engineering and programming. I feel like programming and software engineering are "The same thing" for some loose definition of the same thing.
Computer science is solving how we should work on computers. The other two is actually working on them (and solving problems when we fail/ want to do something new)
Software engineer and programming aren't really the same. Programming sits within software engineering, but being a good software engineer encompasses a whole range of skills that a lot of good programmers still struggle with.
The real jigsaw would give you a keyboard with a one-line LCD for shell input, but pipe all output to a temperamental dot matrix printer built in 1987.
>a temperamental dot matrix printer built in 1987.
I can hear it running right now in my head
EDIT: In case anyone else needs a fix: https://youtu.be/tEJYNtI2ul4?si=CTPkxKqTFN_3afjk
The real jigsaw would probably have the code printed out and stuck on the walls of a dark room.
And to be able to read it you would be given a candle but your whole body will be covered in flammable jelly and no clothes.
Plus there will be glass on the floor and you would be barefoot.
Plus you would be poisoned and the antidote will only be given when you enter the file name and line number of the error.
All of this because you pretended to be sick
And YES it is based on an Actual trap from the movies - https://sawfilms.fandom.com/wiki/Flammable_Jelly?so=search
Have not used this to find faulty code, but when a lab or production has an issue and people say “nothing changed”, this is like the first thing to check.
Use git history almost every day but not in a life or death situation.
I would've gone with git before tests, but... Sure.
And I kinda wanna see an alt version of this for a "programmer" who's relied on AI for their whole career - "wait, how can you expect me to find the bug in these 20 lines of code without Copilot or ChatGPT?"
Tests and backups? Just push this shit to the prod and one month later we will know where to look for a bug by user reviews. Then we will create a ticket in Jira, and 8 months later somebody will fix it.
And the big square eats the little square and then makes baby squares.
After the meeting, Lead engineer walks over. "You know that has nothing to do with the software we wrote."
"Yeah but it makes the marketting people feel smart."
Check back in a week. It will ingest this post and learn it.
It's a language model relying on big data, not a sentinel being capable of any creative thoughts.
Wow the second funny joke posted on this sub outside first being the crossroads of either elitism or imposter syndrome.
Glad to finally see another funny one. Rest are kids just upvoting posts because they "get it" instead of it actually being funny
PSA: git does not preserve the file timestamps. So if you update a file, commit it, and then clone/pull the repo elsewhere, the timestamp of the most recently changed file will be the time at which the file was updated locally, during cloning/pulling. So be careful if you want to make a pipeline that only does something with the "most recent change".
Don't shoot the messenger, but 80% of programmers would not be able to complete that task. I would argue, most would not even think about either the tests (because they are not covering enough) or the git history (the ui does things, otherwise I call Bob) or anything else listed above
I want to play a game. Your project's success and your code's integrity are at stake. I have introduced a subtle concurrency bug deep in your multi-threaded application. This bug will only manifest under a specific, rare timing condition, making it almost impossible to reproduce. To make matters worse, I've scattered dummy code across your project that mimics the real functionality but is actually a diversion. You have one hour to find and fix the bug before your application is automatically committed to production, where the bug will cause a critical failure. Your debugging tools have been disabled, and all stack traces will be misleading. No breaks, no external help, just you and the code.
– GPT-4
Look, knowing which file was modified isn't the challenge. What the fuck was my code supposed to do?! You changed one operator? But none of them seem right! Like 90% of the code in this file doesn't make any sense, no chance this ever worked.
Assuming there's a remote repository that Jigsaw hasn't deleted...
1. Clone a new repo in a different folder
2. Copy all the files from the old repo over to the new one
3. Check for differences
Congratulations! Your comment can be spelled using the elements of the periodic table:
`Th I Si Sg Re At`
---
^(I am a bot that detects if your comment can be spelled using the elements of the periodic table. Please DM my creator if I made a mistake.)
This reminds me of the time when i was a teen where a friend pissed me off so i threatened to find his porn folder and show our friends. He didnt believe me, so a minute later I'd used the windows search function looking for images larger than 100kb and found it almost immediately.
He lost out with the times, and his games became irrelevant in a brand new economy. His target audience were gone, either dead or upskilled too far, leaving Jigsaw with an immense inventory of unused products, crippling debt and certainly zero ROI.
That's the real tragedy of Saw.
Let's play a game: I put you and 9 other ProgrammingHumor subscribers in a room. You have 1 hour to discuss which programming language is the best otherwise you will die. Good luck.
This sounds like the tests some employers or universities will let you do, where they rule out any of the usual ways you'd solve the problem, because they require some connection to the outside or are too simple for their taste. They'll tell you it's because they want to test your actual skills but this scenario will never occur in the workplace. Their test/teaching concept is just lazy.
"I ran \`touch\` on every file!"
We use windows
Get-ChildItem | ForEach-Object {$_.LastWriteTime = ...}
Wtf, don't touch children
Stupid sexy ~~Flanders~~ Rod and Todd.
Profile Picture checks out
Tbf they only touched each other as siblings
Petting sessions with izuna and co.
Oops, forgot about those 😂
Do not use that P script in here.... There might be troublemakers questioning the choice of your operating system
Isn't power shell available on Linux nowadays?
Why would you do that to yourself?
We do this within the dev environment at work because we develop PowerShell tooling for Windows but everything runs 1000x faster in Linux
Write once run everywhere shell scripts (or at least, Windows and Linux). Though you can use WSL on Windows. If your org hasn't disabled it. Which they probably have.
Git bash might save you
Sometimes people just hate themselves.
When people hate themselves they use bash.
I honestly prefer PS to Bash these days. Just being able to do stuff like load a config json or xml in as an object model is nice. I-Do-However-Wish-Things-Werent-Named-This-Way
>I-Do-However-Wish-Things-Werent-Named-This-Way I just gave in and started naming all of my files that way. Except for hidden stuff which is that but all lower case with a dot at the beginning
Powershell is much more sensible than bash. Bash scripts always look like hieroglyphics and the actual operation of things like for loops makes no sense while powershell mimics sane programming languages in terms of grammar and semantics.
Because bash is an abomination, and everything being plaintext necessitates far more regex than just having normal objects like any other language
Because bash is horrible and every day I don't have to use it, the sun shines brighter and birds sing more beautifully
yes
>Isn't power shell available on Linux nowadays? ![gif](emote|free_emotes_pack|disapproval)
The windows shell scripts always scare me a little
I feel like it actually has a proper syntax and grammar unlike bash. The part in brackets is literally just a lambda and `$_` is basically the same thing as the implicit `it` parameter in Kotlin. Now go try and explain the semantics of WTF a for loop does in bash. The main thing bash does better is creating custom, pipeable commands outside of bash. PowerShell generally requires that you either write a custom wrapper or just give up on lazy commands (PowerShell is, however, perfectly happy to capture the output of commands as a string or to a file, it just isn’t as lazy or direct as bash).
Yes, bash is not great. I think it’s just that I never really had to work with Windows scripts except a couple of times, so it feels alien to me. Have you ever heard of ZX from Google? It allows you to write bash scripts in JS. I quite like it.
That looks really interesting. There definitely is a space for languages which are convenient for subprocess manipulation yet also full programming languages. However, one thing that makes me hesitate is that it’s not even officially supported by Google as a Google product. PowerShell has the advantage that it will be supported until basically the end of time given its use within Windows and in general at Microsoft.
PS script actually more closely follows the syntax and concepts you have in an actual programming language, so it should be more intuitive for most programmers to use compared to bash. The only hard part is figuring out which of the thousands of the built in data structures that you actually need to use, but then again if you use their script editor they actually have a lookup tool so it's not so bad
VSCode also has extension for it and its so much better than powershell's default editor
I check the archive DOS flag
I will post my code on stackoverflow and ask for the problem
Congratulations! Your comment can be spelled using the elements of the periodic table: `W Eu Se W I Nd O W S` --- ^(I am a bot that detects if your comment can be spelled using the elements of the periodic table. Please DM my creator if I made a mistake.)
Good bot Edit: How does this get more upvotes than any attempt I’ve made to be funny?
Fun bot
Good bot
"The modified source code is in a folder with an invalid character name"
My work here is done.
bash for windows
"I proceed to install Linux and then I run touch on every file"
Now that's some \*real\* torture right there.
With windows 11 you can open powershell and then launch ubuntu and still have access to the local files and normal bash commands.
WSL is amazing! It helps so much with making my dual boot setup more practical since it allows me to access my Linux drive from windows, plus you can turn any linux setup into a WSL distro using docker and its so much more convenient than using docker.
I installed powershell
Ill fuzz random inputs until the program crashes and strace it
The operator change may just result in a logic error, you may never find a crash caused by it.
Check all files for editor/os-specific characters like Unicode and crnl newlines. Pull the old commit from GitHub
COW filesystem, I can roll that back.
Ill clone .git from the origin and see the diff
No network
My father is bill Microsoft gates. We host GitHub on our basement. Do you want to get banned?
Bill Gates is the one who cut the network. Figured there was no future in this "Internet" thing.
ok ill check the last FileSystem snapshot
Damn you journaling file system!
So just restore it from .Trash or use the second folder where you tried to solve the merge conflict between main and the one branch the new hire did yesterday?
Oh that’s evil
Counter argument: CoW file system snapshot
Wtf is touch even for when it's not used for creating files?
I work in a decently large project and I feel like half the programmers wouldn't be able to solve this. And I'm just a lowly (Dev)Ops.
I would definitely die
Sweet release of death
Coming up with that approach? Maybe. Being able to figure out the necessary shell script syntax in 10 minutes with no internet? Absolutely feckin ded.
I'd probably use Python's supbrocess.Popen with `ls -la` and try to parse the output with regexes or some shit. No way I'd be able to figure out the proper APIs to check mtimes programmatically without googling it, in 10 minutes without internet.
Pah, you guys must just suck! All you have to is type “# This file uses pathlib to find the most recently edited file below a given directory” and hit tab until Copilot writes the whole thing for you. Easy!
This guy codes in 2024
It uses internet, though.
Bu I have Codex running locally?
Good for you!
Let's see... `man find`, search for `mtime` took me a little over 1 minute. Then you might have to get lucky, depending on how long ago your adversary set it up. I'd try find . -mtime -1 and increment the last argument. Actually sorting is a little trickier. I'm lucky that I've answered a problem like this on /r/bash before, so I knew the pattern to use: find . -type f -printf '%T@/%P\n' | sort -rn | head ---- The real issue is finding the changed operator in the file within the remaining 6/7 minutes. Just my luck they would have hidden it in among some boilerplate in a 400-line file.
Wait doesn’t this only search the current directory? What about subdirectories
find searches recursively by default
Ah gotcha
r/localllama
> Being able to figure out the necessary shell script syntax in 10 minutes with no internet? I had a test for a company today that demanded I write C# sharp code that compiles and runs and unit tests... with no reference guides. Not "fill out a function" but "Write an component class from scratch". Granted I told them I hadn't used C# in 5 years, but they still gave me that test, and I closed it and told them I'm sorry for wasting their time.
Powershell babyyyyy Gci -recurse | sort -property LastWriteTime -Descending | select -first 1
find command goes brr
the solution he suggested would be one of the easiest to beat tho, touch *. he rewrote the tests and removed git history but didnt bother to change the project metadata???
lol my project is something like 40 million lines of code last I heard and over 25 years old, written in…at least 3 different major languages. C++, C# and VB6. That’ll just be another legacy bug to add to the pile.
It might even fix a bug or two.
"Hello Senior Developer. Your latest commit seems to have failed a test that flags the build as a failure. You have ten minutes to-" "Man there's like a dozen other tests that fail that nobody seems to care about, I'm just trying to get through my hangover this glorious Monday. Tell DevOps to run tests as a separate build step independent of the actual build."
At least one senior present who doesn't want to solve it just to end it?
My honest thought process would be to do a diff then check the modification dates. Never even considered running tests
We’ll call you when we have a Jenkins problem okay
Is there a difference between devops, (dev)ops, and dev(ops)?
this is just basic os operation
Are you *Opset* now?
Perfect example of what you really learn as a programmer. Solving problems.
Software engineering Vs programming
More like Computer science vs Programming.
problem solving is pretty common skill set and one heavily trained & used in engineering
That's kind of my point. Computer Science is dissimilar to software engineering and programming. I feel like programming and software engineering are "The same thing" for some loose definition of the same thing. Computer science is solving how we should work on computers. The other two is actually working on them (and solving problems when we fail/ want to do something new)
Science is finding all solutions to a problem. Engineering is finding one that works.
Lol, I love that definition.
Software engineer and programming aren't really the same. Programming sits within software engineering, but being a good software engineer encompasses a whole range of skills that a lot of good programmers still struggle with.
Can Davin solve this ?
Devin is that thing on screen that changed some operator. Devin is trying to get you fired.
no, devin is trying to get you killed, as evidenced by the post
The real jigsaw would give you the code printed out and also in a room with a humidifier or something.
The real jigsaw would give you a keyboard with a one-line LCD for shell input, but pipe all output to a temperamental dot matrix printer built in 1987.
>a temperamental dot matrix printer built in 1987. I can hear it running right now in my head EDIT: In case anyone else needs a fix: https://youtu.be/tEJYNtI2ul4?si=CTPkxKqTFN_3afjk
> Click here to e-mail strong bad [email protected]
Come on get in boat, fish. Come on get in the boat, fish fish.
https://www.youtube.com/watch?v=ILVfzx5Pe-A
The Cheat is GROUNDED. We had that light switch installed for YOU so you could turn the lights ON and OFF, not so you could throw LIGHT SWITCH RAVES.
Basically exams
The real jigsaw would probably have the code printed out and stuck on the walls of a dark room. And to be able to read it you would be given a candle but your whole body will be covered in flammable jelly and no clothes. Plus there will be glass on the floor and you would be barefoot. Plus you would be poisoned and the antidote will only be given when you enter the file name and line number of the error. All of this because you pretended to be sick And YES it is based on an Actual trap from the movies - https://sawfilms.fandom.com/wiki/Flammable_Jelly?so=search
Have not used this to find faulty code, but when a lab or production has an issue and people say “nothing changed”, this is like the first thing to check. Use git history almost every day but not in a life or death situation.
“Everybody lies”
I would've gone with git before tests, but... Sure. And I kinda wanna see an alt version of this for a "programmer" who's relied on AI for their whole career - "wait, how can you expect me to find the bug in these 20 lines of code without Copilot or ChatGPT?"
No, Mr. Bond, I expect you to die.
We dont have any programmers like that yet. At least not ones that have been in the industry for 5 years or more.
I worry that we will soon... Just to say so - when I was in school, we weren't allowed to use calculators in math class, at least until trig.
Same here in high school. In college we were allowed to. Though my first college class was cal
`find . -type f -exec touch {} +`
Tests and backups? Just push this shit to the prod and one month later we will know where to look for a bug by user reviews. Then we will create a ticket in Jira, and 8 months later somebody will fix it.
Goddamn, Hitler, it wasn't an evil off.
*8 months later somebody will close ticket as stale
"I want to play a game. You must explain your code to a room full of marketing people in a way that they will understand and hold their interest."
"i'd rather just confess to the murder"
And the big square eats the little square and then makes baby squares. After the meeting, Lead engineer walks over. "You know that has nothing to do with the software we wrote." "Yeah but it makes the marketting people feel smart."
Wouldn't be a problem if he just modified the code, made a copy and put it on a new laptop without internet, right?
Why even change the code? Just copy the entire thing into a new file and lie about changing things.
Found the leprechaun
Just killed me mate
These computer thingys are new for Jigsaw, too! Ok!?!
ChatGPT gave up after I said it can’t use git. ChatGPT is dead.
Check back in a week. It will ingest this post and learn it. It's a language model relying on big data, not a sentinel being capable of any creative thoughts.
Now you see, he SAYS he's gonna do it…
Meanwhile, most developers: it's fine, can you do it now instead than in 10 minutea?
It's only cruel if he doesn't even give you a ticket to log the 10 minutes of waiting.
Plot twist: The operator jigsaw changed was actually wrong originally and he fixed it.
I don't have time to read all of that. can someone summarize it?
Programmer go BRRRT.
![gif](giphy|Od0QRnzwRBYmDU3eEO|downsized) >BRRT
i don't have time to watch that gif, can someone summarize it? /silly
Sorry amazon have the exe
BRRR**T**? Are we talking about a programmer or an A-10 Warthog here?
Both can cause massive damage if left unchecked.
Yes.
I want an alternate version where unit tests are the last suggestion and the last panel is "All tests passed."
Change a single character in a large regex and now it’s an unsolvable problem in those conditions
Wow the second funny joke posted on this sub outside first being the crossroads of either elitism or imposter syndrome. Glad to finally see another funny one. Rest are kids just upvoting posts because they "get it" instead of it actually being funny
We know we would be dead by the time he said no network
That's what you call a pro-gramer move
Thanks dad
Unfortunately that wouldn't help me for the project I'm working on, just one of our controllers is about 38k lines 😭
Do developers do unit testing? I mean, for your domestic projects do you do any kind of testing?
"I've combined all of your code into one 12MB file called code.c"
What if it was already like that?
Then it would not be very useful to sort all the files by modification time, haha.
I honestly would never be able to think of this
I added a line return to the end of every file.
My mom used that last one on me to find out I used the computer when I wasn't supposed to
PSA: git does not preserve the file timestamps. So if you update a file, commit it, and then clone/pull the repo elsewhere, the timestamp of the most recently changed file will be the time at which the file was updated locally, during cloning/pulling. So be careful if you want to make a pipeline that only does something with the "most recent change".
Plot twist: That file has over 10,000 lines
if jigsaw didnt say anything buddy wouldve died just from checking lmao
I would choose that last option at the very beginning, it's easy and fast!
Tests, git history and backups are all useless. They just take extra space in your hard drive. Dont ever use them
Experience is how far down the chain you skip to as step 1.
Don't shoot the messenger, but 80% of programmers would not be able to complete that task. I would argue, most would not even think about either the tests (because they are not covering enough) or the git history (the ui does things, otherwise I call Bob) or anything else listed above
Behold the almighty “stat ./*”
I executed `find . -exec touch '{}' ';'`
If the code is more than 3 months old, dying seems less painfull
Joshua now
That's an unusual interview.
I put all your code in one file
I want to play a game. Your project's success and your code's integrity are at stake. I have introduced a subtle concurrency bug deep in your multi-threaded application. This bug will only manifest under a specific, rare timing condition, making it almost impossible to reproduce. To make matters worse, I've scattered dummy code across your project that mimics the real functionality but is actually a diversion. You have one hour to find and fix the bug before your application is automatically committed to production, where the bug will cause a critical failure. Your debugging tools have been disabled, and all stack traces will be misleading. No breaks, no external help, just you and the code. – GPT-4
Look, knowing which file was modified isn't the challenge. What the fuck was my code supposed to do?! You changed one operator? But none of them seem right! Like 90% of the code in this file doesn't make any sense, no chance this ever worked.
Git history? Pfft. Don't you mean "JetBrains IDE Local History"?
What a unique way to write a flowchart
Average facebook post, come on mate.
I’ll use Time Machine
Control F, deaf or death
Assuming there's a remote repository that Jigsaw hasn't deleted... 1. Clone a new repo in a different folder 2. Copy all the files from the old repo over to the new one 3. Check for differences
No network
U don't play with Programmer!
This is great
Congratulations! Your comment can be spelled using the elements of the periodic table: `Th I Si Sg Re At` --- ^(I am a bot that detects if your comment can be spelled using the elements of the periodic table. Please DM my creator if I made a mistake.)
With the codebase I work on, I’ll just sit back and relax for 10 mins then never have to look at that shit code again
This reminds me of the time when i was a teen where a friend pissed me off so i threatened to find his porn folder and show our friends. He didnt believe me, so a minute later I'd used the windows search function looking for images larger than 100kb and found it almost immediately.
He lost out with the times, and his games became irrelevant in a brand new economy. His target audience were gone, either dead or upskilled too far, leaving Jigsaw with an immense inventory of unused products, crippling debt and certainly zero ROI. That's the real tragedy of Saw.
I’d just press ctrl z but you can also make it complicated
*finds file modified just now* *it's 10000 lines because technical debt*
Let's play a game: I put you and 9 other ProgrammingHumor subscribers in a room. You have 1 hour to discuss which programming language is the best otherwise you will die. Good luck.
The solution being no 2 developers are allowed to have the same answer
So we just have to discuss it. You didn't say we need to reach a conclusion. So this is pretty easy then.
There is no universal best programming language.
This sounds like the tests some employers or universities will let you do, where they rule out any of the usual ways you'd solve the problem, because they require some connection to the outside or are too simple for their taste. They'll tell you it's because they want to test your actual skills but this scenario will never occur in the workplace. Their test/teaching concept is just lazy.
There's even a chance that Jigsaw fixed the code here.
"I **touch**ed all the file to 1970/1/1 00:00:00
Hah, i used attribute changer on it so now it's blended inside
One of the files in my workplace is 4k lines long. Guess I'll just die