tags:

views:

1669

answers:

37

Would you hire a developer who doesn't know how to use regular expressions?

That's about it, please state your reasons for or against, and feel free to give different answers for different situations. Just try to break up your answers if you can.

+29  A: 

Well, does he at least know what they are? If not, no. If so, then probably because no one can be an expert in everything, but if he has at least an understanding of the purpose, then he can look up syntax.

n8wrl
I agree. Not having heard of regular expressions at all is symptomatic of other problems...
Robert Venables
I cannot agree. I have two 'understudies' (both fresh out of college) and what each of them knows of RE and patterns has primarily been though exposure to local work projects in our IT center -- they both have other skills of course, and neither is an idiot. Working with promising personnel that have a clue about OOP is much more important than working with folks who've had exposure to the myriad of available development tech. Smart folks are trainable, and I'll take that most anyday.
Hardryv
One of the things i'm noticing is the variety of 'fundamentals' candidates may or may not have. OOP wasn't even in the curriculum when I got my CS degree in '86, but regular expressions and therefore FSA's, parsing, lexing, etc. were. All of these are still important today. While it's true that anything can be learned, you don't want to hire someone where _everything_ has to be.
n8wrl
PTBNL
+8  A: 

Yes, although regular expressions are a powerful tool knowing them does not make or break a good developer.

There are many other important aspects of computer science developers must know to be a good hire.

Dan
+13  A: 

If you develop BIOSes, I doubt there's much need for regexes. The same obviously goes for most, if not all, embedded situations.

balpha
liori
+1  A: 

Just teach him or her how to use them. They are not that hard. But which developer does not know regular expressions? If he/she likes to know how they work, he/she just uses that Holy Google.

Time Machine
+3  A: 

It would depend on the situation. Many languages do not support regular expressions (for example MS SQL or MASM) so there would be no point in asking about regular expressions in an interview for an embeded ASM programmer.

BoltBait
+3  A: 

Sure, why not? Regular expressions is something that people who had experience with sysadmin and/or Unix often have contact with. But a developer used to Windows, for example, might rarely come into contact with it.

Daniel
Exactly...and I wouldn't hire them.
pbreitenbach
Then you are looking for a programmer with Unix or sysadmin experience, and not just a good programmer.
Daniel
+3  A: 

Of course! I've hired a few kids out of college who had just never been exposed to that world. I've also worked with excellent developers who have just never had a need.

Now, if we were talking about server admins, or maybe web programmers who claimed Perl experience, I would think twice. It depends a lot on the job.

Chris Arguin
+1  A: 

Basically, it depends.

If they are straight out of school, then I would - I don't think all (or really, that many) schools get into regular expressions, so you might be missing some decent junior candidates that way.

If they have been working for a while, then no.

stevedbrown
A top young candidate should be curious and motivated enough to expose themselves to RegEx whether or not it was taught in class. I think that's one of the main points of the argument: it's not that RegEx is necessary for the job, it's that knowledge of it demonstrates curiosity and expertise.
pbreitenbach
+1  A: 

I did an IT diploma and did not know what a regular expression was when I got hired for my first job. I quess it would depend on the level of the position you are looking to hire for. I would be very hesitant to hire a senior developer who did not know what a regular expression was. Not so much a junior developer. Most of these things are learned through hands on experience.

Hunter
+48  A: 

Does the job require knowledge of regular expressions? Would you eat at a steakhouse where the cook didn't know how to bake cakes?

Jon Galloway
Nicely said! Would you go to a whorehouse that couldn't make a decent martini?
Patrick McDonald
@Patrick - Yes.
Sean Bright
That would depend if I wanted desert after my supremely cooked steak :P
BenAlabaster
@Patrick - Half the bars can't make a decent martini, so I wouldn't expect that a whorehouse could :P
BenAlabaster
+1 Regular expressions are overrated--much like that cake.
Fake Code Monkey Rashid
@Patrick: No.... because I don't care for whores, and if they can't make martinis *either*, then what's the point?
Mark
+82  A: 

Yes, if they were a solid programmer otherwise.

Regular expressions are a very simple thing to teach provided you have a person of sufficient skill. It's much easier to teach a good programmer regular expressions than it is to teach programming to someone who understands regular expressions. Hire the programmer.

JaredPar
Well said, sir!
Treb
Ask them a regex question in the phone interview, and if they don't come to the face-to-face having learned the basics, they're either not bothered or they haven't grasped them.
Draemon
+1 I hate people that think it's all about the regex. Sure, they are useful for some things, but programming doesn't begin and end with them.
amischiefr
The large majority of solid programmers understand regex anyway. So I probably wouldn't even ask except maybe as part of another question.
BenAlabaster
+1 Hire the programmer not the regex wizard.
Fake Code Monkey Rashid
+1  A: 

