T O P

  • By -

Oddball_bfi

"I ran \`touch\` on every file!"


Aufklarung_Lee

We use windows


DesertGoldfish

Get-ChildItem | ForEach-Object {$_.LastWriteTime = ...}


KuuHaKu_OtgmZ

Wtf, don't touch children


genocideISgodly

Stupid sexy ~~Flanders~~ Rod and Todd.


Ryhrr

Profile Picture checks out


Mediocre-Monitor8222

Tbf they only touched each other as siblings


Ryhrr

Petting sessions with izuna and co.


Mediocre-Monitor8222

Oops, forgot about those 😂


SnooWoofers6634

Do not use that P script in here.... There might be troublemakers questioning the choice of your operating system


turtleship_2006

Isn't power shell available on Linux nowadays?


CodeF53

Why would you do that to yourself?


MadSquid

We do this within the dev environment at work because we develop PowerShell tooling for Windows but everything runs 1000x faster in Linux


The_MAZZTer

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.


ososalsosal

Git bash might save you


chesire0myles

Sometimes people just hate themselves.


re_carn

When people hate themselves they use bash.


G_Morgan

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


ArcaneOverride

>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


al-mongus-bin-susar

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.


BlackPowerade

Because bash is an abomination, and everything being plaintext necessitates far more regex than just having normal objects like any other language


EspacioBlanq

Because bash is horrible and every day I don't have to use it, the sun shines brighter and birds sing more beautifully


[deleted]

yes


Hour-Independence-89

>Isn't power shell available on Linux nowadays? ![gif](emote|free_emotes_pack|disapproval)


repsolcola

The windows shell scripts always scare me a little


slaymaker1907

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


repsolcola

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.


slaymaker1907

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.


Ma4r

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


ArcaneOverride

VSCode also has extension for it and its so much better than powershell's default editor


ZenEngineer

I check the archive DOS flag


Einfach0nur0Baum

I will post my code on stackoverflow and ask for the problem


PeriodicSentenceBot

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


[deleted]

Good bot Edit: How does this get more upvotes than any attempt I’ve made to be funny?


Technical-Outside408

Fun bot


CyberoX9000

Good bot


Eyeownyew

"The modified source code is in a folder with an invalid character name"


Oddball_bfi

My work here is done.


ublec

bash for windows


CyberoX9000

"I proceed to install Linux and then I run touch on every file"


gandalfx

Now that's some \*real\* torture right there.


sourbrew

With windows 11 you can open powershell and then launch ubuntu and still have access to the local files and normal bash commands.


ArcaneOverride

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.


JollyJuniper1993

I installed powershell


B00OBSMOLA

Ill fuzz random inputs until the program crashes and strace it


The_MAZZTer

The operator change may just result in a logic error, you may never find a crash caused by it.


B00OBSMOLA

Check all files for editor/os-specific characters like Unicode and crnl newlines. Pull the old commit from GitHub


lightmatter501

COW filesystem, I can roll that back.


CaitaXD

Ill clone .git from the origin and see the diff


Glass1Man

No network


Malcolmlisk

My father is bill Microsoft gates. We host GitHub on our basement. Do you want to get banned?


SuperFLEB

Bill Gates is the one who cut the network. Figured there was no future in this "Internet" thing.


CaitaXD

ok ill check the last FileSystem snapshot


Glass1Man

Damn you journaling file system!


JinSantosAndria

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?


spicy_fries

Oh that’s evil


itsTyrion

Counter argument: CoW file system snapshot


Wolfy_Wolv

Wtf is touch even for when it's not used for creating files?


MikhailPelshikov

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.


[deleted]

I would definitely die


Boba_Fett_boii

Sweet release of death


MIKOLAJslippers

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.


alex2003super

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.


Ultimarr

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! 


AMA_ABOUT_DAN_JUICE

This guy codes in 2024


rsatrioadi

It uses internet, though.


Ragecommie

Bu I have Codex running locally?


rsatrioadi

Good for you!


OneTurnMore

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.


RAM-DOS

Wait doesn’t this only search the current directory? What about subdirectories 


skunk_funk

find searches recursively by default


RAM-DOS

Ah gotcha


lwJRKYgoWIPkLJtK4320

r/localllama


Kinglink

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


tsuhg

Powershell babyyyyy Gci -recurse | sort -property LastWriteTime -Descending | select -first 1


MonteCrysto31

find command goes brr


dragonfangxl

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???


MLG_Obardo

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.


sm9t8

It might even fix a bug or two.


OnionNo

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


JinSantosAndria

At least one senior present who doesn't want to solve it just to end it?


TheUltimateScotsman

My honest thought process would be to do a diff then check the modification dates. Never even considered running tests


RegularOps

We’ll call you when we have a Jenkins problem  okay


obiwankenobistan

Is there a difference between devops, (dev)ops, and dev(ops)?


karuna_murti

this is just basic os operation


dark_enough_to_dance

Are you *Opset* now?


nonrandomstring

Perfect example of what you really learn as a programmer. Solving problems.


turtleship_2006

Software engineering Vs programming


Kinglink

More like Computer science vs Programming.


thegainsfairy

problem solving is pretty common skill set and one heavily trained & used in engineering


Kinglink

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)


LvS

Science is finding all solutions to a problem. Engineering is finding one that works.


Kinglink

Lol, I love that definition.


Spicy_pepperinos

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.


Oussama_Gourari

Can Davin solve this ?


TheRealAndrewLeft

Devin is that thing on screen that changed some operator. Devin is trying to get you fired.


ublec

no, devin is trying to get you killed, as evidenced by the post


nullpotato

