Jump to content

Recommended Posts

Posted

I really want to learn to program, My biggest block has just been figuring out which language to actually use. I've heard a lot of bad things about java, I've heard a lot of limitations of python as far as games go. The only thing that I have found so far, That is powerful, Cross plateform, And able to do pretty much everything I'd want to do early on, And later on too.

 

Is C, Now, I know there is C, C++ and C#, I am not entirely sure of the differences. I have done a little bit of research, And I think C++ is the best to go with. If you have any suggestions, or reading material, Please tell me, I don't want to get inmeshed into something which turns out to be a total waste of time. As in, I don't want to waste hours and hours of time learning all about one langauge which is not the right one.

Posted

As always; it depends on what type of programs you want to make. ;) Desktop apps? Android/iOS apps?

 

I would probably recommend C#. While Java is best known for its portability, C# has good support on Windows, Linux, Mac, and even mobile phones and some embedded systems. But the best thing about C# is probably to be able to develop your code using Visual Studio (2012), no other IDE comes near it in terms of functionality, debugging tools and rapid development. C# is also easy to learn, fairly quick in terms of performance, and comes with tons of ready-to-use libraries and classes/components that saves you loads of work. It looks nice, is easy to read, has good type safety and many really neat features like generics and Linq.

 

C is old fashioned, no real need to bother with that. C++ is a superset of C, so basically it contains everything from C plus(plus) some extras. If you really want to make a career in programming it's great to know the low-level stuff from C/C++ to get a better understanding of what's really happening "under the hood" of more high-level languages, but you probably won't need that for some time to come. Maybe a quick peek on the details of pointers and memory allocation would be useful.

 

Oh, and don't worry too much about wasting time learning the "wrong" language - once you've learned one of them the others are mostly variations on syntax and minor details.

Guest darkskyabove
Posted

Visual Studio (2012), no other IDE comes near it in terms of functionality, debugging tools and rapid development.

I must take a slight exception to that. If you use Windows, it's dead on. But not everyone does, or should, use Windows. I use KDevelop with Linux, and I think it matches up pretty darn good to VS.

Oh, and don't worry too much about wasting time learning the "wrong" language - once you've learned one of them the others are mostly variations on syntax and minor details.

Exactly right. The important thing, especially in the beginning, is to learn the basics. Once you understand how code generally flows, learning a new "language" is not that difficult.

 

Notice I said "once you understand". Keep in mind that it does take quite a bit of work. I don't want to be negative, just realistic. As an example, many years ago I was enrolled in a C++ class in college. On the first day of class, the room was packed with not only enrolled students, but standing room only for those who thought they could add the class. Day 1 = 60 people. At the end of the semester a grand total of 6 people finished the class. And of those, probably only 3 were competent enough to pursue programming as a career.

 

If you choose to pursue this, whether for personal, or professional, reasons, it will require a boat-load of dedication, and the ability to rise above adversity. I wish you well.

Posted

Okay, Thank you all! But, Can you tell me a little more about the difference between C++ and C#? I know C is really old, So, Why is it even mentioned anymore? I don't know what I'll make, I plan on practising by making simple things, Like, Hello world, text parsers, Simple games, Etc. I do plan to work on the netsukuku project, Which runs on linux, And routers, It will need to be ported to mobile devices, Windows, And Mac though. Besides doing that, I don't see myself doing much on mobile devices.

 

I might do that later, In which case, I'd learn a language for that. Do you, By any chance, Know which language would be apt for that?

Posted

Programming is a skill that is largely self-taught.  As with anything in America, you're on your own kid.  Learn Java because this is what is taught at nearly every intro to programming class, of which you'll be doing 15 hours a week in homework.  People drop out.  It's hard. 

Posted

I know C is really old, So, Why is it even mentioned anymore?

 