Yes, if he has other things to contribute to the team.

If for example you are using a specific protocol for communicating with external hardware and he is knowledgeable about this protocol, hire him.

If your area of work does not require string manipulation, I would at least consider to hire him. It's not as if regex is the single most important thing every programmer needs to know. They are a tool, very useful if you are doing string manipulation. Nothing more.

Of course, not knowing at least some very basic regex is a bad sign. He may have other knowlegde gaps, in more important areas. That is something you have to decide on a case by case base.

Treb
A: 

Agree with Daniel and Chris, if the developer has perl or other scripting experience then regexp is something that (s)he should know, but for someone fresh out of school they might not have been exposed to regexp. Moreover, it could be that they have may used regular expression without knowing what they are.

A: 

No, I would not.

Nor would I hire someone who doesn't know SQL, JavaScript, XML, CSS, or basic string manipulation using Excel formulas.

Developers who don't know these either don't have the experience I'm looking for, or they've been relying on GUI designers (e.g., VS) or leaky abstractions (e.g., LINQ) rather than actually learning the languages required by the platforms they are developing for.

Edit: Wow, such negativity! Sheesh. FWIW, I was talking specifically about hiring developers for the technologies our business (a consulting firm) deals with. I don't need "integration developers" and I sure as hell don't need a C++ person who can't write decent cross-browser HTML/CSS. And like it or not, in the real world outside the ivory dungeon of Big-Corporate-IT, basic ability to do data manipulation using RegEx and even (gasp!) Excel is part of the job. Data management falls on developers because the line staff don't have the skills and we have a crapload of incoming data to deal with. We don't get to write kernel mods all day, nor can we wrap ourselves in comfy 10-layer-deep enterprise abstractions. This isn't a Mort talking, either--our shop is run by operations, not IT, and we need people who can hit the ground running with the technologies we use every day.

richardtallent
Excel formulas? Really? What about powerpoint?
DanSingerman
What about Lotus 1-2-3?
Patrick McDonald
Actually,I would consider PowerPoint skills more relevant than regex - A developer must have the skills to communicate with the management. Abd that is mostly done through colourful pictures and fancy animations ;-)
Treb
@Richard: don't confuse "developer" for "front-end developer". CSS is all but useless to an integration developer.
Damo
richard - your "technologies" are not really programming. In my world I would not hesitate to hire a smart person who does not have specific skills.
Tim
I am a C++ developer and don't know any of the things you mentioned. I don't see how not knowing a particular area makes anybody a bad developer.
Naveen
And I'd never hire someone who isn't familiar with computational geometry...
Darryl
This post should have negative 1000 votes.
Bryan Rowe
I think developers can get away without using them. They can pick it up along the way.
MattK311
My guess, you're not in charge of hiring anyone. :)
Chris Stewart
@Damo: I'm not hiring integration developers. The OP asks what *I* consider a requirement.@tim: Your definition of "programming" is wrong.@Naveen: doesn't make you a bad developer, just useless to me. Just as useless as I would be in a company writing Linux drivers. I've pretty much forgotten C++, replaced it with C# years ago.@Darryl: once I wrote a 3-D rotating line box on my TRS-80 CoCo II. I can haz job?@Bryan: let me guess, you don't know RegEx, CSS, or Javascript?@MattK311: we don't have time for on-the-job training. Maybe elsewhere.@Chris Stewart: wrong, no cookie.
richardtallent
Any moron knows how to use Powerpoint even if they've never used it before. It's just a clickety program where you can draw things. I don't see why you'd want a developer to know how to use Excel, some places don't even use any Microsoft stuff at all.
Neil
+4  A: 

It might depend on the job, but someone who didn't know REs would indicate to me someone without much curiosity or interest in learning new and different skill, and I absolutely would try not to hire such a person.

chris
That's a rather narrow-minded view - they can't be curious or eager to learn if they haven't covered RegEx? I sounds like you have a rather sheltered exposure to the rather wide field of software development. Not knowing regular expressions exist perhaps, or struggling to pick them up after a short tutorial...
CJM
+3  A: 

As long as they know how to ask for a regex on StackOverflow, yes.

There should be a regex.stackexchange.com for asking and answering regex questions.

There are dozens, maybe hundreds or thousands of niches. You could ask the same about assembly language.

