This is a feature of IDEs referred to as code folding. The minus that had been inside the box will change to a plus, indicating that clicking it again will re-expand that code unit. Click on the box next to the head start tag to collapse the code associated with the head element.įigure 4.3 Collapsing the head section of an HTML doc in Notepad++.These boxes appear at the beginning of blocks of code that can be logically treated as a unit. Next, note the boxes just to the left of a few lines in your code. Keep in mind that if you create a new page from scratch, you will not see this highlighting done until you save it with a. HTML elements are shown in blue, attributes in red, and attribute values in purple. The first thing you should notice is the formatting applied to your code. An easy way to do this is to browse to it through your file system, right-click on it, and select Edit with Notepad++. Open your hello_map app’s index.html page in Notepad++.Let's walk through a short set of steps to familiarize you with Notepad++. Notepad++ is arguably not a true IDE since it's not possible to view your pages directly within the same application, but it does allow you to easily launch them in various web browsers, so I think that's a rather pointless debate. My main reasons for pointing you to it are that it is free, it's easy to use, and it provides line numbers and syntax highlighting. As its name implies, it's a step (or two) up from Notepad. For the purpose of continuing on through this course, I'm going to recommend Notepad++. There are lots of IDEs suited for web development, as a web search for "web development ide" will show you. CodePen can be thought of as an online web programming IDE (as opposed to one installed on your own computer). Examples of popular IDEs include Microsoft Visual Studio and Eclipse. IDEs also frequently provide auto-completion (i.e., a list of valid properties and methods available through an object) and syntax highlighting (i.e., different language elements shown in different colors/styles). Integrated Development Environments (IDEs) are software applications that allow developers to write, test, and debug source code all in one application. Plain text editors like Notepad are OK for beginners getting to know web-publishing languages, but there are more advanced tools out there that make the developer's job easier. With a fresh look at your code, it may take just minutes to find a bug that you had banged your head against the wall about for hours the night before. As with writing in general, the best way to get past a block is often to take a break and come back to the code later.One error can cause several others to appear downstream fixing it can cause the rest to disappear. When the JavaScript console reports multiple errors, fix just the first error, then reload the page.If you wait to do that until after you've finished entering the intervening statements, you're apt to forget. When inserting an opening brace, bracket or parenthesis, insert the matching closing character at the same time.The more untested code you write, the harder it will be to identify errors. Avoid writing long blocks of code without testing. Start with something very simple (or a working sample that you modify slightly), test it, add a small piece, test again, etc. But first, here are a few tips that apply regardless of the kind of programming you're doing: We’ll talk about development environments (where you write your code) and debugging tools. We'll end this lesson with some content that will hopefully make you a bit more successful as a coder.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |