revjim.net

January 28th, 2004:

Phing: a build tool for PHP

Phing is a build tool for PHP. Much like Ant for Java, it is a tool to allow a more precise, more automated method of taking a source tree and deploying into a position where it can be run. This is a problem that plagues PHP application developers constantly. Every application you download has different instructions, different ways of setting up the TarBall filesystem, and each of them requires a little bit of fussing with this or that in order to get it up and running. Phing aims to be the "make" of the PHP world. And it seems to be doing pretty well. It’s very flexible, and seems to be fairly straight forward. However, it does pose a problem.

PHP developers, myself included, are very used to being able to edit code live, should they choose to do so. They are also very used to just tarring up the document root and calling it a "package". Using "Phing" as your make tool requires a little more thought. First of all, instead of having a "config file" as your method of configuring an application, the build tool will handle most of the configuration by looking at a set of properties that you’ve established for your server. By using token substitution, an m4 style configuration approach occurs. Additionally, the application is internationalized by string substituion performed by the build tool.

All of this sounds good but I think it may be too much. Internationalization is great, but I really don’t want my build tool to handle trying to figure out which language I want certain portions of whatever to be represented in. Token and string substituion can easily happen at runtime. The only exception to this is that, at runtime, if the internationalization handling can’t represent a proper translation, and can’t translate that fact properly either, the resulting error will have to be represented in a default language. However, this isn’t much different than what the build tool would do because, if the build tool can’t make the substitution you’re requesting, it’s going to fail and announce that fact in a default language anyway.

One of the primary reasons Phing was developed was to assist in the deployment of applications written in the BinaryCloud framework. Though I wasn’t around when those choices were being made, it seems as though, what they were really looking for was a way to convert an XML description file into native PHP code in order to save the application from parsing XML on every call. This eventually led into creating Phing. I, however, think that a "build" process shouldn’t be utilized for this purpose. I believe that such a translation belongs within the application and should be handled within a compile phase of the application itself, and not in its build tool. "Make" exists because attempting to compile a large C package file by file, library by library would take forever. On the other hand, PHP does not need compilation. If the files that support a particular application need work performed on them before they can be used, this should be handled by the application.

I feel that the only part of "make" that PHP needs is "make install". And Phing is certainly capable of performing "make install". But, then again, so is "make". However, having a native make tool for PHP is a nice feature, and it affords portability that "make" does not. Therefore, all in all, I think Phing is a great project and that it fills a nice little hole in the PHP software line. I just wish the BinaryCloud didn’t rely on it so heavily.

If you’d like to play with Phing, you may find their website a bit disappointing if you’re not running PHP5. Unfortunately, the website only has PHP5 versions of the code available. But, by visiting the BinaryCloud site at Tigris and visiting the CVS repository, under "r3/phing" a PHP4 version of the code can be found.

Meeting a Mortgage Broker

Jess and I met with a mortgage broker last night and now I realize that I’m in over my head. He seemed like a nice guy. Unfortunately, he had a weird way of talking in circles around my questions. For instance, I told him that I didn’t know how much house I could afford and that I had guessed at $150,000. I told him that I’d like a rough estimate regarding what that would amount to in out-of-pocket expenses every month so that I could decide if that was a good price point for us. Instead of answering my question, he simply told me that, based on my salary, debt, and credit rating, I could afford a lot more home. Regardless of how I posed the question, I was met with the same answer. However, as we went further into our talk, he eventually showed me a piece of paper (a "Good Faith estimate", I believe it was called) that showed a $150,000 house at 6.25% interest for about $1,450/mo (which included home owners insurance, and property taxes).

He had us sign about 30 sheets of paper. It seemed a bit odd to me, because all of the pages that required a property address had "TBD" written in. I didn’t understand why he would have us sign paperwork that would eventually have to be reprinted and resigned.

The issue of down payment was also a bit odd. After he factored in closing costs, his 1% loan origination fee, private mortgage insurance, and a down payment we were looking at just under $11,000. However, he then went on for about 15 minutes about how, because we were probably getting an FHA loan, the seller would be required to pay the "non-allowables". I asked him what would happen if the seller were unwilling to pay these costs and he told me that, in that case, I wouldn’t be able to get an FHA loan. However, he also mentioned that, with this loan, the seller was allowed to pay $9,000. It was all a bit confusing to me. It seemed a lot like what car dealers do when you have a trade in. "Sure we’ll give you more for your trade-in, as long as you pay more for this new car". Essentially, he was saying that, in many cases, the seller can, instead of selling me a house for, say, $100,000 and paying nothing, they will agree to sell me the house for $101,000 and pay $1,000. It just seemed silly. Then he mentioned that an "educated" seller might not be willing to do this, but I couldn’t figure out why it really mattered and he couldn’t explain it to me in a way that I understood.

