Top 10 Professional Sample Code Websites For Programmers

Ads by Google

Most programmers are not just desktop programmers, web programmers or scripting gurus – they are often all of the above. Over time, most software developers find that it’s much easier to re-use code components than it is to recreate the wheel every time you write an application.  Over time, these developers typically archive a library of these reusable modules in order to save time the next time they need to do the same task.

Now, thanks to the power of the Internet, there is a proliferation of websites where professional programmers offer these modules to the general public for absolutely free. For other application developers, these libraries are a goldmine.  Whether you write in VB, C, C++, C#, Perl, PHP, Ruby, or any other programming language, there’s a website out there where you can find such reusable sample code.

Choosing the Top Websites for Sample Code

Every developer has a list of their favorite websites where they not only search for free sample code, but they also take part in the developer community that exists at these sites.  Programmers often develop a very passionate attachment to some of these websites.

The following is, by no means, an exhaustive list of the best developer websites online.  Such a list would be difficult, since there are thousands of excellent resources throughout the net. The following is simply a list of ten of the best places to start if you’re looking for high quality sample code.  So please, folks, no food fights if your favorite isn’t mentioned. The following websites are listed in no particular order.

#1 – Programmer’s Heaven

programmersheaven.com (The site is no longer available) is a huge online resource that is very much a community of many different programmers.  The site includes information, tips, and forums on languages like Basic, C++, Delphi, Java, Perl, PHP, Python, Ruby, Visual Basic and more. You can also search the site by application or platform.

sample code website

Programmer’s Heaven has forums, blogs, articles, files, links and news for every single programming language listed on the site.  The size of this website is impressive, and the community is growing quickly into one of the largest developer communities on the net.

Ads by Google

If you need sample code that’s not already on the site, just ask for help in the forums.

#2 – SourceForge.net

It goes without saying that SourceForge is one of the most significant open source communities on the Internet.  When you need to review sample code to learn how to do something, this is a great place to search.

From the main page, just click “Find Software,” and then “Development.”  The next page will astound you. You’ll discover an entire world of open source projects.

sourceforge

You read that right, that’s over 54,000 listings under “Software Development.”  If you find a software project that sparks your interest, and you can see how the software could be greatly improved, you might consider joining up with one of the many open source projects.

See the SourceForge overview for how this works. Open source is a way of life, and these coders take it very seriously.

#3 – CodeGuru

CodeGuru is also a cool site for developers. It mostly covers just Visual C++/C++, .Net/C# and Visual Basic. While this isn’t a huge selection of programming languages, the site is filled with articles that are far more comprehensive than your standard short forum posts that you find at other websites. CodeGuru offers useful explanations of how to accomplish specific tasks.

sample coding asp.net

The example above is an article on how to load images from or save images to a database using Visual Basic. The article has quality screenshots and well written sample code.

#4 – The Code Project

CodeProject is a booming developer community that’s organized very much like a free article directory website, except in this case the content producers are actually programmers who are trying to provide the best programming articles available.  Most of these come complete with well written explanations along with the sample code.

the code project

The Code Project isn’t your run-of-the-mill resource where you’ll sift through the site for the code you need and then run. You’re likely to get sucked into the many prize competitions, surveys, articles, message boards, or even the job board. This community is a lot of fun and a good way to connect with other programmers with common coding interests. Before you know it, you may be tempted to write an article yourself!

#5 – DevX

No list of developer resources would be complete without a mention of DevX. This site is a massive programmer’s paradise – a huge portal to other huge sites covering the most popular programming topics such as Java, C++, Database programming, Visual Basic, Mobile programming and much more.

devx- sample code vb.net

Running your mouse over the left menu bar, as shown above, will display the sub-communities that exist under the DevX umbrella portal. When I had a significant Visual Basic project to complete in 2001, this website quickly became my home away from home.

#6 – Planet Source Code

Planet-Source-Code is one of those websites that you hate to like, but you need it anyway. It’s horribly designed, with a weird tiny-font menu listing at the top and ads splattered throughout the page, but if you know where to click, you’ll find a huge library of very useful sample code. At the top right where it reads “To start, just choose:” select the programming language of your choice. The site covers most of the major languages. On the next page you’ll see many categories of sample code to choose from.

sample code in java

Most of the languages have search filter options, and as you can see here, each category has tens, and even hundreds of thousands of lines of sample code available.

#7 – GNU and The Free Software Directory

If your thing is Open Source, then you can’t miss out on the Free Software Directory that’s linked directly from the GNU home page. This directory is just an impressive list of free software within categories like audio and video, database, email, games, graphics, Internet apps, communications and much more.

#8 – Google Code

Google has also joined the open source crowd with Google Code, a site that offers mostly web based sample code within categories like browser apps, website ads, product APIs, and social networking apps.

Google Code received a honorary mention in the MakeUseOf article “10 Google Services that Get No Love,” by Mark.

google code

As always, Google uses its standard format – a very clean and easy to use website where you’ll have no problem quickly finding exactly the open source code that you need.

#9 – DevelopersDex

developersdex.com (The site is no longer available) is another developers community that has rewarded some of the highest quality contributors with “guru” status.  The site is essentially a giant developer’s forum, currently approaching just under 50 thousand members. The site covers ASP, C#, SQL, VB, and XML.

Each programming category features complete subcategories such as FAQs, job directories, news, and of course forums and newsgroups.

