Today is Bike to Work Day. I got the free tote bag at the Pier 40 ‘energizer station’. It had some handy stuff. I gotta say, with BART and Caltrain and the bike lanes in San Francisco, it is easy to commute on a bike.
Nantero – maybe this year?
Was discussing Nantero with someone here at the office. For a while their site was down, but it looks like it is back up. I discussed them here in an old blog post. Exactly 2 years ago!?!
Maybe this will be the year?
x86 instruction diversity
After someone did a naive analysis of x86 instruction diversity in typical binaries, I had my suspicions. I have looked at enough disassembled x86 code to get a good feeling of what the balance is. Sure enough another analysis was done and the numbers look much more inline with what I’ve seen. It basically boils down to ‘moves’ and ‘functional call’ instructions, and then ‘comparison and branch’ instructions. This mostly coincides with the current beliefs about actual instruction streams so it isn’t surprising to see a strong correlation.
What would be interesting to see is the breakdown of instruction streams with different languages. Specifically, if a basket of programs were analyzed at runtime, what does the pie chart look like then?
Another interesting take away from the above #’s is the old 80/20 or Paretto principle effect. Looking at the actual break down it is easy to see that 16 instructions can do nearly 75 – 80 % of the job. A processor with instruction sizes optimized for just those instructions might have much smaller executables.
Critical Mass
Did the Critical Mass yesterday.
Unforgettable – Amazing – Massive ride.
Silversun Pickups – The Independent SF
Thoughts on PHP
I had lunch today with Terry, we discussed a bunch of things. Many points and counter points were discussed.
One thing that I’ve known for a while and (he’s known for even longer), that I’ve wanted to say is this:
if you have to develop for the web, and you don’t know PHP, you should change that
I’ve used Rails, Java, Python, Perl, and maybe a few others for web development. These projects were prototypes, working projects, or simple hacks. In my experience, PHP has the best architecture for web apps that need to be up and running quickly and then stay up. It runs on just about any inexpensive hosting provider out there. If you put a tiny amount of effort in, it can even scale really, really well. If you want a great example, go check out this billion dollar company. Still not impressed, why not check this site out as well. They are using the same PHP that you have. Need another… how about this site.
The reason this is the case is because PHP was designed to work hand in hand with Apache. The multi-process,+shared nothing architecture wins versus the multi-threaded+stateful dead-end that people continue to follow. I could go on about this (and I think I already did in an older blog post). In a nutshell, shared memory, long running multi-threaded instances end up with all sorts of nasty problems (scheduling issues, dead-locks, containment/failure-isolation, non-linear performance, etc.). The PHP architecture nudges the developer down a path that has the right balance of interface, logic, and persistence. PHP apps will not fail due to resource leakage or heap bloat that long running instances end up with. It isn’t the huge nightmare to hosting providers that other systems are. PHP apps will have a consistent and predictable performance profile. When they do fail (process limits, IO limits, database limits), you can generally just add more hardware at the right layer and scale up. Now, granted, scalability gets more complicated and we can get into queuing models and yada yada, but I think you get the point.
Compare that wiith every other web-app platform that trys to keep some multi-threaded instance running to handle requests (Rails, Java, and Python, etc.). They all have their issues. In fact, I would say that the #1 problem for rails is still that they don’t have a clean, simple, and scalable platform. Mongrel is still not the answer… it is just the best answer.
Another interesting point about PHP which has been true for as long as I can remember (which Terry brought up first). If you can think of an app, it has probably already been written in PHP. Why write a forum system if you can just get vBulletin? Why write your own Digg when there are 3 clones already out there? PHP has a tremendous supply of working code, ready to run.
That reminds me of another popular, high traffic site that everybody uses every day.
So, just to recap before people take this the wrong way:
- I still love Ruby on Rails quite a bit. It was my first choice at BrightRoll and it was the right choice.
- I think PHP is excellent at what it does, and would use it even now for simple projects.
- PHP has issues and criticisms. However, I think the negatives and criticisms for other systems are larger for other systems (think Java or .NET)
- All of the above still works even for not-so-hot developers. Don’t believe me, just look at the code for some popular PHP apps 🙂
- I think all web developers should learn and understand PHP regardless of what they decide to use If you are choosing to ignore it then you may be going down the wrong path. Why would you want to do that?
- ALSO, mad props to JackH for pointing out “I think there is something there with this PHP stuff”. His input got me to really look at that tech.
I smell a bail-out
Today, after the huge draw down on sub-prime lenders, I saw this WSJ article titled:
Goldman Goes Hunting In Battered Loan Sector After a Record Quarter
Hmmm…..
Lets see Hank Paulson, ex CEO of Goldman is in the Treasury.
I smell a bail-out
I’m betting, that just like in the past, the Fed is going to bail-out the big boys (aka friends of the Treasury). Otherwise, why would Goldman eat the risk? How could they feel so sure that there is money there.
Yeah, there isn’t a precedent for this is there? I mean Dick Cheney didn’t give Halliburton any favors, RIGHT???
Vista – The Wow Does Not Start Now
I’ve been watching the Vista release lately.
So far, the execution doesn’t look good.
Here is what I’ve picked up so far:
Balmer pulled analysts aside recently and said they will not be meeting expectations. This is telling. I suspect that most corporations are not considering the switch at this time.
Evidence from friends tells me that it is not quite baked. Lots of driver issues are common and the overall performance is not stellar (sluggish UI, lots of memory leaks)
Dell still doesn’t have support for it on their high-end boxes (the XPS gamer boxes)
Unless I have a pressing need for Vista come up, I can wait 6 months. I wouldn’t risk the big switch at this time. This one needs to sit in the oven a little while longer.