a companion discussion area for blog.codinghorror.com

The Non-Programming Programmer


#183

The reason you get stories like this (apart from the fact most programmers have superiority complexes) is the computing industry has no real body to encompass a standard in the way other engineering disciplines do.

Google, Microsoft, IBM et al get around this by requiring a CS degree or masters as the minimum. There are some things you simply cannot learn through googling and Wrox books that you learn in a CS degree. Whether these things are useful or not for most programmers’ careers - aside from back-patting interviews - is a different matter of course. My view is they are but not all programmers do it for fun.


#184

When I needed a developer recently I set up a time with the candidate to answer questions on StackOverflow. I then posted three questions - telling him the names so he could find them - and awaited his answers. This not only gave me a sense of his programming ability, it allowed me to compare his answers with others and to get a feel for his speed. This was a great way to do the evaluation and I highly recommend it for others!

Years ago at a larger corporation where we were aggressively hiring, I gained a reputation as a somewhat “difficult” interviewer. Why? Simply because I asked questions that forced people to reveal their state of knowledge. In one case, I uncovered an individual that clearly had no knowledge whatsoever of programming or our problem domain. I strongly recommended against hiring him but the management felt that we ‘needed people with experience’ (which his resume indicated but it was clearly a lie) so they hired the guy anyway. A debacle ensued in which the fellow “worked” for nearly a year without producing a single line of code. When they began termination proceedings, the guy claimed a disability and threatened to sue. He was still there when I left.


#185

There is also the case, made very well in this article, Confessions of a mediocre programmer by Alan Norton, that to do well in IT departments

“It doesn’t take a lot of advanced coding skills to move data around and magically turn it into information.”

http://blogs.techrepublic.com.com/programming-and-development/?p=2329


#186

Jeff, on an unrelated matter, the link for your Visual Studio color scheme (very old post) is not working, any chance on making it available somewhere else?


#187

Hello, I want to one day become a programmer.
I’ve been programming home and never been educated in programming.

I tried the Codility tool and was given the following assignment;


Equilibrium index of a sequence is an index such that the sum of elements at lower indexes is equal to the sum of elements at higher indexes. For example, in a sequence A:

A[0]=-7 A[1]=1 A[2]=5 A[3]=2 A[4]=-4 A[5]=3 A[6]=0

3 is an equilibrium index, because:

A[0]+A[1]+A[2]=A[4]+A[5]+A[6]

6 is also an equilibrium index, because:

A[0]+A[1]+A[2]+A[3]+A[4]+A[5]=0

(sum of zero elements is zero) 7 is not an equilibrium index, because it is not a valid index of sequence A.
If you still have doubts, this is a precise definition: the integer k is an equilibrium index of a sequence if and only if and .

Assume the sum of zero elements is equal zero. Write a function

int equi(int[] A);

that given a sequence, returns its equilibrium index (any) or -1 if no equilibrium indexes exist. Assume that the sequence may be very long.

This is my answer (and it is correct);


int equi ( int[] A ) {
int lSum = 0, hSum = 0;
for(int i = 0; i < A.Length; i++)
{
lSum = 0;
hSum = 0;
for(int ii = 0; ii < i; ii++)
{
lSum += A[ii];
}
for(int ii = A.Length - 1; ii > i; ii–)
{
hSum += A[ii];
}
if(lSum == hSum)
return i;
}
return 0;
}

Would anyone share your comments on my coding style?
What can I improve?

Thankful for answers, Henric.


#188

I’m a non programming programmer and created this using tit bits off the net http://www.pathloans.com/ … what do you guys think .?


#189

This is a really annoying topic which seems to come up frequently and I don’t know why you (Jeff) are so preoccupied by it.

If I apply to be a lawyer do I have to argue a case to get the job? For a doctor to join a hospital, do i need to operate on a patient while someone watches me do it?

So why is there such a preoccupiation with programmers ‘proving they can program’ in an interview?

Firstly, your assumption that someone who can’t answer a particular knowledge-based question or code a certain function in an interview, “can’t program at all” is often false. Sure, there are people who legitimately can’t program who would flunk out of those interviews, but what about the ones who are good, just can’t recall all the information off the top of their head?

Do you really think everyone programs off the top of their head with no resources, no information?

