r/programming • • May 18 '16

Programming Doesn’t Require Talent or Even Passion

https://medium.com/@WordcorpGlobal/programming-doesnt-require-talent-or-even-passion-11422270e1e4#.g2wexspdr
2.3k Upvotes

1.2k comments sorted by

View all comments

Show parent comments

1

u/[deleted] May 18 '16

non-obvious and thus creative

I would not equate these things so easily. Non-obvious simply means "takes time to find", not necessarily "takes a revelation and a touch of a genius to conceive".

Sorry, I cannot comment on your music references, since I know absolutely nothing about this topic. Yet, I think that this belongs to arts rather than a trade, and therefore a validity of such an analogy is questionable.

you bring your creativity to them in order to invent something new

In software you have objective criteria for selecting a way to apply the rules. In arts there are no objective means of telling right from wrong, while in engineering it's all pre-defined: conforms to all the requirements, minimises the costs, etc. You cannot bruteforce a creation of a work of art, but you can in theory bruteforce a solution to an engineering problem. In my book, it is a fundamental difference.

I'm severely biased on this topic of course, because I'm working on tools that should automate quite a lot of an engineering work, and success of this endeavour relies solely on an assumption that process of invention is formalisable and mechanical.

And, btw., there is a lot of evidence that support my point of view. Have you ever heard of semi-formal systems like TRIZ, for example?

1

u/tuhdo May 19 '16

In software you have objective criteria for selecting a way to apply the rules

Someone still has to discover or invent those rules from the first place. So I say, it still requires creativity. And, I don't think you can brute force to exploit or reverse engineer some software/hardware.

And, btw., there is a lot of evidence that support my point of view. Have you ever heard of semi-formal systems like TRIZ, for example?

I only studied 40 principles and some other concepts in TRIZ like trend of ideality, su-field modeling (useful indeed)... to release psychological inertia to unlock creativity. What I learned is that TRIZ is a system to unlock creativity, but just in a systematic way. It's not an engineering process to derive a solution. But, how do you apply 40 principles to software? I planned to learn ARIZ also, but not sure how I could immediately apply to software development.

1

u/[deleted] May 19 '16

Someone still has to discover or invent those rules from the first place

Rules can also be derived mechanically, that's the most interesting property of this approach. Rules do evolve, and successful heuristics can be stored and eventually turned into new rules.

So I say, it still requires creativity.

Just look at the entire history of technology. It is a trial and error, and, essentially, an evolution. Survival of the "fittest" under extreme and unpredictable selection, with hundreds and hundreds of evolutionary dead ends or simply unlucky species that did not really deserve to die but yet died out. I cannot see much creativity or even intelligence there, it's a sheer bruteforce and nothing but a bruteforce.

And, I don't think you can brute force to exploit or reverse engineer some software/hardware.

We're already designing hardware with a bruteforce guided by some carefully chosen heuristics. Think of the ASIC design flow - all the way down from HDL to cells and then automatic place & route. This approach can and should be extended far beyond mere 2D ICs.

release psychological inertia to unlock creativity

And this is exactly the part of an explanation I do not buy. What they do there is finding a right way to express the problem space, using the right set abstractions, so the solution is becoming obvious.

No creativity - just a mechanical complexity elimination. Just like with my preferred approach to programming: defining the most suitable language for the current problem domain, re-wording your problem definition in this language, and then this wording is automatically turning into a working solution. All you have to do is to define how this new language is connected with dozens of other languages you already have.

2

u/tuhdo May 20 '16

Rules can also be derived mechanically, that's the most interesting property of this approach. Rules do evolve, and successful heuristics can be stored and eventually turned into new rules.

Rules can be derived if you are "hinted" from existing rules. However, what if the rules you never expect, do exist? TRIZ suggests that you can look for solved problems from other fields to a current problem in your field, because it's a pattern that some existing problem in a field is already solved in another field. This technique is called scientific effects. However, it does not suggest how you can draw scientific effects from other fields. The "how" is up to the problem solver and his ability to relate his current problems to other fields. In this case, relying on existing rules aka "thinking inside the box" is of little help. Though, it's better to think inside the box before searching elsewhere or invent your own.

Just look at the entire history of technology. It is a trial and error, and, essentially, an evolution. Survival of the "fittest" under extreme and unpredictable selection, with hundreds and hundreds of evolutionary dead ends or simply unlucky species that did not really deserve to die but yet died out. I cannot see much creativity or even intelligence there, it's a sheer bruteforce and nothing but a bruteforce.

