FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


What lanugage should I learn next?





flatliner
Anybody recommand a good/useful lanugage to learn?

I currently know, html , CSS, javascript, PHP , MySQL, abit of AJAX
ExplicitRyan
A very useful language to learn next would be C#/C++. It's not so much for webdevelopment its for making software. It's a very important language and has just about the same type of coding as php, creating functions and all. It's dificult to learn but easy once you get the hang of it. Just like any language.
flatliner
ah yes I was think of that, I actaully did try some of that a while back C++ that is , but found it abit 2 advanced for me at the time. But now I alot more advanced in programming so, I will give it another try, thanks for the input.
qscomputing
How about Tcl/Tk? It's a bit "unusual" but it's nice and is great for making programs with GUIs.
Aimewitue
you can learn coldfusion it'sa very interesting language
buf found an host who accept this language is a quite hard
flatliner
Thanks very much for your suggections everybody, i have taken up learn C++ , here is my frist program Very Happy

Code:

#include <iostream>

using namespace std;


int main()

{
    int x;
    int y;
 
   
   cin>> x;
  cin.ignore();
  cout<<"you entered: " << x << "Thats funny coz I was just thinking the same number, try again \n";
  cin>> y ;
  cin.ignore();
  cout<<"you entered: " << y << "Hmm...if you guess the next number I am thinking I will reward you \n";
  cin>> x;
  cin.ignore();
  if(x == y)
  cout<<"your guess was right I was thinking that" << y << "\n";
  else
  cout<<"nope wrong, your just gona have to try again. \n";
 
   cin.get();

}



Indi
flatliner wrote:
Thanks very much for your suggections everybody, i have taken up learn C++ , here is my frist program Very Happy

Code:

#include <iostream>

using namespace std;


int main()

{
    int x;
    int y;
 
   
   cin>> x;
  cin.ignore();
  cout<<"you entered: " << x << "Thats funny coz I was just thinking the same number, try again \n";
  cin>> y ;
  cin.ignore();
  cout<<"you entered: " << y << "Hmm...if you guess the next number I am thinking I will reward you \n";
  cin>> x;
  cin.ignore();
  if(x == y)
  cout<<"your guess was right I was thinking that" << y << "\n";
  else
  cout<<"nope wrong, your just gona have to try again. \n";
 
   cin.get();

   return 0; // <---------------- You forgot a return statement
}




(You missed something. ^_-)
frozenhead
Lol. That's really good. Just keep learning C++, a vast language that you can use on a crossed platform basis. Good luck! Wink
MrBlueSky
Indi wrote:

(You missed something. ^_-)


In C++ when the last statement of the main() function is reached and no return is encountered "return 0;" is assumed. But since this is only the case with main and leaving it out doesn't have any advantages I agree it is probably better to add the return statement. Smile
jabapyth
python. python.org
irc://freenode #python
Indi
MrBlueSky wrote:
Indi wrote:

(You missed something. ^_-)


In C++ when the last statement of the main() function is reached and no return is encountered "return 0;" is assumed. But since this is only the case with main and leaving it out doesn't have any advantages I agree it is probably better to add the return statement. Smile

All true. The implicit return in main is an unfortunate quirk that was left in to keep as many legal C programs legal in C++ as possible. It was a Bad Idea, and i wouldn't bet big money on it being around indefinitely. i don't even teach it in my classes. If it ever comes up, i say: "yes, it's legal, but not everything that's legal C++ is a good idea... take throwing from destructors, for example."

☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺☺

i'm disappointed that no one recommended some of the more esoteric programming languages out there. Like brainf*ck, for example. This is Hello World in brainf*ck:
Code:
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.


