Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I have a general development question...
I've been making this rpg and recently came across this annoying bug. It's driving me nuts, and haven't made progress on other aspects of the game because I've been so focused on solving it. The bug isn't necessarily a show stopper, but it is something that will need to be solved.
Here is the bug: JavaScript - extremely confused on removing elements from Container
My issue is:
On one hand, if I don't spend the time really thinking about the bug, I will probably never solve it.
On the other hand, it's preventing me from advancing other aspects of development.
That being said, my question is: If there is one, what's a good rule of thumb on time you should invest into a bug before moving on?
I'm not sure if this question belongs here, or another SO site.
Thanks
If you have decided the bug must be fixed, it doesn't matter when you do it. However, the longer the bug persists, the harder it will be to solve, so fixing it early is the best path to success.
Joel says (see #5) you should fix bugs right away.
That's one reason to fix bugs right away: because it takes less time.
There's another reason, which relates to the fact that it's easier to
predict how long it will take to write new code than to fix an
existing bug.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have googled about the implementation of straight road using Javascript.
http://codeincomplete.com/games/racer/v1-straight/
However, I would like to check if Phaser framework gives a nice way to implement the straight road vertical scrolling background?
Here is what I expected the background scrolling the same as this game
http://www.nickjr.com/paw-patrol/games/paw-pups-save-the-day/
Thanks you in advance for guiding and sorry for any mistakes in this question.
I think you're getting downvoted because there is no 'nice and clever' way to implement a whole game on any engine/platform. If you want to build something, software takes a ton of work. Don't expect things to be magically done for you. So a tutorial is about the best you can hope for, and if you google it there's a lot of results.
That being said, here's a Phaser tutorial that's magically done for you, but I wouldn't go so far as to call it nice and clever. GLHF!
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I have a question regarding the act of breaking the laws of javascript (Don't repeat code, etc) and that is, does it really matter as long as the performance and functionality isn't affected in anyway?
I have a script with 200+ line of code that looks messy after I did some work arounds, made it compatible with every browser and bugtested it a few times, and even after that it still runs pretty great even if the code isn't as organized. I haven't run into any errors with it yet and the load time is supreme. I should also note that I learned javascript a few weeks ago, so I am not perfect at it.
I do understand that if you're writing a huge applicaton it may have a noticeable impact on the performance and load time.
This has been on my mind for a few days and I just wanted to see your opinion about it, so please post a detailed opinion and maybe some tips and tricks as your answer. Thank you. :)
Yes, it matters. A lot.
You cite performance and download time as if they were the most important things.
I'd say that readable code that's easily understood by others might be more important than your measures.
Keeping code DRY, organized, neat, and readable are the signs of a professional in my view. Sloppy, copy & paste messes come from hacks.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Have written a large system in ColdFusion/Javascript/MySQL. There is lots of Javascript. The few functions which are long are separated into cases. Currently I have all the js in 3 files, depending on the section of the application to which they refer.
Every now and again, some function which tested okay before turns out not to be working (I might have changed something elsewhere to cause that problem, without realizing I had to retest).
Okay, I deserve that, but when one js function in the file stops working, sometimes others do as well. So unexpectedly something I was counting on to validate things, or prevent a submit in the presence of errors does not work.
I've thought of breaking up the js so that any javascript function which is used by just one program will be resident there, and I would use the files with several js functions only for those that several programs have to access. That would insulate my functions somewhat from problems occurring elsewhere.
Is this approach recommended? Could someone offer good reasons for or against it? Or is there a way to "firewall" my functions so that problems with one do not spill over into another?
I'm feeling that the js is a weak link in my system -- that I can't trust it; yet I need it, so I have to find a way to make things more stable. Any and all suggestions to help would be much appreciated.
The suggestion "get better at Javascript" has already occurred to me. I am trying. Meanwhile, my needs are not very demanding. All my functions do simple things and are written in a pretty straightforward way. Yet I am having all this trouble.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
This question is pretty simple:
How does one go about detecting and debugging javascript stress on the CPU and/or optimize the code?
As you start building more and more code you reach points where things slow down. How do you figure out if you have unnecessary js running, maybe redundant code, OR if it's getting too much for a computer? My computer is pretty powerful but I can't assume everyone has a monster computer.
Is there a function, program or some tools that can help with this task?
This question seems general but I really don't know how to simplify it otherwise.
Any help or pointing in the right direction is much apprecitated :) Thank you.
Try this app called Spy-JS.
It is a tool which allows you to trace your code, and figure out which executions are taking the longest, allowing you to figure out where you need to optimize.
The tool you are searching for is called a "profiler".
The Firebug extension for Firefox comes with such a profiler and allows you to measure which parts of your Javascript code take how much time to execute.
Keep in mind that it only measures the execution speed in Firefox. Other browsers might implement certain javascript features more or less efficient, which means that the performance bottlenecks could be in other places when your application is executed in another browser. But more often than not your own code is at fault when a program runs slower than it should.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
After a week of coding finally have my site working across all browsers and mobile devices. I made the mistake of not viewing in IE8 and IE 7 until now.
Can anyone share some steps in resolving IE7-8 compatibility issues when using jQuery and CSS?
What are some first steps to try?
If a site isn't too complex does it make sense to do server side detection and serve up an IE only site?
There should be few if any issues in jQuery - thats one of the big benefits to using jQuery or a similar library in the first place. Chances are if there is a js issue then its something you wrote as opposed to something internal to jQuery.
In both cases the bets thing to do is simply know the majority of the big things that differ in support. the Quirksmode.org compatibility tables are good for this. If you know the differences in the first place you are going to be able to create solutions up front before you ever get to testing and avoid the issues. Beyond that test cross-browser early on in the process - not at the last minute.
Depends on what problems you are running into. There are a lot of resources, such as PositionIsEverything or HasLayout, on the web complaining about & explaining different IE bugs (peekaboo, double margin etc).
It is useful to use a tool such as IETester to see your page on actual IE versions.