If the programmer is a 3D engine builder who never uses strings, probably be better to know assembly, matrices, and shader programming than regex.

Nosredna
+10  A: 

I would not take that into account, even if he is expected to use regular expressions in the work that I am hiring him for. I would however be interested in knowing his capabilities of learning quickly, not only regular expressions, but anything that can be related to the work he is expected to do. That is what really matters.

Bruno Rothgiesser
+4  A: 

Well, first things first.

Hire a developer for what? What's the job description - what project types, what language(s), what other skills required?

Even if you mean someone who just codes, then you first have to answer - WHY do they need to know regexp for the job?

If the job does not need regexp experience, then it's not an issue. Same as if they don't know SQL (and won't be needing it for the job), or Perl, or Ruby, or COBOL or FORTRAN or any of a thousand other things that some jobs require but others simply don't.

Regexp by and of itself usually only really means that they were "doing stuff" in the unix world with Perl or scripts or similar stuff. While that can be incredibly useful in context, out of context it's no more valuable than anything else if you don't actually need it for the job description.

Cheers,

-R

Huntrods
+5  A: 

It's not something that would be a disqualification, no. However, I have trouble imagining a competent experienced developer of the kind we would hire not knowing regular expressions. Consider it a big red flag.

T.E.D.
I'm flagged! But ... Perhaps there is some consolation in knowing it's so essential, it might be overlooked as a point of inquiry. Also it's good to know I wouldn't say "Ah, you mean regular expressions, like, 'How's the weather out there?'"
Smandoli
I agree with this. It's not that the engineer is necessarily going to use regular expressions on the job, it's that RE is a powerful aspect to the LAMP/*nix environment and knowledge of it demonstrates either broad knowledge or attractive curiosity.
pbreitenbach
It isn't just web applications. Something as simple as "grep" uses regular expressions.
T.E.D.
+2  A: 

Not unless it was for a very junior trainee position (in which case I'd be looking for aptitude to learn, rather than any specific knowledge).

Even if he was going to be writing embedded assembly, regex is a tool any good programmer will use almost daily. It's not just about writing regexes for the code he's being paid to write, it's a skill that demonstrates he finds effective ways to do his job.

Draemon
+2  A: 

Regex is confusing and 90% of the time i hack a regex expression from something I've found online. I also find that the JavaScript regex is different from the C# regex so there are portability issues. I suppose the candidate should prolly have heard of them if the position requires it, but it's just one technology in the toolbox.

aside: I once interviewed for a position where they wanted me to whiteboard out some code to parse XML. So I started scribbling DOM class code and XPATH queries and they stopped me saying 'what if i didn't have those classes'. so I started scribbling .indexof() code and they stopped me again and wanted me to do it with pointers to a char array. So I stopped them back and asked if they were really parsing XML is this cryptic way. they said no, but it's just an interview question they use. I recommended they review their interview questions.

Mark Davis
I've had an interview like that - worst experience of my professional life.
ChrisF
I think you're taking the interview question too literally: I'd wager the point was to draw out the people who couldn't get past the class library -- 80% of the time it's there and works, but having someone that can actually do the last 20% is very important to actually getting things done.
James Cape
Most of these interview questions are asked in this manner because they have the question, they have the answer and if you don't give them the answer they have in front of them they will keep torturing you until you give them what they're looking for.
BenAlabaster
I used to work with a company that did day long interviews with multiple interviewers. We used to ask "nasty" questions like that. The purpose was not to torture the candidate, but to try to figure out if the candidate was smart, inventive, and able to work under trying conditions.
Stephen C
+1  A: 

To program in Perl? Definitely not.

To program in Excel? Regexes are not a factor.

So, it depends on what the person is doing.

And keep in mind that many talented programmers do not start with a computer science degree, earned by taking third year computability and complexity courses.

hughdbrown
+1  A: 

Are they a developer that doesn't know how to write regular expressions, or a developer that doesn't know how to use regular expressions?

A developer that isn't adept at writing regular expressions but is adept at using existing regular expressions is probably still pretty efficient, since there are tons of preexisting regular expressions out that that cover an awful lot of common scenarios, particularly validation.

I'd be quite wary of a developer that was writing his/her own long and bug-prone routines for things that could easily be handled by regex.

But then again, as another commenter mentioned, regex isn't taught at a lot of schools. A bright but inexperienced developer (first few years in the biz?) simply might not quite get what they are or why they're tremendously useful.

(Personally, I fall into the category of an experienced developer who's not that great at writing regex but recognizes when they're the right tool for the job and will then borrow an existing one or cobble together his own after when the situation demands it.)

John Booty
+3  A: 

IMO, anytime you establish an opinion of someone (such as whether to hire them) based on a single criteria (such as knowing regular expressions), you're making a huge mistake. In fact, the only time I would recommend you not hire someone strictly based on their lack of regular expression knowledge would be if the job's primary function included managing regular expressions. Otherwise, if they qualify for the position in other ways, encourage them to learn it on the job and give them a shot.

Simply saying (or thinking) "Ha! You don't know regular expressions? Get outta here..." or any variant of it is not professionalism, it's elitism, and has no place in the business world.

Chris
+10  A: 

It depends ... if they responded with "No, but I know finite state automata which are equivalent" then I would probably hire them :)

Larry Watanabe
I think you'd be hard pressed to find a developer that is well-versed in automata theory but doesn't know how to use regular expressions.
Cam
it was tongue in cheek -- in particular, if the developer knew about equivalences then they would know automata theory.
Larry Watanabe
+1 for the laugh! >)
Alessandro Stamatto
+1  A: 

In most cases, I wouldn't expect deep knowledge of Regexes, but I would expect, when confronted with a problem best solved with a regex, the candidate would minimally answer, "um... maybe a regex?" or "um... grep?"

Anything more than that is a bonus, with an otherwise decent candidate.

JasonTrue
+2  A: 

I've been a professional developer for almost 20 years and I can count how many times I've used regex on one hand and have 3 fingers left. To use that as a barometer for programming skill is nonsense unless the job specifically calls for it.

I have built many enterprise-level critical systems for industries such as financial, pharma, insurance and many other. Regex has not been an issue.

Eric
They must have both been momentous occasions if they stick out so much in your mind.
Peter Boughton
lol, actually I remember them because I had to actually do some research to learn the RegEx syntax. It was new to me so I guess it does stand out in my mind. So much of what I do and learn these days is usually compounding upon existing skills so anything actually new does make an impression.
Eric
A: 

I think whether a candidate knows regex or not is irrelevant for a programming position, it is useful skill to know but if the developer knows the more important skills like software design patterns, oop, platform knowledge etc then I am confident he can learn regular expressions as well. OTOH if he has never heard of regular expressions then this IMO, shows a certain mindset that may disqualify him in my eyes.

Anders K.
A: 

Absolutely NOT because he or she would most definitely NOT be a Vim user!

Just be sure, ask them to solve the Monty Hall Problem.

LES2
A: 

Absolutely, if s/he can show good programming aptitude. After all, ain't that what you are looking for? How long it takes to learn the regex? A programmer may know nothing about regex, yet could be brilliant programmers, and not necessarily otherwise. And people who rely on regex to filter out candidates are somehow unbelievably foolish in my opinion. Sorry.

+2  A: 

I think many answers are missing the point. It's not that RegEx is necessary for the immediate job. It's that it demonstrates well-rounded knowledge and curiosity of a powerful and broadly useful tool.

pbreitenbach
+1  A: 

Hi

I do know regular expressions to certain extent but by no means an expert. Knowing or not knowing regular expressions shouldnt be the absolute yardstick for your hiring decision.Thirst for knowledge should be

Once on a mailing list a user responded to a question of extracting element from a xml file using regular expressions . I looked at it and imediately asked why not use some of the xml xpath constructs available in that langauge to parse the xml. All the experts agreed

You should look for wholistic qualities when hiring someone.

regards Edwards

Edwards
+2  A: 

I think RegEx is good indicator of how much someone cares about programming. I have co-workers that dont know it, but they also dont know how to write clean code or how the programming language we are using really works(sometimes Im shocked by the stuff they dont know). RegEx is never used as keyword on job adds, so RDD programmers wont learn it. I think every programmer that cares about getting better will at least try RegEx.

martin
+1  A: 

I might if it was a junior-level position, but probably not otherwise. I consider regular expressions to be more than just a useful tool - they also play a key role in formal languages and the theory of computation. A good engineer should know about both perspectives, practical and theoretical.

(An interviewer once asked me "What is a regular expression?" I replied "A finite state automata". He said "What's that?". I didn't get the job --- probably just as well, too.)

James Farrell
A: 

it depends

if you have to equally matched programmers in all areas, but one understands how regular expressions work - sure, take him

but keep in mind that programming isnt just about mathematics - its about problem solving and 'chunking' a big task into smaller pieces

-- LM

louism
A: 

In the past ... no I wouldn't, because how would they be able to use ed efficiently? :)

Larry Watanabe
+1  A: 

Yes, if I feel that he has a strong learning capability.

Shaihi