My Computer Forum Computer Science Forum

Go Back   My Computer Forum > Computer Science Forum > Programming

Programming Programming Languages, Interpreters, and Compilers - Assembly, Declarative, Machine, Object Oriented, Iterative


Reply
 
LinkBack Thread Tools Display Modes
March 28th, 2012, 01:23 AM   #1
 
Joined: Mar 2012
Posts: 1
C++ and PHP

Is it easy to learn the other if i learn any one ?
Like if i learn PHP, will C++ be easy to understand and program ?

Thanks,
Wannalearn
wannalearn is offline  
 

My Computer Forum is free to register and we welcome everyone!

April 11th, 2012, 11:27 AM   #2
 
Joined: Jan 2012
Posts: 8
Re: C++ and PHP

That depends.
1. c-family sintax language look very much alike. so, if you learn any of c,c++, java,javascript,c#,Php, and many more, you be familiar with the syntax of all the others.

2. Php is verry different than any other languages. It runs on servers, so you won't be using php to calculate fast the percentage of you spendings, but rather to get data from a database and neatly place it in a webpage. I'd say you shouldn't start with php. Php is a very powerfull language, but it's special features are not for starters.
My advice is to start with c++ if you want to learn algorythmic, and how to calculate things, and c# if you want to build applications. C# is the easiest to learn language .
deanSs is offline  
April 11th, 2012, 12:14 PM   #3
Site Founder
 
julien's Avatar
 
Joined: Dec 2007
Posts: 414
Re: C++ and PHP

I find your viewpoint interesting, deanSs. Why do you think that C# easier than PHP to learn ? I would have thought the contrary. Though I don't know how to program in C#, I know a bit of PHP and its syntax is rather straightforward and flexible, and indeed this is mostly about working server-side and processing data from a database towards a web page. There are thus network-specific particularities, but on the other hand you don't have to dig into the low-level computer architecture (which I find more demanding in terms of knowledge ...)
julien is offline  
April 16th, 2012, 02:38 PM   #4
 
Joined: Jan 2012
Posts: 8
Re: C++ and PHP

it's my 4'th year of C# programming, and in php, I only made a very generic e-commerce website. Php is a lot harder because you MUST take into account server-client relation, connections and everything else. Of course, is mandatory to learn, because Php is the best in it's domain, but, at least for me, it seems a lot harder to make an application that handles and completed form, takes data from it and computes, then the result is arranged in a webpage, and sent back to a client, than just -take data, compute, show- style of other kind of applications.

c# is easy to learn because:

For starters:
C# Form applications are an very easy start in visual programming. It's very simple concept, based on -event ->function- type of interaction. You have a lot of objects, like button, text box, label, picture box, each with a few dozens events attached. You double click the event, and it creates the function that is caled on that event.
Ex. You have an application with a button, and a green label. On click, the label becomes red. To make this you: (Using visual studio / visual C#)
1 - New Form Application
2 - Drag and drop A button and a label.
3 - Set the label to be green (left click-> properties, search for background color and set it green)
4 - Button -> events- > click (doubleclick to generate function)
5 - In the generated function, write "label1.Backgroundcolor = Colors.Green; " (label1 is the default NAME for the label)

I made about a dozen games in Highschool with this. Is the most intuitive thing in programming.

Syntax :
Php, like Python and many others, have "syntactic sugar" wich means, that you don't have to specify everithing, since it kinda guesses how would you like it to behave. That could be very awesome, but, there may be a lot of inconcordance between variables and how you would like it to behave, so, sometimes you have some errors that go way beyond the beautiful syntax, to the way things work, and since the language is not very specific, sometimes it gets hard to know exacty what is going on. In c#, your code will be long, but very specific, like a huge sports car. Massive yet powerfull, you know exactly what is going on, because you have everything in front of you, and it's very good at make it READABLE. It's as pedantic as c or c++, but as fluently readable as Php or python.

Libraries and documentation.
The c# libraries are massive. Most of the time, i managed to solve problems just by looking at the autocomplete, which showed me my possibilities. For example, I wanted to draw on an label, I just wrote "draw" to see what functions does my library has, and it showed me "draw(pencil)" or "draw(brush)" "draw(default pencil)" , "draw line, draw rectangle, draw circle etc etc. each function with a very good description and it specifications.

Programming Enviroment:
Visual studio is Godlike. If something is wrong, than Visual studio will tell you so. If something doesn't show up at atocomplete, than it's wrong. If Visual studio doesn't know about the function. It does not exist.

In conclusion, Even after 4 years of C#, i still don't know 1/10 of it's capabilities, but i don't have to. It behaves very intuitively, and so makes it awesome.
deanSs is offline  
December 5th, 2012, 11:53 PM   #5
 
Joined: Dec 2012
Posts: 2
Re: C++ and PHP

Hello,

I would also recommend that you should start with C++ and leave PHP for later. In order to learn C++ there are can be good material found on the Internet.
You should check out the followings for C++:

- List of freely available programming books (http://stackoverflow.com/questions/1948 ... ming-books)
- Sample programs (http://www.voip-sip-sdk.com/p_267-c-net ... -voip.html - this one is about Visual C++.Net programming)

There are other useful tutorials on the Internet.

I have no experience in PHP programming so I cannot advice anything to you about it.

Hope I could help you.
brendonwalsh490 is offline  
December 5th, 2012, 11:56 PM   #6
 
Joined: Dec 2012
Posts: 2
Re: C++ and PHP

Hello,

I would also recommend that you should start with C++ and leave PHP for later. In order to learn C++ there are can be good material found on the Internet.
You should check out the followings for C++:

- List of freely available programming books (http://stackoverflow.com/questions/1948 ... ming-books)
- Sample programs (http://www.voip-sip-sdk.com/p_267-c-net ... -voip.html - this one is about Visual C++.Net programming)

There are other useful tutorials on the Internet.

I have no experience in PHP programming so I cannot advice anything to you about it.

Hope I could help you.
brendonwalsh490 is offline  
Reply

  My Computer Forum > Computer Science Forum > Programming

Tags
php



Thread Tools
Display Modes






Copyright © 2018 My Computer Forum Forum. All rights reserved.