Click here to Skip to main content
15,946,316 members

Submission Guidelines

Do you have some cool code you want to share?

Sharing code with others is a great way to not only help others, but also to become a better programmer. You'll get a lot of positive feedback, suggestions for improvements, bug fixes, free testing, and more often than not, suggestions on how to make the code itself even better. It also encourages others to share their code, which in turn gives you access to an even larger base of free source code.

How it works

You can submit either a full article with downloads and images, or just a quick Tip n' Trick. Tips n tricks are meant to be very, very short tips, snippets or even just a one-liner you came across that saved your day. Articles are for presenting more detailed ideas.

  1. There are two ways to submit an article: via email to Submit@codeproject.com or via the Article Submission Wizard.
  2. Articles submitted via the submission wizard will initially be in an "unedited" state. Articles submitted via email will be posted in an "edited" state.
  3. If your article is not yet edited then you can continue to modify your article via the Modify button on the article itself, or by sending us your changes via email at Submit@codeproject.com - you choose.
  4. If you post using the submission wizard then your article will go into a moderation queue where high level members can review and approve your article. During moderation you can edit your article as often as necessary, and very soon (within a few hours) it will be approved for general viewing, unless there are issues with the article that need addressing.
  5. An editor may then formally edit your article which involves reviewing your downloads, images, text and formatting and polishing the entire article. Once this is done you may continue to send us updates to your article as often as you like to Submit@codeproject.com, but direct editing is no longer possible since it may undo the editing work already done. Just let us know if you do not wish for your article to get this final polish.

Tips

If you post to CodeProject then your code is offered under the terms of our Terms Of Service and under the specific license agreement attached to the article. You also agree to the Contributors Agreement, which ensures you have the right to post the content, allows us to actually publish your content, and provides further protection for you on top of the License you choose for your content.

The primary focus for articles on CodeProject is code that is available without registration or licence fees and without time restrictions, that showcases applications or binaries and their source code. CodeProject articles are for sharing source code, not applications or components.

Note that source code associated with an article that was written by the author must be provided with the article. External links to the most up-to-date version (or online demo) are fine, but we still require at least a workable version to be submitted with your article to be made available on CodeProject. The reason for this is that 9 times out of 10 links to external downloads break within months due to any number of unavoidable factors. Having a local copy on CodeProject means at least some code will still be available.

We do not typically allow articles on Third Party Products and Tools. We will only allow articles on third party products at our discretion and provided the following rules are strictly followed:

  • Must provide significant innovation and cannot simply be a how-to guide that would appear on the vendor's own help pages, or must solve a significant problem common to users of the third party product or library
  • Must not be an advertisement for the product. We are the final judges on this. There will be no mention of price, offers or coupons, upgrades, trials or anything that would induce or tempt a person to visit the third party site and download the product. This article is purely for those who already use the product.
  • We reserve the right to replace any links to the product with search-engine unfriendly links. Articles must not be used to promote a product in any form, including SEO.
  • Must be tagged "third-party"
  • Articles tagged this way will not appear on the homepage or the newsletter
  • Must not be written by anyone associated with the company. Self promotion is not allowed.
  • Author must have written at least two articles NOT on third party products.

Finally, we reserve the right to make the call on all articles pertaining to third party products. We may allow articles that do not adhere to one or more of the aforementioned rules, and we may reject articles that follow every rule -- each article is judged on a case by case basis. If you discover an article that does not follow these rules, either report the article as spam/abusive, or send us an email at submit@codeproject.com.

We no longer allow reviews on third party products and tools.

Preparing your code

If you have some great code, but do not make it easy for others to use it, then more often than not people will pass it by and not use it. We suggest:

  • Write a brief description of your code, including what it is, what it does, and how to use it in your projects (Download a template file here, and read template instructions here)
  • Explain any tricky problems that you solved while developing the code. It makes great reading and helps others solve similar problems.
  • Comment your code
  • Include a small screen shot
  • Prepare a small app to demonstrate the code (only if appropriate)

Submitting your code

When submitting your code and article please check you have the following:

Package all this up into a single zip file and send it to Submit@codeproject.com.

When emailing the article please state the title of the article in the subject line. Also if you think it neatly fits in one of the categories, please let us know.

Updating Your Code

If you posted your article using the Article Submission Wizard, and it's still marked as 'Unedited' then you can edit the article yourself by clicking on the 'Edit this article' link at the top right of the article.

