Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: NOOB wants to learn!  (Read 10488 times)

0 Members and 1 Guest are viewing this topic.

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: NOOB wants to learn!
« Reply #15 on: May 06, 2011, 08:22:36 PM »
Quote
Yes, but different languages often require different thinking. in C, you could create subroutines, in early versions of BASIC you cannot
BC, I  wish to correct you on that statement. It is misleading and pointless. One needs to understand sub routine as an idea regardless of the syntax  of a language. If early BASIC did not have subroutines, then neither did C.

The concept of a subroutine can be made even in the most primitive programming environment. In this thread the idea that the language controls you thinking has been overstated.

A criticism of early programming language is lack of local variables. Classic C is that category. Yet the concept can, and has, been used even in assembly language. You have to thin k outside of the box.

The programmer can discipline himself to think of his programing method  as having local variables and reusable code and an  and abstract idea idea that does not depend on the limits of the language.

The worst example I can think of from my own experience is machine code for the 1802, an 8bit CPU once made by RCA that has a 65 536 byte address space.(1024 times 64 = 65 536.) The programmer had to crate his own stack mechanism and discipline himself to place things on the stack and take them off. The CPU was a close to a RISC type and you have to create your own abstract layer at the machine code level. That kind of programming you would do in a quit place with a cup of coffee -
and you mind.

NOOB wants to learn! is the theme here. Reducing this to which programming language is best, does not fully  address his needs.

My formal training was in COBOL on a IBM 360. I never even saw the machine. None of my programs ever worked.  After that, I was learning a very early version of Microsoft BASIC and studied that and wrote two games that whee later published  in the now default Personal Computing magazine.
But long before that, I had done a lot of heavy reading about computers, but not just about computer languages. My college days were just one semester. I had to work  full time. At home I learned 8080 assembly language from a very brief article by Bill Gates. On an Altair I built.

This post is  longer that what I like to do, I make too many spelling errors. Bit if the OP understands what I mean, that is all the matters. Every hing he can learn can help him in the future with any challenge he may face.

Nicolas Wirth wrote a language called Pascal. Rather that recommend learning Pascal. I would recommend learning about Nicolas Wirth. And find out why he named it Pascal.
OP, Please read:
http://en.wikipedia.org/wiki/Niklaus_Wirth
And tell use what you think about the information found there.

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: NOOB wants to learn!
« Reply #16 on: May 06, 2011, 09:27:50 PM »
BC, I  wish to correct you on that statement. It is misleading and pointless. One needs to understand sub routine as an idea regardless of the syntax  of a language. If early BASIC did not have subroutines, then neither did C.

Code: [Select]
int doubler(int x)
{
return x*2;

}
int x = doubler(5);

The above is a example of a subroutine and it's use. The below is a segment of linear code that pretends to be a subroutine.

Code: [Select]
100 LET P=5
200 GOSUB 500
300 PRINT R
400 END
500 REM P is input parameter. R is output.
600 R=P*2
700 RETURN

I say "pretends". because in minimal BASIC this was the best you could do. A subroutine by definition requires a concept of scope, Minimal BASIC doesn't have a concept of scope; ANSI BASIC didn't either, all variables are global. some dialects offers <REAL> subroutines (VAX BASIC) and almost all of them allowed the DEF FN construct for creating functions, but they are mere approximations.

Yes, you can create subroutines in BASIC. but you can also create complex object heirarchies using structs and pointers to other structs and function pointers in C, but C doesn't exactly grease the wheels for doing so, since it's basically beyond the design. You can't do functional programming in BASIC. And if you think so, you don't know what functional programming is. You can emulate it, but if the languages don't encourage that design philosophy, and even discourage it, there is no reason to embrace it. Sure, you could learn GW-BASIC, but fact is concepts need to be expressed, and just because a language is turing complete and can have most any concept expressed doesn't mean that concept is expressed well. You could teach the concepts behind self contained routines in Minimal BASIC, but most of the concepts will have to be explained in ways highlighting the details about the concept that cannot be full explained outside the abstract.

