Live data from Hacker News

Ask HN: Fundamental texts for serious web engineers?

news.ycombinator.com

21–30 of 37 posts

Re: Ask HN: Fundamental texts for serious web engineers?

#21
post #10

One of the most often neglected areas of study is regular expressions, they are looked at as a kind of black art by many developers, even senior developers. The reality is though regular expressions can save volumes of code when applied to certain pattern matching problems. I cannot stress enough how powerful they are. If you master regular expressions you will be ahead of 90% of developers in your ability to process…

Well I think RE's are horribly over used. I think this comes from an unjustified fear about parsers or complete ignorance that they even exist by most programmers. For example lets write a RE to recognize and extract a phone number, here is your spec: http://en.wikipedia.org/wiki/Local_conventions_for_writing_t...

Have you screamed yet, for example in the US the exact same phone number can be written like so, some of the variants I have seen:

(516)-123-4567

1(516)-123-4567

1-516-123-4567

123-4567 old fashioned but valid

1.516.123.4567

now with a parser I can use RE for the simple bits that turn a text stream into bits of data and then hand it off to the to the parser to figure out if it is a good phone number. So the lexer, where the simple RE live, can turn a stream of text into a stream of tokens that the parser can reason about, for my US example above here is the list:

1: a string of digits called NUMBER and what they are

2: a ( called LP

3: a ) called RP

4: a - called DASH

5: a . called DOT

Then I can parse the 5 things above to figure out is it a valid phone number in nice readable and maintainable code.

Doing the above also makes you much more immune to changes in the RE libs behavior, I have gotten bit by greediness changes in perl before on bug fix releases because I did not follow my above advice. Another benefit is that in 6 months is that you can figure out what you did and so can the next guy

Re: Ask HN: Fundamental texts for serious web engineers?

#22

ok, looking at programming language pragmatics it seems like you want fairly serious (university level) theory. so i don't understand why people are talking about regexps - that should be covered in a subsection (regular grammars) of one chapter of that book. anyway, for databases i would suggest date's "sql and relational theory" - it shows how sql is related to a more elegant, cleaner, underlying theoretical approa…

Speaking of Structure and Interpretation of Computer Programs (SICP), there's a good UC Berkeley course based on it up at http://www.academicearth.org/courses/the-structure-and-inter.... It's very long, but if lectures are more your learning style, you might find this very useful.

Re: Ask HN: Fundamental texts for serious web engineers?

#23
post #21
post #10

One of the most often neglected areas of study is regular expressions, they are looked at as a kind of black art by many developers, even senior developers. The reality is though regular expressions can save volumes of code when applied to certain pattern matching problems. I cannot stress enough how powerful they are. If you master regular expressions you will be ahead of 90% of developers in your ability to process…

Well I think RE's are horribly over used. I think this comes from an unjustified fear about parsers or complete ignorance that they even exist by most programmers. For example lets write a RE to recognize and extract a phone number, here is your spec: http://en.wikipedia.org/wiki/Local_conventions_for_writing_t... Have you screamed yet, for example in the US the exact same phone number can be written like so, some of…

You raise a good point, I tend to like them for parsing but they are not silver bullet for sure. They do have their weaknesses, that being said, when I use a regular expression, I always document it for myself and other developers, even if it is redundant information I document it, due to the fact that they are not readable and I tend to not like magic code.

Re: Ask HN: Fundamental texts for serious web engineers?

#24

Learn by doing. Get involved in some open source projects and start contributing. Doing that has taught me more than any book has.

Well, the OP specifically asked for texts on the fundamental subjects of CS as they relate to web development.

Since you bring up a good point though, what would be useful open source projects to contribute to if you're specifically interested in exploring deeper issues?

For myself, I remember learning about networking (and especially coding the network layer in C) and also a bit about crypto by tinkering with World of Warcraft unofficial open source servers two years ago. Wish I had the chance to contribute something back before real life took over again.

