Page 1 of 2 [ 30 posts ]  Go to page 1, 2  Next

Abgal64
Velociraptor
Velociraptor

User avatar

Joined: 16 Aug 2011
Age: 31
Gender: Male
Posts: 408

26 Aug 2011, 6:23 pm

Hello, I am a newbie and I want to begin programming. I was wondering what programming language I should learn; I use Ubuntu on an Acer laptop for the record and want something compatible with it as I do not use Windows and Mac very frequently (though I can use the both acceptably for average things.)

What I want to do first with whatever programming language I learn is to make a clock that tells base 16-adic (hexadecimal without a zero) time, basically like the hexclock of Nystrom save that noon is 7GG instead of 800 and so on. I will move on from there when I get done.

I have read about it and I think Python would be the best choice but I was wondering if anyone here had any other ideas or could just point me to places to learn it online. I am also interested in learning a visual programming language and wonder which VPL would be the easiest to learn, either before or after Python or another text based programming language.

I think that I am very good at teaching myself things and in solving complex problems so I think I could teach myself a programming language if I put the effort into learning it that I did with learning Sumerian.

Thanks for the help! :D



Oodain
Veteran
Veteran

User avatar

Joined: 30 Jan 2011
Age: 33
Gender: Male
Posts: 5,022
Location: in my own little tamarillo jungle,

26 Aug 2011, 7:11 pm

python is definately a nice starting language, it didnt take long for me to feel comfortable programming in it.

here is a decent "taster" of python, it explains the basics that apply to most languages using python and gives you enough info to start a serious tutorial, it took me a acouple of hours or so.
it has a nice collection of links too.

learning python for the complete noob.


_________________
//through chaos comes complexity//

the scent of the tamarillo is pungent and powerfull,
woe be to the nose who nears it.


AspieWolf
Veteran
Veteran

User avatar

Joined: 25 Apr 2010
Age: 78
Gender: Male
Posts: 657
Location: Out of my mind. Back in 10 minutes.

26 Aug 2011, 8:24 pm

What? There are other programming languages besides Fortran IV? Surely that is not possible! What else could you possibly want?

OK, that was the first one I learned back in 1963-64 when I was just starting to program. Seriously though, I agree with Oodain that Python would be a good starting place. That's the one I use these days.


_________________
"A man needs a little madness...or else...he never dares cut the rope and be free."
Nikos Kazantzakis, ZORBA THE GREEK

Some of us just have a little more madness than others!


xowe
Blue Jay
Blue Jay

User avatar

Joined: 4 Aug 2011
Age: 46
Gender: Male
Posts: 81

26 Aug 2011, 9:41 pm

My Favorite language is PHP right now. I get a kick out of building a web page that interactive and usefull and ties all sorts of info together. Of course, for PHP to be really useful, you need to know HTML and SQL, and a little Javascript.

I've only had minor dealings with Python so I cannot really say good or bad, but I have always found the open source languages to be a lot better in both documentation and intuitiveness.

I guess its more about what you want to do with it... If you want to make web pages go with PHP... If you want to do scripting start with the shell languages and move up to python and perl.

Cheers!



JWS
Velociraptor
Velociraptor

User avatar

Joined: 14 Apr 2011
Age: 55
Gender: Male
Posts: 448
Location: The mountains of eastern Kentucky

26 Aug 2011, 11:15 pm

Have you ever tried Squeak?
It is a pure object- oriented programming language that will run on any platform (including linux). It has a colorful interface, and is kinda neat.
By the way, I could use more instruction on how to program in any language, myself!
Hope this might help you.

JW


_________________
An Asperger's man who has Autism Spectrum Disorder level 1- mild, with a sprinkling of Synesthesia. :-)


Ilka
Veteran
Veteran

User avatar

Joined: 7 May 2011
Age: 52
Gender: Female
Posts: 1,365
Location: Panama City, Republic of Panama

27 Aug 2011, 7:09 am

Hi Abgal64! What a coincidence! I am learning programming myself! My husband, who is a very good programmer, after considering a lot of factors, told me the best way to start was python. I am learning python right now. I am reading 2 books to start.