Or Whitespace (highlight to view):
Code:
Say hello.   
              
             
                  
             
                 
                
                 
              
                      
                 
              
                
           
                   
                      
                
                      
                  
                 
                 
                 
                    
               
                 
           
                    
                      
                   
                 
                      
           
                
                    
                   
               
                  
                
                     
                  
                  
                  
                     
                    
                    
             
                       
   
           

                                                                                        

                                                                                                                            




                                           
      
   

                                                                                      
 
          
 
                                                                                                                                                           
   
        
      
 
                                                                                    

                                                                                                                                                         
 

 


   

                                                             
 
 
    
             
           
        
                                                                                                                                   
 

      
      
 
                                                           

                                                                                                                                 
 

      
          
      
   

                                                                                                                          
          
             
   
     
 
   


Malbolge:
Code:
(=<`:9876Z4321UT.-Q+*)M'&%$H"!~}|Bzy?=|{z]KwZY44Eq0/{mlk**
 hKs_dG5[m_BA{?-Y;;Vb'rR5431M}/.zHGwEDCBA@98\6543W10/.R,+O<


Or my personal favourite, LOLCODE:
Code:
HAI
CAN HAS STDIO?
VISIBLE "Hello World!"
KTHXBYE

And i just have to share more LOLCODE:
Code:
HAI               BTW HAI starts every program, and BTW starts comments ^_^
CAN HAS STDIO?    BTW Asks for STDIO (standard I/O) library

PLZ OPEN DAFILE "FILE.TXT"?   BTW Try to open "FILE.TXT"
   AWSUM THX                  BTW On success opening file
      VISIBLE DAFILE          BTW Display file
   O NOES                     BTW On failure
      VISIBLE "ERROR!"        BTW Display "ERROR!"
   KTHX

KTHXBYE
("O NOES" is an exception handler ^_^; )

And some I/O with "GIMMEH". ^_^:
Code:
HAI
CAN HAS STDIO?

VISIBLE "GIMMEH UR NAME LOL: "

I HAS A NAME
GIMMEH NAME

IZ NAME LIEK "INDI"?
   YARLY
      VISIBLE "LOLAWESOME! UR NAME IS DA SHIZ!1!!1!!!11"
   NOWAI
      VISIBLE "LOL GHEY UR NAME IZ " N NAME N " ROFL!!1!1!!"
   KTHX
KTHXBYE
JayBee
Indi wrote:
Or my personal favourite, LOLCODE


Very Happy It is really interesting. I would learn this language.
MrBlueSky
Those LOLcode fragments Very Happy
flatliner
erm no one suggested Java? I have been doing alot of reading around forums and other source and it seem to be made out to be a good stepping stop to C/C++ . Like I am coming from a mainly PHP background, and I can see the C/C++ sytanx is like PHP but I looked at a small bit of java soruce and it seemed different sorta syntax. Would it be better for me to learn java then move on to C/C++ , as I plan on learning java some time anyway or just go from PHP to C/C++

Kind Regards
Ciaran Mc Cann
MrBlueSky
flatliner wrote:
erm no one suggested Java? I have been doing alot of reading around forums and other source and it seem to be made out to be a good stepping stop to C/C++ . Like I am coming from a mainly PHP background, and I can see the C/C++ sytanx is like PHP but I looked at a small bit of java soruce and it seemed different sorta syntax. Would it be better for me to learn java then move on to C/C++ , as I plan on learning java some time anyway or just go from PHP to C/C++

Kind Regards
Ciaran Mc Cann


I think it also depends on what your goal is: what you want to do with your programming skills. To take an obvious example: when you want to do low-level programming where you interface a lot with the OS and performance really counts, you want to go with C/C++. If, on the other hand, you want to learn some decent Object Oriented Programming Java would be a good choice. It isn't that C++ isn't good for learning OOP, but Java is easier to learn and experience with Java gives you an advantage if you ever want to switch to C#.

But don't be fooled by the syntax of PHP. It may look like C/C++, but it is a totally different kind of beast. Especially when stepping over to C, you will run into new programming concepts (like pointers, function prototyping, anonymous functions, data hiding, user defined datatypes, etc. etc.) which are unknown in PHP.
flatliner
yes I am looking to grasp the conspet of OOP and do more just programming and not really have to worry much about menory managment or OS stuff. Just want to get a useful laugnage which I can develop custom simple programs in. Think I will take up Java for the time beening
Thanks for your help, very inforitive answer
flatliner
I having a problem, I started to learn Java so I went and downloaded the JDK and then installed it and I was expecting somthing like Visual studioes to be installed or somthing. Like I dont get it what is the JDK then? I read a turtorail on starting Java and wrote a Hello World program and then had to go though a load of command prompt shit to get it 2 run a few lines of code. Like in Dev C++ you can just hit complie and run and bang it runs. Whats the story with this?
Indi
flatliner wrote:
I having a problem, I started to learn Java so I went and downloaded the JDK and then installed it and I was expecting somthing like Visual studioes to be installed or somthing. Like I dont get it what is the JDK then? I read a turtorail on starting Java and wrote a Hello World program and then had to go though a load of command prompt shit to get it 2 run a few lines of code. Like in Dev C++ you can just hit complie and run and bang it runs. Whats the story with this?

The story is that that's the way pretty much every thing really works. Even Dev-C++ is just a front-end for gcc, which is a command-line program just like javac. If it weren't for that nice guy at Bloodshed, you would have to run gcc from the command like just like you had to do for javac.

You will have to find an IDE that you can configure to use javac and the other Java command-line tools. i can't remember what i used to use - either UltraEdit, or maybe i configured some other IDE like Dev-C++ to do the job. Or you might be able to find something that's custom made for it.
flatliner
Yea I sorta know that it was just sorta a face for all the opertaions in the background, but I though there would be alots of IDE as there are for other languages like PHP and C++. Thanks for the info Jus makes life very manual Sad
MrBlueSky
You can checkout netbeans, a free IDE for Java from Sun. There are probably more like this. As Indi said, this is how it works. All IDE's are just frondends to the actual compilers or interpreters.
snowboardalliance
Eclipse is a good IDE for Java
Indi
snowboardalliance wrote:
Eclipse is a good IDE for Java

i've never used Eclipse, but i've heard nothing but raving goodness about it, so i would have to agree with that recommendation.
shawkat
flatliner wrote:
yes I am looking to grasp the conspet of OOP and do more just programming and not really have to worry much about menory managment or OS stuff. Just want to get a useful laugnage which I can develop custom simple programs in. Think I will take up Java for the time beening
Thanks for your help, very inforitive answer


IMHO java is not any easier than C/C++/C# and the likes
python is the language you want - simple, powerfull, clean, tons of bindings to libraries, cross-platform and widespread (at least in linux world)

try to get Eclipse/Europa and PyDev - it's a great IDE for python
shenyl
I will suggest C#, as the first step into OOP.

You can get Visual Studio .NET Standard Edition easily which is bundled with some textbooks - literally free when you buy the programming textbook.

There is also the free IDE Web Matrix (developers from the MS .VS camp), which offers very much a similar IDE as VS.NET.

Why C#?

It is the latest OOP, that has considered all the pitfalls of earlier OOP languages, which tends to be updated (often comes with other unpleasant limitations). C++ is redevelopment from C, and C# is a brand new development from Java plus C++.

You will find C# - is truly the mixed of the stable features from many OOP languages.

The VS.NET makes the learning exceptional simple and it is also robust.

I am not from Microsoft, infact I work many years on IBM platforms. But I am now teaching OOP using C# for Introduction to SW development and Internet Database development.

I have code PHP, and the OOP concepts are evolution from it's previous non-OOP base, as such, there is a mixed of OOP and non-OOP features in the same language.

One statement in C#, which I strongly discourage is the GOTO statement, which I felt is totally non structural, but place there because in some strange circumstances someone might be forced to use it. In low level programming this is a risky POP operation.

Do find out more, and you can get plenty of free advice and codes from several sites.

With best regards.
flatliner
hmm... thanks for your reply very inforative. I am having big problems understanding OOP tho and I dont understand its use, like I read some turtorials on OOP in PHP and class etc, but I just dont see how it makes programming easyer, it seems very simple, but yet OOP is an advanced topic, I most not be seeing somthing here? Confused

Like it just seems like its another type of function, you define the function and then call it when you need it to carry out the task, to me thats what OOP seem like? Rolling Eyes Confused

Yours Thankfully
Ciaran Mc Cann
Indi
flatliner wrote:
hmm... thanks for your reply very inforative. I am having big problems understanding OOP tho and I dont understand its use, like I read some turtorials on OOP in PHP and class etc, but I just dont see how it makes programming easyer, it seems very simple, but yet OOP is an advanced topic, I most not be seeing somthing here? Confused

Like it just seems like its another type of function, you define the function and then call it when you need it to carry out the task, to me thats what OOP seem like? Rolling Eyes Confused

Really, that's all it is.

OOP is just a way of thinking when you program - a way of designing your program and laying out your code. You can use the paradigm in pretty much any language - not just "OOP languages" - but some languages have a more natural syntax for it, and mechanisms in place that help make it easier to do.

But all it is really is trying to picture your program as a bunch of components interacting with each other. Each of these components does not need to know how the other components work... they only need to know how to use them.

For example, suppose you needed a random number in your program.

No OOP
Without OOP, you could do something like this:
Code:
#include <stdio.h>

unsigned long seed = 1uL;

int main()
{
   printf("Enter the seed you want to start with: ");
   scanf("%U", &seed);
   
   seed *= 1103515245uL;
   seed += 12345uL;
   
   int num = (int)(seed % (RAND_MAX + 1));
   printf("Your 1st random number is: %d\n", num);
   
   seed *= 1103515245uL;
   seed += 12345uL;
   
   int num = (int)(seed % (RAND_MAX + 1));
   printf("Your 2nd random number is: %d\n", num);
   
   seed *= 1103515245uL;
   seed += 12345uL;
   
   int num = (int)(seed % (RAND_MAX + 1));
   printf("Your 3rd random number is: %d\n", num);
   
   return 0;
}
Now, that will work... buuuuuut... there are several problems with it. First, it's all intermixed with the rest of the code - it's tightly bound - which means that if you want to reuse it in another program, you have to carefully pick the important parts of it out and copy it over, which is pretty much rewriting it. It's also exposed within the program itself - suppose you decided to add to the program later, and you added a new function that - deliberately or accidentally - resets either or . Your random number generator will suddenly have a mysterious bug in it... that came from somewhere else in your program... the bug is in code that has nothing to do with your random number generator code!

OOP
Now, suppose you did the same thing using OOP:
Code:
// File main.c ////////////////////////////////////////////////////
#include <stdio.h>

#include "rng.h"

int main()
{
   printf("Enter the seed you want to start with: ");
   unsigned long seed = 1uL;
   scanf("%U", &seed);
   rng_seed(seed);
   
   printf("Your 1st random number is: %d\n", rng_generate());
   printf("Your 2nd random number is: %d\n", rng_generate());
   printf("Your 3rd random number is: %d\n", rng_generate());
   
   return 0;
}

// File rng.h ////////////////////////////////////////////////////
void rng_seed(unsigned long);
int rng_generate(void);

// File rng.c ////////////////////////////////////////////////////
static unsigned long seed = 1uL;

void rng_seed(unsigned long s)
{
   seed = s;
}

int rng_generate(void)
{
   seed *= 1103515245uL;
   seed += 12345uL;
   
   return (int)(seed % (RAND_MAX + 1));
}
That does exactly the same job... but if you want to reuse the random number generator in another program, you can do it simply by copying rng.c and rng.h and using them. And, also, there is absolutely no way you can break it by doing anything, anywhere in your program that is not within rng.c or rng.h. It is encapsulated, and protected from anything that goes on in the rest of the program. And if you ever want to improve the random number generator (because this one is shitty), all you have to do is edit rng.c and leave rng.h untouched, and the rest of the program will be none the wiser.

And that's it. That's all that OOP is.

Better OOP
If you want to get really sexy, you can even have a bunch of random number generators knocking around. All you have to do is this:
Code:
// File main.c ////////////////////////////////////////////////////
#include <stdio.h>

#include "rng.h"

int main()
{
   rng* p_rng = rng_create();
   
   printf("Enter the seed you want to start with: ");
   unsigned long seed;
   scanf("%U", &seed);
   rng_seed(p_rng, seed);
   
   printf("Your 1st random number is: %d\n", rng_generate(p_rng));
   printf("Your 2nd random number is: %d\n", rng_generate(p_rng));
   printf("Your 3rd random number is: %d\n", rng_generate(p_rng));
   
   rng_destroy(p_rng);
   
   return 0;
}

// File rng.h ////////////////////////////////////////////////////

typedef unsigned long rng; // Short for random number generator

rng* rng_create(void);
void rng_destroy(rng*);

void rng_seed(rng*, unsigned long);
int rng_generate(rng*);

// File rng.c ////////////////////////////////////////////////////

rng* rng_create(void)
{
   rng* p_rng = (rng*)malloc(sizeof(rng));
   
   if (0 != p_rng)
      *p_rng = 1uL;
   
   return p_rng;
}

void rng_destroy(rng* p_rng)
{
   free(p_rng);
}

void rng_seed(rng* p_rng, unsigned long s)
{
   *p_rng = s;
}

int rng_generate(rng *p_rng)
{
   *p_rng *= 1103515245uL;
   *p_rng += 12345uL;
   
   return (int)(*p_rng % (RAND_MAX + 1));
}
And that's pretty much it. And that's all done in C, a "non-OOP language". The only thing that "OOP languages" add, is that they make most of that stuff automatic.
flatliner
Ah ha, very inforitive indeed, I understand it now, I just though there was somthing deeper to it. Thanks very much for the time take for the reply and everyones replys. Thanks Very Happy
shenyl
Yes, Indi has given a good overview of OOP.

flatliner, OOP is not structural programming, where you create and use functions.

Functions lives in the same program as the Main function.

OOP - puts the functions into other programs (called Classes).

These Classes are separate programs, which serve like functions, except that

1. Class need to be loaded into memory (Instantiated) to run
2. The loaded (instantiated) program is called Object (an instance of the Class)
This loaded program can is a black box - as Indi described - it has
pre-define input data (arguments), and predefined functions (methods).
When you load (instantiate) the program, you also pass in the parameters (arguments).
3. How the object managed the data is hidden, and you only have a predefined methods
to call to process your requests.
4. Loaded program (Object) can also have their own data - which can be access
via properties (Many GUI IDE use this concept - e.g. setting the Text of a button,
you do it via the Button's Text property, etc).

In short Class can be loaded as blackbox programs, which your main program can
call and use. The Objects (loaded blackbox programs) can have their own
encapsulated (stored within the object) data.

Functions in the Main Program, can interact with the data and other functions in the same program.
Different classes prevent this interaction - making them isolated from each other, and exposing only those methods and data intented for sharing with other programs (Classes).

This isolation feature is one of the key differences with Structural programming.

I do hope this help a little on the differences of Structural Programming and OOP.

With best regards.
Related topics
i love french.........
The Next Step?
What order shoudl you learn them?
Learn and Earn Series
5 ways to advertise your web site
i want to learn php how should i start
Learned HTML, what next?
MYSQL?
What do you have for breakfast today?
Anything about honey bees
How to find Freelance Work online?
Marooned people makes money and change your DNA
Becoming God
Which Coding Language Should I Learn Next?
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.