Finding your way around general programming and Python

View previous topic View next topic Go down

Finding your way around general programming and Python

Post by A-MAN on 23rd January 2013, 6:29 pm

A lot of people have been thinking about learning how to program. And I would be happy to show you the basic steps to begin.

1-Differences between high-level and low-level programming languages::

Most of you guys must have heard about the terms, High-level and Low-level programming. Simply, A high level programming language is high-level and harder to understand and process, while a low-level language is easier to understand and process; talking here in a computer's point of view. i.e: a low level language is easier for a computer to process, but harder for use human to understand, and vice-versa goes for the high-level.
E.g:
The basic hello world program(1) can be written in Assembly language (a low-level programming language) as:
Code:

;First of all we initialize the system and enable case-sensitivity in your variables
.386 
.model flat,stdcall
option casemap :none


;Load the codez needed
include \masm32\include\window.inc
include \masm32\include\kernel32.inc
include \masm32\include\masm32.inc

includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\masm32.lib

;Define variables
.data
HWvariable db "Hello and sup!", 0

:Code to be processed
.code
start:
invoke StdOut, addr HWvariable
invoke ExitProcess, 0
end start

While in a high-level language, Python which we will be learning, it can be written as:
Code:

print "Hello and Sup!"    #everything else is done automatically :D

You noticed the difference? The high-level is much more user friendly, but much harder for the computer to understand and process; as the computer will have to take it, and translate/expand your code to a low-level one which is easier for the machine to understand.. But who cares? Let computers deal with it! Smile. The process of translating a high-level code into a low-level one is called compiling. A program which does that for you is called a compiler.
2-And Intro to Python::

Whether its Lua, or Ruby. Perl or VB. Java or C++... There is nothing as beautiful and clear as Python. The codez.... nothing can do it the way python does it...
The general philosophy of Python says:
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Readability counts.


Python is an object oriented(2), high-level, general purpose programming language. It means that you can use it to create anything that has something to do with computers. From general programs, to games, to web, to networking, to malware, to phone apps and almost anything you can ever imagine can be made with python.
To be continued.........




__________________________________________________________________________________
1: The hello world program is the first program a programmer program. The function of the program is simply printing out a "hello world" text on a console screen.
2: Object-Oriented means it can be dealt with by codes objects. This includes functions, classes, and the awesome lambda statement.


To be continued! Any questions are welcome!
avatar
A-MAN
Revolutionary Army
Revolutionary Army

A-MAN : Team A Leader
Posts : 2690
Reputation : 347
Bellies Bellies : 18841
Online
Offline


View user profile http://onepiecea-edition.yourme.net

Back to top Go down

Re: Finding your way around general programming and Python

Post by YinYangSplit on 23rd January 2013, 6:54 pm

@A-MAN wrote: program is the first program a programmer program. The function of the program is...
Uh.... scratch

Anyways, nice A-Man, but i would suggest using Visual Basic if you want to start out programming Very Happy
Visual Basic 2010 Express is a free download xD
VB code for the "Hello World":

First, go to toolbox, and drag a label onto the blank form. Go to properties, rename the label "lblHello", and delete the text.
Next, double click the blank form. You should see this:
Code:

Public Class Form1

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load

    End Sub
End Class
in between private sub and end sub, write this:
Code:
lblHello.Text = "HELLO WORLD!!!!"
Here are some pics:
easy way:

Just double click on the blank form(no need to add anything), and instead of
Code:
lblHello.Text = "HELLO WORLD!!!!"
write
Code:
MsgBox("Hello World!!")
(Not sure if this is on-topic, but its basic programming so....)

◄∞▐▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▌∞►

Billy Talent references xD
avatar
YinYangSplit
Shichibukai
Shichibukai

YinTangSplit : Team A Designer
Posts : 2528
Reputation : 159
Bellies Bellies : 20689
Online
Offline


View user profile http://yinyangsplit.deviantart.com/

Back to top Go down

Re: Finding your way around general programming and Python

Post by T.O.R.N.A.D.O on 23rd January 2013, 7:21 pm

I guess C++ would be better choice since its easy and comfortable...

◄∞▐▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▌∞►
I do not claim these signatures as my own. All Credits goes to their respective owners.
▬▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬▬▬▬▬

▬▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬▬▬▬▬
avatar
T.O.R.N.A.D.O
Yonkou
Yonkou

Posts : 2212
Reputation : 54
Bellies Bellies : 16979
Online
Offline


View user profile

Back to top Go down

Re: Finding your way around general programming and Python

Post by YinYangSplit on 23rd January 2013, 7:24 pm

