• The f=240 Collaborative Introduction to Programming Thread
    34 replies, posted
Hello! You've found this thread which means you probably want to learn something or other. If you're new to programming then this thread can help you pick a language and find resources to learn, so you don't have to make a thread about it. If you want to learn something more advanced then we can probably point you in the right direction. Here are some things to keep in mind: -> Programming isn't really about mastery of a language, and you can't really learn everything about even a single discipline. Programming is about two things: research and persistence. Everyone learns different things in different orders, and someone might learn something in their first week that someone else with 5 years of experience has never heard of. You will need to learn how to research your next move and you need to be persistent in your efforts to learn. It is rare that anyone will be able to do your work for you, I'm afraid. -> You can waste weeks jumping from one language or library to another because you saw people saying your current library is rubbish. You will learn much more if you stick at it. If you're learning Java and someone tells you you're an idiot and should be using C++, ignore them and keep learning Java. -> If you're learning, start small. If you're 14, manage your expectations. You can progress as fast as you want if you put in the work, but most likely it will take a lot of time. If you're making games, start with Pong rather than a Pokemon MMO or something. Even simple-seeming games like Mario and Pac-Man are surprisingly complex. They are the kind of thing you will need libraries for later on. Everyone in this subforum has knowledge of different areas, so this thread is designed for people to make large posts about things they are more knowledgeable about than most. For example, I could make an informative post about getting started with the Java programming language and the Slick 2D games library, since that's what I use. [b]Please refrain from making short comment-like posts until the first page is full of useful resources.[/b] Posters should be informed of errors to correct by PM to reduce thread clutter, and [b]arguments of any kind do not belong here[/b]. Programming languages which are often used and discussed in this subforum, along with some of the most well-known libraries, will be listed here. If anyone would like to post about one or more of them, or suggest another one to add to the list, please do. [b]Languages:[/b] C++ C# C Java Lua - This is what is known as a scripting language, designed for less heavyweight use than a programming language. [b]Game programming libraries:[/b] A code library is a collection of pre-written code that takes away a lot of the work for doing a particular task. Games libraries tend to provide easily accessible functions for drawing graphics to the screen, reading user input and sometimes other useful things, like pathfinding. You use them by downloading them, importing them to your IDE and referencing them in your code. They should have good documentation to help you understand their functions, and often provide helpful tutorials. You may have a choice of downloading them alone, with documentation (a good idea), or with the source code included (can be useful for learning). Some common ones are listed here: [url=http://www.libsdl.org/]SDL (for C++)[/url] [url=http://www.sfml-dev.org/]SFML (for C++)[/url] [url=http://www.monogame.net/]Monogame (for C#)[/url] [url=http://msdn.microsoft.com/en-us/centrum-xna.aspx]XNA (for C#)[/url] [url=http://slick.cokeandcode.com/]Slick (for Java)[/url] [url=http://love2d.org/]LÖVE (for Lua)[/url] [b]Useful other threads:[/b] [url=http://facepunch.com/showthread.php?t=1210187]'Useful maths, snippets, blogs, and all that jazz.'[/url] Feel free to PM me if you want something added to the OP, and if you have anything to expand on in future, please edit your earliest post and bulk it up with the new information.
[B]Python (General)[/B] [URL="http://python.org/"]Main Python Website[/URL] [URL="http://docs.python.org/3/"]Python.org Docs[/URL] [URL="https://wiki.python.org/moin/IntegratedDevelopmentEnvironments"]Python IDE list[/URL] [URL="https://pypi.python.org/pypi"]PyPI Package Index[/URL] [URL="https://wiki.python.org/moin/BeginnersGuide/NonProgrammers"]A list of guides for non-programmers[/URL] [URL="http://docs.python.org/3/"]Python Docs (3.3)[/URL] [URL="http://docs.python.org/2.7/"]Python Docs (2.7.5)[/URL] [URL="http://www.python.org/dev/peps/pep-0008/"]PEP-8[/URL] [URL="http://www.virtualenv.org/en/latest/"]Virtualenv[/URL] [B]Libraries[/B] [URL="http://pygame.org/"]Pygame main website[/URL] [URL="http://www.numpy.org/"]NumPy[/URL] [URL="http://www.crummy.com/software/BeautifulSoup/"]BeautifulSoup[/URL] [URL="http://twistedmatrix.com/trac/"]Twisted[/URL] [URL="http://www.pyglet.org/"]Pyglet[/URL] [QUOTE][B] Post Changelog (because i'm sad) [/B]rv1 - Initial Commit rv2 - Added some other stuff[/QUOTE]
[b]Some good books if you are a complete beginner:[/b] [url=http://shop.oreilly.com/product/0636920027812.do]Head First C# 3rd Edition[/url] Please refrain from using the 2nd/1st editions because they contain some flaws [url=http://shop.oreilly.com/product/9780596159924.do]Head First HTML and CSS 2nd Edition[/url] Excelent book for people who want to start working on websites [url=http://shop.oreilly.com/product/0636920003434.do]Head First Python[/url] Please note that this is Python 3 [url=http://shop.oreilly.com/product/9780596006303.do]Head First PHP & MySQL[/url] The Head First books are written to be used in classrooms but they are also great if you want to learn programming on your own. Also remember that every programming language has it's advantages and disadvantages. But at the end of the day it all comes down to what programming language is best fit for the job and witch one you prefer. [QUOTE=TheEyes;42120629]--Python--[/QUOTE] Don't forget Python 2.7.5! That version is still relevant because a lot of libraries are not compatible with Python 3.X and a lot of people didn't make the switch. Also this website is great if you want to learn python. It's a set of challenges that get harder over time and you can solve them using python. [url]http://pythonchallenge.com[/url]
In case you speak German, there are some very good, updated and free books [URL="http://www.galileocomputing.de/katalog/openbook?GalileoSession=44460966A6.z358.m9g"]here[/URL]: [URL="http://openbook.galileocomputing.de/visual_csharp_2012/"]Visual C# 2012[/URL] [URL="http://openbook.galileocomputing.de/javainsel/"]Java ist auch eine Insel[/URL] There are also books on C, Visual Basic, PHP and one about iPhone/iPad apps that seems to be an introduction to Objective-C, among others. The Python book seems to be a bit older though, it's for 2.5.
Here is a good resource about SDL.NET, it may be a *bit* outdated but it works. [URL="http://www.matrix44.net/old/sdl/sdlnet.html"]SDL.NET (for C#)[/URL] / [URL="http://sourceforge.net/projects/cs-sdl/files/SDL.NET/6.1.1beta/sdldotnet-6.1.1beta.zip/download"]SDL.NET binaries[/URL]
[B]Some free reading material:[/B] [URL="http://learnpythonthehardway.org/book/"]Learn Python The Hard Way[/URL] [URL="http://www.robmiles.com/c-yellow-book/Rob%20Miles%20CSharp%20Yellow%20Book%202012.pdf"]Rob Miles C# Yellow Book[/URL] [B]Libraries for C#:[/B] [URL="http://www.sfml-dev.org/download/sfml.net/"]SFML.NET[/URL] A cross platform wrapper for SFML. [URL="http://www.opentk.com/"]OpenTK[/URL] A cross platform wrapper for OpenGL. [URL="http://sharpdx.org/"]SharpDX[/URL] A high performance wrapper for DirectX. Compared to OpenTK it's a lot easier to use, but it's only available on Windows. [URL="https://json.codeplex.com/"]Json.NET[/URL] An easy to use library for reading and writing .json files. [B]IDEs[/B] [URL="http://www.microsoft.com/visualstudio/eng/downloads#d-express-windows-desktop"]Visual Studio Express 2012[/URL] The free version of Microsoft's awesome IDE. [URL="http://monodevelop.com/Download"]MonoDevelop/Xamarin Studio[/URL] A free and open source alternative for VS. Not as good, but good enough. Unlike VS, it's available for Linux, OS X and Windows.
[QUOTE=Nigey Nige;42120522] ... [b]Languages:[/b] ... Lua - This is what is known as a scripting language, designed for less heavyweight use than a programming language. [b]Game programming libraries:[/b] ... [url=http://love2d.org/]LÖVE (for Lua)[/url] ...[/QUOTE] If you're interested in learing Lua and/or LOVE, there are enough people in #love on OFTC who can help. (click [url=http://en.irc2go.com/webchat/?net=OFTC&room=love]here[/url] if you don't know what I've just said)
[QUOTE=Darkwater124;42121110]If you're interested in learing Lua and/or LOVE, there are enough people in #love on OFTC who can help. (click [url=http://en.irc2go.com/webchat/?net=OFTC&room=love]here[/url] if you don't know what I've just said)[/QUOTE] There are also freenode channels for many other languages, for example ##c ##c++ ##csharp and there is also #SDL
[B]Libraries I like to use for games in Java, they are not for complete beginners:[/B] [URL="http://www.jbox2d.org/"]JBox2D[/URL] (2D Physics Library, a Java port of the Box2D physics library.) [URL="http://www.jcraft.com/jorbis/"]JOrbis[/URL] (OGG Loader, OGGs are better than Clips for music but never use OGGs for sound effects unless they are long.) [URL="http://jbullet.advel.cz/"]JBullet[/URL] (3D Physics Library, a Java port of the Bullet physics library.) Feel free to contact me for any questions related to these, Java, or game programming in general. I would love to help and teach you! :eng101:
[b][u]C++[/u][/b] [b]Beginner Tutorials[/b] [url=http://www.cplusplus.com/doc/tutorial/]cplusplus.com's tutorial[/url] [url=http://www.youtube.com/playlist?list=PL1D10C030FDCE7CE0]C++ Absolute n00b spoonfeed (slow pace but covers the basics nicely, also good if you prefer videos over text)[/url] Prefer books? Check out [url=http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list]this great list of C++ books.[/url] [b]Game Programming[/b] Good all-around libraries: [url=http://www.sfml-dev.org/]SFML[/url] [url=http://www.libsdl.org/]SDL[/url] OpenGL Tutorials, if you decide to dive straight into game programming: [url=http://open.gl/]Overv's OpenGL tutorials[/url] [url=http://www.opengl-tutorial.org/]opengl-tutorial.org[/url] [url=http://nehe.gamedev.net/]NeHe's tutorials (--->KEEP IN MIND THESE ARE OUTDATED<---, but the list of topics is very nice. If you plan on using the tutorials be sure to convert them to modern OpenGL)[/url] [url=http://en.wikibooks.org/wiki/OpenGL_Programming]Wikibooks OpenGL tutorials[/url] [url=http://www.gamefromscratch.com/post/2012/07/03/A-series-of-OpenGL-samples.aspx]OpenGL snippets/samples[/url] That's all I have from the top of my head at the moment. The snippets thread linked in the OP contains a ton of great sites, definitely recommend checking it out.
I know people programming in Java are usually recommended to use Eclipse, but consider using [url=http://www.jetbrains.com/idea/]IntelliJ IDEA[/url]. It's a lot easier to use, and in my opinion beats Eclipse hands down.
[QUOTE=Egonny;42122125]I know people programming in Java are usually recommended to use Eclipse, but consider using [url=http://www.jetbrains.com/idea/]IntelliJ IDEA[/url]. It's a lot easier to use, and in my opinion beats Eclipse hands down.[/QUOTE] It's also pretty important that people who learn Java with an IDE learn how to actually do cli builds too. I had a friend who used Eclipse for a year at Uni and didn't even know you [i]could[/i] build in a terminal and it hindered his workflow.
[b]Source Code Management (Any Language, Essential)[/b] There's lots of holy wars over programming languages, project management, but everybody agrees you need to have some kind of source code management when writing code. What does source code management do? It allows you to keep a changelog of all your code changes, and allows other people to work on your code with you by sending you patches. 'But I can do this without source code management' I hear you cry. That's true, but this approach not only scales to thousands of developers (yes, in practice), it makes things easier and more automated. Even worse is the 'why would I need to look at old code?' argument. Which I haven't actually heard, but I guess it's a great fake argument to include in this post. Revisions of your source code aren't just for seeing old code for historical reasons (seeing v1 of your software when you're up to v5), it helps you find where bugs in your code were introduced. If you're lucky, you can even find the exact change that introduced the bug, and the guilty source code! That said, there's a lot of source control management systems. Like, a lot. I don't know much about most of them, but I'll list two of them since they encourage different workflows. [b][url=http://git-scm.com/]Git[/url][/b] - Git is free, open source and designed by Linus Torvalds. It's pretty much THE system to use since [url=http://github.com/]GitHub[/url], the home of pretty much every open source project now, uses it. [b][url=http://subversion.apache.org/]SVN[/url][/b] - I don't know of any benefits it has besides being historically easier and more used than Git, but here you are: SVN. Another free, open source system. While I'm here, I might as well say it: Source code control is not substitute for backups. Back your code up, or you're asking for the spinning platter gods to smite you.
[QUOTE=Jookia;42123125][b]Source Code Management (Any Language, Essential)[/b][/QUOTE] There's also [B][URL="http://mercurial.selenic.com/"]Mercurial (Hg)[/URL][/B] - As powerful as Git but a lot easier to learn due to the [URL="http://tortoisehg.bitbucket.org/"]TortoiseHg[/URL] GUI. I doesn't have Git's plumbing commands (it doesn't need them, extensions use Python instead), is faster than Git on Windows and almost impossible to break or "lose" data with with normal commands (no floating heads). The command line interface is similar to Git and can be shown in TortoiseHg (where it displays some of the commands used by the GUI). Hg is compatible with Git repositories through the hg-git extension. Hg repos can be hosted on [URL="https://bitbucket.org/"]Bitbucket[/URL], which also supports Git and has unlimited private repositories for free. [URL="http://mercurial.selenic.com/wiki/MercurialHosting"]There are other sites you can use[/URL], depending on your requirements. (It's important to note that you don't need a server, like with Git (or other distributes version control systems), but having the code both on your computer and a server counts as backup. It's also useful if you have more than one computer and don't want to push/pull between them directly.) More material and introductions: [URL="http://mercurial.selenic.com/wiki/Mercurial"]plain Hg[/URL] [URL="http://tortoisehg.bitbucket.org/manual/2.9/preface.html"]Mercurial with TortoiseHg[/URL]
[QUOTE=Tamschi;42124008]There's also [B][URL="http://mercurial.selenic.com/"]Mercurial (Hg)[/URL][/B] - As powerful as Git but a lot easier to learn due to the [URL="http://tortoisehg.bitbucket.org/"]TortoiseHg[/URL] GUI. I doesn't have Git's plumbing commands (it doesn't need them, extensions use Python instead), is faster than Git on Windows and almost impossible to break or "lose" data with with normal commands (no floating heads). The command line interface is similar to Git and can be shown in TortoiseHg (where it displays some of the commands used by the GUI). Hg is compatible with Git repositories through the hg-git extension. Hg repos can be hosted on [URL="https://bitbucket.org/"]Bitbucket[/URL], which also supports Git and has unlimited private repositories for free. [URL="http://mercurial.selenic.com/wiki/MercurialHosting"]There are other sites you can use[/URL], depending on your requirements. More material and introductions: [URL="http://mercurial.selenic.com/wiki/Mercurial"]plain Hg[/URL] [URL="http://tortoisehg.bitbucket.org/manual/2.9/preface.html"]Mercurial with TortoiseHg[/URL][/QUOTE] Mercurial's not perfect either; they both have their pros and cons. [URL="http://importantshock.wordpress.com/2008/08/07/git-vs-mercurial/"]Here's a nice comparison[/URL].
[QUOTE=supersnail11;42124057]Mercurial's not perfect either; they both have their pros and cons. [URL="http://importantshock.wordpress.com/2008/08/07/git-vs-mercurial/"]Here's a nice comparison[/URL].[/QUOTE] That issue (closing named branches) has been fixed for a long time. It supports all (normal) workflows that Git does now, all perfectly integrated into TortoiseHg.
I would like to point out that [URL="http://www.sourcetreeapp.com/"]SourceTree[/URL] exists and is a brilliant GUI for BOTH Git and, added more recently, Hg.
Please to not fill page 1 with source control discussions thx
[QUOTE=Nigey Nige;42124969]Please to not fill page 1 with source control discussions thx[/QUOTE] Personally I much prefer SVN to Git, its just all too complicated /runforthehills
[QUOTE=Tamschi;42124105]That issue (closing named branches) has been fixed for a long time. It supports all (normal) workflows that Git does now, all perfectly integrated into TortoiseHg.[/QUOTE] It's up to personal opinion; it's not as obvious as you make it out to be.
This is an introduction, not a discussion.
I recommend everyone to at least take a peek at the world of functional programming, from, for example, Haskell: [url]http://learnyouahaskell.com/[/url] [url]http://www.haskell.org/haskellwiki/Haskell_Tutorial_for_C_Programmers[/url] [url]http://lisperati.com/haskell/[/url] Regex: Regular expressions are another thing everyone should know, and they are also not that hard as many think: [url]http://gskinner.com/RegExr/[/url] - Just playing around with samples on the right make you understand 90% or regexes you'll come across and write. [url]http://rubular.com/[/url] Other misc bookmarks: [url]http://www.cplusplus.com/reference/[/url] - C/C++ standard library reference, very useful. [url]http://solarianprogrammer.com/categories/C++11/[/url] - Some new C++11 features are covered here. [url]http://shapecatcher.com/[/url]
I was about to say that maybe functional programming could be a little deterring for a new programmer but IIRC there are some universities that teach introductory programming in a functional language. It makes more sense to people.
I've seen people naturally write functional code in imperative languages like Python after struggling with C++.
I had a question. I have Visual Studio 2010, but then Visual Studio 2012 Express is free. Which one should I use? The class I'm taking, we've been using Visual Studio 2010, with XNA I believe to make games.
[QUOTE=xExigent;42207387]I had a question. I have Visual Studio 2010, but then Visual Studio 2012 Express is free. Which one should I use? The class I'm taking, we've been using Visual Studio 2010, with XNA I believe to make games.[/QUOTE] visual studio expresses lack features i'd stick with 2010, but check if your school offers dreamspark then you can get 2012 pro free
[QUOTE=LordCrypto;42207995]visual studio expresses lack features i'd stick with 2010, but check if your school offers dreamspark then you can get 2012 pro free[/QUOTE] I also decided that I would be learning a C language first. But, the question arose on which would be the best one to learn? C, C++, or C#? I'd like to learn it as a starting language, but I'd also like to learn other languages later on.
[QUOTE=xExigent;42208104]I also decided that I would be learning a C language first. But, the question arose on which would be the best one to learn? C, C++, or C#? I'd like to learn it as a starting language, but I'd also like to learn other languages later on.[/QUOTE] It's worth noting C# is a *very* different language from C and C++. But it doesn't really matter what you start with at the end of the day. I'd however highly recommend [url]http://learnpythonthehardway.org/book/[/url] for anyone starting totally from scratch.
[QUOTE=qqqqqqqq;42209175]It's worth noting C# is a *very* different language from C and C++. But it doesn't really matter what you start with at the end of the day. I'd however highly recommend [url]http://learnpythonthehardway.org/book/[/url] for anyone starting totally from scratch.[/QUOTE] Okay, and after doing that book, would you suggest continuing to learn Python?
[QUOTE=xExigent;42209283]Okay, and after doing that book, would you suggest continuing to learn Python?[/QUOTE] From there the world is your oyster. :) But I just noticed you said you were using XNA in class? So maybe playing more with C# is a better option.
Sorry, you need to Log In to post a reply to this thread.