Quantcast

Jump to content


Photo

Getting started with programming.


  • Please log in to reply
37 replies to this topic

#1 Atonomous

Atonomous
  • 28 posts

Posted 05 April 2010 - 01:37 PM

After many years of being a programmer, I have gained quite a bit of knowledge. As of now, I can emerge myself in any new programming language and become proficient in it within 3 days of using it. I just learned java recently and I find it to be a great higher level language to use for botting and such. If you're interested in learning to program at all, you must understand a bit of why you would want to pick what programming language for what situation.

PHP
The only reason you would ever use the PHP programming language is for web development. I most situations involving the internet, you'll have no choice... this is also not an easy to master programming language. You can't even be proficient in it without learning MySQL and HTML. There are even more things to know, like javascript, if you want to make a really fancy website. I highly recommend this as a starting language to learn, but there are a lot of web developers that just can't grasp the concepts behind C and C++ after learning such a simple way of programming.

C
Not to be confused with C++, C does not have object orientation. Open source applications made in C are much easier to understand and it's choice for open source developers. It is just as powerful as C++. Secretly you do not really need the wrappers for object orientation. C is commonly faster than C++ and also it is normally used only when you have large numbers to crunch. Mathematical computations that really need the resources would be the only thing you would need to go to C for, such as an MMORPG with high end 3D graphics. Downsides include having to compile on every OS you want your program to run on.

C++
Same comments as C, but I don't like the object orientation personally. You will run across a lot of APIs that do not have good documentation and are not open source. It has irked me so much when I came across undocumented APIs.

C#
This is a great programming language on the same level of java, but if you really look into it and understand how it works, you will realize java is what C# wants to be. The standards and syntax are easy to follow, but if you ever plan to do anything cross platform compatible, be weary. C# currently has mono which allows Linux and Mac OS X users to use C# applications written with GTK, but never trust Microsoft, they really want to ruin anything that allows other operating systems to function in synchronous.

Anything .NET
.NET framework was great to the extent that it allowed developers to make, but it is only a microsoft friendly idea. Microsoft does not support open source development, they only support Microsoft development so they can say "Hey! We have everything!"


Visual Basic (Previous to v6/v6/.NET)
Visual Basic was great. The syntax is quite familiar to basic users. The downside to visual basic is the fact is is "visual" and proprietary to windows. Sure, you can WINE most of the stuff preceding .NET, but it doesn't change the fact that it is not cross platform compatible by default.

Assembly
This is the closest you can get to making logic gates on a circuit board as possible. There are various reasons you're probably not going to use assembly. The key one being the deep understanding that it requires just to make a conditional statement. The second reason is that it takes a lot of code to do the little work you need it to do. That being said, it's a great language, but I wont even go there.

Java
Developed by Sun Microsystems, java has fully open source interpreters and APIs. You can make anything in java, just don't dream of using it for mathematical operations that require heavy processor usage, like a 3D API. You would want to make an API binding for it in C. With the netbeans IDE, you get just as much functionality as Visual Basic or any Microsoft Visual Programming tool. I have had some of the greatest experiences ever with java, personally. You get full cross-platform compatibility with java, because there will always be a version of the java interpreter compiled for every operating system you would need. It is extremely powerful, I have seen x86 emulators made in java.

Python
It's free, open source, and such. I don't know much about it, but I have used it. I wouldn't rely on it for GUI applications, but I have seen wonderful stuff programmed in it. I wouldn't rely on it for anything more than I would rely on java for. If you want to learn it, get a copy of the interpreter from http://www.python.org/download/. It is cross-platform compatible and easy to learn as well. The downside is that you can compile your source to a byte code, but you might as well license anything you create as "open source".

There are other programming languages out there, but I'm just not going to cover them. These are the biggest programming languages you'll have to deal with these days. Now for some information on getting started. I am only going to get you started in C++, Java, and Python.

