The Non-Programming Programmer

You probably could get a job, but I would not recommend hiring you based on that sample.

There’s a certain elegance and robustness that good programmers strive for. Some of it is because computer science started as a branch of theoretical mathematics, and some of it is because decades of painful experience have shown us that ignoring elegance and robustness will bite you in the butt eventually.

Anyway, some initial-reading problems that I noticed:

  1. Purpose of function and meanings of arguments are not clear in declaration of lightYearAway.
  2. Comment is not a Python docstring and doesn’t describe what this function does.
  3. There is a dearth of comments, in general.
  4. If usOrmetric is something other than 'us' or 'metric' then the function crashes.
  5. Repeatedly modifying d and s like that is confusing and bug-prone.
  6. lightYearAway violates separation of concerns. It calculates, with different hard-coded numbers depending on unit, and also creates formatted output, with hard-coded strings.
  7. labelNum looks buggy. We have zip and list comprehensions for a reason.
  8. Variable is called num but is actually a string.
  9. This code sample runs on Python 2 but is not Python 3-compatible. We should strive for Python 3-compatibility even if we’re using Python 2.

Hi There, I was curious to see the program to see a code written on paper, so I tried the link but it seems to be down… Is there any way for me to get in touch with the original creator so that I can see what code he wrote to get a paper pen feel available to code yet not share the system.

Sorry if this post seemed irrelevent to anyone, I am just curious.

I think one of the issues I have with “programming interviews” is the understanding that some programmers program differently than others. Some may also take a bit more time depending on the situation.

For example, if you give someone a programming task during the interview. One of the key things they would be measured in is time to complete, as such you’d be looking for people to just spit code out ASAP and hope they work correctly.

Adding a new feature or analysing requires time to design and sometimes the thought process may require to “sleep on it” to get a proper result. Unfortunately that is not something that can be afforded during an interview.

So how would I do it? I had two technical interviews which I would model stuff on. Of course I am biased due to the integration aspects of my work in the examples but here it is…

Given technology A, B, C make something that ties them together that does Y. Y can just be something as simple as having a button on A that talks to C that does something on B.

I don’t expect too much detail either like 100% coverage on unit tests or comments. Since this is a relatively rushed job, I’m not the only employer I am expecting the candidate to look for.

What I would likely expect would be an opinion on what they went through or how they could make it better, the hurdles they had faced, how difficult was it to find the information needed to get the task done.

One of the requirements I would have for a programmer is to have a github presence. Because I would actually want them to show me an example of a project regardless if it is trivial or not so I can see the coding style. Of course I would ask them to choose one that they can say they are proud of the quality of the code base…

Can they fake it, it’d be difficult.

(@PaulJ Wow, I should hate you for that ! But I can’t, it made me work harder on my code, and i liked it !)

Maybe you should consider adding errors during your interviews, just to see how the programmer is reacting.

I agree with WolfGang2. These math questions mean nothing except the person is good at math. I have programmed for 15 years in real world situations and have a good job right now. I can tell you on two fingers how many programs we have used that did anything with math. That’s how irrelevant math is to real world situations. Much like a calculus class. The average graduate won’t touch calculus after graduation so why do we take it?

A great programming interview would just have the interviewee explain OOP with a few other questions dealing with things they did on their resume. If they said they did Java for 5 years ask them a Java question pertaining to their experience. If the answer is correct then see if they are a fit personality wise at that point. If they are you have your person to hire.

Simple as that. Most programmers these days use google as a tool to code anyways. Which means if they have issue they go to stackoverflow or codeguru. It is what it is. As long as the job is done and on time. That is what matters.

Hi Jeff,
According to me,
Those who knows programming doesn’t go for lots of interviews.
I showing some facts
There are 10 jobs in the market and 10 candidates searching for job.
3 knows good programming and 7 don’t.
for 10 jobs 3 will be interviewed and selected, but 7 will be interviewed for 10 jobs 70 times.
This is not a new thing in the market this is just a representation of numbers.
Everything is same as earlier.
Earlier there were limited jobs and limited number of programmers (experts) but now we have lots of programming jobs and lots of number of programmers saying or pretending that they are programmers.

