A few years ago I read an article online about programming and the value of being lazy. I would like to read it again, if only I could find it. If you know of any article that touches on this topic please post a link to it here. Thank you.
I got one about lazy programmers in an email from a Code project newsletter I think. I'm digging through my old mail trying to find it now. Is that the one you're talking about?
I dont recall much about this article. It talked about how adding a new programmer in the middle of a project slows progress down more than speeding it up. It went on about when its ok to be lazy and the value of writing a program to do your work instead of actually doing the work.
I have done several Google searches and did not find the artical I am looking for. When I get some time this week I will rip through the internet with the speed and force of an ADHD kid. Even if I have to manually tear 10000 sites to find it, I will find it!!
On the subject of laziness I just wrote a python script which clears the trashcan in Ubuntu every 300 seconds (5 minutes). I'm actually too lazy to click the trashcan icon every couple now and again just to delete it's contents. Then I added it to my list of startup programs so I don't even have to invoke it myself.
I'm going to find more ways of getting python to do things for me so I don't have to bother... I'll try to think of some other things I do alot that I can get python to do for me...
1 2 3 4 5 6
import os
import time
while True:
os.system("rm -rf .local/share/Trash/*") # Clear trash
time.sleep(300.0) # Wait 300 seconds (5 minutes)
That's it... it's so cool how easy that is. At first I thought it would waste the CPU but it doesn't :)
I delete alot of stuff, very often. I get some kind of weird satisfaction from it, like I'm saving loads of space on my hard drive (hey, 1kb used to be alot)
Don't you love the feeling you get when you teach a computer to replace you.
Yeah :) Also I'm extremely lazy. When I have time I'm going to write something to do algebra for me... I remember someone saying that they'd written a program to do it but I've forgotten who it was. Anyway all I want it to do is find x in something like
x + 3 x + 7
----- = -----
x - 3 x - 5
because I can't do it! Stupid maths teacher didn't even teach us how to do this stuff. He's a complete waste of space.
You mean remove the whole wastebasket thing and just permadelete things with the delete key? No, this way I get five minutes just in case I made an accident :) That is the point of having a wastebasket, afterall...
No, you get at most five minutes. On average, you'll get two and a half minutes.
What? It should sleep for 300 seconds (if only I could live off of 300 seconds of sleep per day; I'd be SO much more productive!) so how could it possibly re-iterate before 300 seconds is up? Is the Linux scheduler THAT good? "Attention: Linux kernel's scheduler is now so fast it can "compress" time. Yes, you heard right." I guess it must just be magic.
Any sufficiently advanced technology is indistinguishable from magic.
wow, Arthur C Clarke was right!
That doesn't really matter anyway. Usually if I delete something by accident; I'll be able to recover it within a minute... If not... then I best start rewriting the file/fixing the system/whatever I broke.
@Duoas,
Personally, I'd bump the time up to about thirty minutes, or once a day...
Hm? I don't know why, but I can't stand seeing the wastebasket not-empty. This way, so long as I don't look at it within 5 minutes; I don't have to OCD-ily empty it myself all the time.
Look carefully at what your code is doing. It's just unconditionally emptying a directory every five minutes. What do you think would happen if you sent a file there 4:59 minutes after the last deletion?
If it empties a directory then 300 seconds later it will empty it again. So every five minutes it is emptying the directory. If I put a file into the directory 2 minutes before the next deletion, then 120 seconds later, the file is deleted. So it is deleting files every 5 minutes; but just not necessarily five minutes after I delete it... I get it now.
Ok I'm going to add code to check if there's anything in the directory. Ideally, eventually, it will check for anything in the directory, and if there is anything it will delete it one minute later.
Actually it would delete the file immediately. You would need to check every second or so to see if there are files, and if there are, THEN start the 5 minute timer.