Live data from Hacker News

Brian Kernighan on “The Practice of Programming” [video]

youtube.com

101–110 of 117 posts

Re: Brian Kernighan on “The Practice of Programming” [video]

#101

Earlier quoted context omitted.

One of the great things about The Practice of Programming is how much it references other non-coding works. You can tell Kernighan draws his knowledge from many sources, not just technical ones.

Well one does wonder, where did the icons like BK pick up their own craft? Surely there were no programming books before computers. Which shoulders did our giants stand on?

> where did the icons like BK pick up their own craft?

They invented it and that is also why they are able to express their ideas so clearly. Small groups of smart people at various institutes/companies coming up with ideas, bouncing it off of each other, learning from each other and settling on the essence.

The mathematician Abel is supposed to have said; "It appears to me that if one wishes to make progress in mathematics, one should study the masters and not the pupils." This is true of all domains.

Re: Brian Kernighan on “The Practice of Programming” [video]

#102

I suggest you add Software Tools in Pascal to your list of books to podcast about. Also by Kernighan. I own a copy of that book and think it is good.

You might get more than you bargained for on that topic. Kernighan and Plaugher had written "Software Tools" in RATFOR. Then they wrote "Software Tools in Pascal". And then, in direct response to the experience of writing that, Kernighan wrote a paper titled "Why Pascal Is Not My Favorite Programming Language". (Because writing in Pascal should have been way easier than writing in RATFOR, and it wasn't, and Kernighan…

[deleted]

Re: Brian Kernighan on “The Practice of Programming” [video]

#103

I suggest you add Software Tools in Pascal to your list of books to podcast about. Also by Kernighan. I own a copy of that book and think it is good.

You might get more than you bargained for on that topic. Kernighan and Plaugher had written "Software Tools" in RATFOR. Then they wrote "Software Tools in Pascal". And then, in direct response to the experience of writing that, Kernighan wrote a paper titled "Why Pascal Is Not My Favorite Programming Language". (Because writing in Pascal should have been way easier than writing in RATFOR, and it wasn't, and Kernighan…

Thanks for your comment.

>You might get more than you bargained for on that topic

However, I did know about the points in your comment, mostly. [1]

That's because I happened to have read about the Tools book being first written in RATFOR (which, IIRC, stood for RATional FORtran) and then in Pascal, many years ago. I was a heavy Turbo Pascal user first, before becoming a heavy C and Unix user. And I used to keep reading the news about these subjects I was interested in. That's how I know about that topic.

[1] I said "mostly" above, because I somehow, wrongly, remembered that paper as having been written by Rob Pike, instead of by Brian Kernighan.

Re: Brian Kernighan on “The Practice of Programming” [video]

#104

Earlier quoted context omitted.

My last interview cycle I interviewed with some big names (Stripe, Square, Shopify, etc.) and was pleased that none of them asked any LeetCode style questions. All pretty practical programming stuff. Stripe had an interview where they had forked the Jackson Java library, introduced a bug, and then asked me to find and fix it. Pretty unique style, but much more applicable to the actual job of programming.

In my most recent interviews with Apple and Amazon there were no LeetCode questions after the phone screen. Quite a change from previous experience.

What are they asking these days and what positions was this for (i.e. a senior role?)

Re: Brian Kernighan on “The Practice of Programming” [video]

#105
post #72

Earlier quoted context omitted.

Is that why Go forces K&R brackets instead of letting you choose?

Maybe you already know this and your comment was in jest, but the real reason is that the Go lexer automatically inserts semicolons ( https://go.dev/doc/effective_go#semicolons ) using heuristic rules which forces the opening brace to be on the same line.

I knew that it inserts semicolons but I still don't understand why they removed semicolons entirely and forced a bracketing style. The comment was in mild jest to that maybe being the reason why

Re: Brian Kernighan on “The Practice of Programming” [video]

#106

Earlier quoted context omitted.

To your first three above, add Marc Rochkind's Advanced Unix Programming and Richard Stevens' Advanced Programming in the Unix Environment and you have got yourself a complete course in C/Unix programming which is the bedrock for everything else; C is the "lingua franca" and Unix (via its variants) the "standard" OS. Tip: Many of these old books can be had for cheap as used copies on Amazon/Betterworldbooks etc.

I bought the Stevens’ book sometime in the 90’s. I believe I still have it, but I haven’t opened it up in years or maybe even decades at this point, so my recollections might be a bit off. The book predates important developments like epoll/kqueue, so is it really a good recommendation today? Are there more modern alternatives?

There is a 3rd edition of Steven's APUE published in 2013 but i am not sure whether it covers epoll/kqueue specifically (i don't have this edition). Most probably not since these are specific to Linux/BSD. Stevens/Rochkind only cover the base Unix apis for I/O multiplexing/Asynchronous I/O (select/poll/signals/aio apis) gleaned from SUS (See https://en.wikipedia.org/wiki/Single_UNIX_Specification). You would be better off consulting the specific documentation for these system calls in its OS reference and the various articles describing/comparing them online.

For a Linux specific alternative Michael Kerrisk's The Linux Programming Interface seems pretty good.

Re: Brian Kernighan on “The Practice of Programming” [video]

#108

This book is foundational; all Programmers (especially beginners) should read it. Like all Kernighan's books, the language is simple, concise and precise focusing on the foundations/essentials with no fluff and all in a little over 200 pages. Understand the principles from the examples shown here and then apply them in your own context. The beauty of K&P's books is that they do not overwhelm you with theory but show…

> This is the smallest and simplest exposition that i know of on how to write a compiler. I haven't read Kernighan and Pike's book but another really small compiler exposition I like is Wirth's PL/0 in "Algorithms + Data Structures = Programs". A little outdated at this point, but still a very pleasant read.

Thanks for the pointer, will take a look at it. I don't believe these things become "outdated" unless you are a bleeding edge practitioner. For most of us "ordinary" Programmers what is needed is breadth over depth and a general idea of what the subject is about so that we are not entirely clueless. Depth will always come when we actually get to work on a project which needs that specific expertise.

Re: Brian Kernighan on “The Practice of Programming” [video]

#109

Earlier quoted context omitted.

>you have got yourself a complete course in C/Unix programming which is the bedrock for everything else ; C is the "lingua franca" and Unix (via its variants) the "standard" OS. Somewhat over the top comment. I may be an even stronger proponent of C and Unix than you, partly because I grew up on them, and partly because I like them, although they have their share of issues. Still, calling them the bedrock and standar…

> Somewhat over the top comment. ... Still, calling them the bedrock and standard is too much. Nope, i meant exactly what i said. The point is not popularity/commodity but understanding a domain from the foundations. I am one of the oldies who started with (in chronological order) MS-DOS, a brief foray into Mainframe COBOL, 16-bit Windows (Windows 3.1) to 32-bit Windows (Windows NT 3.51 & 4), then to Solaris/Linux an…

Corrigendum: Consulting Rochkind's 2nd edition of AUP book it says; the 1st edition included about 70 system calls while the 2nd edition includes about 300 gleaned from SUS (https://en.wikipedia.org/wiki/Single_UNIX_Specification).

Re: Brian Kernighan on “The Practice of Programming” [video]

#110

This book is foundational; all Programmers (especially beginners) should read it. Like all Kernighan's books, the language is simple, concise and precise focusing on the foundations/essentials with no fluff and all in a little over 200 pages. Understand the principles from the examples shown here and then apply them in your own context. The beauty of K&P's books is that they do not overwhelm you with theory but show…

Just ordered the true Gang of Four: * The C Programming Language * The UNIX Programming Environment * The Practice of Programming * The Elements of Programming Style I've read the C book before and also remember the writing to be excellent. I'm sure I'll pick up lots of programming wisdom but I'm also approaching this as a technical writer, figuring out what exactly makes Kernighan's books so good. I have a hunch tha…

If we're going all in on the unix lore here, I'd suggest kernnighghan's book "Unix: A Memoir" as an optional add-on. Lots of good lore and history as to "how and why" things work in such a such way. Some commands in there you may not use or maybe heard of but not fully understand, such as grep, why the word grep, why the other types of grep such as egrep. And on the topic of grep, clearly a very popular command early on, so you also get a sense of "what were seen as the core commands commonly used initially" (and whether those may be useful to you today)
Post reply on HN