1 Like

I would use math questions but specifically Boolean logic math. It gets applied in SQL quite often. e.g.

(a == null -> b == c) && (a != null -> (b == a && b == c))
(a != null || b == c) && (a == null || (b == a && b == c))
(b == c && a == null) || (b == c && a == c)
a == b && a == c

The last line was based on Wolfram Alpha simplifying things for me so I don’t have to do it myself.

But in terms of dealing with calculus or complex problem solving chances are not much in most enterprises.

I think if the interview looked for a Java programmer you should have come up to speed a week before to prepare for the interview. Then again sometimes you just get the side swipe interview where you’re really not prepared for it especially if you’re getting the interview while you’re still working.

I am glad I found this blog. I am a nonprogramming programmer who somehow managed to pass through 4 years of college. I was already in my late 20’s going into college and opted for software engineering as a second choice. Long story short after 10 years with the same company; I have learnt a lot but realized going into interviews, I don’t.

I was asked on my very first interview which I was completely unprepared for, to explain hashmaps, abstract vs interface, memory leaks etc. I did not know how to answer these questions.
I learnt how to code by taking the examples out of books, redoing the code and changing the code to try new outputs. My job entailed learning how to code web crawlers, form based web applications and language learning scripts to name a few and on each assignment I searched for tutorials and admittedly copied code; but my projects worked and still till today run robustly.

I will get flack for this and told but it’s not your code and bla bla. Yes, that’s right but my argument is that not everyone is a Bill Gates or Nemo who can just see the code and write something new. Do I not deserve the credit for getting something to work and being able to go on and do it with multiple languages? Is my career a fake career? Once I was told to set up an Apache tomcat server and build rest API’s and managed to find the solution to do it. Yes, I agree, I would not be where I am if not for google, stackoverflow and others.

I agree I am in the wrong career, but where do I go from here. At 40 years old, i realized that I would have to apply for a junior developer position to learn everything there is about one programming language to be recognized as a true software engineer or developer.

Thanks to all you true programmers.

Just study common interview questions. Then you can learn about the required concepts as you go.

Here is the flaw in this line of reasoning:
As a career Software Engineer with a BS in Comp Sci and 3 decades of getting paid to develop software, I can tell you why coding tests are not a measure of one’s ability. It only measures up-to-the-moment memory of a specific algorithm (in the case of silly coding challenge tests) or a specific language.

When I got my degree in Computer Science, we were taught that there was a meaningful difference between the future career professionals who spent the required 4 years or more getting a degree like ours and the “ITT Tech” grads or the “script kiddies” with 3 or 6 months of total programming experience to their name (or nowadays the churn-and-burn major contracting houses of some overpopulated countries that recruit non-programmers off the street, give them a few video courses, then send them overseas slave-labor with an H1-B to generate income for them). We were told that taking all those numerous Comp. Sci programming labs, computer courses, Analysis of Algorithms, courses in databases and file structures, compilers theory and building, and a seeming endless parade of advanced math courses (4 quarters of Calculus, Discrete Math, Linear Algebra, Group Theory, Turing analysis, etc, etc) – that all of this would set us apart. It would make us career computer science software engineers.

So you graduate and go on to spend the next few years, then a decade, then several decades doing just that - using all manner programming languages, algorithms, frameworks, APIs, platforms, across multiple various computer architectures and systems, etc. A true journeyman that you can give a task to and end up with a complete solution. Then comes the problem with these tests:

  • Did I write elaborate graphical C-based X-Windows applications on Unix back in the day? Yes. Spent many months doing that, read and coded my ass off for 70-90 hours weeks and was very good at it. Can I write a 10 or 20 line X-Windows app today? No. Don’t remember.
  • Did I work extensively in Visual Basic and Visual C++ with MFC using Visual Studio for years? Yes. Did I do some really great work, using best practices after lots of extensive research, generating some pretty great software? Yes. Can I code a 10 line VB program right now? No. Don’t remember.
  • Did I work VAX 11/780 macro assembler and generate some of the cleanest most elegant assembly programs around? Sure. Remember it? Nope.
  • COBOL? Yes. Remember? Nope.
  • JYACC/JAM? Yes & Nope.
  • JavaScript? Yes, about 5 years. Remember most of it? Nope.
    And on and on ad infinitum.

