You are not logged in.

#26 2007-12-23 17:42:11

gazj
Member
From: /home/gazj -> /uk/cambs
Registered: 2007-02-09
Posts: 681
Website

Re: Languages for a newbie?

Thanks for all your continued input.  I must admit I can already look at a bit of bash script, or even python that someone else has written and usually work out what I need to hack around with to get the result I'm looking for.  Although I don't think I could write anything from scratch, (well only the most basic bash).  I have tried a little C++ since starting this thread (which I do get so far), and I think I will try a little of all others mentioned here,  I'm sure just like distro's ans wm's, people give good advice that is worth listening to, but you have to dabble yourself to find your own niche.

Thank you all very much for your input smile

Offline

#27 2007-12-23 18:16:21

lloeki
Member
From: France
Registered: 2007-02-20
Posts: 456
Website

Re: Languages for a newbie?

for your bash-fu (and sed&awk), take a peek at the unix grymoire. it's really (really, really!) a must read and an excellent point of reference, either for a beginner or for an advanced shell scripter.

one day someone gave me that general rule of thumb: any shell script that doesn't fit on one or two screens should be written in something else (e.g python for me).


To know recursion, you must first know recursion.

Offline

#28 2007-12-23 23:03:39

Bob-Hur
Member
Registered: 2007-12-09
Posts: 43

Re: Languages for a newbie?

gazj wrote:

Hi All

From about the age of 9 when i got my C64,  I immediately got into the powerful!! roll language of basic.  To be honest I got very good at it for my age (9 remember), then I hit about 13, became a teenager, generally got in trouble interested in girls etc etc and I left the whole world of programming alone.  Until... well now really at the age of 26.

End of the life story, my basic question is this, what language is going to be of most advantage for me to try and learn, and which language will I already be at an advantage with because of my basic background? If any?!?!

Cheers

Sounds a bit like me ... except that I'm 55. I haven't done any programming in many years and I'm retired, so my choices don't have any career orientation.

I've had a real problem wrapping my head around OOP. It isn't that I don't (somewhat) understand the idea, it's that the little man inside my head keeps saying "I could do that a lot more cleanly in Pascal" or "don't modify that here you pretzel-logic fool, go back to the original class/method and change it there!" Clearly I have a lot to learn, so I looked for a language that encourages me to stay in the OOP paradigm without it being too arcane for me to grasp. I think Ruby might be the right choice for me. The Poignant Guide mentioned earlier in this post is a lot of fun.

Meanwhile I got a new box and started playing with 64-bit Linux, and found Arch. Ruby will have to wait for now, I have a new toy. big_smile

And some day I'll wade through Emacs so I can try to learn Lisp. It's all good.

Offline

#29 2007-12-24 00:21:49

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Languages for a newbie?

Everyone who aspires to be a programmer for any reason should learn C++ and it's pointers. There's nothing more relaxing, more stress free, then having your first program that should print "2" on the console make your printer spew out random characters, freeze your mouse, remap your keyboard, and change the screen resolution of your monitor.

Offline

#30 2007-12-24 00:40:25

crouse
Arch Linux f@h Team Member
From: Iowa - USA
Registered: 2006-08-19
Posts: 907
Website

Re: Languages for a newbie?

lloeki wrote:

for your bash-fu (and sed&awk), take a peek at the unix grymoire. it's really (really, really!) a must read and an excellent point of reference, either for a beginner or for an advanced shell scripter.

one day someone gave me that general rule of thumb: any shell script that doesn't fit on one or two screens should be written in something else (e.g python for me).

ROFL, well then I guess I break ALL the rules then don't I  wink  jbsnake and I wrote a bot in bash, with many many modules... all in bash, I can't begin to guess how many lines of code there actually is.(58k)... but it's way more than two screens lol.  Why did we ???  Just because we could tongue  smile

https://sourceforge.net/projects/bbots/

Sounds like a goofy rule you abide by, if you ask me big_smile

Offline

#31 2007-12-24 18:03:17

lloeki
Member
From: France
Registered: 2007-02-20
Posts: 456
Website

Re: Languages for a newbie?

skottish:

should learn C++ and it's pointers

s/++// : C++ is (supposed to be) an object oriented language, pointers shouldn't even "exist" in this realm. That's purely C stuff you're referring to smile