Most micro-controllers are programmed in C. There are technical reasons for this, such as: speed; size; and stability. There are practical reasons, such as: micro-controllers applications tend not to need any of the extended functionality of C++; and micro-controllers that use C exclusively are inexpensive.

 

Programming is a skill that is largely self-taught.  As with anything in America, you're on your own kid.  Learn Java because this is what is taught at nearly every intro to programming class, of which you'll be doing 15 hours a week in homework.  People drop out.  It's hard. 

 

Though I didn't attend any higher level course in programming, the impression I got in talking to those that were was that: most people weren't very competent in their basic understanding; or that the teacher would design a course that nobody could pass and that you wanted to avoid these teachers at all cost.

Posted

Yesh, Thank you ^-^

 

 

Most micro-controllers are programmed in C. There are technical reasons for this, such as: speed; size; and stability. There are practical reasons, such as: micro-controllers applications tend not to need any of the extended functionality of C++; and micro-controllers that use C exclusively are inexpensive.

 

 

Though I didn't attend any higher level course in programming, the impression I got in talking to those that were was that: most people weren't very competent in their basic understanding; or that the teacher would design a course that nobody could pass and that you wanted to avoid these teachers at all cost.

Do any of you have any recomendations on how to learn C#?

Posted

http://msdn.microsoft.com/en-us/vstudio/hh341490.aspx

http://channel9.msdn.com/Series/C-Sharp-Fundamentals-Development-for-Absolute-Beginners

http://www.microsoftvirtualacademy.com/m/tracks/developer-training-with-programming-in-c

 

Here are some quick things I found in a google search. Apparently codecademy doesn't have C#. My biggest recommendation for learning a language would be to study up on the basics and then start to build something. Nothing is a stronger motivator for learning advanced concepts than to want to do something an not knowing how. Then you can search online or join forums and figure out how to do it until you reach the next problem. At least that is my method. Google and the Internet are the best programming resources.

Posted

It really depends on what you want to build with the programming language. There are primarily two types of programming languages: compiled and interpreted. Compiled languages (C, Python, Java etc) are harder to get into, but the programs you make will run WAY faster and you can even create interpreted languages with them. Interpreted languages (PHP, javascript, Ruby etc) are way easier to get started using and is what I work in. It's not considered programming by some snooty, more hardcore programmers, but you can do almost as much in an interpreted language as you can in a compiled language. You can write javascript right now in your browser. Just open up the console (firefox)(chrome) and type:

alert('it worked!');

Hit enter and you get a dialog box.

 

If you want to work in web development (like me!) then you are better off using interpreted languages for sure. You can write some cool stuff on your server in compiled languages like low latency responses to build chatrooms on top of, but anything you can think of you can probably accomplish in a language like PHP or javascript.

 

The way I learned them was by diving in headfirst and fiddling around with it. Any problems I run into I can almost always find someone else who had the same problem and a series of proposed solutions on the Q/A site Stackoverflow.com

 

There is also Team Treehouse which has a whole lot of courses to teach people web development for cheap. I've only heard good things about it.

 

I think it's best to put as little in between yourself and seeing the results of your work as possible. Programming is hard, but it can/should be enjoyable. Having to figure out how to build and execute your programs can be relatively easy, but if you're just starting out with programming, then I would highly recommend something like javascript because you can do it immediately and it's increasingly being used to replace things that java and other languages used to do (for good reason: it's an awesome language).

Posted

It really depends on what you want to build with the programming language. There are primarily two types of programming languages: compiled and interpreted. Compiled languages (C, Python, Java etc) are harder to get into, but the programs you make will run WAY faster and you can even create interpreted languages with them. Interpreted languages (PHP, javascript, Ruby etc) are way easier to get started using and is what I work in. It's not considered programming by some snooty, more hardcore programmers, but you can do almost as much in an interpreted language as you can in a compiled language. You can write javascript right now in your browser. Just open up the console (firefox)(chrome) and type:

alert('it worked!');

Hit enter and you get a dialog box.

 

