1. O livro "Head First - Javascript programming"
"Head First - Javascript programming" (2014)
Vamos utilizar o seguinte livro incluindo os diferentes materiais de apoio que o acompanham (ver mais abaixo):
"Head First - Javascript programming" (2014)
Índice do livro (só capítulos 1, 2 e 3)
Acesso direto à folha de cálculo: docs.google.com/spreadsheets/d/1sFaRCA2VhPv5ScoN9OXn42qUhVqltt83FP0CtcXIVF4/edit
Capitulo 1: Getting your feet wet (A quick dip into javascript)
1. The way JavaScript works 2
2. How you’re going to write JavaScript 3
3. How to get JavaScript into your page 4
4. JavaScript, you’ve come a long way baby... 6
5. How to make a statement 10
6. Variables and values 11
7. Back away from that keyboard! 12
8. Express yourself 15
9. Doing things more than once 17
10. How the while loop works 18
11. Making decisions with JavaScript 22
12. And, when you need to make LOTS of decisions 23
13. Reach out and communicate with your user 25
14. A closer look at console.log 27
15. Opening the console 28
16. Coding a Serious JavaScript Application 29
17. How do I add code to my page? (let me count the ways) 32
18. We’re going to have to separate you two 33
19. Bullet points 37
Capitulo 2: Going further (Writing real code)
1. Let’s build a Battleship game 44
2. Our first attempt... 44
3. First, a high-level design 45
4. Working through the Pseudocode 47
5. Oh, before we go any further, don’t forget the HTML! 49
6. Writing the Simple Battleship code 50
7. Now let’s write the game logic 51
8. Step One: setting up the loop, getting some input 52
9. How prompt works 53
10. Checking the user’s guess 54
11. So, do we have a hit? 56
12. Adding the hit detection code 57
13. Provide some post-game analysis 58
14. And that completes the logic! 60
15. Doing a little Quality Assurance 61
16. Can we talk about your verbosity... 65
17. Finishing the Simple Battleship game 66
18. How to assign random locations 67
19. The world-famous recipe for generating a random number 67
20. Back to do a little more QA 69
21. Congrats on your first true JavaScript program, and a short word about reusing code 71
Capitulo 3: Getting functional (Introducing functions)
- Introducing functions - Getting functional 79
- What’s wrong with the code anyway? 81
- By the way, did we happen to mention FUNCTIONS? 83
- Okay, but how does it actually work? 84
- What can you pass to a function? 89
- JavaScript is pass-by-value. 92
- Weird Functions 94
- Functions can return things too 95
- Tracing through a function with a return statement 96
- Global and local variables 99
- Knowing the scope of your local and global variables 101
- The short lives of variables 102
- Don’t forget to declare your locals! 103
Acesso direto ao PDF:
- Com somente os capítulos 1, 2 e 3 (124 páginas): drive.google.com/file/d/1eHGdRq6fxnTPsqVLcwMkWMyVyyUCYCvD
- Completo (661 páginas, 88 MB): drive.google.com/file/d/0ByTU7YT4rWzCeHA5b3htWmtzSUk
O jogo da Batalha Naval
Na seguinte página vamos desenvolver o fluxograma e o pseudo-código do jogo da Batalha Naval, retirado do capitulo 2, secção 6, "Writing the Simple Battleship code" (pág. 50): sites.aebenfica.org/apontamentos-tic/programacao/javascriptbatalhanaval
Pasta DRIVE com o livro e os materiais de apoio que o acompanham:
Livro: "Head First - Javascript programming" (2014) (acesso reservado ao utilizadores do domínio)
URL direto da pasta DRIVE:
Materiais de apoio fornecidos pela editora do livro
- Site oficial do livro em www.wickedlysmart.com/hfjs/
Todo o código apresentado ao longo do livro encontra-se disponível no GitHub
Cada capitulo tem um pequeno video de apoio
- Ver www.wickedlysmart.com/head-first-javascript-programming-chapter-videos/
- Videos de apoio ao livro no Vimeo, em: vimeo.com/wickedlysmart