crouse: heh, aren't rules meant to be broken? smile that said, you will certainly and nonetheless agree that things like namespaces, modules, exceptions, compilation and such are a great advantage for performance, efficiency, reusability and debugging, not to mention that shell programming incurs lots of subshell forking, at least via $() or ``.


To know recursion, you must first know recursion.

Offline

#32 2007-12-25 03:19:55

pauldonnelly
Member
Registered: 2006-06-19
Posts: 776

Re: Languages for a newbie?

Bob-Hur wrote:

I've had a real problem wrapping my head around OOP. It isn't that I don't (somewhat) understand the idea, it's that the little man inside my head keeps saying "I could do that a lot more cleanly in Pascal" or "don't modify that here you pretzel-logic fool, go back to the original class/method and change it there!" Clearly I have a lot to learn, so I looked for a language that encourages me to stay in the OOP paradigm without it being too arcane for me to grasp.

Sometimes when you're thinking that you could do something more cleanly without objects, you're right. Don't force it when it doesn't make sense to. There's no reason to get objects involved until you want to do run-time dispatch based on types, e.g. you've got a bunch of things you want to draw to the screen with the same command. I find that objects really come into their own when you're bridging your algorithms to your data. For example, you've got an algorithm that decides which shapes to draw, based on whether they are occluded or not. This is a boundary between algorithm, which to draw, and data, the shape/size of the shapes. Always keep in mind that something like the following pseudocode

function draw (object) {
    case type_of(object) {
    square:
         # Draw a square based on the square's corners.
    circle:
         # Draw a circle based on its center and radius.
    }
}

is generally equivalent to the OOP in most languages. Java-style OOP just turns type-based dispatch inside-out, putting the functions "inside" the object and automates part of the process (no more writing case statements by hand). OOP's crucial aspect, the ability to answer the question "How does this work" with the answer "I don't care", is present even in this simple example. That crucial aspect is present in other programming paradigms too. In a well-designed interface based on functions, such as OpenGL, for example, the programmer still doesn't need to worry about the actual implementation. Only that there is some system for rendering graphics and there is a well-defined set of things you can ask it to do.

If functions are a better solution, don't try to squeeze them into objects. It's often best to start prototyping with global variables and a few functions, then to pack them all into objects when it becomes obvious that doing so will make your life easier.

Offline

#33 2007-12-31 04:27:52

Bob-Hur
Member
Registered: 2007-12-09
Posts: 43

Re: Languages for a newbie?

Paul,

Thank you very much for your explanation, it has really helped. I believe that I couldn't see the benefits of OOP largely because I didn't consider why and in what circumstances it might be useful.

Offline

#34 2008-01-08 20:05:29

cyberdune
Member
From: Earth/Europe/Netherlands
Registered: 2008-01-06
Posts: 8

Re: Languages for a newbie?

It depends on what is your dream...

_ALWAYS_ start using the shell. Become familiar with its concepts, variables and idioms.
I like working with X because its handy to have 10 opened shells on one screen ;-)
You'll see you could do most tasks with it and get familiar to coding.

Then think about what you want to do next after the basics.

Doing stuff with systems and memory-efficient stuff, etc... - learn C. The only way to go! Never learn right C++
Doing stuff with interopability and big scalalable things (databases, etc), use JAVA (think about you portemonaie).
Doing stuff with nice and small nifty apps and scripts and smaller GUIs with focus on interopability, easy set up and nice features - just PYTHON or RUBY are the way to go.

Other good stuff like smalltalk, eiffel, lambda, etc prolong to small specialized niches (Plan 9, Science, etc), or better come into place if you are interested in the things behind coding - the concepts and algorhythms, etc.

Use C++ if you are really good in C and dont like interpreted languages, but need some OOP-stuff.
But even there, I would recommend bytecoded JAVA or PYTHON nowadays.
I like Ruby more than Python, but thats just a brain thing. Most western people tend to like python more.

Greetings

Last edited by cyberdune (2008-01-08 20:11:12)

Offline

#35 2008-01-09 15:26:53

buttons
Member
From: NJ, USA
Registered: 2007-08-04
Posts: 620

Re: Languages for a newbie?

Python.

It teaches you beautiful code.  In the end, this is really what matters.

Also, it's a gateway drug.  The first time I realised what a list comprehension was my entire programming life changed.


Cthulhu For President!

Offline

Board footer

Powered by FluxBB