Getting Started In C++
Get a copy of DevCpp (go to binaries folder and download a version) for windows or if you're in linux, get a copy of g++ from your repository. DevCpp is straight forward to use. If you're using G++, you have to type in terminal "g++ sourcefilename.cpp". There are standards of programming in C++, which are dictated by ANSI or something like that. You can learn about C++ at CPlusPlus.com. Their tutorials follow the ANSI standards.

Getting Started In Java
You are in luck here! Not only do I have a great book for getting started, but I'll even explain the compiling process as well as a simple example of how to login to neopets (attached below as Neus-Lite.zip)! What you're going to do is simply compile and run the example. You need to first download the java development environment. Go here, get and install it. Now open command line, terminal, or whatever your OS calls it. Use the command cd like so: "cd path/to/directory/of/neus-lite/" (in windows you might need C:/ in front of it). After you change directory to the directory of the example, type in "javac login.java httpWrapper.java" or "javac *.java" the asterisk is a wild card meaning it can be anything. The command will compile the login example. To run the example, type in the command "java login". Even though the filename is login.class, java kinda just uses all the class files as if they were just extending the java executable. Anyways, no need for technical stuff. That is what it takes to get started in java. Now to learn java, go download the "How to think like a computer scientist, Java Edition" from here and read it in a PDF reader.

Attached File  Neus-Lite.zip   3.96KB   6 downloads


Getting Started in Python
Get a copy of the interpreter from the python website and a copy of the "How to think like a computer scientist, Java Edition" e-book from here. I do not feel like going through the technical knowledge of how to use it, but I guess I will. Make a file labeled "file.py" and write the hello world example from the book into the file. In windows, open it with the python interpreter. In other operating systems go to terminal and change the directory to where your file is and type "python file.py" It has been forever since I done this, so I can't guarantee the accuracy of this information. Though I can promise the python interpreter and book are sound.

Anyways, concluding my post, I end with "have fun folks".

#2 kiddX

kiddX
  • 606 posts

Posted 05 April 2010 - 01:40 PM

Good job. Python is actually very simple to start with - I would say even easier than Java.

#3 Atonomous

Atonomous
  • 28 posts

Posted 05 April 2010 - 06:09 PM

Good job. Python is actually very simple to start with - I would say even easier than Java.


I recall issues with the ease of use after getting into the GUI components. The e-book that I posted for Python does cover GUI's, but I found that it is just easier to drag, drop, and click to design the UI. Also, spacing in place of tabs is kinda weird to me... That was the biggest reason I never really got too much into it. I find that a lot of people defend it with the fact google uses it, but I find it to be an obsolete rational train of thought. Google uses Python because that is what they chose. Python is slower than java, but it has productivity gain. Ruby has just as much productivity gain as python and ruby is also known to run at similar speeds. I would pick ruby over python simply because of the syntax, but that is a personal preference. I guess for some people the spaces instead of tabs thing wouldn't be too much of a problem.

#4 Josh

Josh
  • 318 posts

Posted 11 April 2010 - 05:04 PM

You missed my two favorite languages, Ruby and D :D

#5 artificial

artificial
  • 186 posts


Users Awards

Posted 11 April 2010 - 05:32 PM

Lol, D.

As for Google using Python, last I heard they now employ the creator of Python, becoming a stakeholder and hence more inclined to use it.

The information you have posted, while useful, is incredibly subjective, and often completely wrong. With PHP, you state:

there are a lot of web developers that just can't grasp the concepts behind C and C++ after learning such a simple way of programming.

Yet you go on to say:

Visual Basic was great. The syntax is quite familiar to basic users.


C and C++ is usually an entry language in itself, however familiarizing yourself with the PHP syntax would be a huge advantage prior to learning the two languages; far better then Visual Basic, at least. Moreover, PHP is programmed in C. If you were to master PHP, as you put it, like you said you would have dabbled with database interaction, low level languages such as html, css, javascript, should have atleast basic knowledge of shell programming, and should have come up with some fairly advanced applications. Especially with PHP5, it is a great language to learn the ins and outs of OOP, and should teach you some great programming and design implementation practices.