He said that, if we were planning on ending our current lease on September 31st of this year, that we should plan on closing on the house around August 31st. This meant that somewhere between July 15th and July 31st, we should sign a contract. I had a hard time figuring out what this "contract" was, but I did understand that it is NOT the offer that we put on the house. The "contract" comes after we put in an offer and it is accepted. Then we sign a "contract". Then they work on getting the loan, then we close. According to him, the process between signing a contract and actually getting a loan takes about 30 days. He said that it’ll take us a month or so to find the house we want, on average, and, therefore, we should start looking around June 1st. And, because of that, we need to sign the papers to get approved around May 15th. I’m not sure what the difference is between the stuff we sign on May 15th and the "contract", but, when we sign the stuff on May 15th, we have to bring W2s, and Tax returns, and paystubs, and a $99 loan commitment fee.

We signed all sorts of papers that all sorts of dollar amounts on them. Disclosure statements showing us other loans that were available. Disclosure statments about what the details of this particular loan are. Truth in Lending statements that show that our loan will be 6.25% fixed for 30 years and that the loan can (and will, in this case) be sold to other parties.

The biggest thing that I didn’t understand was why we had to sign so many papers now if he wasn’t even going to start the approval process until May 15th when we brought him all of the income proof and our $99. He said that the date sensitive paperwork is good for 90 days (not enough to last until May) and that some of the other stuff is good for longer and that, more than anything, he was making us familiar with the paperwork involved so that, when we were ready to go, he could simply mail us documents instead of requiring us to come in so he could explain them all. This seemed understandable, yet still a bit odd.

He did say that my credit looked pretty good. I wasn’t good enough to get what he called an "a-paper loan", but he felt that if I fixed one small bug in my credit, that it would put my score over 620, which, then, would be good enough for this "a-paper loan". Experian is what he pulled (and the only one I had a hard time pulling myself). Apparently, Sprint PCS thinks I owe them $170 from a million years ago. He said clearing that off my credit report will help a lot.

So, all in all, I’m optimistic. $1,450/mo is a good price point for us. We could even go a bit higher, which means that we can be a little more flexible in what we are looking for. I’m going to need the $11,000 worth of stuff explained to me again. And I’m going to need to understand this business with the "seller" paying part of the cost of the house. He also mentioned that, if I didn’t like the 1% loan origination fee, that could be done away with by simply increasing the interest rate. If the loan origination fee is what HE gets paid for brokering the mortgage, I’m not sure I understand how a higher interest rate will get him his money. Additionally, there were long lists of fees that were incorporated into the $11,000. Most of which he claimed were charged by others (title company, appraisal company, etc) and were not charged by him or the lender. But, I had to take his word on that.

So, at this point, we’ve signed a bunch of paper work, and spent 2 hours in a mortgage broker’s office just to find out three simple facts: 1) my credit is good, but not great. 2) We can get an interest rate of 6.25%. 3) A $150,000 house will cost us roughly $1,450/mo with $4,500 down and the seller paying about $1,200 (which doesn’t add up to $11,000… but… whatever).

Nikon D70: first look

As I told you before, Nikon is planning to release a Sub-$1000 digital SLR, the Nikon D70, to compete with cameras like the Canon Digital Rebel 300D. Dpreview has some more information as well as some images of what the camera might look like.

The gist of it seems to be this: unlike Canon, Nikon doesn’t seem to be purposely crippling the software in the camera in order to make it less appealing to professionals who don’t need something as rugged or as fast as those on Nikon’s professional line. This is a sigh of relief. While the crippling that Canon has done to the 300D isn’t that bad, it still is a bit upsetting to think of a manufacturer making a camera do less on purpose. And, of course, this camera will share the same "F" lens mount as the rest of the Nikon line just as they have since… forever. This means that any Nikon lens ever made will work with this camera. Well, almost. Just like with the Nikon D100, there are certain features that don’t work with certain lenses. And, of course, if the lens doesn’t support a feature (like AutoFocus, for instance) then the camera certianly can’t do it. But, as best as I can tell, any lens that would work on the D100 will work on the D70 in the same manner.

It uses a 6.24MP sensor. Most likely the same one in the Nikon D100. It has a 1.5x multiplier, just like the D100. Again, like the D100, it supports ISO 200 – 6400. 30" to 1/8000" shutter speed with Bulb setting. It takes Compact Flash memory and does not come with a card. It supports flash compensation, which the 300D does not. I haven’t seen any information on top FPS.

You should also read what Matt has to say about it.