Apple iPhone Development

Just a quick post here. Not a lot of time to do anything really earth shattering in this post. I have recently purchased a book to help me start to code some apps for the iPhone and iPod Touch. I am starting out slow, then going to work my way up to some really cool apps. I think one of the things I will create first is an app that can download site content for use offline. I am sure there are a ton of apps out there that do that, ie like readers, feeds etc, but i was looking to start with something that would help me, and then grow from there.

Here is the book I bought:
iPhone Development
by Dave Mark and Jeff LaMarche
Apress

Not sure when I will have time to get through this. But I will. Also, if there are any other books, or better resources to look at, please let me know. There are a few apps I have in mind for all portable/phone devices I want to do, but as with the rest of the world, money is a little tight right now and have to start somewhere.

Quick note about change

Just a quick note about the change. Needed a change to the site. So I downloaded a good theme, and changed a couple things about it. More of a minimalist approach, not as gimmicky as the old theme, and is a whole lot more “neutral” in color.

Hopefully it will stick around for a while.

Regular Expressions

Here is a topic that has really flustered a lot of developers. Regular expressions is a concept that can be hard to get a real handle on. PHP has a couple of functions that can help do regular expressions. The one I focus on most is using the function:
preg_match()

This is a very useful tool, and if you look at the PHP manual for ereg(), it states that the function “preg_match” is a faster alternative to “ereg()”. Now while I am not going to get into the details of the speed and response times for both functions, as there will always be someone with a different opinion or case that shows how their way is better, and that is fine. What most people have a hard time dealing with is getting the actual match to do what is needed. There are times when It is just easier to do a Google search and get some code that someone else has already done and plug it in. But the real power is knowing what you are doing first, that way you can build your own.

For this example, we can take a look at CakePHP’s own little validation object. When you set up a model and add some validation to it, it calls this object. Based on the data that this going into the tables, it will call one of these functions. The way these functions work is by checking the input for a specific character list/set that should be contained in the text. If the entry does not match up, then it is not validated. The way CakePHp does this is by using the preg_match() function.
Continue reading Regular Expressions