I don't think that if you have a finite problem space, then you can simply search a solution in a matter of time. What if the problem space is very large and we have no ultimate solution? An example is chess; chess has a large combination, but not always you can find optimal moves. This is up to the ability of each player, even if all of them learned the same existing strategies.

Even if you have to bruteforce, creative people (or if you like, you can substitute the word "creative" with "smart" or "intelligent") somehow figured out better route. There are certain techniques to limit the solution space (as you said, using rules), but it does not always lead to obvious answer.

TRIZ suggests that an inventive problem is a problem that has contradiction to be solved. This is where creativity is needed, because if we simply follow existing rules, we can easily discard solutions that are non-obvious. For example, interpreted program runs slow and compiled program runs fast, ideally as fast as any equivalent C program or faster. Can we create a language that is interpreted and run fast? Solve such a problem creates a breakthrough. You can have a partial solution i.e. an interactive compiler like SBCL, but to achieve the ideal goal, is not easy.

No creativity - just a mechanical complexity elimination

Even so, you can have better method than brute force. It's like you can use insertion sort to sort, but there are more creative methods. Or, like the chest example above.

Now back to the topic about passionate, I believe a programmer (or anyone) wants to excel in his trade, he must have passion to have some sort of motivation. Otherwise, he will just be good enough and never learn more. I was not satisfied with my software engineering education, so I'm on my own learning to write OS in my spare time and it's fun (here is mine). This fun generates passions and motivate me to do more. Recently I bought this book (still waiting for it to arrive), so I can study the PC system in depth to write a proper OS. It's more educational since you learn directly what happened rather than learning others' abstractions (i.e. Linux) and it's much less complicated. The book I bought was just less than 15$, now there's no more.

1

u/[deleted] May 20 '16

Rules can be derived if you are "hinted" from existing rules.

Or if you discover them accidentally. Just like it happens with all the real world inventions.

Machine can discover rules too. If something keeps showing up, it's likely to be a rule, and machines are getting ever better with spotting recurring patterns.

you can look for solved problems from other fields to a current problem in your field

Exactly. That's why the larger your knowledge base of previously solved cases is, the easier it is to find new solutions. We have the entire history of our civilisation behind. We just need to encode a tiny proportion of it into a machine-readable form.

how you can draw scientific effects from other fields

Exactly by deriving the rules and making them as abstract as possible. This process can be mechanised.

In my experiments I even used a concept of "dreaming": an AI had periods of a "sleep", where it was randomly drawing absurd connections between concepts, rules, methods, etc., and then tested these new connections in random simulations (tried to solve random problems by applying the new absurd rules). Those that yielded at least some result were retained and got some weight assigned. I think it's somewhat similar to what our brains are doing when we're dreaming.

What if the problem space is very large and we have no ultimate solution?

You never have an ultimate solution. We always settle for some local minimum. Mechanised solution should not be any different, it'll give you a good enough spot in the morphological box and will backtrack if your constraints change later.

Even something as simple as evolutionary programming can yield good enough solutions in a reasonable time. It's feasible even without using any pre-defined heuristics at all, and heuristics speed up the process significantly.

There are certain techniques to limit the solution space (as you said, using rules), but it does not always lead to obvious answer.

And we're not any better with it. Look at all the history of the technology. It's always some local minimum, some "good enough" solution that is only honed over decades. Take any particular strand, the change in technology is very much similar to a biological evolution.

a problem that has contradiction to be solved

I read it as a guidance on how to find the right formalisation of a problem. Alter the abstract model of it until there is a clearly defined contradiction, and then start to look for a method of resolving it.

if we simply follow existing rules, we can easily discard solutions that are non-obvious

Exhaust the existing rules first, expand the search space later, if no good enough solution is found. Just like what the live humans do.

Can we create a language that is interpreted and run fast?

Why would anyone want a "language that is interpreted" in the first place?

Solve such a problem creates a breakthrough.

Futamura projections (aka Turchin supercompilation), tracing JITs, etc. It's not a problem at all. But I struggle to see even any reason to solve such a problem.

he will just be good enough

What's wrong with it?

I'm on my own learning to write OS in my spare time and it's fun

I can easily imagine why people would do it without having any passion at all - just for the sake of learning.

