
779 So.2d 103 (2001)
STATE of Louisiana
v.
Isaac HANDY.
No. 2000-KA-0051.
Court of Appeal of Louisiana, Fourth Circuit.
January 24, 2001.
Laura Pavy, Louisiana Appellate Project, New Orleans, LA, Counsel for Defendant/Appellant.
Court composed of KIRBY, LOVE and GORBATY, Judges.
GORBATY, Judge.
On October 22, 1998, the defendant, Isaac Handy, was charged by bill of information with possession of cocaine in violation of La. R.S. 40:967(C). The defendant pled not guilty at his arraignment on October 28, 1998. After a hearing on April 12, 1999, the trial court found probable cause and denied the motion to suppress the evidence. After a trial on May 26, 1999, a six-member jury found him guilty of attempted possession of cocaine. The State then filed a multiple bill of information, and after a hearing on July 28, 1999, Handy was sentenced to serve twenty years at hard labor as a fourth felony offender under La. R.S. 15:529.1. His motion for reconsideration of the sentence was denied. Defendant subsequently filed this appeal.


*104 FACTS

Officer Paul Noel testified at trial that while he was on a routine patrol in "Pigeon Town," the area around the 8900 block of Willow Street, he saw the defendant sitting on the porch at 8926 Willow Street, an abandoned house. The officer had previously had trouble with people loitering around abandoned houses, and this house had a "No Trespassing" sign posted on it. Officer Noel stopped to investigate, and noticed that Handy was holding an object to his mouth with his left hand and in his right hand was holding a lighter. He appeared to be smoking something. The officer could see that it was not a cigarette or cigar and suspected that it was a crack pipe. When Handy saw the police officer, he put the pipe down on his left side and the lighter on his right. Officer Noel read Handy his rights, and Officer Stevens, Noel's partner, retrieved the pipe, which was still warm and contained a white residue. A push rod, which is used to push crack cocaine into the pipe, was also recovered. Handy was charged with possession of cocaine and possession of drug paraphernalia.
Officer Ronald Stevens also participated in the arrest of the defendant. He testified to the same facts as Officer Noel. Additionally, Officer Stevens said that Handy appeared very startled when he saw the officers and put his hands to his sides. He then stood up, and his hands were empty. While Officer Noel detained Handy, Officer Stevens went to the porch, where he found a glass crack pipe that was still warm, a silver metal rod, and a cigarette lighter.
Mr. Corey Hall, an expert in the testing of controlled dangerous substances, testified that he performed two tests, the microcrystalline test and the gas chromatograph mass spectrometer test, on the substance in the pipe. It proved to be cocaine. At trial, Mr. Hall viewed the pipe again and pointed out that a residue was still clearly visible, and he scraped some of it out of the pipe.

ASSIGNMENT OF ERROR NUMBER ONE
In his sole assignment of error, the defendant argues that the evidence is insufficient to support the conviction. Specifically, he contends that the State cannot meet its burden of proving beyond a reasonable doubt that the defendant knew that there was cocaine in the pipe because there was no testimony at trial that the officers saw a residue in the pipe.
The standard of review for the sufficiency of the evidence is whether, viewing the evidence in a light most favorable to the prosecution, a rational trier of fact could have found that the State proved the essential elements of the crime beyond a reasonable doubt. Jackson v. Virginia, 443 U.S. 307, 99 S.Ct. 2781, 61 L.Ed.2d 560 (1979); State v. Jacobs, 504 So.2d 817 (La.1987).
To support a conviction for possession of cocaine, the State must prove that the defendant was in possession of the illegal drug and that he knowingly possessed it. State v. Lavigne, 95-0204 (La. App. 4th Cir.5/22/96), 675 So.2d 771, writ denied, 96-1738 (La.1/10/97), 685 So.2d 140; State v. Chambers, 563 So.2d 579 (La.App. 4th Cir.1990). To prove attempt, the State must show that the defendant committed an act tending directly toward the accomplishment of his intent to possess cocaine. Chambers, 563 So.2d at 580.
The elements of knowledge and intent are states of mind and need not be proven as facts, but rather may be inferred from the circumstances. The factfinder may draw reasonable inferences to support these contentions based upon the evidence presented at trial. State v. Reaux, 539 So.2d 105 (La.App. 4th Cir.1989).
At trial, Officer Noel testified that he arrested Handy for possession of cocaine on the basis of the "visible white residue" apparent in the glass pipe. Furthermore, Mr. Hall, the criminalist, testified that some of the white residue remained after *105 the testing process, and he took the metal rod and scraped it out of the pipe. Obviously, when Handy was arrested, the glass pipe contained enough cocaine for him to know that he possessed the drug.
In State v. Spates, 588 So.2d 398 (La. App. 2nd Cir.1991), a defendant argued that his "straight shooter," which contained a cocaine residue, did not rise to the level of sufficient proof that he knowingly and intentionally possessed cocaine. The court noted that a conviction for possession of a controlled dangerous substance may rest on the possession of traces or residue of the substance, and that possession of narcotics paraphernalia is relevant evidence of intent or guilty knowledge of the defendant's possession of controlled dangerous substances. The Second Circuit, in affirming the conviction, stated that possession of the straight shooter was evidence of guilty knowledge that it contained cocaine because the object had no other use.
This case is similar to State v. Lavigne 95-0204 (La.App. 4th Cir.5/22/96), 675 So.2d 771, where this court upheld the defendant's conviction for attempted possession of cocaine. The defendant, acting in an irate manner, was stopped by the police, who found a crack pipe containing a cocaine residue in his pocket. The defendant claimed he found the pipe on the street and did not know it contained cocaine because he could not see the residue. In affirming his conviction, this court noted that the defendant's guilty knowledge could be inferred from his actions prior to arrest, from his dominion and control over the pipe commonly used with drugs, and from the cocaine residue found in the pipe.
In the case at bar, Officers Noel and Stevens testified they saw the defendant with what appeared to be a pipe to his lips, and when he noticed them, he appeared startled and put the pipe and lighter down. When retrieved, the crack pipe was still warm and contained a visible residue. Such evidence is sufficient to sustain a conviction for attempted possession of cocaine. The defendant's possession of a crack pipe with visible cocaine residue in it allows an inference that the defendant had the intent to attempt to possess cocaine.
Thus, the State produced sufficient evidence to sustain Handy's conviction for attempted possession of cocaine. This assignment of error is without merit.

ERRORS PATENT
The defendant also complains that the trial court failed to advise him of the prescriptive period for filing any applications for post-conviction relief under La. C.Cr.P. art. 930.8. This article contains merely precatory language and does not bestow an enforceable right upon an individual defendant. State ex rel. Glover v. State, 93-2330, 94-2101, 94-2197, p. 21 (La.9/5/95), 660 So.2d 1189, 1201.
However, in the interest of judicial economy, we note for defendant that La. C.Cr.P. art. 930.8 generally requires that applications for post-conviction relief be filed within two years of the finality of a conviction.

CONCLUSION
Accordingly, for the foregoing reasons, the defendant's conviction and sentence are affirmed.
AFFIRMED.
