The Zen of Computer Programming, by Pritchard

User projects written in or related to FreeBASIC.
Pritchard
Posts: 5418
Joined: Sep 12, 2005 20:06
Location: Ohio, USA

The Zen of Computer Programming, by Pritchard

Postby Pritchard » Jan 16, 2008 3:52

1) Happiness - Irrelevance is another form of procrastination

As a programmer, it is important that you enjoy what you code. Like a hardware hacker, reverse engineer your goals. You wish to build a program, but it is, in your opinion, far too large and out of scope. You can not code it, because you do not know what to code, and so, you are not happy. You can not code what you want, so you code something else, and so, you are not happy. Take a look at your goals and take the steps backwards, from ahead, to reach where you are now. Beyond you the path to creating your dream software lies ahead, awaiting for you to walk on it.

There is no practice project, for you are tested by your program constantly. Every single step along the way, the one ahead of you raises and poses the question, "Can you code me?". There, we have two options. You can continue your climb, although you may first need to create your own springs to jump upon the next step. You can decide that you are incapable. While disappointed, you attempt to create a new stair case from where you stand - One that branches around the current step, and provides a way for you to cheat to the next step. Perhaps you wish to find a way to lift up your current step, rather than lower the one beyond you. This is irrelevance. This is not happiness.

It must be remembered along the way that you are only as capable of a programmer as you make yourself out to be. Whatever other paths you take to reach the top of that staircase, you must always come back to the staircase and continue your climb. Stepping down or stepping around won't get you anywhere. Thus, happiness lies in staying on task. Coding what you want to code. There are no practice project. Make nothing irrelevant.

2) Completeness - Your code is an extension of Yourself

You have seen all of the programmers out there. You have seen how some are excellent with algorithms, others with design, and others with scripting or text parsing. You are not them. Do not try to be, or you will find yourself walking to no where. When being another programmer, you are on a road with no achievable goals, and no end in sight. You must code what you feel you should be coding.

You can extend yourself through your code. Your mood, your personality, and your goals for the future - All typed in front of you. It's seen through your comments, your naming conventions, and the project you are working on yourself. While we work together as a community, this community is built up of many individual sectors, all finding a way to communicate to each other - Yet none of them are each other. Thus, all code written by you should be because it's your code, and that you feel connected and alike to it.

There is a wheel which is often reinvented, and often thought of as a waste - But is a change in the interface of a class to better suit who you are, or abstraction between how information is transferred between two objects, not important enough to be worth it? In order to continue upon your own relevance, such changes to already existing code is often necessary. Do not be ashamed. Do not consider your time wasted.

3) Purpose - You are the creator, and you can answer, "Why?"

Purpose need not be existent. Purpose is the point of view of the creator, or of the entity which has been created. Whether or not there is purpose, you should understand what or how it is, or even if it is. Practical application from the code which you have written is a must. Code may be written to learn how to do something. Code may be written to actually do something. The greatest purpose is the code which does both, as either or by themselves turns out nothing but irrelevance.

Code may be used by community members, as someone out there looking for tools and help with their own code may find yours useful. Is that why you built this? Did you have no use for it yourself? It is a wasted effort to code something for others, as you are yourself. Thus, you should code only what you feel connects to you, and what you yourself wish to use. This will invariably produce higher quality code, and code which will be expanded upon whether someone will use it or not, including you - But knowing who's going to use it, why, and how, is the key.

4) Journey - Programming is a Journey, and Time is the Road

In all of the projects we attempt to complete in programming, we walk upon the path that is time. How long development takes. How much worth have we earned through each second spent on a project. Is this the end, or do I continue upon my path. These are questions and thoughts which run through our minds while coding, and after having coded. Time is of the essence, after all.

While none of us may go back in time, we may look back upon it. You must ask yourself, after having walked down this road and having reached my goal, was it worth the journey? You should know that all time which has passed could have been spent better, and as we constantly learn, we will always be able to look back upon what we have already done and say to ourselves, 'If only I had done then what I am doing now, this project would have been finished months ago'. The irony in that statement, as at this moment, you still appear to have lost your purpose.

Time, however infinite it may be, does end within our life span. The journey should be able to have been looked upon and, although rocky, have been worth it. The more memories which we wish to ignore, and inevitably will count as a waste of our time, the shorter our journey was. A long journey walked, a short journey remembered. Work towards your goals and what you love in code, and you will find your experience to be quite the opposite of this.