I look at programming as being a builder, a constructor. Often you need tools to build something. A house builder can’t build a house without a hammer, nails, and a toolbox.

A programmer’s toolbox is part Head knowledge, part Experience, part Information Gathering acumen (google, stack overflow, other resources) but most of all ability to get something done and solve a problem – and i’m sorry but asking someone to define this or that term does NOT prove problem solving ability.


#190

Jesus, this is like listening to the mass voice of insecure self righteousness. Unfortunately this is all too typical in the IT community. If egg heads could step back and look at business problems you would realize that being a good programmer is adaptability, business acumen and unless you are working for the Google’s of the world the ability to sling some code to automate an otherwise expensive process. I would focus your interview questions to somethign relevant not just a nice recursion problem to partake in a proverbial “cock comparing contest”.


#191

Ryan Fisch put it more eloquently than i could. :wink: someone should examine the phenomenon of programmer elitism from a psychological standpoint and analyze why this attitude is so prevalent.

Here’s an interesting counterpoint read that I found compelling and entertaining:

http://blogs.techrepublic.com.com/programming-and-development/?p=2329


#192

I’ve been programming for 20+ years on a multitude of systems, and have been praised up, down, left and right for my extremely good technical skills. However, I still may not be able to whip up a good algorithm in an interview context, because one of my best skills is KNOWING WHERE TO LOOK THINGS UP. In any realistic job situation I have always had access to books, other programmers, and/or the Internet and/or other reference materials, and am extremely good at using these to ask precisely and exactly the questions needed to solve any given problem. At this very moment I would have to look up the algorithm for the “smallest common multiple of two numbers,” to which I have been exposed exactly once – when I first encountered it, in a graduate-level Computer Science course just last year. (The professor seemed shocked that nobody in the class knew this “familiar” equation, but I had never seen it in a class, book, or work context.) I can whip up a string-reverser in no time, though. :slight_smile:


#193

DavidC, you have got to be kidding!

“If I apply to be a lawyer do I have to argue a case to get the job?”

Yes. You need to study for years, complete a degree, study more, pass an exam in the area you want to practice, and then assist on cases and then - if you’re looking for a job as a trial lawyer - you’ll need to have argued and won cases on your own.

“For a doctor to join a hospital, do i need to operate on a patient while someone watches me do it?”

Hell yes. It’s known as residency. You go through pre-med, then get your medical degree, then you work under supervision for years, then if you survive all that you can get a job at a hospital.

“So why is there such a preoccupiation with programmers ‘proving they can program’ in an interview?”

Because you’re applying for a job as a programmer. For a lawyer or a doctor, their history is fully documented. For a programmer, you have to show you can actually program.

This is not elitism. It’s demonstrating that you have some grasp the basic skills of your profession. If you can program, this is not exactly an onerous requirement. If you can’t program, go away and stop wasting my time.

Ryan Frisch -

“Unfortunately this is all too typical in the IT community. If egg heads could step back and look at business problems you would realize that being a good programmer is adaptability, business acumen and unless you are working for the Google’s of the world the ability to sling some code to automate an otherwise expensive process.”

“Egg heads”?! Asking a putative programmer to show that they can program, and we are eggheads? I’m sorry, but being a good programmer means you are able to program. If you can’t program, then adaptability and business acumen might make you a great real-estate agent, but you’re useless to me.


#194

Those examples are exactly NOT the same thing as what you ask a programming job candidate to do. A lawyer would talk in an interview about the cases they have argued and what they’ve been involved in - in short, what -work- they have done. I imagine a doctor’s interview would be the same thing. The focus is on what you have done in your professional life, not “I’m going to assume you’re a loser and don’t know ANYTHING until you jump through some hoops for me”.

Perfectly well and I would expect “what you’ve done” to be an important topic in interviews.

Anyway, “Showing you can program” means that you can take a design and translate it into solid, working code. It’s not regurgitating algorithms from compsci 301.

All of this commentary is just proving to me that programmers are bad at interviewing and selecting good candidates… maybe that’s my psychology background speaking :wink: (Interviews, BTW, are the worst predictors of future job performance)

Actually, to prove programming ability aptitude tests are much more effective. It looks at the mind’s core ability to compute, adapt and think, rather than what you’ve memorized about language syntax and algorithms.

I’m sure all can agree that memorizing syntax does not make one a good programmer. Then again you never know with this bunch!


