Xcode4 Preview 5 is here!

Apple has finally released Preview 5 of Xcode4. I am very excited and loving it, but it still has a few bugs and Apple recommends sticking to Xcode 3.2.5 if you want to develop apps for the app store. Few of the features that I love in Preview 5:

  • Many performance problems with making connections are resolved. In particular, the performance of connecting to the First Responder has been drastically improved.
  • C++: Several bugs related to using blocks are fixed.
  • Xcode automatically creates schemes for all targets in a project when you open an Xcode 3.x– based project. It doesn’t skip targets that other targets depend on.
  • When you create NSManagedObject subclasses from entities in a Core Data data model, Xcode ask for confirmation before overwriting existing files.

Can’t wait for the Xcode4 final version! I am working on a nice app which is to be released in early February, and would love if Xcode4 is here by that time.

Best approach to avoid MySQL injection.

I was working in an open source script called PHPProBid. I decided to check what approach they are using to avoid MySQL injection, after looking into their source code I found out they were using the oldest method of escaping user inputted data using the mysql_real_escape_string(). And, it’s not just this script who uses this old method but in fact so many PHP tutorial websites still propagate the old methods and still don’t know the best approach which should be used to avoid MySQL injection. They don’t know that PHP’s manual itself discourages the use of such methods, and encourages to use advance methods such as PDO’s prepared statements. Read the rest of this entry »