If you want to write code in articles the best option is using Github Gist. You can just link to the gist if it is not embed-able here.
One more trick is to take screenshot of small code snippet if that's what you want to show.
I understand current limitations makes it harder to share code but these are our options for now.
However, for the original forum post (the question or message), there is a checkbox that says "Format as HTML", which editors can check or uncheck to format the text accordingly.
An easier work around for you is to do a "Find and Replace" using notepad and replace the angle brackets with appropriate escape characters.
Happy Coding :)
Please be more clear on what exactly is the problem you are having. It may not be exactly the same as the one faced by Vijay Kumar. If the problem is something different and not associated with coding, it is advisable to post your problem in a separate thread rather than mixing it in with this thread where it could get lost.