However, if I take a week or two to deep dive back into any one of these areas and start to flex that muscle memory, I will be back doing great work in no time at all. The point is that I CAN do the work, and do it very well. But having instant recall of everything I’ve ever done throughout my entire career is not something I or anyone else is capable of.

So this means that companies that focus on “can you write 10 lines of code in Objective-C” and using that as their “filter” are woefully ignorant of what makes a great and successful software engineer/developer. Another example is that I spent over 3 long years (70-90 hr work weeks) writing sophisticated iOS apps for a company and would frequently optimize other developer’s code, etc. Before I worked on iOS, I had no direct experience in it. Then I became very experienced and was very successful at it. However, I haven’t used it in a couple of years, and I can already feel the effects of the “Immediacy of recall” fading. Sure, ask me some general questions about various categories of APIs, or how the Xcode IDE works, or what is the process for getting apps uploaded and approved and I can speak to that. But ask me what the parameters of a given API function are and I will fail your test. Do you see the pattern? Its NOT about what you are retaining in you head at this very moment, its about how SUCCESSFUL you’ve been when given any and all tasks in the past. Heck, I’ve done IVR scriping, programmed CSU/DSU units, wrote firewall code, uploaded config tables into network switches, written sophisticated fuzzy logic algorithms for commercial software packages, etc - but I can’t replicate any of that right here as I sit without rolling up my sleeves and “climbing back down into it”.

And THAT is the problem with these silly logic puzzles and 10-line coding tests in a specific language. You may get roughly correct answers from a person who has never programmed in their life, but just spend the past weekend watching Lynda/Coursera/YouTube videos in a particular language and being able to write a loop construct. You may also get a complete failure when asking a senior career developer that same question because they haven’t worked in the environment for a period of time (but were crazy mad scientists in it at some point previously).

Experienced software devs just smile and chuckle at all the constant rehashing and re-labeling of the same old concepts they understood 10, 20 , and 30 years ago, that are merely re-packaged with a shiny new name (or cloned git repo). Today’s JQuery, Node.JS, Ruby on Rails, etc, is yesterday’s PHP, which is the day before’s Perl, which is the day before’s shell scripts, etc. Today’s GO is yesterday’s Lisp, and on and on.

So which do you really want? An army of one-trick script kiddies with hardly any varied experience chasing that chase the very latest webdev or language “flavor of the day” and act like its the “greatest thing since sliced bread”? Or someone more seasoned who has seen and done so much more that treats all these things as just tools in their toolbox. Its like asking a well-seasoned journeyman carpenter if they’ve used the very latest “X25-Titanium Acmetron” hammer and failing them if they didn’t. They would just look at you and think: “It’s just a f*king hammer buddy, and I’ve used that think for 30 years.” But the naive hiring person would say, "but no… the “X25-Titanium Acmetron” is the “greatest thing since sliced bread” and if you haven’t used this particular model, then you can’t work here. Similarly, asking a seasoned career software engineer if they’ve used a specific new version of Oracle or if they have know the very latest API enhancements in Swift of Obj-C that Apple churns out every year is silly. If you task them with writing an iOS app, the good ones will deep dive and learn everything they need to learn to do excellent work. They will scan all the available API calls to do a certain task, look at 3rd party APIs if they needs something more, and generally knock it out of the park. Give that same task to a “3-monther” and they will robotically spew information they learned yesterday about design patterns and APIs. A seasoned developer will smile about the fact that they were doing MVC before it has a name, or working on object-oriented code in C even before C++ came into use.

