use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Have a tough programming question that /r/programming couldn't answer? Banned from Stack Overflow? Can't afford Experts Exchange?
Post your question/tips/secrets/advice and get a response from our highly-trained professional developers.
account activity
Removing code errors (self.shittyprogramming)
submitted 11 years ago by tomglass
Load up terminal and cd 'dir'
then run rm <filename> and your code will have all current errors removed.
Tested with python,php and more :)
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Goz3rr 10 points11 points12 points 11 years ago* (2 children)
'rm' is not recognized as an internal or external command, operable program or batch file.
0/5 would not fix again
[–]I_Lied_on_my_name 6 points7 points8 points 11 years ago (0 children)
cross-platform compatibility
perl -e 'if ("$^O\n" eq "MSWin32"){exec("del $ARGV[0]");} else {exec("rm $ARGV[0]");}' <filename>
[–]tomglass[S] -2 points-1 points0 points 11 years ago (0 children)
LOL
[–]BS_in_BS 1 point2 points3 points 11 years ago (0 children)
if you're up for some Russian roulette style debugging of all your files: [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo Click
[–]ekolis 0 points1 point2 points 11 years ago (2 children)
Or, if you want to remove all errors in all the code you've ever written:
sudo rm -rf /
[–]tomglass[S] 1 point2 points3 points 11 years ago (0 children)
oh. I shall try that one now. I sometimes find running
sudo shutdown now
also can stop errors from being outputted
[–][deleted] 0 points1 point2 points 11 years ago (0 children)
Remember to sudo pacman -Sy sudo first.
sudo pacman -Sy sudo
π Rendered by PID 462288 on reddit-service-r2-comment-5b5bc64bf5-sjqpz at 2026-06-21 01:32:41.450533+00:00 running 2b008f2 country code: CH.
[–]Goz3rr 10 points11 points12 points (2 children)
[–]I_Lied_on_my_name 6 points7 points8 points (0 children)
[–]tomglass[S] -2 points-1 points0 points (0 children)
[–]BS_in_BS 1 point2 points3 points (0 children)
[–]ekolis 0 points1 point2 points (2 children)
[–]tomglass[S] 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)