server: irc.newnet.net
Channel: #bay12prog
Suggested Pastebin: http://b12prog.pastebin.com/
Interesting Collaboration tool http://piratepad.net/bay12prog
Welcome! This is an attempt to help promote what I thought was a good idea for beginning (and not so much) programmers who were looking for a friendly place to seek help, guidance and motivation.
There may be different levels of knowledge regarding programming but what we must never forget is that we are always learning. To enhance the experience, We can't allow ego around here. Ego makes us self-conscious about ourselves and limits both our ability to teach and our productivity. You must be proud of your improvements, but you must let other people walk their natural journey through knowledge.
Most programming knowledge comes from your own investigation of how things work and then trying things out. Theory is important but it's easier to remember something once you've tested it in the field. Some say, it's the only way.
When asking a question, it is of extreme importance for the success of the inquiry to consider a number of things wich are explained in a very clear way here:
How to ask questions the smart wayNo one here is going to be assigned as an instructor or anything like it.
The point of this innitiative is to be able to help other people progress and learn in the process, have fun and experiment with different concepts and varied ways of doing things. When you have the opportunity to see different approaches to a specific problem, even if they might not be the most efficient, they might just open your mind a great deal.
For now, I'll start with some varied challenges (Most might be "borrowed" exactly or slightly modified from other pages and some will be made specifically):
The idea is to serve as a learning and sharing vehicle.
Right now I'm focusing a lot in the c++ language because it's the one I'm more familiar with but the thread and channel should be about anyone you want/need.
As far as the challenges/exercises go... I think that judges are not really a necessity. In many situations, you'll be able to tell if something worked or not. But it may be helpful to hand the solutions to a particular person or group of appointed people so that you can get some opinions and insight and, as I said earlier, they will probably learn something else too.
If people want solutions to be shared in a more open way, it would probably be a good idea, after a certain period of time, to have a spoiler tag with links to solutions in a pastebin (like
http://b12prog.pastebin.com/). So people, after providing their own solution, could proceed to compare and investigate different ideas.
Everything is open to debate. We can just use the system that we prefer.
The idea of a challenge/contest would be to provide both the challenge and some resources (links, search guidance) needed to learn how to approach the problem.
The following is definetly under construction. Help me out with the best ones online. I don't want to just clutter it with all I've seen but try to post the most helpful ones.
Resources:Language SpecificC++http://www.learncpp.com/ (As I keep emphasizing in my signature. A great tutorial site)
http://www.parashift.com/c++-faq-lite/CBeej's Guide to C Allegedly good for pointers and arrays (humor included).
C#- MSDN - Blacken suggested this one, excellent documentation on all the standard C# stuff.
- C# Tutorial - This might be a little bit above the average introductory programming tutorial, but for anyone with some level of programming experience, it's fairly simple.
- Moving From C++ to C# - A PDF file that covers most of the differences between C++ and C#, fairly thorough.
JavaHow to Think Like a Computer Scientist (Java Version)Python-
How to Think Like a Computer Scientist:Python-
Dive into Python-
How to Think Like a Computer Scientist (Python)Ruby-
Try Ruby Seriously right in your browser, it goes over the basic syntax for Ruby as well as some basic commands from a webapp in your browser.
-
pickaxe for ruby 1.6, still very relevant-
Learn to ProgramClever Algorithms PhD describes 45 algorithms from the field of Artificial Intelligence.
LOGO-
How to Think. Luahttp://www.lua.org/pil/PerlCpan (giant library of perl modules)
Challenge Sites:Until I write most of the ones I've thought we can start trying out any of these:
sphere online judgeCProgramming HelpFree ChallengesCProgramming Basic code completionSome programming challenges I liked in a blogProgramming_Challenges (I just found this one and it looks very interesting)
LispPractical Common Lisp - Free Web Book Version.
Other online judges:
http://en.wikipedia.org/wiki/Online_judgeGame Development Related:GamedevTemple of the roguelike (I've heard good things about this one but I don't particularly know it)Api/Library Specific:Win32:http://www.winprog.org/tutorial/Graphics:SDL:- Add your own.
Allegro- Allegro CC Manual - An excellent resource, not a tutorial by any stretch, but a great reference material for finding information on the API, among other things.
- Cpp Game Programming - This website has a pretty good Allegro, introduction level tutorial. It's where I picked it up.
OpenGlOpenGl's RedBook (Using GLUT)
Nehe.GamedevSFMLSimple and Fast Multimedia LibraryMiscGetting Started With IRCWeb Developmentw3schools
Contests will have a code for easy reference. It's more than likely that the order will be changed.
Challenge 1) CODE: REAL_AGEWrite a program that will ask you for your date of birth and will output your resulting age (Years and months in one hand & total number of days in the other).
Example:
John: Born: 13/2/1988 (Current date: 21/5/2010)
Result: "John is 22 years, 3 months old. He has lived in this world for 8133 days."What you must Consider: You might do it the hard way... Or you might use a time library.
Challenge 2) CODE: ELLAPSED_TIME.Write a Macro to measure the ellapsed time of a given function (useful when debugging)
What you must know: Preprocessor directives.
Challenge 3) CODE: QUADRATICB) Make a program that solves the quadratic roots of an equation of the form: ax^2 + bx + c
specify a,b,c by asking the user each of those numbers in turn.
What you must consider: http://en.wikipedia.org/wiki/Quadratic_equation[Quadratic Equations. Divide by zero? Possible results? 1? 2?
I) Now make it so that the user can input the equation in the form and you will parse the necessary information.
Take into account the user can write any number of whitespaces in between the plus signs or none at all:
Take into account that one of the numbers may be zero and be ommitted (2x^2 for example would mean a=2, b=0, c=0)
Do it for positive numbers at first. What do you have to consider for negative ones?
ax^2 + bx +c
What you must consider: Text parsing + everything you did for last exercise.
A) Extend it to ax^3. Figure out if you can make it so that the program can analyze and solve an equation input of the way:
3x^2 + 5x + 5x^2 + 1 +
Challenge 4) CODE: SOURCEPRINTWrite a program such tht it prints its own source code as output.
What you must consider: File input/output
Challenge 5) (By qwertyuiopas): CODE: LASTCHARRead in a string as input(any method. Passing on the command line, stdin, file input/output, anything else).
Once the entire string has been input, print the last character, a new line, then the input string, with every third "e" replaced with "ii". Printing the last character prevents the easy solution of "input character, if it is the third e, write ii, else write that character back out.
Output is also your choice, as long as it can be read.(Technically, the "cheating" that can be accomplished with fseek or equivalent on file output would probably require about as much skill as any other solution in a language without strings that automatically resize to fit any added characters.)
I'd like to get some opinions:
- What type of challenge would you be interested in?
- Would you like to participate in contests to be forced to follow a time constraint? (should be in a time period where people are not too busy)
- Any other ideas?
TODO in this thread:- Tidy up the contests and organize them depending on the topic. Organize contests in the 2nd page.
- Add more contests to cover more subjects. Make sure the objective is clearly explained
- Add resources about different languages. C#, Java, Python, LUA
- Associate a brief description to each link
Remember:What this is place is for:
A friendly place to learn and practice various programming subjects without fear of being completely wrong.
What this place is not for:
No religion wars. No X is better statements with no backup. If you want to suggest what you think is a better tool you are allowed to do so but try to show provable advantages and accept calmly any disagreements. After all, it's just a suggestion. You're not in the same team at work.
Why B12 and not some other programming forum?
Because, from what I see, there's a lot of people who are honestly interested in programming and hang around here, but sometimes, due to lack of support or guidance they give up or are scared too easyly by what looks like a daunting enterprise. B12 is a place to have fun and programming can be LOADS of fun. You don't need to be Newton. As times goes by, you'll probably want to take upon harder challenges, but, if you do it at your own pace, they will still be entertaining.
Finally. I, as you, am human. So feel free to point any mistake I might've made so I can correct it.