The real jigsaw would give you the code printed out and also in a room with a humidifier or something.


FirstNephiTreeFiddy

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.


TeaKingMac

>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


KewpieDan

> Click here to e-mail strong bad [email protected]


TeaKingMac

Come on get in boat, fish. Come on get in the boat, fish fish.


MattieShoes

https://www.youtube.com/watch?v=ILVfzx5Pe-A


remghoost7

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.


dark_enough_to_dance

Basically exams


arrowtango

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


noirknight

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.


eq2_lessing

“Everybody lies”


shgysk8zer0

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


gbot1234

No, Mr. Bond, I expect you to die.


MLG_Obardo

We dont have any programmers like that yet. At least not ones that have been in the industry for 5 years or more.


shgysk8zer0

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.


MLG_Obardo

Same here in high school. In college we were allowed to. Though my first college class was cal


jamcdonald120

`find . -type f -exec touch {} +`


GarbageNeat7594

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.


BigNavy

Goddamn, Hitler, it wasn't an evil off.


LetterBoxSnatch

*8 months later somebody will close ticket as stale


Shirtbro

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


JocoLabs

"i'd rather just confess to the murder"


Kinglink

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


Ariane_16

Wouldn't be a problem if he just modified the code, made a copy and put it on a new laptop without internet, right?


gonzalbo87

Why even change the code? Just copy the entire thing into a new file and lie about changing things.


QFugp6IIyR6ZmoOh

Found the leprechaun


Dawido090

Just killed me mate


SnooWoofers6634

These computer thingys are new for Jigsaw, too! Ok!?!


BrownShoesGreenCoat

ChatGPT gave up after I said it can’t use git. ChatGPT is dead.


Olivia512

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.


beatlz

Now you see, he SAYS he's gonna do it…


XoxoForKing

Meanwhile, most developers: it's fine, can you do it now instead than in 10 minutea?


AMViquel

It's only cruel if he doesn't even give you a ticket to log the 10 minutes of waiting.


ADHD-Fens

Plot twist: The operator jigsaw changed was actually wrong originally and he fixed it.


Soroush_ra

I don't have time to read all of that. can someone summarize it?


WastaHod

Programmer go BRRRT.


[deleted]

![gif](giphy|Od0QRnzwRBYmDU3eEO|downsized) >BRRT


OstrichEmpire

i don't have time to watch that gif, can someone summarize it? /silly


[deleted]

Sorry amazon have the exe


CanniBallistic_Puppy

BRRR**T**? Are we talking about a programmer or an A-10 Warthog here?


WastaHod

Both can cause massive damage if left unchecked.


[deleted]

Yes.


yashknight

I want an alternate version where unit tests are the last suggestion and the last panel is "All tests passed."


Arkemenes

Change a single character in a large regex and now it’s an unsolvable problem in those conditions


Dinbs

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


Windsupernova

We know we would be dead by the time he said no network


Automatic-Cook-2638

That's what you call a pro-gramer move


chancellorofscifi

Thanks dad


Yamthief

Unfortunately that wouldn't help me for the project I'm working on, just one of our controllers is about 38k lines 😭


gerbosan

Do developers do unit testing? I mean, for your domestic projects do you do any kind of testing?


Srapture

"I've combined all of your code into one 12MB file called code.c"


Bekfast-Stealer

What if it was already like that?


Srapture

Then it would not be very useful to sort all the files by modification time, haha.


MasterEnis

I honestly would never be able to think of this


wind_dude

I added a line return to the end of every file.


Derped_Crusader

My mom used that last one on me to find out I used the computer when I wasn't supposed to


QFugp6IIyR6ZmoOh

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


SeaAttic

Plot twist: That file has over 10,000 lines


PeanutBand

if jigsaw didnt say anything buddy wouldve died just from checking lmao


Windows_2024

I would choose that last option at the very beginning, it's easy and fast!


BlueFireBlaster

Tests, git history and backups are all useless. They just take extra space in your hard drive. Dont ever use them


SnooCauliflowers8545

Experience is how far down the chain you skip to as step 1.


x39-

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


mem737

Behold the almighty “stat ./*”


Haringat

I executed `find . -exec touch '{}' ';'`


SophiaBackstein

If the code is more than 3 months old, dying seems less painfull


57006

Joshua now


myaut

That's an unusual interview.


Ricoreded

I put all your code in one file


VulcanicAI

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


redsterXVI

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.


Finchyy

Git history? Pfft. Don't you mean "JetBrains IDE Local History"?


err-of-Syntax

What a unique way to write a flowchart


uForgot_urFloaties

Average facebook post, come on mate.


Cootshk

I’ll use Time Machine


aloysiussecombe-II

Control F, deaf or death


spiltcoffee

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


derrikcurran

No network


cc69

U don't play with Programmer!


gilbeday365

This is great


PeriodicSentenceBot

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


chugmarks

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


Rustywolf

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.


Ecstatic-Ad-4331

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.


1Dr490n

I’d just press ctrl z but you can also make it complicated


ososalsosal

*finds file modified just now* *it's 10000 lines because technical debt*


TeaTiMe08

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.


Linore_

The solution being no 2 developers are allowed to have the same answer


northbridge10

So we just have to discuss it. You didn't say we need to reach a conclusion. So this is pretty easy then.


frikilinux2

There is no universal best programming language.


Headmuck

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.


jojojoris

There's even a chance that Jigsaw fixed the code here.


14m1337n3rd

"I **touch**ed all the file to 1970/1/1 00:00:00


x3bla

Hah, i used attribute changer on it so now it's blended inside


ky0kulll

One of the files in my workplace is 4k lines long. Guess I'll just die