xowe
Blue Jay
Blue Jay

User avatar

Joined: 4 Aug 2011
Age: 46
Gender: Male
Posts: 81

27 Aug 2011, 8:27 am

JWS wrote:
Have you ever tried Squeak?
It is a pure object- oriented programming language that will run on any platform (including linux). It has a colorful interface, and is kinda neat.
By the way, I could use more instruction on how to program in any language, myself!
Hope this might help you.

JW


I've never seen Squeak... looks a little like Java: cross platform using a Virtual machine. Is it better/worse then Java? Java was a pain in the ass when I tried it like 5 years ago... and the Blackberry Enterprise servers have a Java component which constently causes us problems.

:)



Abgal64
Velociraptor
Velociraptor

User avatar

Joined: 16 Aug 2011
Age: 31
Gender: Male
Posts: 408

27 Aug 2011, 3:46 pm

Thanks everyone!

I am learning Python now and it is very easy, save one minor issue: When I run Python in the terminal, it acts on my commands: e.g., I input 16 ** 2 and press the enter key, I get the output of 256, like I am supposed to. But when I use it in Gedit, which allows me to run multiple-line programs, nothing happens when I press enter. So I was wondering if anyone who knows anything about Gedit could explain how to get it to act on my commands. Sorry if I am not being clear enough, but I do not know much PL jargon (though I am rapidly learning :wink: ) but what I think I am trying to say is: How do I get Gedit to interpret/execute my Python input, as the my Ubuntu terminal does? I am trying to figure it out as I write this but this newbie would greatly appreciate any help.

Finally, after I learn Python, I would like to learn a visual programming language, one that is freeware; I just like the idea of stretching my mind a bit with a non-text based PL and VPLs look as if they would probably be very helpful in helping in my understanding of computing, much in the same way that learning a sign language would be very helpful in understanding linguistics. So, if anyone has any suggestions, please let me know!

Thanks again all!



Gnonymouse
Snowy Owl
Snowy Owl

User avatar

Joined: 26 Aug 2011
Age: 38
Gender: Male
Posts: 145

27 Aug 2011, 7:05 pm

I recommend you use a real IDE like Eclipse.



mglosenger
Velociraptor
Velociraptor

User avatar

Joined: 19 Aug 2011
Age: 151
Gender: Male
Posts: 445

27 Aug 2011, 8:04 pm

Ubuntu and Unix in general are basically written entirely in C, so that would be a natural fit as well. C is more 'direct' than Python so it will probably take more time to learn but once you do you'll be able to do basically anything with it. There is also C++, which is C with more features (object-oriented programming being a big one), and C# which is basically Microsoft's version of Java, although it seems MS is moving away from C# themselves now..

Python is a good way to start, I myself started on Applesoft BASIC which is the super-simple Python of its day, then went to Turbo Pascal which is more powerful and flexible and then to C/C++.

Once you know certain general concepts of programming (computer science in general really), you can program in any language easily enough. Python is good but it ultimately won't be as fast and flexible as languages like C/C++. Depending on what you want to do, though, you may not care :)



nelfin
Emu Egg
Emu Egg

User avatar

Joined: 27 Aug 2011
Gender: Male
Posts: 1

28 Aug 2011, 1:08 am

Joined the forum just to answer the OP's question (then got knocked back about not being able to post URLs, so please forgive the fact that they aren't hyperlinks)

@Abgal64:

gedit is just a text editor, so while it has features for syntax highlighting and automatic indentation, it doesn't interpret Python code. When you invoke python in the terminal without any arguments it goes straight into interactive mode, a la:

Code:
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 16**2
256
>>>


In order to get python to execute your script, save it in gedit (as say, script.py), then open a terminal, cd to the directory you saved the script and invoke python with
Code:
python script.py


Another method, which is applicable to other interpreted languages as well, is to use a shebang (Wikipedia: Shebang (Unix) )

Add the line
Code:
#!/usr/bin/env python
to the top of your script, mark it as executable:
Code:
chmod +x script.py
, and execute it with
Code:
./script.py