If you want to work in web development (like me!) then you are better off using interpreted languages for sure. You can write some cool stuff on your server in compiled languages like low latency responses to build chatrooms on top of, but anything you can think of you can probably accomplish in a language like PHP or javascript.

 

The way I learned them was by diving in headfirst and fiddling around with it. Any problems I run into I can almost always find someone else who had the same problem and a series of proposed solutions on the Q/A site Stackoverflow.com

 

There is also Team Treehouse which has a whole lot of courses to teach people web development for cheap. I've only heard good things about it.

 

I think it's best to put as little in between yourself and seeing the results of your work as possible. Programming is hard, but it can/should be enjoyable. Having to figure out how to build and execute your programs can be relatively easy, but if you're just starting out with programming, then I would highly recommend something like javascript because you can do it immediately and it's increasingly being used to replace things that java and other languages used to do (for good reason: it's an awesome language).

*nods* That definitely sounds good! I think I could be a pretty good programmer, I might get into web development, But, Not for a while. It's not something I really care about, I'd probably just do a little exploration into it when I need to create a website for myself. If that ever comes, That is. I'll want to do things like, Work on netsukuku, Maybe make mods for games like Skyrim, Port things, Work on meshnets of all sorts, Maybe make some game.

 

I do hold cross-platform as a necessity though, Everything I make I want to be cross-platform. ESPECIALLY to linux, That would probably receive priority.  I'd probably first write Hello World, And then expand that into something which extracts your name, Then to a text parser. After that, I'd probably work on some sort of a simple game to learn more things, I'd work on GUI stuff, I'd probably work on a networking client to connect two computers, And share packets.

 

I'd do very simple straight forward versions of what I will be actually focusing on for practise, It sounds good to me. From my research, I think C++ will be best, However, I am not sure. Others have advised me to use C#, But, I think that would require .NET/Mono, Which, I wouldn't really want to use, Really, I want to keep the additional installation to a minimum. Plus, I don't really like microsoft either, Anyway, What do you think?

Posted

Here's what I think:

 

I do web development because I think it's the most interesting field there is. Javascript (which is the primary language I write) is the most popular language in the world, and I think that's because it's so powerful and simple. It's actually a joy to write for me because you can do it anywhere very easily and you can write it for anyone with a browser. You don't have to compile it, you aren't confined to running executables, it just simply works. It makes it so that testing and developing are nearly the same thing. It's instantly gratifying and it can do almost anything other languages can do.

 

As far as Microsoft goes, I actually really like them. The patent trolling and the ridiculous adherence to proprietary software bothers me, but generally they add a lot to the industry. Even in web development where nearly everyone hates Internet Explorer, they are responsible for so much of the progress in browser development. Microsoft gets a bad rap, I think. I use very few Microsoft products, but I think they are more good than bad. (That's just my opinion based on how Microsoft affects me personally.)

 

And btw, I think it's totally awesome you want to get into programming. It's a great industry, mostly free market, growing and changing quickly and does a lot to actually help people. Good for you :)

Posted

Here's what I think:

 

I do web development because I think it's the most interesting field there is. Javascript (which is the primary language I write) is the most popular language in the world, and I think that's because it's so powerful and simple. It's actually a joy to write for me because you can do it anywhere very easily and you can write it for anyone with a browser. You don't have to compile it, you aren't confined to running executables, it just simply works. It makes it so that testing and developing are nearly the same thing. It's instantly gratifying and it can do almost anything other languages can do.

 

As far as Microsoft goes, I actually really like them. The patent trolling and the ridiculous adherence to proprietary software bothers me, but generally they add a lot to the industry. Even in web development where nearly everyone hates Internet Explorer, they are responsible for so much of the progress in browser development. Microsoft gets a bad rap, I think. I use very few Microsoft products, but I think they are more good than bad. (That's just my opinion based on how Microsoft affects me personally.)

 

And btw, I think it's totally awesome you want to get into programming. It's a great industry, mostly free market, growing and changing quickly and does a lot to actually help people. Good for you :)

