Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 72 73 [74] 75 76 ... 91

Author Topic: Programming Help Thread (For Dummies)  (Read 100538 times)

My Name is Immaterial

  • Bay Watcher
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1095 on: June 27, 2013, 07:14:57 pm »

This is a stupid question, because either I am a stupid person, or Python is a stupid language, and I'm going to go back and learn Java again.

How do I start programming in Python? Where do I go to write, edit, and save a program/script/file/etc.? Or is that not how I use Python?

Edit: I'm using 3.3.2, and running Windows Vista(probably) or 7(less likely). (I've never cared enough to remember or look.)
« Last Edit: June 27, 2013, 07:23:16 pm by My Name is Immaterial »
Logged

Killjoy

  • Bay Watcher
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1096 on: June 27, 2013, 07:52:57 pm »

This is a stupid question, because either I am a stupid person, or Python is a stupid language, and I'm going to go back and learn Java again.
Python can be hard to grasp, as it is a very feature rich language. It is honestly harder to learn and use than Java, as it is much harder to actually make full use of python. Also, you can much easier code yourself into a corner because it does not enforce any particular coding style. So, by all means, if you find python too hard, go learn Java. Java is also a wonderful language for developing stuff.

How do I start programming in Python? Where do I go to write, edit, and save a program/script/file/etc.? Or is that not how I use Python?
You can do it in two ways really. But they are kinda intertwined for any serious development setting. Either you start the python shell, and program away. Or you create a text file with the .py file ending, and make python run it. If you have a python file called main.py, you run it by opening a terminal, and typing in "python" and the path to main.py and press enter. Like this:
python main.py

If you are using windows, you can press the windows key, type in cmd, enter and write "python" in the command line. This starts the shell, if you have python installed. Here you can type out any valid python program if you like. Or just fool around with what is the most advanced command line calculator thingy you will ever use. I often use this to explore python while I program.

Edit: I'm using 3.3.2, and running Windows Vista(probably) or 7(less likely). (I've never cared enough to remember or look.)
Eeh.. seriously? Are you sure you are actually using a computer? You might be using a toaster for all you know, as you don't seem to care about pretty basic things..
Logged
Merchants Quest me programming a trading game with roguelike elements.

My Name is Immaterial

  • Bay Watcher
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1097 on: June 27, 2013, 08:56:20 pm »

Its more of a waffle iron, but I get your point. I should rephrase that last part: I never remember when I look. (Note for the curious: It happens to run Windows 7. Maybe I'll remember this time.)

I appreciate the help. I think I'll go back to Java. My previous experience with Python about two and a half years ago was not what I got today.

JanusTwoface

  • Bay Watcher
  • murbleblarg
    • View Profile
    • jverkamp.com
Re: Programming Help Thread (For Dummies)
« Reply #1098 on: June 27, 2013, 10:10:31 pm »

How do I start programming in Python? Where do I go to write, edit, and save a program/script/file/etc.? Or is that not how I use Python?

On Windows and just starting out, you could definitely do worse than IDLE. Unless I'm sorely mistaken, it comes bundled with the Python installer, so you should already have it. And it has both a REPL (read-eval-print-loop, basically a console where you can type commands and just mess around) and a half decent IDE (although that's really one area that Java really excels is IDE support).