TL;DR - You can’t really judge a candidate’s true ability, skill, or breadth of experience based on whether they can write you a 10 line program in your favorite language of the day. Present-moment knowledge has nothing to do with pass success in a given field. You wan’t the best Perl developer? All you’ll ever get is Perl code. A JQuery master? Same. Like a carpet installer, all you’ll get from them is carpet installation. But get yourself a true software developer with a long and successful track record and it vastly opens up how successful this person will be at your organization. They can do it all - just like a master craftsman is able to design and build any manner of furniture they may be asked, as opposed to someone who can only “assemble” boxed parts from IKEA.

^^ Spoken by the voice of true experience. This is exactly right. General principles and “what can you tell me about” and “have you ever heard of” questions are far more useful than “what is the API call for this method”. You will filter out a majority of really good an seasoned candidates by trying to be too specific, which always shows a level of immature naiveté on the part of the person doing interview.

I once had an (Google-like) interviewer ask me a specific question about the exact size in C/C++ of a struct that contained various different member types. I gave a reasonable answer, but in their eyes I got it wrong. What they really wanted to know (but didn’t actually ask) is if I understood the concept of compiler alignment and padding related details in memory structures. So it was basically a trick question. One they probably read in a book or a web site of “good questions to ask in a coding interview”. And if they went only on that, they might assume I wasn’t qualified to write C & C++ code) which would be woefully inaccurate. And yet, they themselves probably didn’t even understand that alignment and padding are system specific anyway, and may be completely different depending on the architecture of the platform the code is running on. Which is why the sizeof() / .size API calls were invented. But maybe they didn’t know that…

Point is, its far better to drop the “trick” questions and simply ask: “Do you know about alignment and padding of structures that compilers do in generated code? If so, what can you tell me about that.” That is a far better measure of one’s actual knowledge (present or past) than looking for “gotcha” type questions.

When I read things like this blog post, I wonder if I’m living in an alternate universe. I’m an out of work CS grad who’s been looking for a developer job for over a year now. I might be an inexperienced programmer or even a bad programmer (by these standards, I’ve since lost my ability to internally scale these things against reality), but I know data structures and those basic algorithms they teach and I can definitely write FizzBuzz in my sleep. I’m pretty far from a genuinely good programmer, though, due to lack of experience with some of the necessary tools.

I read things like this article, the reddit post on cscareerquestions about how someone says he is finding something similar to what you’ve found, or even the comment about a guy overhearing three senior software engineers in his company argue about how the assignment operator worked and whether it assigned right-to-left or left-to-right (in a language with C syntax).

I guess what I’m saying is that I’m not sure how to square the circle on “99% of software developer job applicants can’t code at all” and “Finding an entry level software developer job is difficult.” Is there a known explanation for this? I can accept that I personally don’t have enough experience, but I can’t accept it at the same time as something like this article.

oh boy!

wouldn’t this be much simpler?

Sub prim()
Range("c4").Select
a = ActiveCell
Range("d4").Select
c = ActiveCell

If a > c Then
maxiter = a
Else
maxiter = c
End If

For i = 1 To maxiter
    If (a Mod i = 0) And (c Mod i = 0) Then
     ans = i
    End If
Next

MsgBox ans

End Sub

Yeah, so here I am, re-reading one of my own posts (yes, I know - sad - but I like my own writing :slight_smile: and I saw yours.

In short - yes, you could get hired. Hopefully you already have - been hired as a programmer, that is, if that’s what you want to do. You may have to take less money to get an opportunity, but think of it this way - the company gets the benefit of a cheap developer. You get the benefit of a real job. Two years later you bail and take your experience elsewhere for more money. The company that hired you gets to keep the money they didn’t spend on your deservedly higher salary and can then pay it out in executive bonuses and etc so that the executives would stick around, which might be good (if they’re actually any good and have guided the company into a money-making position) and might be bad (if they’re paying “retention bonuses” because the executives have effed up the company so badly they’re losing money). So, win-win!

2 Likes