Learning something about computer programming like reading a story... Part I
How many times do you wish you knew a thing or two about computer programming?
Understanding some key programming concepts without becoming a programmer yourself.
- as an IT recruiter, it would make your job easier
- as an executive or project manager, it would make your decision-making more informed
- for everyone else, some side benefits such as impressing your clients/customers, making yourself stand out in a party...
- more...
But reading computer books or taking computer courses?
Give me a break, you are an executive or a professional, you have zero desire to become a programmer and yet you want to learn something about it quickly and painlessly!
Watching youtube video about it?
Ahe, still a bit too formal and too lengthy and boring...
So, let's try the following.
I'll extract gems, the very essence about computer programming from my nineteen years experience in software programming and put them into a short text below, for clarity and logic I'll divide them into two parts. And since it's purely educational, I'll use generic code and to avoid jargon to make things easier.
Now, let the fun begin.
Part I
Basics of a software program
Variable, if-then-else statement and iteration are the three most essential things for a computer program ("things" here really means constructs but that's jargon and sounds too formal... some seasoned programmer considers function as an essential element in programming, it could very well be true...). Input, process and output are the meat and potato of a software program.
Now, let's use an example to explain each of them.
Say, you're always on the outlook for potential money-making opportunities.
First, let's use a picture to clearly show you what a tiny software program would look like at a higher level.
Now, let's explain all the details below.
variable
Loosely we can consider variables as "things" or elements that would have an impact on the software program.
set var opp = "promising";
The above line defines and sets a variable named "opp" to the value of "promising", which would help us to manage information about an opportunity.
set var action = "";
The above line defines and sets a variable named "action" to the value of nothing so that we would know what action to take when an opportunity arises.
if-then-else statement (also called selection)
It's self-explanatory.
if opp = "promising" then
{
action = "evaluate it";
}
The above block of code means that if an opportunity sounds promising let's evaluate it.
Now, let's wrap up this tiny program.
print action
The above line would display "evaluate it" (without quotes) on the computer screen.
Literally, this super tiny program has only 7 lines of code! And it's able to inform you what to do with an opportunity. Of course this is oversimplification, a real program that assesses potential opportunities would have varied criteria [a different number of variables to determine the viability of a potential opportunity], if interested we can expand on this example of opportunity / opportunities...
Let's continue...
Now, say your aunt loves apple and you want to put apples on the table when she visits.
set var treat = "";
Similarly as explained above, the above line defines and sets a variable named "treat" to the value of nothing.
iteration (loop)
loop index=i list="apple,banana,orange"
if (i = "apple")
{
treat = i;
}
end if
end loop
The above block of code means that you have a basket of fruit, if one of them is an apple, the apple would become a treat for your aunt.
input / process / output
A software program will never be a software program if it does not have input, process and output.
Let's discuss them briefly here and then revisit them again in part ii.
input
As the name suggests, we feed something into a software program.
For instance, we often see web forms, most of web form fields are input fields, which allow us to enter data into the form.
process
It's how we handle data input.
output
It's the result of the way we process data input. It could be the results displayed on the computer screen or the output could be a printout from a printer or the processed data goes into a database. For instance, the above code of "print action" would produce an output on the screen.
And from hardware point of view
Keyboard and mouse are input devices and voice is also input medium.
(In the future motion may also become input medium)
Monitor is an output device and smartphone screen is both an input and output device
The computer CPU (central processing unit) accepts what we input into the computer and then processes our request and produces result(output).
a bit fancier: data structure such as array (we'll visit it in part ii)
The Web (we're living in the web age, AI? not quite yet)
Thus, web form
The purpose of a web form is to collect data from users.
A web form could have several or many fields or elements or we can say, a web form is consisted of several or many fields.
Two types of input fields define a form:
One is input fields, that allow us/users to enter data into;
And the other is a control type of field, called submit, it allows us to submit a form once the form is filled or completed.
And let's continue with the above example of opportunity, say, you've identified an opportunity, and you have prospects as well,
So, you want to have a form to collect their contact information.
It may look like the following:
Contact (form of prospects)
<form action="procesFormProgramHere" method="post">
Name: <input type="text" name="name">
Phone: <input type="text" name="phone">
Email: <input type="text" name="email">
<input type="submit" name="sendform" value="Send">
</form>
That's it! Once your prospect enters his/her contact info you'll be able to capture them. And that's the first step of getting their business, right?
In sum, variable, if-then-else statement and loop are fundamental to programming and every software program can't live without input, process and output.
In part ii, we'll talk about how to process web form, HTML, database and SQL etc.
If you feel you're already learning with me and would like to continue to read part ii, send $10 to [email protected] via PayPal, I'll then send you the URL (link) for Part II and if you're not happy with Part II you'll receive a full refund. Thanks for reading and please share it with your network as well.
Elevating IT Recruiter Engagement
7 年It would be great if recruiters understood more about technology being used by the people they pursue, but they are too short-attention-span theater to digest things at the syntax level. This app lets recruiters carry on a conversation with developers: www.techscreen.com
Idea Man | Entrepreneur | Technologist (past)
7 年Elena Contoman Gary Kirwan Veera Reddy please share it with your network.