I don't even recommend Visual Basic to beginners.

#6 Zhuris

Zhuris
  • 53 posts

Posted 13 April 2010 - 04:14 AM

I don't even recommend Visual Basic to beginners.


This. Although it may seem easy to learn at the time, you'll likely regret it a few years later when you try to start using proper languages. I know I did. People these days seem capable of learning languages at an earlier and earlier age - and that includes languages such as C++ which is often regarded as one of the harder languages to learn.

Most importantly, to those looking to learn, find a language that is both A) Recommended and B) Enjoyable for you to program with. If you're unhappy with the language you're using, you're prone to writing worse code. Remember that no matter what language you pick, some people will tell you it's a bad choice while others will swear by it. Everyone has their own preferences, try not to let that affect your judgement too much.

#7 kiddX

kiddX
  • 606 posts

Posted 13 April 2010 - 05:12 AM

I personally don't think the language you choose to start with is all that important. I started with VB. It helped me understand programming at an early age and frankly it was a little more intuitive than C/C++. But have I used VB in the last 10 years? definitely not. It's quite likely the language you start with isn't what you end with. It depends a lot on what you want to do because switching from one language to another is not all that hard. I would say switching from C++ to Java was about as hard as switching from the old MS office to the new MS office for me. Everything worked basically the same, but it looked a little different. Programming your skills can transfer over very well. Plus there are so many programming resources online that learning the different libraries and stuff is very easy.

#8 Atonomous

Atonomous
  • 28 posts

Posted 14 April 2010 - 03:54 AM

The assessment is extremely objective. My experience does not extend to just using programming languages. I teach people C, C++, java, php, mysql, xhtml, and css on a regular basis. The information is extremely objective based on not only my personal experience with teaching the material to my peers, but from what every other professor I know has had to deal with. PHP does NOT help you with C++, regardless of if it has a syntax based off of it. This is exactly the mentality that hinders web developers from really learning C++. Sure, you can make a conditional statement but you have to be able to do object orientation, or you might as well just do C programming. Knowing how a conditional statement works means nothing if you do not understand how to include libraries or how to make a class with a constructor and methods. Same for people that come in from java. It just doesn't work the same.

#9 artificial

artificial
  • 186 posts


Users Awards

Posted 14 April 2010 - 03:59 AM

http://php.net/manua...nguage.oop5.php

#10 Zhuris

Zhuris
  • 53 posts

Posted 14 April 2010 - 04:13 AM

Artificial, you seem to be confusing two different concepts:

  • A language that has support for OOP.
  • A language that encourages use of OOP.
In the case of PHP, it has support for OOP. Does it encourage it? From my experience, not at all. The majority of code snippets, tutorials, references and comments I read on PHP do not use classes. The support is there, but it's not widely used because the language itself does not encourage it.

I'm really not sure why you're trying to draw parallels between PHP and C++; for the most part they aren't even used in the same environment.

#11 artificial

artificial
  • 186 posts


Users Awards

Posted 14 April 2010 - 04:27 AM

OOP got a complete rehaul in PHP 5. It was the single largest improvement from the previous version, and the main motivation behind the upgrade. To say PHP doesn't encourage OOP is ridiculous - while it is certainly the case for previous versions (creators admit its initial introduction was a mere afterthought), the same can no longer be said. However, as webhosts have to manually upgrade from PHP 4 to 5, upgrading in general has been a slow process, and up until recently you'd probably find most large developers still catering for PHP 4 (with primitive OOP support). Designing large applications in PHP without OOP, while possible, is incredibly impractical.

I'm not trying to draw parallels. I'm arguing the point that programmers who have mastered PHP would have difficulty learning C++.

#12 Josh

Josh
  • 318 posts

Posted 14 April 2010 - 06:55 AM

Artificial, you seem to be confusing two different concepts:

  • A language that has support for OOP.
  • A language that encourages use of OOP.
