Jump to content
Larry Ullman's Book Forums

Wanted To Share Debugging Technique - (You May Already Be Doing This)


Recommended Posts

As far as bugs go, It seems on every script the main issues I have had on the first book and up to Ch 12 on this book are usually mismatched/missing/too many brackets and parenthesis:

 

(   )

{  }

[  ]

 

 

One thing that I have just started doing that I probably should have started doing a while ago is using Command-F to perform a search of the code.  Once you pull up the find window, you can count the  symbols - for example count the parethesis that opens to the right.  Say that count is 7.  Next search for all the parenthesis that open to the left.  If that count is equal to 7 then you have matching parenthesis within your code, if it is not, then you need to make them match.  Repeat the process for the primary types of symbols found in your code.  This has saved me some time and I'm guessing a lot of people do this, but I just figured this out.

Link to comment
Share on other sites

Textmate has gained much "hype" recently due to experienced developers Using it alongside the command line in YouTube learning videos. What it boils down to is efficiency, and most would gain from using an IDE in that regard.

 

NetBeans checks my code, generates Class skeletons, runs my tests, generates my Apis, formats my code, push code to github, uploads to my server Using FTP and has my favorite shortcuts for code generation. It also has built in support for all languages I program in. Textmate can't beat that.

 

IDEs are not for everyone though. I would at least recommend you giving one a try. You can easily change back later on, and the possible gain is huge.

Link to comment
Share on other sites

Actually, TextMate HAD hype. It lost a lot of luster thanks to:

- taking forever to release version 2

- open sourcing the project (which one could interpret as abandoning it)

- Sublime Text 2

 

There are a ton of arguments when it comes to text editors vs. IDEs, but the fact is that contemporary text editors can do everything that NetBeans does. I don't know that TextMate was ever that flexible, although with its plug-in architecture, it could be, but ST is extremely flexible and powerful. 

 

The fact of the matter is that whatever kind of tool you choose, if it's powerful, it will make your life much easier in the long run, but will be an extra hurdle to learn in the short run. If it's not powerful, it'll be easier to start using, but less efficient over the long haul.

Link to comment
Share on other sites

 Share

×
×
  • Create New...