If you’re a developer using one of these languages and you’re looking for a massive web portal to browse through, this is a good one.

#10 – DevArticles

Saving one of my favorites for last, DevArticles offers one of the most comprehensive directories of articles offering sample codes on the Internet.  The list of available software categories is astonishing, including like Flash, embedded tools, and even mobile Linux.

Clicking on any one of those categories turns up a list of useful articles complete with sample code and full descriptions.

sample code dev articles

Is There More?

This list of developer resources that offer quality sample code snippets is nowhere near complete.  The internet is chock full of resources, and everyone has a list of personal favorites, which often depends heavily upon which software languages you prefer, and what type of programming you’re doing.

Are you a regular visitor to any of the websites listed above when you’re looking for sample code?  Do you have any personal favorites that aren’t listed here?  Share your own favorite sample code resources in the comments section below.

Join live MakeUseOf Groups on Grouvi App Join live Groups on Grouvi
Web for Kids
Web for Kids
7 Members
Deep Web Communities
Deep Web Communities
11 Members
Awesome Websites
Awesome Websites
23 Members
Best Music Services
Best Music Services
14 Members
Ads by Google
Comments (14)
  • Ali

    Good Afternoon Ladies & Gentlemen,

    I am interested in learning php programming. I do not have any programming background in any other programming languages be it computer programming (C, C++, C#, Perl, Java, etc.) or web programming ( Server Side: Php, Perl Cgi, Python, Ruby on Rails; Clientside: Javascript, Xml, Xhtml, CSS, etc.).
    I only know basic Html and currently use a bot programmign tool “Ubotstudio” but that’s all.
    Can you be kind enough to recommend me a paper book where I can learn php without getting confused ? It must teach the latest stable version.

    Q1. Which php version is stable and which version is installed on webhosts the most ? 5.5.8 ? If so, where can I get a paper book to learn it or where can I learn it online from some free tutorial ?
    I actually prefer to learn it from a paper book as I am not always connected to the internet. I am using internet cafe to send this message/post.
    I was just checking Amazon now but a lot of books meant for the beginners have got bad reviews/ratings from customers and that has left me confused and worried.
    The book must be for total beginners and not for intermediate or advanced programmers.
    It must not leave out any basics but teach it.
    Must teach the full default library (all the “Commands”, “Functions”, “Sub functions”, “Syntaxes” or whatever that exists in the language from top to bottom and not miss out anything. Must teach the full grammer of the language and not leave-out anything).
    You may recommend any free tutorial websites too but like I said I actually prefer to learn it from a paper book as I am not always connected to the internet. I am using internet cafe to send this message/post.

    Q2. What is Php frame work ? Reusable code blocks meant for a specific task such as deal with database, etc. ?
    If so, I’m not interested in getting into heaviuly learning one framework and not learn the full language.
    No good being just an eye specialist or a bone specialist (one field only). Might aswell be a general doctor (GP) that knows a little bit of all fields. I think you know what I mean. Let’s learn the basics of the general stuffs first (the core of the language), I can them later-on move-on to other fields such as database, etc.
    And so, the book must not concentrate on one field only such as to build CMS or Social Network Account Logins or Forums or Database (MySql) because then I’d only learn one aspect of php and not the basics. In short, I want to learn the basics of the language and get a strong background in it. I prefer to build php scripts for Unix/Linux, Apache Webserver using MySql database. Book must teach step by step. Must teach A, B, C then 1, 2, 3 and 1+1=2, 2*2=4, 5-2=3, 25/5=5 and so on before jumping into the algebra and geometry (if you understand what I mean when we speak in terms of learning basic English and Maths).
    I don’t want to program in one version and then see my webhost uses another version. Currently, my webhost is Hostgator.
    If I have come to the wrong department/category then kindly forward this message/post to whoever can help.
    I await every php lover’s reply.

    Q3.

    Where did you learn php ? WHich website you used and which paper book ? Were they good or not so good or bad ?

    PS – What do you think about this book:
    http://www.amazon.co.uk/PHP-Programming-Ultimate-Course-Beginners-ebook/dp/B00PSNRK16/ref=sr_1_12?s=books&ie=UTF8&qid=1429028734&sr=1-12&keywords=php+5

    It seems it’s not a paper version. Do you reckon it will do the job or not ?

    PPS – if you can’t recommend any paper books then do you recommend any website where I can go and printout the tutorials ?
    The website must qualify all that I said earlier about the book.

    Anyway, I was expecting the Php Board to provide basic teachings of the language on their website but I’m disappointed to see they don’t!

    Thank You

    Mr. Ali

  • PRISM

    One is Stack Overflow for general coding related queries and help
    http://stackoverflow.com/

  • sanjana

    hi..which is the best site which will help me to build a website using ruby on rails?

  • Ron

    If you are a C# coder, c-sharpcorner.com/ is the best site for C# stuff.

  • ebookey

    My favourite is hotscripts.com – loads of free scripts in all programming languages and many categories.

Load 10 more
Affiliate Disclamer

This review may contain affiliate links, which pays us a small compensation if you do decide to make a purchase based on our recommendation. Our judgement is in no way biased, and our recommendations are always based on the merits of the items.

For more details, please read our disclosure.
Affiliate Disclamer

This review may contain affiliate links, which pays us a small compensation if you do decide to make a purchase based on our recommendation. Our judgement is in no way biased, and our recommendations are always based on the merits of the items.

For more details, please read our disclosure.