After that, most of learning any language is just messing around and building things. Find an online tutorial (I don't have any off the top of my head, but I can find one if you'd like) and use it to pick up the basic syntax. Then just choose some basic idea (avoid over complicated stuff, you'll get there) and just build something. Programming in any language really is easiest to learn by example / by doing.

Personally, I find that both Python and Java have crazy support all over the internet and libraries built in to do just about anything you might want to do. If they don't, chances are good someone has already written it. The only area that Java really has an edge in is GUI stuff, with Swing (as annoying as it can be) far better than Python's tk support (IMO).

This is a stupid question, because either I am a stupid person, or Python is a stupid language, and I'm going to go back and learn Java again.
Python can be hard to grasp, as it is a very feature rich language. It is honestly harder to learn and use than Java, as it is much harder to actually make full use of python. Also, you can much easier code yourself into a corner because it does not enforce any particular coding style. So, by all means, if you find python too hard, go learn Java. Java is also a wonderful language for developing stuff.

Interesting. I've always found rather the opposite. Python is so close to how most people write psuedocode that people tend to be able to grok it pretty easily while Java has crazy amounts of boilerplate for even the simplest things. To each their own I guess.
Logged
You may think I'm crazy / And I think you may be right
But life is ever so much more fun / If you are the crazy one

My blog: Photography, Programming, Writing
Novels: A Sea of Stars, Confession

Killjoy

  • Bay Watcher
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1099 on: June 28, 2013, 05:00:26 am »

This is a stupid question, because either I am a stupid person, or Python is a stupid language, and I'm going to go back and learn Java again.
Python can be hard to grasp, as it is a very feature rich language. It is honestly harder to learn and use than Java, as it is much harder to actually make full use of python. Also, you can much easier code yourself into a corner because it does not enforce any particular coding style. So, by all means, if you find python too hard, go learn Java. Java is also a wonderful language for developing stuff.

Interesting. I've always found rather the opposite. Python is so close to how most people write psuedocode that people tend to be able to grok it pretty easily while Java has crazy amounts of boilerplate for even the simplest things. To each their own I guess.
No you are correct, python is very easy to get into. But it is the harder language to master. Java is extremely easy to master, you have a handful of language features: objects, abstract objects, interfaces and inheritance, and you have almost covered everything java has to offer.

Python on the other hand offers tuples, objects, inheritance, closures, list/dict/generator comprehensions, some very weird default overloaded operators, a bunch of pretty cryptic list slicing/stepping, python 2.7 offers THREE different string types. Then there is the whole deal with python objects being glorified dicts and whatnot.

If you are a experienced python developer you can wield these features easily, but for any newcomer looking at code using any of these features you might as well be programming J (as in the terse J language, not java).

To that end Java is much easier.
Logged
Merchants Quest me programming a trading game with roguelike elements.

Mephisto

  • Bay Watcher
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1100 on: June 28, 2013, 07:06:35 am »

This is a stupid question, because either I am a stupid person, or Python is a stupid language, and I'm going to go back and learn Java again.
Python can be hard to grasp, as it is a very feature rich language. It is honestly harder to learn and use than Java, as it is much harder to actually make full use of python. Also, you can much easier code yourself into a corner because it does not enforce any particular coding style. So, by all means, if you find python too hard, go learn Java. Java is also a wonderful language for developing stuff.

Interesting. I've always found rather the opposite. Python is so close to how most people write psuedocode that people tend to be able to grok it pretty easily while Java has crazy amounts of boilerplate for even the simplest things. To each their own I guess.
Then there is the whole deal with python objects being glorified dicts and whatnot.

Can't you say that about almost any modern OO language (or OO features of a multi-paradigm language, as the case may be)? In JavaScript, objects literally are associative arrays.
Logged

Killjoy

  • Bay Watcher
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1101 on: June 28, 2013, 07:53:50 am »

Can't you say that about almost any modern OO language (or OO features of a multi-paradigm language, as the case may be)? In JavaScript, objects literally are associative arrays.
I meant to say that python classes are glorified dicts, not objects.

In ECMAScript you have objects, but not really classes, at least not yet? But their associative arrays can emulate classes pretty well.

Also, it is far from the case in most modern object oriented languages. Some go for the static route that means classes are essentially boxes of data, others go for the more dynamic approach where classes are essentially hashmaps, and everything is a reference.
Logged
Merchants Quest me programming a trading game with roguelike elements.

TolyK

  • Bay Watcher
  • Nowan Ilfideme
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1103 on: June 28, 2013, 03:11:37 pm »

Darn, I'm having a hard time installing the NeoAxis engine in Visual Studio under C++ or VB (I'd like to try without C# for now).
Neither english nor russian documentation is helping. :/
Logged
My Mafia Stats
just do whatevery tolyK and blame it as a bastard mod
Shakerag: Who are you personally suspicious of?
At this point?  TolyK.

Nrapturez

  • Escaped Lunatic
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1104 on: June 29, 2013, 09:14:26 pm »

Alright, so I have a question about which language to learn.

I eventually ( hopefully by the end of the year) want to be working on a game I have been planning for a few months. The basic ideas of my game will be randomly generated lands everytime you play, lots of customization, and pixeled graphics ( similar to those of minecraft). There will also be many npc's and maybe one day multiplayer. I know, high hopes  :) .

I dont expect to finish or even begin making the game as I am fairly new to coding.

The reason I ask which language to code in is because I just started c++ ( even though I have been told its not a good one to start with) and it is very complicated when I compared it to my friend who codes in java. So what should I use in a game like the one I hope to make. Also what compiler because as now everything im using is codeblocks.

Thank you!
Logged

Levi

  • Bay Watcher
  • Is a fish.
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1105 on: June 29, 2013, 09:25:31 pm »

Python is probably the easiest + most useful.  The language is relatively simple compared to most, but still powerful.  Debugging is also a lot easier as its a scripting language.
Logged
Avid Gamer | Goldfish Enthusiast | Canadian | Professional Layabout

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: Programming Help Thread (For Dummies)
« Reply #1106 on: June 29, 2013, 10:23:51 pm »

That's weird. Java and C++ have roughly the same level of complexity.
If you want a 3D game, you've either have a long way to go OR you could use Unity :D
I haven't tried it, but it uses a beautiful and easy to learn language called C#, and it makes doing 3D graphics so much easier.

Python also works. I recently learned you can do OpenGL stuff from it o_O
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

Killjoy

  • Bay Watcher
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1107 on: June 30, 2013, 07:37:17 am »

Python is probably the easiest + most useful.
Python is easy to get into, but no easy to learn. Heck, after using it for about a year professionally I am still finding new features. Don't let the relatively simple syntax fool you, there is actually a surprising amount of depth to python.

Don't get me wrong, I love python a lot. It is a fun and good language for fooling around and developing stuff. But it is not easy to master. That said, you will get into it pretty quickly and get some stuff running and working relatively fast.

That's weird. Java and C++ have roughly the same level of complexity.
No, C++ is infinitely more complex than Java has ever been.

C++ is in many ways a weird language. Never has a language been so needlessly complex to implement. Some friends of mine studying programming languages, implemented a compiler for C++ for "fun". They had the language specification, a massive tome of a book. Still they have to actually email Bjarne asking about specific language details. This just does not happen with more mature and modern languages.

C++ is also very feature rich compared to Java. Java is a lot of boiler(easy to avoid using a good IDE) but very little syntactic sugar to actually consider and learn.

Python also works. I recently learned you can do OpenGL stuff from it o_O
OpenGL has bindings to everything.
Logged
Merchants Quest me programming a trading game with roguelike elements.

MorleyDev

  • Bay Watcher
  • "It is not enough for it to just work."
    • View Profile
    • MorleyDev
Re: Programming Help Thread (For Dummies)
« Reply #1108 on: June 30, 2013, 07:55:08 am »

Most of C++'s weight is from the backwards C compatibility. Personally I do wish the D programming language had took off more, it has a lot of C++'s advantages whilst loses the guff from C. It's a very good middle ground between Java/C# and C++.
« Last Edit: June 30, 2013, 08:56:20 am by MorleyDev »
Logged

Normandy

  • Bay Watcher
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1109 on: June 30, 2013, 04:58:25 pm »

Ah, the D programming language. I think it was pretty clever but since most people that need a statically compiled language are dependent on using C/C++ anyways, it never really had a niche to grow in.

Also, while backwards C compatibility is responsible for no small amount of C++'s headaches (particularly the decades old compilation model...), it's hardly the biggest source of them. Between multiple inheritance, templates, operator overloading, and C++11/14 lambdas and autos and whatnot, the least of C++'s worries is from backwards C compatibility.
« Last Edit: June 30, 2013, 05:00:38 pm by Normandy »
Logged
Pages: 1 ... 72 73 [74] 75 76 ... 91