News for hackers. Stuff that matters.
Re:A Course on Automata Theory by jimhefferon on Thursday August 20, 2015 @05:37AM (#10090802)
I'm interested to hear you say this. I teach this course, to students who mostly go on to do Java coding. I have several times run into an old student who told me that they never once used regexes after my class, either in school or in work.
Re:A Course on Automata Theory by iso8859-1 on Thursday August 20, 2015 @06:41AM (#10090979)
One reason may be that practical regexes have so many extensions that you can't many of the usual tricks on them.

http://stackoverflow.com/questions/6363397/how-to-tell-if-on...

Re:A Course on Automata Theory by brudgers on Thursday August 20, 2015 @10:24AM (#10092010)
I find it helpful to distinguish between "regular expressions" as something mathematical and "regexes" as nebulous more-than an NFA and less than a Turing complete grammar...DFA regex engines being the Platypus that proves the rule.

As soon as you have backtracking and capture groups it's not a regular expression in the mathematical sense. These features make regexes more useful in many simple cases at the cost of making them harder to reason about in more difficult cases.

Re:A Course on Automata Theory by varlock on Thursday August 20, 2015 @07:58AM (#10091257)
I'm surprised - Did you ask them how do they search for patterns? Entries in log files, function definitions or usage in code, matching files in a shell?
Re:A Course on Automata Theory by jimhefferon on Thursday August 20, 2015 @06:24PM (#10094993)
> Did you ask them how do they search for patterns? Entries in log files, function definitions or usage in code, matching files in a shell?

You know, I have. In some ways it is like communicating across cultures in that the question does not seem to make all that much sense to them. That I can tell, they don't ever search for patterns. The would look for that feature in their GUI log reading program, I suppose.

Failing that, they would write code, 100% in Java I think, and I suppose that if they had to do what I would reach for a regex to do, they would write code to do it. (Is this what jwz means by "Now they have two problems," that they should do the job in code?)

But, again, I don't think there is a real communication there. I'm not too sure what they mean and they look like they do not recognize the situations I ask about.

Re:A Course on Automata Theory by manish_gill on Thursday August 20, 2015 @05:53AM (#10090854)
That is very surprising to hear. Regular expressions are used all over the place! I wouldn't want to work with a person who does not have at least the basic workings of Regex down pat.