Quantcast

Results 1 to 9 of 9

Thread: Programming: C++, Basic, Java, etc.

  1. #1
    Requiescat in Pace Master of Shinobi
    Join Date
    Jul 2009
    Posts
    1,117
    Rep Power
    21

    Default Programming: C++, Basic, Java, etc.

    Out of sheer curiosity, I've been trying to learn different programming languages. I thought, "This might be fun," and it was. I first wrote a simple program in javascript with help from a short tutorial. I managed to write this little turd:

    HTML Code:
    <html>
    <head>
    	<title>My_Functions_Script</title>
    	<script type="text/javascript">
    	
    		perfectNumber = 12
    
    		function checkPencils(numPencils)
    		{
    			if (numPencils == perfectNumber)
    			{
    				alert ("Way to go! That's just the right number of pencils one could have up one's nose.");
    			}
    			else if (numPencils > perfectNumber)
    			{
    				alert ("Okay, that might be a bit too many. You'd better yank some out before you suffocate.");
    			}
    			else if (numPencils < perfectNumber)
    			{
    				alert ("What! That's pathetic. You'd best start shoving some more up in there.");
    			}
    			else
    			{
    				alert ("What da heck ya talkin' bout, sister? I dudn't understands.");
    			}
    		}
    	
    	</script>
    </head>
    <body>
    	<h3>How many pencils are in your nose?</h3>
    	<form method="POST" name="pencilsForm" onSubmit="checkPencils(document.pencilsForm.numPencils.value);">
    		<input type="text" name="numPencils" id="numPencils" />
    		<input type="Submit" name="Submit" />
    	</form>
    </body>
    </html>
    You may notice that it looks a lot like a sample from a tutorial. That's because it is, just slightly modified. I've yet to write an original program.

    After I wrote that, I went five days without programming and forgot most of it. I've now tried writing code in Python, which is so much easier than javascript and seems way easier than most other programming languages.

    Right now, I'm still learning Python. Any tips for Python or suggestions for other programming languages? In retrospect, I probably shouldn't have learned Python so early since it is a lot simpler than Java or C++ so I kind of spoiled myself. Plus, Java is pretty much the industry standard from what I've heard.

    Does anyone else here do much in programming? Since my brother gave me a college textbook for learning Java, I think I'll dump Python and learn that instead. I might give some updates as to how much I've learned, but that may turn out to be too bloggy, so I probably won't.

    Anyway, if anyone one here has written programs or has a job writing programs, please do tell about it.

  2. #2
    Master of Shinobi
    Join Date
    May 2011
    Posts
    1,893
    Rep Power
    28

    Default

    I used to be awesome with basic back in the day...like 25 years ago...

  3. #3
    Ripped Emo Outrunner drunkex's Avatar
    Join Date
    Nov 2010
    Age
    42
    Posts
    492
    Rep Power
    16

    Default

    I always choke on my programming finals and bring down my grade

  4. #4
    Pirate King Phantar's Avatar
    Join Date
    Aug 2007
    Location
    Munich, Germany
    Age
    43
    Posts
    4,468
    Rep Power
    83

    Default

    So what kind of suggestions are you looking for? What are your aims? Could you be a little more specific?

    Python is a Great tool to create scripts, little program snippets with a very specific purpose. For example "once the program starts, create this specific pattern". This is Great for Beginners, and even later on it'll find lots of used, since creating and running programs is a pretty quick affair. I like to use Python scripts for renaming a batch of files after specific naming patterns, for example.

    If you want to create more complex programs (with a higher degree of interactivity once it's running for example), then you might opt for C(++) or Java. They are powerful, multi-purposed (mainly object-oriented) and Open up a greater Range of possibility. Java has the advantage of being not bound to a specific platform, making porting a program to another System much easier.

    Finally, if you're serious about it and want to create Browser-Based programs, i'd suggest having a good Look at HTML5, As this will quite possibly be the defining language of the near future due to its implementation of programming capabilities.
    The funny thing about an oxymoron is, even if you remove the ox, there'll always be a moron. The Question Remains: Y?

  5. #5
    Genesis Knight's Avatar
    Join Date
    Jun 2005
    Location
    North Carolina
    Posts
    5,904
    Rep Power
    60

    Default

    Yeah, like Phantar says it kind of depends on what you want to do. I'm finishing up a Computer Science and Math double major, and they've focused mostly on C-family languages and Java. C# is probably my favorite language right now - Java is so slow and waiting for VMs to warm up sort of sucks, but you can't beat it for portability. I'm an intern at a software development firm down here and they do all their business apps in C#. Visual Studio is a beautiful development tool and the documentation in MSDN is peerless - C# really is a beautiful language.

    But if you want to do games, even C# is too slow unless you're doing 'simpler' games. You'll need the raw speed of C or C++. (Although games can and have been written in any language - I wrote one last semester in Java, it just takes a powerful computer to run a fairly simple 2D game well.)

    I don't have much of a use for Python and other scripting languages right now, but that's just because I lack a specific use for them. One of my buddies is doing an iPhone frontend for EventGhost mostly in Python, so it's quite versatile.

  6. #6
    Hero of Algol Kamahl's Avatar
    Join Date
    Jan 2011
    Location
    Belgium
    Age
    33
    Posts
    8,637
    Rep Power
    145

    Default

    If you like python but want to do something serious, try boo:
    http://boo.codehaus.org/

    It's much more powerful (in the what you can do with it sense, it has macros, linq, etc..) and has much better performance. The basics are very similar to python so you should be good. Whatever Object Oriented Programming concepts you learn from it can easily be applied to Java and C#, making it a very useful learning tool. It has a lack of tutorials though.

    Boo is available as a programming language in Unity, a cross platform game engine:
    http://unity3d.com/

  7. #7
    Master of Shinobi SpaceFlea's Avatar
    Join Date
    Apr 2010
    Age
    39
    Posts
    1,811
    Rep Power
    45

    Default

    Quote Originally Posted by Genesis Knight View Post
    I'm finishing up a Computer Science and Math double major
    Looks like someone else enjoys vacationing in hell. I too went down the CS/Math double major road. CS was too easy and boring so I switched out all my free electives for advanced math classes. And, I'm glad to say I accomplished the task 5 years ago.

    As for industry standard. There really isn't one. The folks in academia are as out of tune with the world as the programs they have you write. I, for instance, work as a programmer at a major oil company. We use next to no Java. Our primary programming language is ABAP. It's the code behind SAP - the software that runs most large companies. But there are other programming positions within the company that revolve around C# and the like as well as things as basic as writing VBA macros in Excel. Again, there really isn't an industry standard. There are multiple options within individual companies. The fact is that Java is very malleable and actually quite easy to learn in terms of object-oriented programming. The way they teach programming in college though is not to teach you a specific language, but rather to teach you how to recognize situations and how to find a solution so that you may apply it to remedy a problem in any language in which you program for your career. It's flexibility is what drives its use in college.

    Programming is like cooking - if you learn a language you can program that language, but if you learn a technique you can program whatever you want. Just find something with which you are comfortable and develop good technique. You will be able to adapt to other languages as necessary. No need to "learn" them all - they will just fall into place like a puzzle that wants to be solved.
    Be Attitude For Gains!

  8. #8
    Requiescat in Pace Master of Shinobi
    Join Date
    Jul 2009
    Posts
    1,117
    Rep Power
    21

    Default

    Quote Originally Posted by Phantar View Post
    So what kind of suggestions are you looking for? What are your aims? Could you be a little more specific?

    Python is a Great tool to create scripts, little program snippets with a very specific purpose. For example "once the program starts, create this specific pattern". This is Great for Beginners, and even later on it'll find lots of used, since creating and running programs is a pretty quick affair. I like to use Python scripts for renaming a batch of files after specific naming patterns, for example.

    If you want to create more complex programs (with a higher degree of interactivity once it's running for example), then you might opt for C(++) or Java. They are powerful, multi-purposed (mainly object-oriented) and Open up a greater Range of possibility. Java has the advantage of being not bound to a specific platform, making porting a program to another System much easier.

    Finally, if you're serious about it and want to create Browser-Based programs, i'd suggest having a good Look at HTML5, As this will quite possibly be the defining language of the near future due to its implementation of programming capabilities.
    I'm not entirely sure what I'm aiming for at the moment. Right now, it's really just for the fun of it. Games are always an option. I'd be interested in how a simple sidescroller is put together. I probably won't do much of anything that's browser-based. Learning a bit of javascript was more of an introduction into programming than something I'd actually use.

    Right now, I think I'll go with Java since my brother has taken college classes on it and I'd have someone to talk to if I'm stumped with something. When I become comfortable with Java and know it fairly well, I think I'll switch over to C or C++ and try to program some simple games, unless it'd be better to start with C++ since that'd be what I'd use to make games. I really don't know since I started programming stuff only days ago.

  9. #9
    Grandmaster's Reckoning ESWAT Veteran Knuckle Duster's Avatar
    Join Date
    Dec 2005
    Location
    Canada
    Posts
    5,166
    Rep Power
    87

    Default

    Quote Originally Posted by NavesRegge View Post
    I'm not entirely sure what I'm aiming for at the moment. Right now, it's really just for the fun of it. Games are always an option. I'd be interested in how a simple sidescroller is put together. I probably won't do much of anything that's browser-based. Learning a bit of javascript was more of an introduction into programming than something I'd actually use.

    Right now, I think I'll go with Java since my brother has taken college classes on it and I'd have someone to talk to if I'm stumped with something. When I become comfortable with Java and know it fairly well, I think I'll switch over to C or C++ and try to program some simple games, unless it'd be better to start with C++ since that'd be what I'd use to make games. I really don't know since I started programming stuff only days ago.

    For anybody else interested in coding, check out the stanford videos on youtube or itunes.

    There are course materials linked in the description.



    Also check out: http://www.khanacademy.org/#computer-science

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •