Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Poll

What programming topic would you want the next challenge to be about?  (It might be a good opportunity to focus on a subject you're not familiar with or to reinforce knowledge on one that you already know)

Control Flow
- 2 (2.2%)
Arrays, Strings, Pointers, and References
- 8 (9%)
Functions
- 4 (4.5%)
Basic object-oriented programming
- 30 (33.7%)
A bit more advanced OOP (Composition, Operator overloading, Inheritance, Virtual Functions)
- 18 (20.2%)
Templates
- 8 (9%)
Other (Explain)
- 4 (4.5%)
Working with files?  (Streams)
- 15 (16.9%)

Total Members Voted: 89


Pages: 1 ... 51 52 [53] 54 55 ... 78

Author Topic: Programming Challenges & Resources (#bay12prog) Initiative  (Read 95898 times)

ILikePie

  • Bay Watcher
  • Call me Ron
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #780 on: January 11, 2011, 11:46:04 am »

I tend to just start writing as well when I want to learn a new language. I've written the same wav file generator in maybe three or four languages. I look into the basics, and then just begin typing, using my previous code as reference. If something doesn't compile I'll look it up, but otherwise it's just type, compile, look up, type and compile all the way through.
Logged

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #781 on: January 11, 2011, 01:35:59 pm »

Which is problematic for obvious reasons. Read about what you're doing. Understand how it works. Writing code without a purpose may luck into doing something useful, but discipline and practice are how you turn from a code grinder into a programmer.

The perceived problem with the aforementioned programming languages that Virex mentioned is one I am sure is widespread, and exists solely because of willful ignorance. It doesn't need to be. It's extremely well-documented and covered in depth in good learning resources.
The problem here is, I think, twofold. First of all, many books geared towards learning how to program are as engaging as a reference work. This is of course fine for students, who often have lecturers and assignments to keep them on their toes. However, I wouldn't be surprised if many hobby programmers tried to browse trough a book and then find that studying the language in that way isn't getting them anywhere. Instead they get their hands dirty, but then they need a reference work. Most reference works are geared towards people who already know the language and most books for new programmers are poor reference works. The only thing that caters to these people are on-line tutorials, because they make it feasible to look up things in a small, encapsulated piece of text. But the quality of on-line tutorial as reference works is often doubtful at best, especially with languages like C#, that has changed very recently.
Note: I am not saying that most books are bad, far from it. But a lot of people are bad at learning from books, especially with the lure of (poor) on-line tutorials that tell them just what (they think) they need to know
« Last Edit: January 11, 2011, 01:38:42 pm by Virex »
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #782 on: January 11, 2011, 01:38:22 pm »

Which is problematic for obvious reasons.
Well, if somebody pulled that at work I'd have his head. But for the purpose of learning, the steps
1. Write (aka copypaste) code
2. Learn how the code works (iterative)
3. Understand your problem in terms of the language you're using
Are very helpful.

That last step includes such things as the actual structure of the language, and how you can define and subdivide your problem into neat best-practice (eg: No Globals!) steps for that specific language. It's the normal way of getting to know stuff from junior-level programmer to senior-level programmer:
1. First you can Grind
2. Then you can Code
3. Then you can Design
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

ILikePie

  • Bay Watcher
  • Call me Ron
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #783 on: January 11, 2011, 01:48:02 pm »

Which is problematic for obvious reasons.
Well, if somebody pulled that at work I'd have his head. But for the purpose of learning, the steps
1. Write (aka copypaste) code
2. Learn how the code works (iterative)
These work very nicely when you're learning how a language's syntax or features work. I wouldn't copy and paste code though, but write an already written algorithm (or rewrite an already written program) in the language you're learning.
Logged

Blank Expression

  • Bay Watcher
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #784 on: January 11, 2011, 01:53:51 pm »

Quote
Most reference works are geared towards people who already know the language and most books for new programmers are poor reference works.
And other reference works for new programmers are beyond fantastic. Some of them have already been linked in this thread. This one, for example. (It also exists for a number of other programming languages.)

Your complaint, stripped of its artifice, is that people don't want to spend the time to learn and want to be magically able to make it do what they want it to do, without putting in the effort to learn, does not cheapen the incredible value of the books out there. It speaks to their unwillingness to do work, but rather to get what they want now-now-fucking-now, instead of the tools that you are currently faulting for the personal failings of the people who are attempting to use them without bothering to learn how they work.

(Also, and this is getting a bit afield: your continued complaints about C# are further curious, because the MSDN is probably the best set of reference documents--both for novices and for experienced developers--of any programming environment in existence.)

Note: I am not saying that most books are bad, far from it. But a lot of people are bad at learning from books, especially with the lure of (poor) on-line tutorials that tell them just what (they think) they need to know
Then they are bad at learning and should improve that before they attempt to tackle a task that requires a great deal of it, no? Do you blame, say, a tablesaw, for its user losing fingers because they never bothered to learn how to avoid kickback?

Programming is hard. Programming well is very hard. Taking shortcuts is tempting and ultimately foolish. The focus on instant gratification is probably the worst thing that could have happened to the legions of prospective programmers out there. "Oh, I want to go make games right now!!1111" Sit down, shut up, and learn, instead of going off half-cocked because dammit you want it right now, and it all becomes simpler.






I'm still waiting for Shades to wander back and substantiate his earlier claims. That has promise to be a good discussion.
« Last Edit: January 11, 2011, 02:03:03 pm by Blank Expression »
Logged

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #785 on: January 11, 2011, 02:03:55 pm »

No, but I would blame people for getting pissed at me for not reading trough a 250 page manual on the inner workings of a table saw instead of pointing me to a resource that does help me with what I am trying to achieve. It's easy to say "learn to learn before you try something like this", but people are going to attempt anyway. Instead pointing them at resources that do provide a solid base without being as boring as a dictionary would solve much more. (OK, maybe I'm having a but too much compassion with some here)
I'm not attacking you specifically here, but it seems like it's a general trend amongst programmers to look at someone who's trying to learn how to program and shout at them "WHAT ARE YOU DOING! GO READ A BOOK OR SOMETHING" and then fail to point out what book they should read or even what they should be looking for in a book in the first place (Do I start with Introduction to Algorithms and start with a book on python later on, or would starting with C++, A Primer be better?) Remember that a lot of people start out completely lost. It'd be a waste to let their motivation go to waste on poor code and cynical system engineers.


(Also, and this is getting a bit afield: your continued complaints about C# are further curious, because the MSDN is probably the best set of reference documents--both for novices and for experienced developers--of any programming environment in existence.)
It's good for "novices", true. Not so much for people who're completely new (but as you said, they shouldn't be looking at MSDN anyway). Besides that, while MSDN is excellent when it comes to describing how the elements in the language do, the thing people are usually interested in is the things that are NOT in the language, and that's a lot harder to find for C# specifically due to the incompatibility of version 4.0 with the much more documented 3.x series.
« Last Edit: January 11, 2011, 02:14:38 pm by Virex »
Logged

Blank Expression

  • Bay Watcher
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #786 on: January 11, 2011, 02:11:40 pm »

If they deem that learning is too hard, then they should stick to Game Maker. They don't (yet, it can be developed) have the temperament to learn how to do real development outside of an immediate-gratification system.

If the material in ThinkPython (which, as I said, has been recommended as the "start here" point before in this thread--I spent a little time catching up on it yesterday) is "boring as a dictionary," then the person in question should ask themselves if they really want to be a programmer at all. Because it's what you do every single day as a programmer. Game programming isn't fun because it's programming games. If you don't enjoy the act of learning about programming, you will bore yourself to tears actually writing code.
Logged

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #787 on: January 11, 2011, 02:24:22 pm »

Having never looked into ThinkPython, I can't say anything about it, but in my experience they are good books and bad books and it's very easy to end up with a bad book/resource. That's why people like you should point at good resources more often, because aspiring programmers don't know what makes a good book.
Logged

eerr

  • Bay Watcher
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #788 on: January 14, 2011, 05:55:34 am »

Now what about programming theory?
Logged

Blank Expression

  • Bay Watcher
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #789 on: January 14, 2011, 01:58:04 pm »

What about it?
Logged

Supermikhail

  • Bay Watcher
  • The Dwarf Of Steel
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #790 on: January 20, 2011, 09:51:06 am »

I've got this problem with choice, aggravated by a problem with time. The choice includes three options: making my own physics engine, hacking a library from the Internet to fit my needs, and using the library from the Internet not fit for my needs very well. The problem with time is that I'd like to do one of them in the span of ten days, but my physics and math knowledge is very basic. Failing all of them, in that time, I would need to stretch the development over the course of a few months with random intervals as Uni allows.
What should I do?

The library I ideally need is 2D, has rigid body collision (essentially only circle-shaped), joints, and force fields. I'm afraid to get to it any way, because I can't estimate how much time that way would consume. Anybody worked with that?
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #791 on: January 20, 2011, 10:56:20 am »

Option 3. Then 2 if you have time left. Writing any kind of render/physics engine is time-consuming.
(IMHO)
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

ILikePie

  • Bay Watcher
  • Call me Ron
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #792 on: January 20, 2011, 11:58:06 am »

A physics engine only uses basic mechanics. I mean, collision is all Newton's/Hook's Laws.
Logged

eerr

  • Bay Watcher
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #793 on: January 20, 2011, 03:46:47 pm »

Out of curiosity, how precise does it need to be?

If momentum isn't perfectly conserved, ect,
Logged

Nadaka

  • Bay Watcher
    • View Profile
    • http://www.nadaka.us
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #794 on: January 20, 2011, 06:20:49 pm »

I've got this problem with choice, aggravated by a problem with time. The choice includes three options: making my own physics engine, hacking a library from the Internet to fit my needs, and using the library from the Internet not fit for my needs very well. The problem with time is that I'd like to do one of them in the span of ten days, but my physics and math knowledge is very basic. Failing all of them, in that time, I would need to stretch the development over the course of a few months with random intervals as Uni allows.
What should I do?

The library I ideally need is 2D, has rigid body collision (essentially only circle-shaped), joints, and force fields. I'm afraid to get to it any way, because I can't estimate how much time that way would consume. Anybody worked with that?

circle collisions are pretty easy. if the sum of the radius of the two circles are equal or less than the distance between the center, the circles are in contact. Unless you calculate angular momentum as well, the force and bounce physics are extremely simple vector math. Someone with some maths and programming skill could poop something like that out in a couple days. Joints? That might sounds like it will make things a little uglier.
Logged
Take me out to the black, tell them I ain't comin' back...
I don't care cause I'm still free, you can't take the sky from me...

I turned myself into a monster, to fight against the monsters of the world.
Pages: 1 ... 51 52 [53] 54 55 ... 78