Tuesday, 17 February 2015
Python and C++
In the last six months I have learnt two new languages, not French and Portuguese, not those languages, no. I have been learning to speak in a different language entirely. As the name of this blog suggests, I have been looking at programming languages since I have been here at uni. First I looked at Python, quite a simple language really, a good one to start with. Secondly, I have and still am looking at C++. Similar to Python in some ways, C++ includes more complex functions and keywords.
At the first term of uni, we looked at Python, a language that can be used on any machine with any type of operating system. The only thing you need is to download the Python IDLE, which is free, then your away. I have had some previous experience to programming in Python and found it easy to get started with it. However, if you are new to programming entirely, Python is a good place to start and there is an endless amount of resources and tutorials online for you. Python is also a language that is self-explanatory, for example the code:
print("Hello World")
will literally print the phrase 'Hello World' to the screen. The only think you have to be careful about is the syntax, which means how it is structured. For example, the line above will not work if the print statement is a capital P. This is why people find Python so easy to begin with. However, from what I have learnt, programming takes a lot of practise and is not all about throwing yourself into coding, sometimes you actually have to think about how a program is going work and fit together.
C++ is a language that was created from the language C. First named 'C with classes', then changed to C++, in my opinion, it is a similar language to Python, just with different syntax and add-ons. As stated from the website (http://www.cprogramming.com/begin.html) 'C++ makes it easier to manage memory and adds several features to allow "object-oriented" programming and "generic" programming. Basically, it makes it easier for programmers to stop thinking about the nitty-gritty details of how the machine works and think about the problems they are trying to solve.'
In my eyes, C++ is a better language to make bigger applications in, purely because of the type of compiler and software I have been using to write programs. With python it is a blank screen to type in and a window that executes the code. In the C++ software I am using, (Microsoft Visual Studio 2013), it gives you a list of header files and source files listed neatly at the side. It also has an output window to view errors and the area in which you write the program is included all in the same window. I just like the idea of it all being in one place, even if a command prompt window is opened to execute your code.
Overall, both are good languages and are the only two languages I have ever programmed in. But this was my opinion about both of the languages. Although, I am in C++ mode at the moment and prefer it, this is only because I am starting a small project for my coursework. Python is a good starting point for any new programmer and I highly recommend starting there. If you are debating whether or not to start programming for a subject, degree or even a hobby, I'd say just go for it. It is a very good skill to have and links to maths and other topics under computer science.
If you wish to start programming yourself, I have left a few websites below to take a look at, which I use at uni:
https://www.python.org/
http://www.cplusplus.com/
Also, visit my Facebook page for regular updates:
https://www.facebook.com/ticblog?fref=ts
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment