Hah, just today I started to read "Haskell programming from first principles"[1] which also targets non-programmers but builds on lambda calculus instead of assembly.
Would anyone actually recommend to a beginner to start learn assembly first?
The C book you recommended is the exact same one my mum bought for me years ago in late elementary school; I've never seen it mentioned on HN or elsewhere before so I thought I'd also vouch to its effectiveness.
Now that I think of it, I should give my mum a call :)
I've used Little Man Computer successfully to teach even very young kids (elementary school age) basics of computer architecture and a very basic assembly language. Some reading materials and a java based LMC simulator here: http://www.yorku.ca/sychen/research/LMC/
I just took a look at the "LOOK INSIDE!" sample available on amazon.com. A few observations:
The front cover says it's been "Updated for C11", but all the sample programs use "main()" rather than "int main(void)". The form without an explicit return type has been invalid since C99.
Page 11:
"In 1983, ANSI created the X3J11 committee to set a standard version of C. This became known as ANSI C. The most recent version of ANSI C, C11, was formally adopted in 2011."
That's loosely correct, but in fact the 1990, 1999, and 2011 editions of the C standard were published by ISO, not by ANSI (and later adopted by ANSI). Furthermore, it ignores the fact that the phrase "ANSI C" is commonly but incorrectly used to refer to the 1989/1990 version of the language (see gcc's "-ansi" option, for example).
Page 16:
"These are functions:
main() calcIt() printf() strlen()
and these are commands:
return while int if float"
No, those aren't "commands", they're keywords. I can't think of any reasonable meaning of the word "command" that would include "int".
Page 26:
The sample program listing is not properly indented.
Page 36:
"\b moves the cursor back a line".
No, it moves the cursor back a column.
A book for beginning C programmers should not have these kinds of errors after three editions.
If you start with assembly I would suggest not picking x86. I would suggest a RISC or virtual assembly like LLVM. x86 just has too much historic weirdness.
Like scores of other generation C64 kids by second language (after BASIC) was 6502 assembly. I think it's suitably straightforward. Although the special addressing mode for the zero page might count as a weirdness.
If you're still using string types for pathnames you may want to check out the path and path-io packages. The path package defines a Path type parameterized by its locality (absolute or relative) and type (pointing at a file or a directory).
Especially the distinction between relative and absolute paths adds a nice safety layer.
mcbuilder has already mentioned it, but I really want to emphasize that dependency management in Haskell is an entirely different story now with stack.
http://www.haskellforall.com/2012/06/you-could-have-invented...
http://www.haskellforall.com/2012/07/purify-code-using-free-...