I remember the days of Shadowrun that got me excited about hacking. There is CodeWar and LightBot which are both fun (though CoreWar is a little dated). What other games are there involving coding that are fun and challenging that can be used to get someone excited about coding or flex their chops or even learn the basics?
How about RoboCode
You code your tank in Java and let it loose in the 'ring' with other coded tanks. People got pretty into coding strategy, targeting, etc. IBM sponsored it and came up with some nice introductory programming tutorials to get you started.
Here's a great article to get the feel for it:
Rock 'em, sock 'em Robocode!
(source: sourceforge.net)
Uplink isn't so much a coding game, but it is a great game that makes you feel like a hacker.
There's a whole bunch of "drag-and-drop" coding games, where you make a little thing (usually a robot) solve some puzzle by giving it a list of instructions. They're only vaguely similar to actual coding, but they are still pretty fun.
RoboZZle
The Codex of Alchemical Engineering
light-Bot
Not sure if it's considered a "game", but the TopCoder Competitions are fun, and come in various sizes and commitment levels. You can also work on puzzles from the archives for some good programming practice.
The Python Challenge is like those "look at the html source" riddles, but requires a bit of programming to get the answers.
When I was a kid I played "Rocky's Boots", where you had to hook up logic gates to solve puzzles. That had a big impact on my thinking.
Core Wars.
Here's something that allows you to make games and animations: Alice
If you're looking for a board game, you might want to have a look at Robo Rally. In this game 2-8 people are trying to maneuver their robots over the board as quickly as possible, dodging deadly obstacles and trying to shove other people robots into obstacles on the way.
Each game round all players have to "code" the program the robot is going to execute in the next round and then the robots just follow their program. The programs are just five instructions long, but still creating an optimal program can be quite tricky. There usually is very little luck involved, which is why I really like this game.
Similar to Uplink is HackWars. Instead of point and click hacking though, it's multiplayer and you can write your own attack scripts. There's actually an included runtime for writing 2d/3d games and there's a bunch of different places to hook in scripts (for defense, banking, in game website, etc).
Scripting language looks similar to Java.
How about Ai-Board
You play it on your phone/tablet.
It's IDE is built into the game.
It has a built-in node-based visual programming language, whose code-behind is a python-like language.
You write the code, that drives the Ai, that moves the pawns, that plays the game, all still on your mobile device.
YouTube Video: Visual Programming Time-lapse on a mobile device
It comes with quite a few tutorials that introduce the player to programming, genetic algorithms etc, and you get a step-by-step walk-through of all these methods.
It also comes with ready-made scripts that work right out of the box, and are ready for you to copy into your free 'Dev' & 'Test' envs,...
...so that you can tweak them to your heart's content, knowing that you can always revert to the original at any time.
The in-built machine learning engine allows you to
train your AiBot to play the board-game,
play your AiBot against their in-built Ai
play against your own AiBot
breed your AiBot (Genetic Algorithm)
fine-tune your AiBot (Back-Propagation)
...debug your AiBot, and so on.
YouTube Video: Machine Learning is mobile!
Its currently in BETA testing, but soon to be released, and everything described comes for free.
In addition, there are single and multi-player modes as well, but it is primarily a game about coding, coming complete "...with batteries included!"
Project Euler
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
i want to work as a programmer in a game modification team. Most teams require a portfolio to show.
I haven't any previous experience with game programming and I would like to know what I should program and include in the portfolio
Thank you
I'd seriously consider writing one or more small, simple games yourself before embarking on joining an established team. You'll learn a lot about yourself and the technologies involved in games development, and you'll be putting together your own portfolio as you progress. You may find that you'll be in over your head if you join the mod team directly, especially if you have no experience at all. If the team is modding a particular game like Half Life or Unreal, then I'd use the time to get familiar with those tools - using the assets which are already there will give you a useful jump start.
Your games needn't be complex or graphically rich. Concentrate on ideas and simple execution. It's too easy to get bogged down with detail, especially if you're trying to impress. How about a simple puzzle game? Or tacking on flight simulator style controls to cruise around an FPS level? :)
Best of luck!
A portfolio should present what you consider to be your best work in various categories. For a programming portfolio, you don't necessarily need to put exclusively games in it, even if you're looking to join a game development team.
For a portfolio that you want to present to a game development group, my suggestion would be to break down the different aspects of what makes up a game and include completed and polished programs that highlight certain aspects.
Suppose you break down the game development pipeline and come up with the following list which shows the skills you want to highlight:
3D Graphics
Physics
Human Interaction (Gameplay and UI)
Artificial Intelligence
Take a project for each category and make that aspect shine! Make each one interesting for the end user. Having different programs highlighting different skills shows that you are multidimensional - you're not just a one-trick pony.
Now, there's one more thing a portfolio should do, and that's highlight you! The small projects highlight your skills, but usually it's good to include one major project that shows many skills and, more importantly, your personality. This should be something you're proud of making, and something that you're excited and passionate talking about. Passion is contagious! When you show passion about something, people can't help but take interest.
Hope this helps.
Program anything you think you could do well. A portfolio is not as much about quantity as it's about quality.
It's been a few years since I interviewed with game companies so some things could have changed, but here are some notes from my experience:
If you are in college, try to get into summer internships with game companies. Microsoft, Blizzard, Epic, etc all have summer programs that will help you build your portfolio. Most of the time, they will have you work on tools for their full time developers to use, but that is how you get your foot in the door.
If you are coming out of college (or, as was my case, have been developing non-game applications for several years) and don't have titles you can put your name on, you'll have an uphill battle. The best way to approach it in this case is to do one of the following:
a) Develop your own custom game engine and make some simple games with it. This will show knowledge of the basic fundamentals the game companies are looking for.
b) Develop a mod of a popular game. A good example of this is DotA (custom scenario for Warcraft III), or various Unreal Tournament mods.
c) Develop some games with an opensource, or somewhat inexpensive game engine (e.g. OGRE, Torque3D, etc.)
Despite having 5+ years of application development (with shrink-wrapped software used directly by customers), I'd get to the 2nd, 3rd, or even 4th interview only to get the response, "You have a very strong background in application development, but you don't have much of a game portfolio. Please work on that and apply again in the future. Thanks."
Good Luck!
All of the suggestions made so far are wise, I'll also add this.
Games in the idea stage are pretty dangerous. You'll keep thinking of things you want to add, technologies you want to use, and so on. Get out of that as quickly as possible for every project.
Start by thinking of a core idea for a game, ideally this should be a short, one or two sentence description. Even better would be a two word description: "Asteroids RPG!". Then come up with a bullet point list of the features it should have.
Once you've got that list, absolutely never change it and never stray from it while you are coding. If you have new ideas and you just have to explore them, start a new list for another game.
Hopefully you'll have something you can actually play by the time you've completed one to three of those bullet points; you can make the character move on the screen, or enemies do their thing, something you can interact with. At this stage, although the game isn't very deep, it should already be fun. Just moving your guy around in an interesting way should feel a bit stimulating and make you actually want to play the rest of the game.
If it doesn't, figure out why not and fix it. If you can't figure out why it's not fun by this stage, or you can't figure out what would have to change for it to be fun, drop it immediately. If the core gameplay mechanic, the first thing you needed to make the game a game, isn't fun now, it won't ever be fun.
You need it to be fun if you want to use it in your portfolio. If it's not fun the interviewer won't play it much. You don't want it to be too much fun, of course, you really want the interviewer to be interested in it and then move on to the source code or the next game. You want to show them a variety of ideas you can explore, and a variety of techniques you can use.
Include the best programming examples that you have.
C++ is used in the development of a lot of games so try to use that language.
You can use other languages as well through if they show off your programing experience a certain topic.
If you have any well polish projects that involve computer graphics, AI, physics, or multithreading include those since are topics that are used very often in game development.
Another good idea is to go through these projects and provide comments if you haven't already. Include a description of the project and the goals somewhere easy to find in the project.
Overall you should try to use examples that feature the above areas and that show that you know how to structure a large programming project. Game development is alot smoother when you have a good project layout.
To quote an old professor: The first time you program a project you do it the wrong way. The second time you do it in a way that works but is not effective (difficult to modify, not efficent). The third time you program the project it's acceptable.
Sometimes, game-like features in an application can make work fun. For example, Stack Overflow uses badges and points to coerce its users into doing work.
What game-like features are
transferable to applications?
What kinds of applications are
appropriate for game-like features?
Why are game-like features uncommon in applications?
I think the main issue is that in most applications, they are used for a purpose. They don't need to incentivise the user by making it more "fun" and it's generally a distraction. Imagine what would happen if Visual Studio (or whatever your favorite IDE is) gave you badges... Just like here, many people would concentrate on acquiring those badger instead of writing good code.
Another thing is that, at least in the case of badges/achievements, they're fairly meaningless for offline applications.
Games are really educational applications. True, what they generally teach is how to play the game, but they're still educational.
By the time you finish a typical game, you're an expert in a dozen different mechanics, know how to handle complex scenarios, and can recognize multiple different foes and their patterns.
While game mechanics themselves ("jump!") may not be applicable to typical applications, a look at how games approach teaching certainly could be.
One of the places where you can see this principle being effectively applied is for applications that use people to generate or index content. In these cases, the game-like aspects are a way to encourage self-moderation. For example, on SO, the rep and badges aim to encourage constructive behaviour like higher-quality answers, peer review etc. Similar systems exist on many generic forums, as well as sites like boardgamegeek and wikipedia.
I could imagine this kind of thing working well for things like community/company wikis, software documentation, or adherence to coding standards or test coverage. The problem, as ever, is to stop the game becoming the main focus. For example, if you could get rep for tidying up your intranet wiki, I can guarantee there would be some people who would do that all day, when their main job was something quite different!
Flashing lights and other shiny stuff. Good games are loaded with colour and give the same pleasant stimulation as watching fireworks.
It's definitely true that 'game' features in an application might be distracting and detracting from the effectiveness of a lot of applications.
The idea of adding game features to a product is to impose some sort of economy to productivity--a reason for working. For example, the badges here are kinda neat, but what really drives people to do well on SO is the reputation. It enables them to make a larger difference and more impact, and then also ties them to a feel of responsibility for the site. I think SO really strikes a good balance here.
Although, game features in other apps can be insulting imagine this:
> gcc -c main.c -o main.o
Compiling... while your waiting, what's your favorite color?
Edit
The question you might want to answer very specifically is "What behaviour are you rewarding, why are you rewarding it, and what is the reward?" If all those have to do with productivity and nothing to do with some orthogonal happiness (ie social standing) I'm not sure its going to work.
End Edit
On a completely different note, you must watch this talk on "Human Computation". Wow.
http://video.google.com/videoplay?docid=-8246463980976635143
It talks about using games to categorize images for Google. A little off topic, but you might appreciate it.
Nowadays, games are synonymous with community.
Most line of business applications don't include a wide variety of multiplayer or community aspects to them.
Brilliant question Evan! And now for my definitive answer:
I think that any work can become fun if you break it into attainable challenges. An application becomes a game when it provides these challenges, explains them, and gauges success or failure.
The difficulties in building challenges into applications are...
The challenges must align with the
work, so that effort spent
surmounting the challenge is also
progress towards the user's goals.
Otherwise the challenge is only a
distraction. Application users have
few common goals, so a predetermined
set of challenges cannot be very
useful.
The typical goal of most work done in an application is to impress a human being through creativity and ingenuity. This cannot be gauged very well in software.
For these reasons, building specific challenges into an application has very limited value. Social games may be an exception because other users partially define challenges and gauge progress appropriately on a case-by-case basis.
Doom as an interface for process management, anyone?
http://www.cs.unm.edu/~dlchao/flake/doom/chi/chi.html
I am a hobbyist console C++ developer. I have worked with pointers, arrays, std::vectors, std::strings, classes, and several data structures, including stacks and binary trees. I have some experience in linear algebra and geometry, and know the basics of physics. I do NOT have experience with win32, QT, openGL, DX9, OGRE, etc. I am still learning about the more valuable parts of OOP, like polymorphism.
I started C++ as a first language, and do not have experience with other languages. I could probably work with C, but I'd need to get used to manipulating char*'s and regular arrays (and not initing variables).
My question is, with my experience, when should I break into the development of GUI applications/game applications? Do I need to ground myself more firmly in certain areas of math, become comfortable with win32, get used to SDK?
If this question is too subjective for you to comfortably give advice, then when did you break into GUI/game development, and what steps did you take to make yourself comfortable with it?
Editing this so it will get bumped. Does anyone else have any opinions?
Caveat: I am a very "learn-by-doing" type of person, so take this with a grain of salt.
Sounds like you know enough programming basics to jump into something more realistic, and have enough background to justify that realistic project being a game.
I'd recommend downloading Visual C# Express and Microsoft's XNA Game Studio 3.0.
XNA is a game framework that has a lot of stuff done for you (sound, sprites, 3D support, etc.) built on a professional-quality C# platform and it would be a good starting point. Create a new XNA project and play around. Get some stuff to appear on the screen, then learn to manipulate it with user input. If you are interested in 3D, make a 3D shape such as a triangle. Then, make it spin. Then, make it spin based on user input. Then, add other objects and collisions.
Surely, there will be things in the framework that you don't understand. Tackle them as they come - use Google and ask questions here until you do understand them. Take it one step at a time and you should be just fine.
I'd personally recommend you to start out with Win32; try creating a basic window & move on from that point. Try making a simple 2D game engine in which you are able to make a game like chess or so. This could also serve as project for which you could write an AI; which is another part of Game Development!
After you finish that, the next step should be 3D. You could use the engine you wrote before and modify it from 2D to 3D. Pick a 3D API; OpenGL or DirectX. Once you have a basic engine, start writing a game. Need extra functionality? Then add it to the engine!
Math-wise you should know what matrices are. Trigonometry can come in handy as well.
I wouldn't waste my time with Xna, it's just a hype. :P
It seems you already have gained the basic knowledge of a programming language to start game programming. I'm with you in building on what you have already gained, such as learning OOP, and practicing more with pointers. I recommend you move on and don't turn to learning another tool "programming language" to achieve your goals.
So if you are interested in game programming, I recommend you pick a C++ framework and work on it, you'll definitely learn more advanced programming by just using it.
I recommend Gosu. It's not full of advanced features, which can be an advantage, but it has a very clean design and uses C++ in an elegant and modern way. Which makes it very friendly especially for beginners.
Also HGE is another good 2D engine.
To sum up, dive into programming more by actually "doing it" with what you have now. That's how you'll progress, and you'll be amazed with the results. And when "doing it" don't get disturbed with other languages and tools you already know something similar to it, and at the same time when learning a tool that helps you to build on your current knowledge, in your case I mean the C++ engine, don't choose very complicated ones (IMO, like OpenGL, DirectX, Win32...etc) because you'll end up spending time on learning the tool not using it and there is a great chance you'll get frustrated. You can always learn the low level things later, and it will make a lot more sense then.
as this question is kind of subjective, because every programmer has a favourite library to start with, I will recommend SDL as it is simple, well structured, and very complete, there are a lot of tutorials out there to guide you step-by-step from making a simple window to complex 3D manipulation. Everything can be implemented with ease.
As a side note, if you want to start programming games, I would recommend, also, that you read some tuts or books about a Game basics (initialization, game loop, update cycles), so that you know how to put your knowledge to the good work.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I've had several false starts in the past with teaching myself how to program. I've worked through several books (mostly C and Python), and end up just learning the syntax without feeling as though I could sit down and actually write a program for myself. When I try to look through the source trees of a project on Codeplex or Sourceforge, I never seem to know where to start reading the code -- the dependencies seem to go in all directions.
I feel as though I'm not learning programming the way it's done "on the street," so I figured I'd take a different approach to asking how a newbie should learn how to code. If you had to learn programming all over again, what are the things you wouldn't do? What did you spend time doing that you now know wasted you weeks or months?
Where I see beginners wasting weeks or months is typing at the keyboard. The computer is very responsive and will cheerfully chew up hours of your time in the edit-compile-run cycle. If you are learning you will save many hours if
You plan out your design on paper before you approach a computer. It doesn't matter what design method you pick or if you have never heard of a design method. Just write down a plan while your brain is fully engaged and not distracted by the computer.
When code will not compile or will not produce the right answer, if you can't fix it in five minutes, walk away from the computer. Go think about what's happening. Print out your code and scribble on it until you believe it's right.
These are just devices for helping to implement the simple but difficult old advice to think before you code.
When I was learning, I solved countless problems on the 15-minute walk from the computing center to my home. Sadly, with modern PCs we don't get that 15 minutes :-) If you can learn to take it anyway, you will become a better programmer, faster.
I certainly wouldn't start by looking at "real" software projects. Like you say, it's too hard to know where to start. That's largely because large projects are more about their large-scale design than about the individual algorithms or about program flow; for one thing, you're probably looking at a complex GUI application with multi-threading, etc. There isn't really anywhere to "start" looking at the code.
The best way to learn programming is to have a problem you want (need) to solve, and then going about solving it. But most importantly, WRITE CODE. When you read programming books, do ALL the exercises. Make sure you did them right. There's no substitute for writing code. No substitute for screwing up and then fixing it.
Stack Over F.. wait no, heh.
The biggest time-sinks for me are generally in respect to "finding the best answer." I often find that I will run into a problem that I know how to solve but feel that there is a better solution and go on the hunt for it. It is only hours/days later that I come to my senses and realize that I have 7 instances of Firefox, each containing at least 5 tabs sprawled out across 46" of monitor space that I realize that I've been caught in the black hole that is the pursuit of endless knowledge.
My advice to you, and myself for that matter, is to become comfortable with notion of refractoring. Essentially what this means (incase you are are not familiar with the term) is you come up with a solution for a problem and go with it, even if there is quite likely a better way of doing it. Once you have finished the problem, or even the program, you can then revisit your methodology, study it, and figure out where you can make changes to improve it.
This concept has always been hard for me to follow. In college I preferred to to write a paper once, print, and turn it in. Writing code can be thought of very similarly to writing a paper. Simply putting the pen to the pad and pushing out whats on your mind may work - but when you look back over it with a fresh pair of eyes you will, without question, see something you will wish you had done differently.
I just noticed you talked about reading through source trees of other people's projects. Reading other people's code is a wonderful idea, but you must read more selectively. A lot of open-source code is hard to read and not stuff you should emulate anyway. So avoid reading any code that hasn't been recommended by a programmer you respect.
Hint: Jon Bentley, Brian Kernighan, Rob Pike, and P. J. Plauger, who are all programmers I respect, have published a lot of code worth reading. In books.
The only way to learn how to program is to write more code. Reading books is great, but writing / fixing code is the best way to learn. You can't learn anything without doing.
You might also want to look at this book, How to Design Programs, for more of a perspective on design than details of syntax.
The only thing that I did that wasted weeks or months was worry about whether or not my designs were the best way to implement a particular solution. I know now that this is known as "premature optimization" and we all suffer from it to one degree or another. The right way to learn programming is to solve a problem, measure your solution to make sure it performs good enough, then move on to the next problem. After some time you'll have a pile of problems you've solved, but more importantly, you'll know a programming language.
There is excellent advice here, in other posts. Here are my thoughts:
1) Learn to type, the reasons are explained in this article by Steve Yegge. It will help more than you can imagine.
2) Reading code is generally considered a hard task. So, it is better to get an open source project, compile it, and start changing it and learn that way, rather than reading and trying to understand.
I can understand the situation you're in. Reading through books, even many will not make you programmer. What you need to do is START PROGRAMMING.
Actually programming is a lot like swimming in my opinion, even if you know only a little syntax and even lesser amount of coding techniques, start coding anyway. Make a small application, a home inventory, an expense catalog, a datesheet, a cd cataloger, anything you fancy.
The idea is to get into the nitty-gritties of it. Once you start programming you'll run into real-world problems and your problem solving skills will develop as you combat them. That's how you become a better programmer everyday.
So get into the thick of it, and swim right through... That's how you'll make it.
Good luck
I think this question will have wildly different answers for different people.
For myself, I tried C++ at one point (I was about ten and had already been programming for a while), with a click-and-drag UI builder. I think this was a mistake, and I should have gone straight to C and pointers and such. Because I'm just that kind of person.
In your case, it sounds like you want to be led down the right path by someone and feel a bit timid about jumping in and doing something by yourself. (You've read several books and now you're asking what not to do.)
I'll tell you how I learned: by doing plenty of fun, relatively short projects, steadily growing in difficulty. I began with QBasic (which I think is still a great learning tool) and it was there where I developed most of my programming skills. They have of course been expanded and refined since that time but I was already capable of good design back in those days.
The sorts of projects you could take on depend on your interests; if you're mathematically inclined you might want to try a prime number generator or projecting 3D points onto the screen; if you're interested in game design then you could try cloning pong (easy) or minesweeper (harder); or if you're more of a hacker you might want to make a simple chat program or file encryption software.
Work on these projects on your own, and don't worry about whether you're doing things the "right" way. As long as you get it to work, you've learned many things. Some time after you've completed a project you may want to revisit it and try to do it better, or just see how other people have done that sort of thing.
Given the way you seem to want to be led along, perhaps you should find yourself a mentor.
Do not learn how to use pointers and how to manually manage memory. You mentioned C, and I spent plenty of time trying to fix bugs that were caused by mixing *x and &x. This is evil...
Find some problem to solve, write or draw a sketch of an algorithm solving the problem, then try to write it. Either use Python (which is much more friendly for beginners) or use C with statically allocated memory only. And use books/tutorials. They offer multiple excercises with solutions, so you can compare yours with them and see other approaches.
Once you'll feel that you can actually write something simple, see some book/tutorial for Object Oriented Design. It's not the best the world has to offer, but it might turn out to be intuitive. If not, check the functional programming (like LISP, Scheme or Haskell languages), or programming in logic (like Prolog). Maybe those will suit you better.
Also - find some mate. A person you can talk to about coding, code maintenance and design. Such person is worth even more than a book.
To all C fans: The C language is great, really. It allows memory usage optimization to the extent impossible in high-level languages as Python or Ruby. The compiled code is also very fast, and is the only choice for RTOS, or modern 3D games engine. But this is not a good entry point for a beginner, that's what I believe.
Oh, and good luck to you! And don't be ashamed to ask! If you don't ask, the answer is much harder to find.
Assuming you have decent math skills try http://projecteuler.net/ It presents a series of problems to solve of increasing dificulty that should be solvible by writing short programs. This should give you experience in solving specific problems with out getting lost in the details of open source projects.
After basic language syntax, you need to learn design. Which is hard. This book may help.
I think you should stop thinking you've wasted time so far-- instead I think you're education is just incomplete, and you've taken a step you're not really ready for. It sounds like the books you've read are useful, you're learning the intricacies of the language. It sounds like you're just not accustomed to the tools you'd use then to package that code together so it runs.
Some books cover that focus on topics like language syntax, design patterns, algorithms and data structures will never mention the tools you need to actual apply that information. These books are great but if its all you've touched I think it would explain your situation.
What development environment are you using? If you're developing for windows you really should be proficient with creating projects, adding code, running and debugging in Visual Studio. You can download Visual Studio Express for free from Microsoft.
I recommend looking for tutorial like books that actually step you through the UI of development environment you are using. Look for actual screenshots with dropdown menus. Look at what the tutorials walk you through, and if its something you don't know how to do consider buying that book. Preferably it will have code you can copy'n'paste in, not code you write yourself.
I personally don't like these books as I can anticipate how to do new things in VS based on how I'd do other things. But if you're training is incomplete from a tools-usage perspective this could move you in the right direction.
It is probably harder to find these types of tutorial books for Python or C development. There is an overabundance of them for .Net development though.
As someone who has only been working as a programmer for 6 months, I might not be the best person to help you get going, but since it wasn't that long ago when I knew next to nothing, its quite fresh in my mind.
When I started my current job programming wasn't going to be part of my job description but when the opportunity came up to do some programming on the side, I couldn't pass it up.
I spent about 1 month doing tutorials on About.com's Delphi section. As much as people diss about.com, Zarko Gajic's tutorials were simple to understand and easy to follow. Once I had a basic knack of the language and the IDE, I jumped straight into a project exporting accounting data for a program called "Adept". Took me a while but I got there...
The biggest help for me was taking on a personal project. I developed an IRC bot in Java for a crappy 2D game called Soldat. I learnt a lot by planning out and coding my own project.
Now I'm pretty comfortable with Delphi Pascal, SQL, C# and Java. I think, once you get the hang of one OOP language, you can learn the syntax of another language, and it gets a lot easier to catch on.
Perhaps start with a small existing project, and find some thing within it that handles some core part of what it does - then with a debugger, step through it and follow what it's doing from the point where you ask it to do that thing for you.
This helps you in a number of ways. You start to better grasp all of the various things that are touched by the code as it attempts to complete its request. Also, you learn invaluable debugging techniques which it seems like far too many developers lack - while you can often eventually discover what is wrong either with repeated printf() (or equivalent) calls, if you can debug you can solve issues an order of magnitude faster.
I have found that conceptually, a great mental model for understanding programming in the abstract is a pattern of data flow. When a user manipulates data, how is it altered by a program for digestion and storage? How is it transformed to re-present to the user in a form that makes sense to them? Fundamentally code is about transformation of data, and all code can be broken down into constructs of various sizes whose purpose is to alter data in one way or another, bugs forming around the mismatch between what the programmer was expecting from the data, how high level libraries the coder is using treat the data, and how the data actually arrives. Following code with a debugger helps you fully understand this transformation in action by observing changes as they occur.
Standard answer is to make something; picking an easy language to do it in is good, but not essential. It's more the working out stuff in your own head, fixing it because it won't work, that really teaches you. For me, this always happens when I try my eternal dream projects (games) which I never finish but always learn from.
I think the thing I would avoid is learning a language in isolated snippets that don't really hang together but just teach various facets of a particular language. As others have said, the really hard and important thing is to learn design. I think the best way to do this is through a tutorial that walks you through creating an actual application, teaching design along the way. That way you can learn why certain decisions are made and learn how to accomplish what's needed to implement the design choices.
For example, I found Agile Web Development with Rails to be a really easy way to learn Ruby on Rails, much better than simply reading a Ruby manual or even poking my way around scattered web tutorials.
Another thing that I would avoid is developing code in isolation, that is, not having people look at it as I go along. Getting feedback from a mentor will help keep you on the right track with respect to the choices you are making and the correct use of language idioms.
Find a problem in your life or something you do that you just feel could be more efficient and write a small solution to it. It might just be a single script but you will gain much more confidence in your abilities when you start to see useful results of your work. You will also be more motivated to finish it as you are interested in using the solution. Start simple and small and then gradually move up to bigger projects.
And as your working on a small project, focus on building everything with quality. I think this is lost on some programmers who feel that their software is more impressive if it contains a ton of features but usually those features aren't well done or usable. If you focus on building quality solutions to real problems you'll be a fantastic programmer.
Good luck!
Work on projects/problems that you already know how to solve partially
You should read Mike clark's article : How I Learned Ruby. Essentially, he used the test framework for Ruby to exercise different elemnents of the languages.
I used this technique to learn python and it was very, very helpful. Not only did i learn the language, but I was very proficient in the test framework for Python at the end of the excercise. Once you have the basics you can start reading code and then working on building some larger project.
I am currently studying and my next subject is 'Programming Using Alice'. Has anyone had any experience using this? And how would you rate it as a learning tool?
Yea, I used it in my AP Java 2 class back in high school. It was fun, though primitive (at that point, I was more interested in advancing my programming capabilites and didn't like ANYTHING that limited what I could do). It is a good learning tool for children and those who are just getting started in programming (i.e. have never programed in any language before). It teaches the basic concepts in a very visual way with immediate results. Its one very good feature is the 3d environment you get to explore. This makes it applicable even if you are developing your programming skills into something more. You can play around with it and make a fairly decent game; I would expect that a chess game is very possible!
In all, I think it is worth while learning if nothing else to say that you've done it. As it has been a while since I last used it, my response may be a bit dated and I apologize if there is something that I said that is no longer true.
Enjoy!
Alice is good tool for students who have had no experience with programming. Simple to the point of being childish, but it gets its point across. Many instructors are raving about how much better the students are understanding programming after using Alice in their 101.
For full disclosure, I have seen Alice used but have never used it myself. My comments come from instructors that I have talked to.
I took a course on Alice, and it really helps you visualize the concept of programming and most important of, the manipulation of classes. But I really don't recommended for universities courses like the one I took because there are a lot more helpful and efficient object oriented software that can help you applying what you learn in programming courses in an easy way and gaining experience at the same time for example in game development and others involving graphics and visual objects...
I had this class recently, and although I have years of programming experience, it was really funny.
Deciding if a language is useful or not is out of the question when it's about learning algorithmic. I remind myself asking the same question about my Turbo Pascal class, 18 years ago. Yeah it's true that I never made a living of it, as for Alice. However it provided me with good bases in algorithmic.
Yes Alice is a good learning tool. You will learn about functions, parameters, variable settings, lists and arrays, and command functions, not to mention loops. And it's an OOP language too, so you will learn that objects have properties that can be manipulated.
These are the basic principles of any modern language, with a fun layer on top of it since you ultimately will animate characters and objects in 3D.