I don't think being clever with code necessarily equates to having common sense. If he had common sense, he would have went on his merry way without bragging on the internet...
You possibly vastly underestimate how important it is for people commiting "perfect" crimes to tell the world it was them. There's a lot of stories about forgers including subtle clues in their forgeries to be able to claim their "art" and prove they duped people.