Perhaps "require" was not the proper word. Many different languages encourage different  thinking, simply because they have different design goals and often different underlying philosophies.

I was trying to dereference Null Pointers before it was cool.

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: NOOB wants to learn!
« Reply #17 on: May 06, 2011, 10:53:41 PM »
Code: [Select]
You can't do functional programming in BASIC. And if you think so, you don't know what functional programming is.Wrong again, BC
C was late becoming the popular system language. It is a procedure language where subroutines return values. The subroutines were functions. BASIC already had user defined functions. If you needed a function to do, say cube root, you could write it in BASIC and later invoke it by the name you assigned to it.  And it was an interpreted language that was used with modems and teletypes so engineers could log into a mainframe and work in BASIC. (GE had such a service.)

The Function call in some form existed other languages of the day. So if you call C a procedure language because t has the ability  to declare functions, then you have to say the BASIC is also a procedure language. And yes, BASIC did have local variables. Go do your homework.

MS BASIC was being sold by Microsoft while the C language people were still thinking about formalizing the C language. In 1977 I had an Altair with Microsoft BASIC that had function definition as part of the language. At that time C was not readily available for the new 8080 and similar CPUs that began the Personal Computer era in 1975. Shortly after 1975 Microsoft offered both a BASIC interpreter with floating point and a single-pass assembler for the Altair. That BASIC had two ways to-create functions that could return values and use local variables. And I used one in a game I published.

Quote
C came into being in the years 1969-1973, in parallel with the early development of the Unix operating system; the most creative period occurred during 1972. Another spate of changes peaked between 1977 and 1979, when portability of the Unix system was being demonstrated. In the middle of this second period, the first widely available description of the language appeared: The C Programming Language, often called the `white book' or `K&R' [Kernighan 78]. Finally, in the middle 1980s, the language was officially standardized by the ANSI X3J11 committee, which made further changes.
Quote
The original Dartmouth BASIC was designed in 1964 by John George Kemeny and Thomas Eugene Kurtz at Dartmouth College in New Hampshire, USA to provide computer access to non-science students. At the time, nearly all use of computers required writing custom software, which was something only scientists and mathematicians tended to do. The language and its variants became widespread on microcomputers in the late 1970s and 1980s.

My apologies to the OP for making this into history lesson. I do not know if  he  wanted this much information. The point being made here is that people can become so involved with writing the current work that they soon forget the history and the people that went before them.

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: NOOB wants to learn!
« Reply #18 on: May 06, 2011, 10:55:31 PM »
Code: [Select]
You can't do functional programming in BASIC. And if you think so, you don't know what functional programming is.Wrong again, BC

I said Functional programming. Not procedural programming.
I was trying to dereference Null Pointers before it was cool.

rthompson80819



    Specialist

    Thanked: 94
  • Experience: Experienced
  • OS: Windows 7
Re: NOOB wants to learn!
« Reply #19 on: May 06, 2011, 11:52:11 PM »
Quote
    I'd much rather see unjustified optimism than unjustified pessimism.

If that was aimed at me,

It wasn't aimed at anybody, just a general statement.

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: NOOB wants to learn!
« Reply #20 on: May 06, 2011, 11:54:43 PM »
Sorry, I thought yew said Functional programming
Quote
...   It emphasizes the application of functions, in contrast to the imperative programming style, which emphasizes changes in state...
... in functional code, the output value of a function depends only on the arguments that are input to the function, so calling a function f twice with the same value for an argument x will produce the same result f(x) both times.
Functional programming
Correction. The Darthmouth on-line serve had compiled BASIC...using punched cards!

Darthmout BASIC had DEF FN
which made it a functional language.
Not just a procedural language.

Yes, one could say it was a punched language.

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: NOOB wants to learn!
« Reply #21 on: May 07, 2011, 09:58:57 AM »
Darthmout BASIC had DEF FN
which made it a functional language.
Not just a procedural language.


BS and you know it.

http://existentialtype.wordpress.com/2011/03/16/what-is-a-functional-language/

The only item in that informal "what does a language need to be considered a functional language" list that any version of BASIC comes close to meeting would be 1.

A Functional language is <not> simply a language that includes the concept of functions. That is a gross misunderstanding of it. thus the "And if you think so, you don't know what functional programming is." Also, I note how no dialect of BASIC is present in the wikipedia list: http://en.wikipedia.org/wiki/Category:Functional_languages

I was trying to dereference Null Pointers before it was cool.

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: NOOB wants to learn!
« Reply #22 on: May 07, 2011, 12:43:59 PM »
Ignore the above post.
Functional programming is a style of programming which models computations as the evaluation of expressions.

It is more about what you want to  and how you will do it. Not which tools you use. Do not let the tool define the solution.

Clippy



    Starter

    • QB64 Basic Programming Site
  • Certifications: List
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows XP
Re: NOOB wants to learn!
« Reply #23 on: May 12, 2011, 12:29:43 AM »
Try Basic programming! It has all that you need at your age and it is EASY to learn. If you try to learn C++ you may quit before you even get started. It may cost you BIG bucks too!

The link to QB64  below will take you to the Forum, FREE compiler download, and our WIKI of all of the Qbasic and QB64 keywords. Have FUN!

Ted
Learn Basic programming with my Qbasic Demo: http://dl.dropbox.com/u/8440706/Q-Basics.zip

Program on 64 bit computers with QB64: WWW.QB64.NET

Jerry_s



    Greenhorn

    • Experience: Beginner
    • OS: Unknown
    Re: NOOB wants to learn!
    « Reply #24 on: May 12, 2011, 01:06:02 PM »
    I am learning too and decided to learn C. I had a hard time reading it so I made a audio file using naturalreader and the voice Graham. Here is the two files I use: http://www.mediafire.com/?eamm6mb9orf0xv9 http://www.mediafire.com/?918jn2w88yzos26

    I read the rtf file and listen to my audio at the same time, and when it comes to code I open my c file and type it in and compile it using visual studio 2010 express with sp1. I open the compiler, go the the folder the c file is using the "cd" method:
    C:\Users\Brian>cd C:\Users\Brian\Desktop
    And then to compile the c file I use this code:
    cl samp.c
    And then to run the c file I type;
    samp.exe

    I only read the chapter I can understand, and I do this every day until I learn the chapter then I go to the next chapter. Right now I'm at the Functions chapter.
    I read this post and decided to reply with my method, since it's working for me.

    Jerry_s



      Greenhorn

      • Experience: Beginner
      • OS: Unknown
      Re: NOOB wants to learn!
      « Reply #25 on: May 12, 2011, 01:08:24 PM »
      Oh, that code is for use in command promt, visual studio express has it's own command prompt you use to compile the C code.

      mechaflash



        Rookie
        • Yes
      • Experience: Experienced
      • OS: Windows XP
      Re: NOOB wants to learn!
      « Reply #26 on: May 13, 2011, 12:18:06 PM »
      I'll give you the best tip anyone can to help you learn to do programming... find a solution to something you wish to accomplish on your computer. 

      Maybe you wish you could keep your files organized better... learn to do batch and vbs scripts for file management on your computer that focuses on handling file types, sorting files, keeping a log etc.

      Just that alone will get you searching for commands, learning techniques, and getting involved on forums.  Start with simple sub-problems like "how do I move a file from here to there" then go more complex as "how would I backup each file from all subdirectories of X directory to another location then output the file names to a .txt file that's labeled with the current date and time to keep a record of the files and then compress them so I don't waste disk space".

      If you go around finding solutions to problems instead of 'just learning to program', you will become a wanted resource in the field of programming.  Always make sure you share your work with others, and not just ask questions, but give examples of things you've tried.

      Each programming language has its strengths and weaknesses... you have to find which one works well with your problem.