Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 3 [4] 5

Author Topic: Learning Programming  (Read 4051 times)

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: Learning Programming
« Reply #45 on: June 14, 2011, 04:53:32 pm »

I just came upon Java2K.
Wat.
How do you?
I don't even?
Is it even turning complete if there is a chance some instruction never gets executed?
Logged

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: Learning Programming
« Reply #46 on: June 14, 2011, 04:55:47 pm »

Wait... I don't even... DAMMIT! I was going to need my brain today...

olemars

  • Bay Watcher
    • View Profile
Re: Learning Programming
« Reply #47 on: June 14, 2011, 04:57:06 pm »

Getting malicious site warnings on that link.
Logged

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: Learning Programming
« Reply #48 on: June 14, 2011, 04:59:59 pm »

Maybe http://www.esolangs.org/wiki/Java2K is better?


Edit: also AAAAAAAAAAAAAA!!!! is probably a good description of this language...

« Last Edit: June 14, 2011, 05:09:02 pm by Virex »
Logged

Azzuro

  • Bay Watcher
    • View Profile
Re: Learning Programming
« Reply #49 on: June 14, 2011, 09:11:33 pm »

Okay, I rewrote main.cpp to use "do while" and "switch" conditionals, and it still works.

Spoiler (click to show/hide)

However, there are a few things I'd like to ask. Is there another way I can achieve the same effect while not having so many layers of indentation? And when I enter in a character into the "choice" variable, the program seems to repeatedly go through the option() function again and again. I understand this is because choice is an integer variable that doesn't allow characters, but what else is causing the problem?
Logged

United Forenia Forever!

olemars

  • Bay Watcher
    • View Profile
Re: Learning Programming
« Reply #50 on: June 15, 2011, 03:23:48 am »

That's not really many levels of indentation. If a block of code gets long or unwieldy you can just make a separate function out of it.

I'm not sure I understand the problem you mention. You've explicitly made it ask again if the input isn't one of the five valid options, so isn't that what you expect? Could you post some example output?
Logged

_DivideByZero_

  • Bay Watcher
  • Not to be confused with infinity
    • View Profile
Re: Learning Programming
« Reply #51 on: June 21, 2011, 06:34:12 pm »

If it's worth anything, I learnt Game Maker first, the graphical bit, then moved on to C++.
C++ is not really bad in any sense, it just puts more responsibility on you.

I started off with game maker as well. I tried to learn C++... I switched to java.

I fully support learning Java first as it is simple to learn, but I'm not that good of a programmer in the first place. Good luck though!
Logged
Have I now become your enemy by telling you the truth? (Gal 4:16)

blackmagechill

  • Bay Watcher
    • View Profile
Re: Learning Programming
« Reply #52 on: June 22, 2011, 08:36:58 pm »

Nobody mentioned Ruby. D: Glyph Gryph is a pretty good ruby coder, and Ruby is really easy to learn, and has all of the bits other languages have, I think.I'm not sure, I dont know much of it, but it was pretty easy to pick up and has a lot of cool stuff.
Logged

Nadaka

  • Bay Watcher
    • View Profile
    • http://www.nadaka.us
Re: Learning Programming
« Reply #53 on: June 23, 2011, 09:58:55 am »

I just came upon Java2K.
Wat.
How do you?
I don't even?
Is it even turning complete if there is a chance some instruction never gets executed?

1: it is Turing complete, not turning.
2: yes it can be.
3: only problem is that ALL programs suffer from the halting problem instead of just a subset of them.
4: It isn't relevant but today happens to be the 99th birthday of Alan Turing.
« Last Edit: June 23, 2011, 10:05:15 am by Nadaka »
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.

vagel7

  • Bay Watcher
    • View Profile
Re: Learning Programming
« Reply #54 on: June 23, 2011, 12:20:32 pm »

I once tried, didn't follow through. But now I am taking IT as a side course in High School and I have 2 courses of programming there.(A lot of classes)
Logged
That last gobbo would stand there, missing an arm, punctured in a kidney, liver, and spleen, fading in and out of consciousness at the far end of where the drawbridge would go, and his last sight would be the drawbridge dropping down and smashing him like a bug.

God DAMN I love this game!

alfie275

  • Bay Watcher
    • View Profile
Re: Learning Programming
« Reply #55 on: June 23, 2011, 01:34:15 pm »

Azzuro, c++ ignores indentation. Also perhaps you could try and array of function pointers or operator objects? All you seem to be doing is calling functions.
Logged
I do LP of videogames!
See here:
http://www.youtube.com/user/MrAlfie275

McTraveller

  • Bay Watcher
  • This text isn't very personal.
    • View Profile
Re: Learning Programming
« Reply #56 on: June 24, 2011, 09:09:17 pm »

Hrm.  If you want to learn "programming" the first step is to learn how a computer works, and how to translate the problem you're trying to solve into a form that is suitable for solution by a computer.

A mistake I see people make is that they learn a programming language, rather than learning how to program.  If you learn how to program, it doesn't matter what language you use; the language just becomes a tool, and you learn which language is most suitable for a particular task.  If you don't understand how to think about problems "like a computer" then just focusing on, say, C# instead of Lisp is going to do you no good.

While people are indeed working to come up with "natural language computing," we're not there yet.  In fact, this is kind of a fruitless task in my mind: think about when you give instructions to another human and how they have trouble doing exactly what you thought you told them and instead do something else (that is, "natural language" is actually a pretty poor language to describe a specific task).

That said, if you really get to the point where you understand programming, you'll have a very valuable skill set - one that can't be outsourced.  Programming is much more than writing source code.  I suppose some people argue that I'm describing "software engineering" and not "programming" but I think part of the problem with software these days (for instance, go read thedailywtf.com) is because people no longer emphasize the importance of understanding and just want to get source code out the door as inexpensively as possible.
Logged
This product contains deoxyribonucleic acid which is known to the State of California to cause cancer, reproductive harm, and other health issues.

Duelmaster409

  • Bay Watcher
  • [DOES_NOT_FIGHT]
    • View Profile
Re: Learning Programming
« Reply #57 on: June 25, 2011, 01:57:57 am »

Anyone know any good 2D OpenGL tutorials out there? I don't want to toss $50 into a book if there's some good resources online somewhere.
Logged
Dwarf fortress: Teaching uni level geology to sadistic elf killers for years.

blackmagechill

  • Bay Watcher
    • View Profile
Re: Learning Programming
« Reply #58 on: June 25, 2011, 11:18:54 am »

So, after you pick up the language and the compiler/actual code thingy/whatever eventually you'll need an IDE. Netbeans is pretty nice, but does not support Ruby anymore, so, you'll have to find a way around that if you want to use it (which you probably won't).
Logged

alfie275

  • Bay Watcher
    • View Profile
Re: Learning Programming
« Reply #59 on: June 25, 2011, 12:21:42 pm »

Anyone know any good 2D OpenGL tutorials out there? I don't want to toss $50 into a book if there's some good resources online somewhere.
2D OpenGL is pretty much the same as 3D OpenGL, just set it to orthographic and maybe disable depth testing depending on how you want to handle it.
Logged
I do LP of videogames!
See here:
http://www.youtube.com/user/MrAlfie275
Pages: 1 2 3 [4] 5