If you sent the article in to us via email at Submit@codeproject.com, or uploaded your article using the article upload page, or the article has been edited, then simply visit your article and at the top right you will find a "Update your article" link. Follow that link and upload your changes directly to the editors using the form provided.

Alternatively, send an email to Submit@codeproject.com with the name of the article and its URL in the email body, and attach the files to your message as a zip file (for downloads) or PNG/GIF/JPEG for images. Obviously the smaller the better, and please note we can't accept .exe files, or zips containing .exe files. Our email provider will, unfortunately, reject such emails.

Updating the article text

We reformat each article that is submitted, and try our best to ensure that all grammar and spelling mistakes have been corrected. It is far, far easier for us if you first download the HTML for your article that we have posted using the "Get HTML" button at the top right of your article. Logon to CodeProject and at the top right of your article will be a link 'Get Article's HTML'. Click on this and then save the HTML for your article using the File | Save menu in your browser. Ignore the stuff at the top and bottom of your page - you will see "Article Starts" and "Article Ends" tags in the HTML that point to where the actual text for your article is. Strip out everything above and below these markers and edit the HTML directly

If you only have a very small addition to make, or want to report spelling/grammar or link errors then you can just send these in as plain text.

Send all updates to us and remember to include the name of the article and its URL in the email body.

Syntax colourisation

You don't need to worry about colourising your articles. We have a colouriser that takes care of this for you. If your article already contains colourisation then don't worry - the colouriser cleans out all previous colourising before recolourising the entire article.

Advanced Colouriser Tip: To specify a language besides the default C-style colourisation, add a 'Lang' attribute in the <pre> or <code> tag. eg:

<pre lang="C#">int myVar = 0;</pre>

The currently supported languages are:

  • Plain Text (lang="text")
  • ASP.NET (lang="aspnet")
  • BAT (lang="bat")
  • C# (lang="C#")
  • C++ (lang="C++")
  • C++/CLI (lang="mc++")
  • CSS (lang="css")
  • Delphi (lang="delphi")
  • F# (lang="F#")
  • HTML (lang="html")
  • Java (lang="java")
  • Javascript (lang="jscript")
  • MASM / ASM (lang="asm")
  • MSIL (lang="msil")
  • MIDL (lang="midl")
  • PHP (lang="php")
  • SQL (lang="SQL")
  • VB.NET (lang="vbnet")
  • VBScript (lang="vbscript")
  • XML (lang="xml")

Other languages can be added on request.

The Article

First and foremost, we need some documentation. This doesn't have to be anything fancy, though we don't mind if it is, but if you think about answering the following questions then you should be off to a good start.

  • What does the code do?
  • How do I integrate it with my existing code or how do I use it?
  • If there is a similar article on CodeProject already, then how does this one differ? Why would someone want to use your version?
  • Is there some aspect of the code that is of particular interest that perhaps should be covered in the article?
  • Are there any particular environments the code is restricted to? (Windows 2000 or above, .NET SP1 etc)

The idea is to give the reader a clear idea of the purpose of your code, instead of forcing them to download a project, build it and then hunt around to find out what the sample does. This means articles that are code snippets, with no explanation of what the snippet does, are insufficient.

The quickest way to get your code posted is to provide a simple HTML file. Our preferences on documentation are:

  1. A simple HTML edited by a plain text editor or good HTML editor, using the template file provided,
  2. A plain ol' text file,
  3. Everything else.

All the articles at CodeProject have the same look and feel which is achieved by only the most basic HTML features. If you send us a HTML file with different fonts and colours and fancy bits, chances are it will all be stripped out to make it conform to the CodeProject standard. All documentation is edited by hand, so it can be a real nightmare wading through masses of convoluted HTML.

License

When uploading an article you need to be aware of the risks and legal issues involved. We live in a litigious world so you need to protect yourself against those seeking damages against you for problems that may (or may not) have been caused by your article. Just saying "The code is free for use" is no longer enough. What does "free" mean? Are there any restrictions? What happens if your code breaks my system and costs me money?

The following is a rough guide to the current licenses supported on CodeProject: Licenses.

The Zip file

Please ensure that you zip all files up using maximum compression, and remove all unnecessary files (*.opt, *.ncb, *.obj, *.aps, *.plg, .suo etc.) from the project folders. If possible, please keep submissions below 300Kb.

