Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
dev:how_to_write_a_zotero_translator_2nd_edition:chapter_2 [2010/10/20 23:21] – created rmzelledev:how_to_write_a_zotero_translator_2nd_edition:chapter_2 [2017/11/12 19:53] – external edit 127.0.0.1
Line 1: Line 1:
 +<html><p id="zotero-5-update-warning" style="color: red; font-weight: bold">We’re
 +in the process of updating the documentation for
 +<a href="https://www.zotero.org/blog/zotero-5-0">Zotero 5.0</a>. Some documentation
 +may be outdated in the meantime. Thanks for your understanding.</p></html>
 +
 +
 ====== Chapter 2: General Troubleshooting Guidelines ====== ====== Chapter 2: General Troubleshooting Guidelines ======
  
 Before we start, you should be aware: you will get frustrated — at least once. Here are a few tips to help you ease the frustrations and solve your problems. Before we start, you should be aware: you will get frustrated — at least once. Here are a few tips to help you ease the frustrations and solve your problems.
  
-===== Search Engines=====+===== Search Engines =====
  
 If you run into difficulties when writing computer code the great news is: the answer to almost any problem can be found online. All computer programmers have needed help at one time or another, and given their love for computers, most sought that help online. Lucky for you, that means that most of the questions they asked — and the subsequent answers — are still floating around the internet. If you run into difficulties when writing computer code the great news is: the answer to almost any problem can be found online. All computer programmers have needed help at one time or another, and given their love for computers, most sought that help online. Lucky for you, that means that most of the questions they asked — and the subsequent answers — are still floating around the internet.
Line 13: Line 19:
 The more specific you can be about your problem, the better the results you will find. Don't be discouraged if you don't find the answer on your first search. Rephrase the search terms and try again. The more specific you can be about your problem, the better the results you will find. Don't be discouraged if you don't find the answer on your first search. Rephrase the search terms and try again.
  
-===== Online Tutorials=====+===== Online Tutorials =====
  
