Learning A New Programming Language

If you're learning a new computer programming language, the process can be difficult. In the following article, you'll learn some helpful hints that will make the process run smoothly and efficiently.

First of all, get familiar with Compiler, compiler option, editor shortcuts or integrated development environment (IDE). Start with a simple 'Hello World' program. Compile it. Use basic functionalities of debugger like setting break points, printing variable values, moving to the next or specific position, stopping debugger etc.

To grasp basics of a new language quickly, here are the exercises I use. Remember some programs may not good for beginners.

(1) Display series of numbers (1,2,3,4, 5....etc) in an infinite loop. The program should quit if someone hits a specific key (Say ESCAPE key).

(2) Fibonacci series, swapping two variables, finding maximum/minimum among a list of numbers.

(3) Accepting series of numbers, strings from keyboard and sorting them ascending, descending order.

(4) Reynolds number is calculated using formula (D*v*rho)/mu Where D = Diameter, V= velocity, rho = density mu = viscosityWrite a program that will accept all values in appropriate units (Don't worry about unit conversion) If number is < 2100, display Laminar flow, If it’s between 2100 and 4000 display 'Transient flow' and if more than '4000', display 'Turbulent Flow' (If, else, then...)

(5) Modify the above program such that it will ask for 'Do you want to calculate again (y/n), if you say 'y', it'll again ask the parameters. If 'n', it'll exit. (Do while loop)

While running the program give value mu = 0. See what happens. Does it give 'DIVIDE BY ZERO' error? Does it give 'Segmentation fault..core dump?'. How to handle this situation. Is there something built in the language itself? (Exception Handling)

(6) Scientific calculator supporting addition, subtraction, multiplication, division, square-root, square, cube, sin, cos, tan, Factorial, inverse, modulus

(7) Printing output in different formats (say rounding up to 5 decimal places, truncating after 4 decimal places, padding zeros to the right and left, right and left justification)(Input output operations)

(8) Open a text file and convert it into HTML file. (File operations/Strings)

(9) Time and Date : Get system time and convert it in different formats 'DD-MON-YYYY', 'mm-dd-yyyy', 'dd/mm/yy' etc.

(10) Create files with date and time stamp appended to the name

(11) Input is HTML table, Remove all tags and put data in a comma/tab separated file.

(12) Extract uppercase words from a file, extract unique words

(13) Implement word wrapping feature (Observe how word wrap works in windows 'notepad')

(14) Adding/removing items in the beginning, middle and end of the array.

(15) Are these features supported by your language: Operator overloading, virtual functions, references, pointers etc.

Is there something called 'namespace / package / module' supported by your language? (Name mangling) - Read More on this

About the Author:

Prashant N Mhatre

I mainly developed software for Stock Markets and Chemical Instrustries. To learn more about programming, you could refer to the Programming page I maintain.

http://www.onesmartclick.com/programming/programming.html

Also Engineering page

http://www.onesmartclick.com/engineering/engineering.html

prashant_n_mhatre@yahoo.com


Article Source:

thePhantomWriters Article Submission Service

Related Articles
- A guide to Windows Home Server
For a little box that just sits there, Windows Home Server covers some very important bases. But it doesn’t try to cover all the bases. That’s part of the genius of Windows Home Server: Its designers didn’t try to solve every problem, didn’t cater to every wish list, didn’t let the ugly Windows Server 2003 genie — the guy inside WHS with Robin Williams’ voice and Hannibal Lecter’s soul — out of the bottle.
- 3G Wireless Capacities
- Acer-Gateway Deal
- A guide to the Zune portable media player
- A Sentinel to Screen Phone Calls
- About Fans
- Digital Photography Equipment
- About VoIP
- Accessing the Apple TV Settings
- A Tiny Silicon Clock
Regional Articles
- Learning A New Programming Language Alabama
- Learning A New Programming Language Alaska
- Learning A New Programming Language Arizona
- Learning A New Programming Language Arkansas
- Learning A New Programming Language California
- Learning A New Programming Language Colorado
- Learning A New Programming Language Connecticut
- Learning A New Programming Language DC
- Learning A New Programming Language Delaware
- Learning A New Programming Language Florida
- Learning A New Programming Language Georgia
- Learning A New Programming Language Hawaii
- Learning A New Programming Language Idaho
- Learning A New Programming Language Illinois
- Learning A New Programming Language Indiana
- Learning A New Programming Language Iowa
- Learning A New Programming Language Kansas
- Learning A New Programming Language Kentucky
- Learning A New Programming Language Louisiana
- Learning A New Programming Language Maine
- Learning A New Programming Language Maryland
- Learning A New Programming Language Massachusetts
- Learning A New Programming Language Michigan
- Learning A New Programming Language Minnesota
- Learning A New Programming Language Mississippi
- Learning A New Programming Language Missouri
- Learning A New Programming Language Montana
- Learning A New Programming Language Nebraska
- Learning A New Programming Language Nevada
- Learning A New Programming Language New Hampshire
- Learning A New Programming Language New Jersey
- Learning A New Programming Language New Mexico
- Learning A New Programming Language New York
- Learning A New Programming Language North Carolina
- Learning A New Programming Language North Dakota
- Learning A New Programming Language Ohio
- Learning A New Programming Language Oklahoma
- Learning A New Programming Language Oregon
- Learning A New Programming Language Pennsylvania
- Learning A New Programming Language Rhode Island
- Learning A New Programming Language South Carolina
- Learning A New Programming Language South Dakota
- Learning A New Programming Language Tennessee
- Learning A New Programming Language Texas
- Learning A New Programming Language Utah
- Learning A New Programming Language Vermont
- Learning A New Programming Language Virginia
- Learning A New Programming Language Washington
- Learning A New Programming Language West Virginia
- Learning A New Programming Language Wisconsin
- Learning A New Programming Language Wyoming
Related Articles
- A guide to Windows Home Server
For a little box that just sits there, Windows Home Server covers some very important bases. But it doesn’t try to cover all the bases. That’s part of the genius of Windows Home Server: Its designers didn’t try to solve every problem, didn’t cater to every wish list, didn’t let the ugly Windows Server 2003 genie — the guy inside WHS with Robin Williams’ voice and Hannibal Lecter’s soul — out of the bottle.
- 3G Wireless Capacities
- Acer-Gateway Deal
- A guide to the Zune portable media player
- A Sentinel to Screen Phone Calls
- About Fans
- Digital Photography Equipment
- About VoIP
- Accessing the Apple TV Settings
- A Tiny Silicon Clock

Rss   Delicious   Digg   Add To My Yahoo   Add To My Google   Bookmark   Search Plugin

Topics:
Advertising Family Home Services Real Estate Resources
Business Services Fashion Industrial Goods & Services Retail & Consumer Services
Career Financial Services Insurance Software
Cars Food & Beverage Internet Technology
Computer Hardware Franchise Legal Telecommunications
Construction Health Miscellaneous Trade Shows
Education Holidays Nightlife Travel
Entertainment Home Appliances Online Database Weddings
Environmental Home Electronics Pets World History