17
Tips for learning a programming language Prepared By Ghulam Nasir (Khan) TA (Introduction to ICT and Programming – BICSE-5)

Tips for learning a programming language Prepared By Ghulam Nasir (Khan) TA (Introduction to ICT and Programming – BICSE-5)

Embed Size (px)

Citation preview

Page 1: Tips for learning a programming language Prepared By Ghulam Nasir (Khan) TA (Introduction to ICT and Programming – BICSE-5)

Tips for learning a programming language

Prepared By Ghulam Nasir (Khan)

TA (Introduction to ICT and Programming – BICSE-5)

Page 2: Tips for learning a programming language Prepared By Ghulam Nasir (Khan) TA (Introduction to ICT and Programming – BICSE-5)

IntroductionThe first time we hear about a programming

language, we wonder with is programming and what is a language. What are the functions of the programming language and why should we be familiar to programming language. After getting a brief overview of programming from our seniors, we think it is really a tough thing and we think that we are not able to do it. But according to me

“The easiest and the most interesting thing in the world of technology is programming because it involves logic. It just want you to think about a problem, prepare a plan of attack in terms of english sentences and translate the sentences into programming language. However, the key to success in programming is clear concepts and lots of practice”

Page 3: Tips for learning a programming language Prepared By Ghulam Nasir (Khan) TA (Introduction to ICT and Programming – BICSE-5)

Steps for gaining proficiency in a subject/languageBe MotivatedGain KnowledgePractice the Knowledge gainedThink about real world scenarios where you

can implement the knowledgeTry to implement the knowledge in the real

world by first designing a plan of attack and then writing a program from the plan of attack.

Page 4: Tips for learning a programming language Prepared By Ghulam Nasir (Khan) TA (Introduction to ICT and Programming – BICSE-5)
Page 5: Tips for learning a programming language Prepared By Ghulam Nasir (Khan) TA (Introduction to ICT and Programming – BICSE-5)

The first time you hear about some new programming language you have a big, empty, black space in your head. That is your ignorance. The new language is foreign, unknown, a dark void. Learning the language is all about dispelling the darkness in your head and to replace it with a mental model of how the language works. You must cast the light of knowledge on the subject. Now Let us see some tips which can help us gain knowledge of and proficiency in the language

Page 6: Tips for learning a programming language Prepared By Ghulam Nasir (Khan) TA (Introduction to ICT and Programming – BICSE-5)

1 – Willingness To LearnThe first thing in learning anything is

showing willingness to learn it. If a person is not willing to learn anything, no one in the world can make him learn it. Secondly, you should think that you can do it regardless of its level of difficulty. It is said that

“When you say that I can do it, 50% of work is already done”

Page 7: Tips for learning a programming language Prepared By Ghulam Nasir (Khan) TA (Introduction to ICT and Programming – BICSE-5)

2 - Get Your Hands On ItTo learn about a programming language, we need

