Skip to main content
20 events
when toggle format what by license comment
Sep 30, 2011 at 16:04 comment added Drew @Chris I would tend to disagree given the context of the question. Again the question was asking for "Things to think about while I write javascript." not "How can I improve my Javascript code." One thing you should always think about when writing code is "Is this the best tool/language/whatever" for the job. However, I notice most folks disagree. :)
Sep 30, 2011 at 14:26 comment added Chris -1 coffee script is not a tip for writing good javascript. What a silly idea.
Sep 29, 2011 at 20:40 comment added Ryan Kinal @tjb1982 Updated my answer (more for consistency's sake than anything else)
Sep 29, 2011 at 16:02 comment added user25791 @RyanKinal Totally. Actually, you made me take a second look--I don't believe that was the original title of the question. I think someone changed it to make it more...general? I'm not sure. It used to be something like 'five or fewer tips to keep in mind for good JavaScript.' Next time I'll think more critically about my title.
Sep 29, 2011 at 15:56 comment added Ryan Kinal @tjb1982 In all fairness, I have effectively answered "Tips to write good JavaScript", though they are not in the form of questions. I see your point, but those who never speak will never speak well.
Sep 29, 2011 at 15:52 comment added Drew @Incognito Could you explain to me why using JQuery most of the time is a bad thing? Please do not assume I don't know how to write proper Javascript without it or I don't understand the DOM, etc. (I do.) To me, it's a tool that lets me get more done in a more readable way. Could you explain why this is bad?
Sep 29, 2011 at 15:43 comment added user25791 @RyanKinal Since all communication (including code communicated to other people or parsers/compilers, etc.) depends on context for meaning, it is always appropriate to ask whether silence is the best expression. For instance, your answer's ultimate meaning came from the context of my question. You probably would have been more effective had you remained silent.
Sep 29, 2011 at 15:42 comment added Ryan Kinal @Drew I can understand that :-)
Sep 29, 2011 at 15:38 comment added Drew @RyanKinal Fair point about the fifth point. I would've stopped at four but I felt like being cheeky. ;)
Sep 29, 2011 at 15:36 comment added Drew @f0x I'm not saying you should blindly use a plugin regardless of whether or not it makes sense but we all use tools others provide us, otherwise we'd all be using our own version of assembly. Plugins can give you an excellent point to start from by either (a) solving your problem outright or (b) giving you some insight to how others have solved the problem you're trying to solve.
Sep 29, 2011 at 15:36 comment added Ryan Kinal @tjb1982 I understand that my answer may not have been the best either. But writing good JavaScript involves writing JavaScript, and understanding the concepts behind what makes good JavaScript. This brings me to the assumption that you have already decided to write JavaScript (thus invalidating the first four items in this answer - the fifth is a tautology).
Sep 29, 2011 at 15:31 comment added cillierscharl @Drew - not only does it add dependencies on your code but more subjective room for error especially if you dont know the inner workings of the code you're including. mostly plugins are written for a specific purpose. To base every code problem on a question on whether the code exists to do it for me, is ludicrous.
Sep 29, 2011 at 15:29 comment added user25791 @Ryan, your answer to "list five or fewer questions I should ask myself" included three directives that started with "learn [such and such]..." which is good advice generally, but honestly I was asking something really specific here: questions I should be asking myself for each move I make while coding JavaScript. Not "what should I learn in order to understand JavaScript." Drew is the only person who answered the question as asked.
Sep 29, 2011 at 15:27 comment added Drew @f0x Why do you say that? Why wouldn't you want to build on the work that someone else has done?
Sep 29, 2011 at 15:25 comment added cillierscharl "Is there a plugin that does this already?" Worst mindset ever.
Sep 29, 2011 at 15:25 comment added Drew Javascript is a tool and it's not always the best one. Writing Javascript when another tool would be better is a surefire way to end up writing unnecessary javascript. Which would be 'bad' IMO.
Sep 29, 2011 at 15:23 comment added Incognito @RyanKinal It includes "Use jQuery most of the time." That alone is a big problem.
Sep 29, 2011 at 15:22 comment added Ryan Kinal Your tips on writing good JavaScript include "Don't write JavaScript" and "Write good JavaScript". Sorry, -1
Sep 29, 2011 at 15:12 vote accept CommunityBot
Sep 29, 2011 at 22:38
Sep 29, 2011 at 15:08 history answered Drew CC BY-SA 3.0