The official Python documentation has a good tutorial located here: (docs dot python dot org -> tutorial)

With regard to editors or IDEs, Eclipse is definitely too heavy for a single script if you're just starting out, though it's indispensible if you were working on a large Java or PHP (or even C, I've heard good things about CDT) project. Gedit, scite, emacs, or (my favourite, shoot me!) vim are all great text editors for small projects.

As to languages, I've often recommended Python to my friends if they have asked me about starting programming, as it's very easy to pick up, promotes a few good practices (commenting, docstrings, consistent indentation, etc.) is strongly typed, but clever enough to mask that from most users, and has a very large standard library. Learning Java or C would definitely be looked upon favourably if you were looking for employment. Ruby, PHP, Python, Perl, Lisp, ... the more languages you learn, the easier it is to learn another.

Finally, MIT has a great set of courses on Computer Science and programming (OpenCourseWare is great in general), that you can find here: ocw dot mit dot edu



Koan
Snowy Owl
Snowy Owl

User avatar

Joined: 13 Aug 2011
Age: 40
Gender: Male
Posts: 151
Location: United States

28 Aug 2011, 10:49 am

If you really want to learn programming, you should learn or have a look at everything. Once you learn one language, you can understand the second without much difficulty, and once you know two you will have enough of a grasp of differences/similarity to roughly follow any language at a glance.

I would say learn a good C-style first (Java, python, C/C++), then maybe a Basic family language like Visual Basic. Then have a look at others, and eventually work in a little assembly so you really understand how it all works underneath. This will let you write better code in "higher level" languages and troubleshoot problems better. I was in one of the last programs that taught everything from Java and Visual Studio down to BAL (Assembly). We had one class with a real old schooler who made us convert ASCII to EBCDIC assembly instructions by hand, write a simple assembly program by hand, and then track all of the registers through each instruction with paper and pencil!! But you can bet your bits we learned more than anyone else. :)

I personally found it really easy to teach myself QBasic (My first programming, after I found an outdated programming book on my dad's book shelf). M$ Visual Studio is really pretty easy and great for more rapid development if security and pure efficiency aren't paramount (not doing encryption, cracking, or calculating pi). Java has always seemed buggy, picky, somewhat unpredictable across multiple platforms even with a cross-class object/GUI kit, and it doesn't seem to scale up very well.

Sorry if I'm rambling. I'm having coffee for the first time in months. 8O



JWS
Velociraptor
Velociraptor

User avatar

Joined: 14 Apr 2011
Age: 55
Gender: Male
Posts: 448
Location: The mountains of eastern Kentucky

28 Aug 2011, 12:38 pm

xowe, I never tried programming in Java, so I don't really know what to tell you, there.
I just know Squeak is a modern, free form of Smalltalk 80, And it was designed to teach children to program, so is very easy to learn.
I haven't really done much with it for over a year, but I did do a little "playing around" with it. I like it, personally.
I guess I tried to start out too big with it. Wanted to write an operating system, but that's a LOT of work! :D I'll probably get started back with it, but it might take a while.
Anyway, it IS a nice clean, easy language. So give it a try!

JW


_________________
An Asperger's man who has Autism Spectrum Disorder level 1- mild, with a sprinkling of Synesthesia. :-)


Abgal64
Velociraptor
Velociraptor

User avatar

Joined: 16 Aug 2011
Age: 31
Gender: Male
Posts: 408

28 Aug 2011, 4:42 pm

nelfin wrote:
Joined the forum just to answer the OP's question (then got knocked back about not being able to post URLs, so please forgive the fact that they aren't hyperlinks)

@Abgal64:

gedit is just a text editor, so while it has features for syntax highlighting and automatic indentation, it doesn't interpret Python code. When you invoke python in the terminal without any arguments it goes straight into interactive mode, a la:
Code:
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 16**2
256
>>>


In order to get python to execute your script, save it in gedit (as say, script.py), then open a terminal, cd to the directory you saved the script and invoke python with
Code:
python script.py