to have almost all information about that language and a platform in which we can write and execute programs written in that language. So first of all, we must have the compiler of that language. In your case it is the Turbo C v 3.0 Compiler. Try to open the IDE and visit the help section etc.[It is available on http://www.groups.yahoo.com/group/bicse-5 ]

Page 8: Tips for learning a programming language Prepared By Ghulam Nasir (Khan) TA (Introduction to ICT and Programming – BICSE-5)

3 - Study HistoryFind out where the language came from. Go back

and find the original source material to understand the history of the language. Why was it first created? What kind of problems was it designed to solve? This will help you understand its strengths. What languages influenced its syntax? What accidents of history are responsible for you ever hearing about it? Don’t be content to read some distilled version of the history. Look for the original, definitive source that puts the language into context. This is a beginning towards understanding the nature of the problems the language is designed for.

Page 9: Tips for learning a programming language Prepared By Ghulam Nasir (Khan) TA (Introduction to ICT and Programming – BICSE-5)

Concentrate on LecturesIt is very hard to learn the first language from the

books and tutorials, so concentrate on what the lecturer is teaching in the class and try to get your concepts are clearer as possible because if you do not clear your concepts in the beginning, it will create a very big problem for you in the future.

To learn more, you must ask different brainstorming questions from the lecturer or any other concerned about any unclear concept. It must be noted that the questions should be asked for the sake of clarity and not for the sake of just asking.

Page 10: Tips for learning a programming language Prepared By Ghulam Nasir (Khan) TA (Introduction to ICT and Programming – BICSE-5)

4 – Stick To Your Lecture Notes during the 1st week or soIt is better to stick to the lecture notes during

the 1st week so that you can get the basics of the language and all the knowledge that has been discussed in the above slides. You will come to know about input/output statements and some other statements such as clearing the screen etc. You will also become familiar to the environment in the 1st Lab.

Concentrate on what the teacher teaches you and then try to make your concepts as clearer as possible.

Page 11: Tips for learning a programming language Prepared By Ghulam Nasir (Khan) TA (Introduction to ICT and Programming – BICSE-5)

5 - Make It do somethingAfter getting the compiler and attending the

1st 3 lectures and the 1st lab, try to make the language do something for you. That is try to write your first program. It is typically the Hello World Program or a program that prints your name.

[Note: This step comes after the 2nd or 3rd lecture on c-language]

Page 12: Tips for learning a programming language Prepared By Ghulam Nasir (Khan) TA (Introduction to ICT and Programming – BICSE-5)

6 - BrowseUse Google, flip through books, visit mailing lists, look at

different products. Spend some time just exploring all the different kinds of information there are about the language. At this point you can’t remember much of it, but you will pick up some tidbits, you will start to get a feel for some of the main issues, and you will discover good resources to learn more. Many of these sources will give contradictory and just plain wrong advice, so don’t believe everything you read. This is not so much shedding light on the subject as it is shopping for places to get light. The Browsing stage of learning never comes to an end so it continues all the way.

[In my point of view, one should not consult the book or any other tutorial during the first week or so(1st 3-4 lectures) because you are new to the environment and most of the books are not for the very beginners. They assume that the reader knows something about programming. So in the 1st 3-4 lectures, you will gain something about programming and you will reach the level where you can consult any book]

Page 13: Tips for learning a programming language Prepared By Ghulam Nasir (Khan) TA (Introduction to ICT and Programming – BICSE-5)

You can read books and tutorials all day. What the author does will make complete sense. “Of course” you will say… to make blue text appear on the screen that is obviously the right command to use. The problem is that your brain tricks you into saying “of course” to the answers you are given. What you need to do is to try and make the language do something of your own design. So what if you want green text and what if you want it to be tilted at an angle? Well… the book doesn’t say how to do that… now your brain has to engage and actually learn how to make the language do what you want rather than simply assent to what it reads in a book. Now you are traveling through the darkness and gaining first hand experiences to truly understand what the language is all about.

6 - Build something yourself

Page 14: Tips for learning a programming language Prepared By Ghulam Nasir (Khan) TA (Introduction to ICT and Programming – BICSE-5)

After studying a programming language for 2 to 3 weeks, you will be able to use arithmetic operators, take input from the user, process it and display it on the screen as output. So this is the stage where the actual work begins. You should start consulting your book, teacher, teaching assistants and other resources at the start of the 2nd week(probably 5th or 6th lecture onwards). This will help you a lot. You can think of a problem and then find a solution for it. If you are facing any difficulties, consult your class fellow, teacher, teaching assistants or any other person. It will help you to have a clear concept of different programming terminologies and you will be able to apply the programming language in practical life.

7 – Think of problems and then find solution to it

Page 15: Tips for learning a programming language Prepared By Ghulam Nasir (Khan) TA (Introduction to ICT and Programming – BICSE-5)

There is a proverb that “Practice Makes A Human Being Perfect”Same is the case with programming. The more

you practice, the more knowledge and proficiency of the subject(programming) you will gain. If you practice for at lease 1 hour a day, I guarantee that programming will be your favorite and easiest subject. However, if you do not practice it, you will find it the toughest.

The Most Important Factor: Practice

Page 16: Tips for learning a programming language Prepared By Ghulam Nasir (Khan) TA (Introduction to ICT and Programming – BICSE-5)

Lectures

Minimum Book Consulting Hours per day

Minimum Practice per day

1st - 4th None (just use the lecture slides) 30 minutes – 1 hour

5th – 9th 30 minutes – 1 hour 1 hour – 2 hours

11th – 15th

45 minutes – 1 hour and 15 minutes

1 hour – 2 hours and 30 minutes

15th –18th

1 hour – 2 hours 1 hour 3o minutes – 3 hours

19th – 20th

1 hour – 2 hours 1 hour – 2 hours

Suggested Plan (for students)

Page 17: Tips for learning a programming language Prepared By Ghulam Nasir (Khan) TA (Introduction to ICT and Programming – BICSE-5)

Suggested Plan(continued)Lecture 1st – 4th Introduction, I/O

Statements, gotoxy(),clrscr(), getch(),variables

Lecture 5th – 9th If, if-else, nested if-else, switch, break

Lecture 10th – 14th for loop, while loop, do while loop

Lecture 15th – 18th functionsLecture 19th – 20th Introduction to Array

Any Body who will follow this plan will not find any difficulties in learning and using C/C++.