#195

Ah, I think I understand.

Maybe fizzbuzz should use the word “divisible” or “divisor” instead of “multiple”. Compare the explanations for divisor, multiple, and least common multiple.

Oh, I get it! http://en.wikipedia.org/wiki/Divisible

In mathematics, a divisor of an integer n, also called a factor of n, is an integer which evenly divides n without leaving a remainder.

For example, 7 is a divisor of 42 because 42 / 7 = 6.

Can you explain that again? http://en.wikipedia.org/wiki/Multiple_(mathematics)

In mathematics, a multiple is the product of any quantity by an integer. In other words, for the quantity a such as integer, real number, or complex number, b is a multiple of a if b = na for some integer n. The n is also called coefficient or multiplier. Additionally, if a is not zero, this is equivalent to saying that b / a is an integer with no remainder.

Some said the multiple is the product of an integer by another integer so it is called integer multiple. When a and b are both integers, a is also called a factor of b.

WT… err… Huh? http://en.wikipedia.org/wiki/Least_common_multiple

A simple algorithm
This method works as easily for finding the LCM of several integers.

Let there be a finite sequence of positive integers X = (x1, x2, …, xn), n > 1. The algorithm proceeds in steps as follows: on each step m it examines and updates the sequence X(m) = (x1(m), x2(m), …, xn(m)), X(1) = X. The purpose of the examination is to pick up the least (perhaps, one of many) element of the sequence X(m). Assuming xk0(m) is the selected element, the sequence X(m+1) is defined as

xk(m+1) = xk(m), k ≠ k0
xk0(m+1) = xk0(m) + xk0.

In other words, the least element is increased by the corresponding x whereas the rest of the elements pass from X(m) to X(m+1) unchanged.

The algorithm stops when all elements in sequence X(m) are equal. Their common value L is exactly LCM(X). (For a proof and an interactive simulation see reference below, Algorithm for Computing the LCM.)


#196

This whole conversation is ridiculous, simply because everything really is relative. Glen Ford said it right, why should I give a flying crap if you can find the smallest common multiple of two integers if the job focuses on business rules and not on math? If one person knows .NET very well but has to write four lines of code for an algorithm, but the next guy knows C++ very well and uses a modulus operator for the same algorithm shortened to one line, but doesn’t know .NET well, I’ll take the first guy in a heartbeat.

A job in any workplace requires a great deal of communications between team members. Rarely used math operators can be learned with a 30-second lesson; experience with all of the tools that are used in the workplace takes a significantly greater amount of dedication.

Mikeash: “Do you really want to present yourself as someone who can only handle problems you’ve already solved in the past?” If those problems are applicable to the job, absolutely. It’s called experience!! If you have the greatest handle on programming in the world but you have no real-world experience, you’re pretty darn worthless. It took me years to get past the hurdles of understanding SDLC, practical patterns on each tier, and team workflows and processes, such that I earned the role of “Sr. Developer”. I suck at math, but I can run circles around the know-it-all who sits around quoting algorithms all day and am able to stay productive, producing bug-free code, because with experience I have learned a strong grasp of the big picture.

That’s not something 15 minutes can measure. You can take your 15-minute algorithmic test and shove it.


#197
If one person knows .NET very well but has to write four lines of code for an algorithm, but the next guy knows C++ very well and uses a modulus operator for the same algorithm shortened to one line, but doesn't know .NET well, I'll take the first guy in a heartbeat.

But it’s not an either/or choice. There are candidates out there who know algorithms (or at least the modulus operator!) and .NET and and can implement pragmatic business solutions. It’s a competitive market. Why would I settle for someone who only has one or two of the skills I’m looking for? Sure there are lot more candidates who are only competent in one or two areas, but that why I want to screen them out as quickly as possible.

As an aside, I’m baffled by folks claiming the modulus operator is some obscure ‘mathy’ thing. It’s the natural operation to use whenever you to execute some statement in a loop only every nth time through. For example printing a progress message only every 100th time through a loop.

For pity’s sake, VB has 8 arithmetic operators and C# only has 5. You can’t be bothered to remember the meaning of 5 operators? Yes, I’m sure you do everything you need to without it, but you could also write all your code using only IF and GOTO. Why would you want to?


#198

