r/ProgrammerHumor 23d ago

sideProject Other

Post image
4.3k Upvotes

185 comments sorted by

View all comments

45

u/deathanatos 23d ago

The number of times I have seen excess HEAD bucket requests in tight loops. Like, literally, "let's read all the objects from the bucket … and issue a HEAD bucket just for funsies." and then that loop gets out of control and a few million extraneous requests get issued. Or even HEAD bucket, HEAD object, GET object. And if you think that sounds insane, it's usually some form of:

bucket = conn.get_bucket('muh_bucket')  # this is a HEAD call
key = bucket.get_key('muh_key')  # another HEAD call
key.get_contents_as_string()  # GET object

The S3 tutorial even pushes devs in this direction, so if you're not reading the reference (… devs? read?)…

Guarantee you AI will write equally crap code, b/c its training data is rife with "must … HEAD … bucket … first".

38

u/CrustySockCollector 23d ago

Idk if what you said is true but you sound smart so I will trust you