PDA

View Full Version : How to start programming



Shadius
May 12th, 2012, 04:54 PM
Hey guys, ):P

Where would a beginner with absolutely no knowledge of programming language begin their journey into the programming world? It's very interesting to me. :)

cariboo
May 13th, 2012, 03:54 AM
Moved to a thread of it's own, as it was off topic where it was.

codemaniac
May 13th, 2012, 03:57 AM
Python would probably be the best first programming language to learn. It's the easiest and the only beginner learn-able language that is used by professionals .

billyseth
May 13th, 2012, 04:03 AM
I guess I would agree with the Python suggestion, because of its use in so many things. Perl is also easy to get into, but if you want to branch out and start studying/modifying other peoples code, it would per harder to find interesting stuff in perl

Some Penguin
May 13th, 2012, 04:14 AM
Hey guys, ):P

Where would a beginner with absolutely no knowledge of programming language begin their journey into the programming world? It's very interesting to me. :)

Have you considered reading any of the stickied threads yet?

Get used to reading documentation.

11jmb
May 13th, 2012, 04:37 AM
I guess I would agree with the Python suggestion, because of its use in so many things. Perl is also easy to get into, but if you want to branch out and start studying/modifying other peoples code, it would per harder to find interesting stuff in perl

Perl is a handy language to know. It is extremely powerful for text processing, and is an extremely popular language for scripting on the web.

BUT, Perl is not a beginners' language. I cite TIM TOWDTI and a heinous syntax as my primary reasons. I don't think Python's a perfect language, but better suited for beginners who want to learn about general-purpose processing.

codemaniac
May 13th, 2012, 04:45 AM
I don't think Python's a perfect language, but better suited for beginners who want to learn about general-purpose processing.

There was never invented a perfect language or so , one is better than the other for specific tasks and scenarios .

Some Penguin
May 13th, 2012, 04:55 AM
I guess I would agree with the Python suggestion, because of its use in so many things. Perl is also easy to get into, but if you want to branch out and start studying/modifying other peoples code, it would per harder to find interesting stuff in perl

CPAN. There's a ridiculous number of Perl modules there, some highly useful and some of which are perhaps less broadly applicable but highly entertaining.

markbl
May 13th, 2012, 05:01 AM
Perl is a handy language to know. It is extremely powerful for text processing, and is an extremely popular language for scripting on the web.

Perl's day has come and gone. There is no reason to learn perl nowadays, unless you really have to modify existing perl code. Python can do everything perl can do, but easier and neater. The library and 3rd party support for python is arguably approaching perl nowadays.

codemaniac
May 13th, 2012, 05:07 AM
Perl's day has come and gone. There is no reason to learn perl nowadays, unless you really have to modify existing perl code. Python can do everything perl can do, but easier and neater. The library and 3rd party support for python is arguably approaching perl nowadays.

Cannot give you my vote on that .Perl is like that red wine , ages beaeutifully ,and it's charm never going to fade away with time .

Bachstelze
May 13th, 2012, 05:24 AM
Perl is an abomination, almost on par with COBOL. Should be thrown in the abysses of history with a ton of concrete over it.

diesch
May 13th, 2012, 05:34 AM
Perl is a great language for when a shell script gets too complex. But for anything bigger than some admin or text manipulation scripts there are usually better languages.

markbl
May 13th, 2012, 06:16 AM
Cannot give you my vote on that .Perl is like that red wine , ages beaeutifully ,and it's charm never going to fade away with time .
Perl may have looked half ok when she was the only girl in town. It just hurts to even look at her now with young and fit Python on hand.

ofnuts
May 13th, 2012, 11:28 PM
Cannot give you my vote on that .Perl is like that red wine , ages beaeutifully ,and it's charm never going to fade away with time .Very adequate comparison. Very few red wines (none that anyone here can afford I think) last longer than a quarter century :)