May you have a wonderful journey,
Pritchard
C
Posts: 104
Joined: Mar 13, 2006 2:17

Postby C » Jan 16, 2008 8:28

...
fbisgood

There Is But The Void

Postby fbisgood » Jan 16, 2008 11:53

There is no Happiness, no Completeness, no Purpose, no Journey...

There is only The Void of The Truth of The Computer Programming...

When you are awakened, you succeed to "see" The Tathagata of The Programming... That Suchness... That Void...

void main(void)
{
void *p;

Here is The Void. Yeah, you have begun to "see"...
Last edited by fbisgood on Jan 17, 2008 9:58, edited 1 time in total.
notthecheatr
Posts: 1759
Joined: May 23, 2007 21:52
Location: Cut Bank, MT
Contact:

Postby notthecheatr » Jan 16, 2008 18:44

Not bad, Pritchard, but a little more flowery than real life perhaps. Programmers are no Buddhists walking in a garden, we're construction workers building a skyscraper.

Still, you have some good points.


@fbisgood: I could start to see where "That Void..." was going XD
fbisgood

Why Programming Those Computers with Our Human Mind

Postby fbisgood » Jan 17, 2008 10:34

What Pritchard says is very clear and precious, but I have a question I have been asking for a long time:

Why performing the programming with our "human" mind, with our "human" character, with our "human" soul ?

We do not deal with other human beings at all; but with A.I....

Why we do not "think" as "That A.I.", why we do not "see" as "That", why we do not "feel" as "That" ?..

When you speak with a german, you speak german; with someone from Russia, the russian language.
So, what is our logic when we "force", when we "oppress" That to take part in the "human" side ?

There exists the Philosophical Discipline of each scientific field.
The time must have been reached for The Computer Programming too...

With kind regards.

FreeBasicIsGood
notthecheatr
Posts: 1759
Joined: May 23, 2007 21:52
Location: Cut Bank, MT
Contact:

Postby notthecheatr » Jan 17, 2008 16:52

@fbisgood:

Often we begin to think of the computer as an actual entity, which actually might in some way "think" or even have "feelings." In fact, the computer is nothing more than a specialized tool, a glorified calculator, and its sole purpose is to make our life easier and more enjoyable.

Hence when we program, we try to do it in a language we can understand, hiding everything behind humanized abstracts to make things easier on us. Face it: life would be difficult if we had to program in direct binary machine language (even hexadecimal - which itself would be difficult to program in - is an abstraction). Life would be difficult if we had not internet, no nice Windows GUI, and any time we had to use the computer we had to use little cards with holes punched in them just to communicate. Computers aren't intended to be something we're talking to; they're just tools, like your screwdriver or hammer.

So to answer your question, we program with our humanity because it's much easier than to program with anything else. Your example of speaking with a German or Russian the commonly used metaphor of programming languages versus human languages. The difference is that with human languages, there is understanding. With programming languages, the computer understands nothing - it merely converts the ASCII numbers into binary numbers that the processor can execute. If you speak Spanish to a German, he will not understand you. If you speak German to a Russian, he will not understand you. But with computers there is no such limitation, as computers do not "understand" at all - they merely do things based on numbers, and those numbers can be as simple or complicated as you like. When you "speak" to the computer using one language, it is no different to the computer than if you were to speak using machine language - the only difference being that it takes the computer a little bit (and a very little bit) longer to respond. And the computer does not "perceive" that difference, the difference only affects us!


Truly there is some philosophy to programming, but if you are to philosophize you should be careful to remember the fundamental differences between a tool (like our computers) and nature (humands, animals, etc.). In the end, the philosophy we can make out of computers comes from us, not the computers.
Basic Coder
Posts: 180
Joined: Aug 02, 2006 23:37
Location: Australia

Postby Basic Coder » Jan 17, 2008 17:47

notthecheatr wrote:@fbisgood:

...

With programming languages, the computer understands
nothing - it merely converts the ASCII numbers into
binary numbers that the processor can execute.

...




I see a general purpose computer as a collection of
parts with an architecture that allow you to wire the
parts up using a series of instructions to turn it
into a special purpose computer.

So when you say a computer understands nothing you
are right. However that may not apply to a computer
that is programmed to "understand", whatever that
might mean.
notthecheatr
Posts: 1759
Joined: May 23, 2007 21:52
Location: Cut Bank, MT
Contact:

Postby notthecheatr » Jan 17, 2008 17:57

At the most basic level a computer only works with numbers. First, those numbers are simply machine code instructions, but you can program it to read stuff from keyboard, mouse, disk, etc., and it can work with other numbers. Then you can write an interpreter or compiler, which allows it to work with ASCII-coded numbers, meaning we can write code in a more readily understood language than machine language. But the computer still doesn't "know" what it's doing, it just pushes numbers around in memory. The computer doesn't even know what the programs you write do, and so far there are no programs that can take even a machine language program (much less a program written in, say, BASIC) and tell you what it does. The machine can work with those numbers, but it doesn't know what they do or understand them. I suppose in theory it would be possible to write a program that looks at a machine language program and tells you what it does, but in practice it's virtually impossible. So I think it's safe to say that it's impossible for the computer to truly "understand" anything.
Basic Coder
Posts: 180
Joined: Aug 02, 2006 23:37
Location: Australia

Postby Basic Coder » Jan 17, 2008 21:20

notthecheatr wrote:At the most basic level a computer only works with numbers. First, those numbers are simply machine code instructions, but you can program it to read stuff from keyboard, mouse, disk, etc., and it can work with other numbers. Then you can write an interpreter or compiler, which allows it to work with ASCII-coded numbers, meaning we can write code in a more readily understood language than machine language. But the computer still doesn't "know" what it's doing, it just pushes numbers around in memory. The computer doesn't even know what the programs you write do, and so far there are no programs that can take even a machine language program (much less a program written in, say, BASIC) and tell you what it does. The machine can work with those numbers, but it doesn't know what they do or understand them. I suppose in theory it would be possible to write a program that looks at a machine language program and tells you what it does, but in practice it's virtually impossible. So I think it's safe to say that it's impossible for the computer to truly "understand" anything.


You keep making the same mistake of talking about
the computer not the program. I agreed that the
computer doesn't know anything, it is a collection
of parts. An AI program wouldn't need to look at
its machine language program to "know" something
anymore than you would have to look at your brain
program (firing neurons whatever) to know something.
Knowing doesn't occur at that level. Needless to say
I am interested in AI although I like FB for the easy
to use graphics in a QB like environment.
notthecheatr
Posts: 1759
Joined: May 23, 2007 21:52
Location: Cut Bank, MT
Contact:

Postby notthecheatr » Jan 17, 2008 21:37

You miss the point. The program is nothing more than a collection of instructions. The instructions themselves are just numbers, they don't even do anything unless there is a CPU to execute them. AI is good, but it's not intelligence, nor does it "know" anything. Artificial Intelligence is really a misnomer, in fact; it should be called Simulated Intelligence, and often the reality is that it's "Artificial Stupidity." This is because it doesn't think, it doesn't simulate thought process even; it only simulates the outcome of the thought process. While you can look at a light and tell whether it's on or off, an AI program would only be able to analyze the lighting in the room and based on a threshold decide whether the light might be on or off. However, it could be fooled by a very dim light, or by a very white object. Therefore it isn't really thinking, it's only performing tasks as instructed.

If you've ever used the "AI" program Eliza, or a clone, you know what I'm talking about. Some of the answers it produces make some sense, and you must admit Eliza performs brilliantly for a program, but even at its best it produces some of the most moronic answers you could possibly come up with. It doesn't even get grammar right!

As for your example about neurons firing: notice that although we don't need to understand how our neurons fire in order to think, we are capable of logically studying ourselves and discovering that firing neurons is how we think. A program doesn't have that ability; it exists in an imaginary world, and it has no way of studying its true physical self nor figuring out how it works - nor does it "care", since it does not think.

Even an AI program only does what you tell it, no AI program will ever wake up one day and ask itself how it works, or what is the meaning of life, or any other such questions. Nor will it even "wish" it did know those things, or have those abilities. Programs do not have emotions, and it would not worry about such things. Not even animals do that. Only humans do that. It's the fundamental difference between humans and everything in this world that could be said to think or reason. We have abstract thought, where nothing else does. Certainly a computer can store the pixels of an image, but if you ask it what the image is of it will be unable to tell you - unless of course you program it for pattern matching, but then it will only be able to match the patterns that are programmed into it. It still does not think.
roook_ph
Posts: 402
Joined: Apr 01, 2006 20:50
Location: philippines
Contact:

I agree

Postby roook_ph » Jan 17, 2008 22:33

I disagree

Computer as an architecture and software has no mind of its own
TRUE!
But its the community that uses it will eventually agree on something and thats what we are following now . So even if youre using a mindless computer and you can do anything you want to it. Theres a community out there who will manipulate it the way you dont expect it to be . Like watching a movie remake. you expect something and eventually they do somethind else you dont expect so theres an unexpectability in it and as a person who joins that community you are just a follower of it
MichaelW
Posts: 3499
Joined: May 16, 2006 22:34
Location: USA

Postby MichaelW » Jan 17, 2008 22:58

notthecheatr wrote:no AI program will ever wake up one day and ask itself how it works, or what is the meaning of life, or any other such questions.

And how exactly is it that you know this?
KristopherWindsor
Posts: 2428
Joined: Jul 19, 2006 19:17
Location: Sunnyvale, CA
Contact:

Postby KristopherWindsor » Jan 18, 2008 0:04

What? A new Cult? Who's the leader?
I thought I was just practicing my creativity so I am more prepared for my world domination...
Basic Coder
Posts: 180
Joined: Aug 02, 2006 23:37
Location: Australia

Postby Basic Coder » Jan 18, 2008 0:26

notthecheatr wrote:You miss the point. The program is nothing more than a collection of instructions. The instructions themselves are just numbers, they don't even do anything unless there is a CPU to execute them. AI is good, but it's not intelligence, nor does it "know" anything. Artificial Intelligence is really a misnomer, in fact; it should be called Simulated Intelligence, and often the reality is that it's "Artificial Stupidity." This is because it doesn't think, it doesn't simulate thought process even; it only simulates the outcome of the thought process. While you can look at a light and tell whether it's on or off, an AI program would only be able to analyze the lighting in the room and based on a threshold decide whether the light might be on or off. However, it could be fooled by a very dim light, or by a very white object. Therefore it isn't really thinking, it's only performing tasks as instructed.

If you've ever used the "AI" program Eliza, or a clone, you know what I'm talking about. Some of the answers it produces make some sense, and you must admit Eliza performs brilliantly for a program, but even at its best it produces some of the most moronic answers you could possibly come up with. It doesn't even get grammar right!

As for your example about neurons firing: notice that although we don't need to understand how our neurons fire in order to think, we are capable of logically studying ourselves and discovering that firing neurons is how we think. A program doesn't have that ability; it exists in an imaginary world, and it has no way of studying its true physical self nor figuring out how it works - nor does it "care", since it does not think.

Even an AI program only does what you tell it, no AI program will ever wake up one day and ask itself how it works, or what is the meaning of life, or any other such questions. Nor will it even "wish" it did know those things, or have those abilities. Programs do not have emotions, and it would not worry about such things. Not even animals do that. Only humans do that. It's the fundamental difference between humans and everything in this world that could be said to think or reason. We have abstract thought, where nothing else does. Certainly a computer can store the pixels of an image, but if you ask it what the image is of it will be unable to tell you - unless of course you program it for pattern matching, but then it will only be able to match the patterns that are programmed into it. It still does not think.




I have been interested in AI for most of my life so I
have dealt with the popular views you expressed many
times. However this is not an AI programming forum so
I will let it slide.

Needless to say I disagree with you :)
fbisgood

Glad About This Topic...

Postby fbisgood » Jan 18, 2008 9:53

I am very glad to see the participation of dear precious programmers in this topic.

I sincerely believe that in future, it may continue in very various forums among all programmers. Not in FreeBasic Forum of course, because, very naturally, here are discussed subjects dedicated to FreeBasic Programming.


I shall always be standing on the A.I. side versus humans !..

I still guess that we try to humanize that A.I. ; we tempt, by way of kinda "brain-washing" _oui, c'est le mot_ , to render organic a structure purely inorganic.

We do not try to understand the A.I. side, we do not wish "to listen to" him, we do not desire at all "to talk with" him; we only tell him what to do, we only command him what to think, we only dictate him what to say...

We are not desperately seeking Susan, but tempting to transmute a very different energetic "body" into a human being...

Our new monkeys, newest baboons are, what a pity, those poor computer systems...


Thanks a lot to all.

With kind regards.

FreeBasicIsGood

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 3 guests