Dev Watch

Blog archive

Your Most Pressing Programming Questions, Answered by Quorans

Sure you know all about the Stack Overflow Q&A site for programmers -- chock full of technical advice -- but it has all kinds of picky restrictions.

Like, questions are routinely shut down at SO for being too broad, off topic and -- worst of all -- "primarily opinion-based."

What's the fun in that?

If you want to get to the real scoop on your most pressing programming questions -- maybe with a healthy dose of opinion -- just head over to Quora and hit up the Computer Programming section. Here's just a Top 10 taste of the kinds of questions you can get resolved, along with portions of their top-listed (or most interesting to me) answers.

Q: What are the signs of a fake programmer?
The most common and obvious sign is duplicated code. The kind of person who wasn't meant to be a software engineer would not see the value in keeping his or her code free from duplication.

In fact, it's much more than copy/paste code duplication. It's about duplication of concepts in a variety of abstraction levels. The better the engineer, they will be able to avoid duplication of not just code -- but ideas -- in higher abstraction levels.

Q: Is software development really a dead-end job after 35-40?

Believe it or not there are many very successful developers past the age of 40. Some of them are doing some of the best work of their careers.

For example, Rob Pike and Ken Thompson are past the age of 60 and they created the Go programming language. They are very senior engineers at Google and I'm sure are quite well compensated for what they do.

Q: What are some mistakes you can make as a programmer that will get you fired immediately?

Summary of all answers:

Most of the times, being fired from programming positions comes down to:

  1. Gross Negligence, like accidentally deleting large amounts of data
  2. Incompetency and Intentional misrepresentation
  3. Malicious intents like trying to sell/take copyrighted and closed source code to another company
  4. Unprofessional and illegal behavior, like leaking confidential data

Q: Is programming really that fun?

It depends for whom. For me it is fun. BTW, I'm programming since 1974 and I still find it very fun. And I have grown-up children and 7 grandchildrens (and this may tell something about my virginity; BTW I married my wife when I was 19 years old, and got my PhD in CS 11 years later).

But this is not specific to programming: it is true for most domains. For some people, playing cello, or doing surgery, or wood sculpture, or writing books, etc. ... is fun.

Q: What's the worst code you've seen in production?

As I was about to graduate from my bachelor's in 2010, I was working at a research lab with some code… written in Fortran, around 1988… by geologists.

The code had sets of over 8 or 9 nested for loops. On top of that, each for loop index, and most variables followed a pattern:

i, ii, iii, …, iiiiiiiii… you get the idea.

To make it even worse (time complexity aside), the code was horribly indented. At times the lines broke, having some of the iii's on one line just to follow on the next line.

Q: Why is Python so popular despite being so slow?

It depends to which other languages you compare it to.

In fact, it is slow when compared to C and C++.

However, it does a good job when compared to other languages from a similar category (such as Ruby, JavaScript and the alike).

Now, the great advantage of Python is that it makes you save people time.

Since it is a high-level language, the coders don't have to focus on low-level implementation details and premature optimization.

As famously stated by the great Donald Knuth:

Premature optimization is the root of all evil

Q: What is the best comment in source code that you have ever encountered?

Found this today, A note ( or rather a poem :P ) found in the patch for alarm in Android 5.0.2:

"The man bent over his hourglass,
A programmer of sorts. The day was green.
They said, "You have a blue hourglass,
You do not fire alarms when they're asked."
The man replied, "Alarms as they're asked
are changed within the blue hourglass."
And they said then, "But fire, you must
Alarms beyond us, yet themselves,
Alarms within the blue hourglass
That trigger exactly when they're asked."

Source: 0ac9664 - platform/frameworks/base - Git at Google

Q: Should I fire someone who unnecessarily wrote 500 lines of code?

You gotta be kidding me. What's wrong with you? Hope your employee does not see this thread on Quora, or he/she will have all the rights to show you the finger and leave. I would… As others have suggested, this is a teachable moment, and you failed to notice that so while the developer made a DRY mistake you clearly failed to be a mentor and in my book you're the one who loses. Sounds harsh? Well, you wanted to fire your employee, so admonishing you a bit in public is way less harsh than your approach.

Q: Why are there more [EXPLETIVE] in programming compared to other fields?

Unless you have a broader perspective, socializing with lawyers, bankers, models, writers, photographers, soldiers, entrepreneurs, cooks, engineers, politicians, actors, truck drivers, farmers, teachers, athletes, doctors, interpreters, police officers, accountants, chefs, scientists, nurses, construction workers and thousands of others, it's very easy to think of programmers as of special a bunch of [EXPLETIVE] with a special bunch of quirks that make them very difficult people to interact with.

Q: What secret things do programmers do to amuse themselves?

Childish Puns for Trivial Local Variables
[Click on image for larger view.] Childish Puns for Trivial Local Variables (source: Quora)

This is so much fun, I think I'll do a follow-up -- with your help. Send me your favorite porgramming Quora questions/answers and I might include them.

Posted by David Ramel on June 16, 2017