A "smart alec" or "smart aleck" is a person regarded as obnoxiously self-assertive and an impudent person.
"You accept the love you think you deserve. I'm sorry, hun but it isn't what you think it is this time. Smart alec as you can be, even though you are clearly misinformed." So What -Tiffany Odeama.
The key to his activities was that they did so in close association with two police officers, who shared the loot and provided protection. Most was done by pickpocketing, with Melinda taking the victim’s pocketbook while the victim was otherwise engaged and surreptitiously handing it to Hoag or French Jack as they walked by. Hoag's downfall came because he got into financial difficulties and tried to cheat his police protectors out of their share of the loot. In one exchange, Hoag lay behind a wall in a churchyard and had Melinda drop the goods over the wall to him so that the constables couldn't see them.
The aforementioned "panel game" was a trick also used by the original Smart Alec, although not exclusively by him. George Wilkes, the assistant editor of the Subterranean, met Hoag while Wilkes was falsely imprisoned in the infamous New York prison called The Tombs. Wilkes described the trick in a diary of 1844, The Mysteries of the Tombs: "Melinda would make her victim lay his clothes, as he took them off, upon a chair at the head of the bed near the secret panel, and then take him to her arms and closely draw the curtains of the bed. As soon as everything was right and the dupe not likely to heed outside noises, the traitress would give a cough, and the faithful Aleck would slily enter, rifle the pockets of every farthing or valuable thing, and finally disappear as mysteriously as he entered." The victim was then persuaded to leave in a hurry through a window by Alec banging on the door, pretending to be an aggrieved husband who had suddenly returned from a trip away.
Hoag used this trick to avoid paying off his police protectors, so that when he was caught, the police were in no mood to aid him. He was sentenced to jail, but escaped through the help of his brother, only to be recaptured following extensive police searches, having been recognized by Wilkes.
Professor Cohen suggests that Alex Hoag was given the sobriquet of "smart Alec" by the police for being a resourceful thief who outsmarted himself by trying to avoid paying graft. It's impossible to be certain this is the true story, since the expression doesn't appear in print until 1865, but it does seem extremely plausible.
Several of the more reliable dictionaries agree. The Oxford English Dictionary traces it to mid-1860s slang, while the American Heritage Dictionary (4th ed., 2000) and Brewer's Dictionary of Phrase and Fable (16th ed., 1999) tentatively trace the etymology of the phrase to Hoag.