codemaniac
May 14th, 2012, 08:12 AM
Very adequate comparison. Very few red wines (none that anyone here can afford I think) last longer than a quarter century :)

If we put a look at the history of programming languages , very few are there on the stage that enjoyed a mass popularity over a quarter of a century .I belive 25 years is big deal in the world of technologies that is changing at very high speed compared to other verticals .

Perl's popularity means that a lot of code has been written by people who haven't got a very tight grip of the lethal wepon. The same flexibility that allows you to write small, powerful, elegant and comprehensible code in Perl also allows people to write unintelligable like noise. ;)

ofnuts
May 14th, 2012, 09:58 AM
If we put a look at the history of programming languages , very few are there on the stage that enjoyed a mass popularity over a quarter of a century .I belive 25 years is big deal in the world of technologies that is changing at very high speed compared to other verticals .

Perl's popularity means that a lot of code has been written by people who haven't got a very tight grip of the lethal wepon. The same flexibility that allows you to write small, powerful, elegant and comprehensible code in Perl also allows people to write unintelligable like noise. ;)
Yes.... in my APL days, we called that "write-only programming".

Deepak J
May 14th, 2012, 10:05 AM
Since you want to learn programming and you've not yet done any programming till now, I would suggest you to start off with the BASIC stuff of programming.
Yep that's right - BASIC

Though its a very simple and light program its very easy to learn. Also the syntax of BASIC is not much complicated. The program will help you to perform the basic computing functions like Addition, Subtraction etc.

So go for BASIC and after that switch to the other more complex ones.

elomage
May 14th, 2012, 10:11 AM
Try an online class, where you can set your own pace.
Here is a good one:
CS101: Building a Search Engine

http://www.udacity.com/overview/Course/cs101/CourseRev/apr2012

--Leo

11jmb
May 14th, 2012, 01:48 PM
go for BASIC and after that switch to the other more complex ones.

I could not disagree more. BASIC is almost completely useless in 2012. Unless you're talking about MSVB, which I still don't like, but at least it has practical applications.

BASIC will not teach you anything that C or Python can not, and you will be learning a language that you can not apply to anything interesting. Where's the fun in that? I hate the argument that "Guru Greg learned to program using BASIC/FORTRAN in the 60's, therefore that's how everyone should learn how to program."



Try an online class, where you can set your own pace.
Here is a good one:
CS101: Building a Search Engine

http://www.udacity.com/overview/Course/cs101/CourseRev/apr2012


Agreed, but here's a better one.

http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00sc-introduction-to-computer-science-and-programming-spring-2011/

alexfish
May 14th, 2012, 11:14 PM
I could not disagree more. BASIC is almost completely useless in 2012. Unless you're talking about MSVB, which I still don't like, but at least it has practical applications.

BASIC will not teach you anything that C or Python can not, and you will be learning a language that you can not apply to anything interesting. Where's the fun in that? I hate the argument that "Guru Greg learned to program using BASIC/FORTRAN in the 60's, therefore that's how everyone should learn how to program."




Agreed, but here's a better one.

http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00sc-introduction-to-computer-science-and-programming-spring-2011/

Could not disagree more

A Basic for beginners

If a beginner an not wanting to learn a Specific IT orientated language take a look at BaCon

BaCon : although it's language is violent in terms of basic , do misunderstand its concept

Have been taking this one for a spin over last couple of months , It's very powerful , in terms of programming and gui applications
can also be used for c programming and making libs

here is a sample code of a simple web browser + a screen shot below


################################################## ##########
' No Frills ( simple web browser )
' Blagh blag
'
'################################################# ###########

TRAP LOCAL

