Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why code-as-data?

What is code-as-data? I've heard it's superior to "code-as-ascii-characters" but why? I personally find the code-as-data philosophy a bit confusing actually.

I've dabbled in Scheme, but I never really got the whole code-as-data thing and wondered what exactly does it mean?

like image 486
Peter C Avatar asked Nov 10 '10 02:11

Peter C


People also ask

Why is it important to code data?

Why is it important to code qualitative data? Coding qualitative data makes it easier to interpret customer feedback. Assigning codes to words and phrases in each response helps capture what the response is about which, in turn, helps you better analyze and summarize the results of the entire survey.

Is coding considered data?

"Data" is the input or output of an application, and "code" is the set of instructions that specify what to do with the input. However, in most computer architectures, "code" and "data" are both just "stuff" in memory or on disk, and whether you consider any particular set of "stuff" as code or data is subjective.

What is the main purpose of coding?

Coding creates a set of instructions for computers to follow. These instructions determine what actions a computer can and cannot take. Coding allows programmers to build programs, such as websites and apps. Computer programmers can also tell computers how to process data in better, faster ways.

What is coding a questionnaire?

Survey coding is where you review all of your open-ended, qualitative responses, identify themes or commonalities, and then sort them into categories or groups using tags. Coding your survey data is really a form of analysis in itself. But it's just the starting point of your analysis journey.


1 Answers

It means that your program code you write is also data which can be manipulated by a program. Take a simple Scheme expression like

(+ 3 (* 6 7)) 

You can regard it as a mathematical expression which when evaluated yields a value. But it is also a list containing three elements, namely +, 3 and (* 6 7). By quoting the list,

 '(+ 3 (* 6 7)) 

You tell scheme to regard it as the latter, namely just a list containing three elements. Thus, you can manipulate this list with a program and then evaluate it. The power it gives you is tremendous, and when you "get" the idea, there are some very cool tricks to be played.

like image 72
I GIVE CRAP ANSWERS Avatar answered Sep 24 '22 20:09

I GIVE CRAP ANSWERS