Re: Ask HN: Fundamental texts for serious web engineers?

#25
post #23
post #21

Earlier quoted context omitted.

Well I think RE's are horribly over used. I think this comes from an unjustified fear about parsers or complete ignorance that they even exist by most programmers. For example lets write a RE to recognize and extract a phone number, here is your spec: http://en.wikipedia.org/wiki/Local_conventions_for_writing_t... Have you screamed yet, for example in the US the exact same phone number can be written like so, some of…

You raise a good point, I tend to like them for parsing but they are not silver bullet for sure. They do have their weaknesses, that being said, when I use a regular expression, I always document it for myself and other developers, even if it is redundant information I document it, due to the fact that they are not readable and I tend to not like magic code.

Don't get me wrong I like REs, its just I like them like salt in my food. It is very easy to ruin the food by putting in too much salt, but put in the right amount and delicious.

Re: Ask HN: Fundamental texts for serious web engineers?

#26
post #19
post #14

Earlier quoted context omitted.

The guy says he's worked in the industry for years; presumably he knows about REST and ping. I read his plea in exactly the opposite way -- instead of learning more of (or about) these tools, he's after fundamentals. In my opinion, the "fundamentals" are just decisions made by concrete people to address concrete concerns (at the time). Understanding them is understanding the motivations behind them. So it's as much a…

In the first sentence I think you are nitpicking. After all I pointed to those tools as an aid for understanding how things work "under the hood", which is what the OP is after as far as I understand. Even if you take "ping", (which I could have as well not included in the list, as the other tools are less obvious but still tremendously useful) almost everyone knows what it's for, but fewer people know various option…

Excellent, then our posts complement each other :)

And sorry, I didn't mean to nitpick and your links are certainly useful; god knows what "years in the industry" means anyway.

Re: Ask HN: Fundamental texts for serious web engineers?

#27
post #10

One of the most often neglected areas of study is regular expressions, they are looked at as a kind of black art by many developers, even senior developers. The reality is though regular expressions can save volumes of code when applied to certain pattern matching problems. I cannot stress enough how powerful they are. If you master regular expressions you will be ahead of 90% of developers in your ability to process…

Yes, also a basic understanding of how regex works under the hood is really helpful in cementing the concept (and also understanding things like why you can't properly parse HTML with them alone). So I'm talking about stuff like NFAs (nondeterministic finite state automata) DFAs (deterministic finite state automata).These concepts are nowhere near as complicated as their names make them sound they are in fact general…

Excellent suggestion. Any literature on automata that you'd recommend?

Re: Ask HN: Fundamental texts for serious web engineers?

#29
post #27

Earlier quoted context omitted.

Yes, also a basic understanding of how regex works under the hood is really helpful in cementing the concept (and also understanding things like why you can't properly parse HTML with them alone). So I'm talking about stuff like NFAs (nondeterministic finite state automata) DFAs (deterministic finite state automata).These concepts are nowhere near as complicated as their names make them sound they are in fact general…

Excellent suggestion. Any literature on automata that you'd recommend?

He did mention the dragon book which is actually titled Compilers: Principles, Techniques, and Tools but is better known by the dragon title. It is a seminal work and still regarded today even though it is older. But it is by no means a light read, it will definitely give you a deep understanding of computing, but it's a little heavy if you just want to develop web apps.

Re: Ask HN: Fundamental texts for serious web engineers?

#30
post #27

Earlier quoted context omitted.

Yes, also a basic understanding of how regex works under the hood is really helpful in cementing the concept (and also understanding things like why you can't properly parse HTML with them alone). So I'm talking about stuff like NFAs (nondeterministic finite state automata) DFAs (deterministic finite state automata).These concepts are nowhere near as complicated as their names make them sound they are in fact general…

Excellent suggestion. Any literature on automata that you'd recommend?

I learned from reading Introduction to the Theory of Computation for a class... It's expensive though.
Post reply on HN