LOCAL lib$
LOCAL sequence = -1
INCR sequence
lib$ = CONCAT$("libwebkitgtk-1.0.so.", STR$(sequence))
IMPORT "webkit_web_view_new(void)" FROM lib$ TYPE long
IMPORT "webkit_web_view_load_uri(long,char*)" FROM lib$ TYPE void
IMPORT "webkit_web_settings_new(void)" FROM lib$ TYPE long
INCLUDE "/home/alexfish/bacon/lib/hug.bac"
'SET OPTION TABLE = 1 1 full = widget expand / full ratio
HUGOPTIONS("TABLE 1 1")
INIT
window = WINDOW("Nofrills - web browser", 600, 400)
webview = webkit_web_view_new()
REGISTER(webview, 1 , 1,"show", 0, 0, 0, 0)
ATTACH(window,webview,0,0)
webkit_web_view_load_uri(webview,("http://www.google.co.uk/"))
DISPLAY
to find out more best to read through this
BaCon - A free BAsic CONverter for Unix, BSD and MacOSX (http://www.google.com/url?sa=t&rct=j&q=bacon%20linux&source=web&cd=1&ved=0CE8QFjAA&url=http%3A%2F%2Fwww.basic-converter.org%2F&ei=9ICxT-XiL8So8AOest2cCQ&usg=AFQjCNF79hG2PKHB3imIrJN3677ucKvhCQ&cad=rja)

alexfish

codingman
May 14th, 2012, 11:19 PM
check out this (http://codecademy.com) link.

Shadius
May 15th, 2012, 04:29 AM
Thank you all for your help. These links are really helpful. :)

ofnuts
May 15th, 2012, 10:06 AM
here is a sample code of a simple web browser
Here is mine:


#! /bin/bash
firefox &*

diesch
May 15th, 2012, 11:32 AM
Could not disagree more
here is a sample code of a simple web browser + a screen shot below


If that's just displaying a Webkit Webview then I'd say in Python it's easier to read:


#!/usr/bin/env python
from gi.repository import Gtk, WebKit

window = Gtk.Window(title='PyNoFrills')

webview = WebKit.WebView()
webview.load_uri("http://www.google.co.uk/")
window.add(webview)

window.connect('delete-event', lambda *args: Gtk.main_quit())

window.show_all()
Gtk.main()

markbl
May 15th, 2012, 11:54 AM
Here is mine:


#! /bin/bash
firefox &*

I think there is a typo in this? Anyhow, a better version which invokes the user's default browser (for what I think you are trying to do) is:


#!/bin/bash
exec xdg-open $*

or:


#!/bin/bash
exec python -m webbrowser $*

alexfish
May 15th, 2012, 04:13 PM
)
If that's just displaying a Webkit Webview then I'd say in Python it's easier to read:


#!/usr/bin/env python
from gi.repository import Gtk, WebKit

window = Gtk.Window(title='PyNoFrills')

webview = WebKit.WebView()
webview.load_uri("http://www.google.co.uk/")
window.add(webview)

window.connect('delete-event', lambda *args: Gtk.main_quit())

window.show_all()
Gtk.main()


Hip some times python can be easy , "BaCon" ,what this type of coding helps to understand GTK API's work , at low level , could have made the program using the FUNCTION then compiled into a .so , could even use same function's (API's) as used by python ,

also note Python requires it's own bindings for most functions , what do you do if distribute
python code and the system does not have the libpython ,, " import Gtk, WebKit"

trent.josephsen
May 15th, 2012, 05:21 PM
)

