Over the weekend I read Bruce Tate's book, Beyond Java. The first half was about the history of how and why Java grew so popular and what factors might cause people to move on to something else. The second half was about promising new languages and frameworks. Ruby, Ruby on Rails, and Seaside were highlighted in particular. Bruce thinks that if you are developing simple web applications that run on top of a relational database, then Java and its frameworks are just too complicated and cumbersome. There is so much hype about Ruby on Rails in the Java community, that I'm really anxious to try it out. Hopefully I will have some time over the holidays. The reason that Rails is so popular has to do with its creative uses of metaprogramming which is the ability to manipulate objects at runtime. Seaside looks interesting because it builds on the concept of continuations which is the ability to capture the state of a system so that a program can come back to it later. It allows you to do server-side web programming as if each web page was modal - and supposedly it makes the broswer back button functional and intuitive! I was surprised to see it published by O'Reilly since I've always thought of O'Reilly's books as being more technical and factual and not trying to have a "point of view". Tate's book seems to be all "point of view" and belonging more in a magazine than a book. The whole book read like a long meandering blog post. What I got out of this book was a better understanding of meta programming and continuations, and those things seem really interesting. I'd really like to see someone try to develop a continuation server in java. I don't know if it is possible within the explicit support in the java language for continuations. Even after reading this book, I am not worried about Java's prospects in the next 10 years. The Java community is rock solid and that can trump the technical advantages of other languages. |
Wednesday, November 30, 2005
Beyond Java
Tuesday, November 29, 2005
Discovering Biking in LA
I was happy to see the recent article in Slate, Nobody Bikes in L.A. - But they'd be a lot happier if they did by Andy Bowers. I feel the same way. So many people complain about traffic and congestion in Los Angeles, and I can't relate to them now that I've rid myself of my car and begun to enjoy Los Angeles on bus, train, bike, and foot.
Andy jokes that he'd be annoyed if LA morphed into a biking city and there were "Beijing-like throngs" of Angelinos on bike. I, however, think it would be awesome!
Andy jokes that he'd be annoyed if LA morphed into a biking city and there were "Beijing-like throngs" of Angelinos on bike. I, however, think it would be awesome!
Saturday, November 26, 2005
Polyominoes on Thanksgiving
Just before Thanksgiving dinner, a family member was telling me about a children's book that talked about Pentominoes, which I had never heard of before. Apparently they were polygons made up of 5 connected squares, that when combined could form many possible shapes. Given 5 squares, there were 12 possible combinations of shapes that you could form.
I thought about the game Tetris in which you work with similar shapes, but they are made out of 4 squares instead of 5. In Tetris there are 5 possible pieces. This got me thinking: Given n squares, is there some formula, f(n), that would determine how many unique combinations can be formed by connecting the squares?
I took out a napkin and started drawing the possibilities for 0, 1, 2, 3, 4, and 6 squares. 0-4 were easy. For n=6, I drew out over 25 combinations, and then gave up trying to find more:
n --> # of combinations
-----------------------
0 --> 1
1 --> 1
2 --> 1
3 --> 2
4 --> 5
5 --> 12
6 --> 25+
No obvious formulas jumped out at me, so I decided that I should just Google for pentominoes formulas and see if anything came up.
I ended up at Wikipedia where there was an awesome page on Polyominoes, which is apparently the general term for these shapes with a square as the base form. I was amazed at how much analysis existed for Polyominoes. I was even more surprised to find out that no one has yet found the same formula I was looking for. Instead, people have come up with computer algorithms that have empirically counted the combinations.
Just in 2004, someone enumerated the possibilities for up to n=56 which has approximately 6.915 X 10 to the 31 combinations! The results are shown here in the integer sequence A000105 which is maintained by the Online Encyclopedia of Integer Sequences. I didn't even know there was such a thing!. I guess numbers and geometry have always interested me.
I thought about the game Tetris in which you work with similar shapes, but they are made out of 4 squares instead of 5. In Tetris there are 5 possible pieces. This got me thinking: Given n squares, is there some formula, f(n), that would determine how many unique combinations can be formed by connecting the squares?
I took out a napkin and started drawing the possibilities for 0, 1, 2, 3, 4, and 6 squares. 0-4 were easy. For n=6, I drew out over 25 combinations, and then gave up trying to find more:
n --> # of combinations
-----------------------
0 --> 1
1 --> 1
2 --> 1
3 --> 2
4 --> 5
5 --> 12
6 --> 25+
No obvious formulas jumped out at me, so I decided that I should just Google for pentominoes formulas and see if anything came up.
I ended up at Wikipedia where there was an awesome page on Polyominoes, which is apparently the general term for these shapes with a square as the base form. I was amazed at how much analysis existed for Polyominoes. I was even more surprised to find out that no one has yet found the same formula I was looking for. Instead, people have come up with computer algorithms that have empirically counted the combinations.
Just in 2004, someone enumerated the possibilities for up to n=56 which has approximately 6.915 X 10 to the 31 combinations! The results are shown here in the integer sequence A000105 which is maintained by the Online Encyclopedia of Integer Sequences. I didn't even know there was such a thing!. I guess numbers and geometry have always interested me.
Monday, November 21, 2005
Google Maps Powers Applications
There are so many cool applications being built that take advantage of Google Maps technology.
Over the weekend I tried out Google's new Local For Mobile on my Motorola V400 cell phone and it worked nicely! I used it to search for all the shoe repair places near where I live. This is probably the first useful J2ME application I've used on my cell phone. I had to enter my zip code in order for the application to know where I was, but I heard that on some phones, cell tower triangulation can be used to automatically identify your location. Unfortunately GPS isn't used yet but hopefully will be in the future.
Another application that is gaining popularity is Frappr. People are using Frappr to create group web pages that show where members of the group are physically located. For example, one of the podcasts I listen to uses Frappr to guage where its listeners are located: Slashdot Review Podcast Frapper Page.
One last example of a cool Google maps-enabled application is MashMap. This one makes it really easy to find what movies are playing in nearby movie theaters. The user interface is pretty slick.
Over the weekend I tried out Google's new Local For Mobile on my Motorola V400 cell phone and it worked nicely! I used it to search for all the shoe repair places near where I live. This is probably the first useful J2ME application I've used on my cell phone. I had to enter my zip code in order for the application to know where I was, but I heard that on some phones, cell tower triangulation can be used to automatically identify your location. Unfortunately GPS isn't used yet but hopefully will be in the future.
Another application that is gaining popularity is Frappr. People are using Frappr to create group web pages that show where members of the group are physically located. For example, one of the podcasts I listen to uses Frappr to guage where its listeners are located: Slashdot Review Podcast Frapper Page.
One last example of a cool Google maps-enabled application is MashMap. This one makes it really easy to find what movies are playing in nearby movie theaters. The user interface is pretty slick.
Friday, November 18, 2005
Uses for AIM Bots
A friend of mine at work just wrote an AIM Bot which is a fake AOL Instant Messenger user that you can talk to, using it to save bookmarks for you or share bookmarks with others publically. To use it, add the AIM user FartyMcBookmarky to your IM list and use the following syntax to send messages to it:
commands:
\public http://bookmark.url/ (save a public bookmark)
\private http://bookmark.url/ (save a private bookmark)
\bookmarks private (view private bookmarks)
\bookmarks public (view public bookmarks)
This AIM Bot is essentially a Perl program running on his home computer that has signed into AIM as the user FartyMcBookmarky. When you send FartyMcBookmarky a message it gets processed by the Perl program.
It makes me wonder what programs would be better implemented as AIM Bots rather than web applications. Maybe the command line tool Pizza Party would be a good AIM Bot.
commands:
\public http://bookmark.url/ (save a public bookmark)
\private http://bookmark.url/ (save a private bookmark)
\bookmarks private (view private bookmarks)
\bookmarks public (view public bookmarks)
This AIM Bot is essentially a Perl program running on his home computer that has signed into AIM as the user FartyMcBookmarky. When you send FartyMcBookmarky a message it gets processed by the Perl program.
It makes me wonder what programs would be better implemented as AIM Bots rather than web applications. Maybe the command line tool Pizza Party would be a good AIM Bot.
Thursday, November 17, 2005
My First SourceForge Project
Yesterday, I submitted Schemata, my first project ever to SourceForge.net, and today I saw that they approved it! I am excited. Since I left the uPortal project, I have been missing the joys of open source software development. This project, called Schemata, will give me a chance to get back into it.
Schemata will be a tool that software developers use to maintain the schema and data for a database that supports the application they are developing. The tool will allow you to maintain the schema and data in an XML format which can be loaded into any relational database for which a JDBC driver is available. The developer would no longer have to maintain multiple versions of SQL scripts, one for each database he/she wants to support. It is really useful if you want to use, say, HSQLDB in development and for testing, but then use PostgreSQL in production.
I wrote a similar tool for uPortal about 5 years ago called DbLoader, but over time, the tool was enhanced with uPortal-specific features and it isn't easy to use it apart from the rest of the uPortal framework. Schemata will be very similar in concept and will grow to include Ant tasks, a Maven plugin, and maybe even an Eclipse plugin eventually.
I'm also using this opportunity to learn a new XML parsing API called StAX which stands for Streaming API for XML. Often called pull parsing, it has the speed advantages of SAX, but not the difficult programming style resulting from having to code up event handlers.
The Schemata project is just getting underway, so don't expect to find any working software at the SourceForge site yet.
Schemata will be a tool that software developers use to maintain the schema and data for a database that supports the application they are developing. The tool will allow you to maintain the schema and data in an XML format which can be loaded into any relational database for which a JDBC driver is available. The developer would no longer have to maintain multiple versions of SQL scripts, one for each database he/she wants to support. It is really useful if you want to use, say, HSQLDB in development and for testing, but then use PostgreSQL in production.
I wrote a similar tool for uPortal about 5 years ago called DbLoader, but over time, the tool was enhanced with uPortal-specific features and it isn't easy to use it apart from the rest of the uPortal framework. Schemata will be very similar in concept and will grow to include Ant tasks, a Maven plugin, and maybe even an Eclipse plugin eventually.
I'm also using this opportunity to learn a new XML parsing API called StAX which stands for Streaming API for XML. Often called pull parsing, it has the speed advantages of SAX, but not the difficult programming style resulting from having to code up event handlers.
The Schemata project is just getting underway, so don't expect to find any working software at the SourceForge site yet.
Wednesday, November 16, 2005
Los Angeles Traffic Peaks in November
For some reason, the amount of traffic on the westside of Los Angeles seems to peak every year in November. There has been a noticeable increase in traffic in the last few days. Last night and tonight, it took 90 minutes to travel by bus from Santa Monica to UCLA during rush hour! It normally takes half that amount of time or less. Still UCLA is only 4 miles from where I work in Santa Monica. If there was a train or dedicated bus lane, it would only take like 15 minutes.
What is special about November in Los Angeles when it comes to traffic? Does traffic peak in November in other major cities? Does it have to do with the fact that it gets dark much earlier now? Are less people on vacation?
I can't relate to people that are willing to trade hours of their time sitting in traffic for larger houses in the suburbs. If I can help it, I am never going to take a job that requires me to commute more than 5 miles from my house. Luckily I'm in the software field where jobs are currently plentiful and it is possible to be so picky.
What is special about November in Los Angeles when it comes to traffic? Does traffic peak in November in other major cities? Does it have to do with the fact that it gets dark much earlier now? Are less people on vacation?
I can't relate to people that are willing to trade hours of their time sitting in traffic for larger houses in the suburbs. If I can help it, I am never going to take a job that requires me to commute more than 5 miles from my house. Luckily I'm in the software field where jobs are currently plentiful and it is possible to be so picky.
Sunday, November 13, 2005
Wal-Mart - The High Cost of Low Price
This evening, I went to a screening of Robert Greenwald's new movie Wal-Mart - The High Cost of Low Price. Tonight was the beginning of premier week in which there are 7000+ screenings nation wide, many of which are held at normal people's houses.
I had signed up for one at someone's house in Venice, but when I arrived, there was no one home and I went home disappointed that someone wasted my time. Luckily, there was another showing later in the evening at Temple Isaiah, a reform Jewish congregation specializing in social action. The temple was packed with over 350 people. I had no idea so many people would show up in a temple for a film about Wal-Mart.
The movie was pretty good, but in my case it was preaching to the choir as I had already made an effort to avoid shopping at Wal-Mart, and most other big box stores for that matter. The movie mostly consisted of personal accounts covering the many ways that Wal-Mart is bad for society. Some things that surprised me were how little the Walton family gives to charity given their wealth, how much crime is committed in Wal-Mart parking lots, and how the Walton family has their own personal bunker where they could go to escape an apocalyptic event.
That last one got me thinking that many rich people must have similar bunkers. Does this mean that only the world's wealthiest people will survive a large-scale catastrophic event? Someone should make a movie about the world's rich people coming out of their bunkers and populating the earth after the apocalypse.
The movie ends on a positive note with stories of how communities have been able to prevent Wal-Mart from moving in. I was proud of my neighboring city, Inglewood, one of two cities (the other was Chandler, AZ) that fought Wal-Mart and won.
I hope Wal-Mart employees and shoppers have a chance to see this movie and that it makes them think twice before working or shopping there.
I had signed up for one at someone's house in Venice, but when I arrived, there was no one home and I went home disappointed that someone wasted my time. Luckily, there was another showing later in the evening at Temple Isaiah, a reform Jewish congregation specializing in social action. The temple was packed with over 350 people. I had no idea so many people would show up in a temple for a film about Wal-Mart.
The movie was pretty good, but in my case it was preaching to the choir as I had already made an effort to avoid shopping at Wal-Mart, and most other big box stores for that matter. The movie mostly consisted of personal accounts covering the many ways that Wal-Mart is bad for society. Some things that surprised me were how little the Walton family gives to charity given their wealth, how much crime is committed in Wal-Mart parking lots, and how the Walton family has their own personal bunker where they could go to escape an apocalyptic event.
That last one got me thinking that many rich people must have similar bunkers. Does this mean that only the world's wealthiest people will survive a large-scale catastrophic event? Someone should make a movie about the world's rich people coming out of their bunkers and populating the earth after the apocalypse.
The movie ends on a positive note with stories of how communities have been able to prevent Wal-Mart from moving in. I was proud of my neighboring city, Inglewood, one of two cities (the other was Chandler, AZ) that fought Wal-Mart and won.
I hope Wal-Mart employees and shoppers have a chance to see this movie and that it makes them think twice before working or shopping there.
Saturday, November 12, 2005
Grubs In My Compost
Today I went to check on the status of my compost pile. Again, I discovered many slimy grubs crawling around, especially at the bottom toward the sides. They ranged from about 1 cm to about 2 inches in length. The adults were pretty thick, I'd say about 2 cm! I have been seeing these grubs a lot lately.
A few months ago, I took one of them to the nursery to ask what they were and whether or not they were good or bad to have in the garden. I was told that they are grubs and that I should probably try to get rid of them. My mother also told me that they were bad, and that when she finds them, she crushes them.
So today, I spent nearly an hour sifting though the pile, picking up the grubs with a small shovel, and placing them in a plastic bag which I sealed up and threw away. You could hear the sound of the many squirming grubs in the bag - it sounded nasty. I must have collected well over 50 of them!
Just a few minutes ago, I googled for grubs compost pile and found this interesting page: Large C Shaped Grubs In Compost Pile. I think the grubs discussed there are actually the ones I have. According to that article, these grubs are actually good for the pile, contradicting the info I got from the nursery and my mom. Now I don't know what to think. Should I leave them in the pile, or try to exterminate them from time to time? If you are a gardener and/or have a compost pile with grubs, what do you do?
A few months ago, I took one of them to the nursery to ask what they were and whether or not they were good or bad to have in the garden. I was told that they are grubs and that I should probably try to get rid of them. My mother also told me that they were bad, and that when she finds them, she crushes them.
So today, I spent nearly an hour sifting though the pile, picking up the grubs with a small shovel, and placing them in a plastic bag which I sealed up and threw away. You could hear the sound of the many squirming grubs in the bag - it sounded nasty. I must have collected well over 50 of them!
Just a few minutes ago, I googled for grubs compost pile and found this interesting page: Large C Shaped Grubs In Compost Pile. I think the grubs discussed there are actually the ones I have. According to that article, these grubs are actually good for the pile, contradicting the info I got from the nursery and my mom. Now I don't know what to think. Should I leave them in the pile, or try to exterminate them from time to time? If you are a gardener and/or have a compost pile with grubs, what do you do?
Thursday, November 10, 2005
Riding the New Metro Orange Line
Last weekend, I tried out the new Orange Line in the San Fernando Valley. It runs east/west from the Warner Center in Woodland Hills to the end of the Red Line in North Hollywood. I don't know if anything like it exists anywhere else. It is a bus on a mostly dedicated roadway that acts like a train. It is really long with about 3 sets of doors that automatically open and close at each stop. You can enter any of the doors since you buy your ticket before boarding and don't have to show your ticket to the bus driver. You also don't have to signal the driver when you want to stop because the bus automatically stops at every station just like a train would. The bus did have the typical stop-requesting cable however, which did result in a voice saying "Stop Requested" over a loud speaker. Maybe the cable was just there to put at ease people that are accustomed to pulling such cables on normal buses.
I started at the Reseda stop and headed east toward North Hollywood. Then I checked out the Red Line station since I had never been there before. It looked like there were new residential and commercial projects underway near the station which was nice to see. I then rode the Orange Line to the Warner Center. The trip took exactly 40 minutes which isn't too bad to get accross the valley. While on board, you could pass time by watching the "Transit TV" monitors which displayed news and ads.
The only thing that I didn't really like about the Orange Line was that the bus had to stop once in a while at red lights. That killed the whole train-like feeling of having a true dedicated right-of-way.
If building the bus/train Orange Line is much cheaper than building a light rail line, I'd be happy to see more lines like that appear in Los Angeles, especially up and down the Westside where we desperately need better public transit options.
I started at the Reseda stop and headed east toward North Hollywood. Then I checked out the Red Line station since I had never been there before. It looked like there were new residential and commercial projects underway near the station which was nice to see. I then rode the Orange Line to the Warner Center. The trip took exactly 40 minutes which isn't too bad to get accross the valley. While on board, you could pass time by watching the "Transit TV" monitors which displayed news and ads.
The only thing that I didn't really like about the Orange Line was that the bus had to stop once in a while at red lights. That killed the whole train-like feeling of having a true dedicated right-of-way.
If building the bus/train Orange Line is much cheaper than building a light rail line, I'd be happy to see more lines like that appear in Los Angeles, especially up and down the Westside where we desperately need better public transit options.
Subscribe to:
Posts (Atom)