Another method, which is applicable to other interpreted languages as well, is to use a shebang (Wikipedia: Shebang (Unix) )

Add the line
Code:
#!/usr/bin/env python
to the top of your script, mark it as executable:
Code:
chmod +x script.py
, and execute it with
Code:
./script.py


The official Python documentation has a good tutorial located here: (docs dot python dot org -> tutorial)

With regard to editors or IDEs, Eclipse is definitely too heavy for a single script if you're just starting out, though it's indispensible if you were working on a large Java or PHP (or even C, I've heard good things about CDT) project. Gedit, scite, emacs, or (my favourite, shoot me!) vim are all great text editors for small projects.

As to languages, I've often recommended Python to my friends if they have asked me about starting programming, as it's very easy to pick up, promotes a few good practices (commenting, docstrings, consistent indentation, etc.) is strongly typed, but clever enough to mask that from most users, and has a very large standard library. Learning Java or C would definitely be looked upon favourably if you were looking for employment. Ruby, PHP, Python, Perl, Lisp, ... the more languages you learn, the easier it is to learn another.

Finally, MIT has a great set of courses on Computer Science and programming (OpenCourseWare is great in general), that you can find here: ocw dot mit dot edu
Just one question: How does one use the cd command in the terminal to open my file?

And thank you for the links, I shall be sure to look at them right away.

EDIT: Never mind, I figured out the directory thing after looking at Wikipedia.



Tom_Kakes
Deinonychus
Deinonychus

User avatar

Joined: 15 Jul 2011
Gender: Male
Posts: 342

28 Aug 2011, 5:12 pm

Abgal64 wrote:
nelfin wrote:
Joined the forum just to answer the OP's question (then got knocked back about not being able to post URLs, so please forgive the fact that they aren't hyperlinks)

@Abgal64:

gedit is just a text editor, so while it has features for syntax highlighting and automatic indentation, it doesn't interpret Python code. When you invoke python in the terminal without any arguments it goes straight into interactive mode, a la:
Code:
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 16**2
256
>>>


In order to get python to execute your script, save it in gedit (as say, script.py), then open a terminal, cd to the directory you saved the script and invoke python with
Code:
python script.py


Another method, which is applicable to other interpreted languages as well, is to use a shebang (Wikipedia: Shebang (Unix) )

Add the line
Code:
#!/usr/bin/env python
to the top of your script, mark it as executable:
Code:
chmod +x script.py
, and execute it with
Code:
./script.py


The official Python documentation has a good tutorial located here: (docs dot python dot org -> tutorial)

With regard to editors or IDEs, Eclipse is definitely too heavy for a single script if you're just starting out, though it's indispensible if you were working on a large Java or PHP (or even C, I've heard good things about CDT) project. Gedit, scite, emacs, or (my favourite, shoot me!) vim are all great text editors for small projects.

As to languages, I've often recommended Python to my friends if they have asked me about starting programming, as it's very easy to pick up, promotes a few good practioces (commenting, docstrings, consistent indentation, etc.) is strongly typed, but clever enough to mask that from most users, and has a very large standard library. Learning Java or C would definitely be looked upon favourably if you were looking for employment. Ruby, PHP, Python, Perl, Lisp, ... the more languages you learn, the easier it is to learn another.

Finally, MIT has a great set of courses on Computer Science and programming (OpenCourseWare is great in general), that you can find here: ocw dot mit dot edu
Just one question: How does one use the cd command in the terminal to open my file?

And thank you for the links, I shall be sure to look at them right away.

EDIT: Never mind, I figured out the directory thing after looking at Wikipedia.


If you get bored of gedit you might like to try nano. It's a great text mode editor for beginners and will help you get used to using the terminal. Just replace any "gedit" command with "nano" (both w/o quotes)



xowe
Blue Jay
Blue Jay

User avatar

Joined: 4 Aug 2011
Age: 46
Gender: Male
Posts: 81

30 Aug 2011, 9:38 pm

Gedit? Nano? come-on... you can't call yourself a linux programmer unless you can use vi

Just kidding, I wouldn't inflict Vi on anyone :)