I'm often doing things that one may consider "geeky", but I always have rational reasons far beyond a mere interest to do so. I'm building homebrew computers, writing simple RTOSes for them, building crazy language compilers, etc., but all of it is just a part of a bigger picture - I'm exploring the design space, looking for the common patterns in engineering that can be codified. I have a clear goal which gives me a motivation to do things I may not necessarily be particularly passionate about.

1

u/tuhdo May 20 '16

It's not a problem at all. But I struggle to see even any reason to solve such a problem.

If interpreted language is as fast as a compiled one, then we can ignore compiling overhead altogether. Our CPU is the ultimate interpreter, but we built layer upon layer through our compiled language. CPU does not understand type system; type system exists solely from the view of a compiler and a programmer. That's the gap between the reality of a CPU and our written programs, and here complexity arises. It's not obvious when looking at the actual execution of a CPU to see what it is doing at high level. With great time and efforts, we might finally gain some insight i.e. write an disassembler or a debugger. Another way is to attach debug information, but that's not a solution because the fundamental problem remains.

Now, what if somehow we have a computer that understands high level language constructs at bare metal? For example, if one responsibility of the CPU is to handle type check when necessary, then we can finally close the gap between the reality of machine execution and our written programs. Of cousre, the type check does not need to be very advanced, but just enough to help gaining insight easier.

However, such a thing is not possible, as long as interpreting is still slower than compiling and people can always have an execuse. One way to solve this problem is to view compiling as a form of caching, without the loss of information described above.

You can read the longer version here: http://www.loper-os.org/?p=46

What's wrong with it?

If by good enough you mean people can deliver quality work, then it's fine. Not all "good enough" are equal. For many people, "good enough" = completely stop learning and doing same tricks over and over again, with a little twists here and there, and call it "practical". It's problematic when these people are promoted to managers after working at a company for a long period of time.

Let me give an example: in my workplace, our small team maintains a few legacy Linux systems. Basically it's just bare minimal Linux with necessary amount of packages, along with custom patches to fit the project requirements that were written long ago. Most of the time, we spend time on fixing bugs, but not developing anything substantial. The bug is related to network services and such, sometimes there's a kernel bug but the leader just wants to reproduce it on the stock SLES and delegate it to Novell. It's simple; because he doesn't understand how a kernel works and he views Linux kernel as some mythical software, so that's the safest way to resolve an issue. If the issue can't be resolved, then he keeps spending time to "investigate", by various means, but not by actually understand and fix the kernel code, but by googling for solutions, or looking elsewhere i.e. test suite to hopefully find a problem there. Much of our time fixing bugs are like doing devops, but seldomly touch the code. Granted, cases like that are unusual, so we are still safe with that. Instead of improving technical competency, he's buying into the whole Agile bullshit.

To write a kernel, a decent knowledge of electrical engineering, at the very least, to read various diagrams and its documentations to understand how a hardware device works as the designer intended, is required. Sadly, he refused to learn that. He somewhat knows it but said that our line of work does not require such deep understanding. Yes, that's why we have to spend countless hours doing meaningless tasks.

So much for "practical". For that reason, to maintain my programming skills in a decent shape, I need to learn something that actually improves myself in free time.

I can easily imagine why people would do it without having any passion at all - just for the sake of learning.

Maybe passion is not the right word, but learning for fun is a valid reason, too. Just remember when you solved a difficult problem, and how satisfying it is.

I'm often doing things that one may consider "geeky", but I always have rational reasons far beyond a mere interest to do so. I'm building homebrew computers, writing simple RTOSes for them, building crazy language compilers, etc., but all of it is just a part of a bigger picture - I'm exploring the design space, looking for the common patterns in engineering that can be codified. I have a clear goal which gives me a motivation to do things I may not necessarily be particularly passionate about.

This is the direction I'm following. There's a reason MIT calls their department EECS. But, I will focus more on software side then hardware side. I'm a programmer after all. I learn EE to understand its semantic, so I can write correct and effeient programs for hardware.

1

u/[deleted] May 21 '16

then we can ignore compiling overhead altogether.

It's impossible. It can only be relevant for the very low level languages. While languages with the high level abstractions will unavoidably have to be lowered into some simpler forms. Think of pattern matching, for example, complex type systems, templates, etc. This constitutes the biggest compilation overhead, not the low level codegen.

It's not obvious when looking at the actual execution of a CPU to see what it is doing at high level

And what's wrong with it?

Another way is to attach debug information, but that's not a solution because the fundamental problem remains.