^-^ Definitely! Thank you! Yesh, That does make sense what you wrote. I will think about it, But, Over all, I'm basically kinda stuck between C++ and C#, So, Can you help me be more certain of which to go with? Because, I will go all into this language, And it will be frustrating if it is sub-par.

Posted

I think another important factor if you are going to choose between two options is the libraries and frameworks available in those languages. When I started learning javascript, what I was really learning more was the jQuery library and less about the intricacies of the language itself. Now I know the language a lot better, but I'm still relying heavily on frameworks (like AngularJS) and libraries to get things done.

 

I don't actually know a whole lot about the C languages, but the big framework for C# seems to be the .NET framework, and C++ programmers seem to like Qt and Boost (both of which are mostly cross platform).

Posted

I think another important factor if you are going to choose between two options is the libraries and frameworks available in those languages. When I started learning javascript, what I was really learning more was the jQuery library and less about the intricacies of the language itself. Now I know the language a lot better, but I'm still relying heavily on frameworks (like AngularJS) and libraries to get things done.

 

I don't actually know a whole lot about the C languages, but the big framework for C# seems to be the .NET framework, and C++ programmers seem to like Qt and Boost (both of which are mostly cross platform).

*nods* I'll have to look into that, I know I have had good experiences with QT, I know it runs on Linux fine, And I know it runs on Windows, I think it runs on mac OSX too. Why do you have to rely so much on the libraries?

Posted

Why do you have to rely so much on the libraries?

One of the bigger reasons that I rely so heavily on libraries (like jQuery) is because of cross browser inconsistencies that jQuery smooths out, and because there are a lot of situations where it's overly difficult to do something that really should be simple like sliding down this reply box. That involves creating new elements on the page and gathering height information on it in order to make the animation look smooth. Using jquery it's just:

$('#my_reply_box').slideDown('fast');

I also rely heavily on the javascript framework AngularJS (by Google) because it provides a really nice structure for larger projects. When I was starting to build larger and larger projects I was falling all over myself, unable to find elegant ways of not repeating myself and afraid of updating one section of code which had unintended consequences on another block of code. That is somewhat to do with the nature of javascript itself being so unstructured. There are no classes (in the programming sense) in javascript like there are in the C based languages and it's much easier to write very bad code as a result.

 

If you are doing smaller projects, you don't really need to worry about these things as much, but once things start to get bigger there are some important principles you kind of have to have in order to have a code base you can maintain and build upon, so that you aren't pulling your hair out fixing bugs or adding new features. A framework (as opposed to a library) should ideally make that part of your development a lot easier so you can focus more on the particulars of your project.

 

Also there are often job postings for programmers that require you to know a particular library/framework so that if you get hired, your whole team is speaking the same language (no pun intended). It was a huge thing for a while to get Ruby developers who knew the Rails framework, and C# developers who knew .NET. I actually got the job I have now because I knew the PHP framework CodeIgniter (and also because I'm so delightful to work with :)).

Posted

One of the bigger reasons that I rely so heavily on libraries (like jQuery) is because of cross browser inconsistencies that jQuery smooths out, and because there are a lot of situations where it's overly difficult to do something that really should be simple like sliding down this reply box. That involves creating new elements on the page and gathering height information on it in order to make the animation look smooth. Using jquery it's just:

$('#my_reply_box').slideDown('fast');

I also rely heavily on the javascript framework AngularJS (by Google) because it provides a really nice structure for larger projects. When I was starting to build larger and larger projects I was falling all over myself, unable to find elegant ways of not repeating myself and afraid of updating one section of code which had unintended consequences on another block of code. That is somewhat to do with the nature of javascript itself being so unstructured. There are no classes (in the programming sense) in javascript like there are in the C based languages and it's much easier to write very bad code as a result.

 