Hip some times python can be easy , "BaCon" ,what this type of coding helps to understand GTK API's work , at low level , could have made the program using the FUNCTION then compiled into a .so , could even use same function's (API's) as used by python ,
What? I'm trying to account for the fact that you're not a native English speaker but I honestly can't understand what you're trying to say. Is BaCon somehow better because it translates BASIC into C? Not much of a selling point in my opinion.


also note Python requires it's own bindings for most functions , what do you do if distribute
python code and the system does not have the libpython ,, " import Gtk, WebKit"
I do not think "bindings" means what you think it means... in any case, I don't have webkit in the first place, so your "BASIC" example would face the same problem.

All BASICs are poorly designed and (except MSVB) antiquated. There is no reason to begin with a BASIC in this day and age; Python has taken the role of lead teach-yourself-programming language, and guess what -- it's useful in the real world too! I'd suggest Python, Perl, C, C++, 68k assembly, Java, C#, or even x86 assembly (in that order) for a beginner before I'd imagine suggesting a BASIC other than VB. It's simply not a helpful or useful skill.

pavolzetor
May 15th, 2012, 10:37 PM
I have started this school year with Python (though did some programming before, I fell in love), it's really simple language and powerful too.

I suggest you to pick something, like simple game, some Gtk app or what you actually want to do. Your skills will improve much faster than learning by tutorials and books (I use this approach in my life and it works), and it will be mostly fun.

If you are running on Ubuntu, try Quickly (GI branch will be the best).

alexfish
May 16th, 2012, 12:32 AM
What? I'm trying to account for the fact that you're not a native English speaker but I honestly can't understand what you're trying to say. Is BaCon somehow better because it translates BASIC into C? Not much of a selling point in my opinion.


I do not think "bindings" means what you think it means... in any case, I don't have webkit in the first place, so your "BASIC" example would face the same problem.

All BASICs are poorly designed and (except MSVB) antiquated. There is no reason to begin with a BASIC in this day and age; Python has taken the role of lead teach-yourself-programming language, and guess what -- it's useful in the real world too! I'd suggest Python, Perl, C, C++, 68k assembly, Java, C#, or even x86 assembly (in that order) for a beginner before I'd imagine suggesting a BASIC other than VB. It's simply not a helpful or useful skill.

VB , enough said, to be good at VB then need to Know the inner bits,
Native tongue , I am as English as English could ever get , but not as in Queen's,:p

Education wise , want to have guess at that ;)

this is what the OP posted


Where would a beginner with absolutely no knowledge of programming language begin their journey into the programming worldIn my post the comment to the OP was


If a beginner and not wanting to learn a Specific IT orientated languageThink this is a Plain an English statement can get ,, Part of the journey I suppose:p

All we are doing here is suggesting "avenues to look at".

Think the cafe` a better place to debate the for and against of any Language , or Tongue

each to there own , all have strength and weaknesses , good ones get bloated with , you guessed it , bloated modules , or a sea full of cpans.;)

trent.josephsen
May 16th, 2012, 03:54 AM
VB , enough said, to be good at VB then need to Know the inner bits,
Still not an argument for learning some obscure BASIC dialect that has no connection to VB other than name -- if that's what you're trying to say. Some random BASIC-to-C translator has nothing to teach you about Visual Basic.


Native tongue , I am as English as English could ever get , but not as in Queen's,:p
My mistake. Your writing does not demonstrate fluency.


Education wise , want to have guess at that ;)
Are you asking me to guess your education level, or are you making a sarcastic comment about mine?

You're right in saying that programming languages each have their own strengths and weaknesses. What I'm saying is that BASIC has no strengths that aren't better exemplified in some other language, and countless weaknesses that discredit it from consideration as a language for any purpose -- academic or otherwise. Once again, not counting VB, whose lone strength is its own market share.

AustenG
May 16th, 2012, 04:08 AM
I'm currently in the field of physics, and I found myself asking this same question when I began research. It's enormously daunting to attempt to learn everything completely on your own. What is most helpful is to find a group of friends who enjoy programming - learning from your peers is important.

As far as languages go, I think it's probably wise to learn 1 language like python (or very similar to it; *interpreted*), and 1 language like c++ (*compiled*). I think this will maximize your ability to pick up new languages from a syntax standpoint, but most importantly from a programming standpoint - as c++ and python nicely sample the space of program structure.

What's also important for me is marketability. I'm ultimately looking for a job in physics or in some other technical field, so I want to consider what employers may want. From what I can tell, I think the c++/python strategy (with bash, html, and maybe even an advanced typesetting program like latex thrown in) would be a pretty good plan.