C++ Might be kind of hard for beginners...They should start off with VB then move up into C++ (They're pretty similar...ish)

◄∞▐▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▌∞►

Billy Talent references xD
avatar
YinYangSplit
Shichibukai
Shichibukai

YinTangSplit : Team A Designer
Posts : 2528
Reputation : 159
Bellies Bellies : 20689
Online
Offline


View user profile http://yinyangsplit.deviantart.com/

Back to top Go down

Re: Finding your way around general programming and Python

Post by Draox on 23rd January 2013, 9:36 pm

long time i'm not do this thing (Python) bcuz this old style =_= but still cool

◄∞▐▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▌∞►


Must accept the truth in our live.
Disappear from my sight.
Stupidity can't be cured
avatar
Draox
Yonkou
Yonkou

Posts : 3872
Reputation : 137
Bellies Bellies : 26967
Online
Offline


View user profile

Back to top Go down

Re: Finding your way around general programming and Python

Post by A-MAN on 24th January 2013, 2:47 am

Whats the problem with VB: Vb programs can only be made for windows operating system, since it needs the .Net framework. And the whole world will convert to Linux soon as Wondow's is going down. Also VB's purposes aren't as much compared to Python.

The problem about C++: Python gives the programmer more time to think about the program structure itself rather than the commands. While C++ does it less. This doesn't mean C++ is hard or anything (or some people say its bad to start with it but that's wrong), its just that the code is sometimes as twice as long when compared to a Python code which does the same function. This may be sorta ok for some people but i don't think it is when you are writing large simillar to this: http://pastebin.com/jw8s10Et ... 4000 lines where hard to debug, but what do u think would've happened if they were 8000???

@Draox: Thanks! I will try to get over the basics for Cli programming, then maybe move to Gui and game programming.
avatar
A-MAN
Revolutionary Army
Revolutionary Army

A-MAN : Team A Leader
Posts : 2690
Reputation : 347
Bellies Bellies : 18841
Online
Offline


View user profile http://onepiecea-edition.yourme.net

Back to top Go down

Re: Finding your way around general programming and Python

Post by YinYangSplit on 24th January 2013, 6:11 am

Exactly, we must take advantage of VB and use it while we still can! Well, If you have alot of spare time, you could get through those 8000 lines...But then you'd probably hate the game and rage quit the programming.
Hey, It's A-Mayhem!! (The Download link doesn't work btw)
Next time i have free time im gonna mess around in Python, to see what it's like. Thumbs up!

◄∞▐▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▌∞►

Billy Talent references xD
avatar
YinYangSplit
Shichibukai
Shichibukai

YinTangSplit : Team A Designer
Posts : 2528
Reputation : 159
Bellies Bellies : 20689
Online
Offline


View user profile http://yinyangsplit.deviantart.com/

Back to top Go down

Re: Finding your way around general programming and Python

Post by Rhino.Freak on 24th January 2013, 7:38 am

we are taught c++ in school and intrestingly enough... I'm having c++'s exam on 29th ! Thumbs up!

◄∞▐▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▌∞►



'The Monster inside me is growing bigger!' *Munch-munch, chomp-chomp, gobble-gobble, gulp*
avatar
Rhino.Freak
Revolutionary Army
Revolutionary Army

Rhino.Freak - Team A Coder
Posts : 3552
Reputation : 274
Bellies Bellies : 17445
Online
Offline


View user profile http://pokegames.forumotion.com

Back to top Go down

Re: Finding your way around general programming and Python

Post by YinYangSplit on 24th January 2013, 7:46 am

Lucky. We only get taught VB -_- exam for that tmrw Very Happy

◄∞▐▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▌∞►

Billy Talent references xD
avatar
YinYangSplit
Shichibukai
Shichibukai

YinTangSplit : Team A Designer
Posts : 2528
Reputation : 159
Bellies Bellies : 20689
Online
Offline


View user profile http://yinyangsplit.deviantart.com/

Back to top Go down

Re: Finding your way around general programming and Python

Post by T.O.R.N.A.D.O on 24th January 2013, 7:48 am

I am having it on 31st. I wanted to know more about C++ coz I mostly suck at it. Sad

◄∞▐▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▌∞►
I do not claim these signatures as my own. All Credits goes to their respective owners.
▬▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬▬▬▬▬

▬▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬▬▬▬▬
avatar
T.O.R.N.A.D.O
Yonkou
Yonkou

Posts : 2212
Reputation : 54
Bellies Bellies : 16979
Online
Offline


View user profile

Back to top Go down

Re: Finding your way around general programming and Python

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum