[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Book questions



On Tuesday, April 14, 2015 at 1:10:04 PM UTC+5:30, Petter Adsen wrote:
> On Mon, 13 Apr 2015 16:36:44 -0500
> David Wright wrote:
> > Quoting Petter Adsen wrote:
> > > On Mon, 13 Apr 2015 20:21:49 +0300
> > > Reco  wrote:
> > > > Let's see as I didn't have OS design in mind. Something like:
> > > > 
> > > > Exit codes and their value in real life.
> > > > Strings handling, memory allocation.
> > > > Process control and daemonisation (sp?).
> > > > Signal handling.
> > > > Inter-process communication (sockets, pipes).
> > > > IP protocol use and abuse.
> > > > Shared memory.
> > > > Threads.
> > > > Libraries and their usage.
> > > 
> > > Just to pipe in here, these are among the things that I want an
> > > understanding of - especially numbers 3, 4, 5, 6 and 9. With extra
> > > focus on 9 and 6b :) Also things like communication between
> > > processes and devices, file systems, etc. I want to learn how to
> > > find out why things work the way they do, if that makes sense.
> > 
> > If you want to understand the basics, there is any number of tutorials
> > on the web. If you want to play with them, then pick a language and go
> > to a web page like https://docs.python.org/3/library/index.html
> > and write some toy programs. Most of these facilities have wrappers
> > that save you having to write C code to create, say, a couple of
> > sockets that talk to each other. If you try this in C and it doesn't
> > work, it might take you half a day to decide whether you've
> > misunderstood the socket concept or just made a programming error.
> 
> I can understand that.
> 
> > As Reco said,
> > 
> > > > [...], and for the complex program you'll probably want
> > > > something else as by today's standards C has poor result/effort
> > > > ratio.
> 
> That I can also accept. I see that a lot of people advice me on going
> with something other than C, and I can understand that there are good
> reasons for this advice. While I still want to learn C at some point,
> I'm beginning to think that it might be wise to consider getting a good
> foundation in another language first.

In case it helps I saw this

| And Rob Hagan at Monash had shown that you could teach students more COBOL
| with one semester of Scheme and one semester of COBOL than you could with 
| three semesters of COBOL. 
from here https://groups.google.com/d/msg/erlang-programming/5X1irAmLMD8/qCQJ11Y5jEAJ 

What that is saying is that priming your learning curve is more 
important than what you learn. And COBOL (like C) is a terrible way to do that

And if you still need convincing that C is a painful intro to programming,
please read section 4 of
http://www.the-magus.in/Publications/chor.pdf

Beyond that what you should take up really depends on what calls you:
- python is nice if its scripts
- something else (haskell?) or maybe something more esoteric like Julia, APL
if its mathematical
- etc
ie choose a language that optimizes an area that primarily calls you

> 
> Would Python be appropriate? I see a lot of software these days that is
> written in Python, so it would be helpful in that way.

Specifically for linux system-level stuff, python will give you 80-90% of the
C level stuff at ⅕ the pain.
eg for TCP/IP networking look at  https://docs.python.org/2/library/socket.html


Reply to: