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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
|
---
title: Навчання та отримання допомоги
slug: Learn/Learning_and_getting_help
translation_of: Learn/Learning_and_getting_help
original_slug: Learn/Навчання_та_отримання_допомоги
---
<p>{{learnsidebar}}</p>
<p>It is great that you are putting some time into learning a new set of skills, but there are good practices to employ that will make your learning more effective. There are also are times when you'll get stuck and feel frustrated — even professional web developers feel like this regularly — and it pays to know about the most effective ways to try and get help so you can progress in your work. This article provides some hints and tips in both of these areas that will help you get more out of learning web development, as well as further reading so you can find out more information about each sub-topic should you wish..</p>
<h2 id="Effective_learning">Effective learning</h2>
<p>Let's move straight on and think about effective learning.</p>
<h3 id="Different_learning_methods">Different learning methods</h3>
<p>It is interesting to consider that there are two main ways in which your brain learns things — <strong>focused</strong> and <strong>diffuse</strong> learning:</p>
<ul>
<li>Focused learning is what you might more traditionally associate with academic subjects. You concentrate deeply on a low-level topic and solving the specific problems that it brings. You are focused on a narrow area.</li>
<li>Diffuse learning is more to do with high-level thinking around a wider area. You let your mind wander more widely, and seemingly make random connections between different things. This is more the kind of thinking you do while you are in the shower, or during a coffee break.</li>
</ul>
<p>From the studies that neuroscientists have done on brain activity, we have found out that you can't really engage in both ways of learning — or thinking — at once. So which one should you choose? You might think that focused learning is better for studying, but in reality, <strong>both</strong> are very important.</p>
<p>Focused thinking is great for concentrating hard on specific subjects, getting into deep problem solving, and improving your mastery of the techniques required — strengthening the neural pathways in your brain where that information is stored. It isn't however very good at getting an understanding of "the big picture", and unlocking new neural pathways when you are trying to understand new subjects or solve new problems that you haven't come across before. </p>
<p>For that, you need diffuse thinking. This is the opposite of focus — you let your brain wander around the wider landscape, searching around for connections you didn't have before, touching on new things (or new combinations of things) that you can then focus on later, to strengthen them and start to really understand what they mean.</p>
<p>This is why it is usually good to read some introductory material first to get a high-level understanding of an area before you leap into the specific details.</p>
<p>It is also why you can sometimes get really stuck on a problem, but then figure out the answer when you go for a coffee break (or a walk). You might:</p>
<ol>
<li>Know how to fix problem A with tool A.</li>
<li>Know how to fix problem B with tool B.</li>
<li>Not know how to fix problem C.</li>
</ol>
<p>Let's say you focus on problem C for a while and get frustrated because you can't think how to solve it. But then after going on a walk to get some fresh air, you may well find that as your mind wanders, you suddenly make a connection between tool A and tool B, and realize that you can use them together to fix problem C! It isn't always this simple, but it is also surprising how many times this does happen. This also highlights the importance of taking regular breaks when you are studying in front of the computer.</p>
<h3 id="Different_learning_materials">Different learning materials</h3>
<p>It is also worth looking at the different types of learning materials that are available, to see which ones are most effective for you to learn with.</p>
<h4 id="Textual_articles">Textual articles</h4>
<p>You'll find a lot of written articles on the web to teach you about web design. Like most of this course, for example. Some of the articles will be tutorials, to teach you a certain technique or important concept (such as "learn how to create a video player" or "Learn the CSS box model"), and some of the articles will be reference material, to allow you to look up details you may have forgotten (such as "what is the syntax of the CSS <code>background</code> property"?)</p>
<p>MDN Web Docs is very good for both types — the area you are currently in is great for learning techniques and concepts, and we also have several giant reference sections allowing you to look up any syntax you can't remember.</p>
<p>There are also several other great resources on the web, some of which we'll mention below.</p>
<div class="blockIndicator note">
<p><strong>Note</strong>: The above text should have given you an important fact — you aren't expected to remember everything! Professional web developers use tools like MDN Web Docs to look up things they have forgotten all the time. As you'll discover, learning web development is more about problem-solving and learning patterns than it is about learning lots of syntaxes.</p>
</div>
<h4 id="Videos">Videos</h4>
<p>There are also a number of sites that have video learning content on them. YouTube is an obvious one, with channels such as <a href="https://www.youtube.com/channel/UC7TizprGknbDalbHplROtag">Mozilla Layout Land</a>, <a href="https://www.youtube.com/MozillaDeveloper">MozillaDeveloper</a>, and <a href="https://www.youtube.com/user/ChromeDevelopers/">Google ChromeDevelopers</a> providing many useful videos. Many people prefer textual articles for more in-depth learning and reference material, and videos for quick explanations of concepts and new features, but it is really up to you what you prefer to learn from. There is no right and wrong answer here.</p>
<h4 id="Interactive_code_playgrounds">Interactive code playgrounds</h4>
<p>You might be the kind of person that prefers minimal instructions and would prefer to jump straight in and start playing with code. This is also a reasonable approach, and some learning sites tend to favor it. <a href="https://www.codecademy.com/">Codecademy</a> for example is a learning site where the tutorials mainly consist of interactive code editors where you have to directly write code and see if the desired result was achieved.</p>
<p>Many MDN Web docs reference pages provide interactive examples too, where you can alter the code and see how the live result changes. And there is also nothing wrong with creating your own code examples on your computer, or in an online code editor like <a href="https://jsbin.com/?html,css,js,output">JSBin</a>, <a href="https://codepen.io/">Codepen</a>, or <a href="https://glitch.com/">Glitch</a>. In fact, you'll be called to do so as part of this course when you are learning!</p>
<div class="blockIndicator note">
<p><strong>Note</strong>: Online code editors are also really useful for sharing code you've written, for example, if you are collaborating on learning with someone else who isn't in the same location, or are sending it someone to ask for help with it. You can share the web address of the example with them so they can see it.</p>
</div>
<div class="blockIndicator note">
<p><strong>Note</strong>: You might favor one learning method over the others, but realistically a hybrid approach is probably what you will end up with. And you'll probably come up with other methods than the three we covered above.</p>
</div>
<h3 id="Making_a_plan">Making a plan</h3>
<p>It is a good idea to create a plan to help you achieve what you want to achieve through your learning.</p>
<h4 id="A_goal_statement">A goal statement</h4>
<p>It sounds silly, but why not start with a single sentence that says what you want to achieve? The following have different scopes, but are all realistic and achievable:</p>
<ul>
<li>I want to become a professional web developer in two years' time.</li>
<li>I want to learn enough to build a website for my local amateur tennis club.</li>
<li>I want to learn HTML and CSS so I can expand my job role to take over updating the content on our company website.</li>
</ul>
<p>The following are not quite as reasonable:</p>
<ul>
<li>I want to go from a complete beginner to becoming a senior web developer in three months.</li>
<li>I want to start my own company and build a social network that will out-perform Facebook, in two years.</li>
</ul>
<h4 id="What_do_you_need_to_get_there">What do you need to get there?</h4>
<p>Once you've worked out your goal, it is a good idea to research what you'll need to achieve the goal. For example:</p>
<p>Materials I need:</p>
<ul>
<li>A computer</li>
<li>Internet access</li>
<li>Pens and paper</li>
</ul>
<p>Knowledge I need:</p>
<ul>
<li>How to use HTML, CSS, JavaScript, and associated tools and best practices to build web sites and web applications (we can definitely help you with this one!).</li>
<li>How to get a domain, hosting, and use them to put a web site or application online.</li>
<li>How to run a small business.</li>
<li>How to advertise my business and attract clients.</li>
</ul>
<h4 id="How_much_time_and_money_will_it_take">How much time and money will it take?</h4>
<p>Estimate the time and cost of getting these things. If you'll need to work to earn money to buy the materials required, then the time to do that will have to be factored in. Once you have a time estimate, you can start to build a plan around your life.</p>
<h4 id="How_many_hours_per_week_do_I_need_to_do">How many hours per week do I need to do?</h4>
<p>Once you know what you need to do, and how long you think it'll take you, you can start writing out a plan to follow, to achieve your goal. It can be as simple as:</p>
<p>"It'll take me 500 hours to learn what I need to know, and I have a year to do it, so if I assume 2 weeks' holiday I'll need to do work on this for 10 hours per week. I am free on evenings and weekends, so I'll plan my time around those."</p>
<p>How much time you can spend on this of course depends on what your circumstances are. If you are at school, then you've got way more free time than if you have a job and children to provide for. It is still possible to achieve your goals, but you have to be realistic about how quickly you can do it.</p>
<p>If you are doing a university or college course to learn web development, then most of this planning is done for you — lucky you!</p>
<p>When you have worked out a weekly schedule, then you should keep a record of what you manage to do each week in a simple spreadsheet or even in a notebook!</p>
<p>Also, it might be a good idea to have some sub-goals worked out to allow you to keep track of where you are more easily, for example:</p>
<ul>
<li>HTML and CSS basics learnt by summer</li>
<li>JavaScript basics learnt by December</li>
<li>Example website project built by next April</li>
<li>etc.</li>
</ul>
<p>Keep thinking about how much progress you are making, and adjust your plan if needs be.</p>
<h3 id="Staying_motivated">Staying motivated</h3>
<p>It is hard to stay motivated, especially if you are trying to learn a complex skill like programming or web development. What follows are some tips to stay motivated and keep working:</p>
<ul>
<li><strong>Try to make your work environment as productive as possible</strong>. Try to get a comfortable desk and chair to work in, make sure you have enough light to see what you are doing, and try to include things that help you concentrate (e.g. mellow music, fragrances, whatever else you need). Don't try to work in a room with distractions — for example a television on, with your friends watching football! Also, leave your mobile phone out of the room — most people we have are distracted by their phone a lot, so you should leave it somewhere else.</li>
<li><strong>Take regular breaks</strong>. It is not good for your motivation to keep working away for hours with no break, especially if you are finding it hard or getting stuck on a problem. That just leads to frustration — it is often better to take a break, move around for a bit, then relax with a drink before getting back to work, and as we said earlier, the diffuse learning you do in that time can often help you to figure out a solution to the problem you were facing. It is also physically bad to work for too long without a break — looking at a monitor for too long can hurt your eyes, and sitting still for too long can be bad for your back or legs. We'd recommend taking a 15 minutes break every hour to 90 minutes.</li>
<li><strong>Eat, exercise, and sleep</strong>. Eat healthily, get regular exercise, and make sure you get enough sleep. This sounds obvious, but it is easy to forget when you get really into coding. Factor these essential ingredients into your schedule, and make sure you are not doing your learning time instead of these things.</li>
<li><strong>Give yourself rewards</strong>. It's true that <em>all work and no play makes Jack a dull boy</em>. You should try to schedule fun things to do after each learning session, which you'll only have when the learning is over and complete. If you are really into gaming, for example, there is something quite motivating about saying "no gaming tonight unless I get through my 5 hours of learning". Now all you need is willpower. Good luck!</li>
<li><strong>Co-learning and demoing</strong>. This won't be an option for everyone, but if at all possible try to learn alongside others. Again, this is easier if you are doing a college course on web development, but perhaps you could convince a friend to learn along with you, or find a local meetup or skill-sharing group? It is really useful and motivating to have someone to discuss ideas with and ask for help, and you should also take time to demo your work. Those shouts of appreciation will spur you on.</li>
</ul>
<h3 id="Effective_problem_solving">Effective problem solving</h3>
<p>There is no one effective way to solve all problems (and learn all things) associated with web design and development, but there are some general bits of advice that will serve you well in most cases.</p>
<h4 id="Break_things_down_into_chunks">Break things down into chunks</h4>
<p>For a start, when you are trying to implement something specific and it seems really hard to get your head around, you should try to break it down into multiple smaller problems, or chunks.</p>
<p>For example, if you are looking at a task of "Build a simple two-column website", you could break it down as follows:</p>
<ul>
<li>Create the HTML structure</li>
<li>Work out basic site typography</li>
<li>Work out a basic color scheme</li>
<li>Implement a high-level layout — header, horizontal navigation menu, main content area with main and side columns, and footer.</li>
<li>Implement a horizontal navigation menu</li>
<li>etc.</li>
</ul>
<p>Then you could break it down further, for example, "Implement horizontal navigation menu" could be written out as:</p>
<ul>
<li>Make a list of menu items sit horizontally in a line.</li>
<li>Remove unneeded defaults, like list spacing and bullet points.</li>
<li>Style hover/focus/active states of menu items appropriately.</li>
<li>Make the menu items equally spaced along the line.</li>
<li>Give the menu items enough vertical spacing.</li>
<li>Make sure the text is centered inside each menu item</li>
<li>etc.</li>
</ul>
<p>Each of these problems doesn't seem nearly as difficult to solve as the one big problem you had initially. Now you've just got to go through and solve them all!</p>
<h4 id="Learn_and_recognise_the_patterns">Learn and recognise the patterns</h4>
<p>As we said before, web design/programming is mostly about problem solving and patterns. Once you have written out what you'll need to do to solve a specific problem, you can start to figure out what technology features to use to solve it. For example, professional web developers have created lots of horizontal navigation menus, so they'll immediately start thinking of a solution like this:</p>
<p>A nav menu is usually created from a list of links, something like:</p>
<pre class="brush: html notranslate"><ul>
<li>First menu item</li>
<li>Second menu item</li>
<li>Third menu item</li>
<li>etc.</li>
</ul>
</pre>
<p>To make all the items sit horizontally on a line, the easiest modern way is to use flexbox:</p>
<pre class="brush: css notranslate">ul {
display: flex;
}</pre>
<p>To remove unneeded spacing and bullet points, we can do this:</p>
<pre class="brush: css notranslate">ul {
list-style-type: none;
padding: 0;
}</pre>
<p>etc.</p>
<p>If you are a complete beginner to web development, you'll have to do some study and web searches and lookup solutions to such problems. If you are a professional web developer you'll probably remember the last time you solved a similar problem, and only have to look up a few bits of the syntax that you forgot since then.</p>
<p>When you find solutions to such problems, it is worth writing down notes on what you did, and keeping some minimal code examples in a directory somewhere so you can look back on previous work.</p>
<p>In addition, the web has <a href="/en-US/docs/Learn/Common_questions/What_are_browser_developer_tools">developer tools</a> that allow you to look at the code used to build any site on the web — if you don't have a solution to hand, one good research method is to find websites with similar features in the wild, and find out how they did it.</p>
<div class="blockIndicator note">
<p><strong>Note</strong>: Notice how above we talked about the problem we are trying to solve first, and the technology used to solve it second. This is pretty much always the best way round to do it — don't start with a cool new technology that you want to use, and try to shoehorn it into the use case.</p>
</div>
<div class="blockIndicator note">
<p><strong>Note</strong>: The simplest solution is often the best.</p>
</div>
<h3 id="Getting_practice">Getting practice</h3>
<p>The more you practice solving a problem, the stronger your brain's neural pathways are in that area, and the easier it becomes to recall the details and the logic of that particular problem.</p>
<p>Keep tinkering with code, and getting more practice. If you run out of problems to solve, look up some tests online, do some more courses, or ask your friends and family (or local school or church) if there is anything they'd like you to build for them.</p>
<h2 dir="ltr" id="Getting_help">Getting help</h2>
<p dir="ltr">Web development requires you to learn a complex set of skills — you are bound to get stuck sometimes and need help. As we said before, even professional developers need regular help working out issues.</p>
<p dir="ltr">There are a variety of ways to get help, and what follows are some tips for doing so more effectively.</p>
<h3 dir="ltr" id="Effective_web_searches">Effective web searches</h3>
<p dir="ltr">One important skill to learn is the art of effective web searches — what search terms do you need to use in your favorite search engine to find the articles you need? </p>
<p dir="ltr">It is often fairly obvious what to search for. For example:</p>
<ul dir="ltr">
<li>If you want to find out more about responsive web design, you could search for "responsive web design".</li>
<li>If you want to find out more about a specific technology feature, such as the HTML <code><video></code> element, or the CSS <code>background-color</code> or <code>opacity</code> properties, or the JavaScript <code>Date.setTime()</code> method, you should just search for the feature's name.</li>
<li>If you are looking for some more specific information, you can add other keywords as modifiers, for example "<video> element autoplay attribute", or "Date.setTime parameters".</li>
</ul>
<p dir="ltr">If you want to search for something that has less obvious buzzwords, you need to think about what is most likely to return what you want.</p>
<ul dir="ltr">
<li>Run code after several promises are fulfilled</li>
<li>Play a video stream from a webcam in the browser</li>
<li>Create a linear gradient in the background of your element</li>
</ul>
<h4 id="Error_messages">Error messages</h4>
<p>If you are having a problem with some code and a specific error message is coming up, it is often a good idea to just copy the error message into your search engine and use it as the search term. If other people have had the same problem, there'll likely be some articles or blog posts about it in places like MDN or Stack Overflow.</p>
<div class="blockIndicator note">
<p><strong>Note</strong>: <a href="https://stackoverflow.com/">Stack Overflow</a> is a really useful website — it is basically a huge database of curated questions and answers on various technologies and related techniques. You'll probably find an answer that answers your question. If not, you can ask a question and see if anyone can help you.</p>
</div>
<h4 id="Browser_testing">Browser testing</h4>
<p dir="ltr">It is often a good idea to see if your problem is affecting all browsers, or whether it only occurs in one or a small number of browsers. If it is only affecting one browser, for example, you can use that browser to narrow down the search. Example searches might look like:</p>
<ul dir="ltr">
<li><video> playback doesn't work in the iOS browser.</li>
<li>Firefox doesn't seem to support the Beetlejuice API.</li>
</ul>
<h3 dir="ltr" id="Using_MDN">Using MDN</h3>
<p dir="ltr">The site you are already on has a wealth of information available to you — both reference material for looking up code syntax, and guides/tutorials for learning techniques.</p>
<p dir="ltr">We've provided most of the answers to the questions you'll have about web development fundamentals in this part of MDN. If you are stuck, then it is good to re-read the associated articles to see if you missed anything.</p>
<p dir="ltr">If you are not sure which article to read, then try searching MDN for some related keywords (as indicated above), or try a general web search. To search on MDN, you can either use the site's in-built search functionality or better still, use your favorite search engine and put "mdn" in front of the search term, for example, "mdn responsive web design" or "mdn background-color".</p>
<h3 dir="ltr" id="Other_online_resources">Other online resources</h3>
<p>We already mentioned Stack Overflow, but there are other online resources that can help.</p>
<p>It is good to find a community to be part of, and you'll get a lot of respect if you try to help others answer their questions as well as asking your own. Other good examples include:</p>
<ul dir="ltr">
<li><a href="https://discourse.mozilla.org/c/mdn">MDN Discourse</a></li>
<li><a href="https://www.sitepoint.com/community/">Sitepoint Forums</a></li>
<li><a href="https://www.webdeveloper.com/">webdeveloper.com Forums</a></li>
</ul>
<p dir="ltr">However, it also makes sense to find useful groups on social networking sites such as Twitter or Facebook. Look for groups that discuss web development subjects you are interested in, and join up. Follow people on twitter you know are influential, smart, or just plain seem to share lots of useful tips.</p>
<h3 dir="ltr" id="Physical_meetups">Physical meetups</h3>
<p dir="ltr">Lastly, you should try attending some physical meetups to meet other like-minded people, especially ones that cater to beginners. <a href="https://www.meetup.com/find/tech/">meetup.com</a> is a good place to find local physical meetups, and you could also try your local press/what's on sites.</p>
<p dir="ltr">You could also try attending full-fledged web conferences. While these can be expensive, you could try volunteering at them, and many conferences offer reduced rate tickets, for example, student or diversity tickets.</p>
<h2 dir="ltr" id="See_also">See also</h2>
<ul dir="ltr">
<li><a href="https://www.coursera.org/learn/learning-how-to-learn">Coursera: Learning to learn</a></li>
<li><a href="https://www.freecodecamp.org/">Freecodecamp</a></li>
<li><a href="https://www.codecademy.com/">Codecademy</a></li>
</ul>
|