I was just trying to figure out why words like “egghead”, “algorithms”, “compsci 301” and “memorization” were written in the comments. I thought that the choice of words lead people into thinking about LCM algorithms instead of just trying to solve the problem. My earlier comment was meant to show explanations of different terms in order of decreasing awesomeness, with the “simple algorithm” being the least awesome. I didn’t mean to offend anyone.

But if someone asks an unfamiliar question, then isn’t that the best time to genuinely show off your other skills, like adaptability, communication, and business acumen?

Ok, so you’ve never used the mod operator. How about int, fix, round, ipart, fpart, floor, ceil…? No? How about converting a number into a string and checking for a decimal point? Too WTFy? Fine. Write it calling imaginary functions called isFizz and isBuzz. They ask you to implement those functions? Maybe you can explain to them why you can’t do this off the top of your head. Maybe you can ask, in a nice way, why it’s so friggin important to them. Even if you disagree with their response, at least you’ve given yourself another chance to solve the problem: How to show them that you can program when their “simple” programming question is not so simple.


#199

From the article:

At least bad programmers can be educated

I don’t think that’s true. I would hire a smart math or music major who had never programmed in his life before I’d hire a mediocre experienced programmer. I’d buy the smart math or music major a book on algorithms and a book on whatever programming language the company was using and I bet he’d be outperforming the experienced programmer in six months.


#200

I think people are looking at this test as accomplishing more than it was intended to. My take was that these simple tests weren’t intended to measure a programmer’s skillset, but more as a form of captcha, intended to weed out the non-programmers from the thousands of applicants that every job application attracts.

The intent wasn’t to decide who to hire, but who to schedule for a phone interview.

The problem is that given the web, every job query receives thousands of totally unqualified applicants, and we need a way to winnow the chaff.

As for the difficulty of this problem, note that it doesn’t say anthing at all about the modulus operator. It says “for multiples of three, …”. To many of us, the obvious solution is to use the modulus operator, but it’s not actually part of the specification, so complaints about how supposedly “obscure” it is, are off the mark.


#201

Well, I am interviewing right now. I have written software for a while (Fortran IID, PL1 among others).

  1. I don’t get rattled much anymore. How many of the “non-programmers” are early/mid 20’s, and freeze in the headlights?
  2. What critical thing are you doing that you only want “the top 1%”? Why would the top 1% want to work for you? Is all your work such that only the “top 1%” can do it quickly and well? How about a reliable, hard-working 70th percentile programmer who’s going to night classes and is easy-going and pleasant to work with? Is there no routine maintenance that the “top 1%” might find boring that he can learn from?
  3. Especially for the younger engineers, what steps do you take to make them better? To help them move from the top “45%” to the “top 10%”?
  4. Take a good look at the tone of these comments. Are these attitudes that you admire and respect? Would you really want to work for someone is is tempted to ridicule some candidate because they have insufficient humility?
  5. Something that took me by surprise: the system and network administrators have little respect for developers, and see development positions as an entry step on the way to being a sys or DB admin. This explains more about the pay than poor programmers using up jobs and eating into employers profits.
  6. For us with jobs and strong resumes, these are not tough times. For many others they are very tough times. Let’s try this: try to put your candidate at ease, and determine what his/hers skills are. If you are trying to stump them, that comes through clearly, and your hostility is even more unsettling to the stressed candidate.
  7. Somethings I am interested in: getting better, and helping my coworkers get better. To that end, I learn on evenings and weekends, and try to be as helpful and supportive as I can with my team. That said, how important is it whether my method of determining a prime made up on the spot in an interview is O(n), or O(n/2)?
  8. I think there may be a real problem with American professional programming culture. This is not to say that anyone should be hired who cannot do the work. The eagerness I see in posts to denigrate those with (perceived) lower skills, however, is widespread, and distressing. I am concerned that younger people do not see Software Engineering as a challenging and interesting creative endeavor, as much as an unpleasant and combative arena. If this is indeed the case, expect to see the quality of the “top 1%” to decline along with the number of new practitioners entering the field.

#202

“Well, I am interviewing right now.”

How many applications did you receive?

How many did you toss immediately?

On what basis did you make your decision?

Of those you decided to contact for follow-up, what percentage were a complete waste of your time?

How many of your applicants had no zero experience, zero ability, and zero real interest in the job you were offering? Who’d simply fired off an application on the off-chance?