You are not logged in.

#51 2013-02-12 17:41:50

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: learn programming.

theGunslinger wrote:

Linus is feeling pretty strongly about using goto being bad is just a myth.

Yes, and I agree with him.  But, he is talking about in the context of the kernel.  The kernel is a strange place.  glib is not available.  Stack space is very limited.  Memory allocation is a pain.  It  is highly re-entrant . It is preemtable.  Page faults are not allowed.  Memory leaks are catastrophic and cause instability of the system.  It has to be fast.  It has to be rock solid. 

Look at page 33 of "Linux Device Drivers" http://lwn.net/images/pdf/LDD3/ch02.pdf.  It has a good argument for the use of goto statements in the kernel when handling unregistering and deallocating kernel functions and resources.  Actually, the book is an excellent read for anyone wanting a glimpse behind the curtain that hides the kernel.


Regardless, I have seen (and written) hideous code using goto.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#52 2013-02-12 18:03:04

theGunslinger
Member
Registered: 2011-05-20
Posts: 300

Re: learn programming.

ewaller wrote:
theGunslinger wrote:

Linus is feeling pretty strongly about using goto being bad is just a myth.

Yes, and I agree with him.  But, he is talking about in the context of the kernel.  The kernel is a strange place.  glib is not available.  Stack space is very limited.  Memory allocation is a pain.  It  is highly re-entrant . It is preemtable.  Page faults are not allowed.  Memory leaks are catastrophic and cause instability of the system.  It has to be fast.  It has to be rock solid. 

Look at page 33 of "Linux Device Drivers" http://lwn.net/images/pdf/LDD3/ch02.pdf.  It has a good argument for the use of goto statements in the kernel when handling unregistering and deallocating kernel functions and resources.  Actually, the book is an excellent read for anyone wanting a glimpse behind the curtain that hides the kernel.


Regardless, I have seen (and written) hideous code using goto.

Thanks, will look into it. Seems like a great read.

Offline

#53 2013-02-12 19:47:56

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: learn programming.

Here are some beautiful and elegant goto statements I've written: sourceforge.net/p/beeball/code/ci/2ea1d … ll.c#l2437

I just love telling programmers that I use goto statements and seeing thei reactions. big_smile

Offline

#54 2013-02-14 00:15:49

Skyre
Member
Registered: 2013-02-13
Posts: 2

Re: learn programming.

I would suggest python, as it is my first language too and  is insanely easy to learn. What helped me progress a little bit further was trying out some of the problems on ProjectEuler. I'm learning Java and C right now and the sort of mindset that I gained from python really helps me out.

Offline

#55 2013-02-18 21:54:37

Pougnet
Member
Registered: 2013-02-18
Posts: 11

Re: learn programming.

If you want a more organized way to learn, I would recommend checking out Coursera.org. They offer free online courses and have a lot in the field of computer science.

Offline

#56 2013-02-18 22:56:04

Cavedude
Member
Registered: 2011-12-21
Posts: 45

Re: learn programming.

Learn the basic concepts of programming through python and then move down to a lower level language like C. That's what I've done.

Offline

#57 2013-02-18 23:18:01

I am Gianluca
Member
From: London, UK
Registered: 2011-05-22
Posts: 195

Re: learn programming.

Learn how to programming will help me on my Linux user life?
Sometimes I found difficult to understand how GNU/Linux works, how to use the terminal to automatise some tasks or what are benefits of some changes on Linux kernel or Arch infrastructure.
Could learn Python and maybe later on C, help me on reach those goals?
Apologies for the silly question but I've never studied programming in my life and perhaps the closest experience I had with it is with LaTeX.


Laptop: Acer Aspire S3 | Linux Mint Cinnamon 64-bit

Offline

#58 2013-02-18 23:28:41

blackout23
Member
Registered: 2011-11-16
Posts: 781

Re: learn programming.

Understanding shell scripting is really helpful on Linux as a start.  I bought "Linux Command Line and Shell Scripting Bible" by Richard Blum. It's ~ 850 pages strong and also covers other shell like ZSH.

Python is really easy to learn and you will quickly see some progress which is important in my opinion when learning something new.
Having Shell, Python and C knowledge doesn't hurt and is probably a good combo.

Last edited by blackout23 (2013-02-18 23:32:16)

Offline

#59 2013-02-19 08:18:29

jakobcreutzfeldt
Member
Registered: 2011-05-12
Posts: 1,041

Re: learn programming.

I'm going to change gears here and also recommend finding some books on basic computer science / informatics topics, such as data structures and algorithms. I strongly believe that some amount of formalized theory supplements any practical education greatly and it's something I try to do whenever I learn a new topic.

Offline

#60 2013-02-23 05:32:28

warriorfrog
Member
Registered: 2013-02-23
Posts: 2

Re: learn programming.

RIT publishes a good deal of their course material online, and speaking from experience it is mostly well written most of the time. The CS1-3 will be in java, RIT switches to C++ for CS4.

http://www.cs.rit.edu/~vcss231/

They have course notes from 12 different CS1 classes up as well as all the labs for the class. Some of it will not be relevant (instructions on how to submit you work, anything having to do with the solaris, etc) but not a terrible resource for getting a series of tasks in a learning friendly order.

Offline

Board footer

Powered by FluxBB