-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsyntax.html
More file actions
executable file
·202 lines (202 loc) · 5.66 KB
/
syntax.html
File metadata and controls
executable file
·202 lines (202 loc) · 5.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<!DOCTYPE html>
<html lang="en">
<head>
<title>SyntaxSimplify: Syntax @syntaxsimplify, Code, Coding, Development</title>
<meta charset="utf-8">
<link rel="stylesheet" href="css/syntax.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div id="wrapper">
<header>
<h1 class="visually-hidden">Syntax Simplify</h1>
</header>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="intro.html">Intro</a></li>
<li><a href="syntax.html">Syntax</a></li>
<li><a href="newsletter.html">News</a></li>
</ul>
</nav>
<main>
<div>
<img src="images/question_mk4.png" alt="Question Mark"
class="floatright" width="296" height="343">
<h2>What langauge should I learn first? </h2>
<p>
What’s best? Python? Java? C++?
</p>
<h2>Answer: None of these.</h2>
<p>Python might have the least amount of typing. Java is used in enterprise
systems across the globe. C++ is the performance king.
</p>
<p>But none these are the best language to learn first.
<span class="bold">They are all tools to be used when they fit the job.</span>
</p>
<p>The best first language to learn is thinking like an experienced Developer.
<span class="bold">Think in terms of the process that needs to happen.</span>
</p>
<p>If you use Pseudo Code to write out the process needed then the
<span class="italic_bold">syntax for programming languages will become
interchangeable</span> to you.
</p>
<p>The sooner you start thinking in process terms the faster you will grow at
finding solutions.
</p>
<hr style="height:2px; width: 85%;
border-width:0;color:#b2b2ad;background-color:#b2b2ad">
<h2>The Syntax Breakdown </h2>
<p>Let's look at examples of a Repetition Structure. Probably one of the most
powerful basic structures in computer programming.</p>
<h3>Display "Hello Internet" 3 times</h3>
<table>
<caption>As Pseudo Code</caption>
<tr>
<th>Process</th>
<th>Code</th>
</tr>
<tr>
<td>Initialize your starting point</td>
<td>Declare Integer counter = 1</td>
</tr>
<tr>
<td>Start Loop & Compare counter to your end point</td>
<td>While counter <= 3</td>
</tr>
<tr>
<td>Display output</td>
<td>Display "Hello Internet"</td>
</tr>
<tr>
<td>Update your counter after each iteration</td>
<td>Set counter = counter + 1</td>
</tr>
<tr>
<td>Close your Loop</td>
<td>End While</td>
</tr>
</table>
<table>
<caption>As Python</caption>
<tr>
<th>Process</th>
<th>Code</th>
</tr>
<tr>
<td>Initialize your starting point</td>
<td>count = 0</td>
</tr>
<tr>
<td>Start Loop & Compare counter to your end point</td>
<td>while count < 3:</td>
</tr>
<tr>
<td>Display output</td>
<td>print('Hello Internet')</td>
</tr>
<tr>
<td>Update your counter after each iteration</td>
<td>count = count + 1</td>
</tr>
<tr>
<td>Close your Loop</td>
<td><span class="italic">Empty - Not used in Python</span></td>
</tr>
</table>
<table>
<caption>As Java</caption>
<tr>
<th>Process</th>
<th>Code</th>
</tr>
<tr>
<td>Initialize your starting point</td>
<td>int count = 0;</td>
</tr>
<tr>
<td>Start Loop & Compare counter to your end point</td>
<td>while(count < 3){</td>
</tr>
<tr>
<td>Display output</td>
<td>System.out.println("Hello Internet");</td>
</tr>
<tr>
<td>Update your counter after each iteration</td>
<td>count++;</td>
</tr>
<tr>
<td>Close your Loop</td>
<td>}</td>
</tr>
</table>
<table>
<caption>As C++</caption>
<tr>
<th>Process</th>
<th>Code</th>
</tr>
<tr>
<td>Initialize your starting point</td>
<td>int count = 0;</td>
</tr>
<tr>
<td>Start Loop & Compare counter to your end point</td>
<td>while(count < 3){</td>
</tr>
<tr>
<td>Display output</td>
<td>cout << "Hello Internet" << endl;</td>
</tr>
<tr>
<td>Update your counter after each iteration</td>
<td>count++;</td>
</tr>
<tr>
<td>Close your Loop</td>
<td>}</td>
</tr>
</table>
<h2>
What can we learn from studying these examples?
</h2>
<p>
<span class="bold">The Syntax</span> that is so confusing when we first start
learning code <span class="bold">isn’t the most important part.</span> All of
these examples share the same structure of process.
</p>
<p>The differences in syntax between <span class="italic">print</span> or
<span class="italic">System.out.println</span> or
<span class="italic">cout</span> doesn't matter as much as you knowing that
you're going to write output to the console each iteration of the loop.
</p>
<p>Look beyond that to the second to last line at
<span class="italic">count++;</span> and <span class="italic">count =
count +1</span>. The important part is knowing that you need to update your
Loop Control Variable or you'll have an endless loop.</p>
<p>
If we focus on the process and logic of an algorithm, we can always find the
correct syntax for the language we’re working in.
<span class="bold_underline">It’s more important that we understand our
starting point, the desired output, and the processes needed between
them.</span>
</p>
<br>
</div>
</main>
<footer>
<nav class="visually-hidden">
<a href="index.html">Home</a>
<a href="intro.html">Intro</a>
<a href="syntax.html">Syntax</a>
<a href="newsletter.html">News</a>
</nav>
For more information contact:
<a href="mailto:robertkellythompson@gmail.com">
robertkellythompson@gmail.com</a><br>
Copyright © 2020 SyntaxSimplify, LLC<br>
</footer>
</div>
</body>
</html>