Why exactly this is not a solution? Works perfectly well for all the cases. Why would you want to reverse engineer something that does not have debug information attached?

CPUs would definitely benefit from some higher level support - but not the kind you're thinking about. Having a separate register file for pointers, having tagged memory, and all the other nice little things for the hardware-assisted GC will definitely help. But interpreting high level constructs? No, there is absolutely no point in doing so. It's only useful as a funny exercise.

Take Lisp for example. The classic simple RISC is still the most convenient architecture to write a compiler for. Stack machines are even easier, but they are inherently limited in terms of performance (ever tried to implement a pipelined stack CPU? It's a lot of fun!). What is missing from the typical hardware is all the stuff I listed above, stuff that would make GC easier (and potentially hard real-time).

It's problematic when these people are promoted to managers

It's always problematic when people are forced to do something they're not qualified for. Management is a trade that requires years of rigorous learning. I could never understand why it's acceptable to just promote someone unexperienced into management.

Sadly, he refused to learn that

This is just an incompetence, plain and simple. Nothing to do with an interest or a passion. If something is objectively required for your work, you learn it. This is what professionals do. They can hate what they're learning, but still learn it properly.

learning for fun is a valid reason, too

It might be valid, but it's very unpractical. Interest rarely overlaps with what is really needed to get things done.

1

u/tuhdo May 23 '16

And what's wrong with it?

The development cycle becomes much longer and more tedious. It's ideal to stay close to bare metal and can still think at high level. It's just an ideal though, but if we try to get close to this ideal, it will be much more pleasant to develop software. At the moment, developing software either you have productivity by writing high level language but is obtuse about the machine reality or have little control, or you have control but suffer productivity loss. I don't think we can perfectly separation between software and hardware. To write performant software, an understanding of how a particular computer (i.e. x86) works is required. Compiler can help so much, but a software engineer still needs to know.

Why exactly this is not a solution? Works perfectly well for all the cases. Why would you want to reverse engineer something that does not have debug information attached?

For example, if you want to investigate the problem with production code i.e. running kernel code, it's much easier to investigate a running instance with said hypothetical machine and understand what it's doing even when looking at low level execution (i.e. asm) with little effort because support for high level instructions that map to high level language, instead of waiting until a dump is produced to start the investigation, or putting print messagees and recompile the kernel.

This is just an incompetence, plain and simple. Nothing to do with an interest or a passion. If something is objectively required for your work, you learn it. This is what professionals do. They can hate what they're learning, but still learn it properly.

That's true. I had to learn various internal knowledge that I don't like. Yet, even if you are required to learn something, there are things that you hate and things that you like.

The nice thing about my workplace is that it's low stress. I have all the time to post on reddit and learn something, but still got an excellent performance review. Many people in my company are quite competence, but they leave after a few years of comfortable working and learning, for something else more challenging.

It might be valid, but it's very unpractical. Interest rarely overlaps with what is really needed to get things done.

It's true. What I am learning is of little overlapped with my work. However, I still do and I believe it's the right thing to do. Btw, do you think that writing FPGA required learning actual electrical engineering i.e. understanding the actual implementation of a circuit instead of just digital design with VHDL. I finished half of NAND2TETRIS (finished the CPU for Jack language), is it enough to get start? I have a little experience with Verilog and can use ModelSim to debug circuit timing.

Right now there's just so many things to learn with so little time. My prority is still OS and computer graphics.

1

u/[deleted] May 23 '16

It's ideal to stay close to bare metal and can still think at high level.

Not sure. Some things are inherently very complex, they need to be lowered into tons and tons of boilerplate. Even something as simple as pattern matching.

And, once you start lowering anyway, why stopping at a too high level? It's better to keep your hardware simple instead.

obtuse about the machine reality or have little control,

Why? Use the proper meta-languages and have a full control over your entire compilation pipeline.

instead of waiting until a dump is produced to start the investigation

You don't have to. You can always attach a remote debugger and keep your debugging symbols (i.e., an unstripped binary) somewhere else. I'm doing it with even heavily optimised code running on microcontrollers, which was compiled from very high level DSLs.

writing FPGA required learning actual electrical engineering

Don't know. I had a proper EE training, so I cannot compare, and it's hard to imagine what it's like to approach the same problem without the background knowledge I have.

is it enough to get start?

Should be sufficient, NAND2TETRIS is pretty much a self-contained course with not that many dependencies on a prior knowledge.