Tuesday, January 29, 2008
Not all magic code is good
magic_quotes_gpc in PHP is a setting that I am guess is very useful for confusing the (4 letter word) out of you. Sure adding a decorator that magically converts your dictionary into JSON is great. However the magic quotes is something out of a horror story that grampa tells all his little coding grandchildren what not to do. Based on the php.net documentation it is even deprecated in the next major release. So much of programming so explicit that it is hard to image a feature would ever pop up. In passing data back and fourth to a database I can see this however this seem like a natural thing for the database interface to do. Specifically since there is already a function for handling this in almost all languages. I am done ranting for now.
Thursday, January 24, 2008
Charpy & Mercurial
I have been a member of Charpy since the first meeting. One of the member put up this website using WSGI application and created a Mercurial repository to contribute to the site. I had spent some time reading about GIT from Linus and I just learned a bit about Mercurial by watching a video on it. After I was impressed with how powerful as a SCM it was. I just had my first experience using it and am amazed at how easy it is to use compared to something like GIT. Only problem I had was it didn't easy install on my OS X 10.5. After downloading it and python setup.py install I was up an running with it. Mercurial is the sweet spot of being just as complex as it needs to be adding all the things that I really needed that SVN was missing.
Charpy has started to get engaging at this point. The guys are a great group of people and I think that with the traffic picking up on the mailing list the groups is starting to solidify. Using the base WSGI implementation is a little rough around the edges however it works. It is nice to have a full stack like Pylons or Turbogears. However for the things this site needs to do it is exactly as complex as it needs to be.
Charpy has started to get engaging at this point. The guys are a great group of people and I think that with the traffic picking up on the mailing list the groups is starting to solidify. Using the base WSGI implementation is a little rough around the edges however it works. It is nice to have a full stack like Pylons or Turbogears. However for the things this site needs to do it is exactly as complex as it needs to be.
Labels:
python
Thursday, January 10, 2008
New FAWPS libevent httpd and Python C Extension
So this is a bit of old news but I have been slack on my write up. A new version of FAWPS (I am trying to get William to call it Frisky) which is 0.2. He even gave me credit for helping with some of the C coding. I must admit the little I did to get him started was nothing to brag about that is for sure. However we had a good email exchange and I think we both learned a lot from working on this release. Learning GIT was a challenge but now that I almost know what I am doing it is so much better a source management tool than any other I have used. That Linus guy wrote this in 2 weeks, what an uber hack.
Anyway the new version of FAWPS is a pretty darn innovative implementation. William wrapped the libevent httpd server using Python. As much fun as hacking apache (or lighttpd) rule are (not), I have been having fun playing around with doing more dynamic things with static content serving. Even with a bit Python code I can still get 2K req/sec. It is amazing the amount of flexibility that is enabled because of this. Site skins based on domain is one thing I have noticed. The templates don't need to generate link to the css that are something like "/css/1/mycss.css" they can be just "/css/mycss.css" because based on the domain FAWPS is so fast it doesn't matter.
Where to go from here? Well there are so many little server application I would like to write with this kind of performance. I have started to work on a static file server that is cluster aware. One of the problems for large sites is when there is a cluster of machines serving up content the new or updated files have to get distributed across the cluster. More on this project later.
Anyway the new version of FAWPS is a pretty darn innovative implementation. William wrapped the libevent httpd server using Python. As much fun as hacking apache (or lighttpd) rule are (not), I have been having fun playing around with doing more dynamic things with static content serving. Even with a bit Python code I can still get 2K req/sec. It is amazing the amount of flexibility that is enabled because of this. Site skins based on domain is one thing I have noticed. The templates don't need to generate link to the css that are something like "/css/1/mycss.css" they can be just "/css/mycss.css" because based on the domain FAWPS is so fast it doesn't matter.
Where to go from here? Well there are so many little server application I would like to write with this kind of performance. I have started to work on a static file server that is cluster aware. One of the problems for large sites is when there is a cluster of machines serving up content the new or updated files have to get distributed across the cluster. More on this project later.
Friday, January 4, 2008
Android makes Java taste better
Java being the first programming language I lock myself in the basement and taught myself. I didn't actually lock myself but I spent a semester in college sitting in a basement utility room (no distractions) learning Java. Coming from C and ready all the hype I thought this was it. However for a number of years it was my main programming language. Had a little flirt with PHP for a bit but soon found myself not liking all the things that everyone else doesn't like about PHP. Then J2EE hit and I eat the elephant which has given me a bad gas every since. Enough of the metaphors.
When I became a Pythonista everything got better. Still to this day I am amazed at how Python rules. However I started to play around with Java again because of Android. Working on a nice little application right now and I am impressed. If J2EE is how to use Java wrong Android would be how to use it write. I have spent a number of hours working in the eclipse IDE at this point and I rather like it. It is still Java so it is slow and crashes but total picture I am pretty positive. Eclipse has come a long way from years ago when I use to use it.
Still there are some things I think they missed completely. Typing typing typing typing. As I was working though some examples and trying to write a new applications I realize my fingers where sore. I was typing so much I wasn't use to it. There is a lot more syntax to worry about than I was use to also.
The 800 pound gorilla effect that Sun has made is that lots of Java stuff out there. The hand held that plugs into Eclipse is great. Reminds me of JBoss plugin back in the day. However it is so much lighter and more usable. I guess the bitter Java taste in my mouth is not so bitter. It is refreshing to see a good fit for Java. Ironic it is back to its roots of what is was designed for (funny).
When I became a Pythonista everything got better. Still to this day I am amazed at how Python rules. However I started to play around with Java again because of Android. Working on a nice little application right now and I am impressed. If J2EE is how to use Java wrong Android would be how to use it write. I have spent a number of hours working in the eclipse IDE at this point and I rather like it. It is still Java so it is slow and crashes but total picture I am pretty positive. Eclipse has come a long way from years ago when I use to use it.
Still there are some things I think they missed completely. Typing typing typing typing. As I was working though some examples and trying to write a new applications I realize my fingers where sore. I was typing so much I wasn't use to it. There is a lot more syntax to worry about than I was use to also.
The 800 pound gorilla effect that Sun has made is that lots of Java stuff out there. The hand held that plugs into Eclipse is great. Reminds me of JBoss plugin back in the day. However it is so much lighter and more usable. I guess the bitter Java taste in my mouth is not so bitter. It is refreshing to see a good fit for Java. Ironic it is back to its roots of what is was designed for (funny).
Subscribe to:
Posts (Atom)