If you are doing smaller projects, you don't really need to worry about these things as much, but once things start to get bigger there are some important principles you kind of have to have in order to have a code base you can maintain and build upon, so that you aren't pulling your hair out fixing bugs or adding new features. A framework (as opposed to a library) should ideally make that part of your development a lot easier so you can focus more on the particulars of your project.

 

Also there are often job postings for programmers that require you to know a particular library/framework so that if you get hired, your whole team is speaking the same language (no pun intended). It was a huge thing for a while to get Ruby developers who knew the Rails framework, and C# developers who knew .NET. I actually got the job I have now because I knew the PHP framework CodeIgniter (and also because I'm so delightful to work with :)).

 

*nods* Aww! That is great! I'm glad you got that job! That is interesting what you said about libraries, Are they like a pre-defined way to do things? 

Posted

*nods* Aww! That is great! I'm glad you got that job! That is interesting what you said about libraries, Are they like a pre-defined way to do things? 

 

Thanks!

 

And yea, that's a big part of it. A good library should also make you have to type less code to accomplish what you want, should be more declarative so it's easier to read what you are doing with that code and it should conform to best practices to encourage the developer to write better code, so that something like this:

 

var AnimationStep = 10; //pixelsvar AnimationInterval = 100; //millisecondswindow.onload = function() {   var oDiv = document.getElementById("Div1");    oDiv.style.display = "block";    var height = oDiv.clientHeight;    oDiv.style.height = "0px";    Animate(oDiv, height);};function Animate(element, targetHeight) {    var curHeight = element.clientHeight;    if (curHeight >= targetHeight) return true;    element.style.height = (curHeight + AnimationStep) + "px";    window.setTimeout(function() {    Animate(element, targetHeight);}, AnimationInterval);    return false;}

becomes more like this:

$(element).animate({    height: element.height()}, 500);

It's much easier to see what is being accomplished here and it's much easier to remember.  It's more enjoyable to write code like this.

 

It can be overwhelming a lot of the time trying to make things work as a programmer, so whatever we can do to make it easier on ourselves is important. And that's why I use libraries.

Posted

Thanks!

 

And yea, that's a big part of it. A good library should also make you have to type less code to accomplish what you want, should be more declarative so it's easier to read what you are doing with that code and it should conform to best practices to encourage the developer to write better code, so that something like this:

 

var AnimationStep = 10; //pixelsvar AnimationInterval = 100; //millisecondswindow.onload = function() {   var oDiv = document.getElementById("Div1");    oDiv.style.display = "block";    var height = oDiv.clientHeight;    oDiv.style.height = "0px";    Animate(oDiv, height);};function Animate(element, targetHeight) {    var curHeight = element.clientHeight;    if (curHeight >= targetHeight) return true;    element.style.height = (curHeight + AnimationStep) + "px";    window.setTimeout(function() {    Animate(element, targetHeight);}, AnimationInterval);    return false;}

becomes more like this:

$(element).animate({    height: element.height()}, 500);

It's much easier to see what is being accomplished here and it's much easier to remember.  It's more enjoyable to write code like this.

 

It can be overwhelming a lot of the time trying to make things work as a programmer, so whatever we can do to make it easier on ourselves is important. And that's why I use libraries.

*nods* That sounds interesting! And that does sound a lot easier! Also, I was able to understand some of the code in what you sent. So is a library kind of like a game engine?

Posted

*nods* That sounds interesting! And that does sound a lot easier! Also, I was able to understand some of the code in what you sent. So is a library kind of like a game engine?

 

Javascript doesn't really do video games very well, but there are game engine libraries for javascript (ex CraftyJS). So a game engine is an example of a kind of library. A library is really just a collection of methods designed to make whatever it's designed for easier (and for code re-use). So there are libraries for grabbing dates and formatting them, there are libraries for for making graphs and presenting data, there are libraries for manipulating, sorting and looping through arrays (you get the picture).

 

