This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Programming Standards

 
Imran Mohd
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

As we know mobiles are very resource constrained, sow while creating any application we should keep this in mind...
so does your book cover any Tips for writing efficient code ..??

 
Flaviu Simihaian
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Imrad, the book certainly covers writing code efficiently. It would not be much of a book if it hadn't. However, check out the full table of contents at pragmatic programmers' website
 
Ed Burnette
Author
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, writing efficient code is mentioned several times in the book. You can also find some tips collected by the Android team here:

http://d.android.com/guide/practices/design/performance.html

As of Android 1.1, the compiler and VM are pretty dumb when it comes to automatic optimization. There is no just-in-time compilation or escape analysis or anything like that. At last year's Google I/O conference I asked designer Dan Bornstein about this and he said they were trying to make the VM as small and simple as possible in the first version. So if you have a tight loop, simple things like hoisting common subexpressions and memory allocation out of the loop can make a big difference. According to Dan, they have plenty of ideas for improving things in the future so that existing code will run faster. But for now, that's what you have to put up with.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic