Main Content
Remember to ask the question before you listen for the answer Archive - Originally posted on "The Horse's Mouth" - 2016-01-26 21:38:21 - Graham Ellis
I love some of the basics ... like reminding people writing programs that they need to prompt the user to make an input at the keyboard before they read that input - otherwise they'll get people complaining that the program just hangs. In C, from today's course.
/* Tell the user that you want input before reading from keyboard! */
printf("How many carriages on the train today? ");
/* Read a value into length */
scanf("%d",&length);
Complete example - [here] . C and C++ courses - [here] .
Some other articles
Q101 - Programming Principles What are callbacks? Why use them? An example in Python This article Hungarian, Camel, Snake and Kebab - variable naming conventions Learning to program - what are algorithms and design patterns? Writing the perfect program in Tcl? Rooms available tonight - how to code an algorithm from first principles We not only teach PHP and Python - we teach good PHP and Python Practice! Test Driven Development in Python - Customer Comes First Seamless, integrated IT - we have a long way to go! Web and console - same principle, same code - Ruby example Lesson 1 in programing - write clean, reuseable and maintainable tidy code Storing your intermediate data - what format should you you choose? From Structured to Object Oriented Programming. Object oriented or structured - a comparison in Python. Also writing clean regular expressions Some terms used in programming (Biased towards Python) Dark mornings, dog update, and Python and Lua courses before Christmas What order are operations performed in, in a Perl expression? Stepping stones - early coding, and writing re-usable code quickly Coding efficiency - do not repeat yourself! An introduction to file handling in programs - buffering, standard in and out, and file handles Looking up a value by key - associative arrays / Hashes / Dictionaries Program for reliability and efficiency - do not duplicate, but rather share and re-use Easy - but for whom? Improving your function calls (APIs) - General and PHP And and Or illustrated by locks Do not copy and paste code - there are much better ways The music of the stock market Variable names like i and j - why? Planning! Learning to write high quality code in Lua Where do I start when writing a program? Pre and post increment - the ++ operator I have not programmed before, and need to learn C202 - A first practical program This article Learning to program sample program - past its prime, but still useful Defining, declaring and initialising variables in C C - a first program that does something useful for you New year, new C Course C course inspires new teaching examples Turning C from source to a running program