Frameworks, game engines, plugins, API's etc are basically just different kinds of libraries. At least that's how I understand it.

Posted

Javascript doesn't really do video games very well, but there are game engine libraries for javascript (ex CraftyJS). So a game engine is an example of a kind of library. A library is really just a collection of methods designed to make whatever it's designed for easier (and for code re-use). So there are libraries for grabbing dates and formatting them, there are libraries for for making graphs and presenting data, there are libraries for manipulating, sorting and looping through arrays (you get the picture).

 

Frameworks, game engines, plugins, API's etc are basically just different kinds of libraries. At least that's how I understand it.

*nods* That is interesting, Thank you! What differentiates java from javascript?

Posted

*nods* That is interesting, Thank you! What differentiates java from javascript?

 

Lol. A whole heck of a lot, actually. There's a quote I heard recently by a javascript developer that I liked: "Java is to Javascript as ham is to a hamster".

 

In terms of web development, Java is either run on the client side via a plugin (those annoying "update your Java" messages) (kinda like Flash) or it's on the server generating responses or doing something with the files on that server.

 

Java is also used a lot for desktop applications. The Android OS is written in Java and it's apps are written or translated into Java (I think). I have never written a single line of Java and am certainly no expert.

 

Javascript is run directly in the browser. All major browsers have their own implementation of Javascript with their own quirks, but abide by the standards body ECMA. Flash's Actionscript is actually based on the same standards and is a very similar language.

 

The user interfaces on this message board are written in Javascript because Javascript is the only scripting language the browser will run without some sort of plugin.

 

Java's structure is class based while Javascript's is a prototypal model which means that everything is an object and can inherit from any other object. It is the programming language of the web.

 

Assuming it's not server-side javascript, it's all open source and you can manipulate it in the browser (with some kind of developer tool). This is the link to the javascript that runs this page we're on now:

http://board.freedomainradio.com/public/min/index.php?ipbv=2dbc154af1f1954084ec94443e4c1350&charset=UTF-8&f=public/js/ipb.js,cache/lang_cache/2/ipb.lang.js,public/js/ips.hovercard.js,public/js/ips.quickpm.js,public/js/ips.sharelinks.js,public/js/ips.textEditor.bbcode.js,public/js/ips.textEditor.js,public/js/ips.topic.js,public/js/ips.like.js

Based on the way the url looks, it's safe to assume that it goes to a place on the server that responds back with a list of different javascript files (.js). The reason that people do this sort of thing is because to load all of them individually would be a lot of requests that we would have to wait on before the javascript could finish parsing. (Performance is a big concern when you write Javascript.)

 

Hope that helps. I wish I knew more about Java to provide a clearer answer.

Posted

*nods* That is interesting! I'm really glad to see programmers on here! Okay, So, What would I need in order to build a networking program? I plan to work on netsukuku, So, Networking will be important to me. (I think networking is pretty important, If you just buy a computer, It's pretty pointless without the internet. And, Of course, Networking is important in the relationship sense with other people, Which the internet also provides! ^-^)

Posted

What would I need in order to build a networking program?

 

Working with different protocols (like HTTP) is generally considered incredibly difficult and tedious, so I would suggest using a library. The Kryonet library for Java is supposed to be good if you plan to use TCP or UDP.

 

I don't know how P2P works much less how these crazy cool alternate internet projects work, like Netsukuku. It's a really interesting and ambitious project, but it's way over my head :)

Posted

Working with different protocols (like HTTP) is generally considered incredibly difficult and tedious, so I would suggest using a library. The Kryonet library for Java is supposed to be good if you plan to use TCP or UDP.

 

I don't know how P2P works much less how these crazy cool alternate internet projects work, like Netsukuku. It's a really interesting and ambitious project, but it's way over my head :)

*nods* Yeah! It is really interesting! Hmm, I know a bit more, But, I dunno where to start with coding though.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.