-Your second best option is W3Schools tutorials. W3Schools has step-by-step tutorials for nearly every internet-related programming language. Particularly helpful for this project are:+Your second best option is [[http://www.w3schools.com/|W3Schools]] tutorials. W3Schools has step-by-step tutorials for nearly every internet-related programming language. Particularly helpful for this project are:
  
-    * W3 Schools HTML tutorial +    * [[http://www.w3schools.com/html/default.asp|W3Schools HTML tutorial]] 
-    * W3 Schools HTML DOM tutorial +    * [[http://www.w3schools.com/htmldom/default.asp|W3Schools HTML DOM tutorial]] 
-    * W3 Schools JavaScript tutorial+    * [[http://www.w3schools.com/js/default.asp|W3Schools JavaScript tutorial]]
  
 At W3Schools, you can find great reference charts that will show you at a glance all the different capabilities of JavaScript and HTML. These will come in handy when you want to do something and can't remember how. At W3Schools, you can find great reference charts that will show you at a glance all the different capabilities of JavaScript and HTML. These will come in handy when you want to do something and can't remember how.
Line 25: Line 31:
 Apart from W3Schools, you can find many other tutorials online. Try typing in what you want to learn into a search engine and you will likely find a tutorial. Keep in mind that many tutorials teach you how to accomplish a specific task and may not teach you exactly what you're looking for. Apart from W3Schools, you can find many other tutorials online. Try typing in what you want to learn into a search engine and you will likely find a tutorial. Keep in mind that many tutorials teach you how to accomplish a specific task and may not teach you exactly what you're looking for.
  
-===== Forums=====+===== Forums =====
  
 If you've Googled it, Yahoo'd it, looked it up on the W3Schools reference charts and tried various combinations of teas, coffees and energy drinks to no avail, you're going to need to ask for help. There are numerous internet forums to which you can turn for this; just find a forum you like. Here are a couple to get you started: If you've Googled it, Yahoo'd it, looked it up on the W3Schools reference charts and tried various combinations of teas, coffees and energy drinks to no avail, you're going to need to ask for help. There are numerous internet forums to which you can turn for this; just find a forum you like. Here are a couple to get you started:
Line 31: Line 37:
 ==== Webdeveloper.com ==== ==== Webdeveloper.com ====
  
-If you are looking for a good forum, the JavaScript forum at WebDeveloper.com is excellent, especially for code-related questions.+If you are looking for a good forum, the [[http://www.webdeveloper.com/forum/|JavaScript forum]] at WebDeveloper.com is excellent, especially for code-related questions.
  
 If you can't figure out why you are getting a particular error message, or why you can't get information from point A to point B, this is the forum for you. At any given time there are over one hundred people logged into the forum just waiting to answer your question. If you post your problem here in a courteous manner, with a little bit of luck you will have a solution within a couple of hours. If you can't figure out why you are getting a particular error message, or why you can't get information from point A to point B, this is the forum for you. At any given time there are over one hundred people logged into the forum just waiting to answer your question. If you post your problem here in a courteous manner, with a little bit of luck you will have a solution within a couple of hours.
Line 39: Line 45:
 ==== Zotero Forums ==== ==== Zotero Forums ====
  
-If your question is something specific to Zotero, such as "why can't I put anything in the field Loc. in archive?" the helpful men and women at WebDeveloper.com will have no idea how to answer your question. Instead, post it to the Zotero forums. Don't expect an answer as quickly as you would get on a more popular forum — there are only so many Zotero programmers to go around. You should get an answer in a couple of days as long as you're clear in your description of your problem.+If your question is something specific to Zotero, such as "why can't I put anything in the field Loc. in archive?" the helpful men and women at WebDeveloper.com will have no idea how to answer your question. Instead, post it to the [[http://forums.zotero.org/categories/|Zotero forums]]. Don't expect an answer as quickly as you would get on a more popular forum — there are only so many Zotero programmers to go around. You should get an answer in a couple of days as long as you're clear in your description of your problem.
  
 ===== Asking Good Questions ===== ===== Asking Good Questions =====
Line 47: Line 53:
 For example, don't post something like: "Why won't my translator work?" For example, don't post something like: "Why won't my translator work?"
  
-Instead, try: "Why am I getting a syntax error when I try to Push a value into an Object?"+Instead, try: "Why am I getting a syntax error when I try to push a value into an object?"
  
 Always post the relevant section of your code (and only the relevant section of your code) along with your question. This will make it easier for the experts to help you solve your problem. If the answer you get does not do the trick and you are still stuck, be polite and try rephrasing the question. Remember, don't bite the hand that feeds you; these are volunteers and they're trying to help you! Always post the relevant section of your code (and only the relevant section of your code) along with your question. This will make it easier for the experts to help you solve your problem. If the answer you get does not do the trick and you are still stuck, be polite and try rephrasing the question. Remember, don't bite the hand that feeds you; these are volunteers and they're trying to help you!
Line 53: Line 59:
 ===== Debugging ===== ===== Debugging =====
  
-To help you ask good questions you'll learn how to use the Zotero.debug() method in Chapter 6. This will let you figure out exactly which part of your code is not working. Until then, keep the following in mind:+To help you ask good questions you'll learn how to use the Zotero.debug() method in [[dev/How to Write a Zotero Translator, 2nd Edition/Chapter 6|Chapter 6]]. This will let you figure out exactly which part of your code is not working. Until then, keep the following in mind:
  
 When fixing problem code, only change one thing at a time. If you are working on a section of code that has several issues, fix one problem and retry the code before moving on. Sometimes if you make three or four changes before retrying the program, you will inadvertently cause another unexpected problem. This can make you think your fix was incorrect, when in fact only the last change you made was wrong. Change one thing and make sure it works before moving on and you will prevent a lot of confusion. When fixing problem code, only change one thing at a time. If you are working on a section of code that has several issues, fix one problem and retry the code before moving on. Sometimes if you make three or four changes before retrying the program, you will inadvertently cause another unexpected problem. This can make you think your fix was incorrect, when in fact only the last change you made was wrong. Change one thing and make sure it works before moving on and you will prevent a lot of confusion.
 +
 +**Next**: [[dev/How to Write a Zotero Translator, 2nd Edition/Chapter 3|Chapter 3: Required Software (all free)]]