In the case of PHP, it has support for OOP. Does it encourage it? From my experience, not at all. The majority of code snippets, tutorials, references and comments I read on PHP do not use classes. The support is there, but it's not widely used because the language itself does not encourage it.

I'm really not sure why you're trying to draw parallels between PHP and C++; for the most part they aren't even used in the same environment.


That's because people have not yet fully embraced OOP with PHP. Like Artificial said many are still coding in PHP 4, and it's been a slow process to get these people to upgrade their code to use OOP concepts. PHP 5 itself very much encourages OOP, it was the whole idea behind the revision in the first place. To say it doesn't encourage it is absurd.

Furthermore, with all the frameworks out there like CakePHP, OOP has for the most part become a necessity for PHP.

#13 Zhuris

Zhuris
  • 53 posts

Posted 15 April 2010 - 04:47 AM

Everything I've said is from my experience (As previously mentioned) so in essence is almost like an opinion - it is what I've deduced based on my own personal experience. To call my observations absurd or ridiculous is akin to calling someone's opinion absurd or ridiculous. I don't claim to be an expert in PHP, I was explaining what I'd seen from my personal experience.

I have a feeling we may have taken this thread slight off-topic ;)

#14 jcrdude

jcrdude
  • Oh shit there's a thing here

  • 7001 posts


Users Awards

Posted 15 April 2010 - 08:32 AM

Everything I've said is from my experience (As previously mentioned) so in essence is almost like an opinion - it is what I've deduced based on my own personal experience. To call my observations absurd or ridiculous is akin to calling someone's opinion absurd or ridiculous.


"In my opinion, your opinion is absurd or ludicrous."

Would it have helped you if they had worded it that way?

#15 Josh

Josh
  • 318 posts

Posted 15 April 2010 - 01:37 PM

Everything I've said is from my experience (As previously mentioned) so in essence is almost like an opinion - it is what I've deduced based on my own personal experience. To call my observations absurd or ridiculous is akin to calling someone's opinion absurd or ridiculous. I don't claim to be an expert in PHP, I was explaining what I'd seen from my personal experience.

I have a feeling we may have taken this thread slight off-topic ;)


I didn't have the intention as coming across as offensive :p However, absurd rightly describes what I thought your claim was. The PHP developers themselves stated several times that the purpose behind the PHP 5 revision was introducing OOP to PHP. I respect your opinion that you still think it does not have a natural connection with OOP yet, but to me that's just ridiculous :p

Any who, it's not off topic, someone somewhere will learn something from our disagreement :lol:

#16 Zhuris

Zhuris
  • 53 posts

Posted 15 April 2010 - 03:33 PM

"In my opinion, your opinion is absurd or ludicrous."

Would it have helped you if they had worded it that way?

I didn't have the intention as coming across as offensive :p However, absurd rightly describes what I thought your claim was.


Heh, fair points from both of you Posted Image. Old habits die hard for many people, which is what lead me to believe that even with PHP objects aren't getting the usage they deserve.

I sure hope someone does indeed learn something, and doesn't feel put off learning PHP by this little debate. There's plenty I dislike about PHP, but I'm still using it because it's the simplest solution for server-side scripting that I know of.

#17 Ambition

Ambition
  • 558 posts

Posted 18 April 2010 - 09:43 PM

How about Visual Basic? I've heard that its the easiest language to learn. Does anyone know where I can get started? where to find a guide for it and where to download/buy it?

#18 kiddX

kiddX
  • 606 posts

Posted 18 April 2010 - 09:55 PM

Visual basic isn't really a language that can compare with the other programming languages, but it's an easy place to learn basic programming concepts.

I would start with purchasing/acquiring VB6. If tutorials don't already come with it, use Google.





#19 SimDairy

SimDairy
  • 26 posts

Posted 22 April 2010 - 02:42 AM

How hard is it really to transfer from a Non-OOP to an OOP language, really?

In my college, we started programming using C. Now that we're done with that we'll then move on to Java and I don't have any background in that language whatsoever... Is it only the syntax I should worry about or are are the two languages vastly different? :unsure:

I started reading Atonomous' PDF link about Java but have never actually gotten very far since I have other business to attend to.

Edited by SimDairy, 22 April 2010 - 02:51 AM.


#20 Josh

Josh
  • 318 posts

Posted 23 April 2010 - 06:45 AM

How hard is it really to transfer from a Non-OOP to an OOP language, really?

In my college, we started programming using C. Now that we're done with that we'll then move on to Java and I don't have any background in that language whatsoever... Is it only the syntax I should worry about or are are the two languages vastly different? :unsure:

I started reading Atonomous' PDF link about Java but have never actually gotten very far since I have other business to attend to.


You have to unlearn a lot of stuff when going from a language like C to Java. There have been thousands of books written on OOP concepts and various methods of applying them. It's understanding, utilizing, and transforming these concepts that are the hardest steps to learn when moving into OOP. Anyone can say they understand the basic fundamental behind OOP, but the difference between someone who does and does not understand OOP can be deduced from examining how they actually apply it in their code.

#21 Dan

Dan
  • Resident Know-It-All

  • 6382 posts


Users Awards

Posted 10 May 2010 - 04:11 PM

Woah, woah, woah, woah, woah.

I'll get to this tomorrow, but you couldn't be further from the truth - especially with the .NET analysis and C#.

Seriously - you have no idea what you're talking about.

#22 JesterC

JesterC
  • 21 posts

Posted 11 May 2010 - 06:16 PM

You have to unlearn a lot of stuff when going from a language like C to Java. There have been thousands of books written on OOP concepts and various methods of applying them. It's understanding, utilizing, and transforming these concepts that are the hardest steps to learn when moving into OOP. Anyone can say they understand the basic fundamental behind OOP, but the difference between someone who does and does not understand OOP can be deduced from examining how they actually apply it in their code.





Moving from non object oriented to object oriented. My reading comprehension suspects some beefcaka. Since when did you have to unlearn algebra 1 to move onto algebra 2?


I went from vb6 to vb.net to c# to php, and I do not remember unlearning very much.


I use OOP in my PHP endeavors extensively, I am currently developing features for a RPG game engine, and OOP makes it more exciting.


Edited by JesterC, 11 May 2010 - 06:23 PM.


#23 kiddX

kiddX
  • 606 posts

Posted 11 May 2010 - 06:51 PM

writing games is a biatch. i made one in C++ with opengl back in high school. man that took forever

#24 artificial

artificial
  • 186 posts


Users Awards

Posted 12 May 2010 - 08:35 PM

I use OOP in my PHP endeavors extensively, I am currently developing features for a RPG game engine, and OOP makes it more exciting.


I think you just highlighted the very point he was trying to make. Unnecessary use of OOP reflects a lack of understanding. Using OOP in PHP merely because it's exciting is why it has copped so much flack. A lot of developers are using it where it isn't warranted, and implementing poor code because they don't know how to use it effectively. Moreover, the use of OOP in PHP results in a small loss of speed, the compilation of which, on a high traffic website, can result in a greater server load.

You should only use it when it is beneficial to do so, and even then only if you know how.

#25 JesterC

JesterC
  • 21 posts

Posted 15 May 2010 - 07:03 PM

I think you just highlighted the very point he was trying to make. Unnecessary use of OOP reflects a lack of understanding. Using OOP in PHP merely because it's exciting is why it has copped so much flack. A lot of developers are using it where it isn't warranted, and implementing poor code because they don't know how to use it effectively. Moreover, the use of OOP in PHP results in a small loss of speed, the compilation of which, on a high traffic website, can result in a greater server load.

You should only use it when it is beneficial to do so, and even then only if you know how.


Actually with OOP you can do more dynamic gameplay when it comes to rpgs. I am helping a project called ezRPG.


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users