We cannot accept .exe or zips with .exe files in them via email. Our email provider will bounce these emails. If you wish to submit a compiled demo of your code then it's easiest to send it to us via the article submission form.

File naming convention: If your contribution comprises a HTML article, source code and an image, then to make life easy for us we ask that you follow the following filename conventions. Suppose your article is called coolcode.html. The filenames should be of the form:

coolcode.html The HTML documentation for your article
coolcode.zip The zipped source code for your article
coolcode.png An image to accompany your article

Alternatively, if you have source code, a demo project and a number of images, then your filenames would be along the lines of:

coolcode.html The HTML documentation for your article
coolcode_src.zip The zipped source code for your article
coolcode_demo.zip The zipped demo project for your article
coolcode1.png An image to accompany your article
coolcode2.png A second image to accompany your article

BTW, don't use the name coolcode, try to find something more relevant :-)

Source code Guidelines

First and foremost, does the code actually work? We do sometimes get code that, for one reason or another, just does not work. Please check that the source code you send compiles cleanly, and if part of a larger demo application, that the application itself runs OK.

We do ask that the general conventions be adhered for your language to so that other programmers can understand your code easily. Conventions that help other programmers read your code are:

  • The use of Hungarian notation in MFC (e.g. Variable prefixes such as "n" for int, "d" for double etc.)
  • The use of Win32/Visual C++ types such as UINT, LPCTSTR etc.
  • Camel case in .NET code

Also, does the code compile cleanly under the warning level 4?

Sample Project

Sample Executable: If providing a sample executable, please make sure it is linked with the release libraries (ie. Make sure it is not linked with the Unicode or debug libraries). The whole point of a demo executable is to give developers a quick intro to your code. If they have to recompile in order to get the application to run on their system then there is no use in supplying the executable in the first place. Secondly try to conservative about just how big a sample you upload, a 4Mb sample just isn't going to interest a lot of people.

Sample Project:It is recommended that you also include a sample project. When creating a zip file for the sample project, please do not include either the Debug or the Release directories. They simply inflate the size of the ZIP file. Also, do not include the *.clw, *.ncb, *.opt and other such files that are automatically recreated.

Submitting an article based on another person's work

It is OK to use others' code as a base as long as you make it totally clear that some/most of the code isn't yours. If you use someone else's code then DO NOT remove their copyright notices. There is a lot of code reuse here, that's the point after all. As far as the articles that are being posted here we expect to see credit where credit's due, in the code and the HTML as appropriate.

If you are submitting a modification, extension or correction to another person's work then we ask that you attempt to contact the original author first and then try to liaise with him/her to produce an update to the original article. This way we can retain continuity with the original article as well as reducing the number of completely new pages that need posting.

Submitting code already posted at another site

You are more than welcome to submit code that is already published at another site, provided you own the copyright on that article, and provided you have not given the other site exclusive rights to your article.

CodeProject Submission Template

The template zip file contains a HTML template for use when submitting articles to CodeProject. We recommend editing this file using Microsoft Expression Web, Dreamweaver or your favourite text editor. Note that all extraneous formatting (crazy colours, absolute positioning etc) will be removed in order to maintain a uniform appearance and help our readers.

Using these templates will help us post your article sooner. We are using MS IIS and ASP pages on the server, allowing us to simplify the templates used to create the articles.

To fill in the template just follow the 3 easy steps below:

  1. Fill in the article description details
  2. Add links to your images and downloads
  3. Include the main article text

That's all there is to it! All formatting will be done by the ASP script engine.

Foreign language submissions

CodeProject is an English-language site. While we welcome those from all cultures and all walks of life, we do ask that only English language articles be posted.

Technical Blog Submissions

Blog entries serve the same purpose as articles: to help developers with coding related issues. A good general guide to follow when deciding whether to submit your Blog feed and tag your blog entries is: is there a section that relates to your blog topic?

Things that are a Must

  1. Have some kind of technical basis (no entries on restaurants, great beers, or day to day affairs)
  2. Present a problem and a solution
  3. Write a brief description of your code, including what it is, what it does, and how it was used in your projects
  4. Be at least 1000 characters long
  5. Be more than a quick tip, or small entry more fit for an FAQ

Other things to Note

  1. Downloadable source code is not required.
  2. Code snippets are always welcome
  3. Pictures are also always welcome
  4. Your Technical blog entries are licensed according to your default license set in your profile. Click 'My Settings' and then 'Articles' to change this default