Tuesday, January 26, 2010
iPod touch
How is it? Well, as an mp3 player, it gets mediocre marks. Trying to quickly pause it can be a pain. First you have to push a button, then move your hand across a slider, and then locate the pause button. The last part can actually be a challenge. One 'feature' of the touch is the ability to 'rotate' the screen. On the music player, the rotated displays have different sets of options in different positions. Thus, the pause control will be in a different place depending on the rotation. Unfortunately, it is not all that great at identifying which way it is rotated. (Sometimes I have to shake it around to get it to really recognize the display.) Thus, pausing can be a challenge.
The other issue with the touch screen is that it requires human skin. Thus, in addition to the three step pause process, you also need to bear some skin. Even in Cupertino, people occasionally wear gloves. On the bright side, I have a glove with a hole in the finger that has suddenly found a new use with the iPod. I've also even been successful at using my nose.
The iPhone OS 3.0 brings in two new issues to the iPod touch as an MP3 player. The first general issue is that it has to spend time "rebuilding the library" after every time you add new songs. This can take in excess of 10 minutes, and seems to stop if you hit the 'screen off' button at the top of the iPod. Just when you get in the mood to listen to some tunes or audiobooks, it hits you with that. Ugghh.
The other new annoyance is the 'unsorting' of smart playlists. Regardless of what steps you go through, it will display the contents of automatically updating smart playlist in a random order. I like to listen to audiobooks that I set up as smart playlists. The major advantage of the smart playlists (before theupgrade) was that old tracks would go off the list after they were played, and I could easily go to the last track I was on, even if I listened to something else in between. With the upgrade, the smart playlists are in random order. You can go to a secondary 'album' display and see the playlist in the correct order. However, you have to make sure it is playing here, otherwise, you may get some random surprises. Also, the secondary display does not 'drop' tracks that have been played, so it can be a challenge to find where you left off. (There is one nice new feature in the 3.0 OS in that it remembers what you were listening to after syncing.)
These issues made me really wonder why I bothered to upgrade, especially since Apple likes to charge for the upgrades. However, on the bright side, the iPod does not seem to crash anymore. (I seemed to be getting ever-increasing 'reboots' with the previous 1.x OS.) Also, Apple gradually had been reducing the price of the upgrades, with the 3.x upgrade going for only $5. Since I had $9 left on an iTunes gift card, I thought I'd give it a shot, in hopes of reducing crashes (and getting apps.) The upgrade had its own issues, some of which I've described in my
adventures in extracting notes.db backups.
Music-wise, the one additional feature with the 3.X OS is the ability to quickly create 'on-the-fly' genius mixes from a given song. This can sometimes come in handy when you are in the mood for a certain musical fix, but haven't created a playlist for it.
What about as a PDA? Well, the iPod touch does have wireless access. The mail application is good (and even allows downloading yahoo mail.) The Safari web browser allows surfing regular web sites - as long as they don't use flash. Some youtube videos can also be watched through a tool. A big problem is the lack of a flash plugin. Apple seems to be against it, so it probably wont happen soon. Typing is not that bad, but not that great. It would be nice if you could use a stylus. However, you can get a pretty decent 'blackberry' like thumbing on the touch screen. Wifi does seem to be a bigger drain on batteries, so I often turn it off if I don't need it.
Apps? There are a huge number of apps in the app store. However, finding worthwhile ones can be a challenge. I've found some language study and ebook applications that are worthwhile. However, I tend to use the 'notes' application for jotting down notes more often than other applications. Many of the apps I've found would clearly go in the 'junk' category.
Video watching is ok. However, it really only works for shorts. (It gets annoying holding up a small screen with headphones for long shows.) Video also seems to drain the battery fairly fast.
Battery-life in general is quite good. Even after nearly two years it seems to work fairly well.
Overall, its a halfway-decent mp3 player combined with a halfway-decent PDA.
Monday, January 25, 2010
Foreigners running the city
Sunnyvale has an entrenched 'professional' staff. Some live in the city, but many live far away. Some city employees even intentionally seek out housing outside the city to avoid a potential "conflict of interest". Unfortunately, this also reduces the "shared interests" of actual residents of a city. Thus we end up with cases like the staff recommendations on study issues. Some examples:
Out of 17 public works study issues, staff was in favor of 2, "plastic bag ban" and "guided bicycle routes through neighborhoods". The city bicycle/pedestrian commission ranked 6 study issues as worthwhile. The bike routes did not make the cut. While rejecting or ignoring the preferred plans of the BPAC, staff is more than happy to favor devoting 120 hours for guided neighborhood bicycle routes. This is just three weeks work, and does actually provide some benefit (if implemented), so it is not all that bad.
The plastic bag ban is bad. It was encouraged by the county government association. Staff estimate it will take 510 staff hours for this study issue. Why there may be plenty of arguments for and against a bag ban, spending time studying it now is mere waste. San Jose is in the midst of preparing an EIR on a bag-ban ordinance that is set to start in 2011 at the earliest. Palo Alto and other bay area cities already have bans. Why spend time rushing and studying? Sunnyvale is clearly not the innovator in this issue. Trying to spend so much time "studying" it will either replicate other work, or lead to another 'different' ordinance. If you are going to be a follower, do it right. Or better yet, just wait. With a number of bay area cities already enacting bans, chain retailers will likely just follow the same policies through the region. This gives Sunnyvale the benefits with almost no cost.
While staff is interested in spending hours pioneering for plastic bags, they have no interest in pioneering for livability. With many of the BPAC requests, the response is "oh, we follow some standards. We don't see any point in making them better." One study issue simply asks staff to share its criteria with the BPAC. Staff rejected it, saying they planned on sharing. (I think the point was that they had not. Otherwise, the BPAC would not have need of a study issue.)
Staff also believes that Sunnyvale of today is exactly the same as Sunnyvale of 12 years ago. (They reject an issue to improve the Homestead bike lane because it had been studied before in 1998, back when some of those Homestead High students now using it were still in diapers.)
Tuesday, January 19, 2010
A few recent books: Crude World, The Google Story, AC/DC: The Savage Tale of the First Standards War, Misquoting Jesus, The Kite Rider, My Life as a 10 year old Boy, Europe's Last Summer, Red Mutiny, The End of Poverty Economics, Harry Potter
Vise - The Google Story (2005). A history of Google, without much content. Some of the anecdotes from "Google users" seem funny. (What next, a history of Xerox, with interviews with xerox users?)
Bernstein - Splendid Exchange: How Trade Shaped the World.(2008) Great world history book from the viewpoint of trade. It is interesting to see Venice actually take its place as an important player in world history. The Arabs actually get a big chunk of the coverage earlier in the book, for they were the ones that were doing most of the international trading.
Tom McNichol - AC/DC: The Savage Tale of the First Standards War. (2006) The author wants to display electricty as a brutal standards war, but seems to build things up more than his facts justify. The experiments down by Brown, however do seem to justify the "savage" title. Now I'm interested in reading more about Edison and Tesla. What would have happened if the car started was not invented? Would we have had battery cars and dense cities instead of suburbia?
Ehrman - Misquoting Jesus. (2005) An introduction to "Textual Criticism" for analyzing ancient texts. It seemed a lot like a lecture at Stanford. Hmm.. Same author, same title. I get it now. Anyway, it has some interesting bits on the ancient history of the New Testament and how it has been passed won through the ages. However, the primary focus is on explaining how researches look at texts rather than explaining details.
McCaughrean - The Kite Rider. (2001) This is a fairly entertaining novel with a bunch of modern people hanging out with Kublai Khan. Alright, they are all supposed to be leaving a thousand years ago, but they seem more like modern characters with a few tidbits of ancient China thrown in. Luckily, that does not district too much from an entertaining novel.
Nancy Cartwright - My Life as a 10 year old Boy. (2000) The voice of Bart Simpson. Light reading.
Fromkim - Europe's Last Summer. (2004) So it may have been a little more than the funny that Started World War I. The author shows a bureaucratic Austria-Hungary that was itching for any excuse to attack Serbia, along with a Germany that was looking for any excuse to attack France. And what do they end up with? A war with Russia.
Neal Bascomb - Red Mutiny. (2007) A compelling history of the Battleship Potemkin. Brings about a few "What Ifs?" that could have significantly changed Russian History.
Sachs - The End of Poverty Economics. (2005) He is gung-ho on using foreign aid to bootstrap 3rd world countries in to the modern age. However, is it a wise move to saddle them with the 1st world's problems as well?
Rowling - Harry Potter.(1997-2007) The first few books are fast paced adventures. The middle books bog down and could really use some editing. Then the last two books get back on track again.
Monday, January 18, 2010
Gift Cards Are Evil
When you give a gift, you can spend time buying or creating a gift that you think somebody will enjoy. With gifts, the value cash value is typically hidden. An alternate is to give cash. This approach gives the giftee flexibility to purchase what they desire. However, it also gives them the burden of shopping to obtain the gift. It also puts the value out front. The receiver of the gift is free to buy what they choose, or simply use the money for everyday purchases.
Then there is the third way. Gift Cards. This combines the worst of both types of gifts. Like a cash gift, it says "I didn't want to pick something for you, so I'll just give you money to buy something yourself." However, as with a gift, it locks somebody in to something particular. (In this case, a specific store, or even a specific card.) A gift card is also something else for somebody to keep track of.
The perceived advantage of a gift card is that it "shows" some thought by picking somebody's favorite store, while letting them buy what they want. However, if this is the desire, why not actually buy something at the store and give a gift receipt? If the store has a good return policy, they an return it and get the item of their choice (or even cash). If they actually like what they received, then you have saved them the effort of buying something themselves. If they don't like it, they end up making the same trip they would have made anyway. [ok, online is different - but many places also allow easy online returns.]
There are also the negative aspects of gift cards themselves. Some gift cards have fees and expiration dates. Luckily, these are becoming more rare. Gift cards also have amounts that rarely exactly match actual costs of goods. Thus, a recipient maximizing value is often stuck forking over some of their own money or leaving money on the card (unless they get close enough to the value.) Gift cards require recipients to actually keep track of the card and keep it with them when they shop. Even 'credit card' gift cards have to be kept track of. What good does a wallet full of gift cards do?
Thursday, January 14, 2010
College Admissions Selectivity Challenge
What does it mean?
Not much.
A few hundred years ago, a degree from Harvard was probably about as valuable as it is today. Back then, it indicated you were one of the few that actually had a college education (in a day when even a high school education was rare.) Today, the degree indicates you were able to attend one of the most selective colleges in the nation. Having the equivalent of an associates degree in 1810 would have been quite an accomplishment. Today, it might be the difference between upper lower class and lower middle class.
An explosion of post high school opportunities simply means that more education has become a 'requirement' for gainful employment. A few hundred years ago, an illiterate farmer could be 'middle class'. Fifty years ago, you would need at least a high school diploma. Now, some college level education is all but required.
So, yes, you could argue that it is much easier to access a college education now than it was 50 years ago. But, that is comparing apples to oranges. A more appropriate comparison would be between a high school education 50 years ago and a college education today. After all, both could get you to the 'median income'.
Another flaw comes in attempting to compare selectivity of colleges over a large time frame. A large University may have been a small junior college 50 years ago. Is there any relevance in comparing admissions across two totally different institutions?
Today, the most selective colleges tend to produce the highest paid and most influential graduates. The increasing selectivity is thus a significant concern. Arbitrary decisions by an admissions office could have significant impact on students' futures. Looking at overall access to education is of little use without looking at the value of this education.
Stanford Daily Article:
http://www.stanforddaily.com/cgi-bin/?p=1037005
Monday, January 04, 2010
Grading the Mountain West and WAC bowls
The WAC, on the other hand, would be best off sticking to the state of Idaho. Both Idaho and Boise State had nice victories, almost compensating for the ugly losses by Nevada and Fresno State.
Wyoming: A+ (35-28 vs. Fresno State )
Fresno State: D-
An overtime thriller by a 5th place Mountain West team - a team that barely squeaked in to a bowl game. Fresno State is a quality team that almost always has a winning season in spite of one of the toughest non-conference schedules in the country. Wyoming? During the regular season, they were outscored 193-327. The only team with a winning record they beat was 7-5 Weber State (a I-AA team). This is the type of team you'd expect to be happy to get blown away at a bowl game. Instead, they manage to fight out a win. This is perhaps the best statement for depth that the Mountain West can make.
Air Force: A+ (47-20 vs. Houston) Houston has 10 wins, including victories over three BCS conference teams. Houston's victories were not over cupcakes: four of the teams they beat were playing in bowls. The three loses were all close. Air Force had only managed to beat one bowl team (Wyoming). Houston and Air Force had met two times last season (including the Armed Forces bowl last season.) Both teams were familiar with each other and familiar with the bowl. It seemed that Houston would have cake walk. Instead, Air Force blew them away. The Mountain West has four power teams.
BYU: A (44-20 vs. Oregon State) Perhaps BYU should sell Las Vegas bowl tickets as part of the season ticket package. It seems that no matter where they finish in the conference, they end up in Vegas. Oregon State was probably disappointed to miss out on the rose bowl and a little unfamiliar with Vegas in December. However, that is not an excuse for getting blown away. BYU showed that it is a power school.
Utah: A (37-27 vs Cal) Due to television-induced scheduling weirdness, Cal played Washington the week after the "Big Game" with Stanford. Thus they followed up a great rivalry victory with an ugly loss. Utah also ended the season with a rivalry loss. After last season's Sugar Bowl victory, Utah had high hopes, until the early season loss to Oregon smashed them. After starting out strong this season, Cal also had high hopes - until an early season loss to Oregon smashed them. In the end Utah was able to stay a little more focused and continue their nine game bowl victory streak (tying them with USC for most in a row)
Boise State: B+ (17-10)
TCU: C
Neither team looked great on the big stage. Boise State now matched Utah's two wins in BCS bowls. TCU goes home with yet another "might have been" season. It's unfortunate that they didn't get a chance to take on Florida and Cincinnati. I guess the powers that be figured Boise State would be the best way to stop the Mountain West bowl streak. These were two closely matched teams, with a close score,so it is hard to penalize either too much. However, TCU was the strong favorite. Perhaps this will be the impetus to add Boise to the Mountain West. The Fiesta bowl may also think twice about inviting two non-BCS schools.
Idaho (43-32 vs. Bowling Green): A. Coming from the dregs of the WAC to pull off their second bowl win ever. Perhaps the Pac-10 will invite Idaho back. Well, at least the on-off rivalry with Washington State will no longer look like a high school game. This looked like the feel-good season turn around bowl victory - until it was eclipsed by another game involving a WAC team.
Nevada (10-45 vs SMU): F. Nevada was supposed to be a good team. SMU managed a great turn-around, going from two victories in the last two seasons to a bowl game this season. However, they also managed to lose to Washington State. Nobody loses to Washington State. But, they managed to bask in the sun in Hawaii. Perhaps the Hawaii band-members that Nevada recruited were really June Jones turncoats. Or maybe we can just blame injuries. Regardless of the blame, Nevada simply embarrassed itself.
Grading the Pac-10 bowl performances.
UCLA: A. (30-21 vs. Temple) The Pac-10 was arguable one of the top two BCS conferences during the regular season. Temple finished second in their division in the non-BCS Conference USA and hasn't been to a bowl in 30 years. How can this be the best win of the PAC-10? Well, UCLA hasn't been to a bowl in a few years. And they were playing in a cold east coast stadium, just down the road from Temple. But most important of all, UCLA won.
USC: B. (24-13 vs. Boston College) USC won a bowl game. Yep, they did. They played in California, and beat some team that traveled a few thousand miles to get there. The difference was that they played an ACC team in San Francisco instead of a Big-10 in Pasadena. They didn't look great, but a win is a win.
Stanford: C (27-31 vs. Oklahoma) Stanford kept it close. Unfortunately, Stanford hasn't exactly been good in close games. Other than Notre Dame, all games decided by less than a touchdown ended up loses for the Cardinal. Oklahoma and Stanford were both missing their star quarterbacks. However, Oklahoma had at least had a season to deal with it. Stanford has just had the past few weeks to adapt to the replacement. Would Luck have allowed them to score an extra touchdown? Probably.
California: C- (27-37 vs. Utah) Cal has been hit or miss all season. (And as pretty during the entire Tedford era.) Utah was ranked higher, but they have beaten pretty much nobody. Both teams lost to Oregon. Both are coming of nasty loses to end the season. (Though Cal did manage to win the rivalry Big Game in the penultimate game.) It looked like the 'good Cal' was there during the first quarter. Unfortunately, the Bad Cal showed up for the rest of the game.
Oregon State: D (20-44 vs. BYU) Both teams were in the top-20. BYU was one spot ahead of OSU. However, OSU was, for some reason, favored to win. Perhaps oddsmakers did not realize that BYU has played in the Las Vegas bowl for the last five seasons, and thus has a little experience dealing with the horrid late December weather in Las Vegas. Perhaps they didn't realize that OSU would be coming off a downer after missing out on the Rose bowl by less than a touchdown. Regardless, Oregon State looked bad in the loss.
Arizona: F (0-33 vs. Nebraska). Nebraska was ranked a couple of spots higher. That should imply a close game, not a blowout. Unfortunately, it seemed as if Arizona simply forgot to show up. The Nebraska offense only scored more points against the likes of Arkansas State, Louisiana -Lafayette and Florida Atlantic. Even three-win Colorado managed a much closer game. Maybe San Diego was a little too exciting for the Wildcats.
Oregon: F (17-26 vs. Ohio State). The Big 10 always loses the Rose Bowl. Ohio State always loses its bowl games. Oregon and Ohio State had two common opponents. Oregon beat Purdue by two and USC by 27. Ohio State lost to Purdue by eight and USC by three. Both teams had not been to the Rose Bowl in a while, but playing in BSC bowls is routine for Ohio State, while Oregon is much more hungry for a big bowl. All signs should point to an easy Oregon win. They deserve in F for the faceplant on the big stage.
Wednesday, December 23, 2009
New Web Site
Sunday, December 06, 2009
Who should play in the BCS championship?
One simple way of determining the best teams is to look at who they beat. In this7 way, I've grouped the opponents in to "great teams" (10+ wins), good teams (8+ wins) and winning teams (any teams with a winning record.) I rank the teams by the number of wins in each, giving 5 points for first, 4 for second and so forth. Then the teams with the best counts are the most deserving of the championship. If there is a tie, close games (wins by less than a touchdown) and IAA games are excluded.
By this criteria, Alabama comes out clearly on top. They have a victory over the lone one-loss team. They also have the most victories over winning teams. Somewhat surprisingly, Boise State comes in second. They have a respectable number of victories over winning teams, with no close calls. They also own the victory over the current top-ranked two-loss team (Oregon).
While simplistic (by for example, not including opponents strength of schedule) , this analysis does show Alabama as clearly deserving a spot in the championship game. The second spot, however, could fairly easily belong to any of the other undefeated teams, with Boise State actually appearing the most deserving.
10+ win teams:
1. Alabama: 1
1. Boise: 1
1. TCU: 1
0. Texas: 0
0. Cincinnati: 0
8+ win teams:
1. Texas: 5 (4)
2. Cincinnati 5 (3)
3. Alabama: 4
4. Boise: 3
5. TCU: 3 (2)
Winning teams:
1. Alabama: 10(7)
2. Cincinnati 7(4)
3. Boise: 6(5)
4. Texas: 6(4)
5. TCU: 6(3)
Alabama: 13
Boise: 10
Cincinnati: 8
TCU: 7
Texas: 7
Texas
9-3
9-4*
8-4
8-4
8-4
7-5*
6-6
6-6
6-6
5-7
4-8
4-8
3-9
Boise
10-2
8-4
8-4
7-5
7-5
6-6
6-5x
5-7
4-8
4-8
3-10
2-10
1-11
TCU
10-2
9-3
8-5*
7-5
7-5*
7-4x
6-6
5-7
4-8
3-9
3-9
1-11
Cincinnati
9-3*
9-3*
8-4
8-4
8-4
7-5
7-5*
4-8
4-8
3-9
2-9x
1-11
Alabama
12-1
9-3
9-3
8-4
7-5
7-5*
7-5*
7-5
7-5
6-5x
5-7
3-9
2-10
* - close game (win by less than one touchdown)
x - IAA team
Tuesday, December 01, 2009
The PAC-10 gets no respect
Top 2 loss team: Oregon #7 - computer ranking: #7
Top 4 loss team: Stanford #24 - computer ranking: #22
Third, 5th and 6th 3 loss teams: #16 Oregon State - computer ranking: #15
#18 USC - computer ranking: #12
#19 California - computer ranking #17
Why would the human rankings be so much lower? Well, the computer rankings can only take in to account wins and losses, not margin of victory or any other factors. So, logic would seem to say that these teams have eaked out sloppy victories, while getting blown out in the losses. However, it appears the opposite is true.
We can look at Stanford. With Stanford, the only game that was not 'winable' within the final minutes was the Oregon State game - and that was only a 10 point loss. The closest win was the 7 point win over Notre Dame. All the other wins were well out of the opponents reach in the final minutes. (The Notre Dame game, however, is actually a good sign, in that it shows Stanford has finally been able to win the close game.) Against teams that were ranked at the time they played Stanford, the Cardinal is 3-0, with an average margin of victory of 21 points.
Sat, Sep 5 at Washington State W 39-13 -- +26
Sat, Sep 12 at Wake Forest L 17-24 -- -7
Sat, Sep 19 San Jose State W 42-17 -- +25
Sat, Sep 26 (24) Washington W 34-14 -- +20
Sat, Oct 3 UCLA W 24-16 -- +8
Sat, Oct 10 at Oregon State L 28-38 -- -10
Sat, Oct 17 at Arizona L 38-43 -- -5
Sat, Oct 24 Arizona State W 33-14 -- +19
Sat, Nov 7 (7) Oregon W 51-42 -- +9
Sat, Nov 14 at (11) USC W 55-21 -- +34
Sat, Nov 21 California L 28-34 -- -6
Sat, Nov 28 Notre Dame W 45-38 +7
For the rest of the Pac-10 teams, they have also played significant numbers of teams that were ranked at the time they played. USC has played five teams, Oregon 4, and the others 3.
Oregon State vs rated: 1-2: -10,-6, +17; avg: 0
USC vs rated: 3-2: +3,+27,+7,-27,-34; avg: -5
Oregon vs rated: 2-2: -11,+7,+39,+27; avg: +15
Cal vs. rated: 2-1: -27,+8,+6; avg: -4
It's interesting to compare that to the 4 undefeated teams. Three of the four have only played one other ranked team. The two Texas schools have played two ranked teams. Alabama is the only school that has played a ranked team total similar to a 'average' ranked pac-10 team.
Florida: 1-0, +10
Alabama: 4-0: +10,+19,+14,+9; avg: +13
Texas: 2-0: +3,+27; avg: +15
TCU: 2-0: +31, +27; avg: +29
Cincinnati: 1-0: +17
Boise State: 1-0: +11
Interestingly, for the 3-loss teams ranked higher than pac-10 teams, the number of ranked teams looks similar to pac-10 schedules.
Virginia Tech vs rated 2-2 : -10, +1, +24, -5, avg: +2.5
LSU vs. rated: 1-2: +7,-10,-9, avg: -4
It seems to say that the key to go undefeated is to play a cupcake schedule like Florida.
The pac-10 also has an extra "punishment" in that they play an extra conference game. Thus there are guaranteed to be an extra five loses floating around the conference. The teams are also required to play these teams with the extra loses. This would seem to hurt the computer rankings. Other conferences can pad their schedule, thus improving their records. Florida has the likes of FIU, Troy and Charleston Southern (all home games) to help. The only possible challenges are there conference games and their Florida State rivalry game. Stanford flew a few thousand miles away to play Wake Forest. They also had a home game against Notre Dame. The only 'easy' game was a regular crosstown game against San Jose State. SJSU was also USC's lone 'easy game'. The other nonconference games were the Notre Dame rivalry game and Ohio State.
Oregon's 'easy' game was against Purdue - a Big-10 team that beat Ohio State. The other nonconference games were against Boise State and Utah, two teams that went undefeated during the previous regular season. So much for a cupcake.
Cal and Oregon State are the only teams with bona-fide IAA cupcakes in Eastern Washington and Portland State. Cal's other games were against Minnesota and Maryland, while Oregon State had UNLV and Cincy. (Cincinnati is obviously a power team this season. Minnesota is bowl bound, UNLV and Maryland are weaker, but UNLV did get 5 wins and Maryland did manage to beat an ACC division champ.)
So if anything, the human voters should give extra consideration for cross-country flights, 'style-point wins' and a more brutal scheduling. But, instead they seem to penalize Pac-10 teams for being on the west coast. The same could go down to conferences. Only 1 of 3 western conferences are 'BCS', while 5 of 8 eastern conferences are in the 'BCS club.'
Balloon Dance
The German version is still my favorite, but I've also begun to appreciate Nena's English version. The Goldfinger and 7 Seconds versions do well on the "energy" side of things but lack the power of contrast as the original. Nena's new version with French is interesting. I can actually understand some of the lyrics. 99 in French can be quite wordy. The contrast of the harshness of the German language with the 'gentleness' of the singer's vocals only adds to the original's strength, though the German accent of the English version has some nice nuances.
Monday, October 19, 2009
Flexbuilder color HTML document generation with View Source
Finally after some googling, I uncovered a blog with instructions on how to do it. The source files are actually generated by clicking the "Enable view source" checkbox on the File-Export-Release Build menu. This will enable the source files to be produced. The warning message mentions that do to IE security the files will probably not work properly when accessed via localhost. I never tried IE, but did have trouble with the view source from Firefox. However, when I ran them from a server, all worked well.
From the localhost, I was able to view the color HTML source files directly by going directly to the files. On my installations, they are in ~/Documents/Flex Builder 3/project name/bin-release/srcview/src.
Getting Started in Flex
http://tourdeflex.adobe.com/eclipse
in the Help-Find and Install Updates-New External sites area of flexbuilder. From here, I was able to do File-New Flex Project and simply copy some of the simple .mxml example from Tour De Flex into the "Source" view and successfully run them by using Run-Debug Sample project (or the icon.) For Eclipse users this should all be second nature. For people like me, who consider vi to be their preferred IDE, there was a short learning curve.
Monday, September 21, 2009
Monterey trip
The trip to Los Gatos was uneventful enough. Again, this year, I followed the signs to the Los Gatos Creek trail instead of taking the quick entrance on Santa Cruz. D'oh! Eventually I went through some alleyway over a few bridges, and finally on to the trail. The trail was one of the least fun parts. The crushed limestone gravel just slows things down, and I was unable to get traction to climb up some of the steep hills, thus I had to wheel my bike up. From there it was up around the reservoir on Alma Bridge (stopping at one little park with an outhouse), Old Santa Cruz and Summit, and then down San Jose Soquel. The climb is extremely nice - mostly shaded, not so steep that you need the lowest gear, but steep enough so you are not climbing forever. The pavement is also in great condition. The decent is also great. Smooth pavement, and just about the perfect mix of grade and turns to allow fast speed without much breaking. (The only downside was some tree work at the end of a downhill. The flagger even apologized for destroying my momentum.) There is a nice park near the bottom of the hill with water and a bathroom.
Then on to Soquel Road for a long haul. I saw a hole-in-the-wall donut shop somewhat near the community college, so I stopped in for an Apple Fritter. Yum. They didn't have much a of a selection, but the fritter was good.
Around Rio Del Mar, Soquel makes a curve, and I always seem to get confused. This time, I found myself on Huntington, and decided to continue on it. It has hardly any traffic, but some nice little hills. From there, it was a hop down Valencia to Freedom. I continued on Freedom to Watsonville. The first section of Freedom was mostly farmland (lots of apple orchards. (I recall passing a "martinelli" street.) Then it turns industrial, and the pavement becomes absolutely horrid. Eventually, I ended up in downtown Watsonville (and passed by a park with a water fountain) A couple metro buses follow this route, so it could provide an alternative.
From Watsonville, I went over the bridge to Pajaro, and then continued on Salinas and eventually to Elkhorne. This road has very little traffic, with some shaded sections and hills. It makes for a much more pleasant ride than Highway 1.
Then I got to Castroville. Or almost to Castroville. At 156, a sign said the right turn was towards 1 north. I thought that left must then lead to one south. Even the long wait for the left turn signal was not enough to convince me otherwise. After going for a little while, I had a hunch I was going in the wrong direction, but with it being around noon, I had a hard time judging by the sun (and my GPS was gone...) After a little while I was convinced it would be good to make the next right turn. Only problem, is there wasn't a right turn for 4 miles! Finally, I reached a right turn to 101 at Prunedale. I remember this place from the MST 55 bus, so I figured it was not the direction I wanted to go, but I could quickly take the first right to get back towards Castroville.
101 had a nice wide shoulder, and a couple traffic lanes, making it a somewhat more pleasant than 156. Part way down 101, a highway patrolman stopped me, and advised me not to ride on 101. I asked him if it was ok to ride there, and he said it was legal, but there were lots of large trucks and unlicensed drivers and it was dangerous. (Hmm, wouldn't the unlicensed drivers be on other roads, too? And there are plenty of large trucks moving at fast speeds on other roads - most with narrower shoulders.) However, I was clearly headed in the wrong direction, and wanted to get on to Monterey, so I asked him for the fastest way there. He pointed in the route that I was considering, back to Castroville. D'oh! (And his recomendations included a narrow road and then a high volume, high speed road with lots of trucks... Sigh)
So it was back down Blackie road to Castroville. Blackie has a little bit of shading. Which made it better than the heavily exposed other roads I was traveling...
Finally I end up on 183, and notice I'm heading towards Salinas... Again! D'oh! I see a turn off (Cooper) that seems vaguely familiar, and follow it down to Blanco. I remember that one from a previous trip back from Monterey. From there its on to Reservation and then Imjin. Then through CSU Monterey Bay and under Highway 1 to the bike path. I actually took a different underpass that took me to the 'empty' road on the beach side of the bike path. Its a little more pleasant, being a greater distance from the freeway.
I eventually made it there, 2 hours late and very sunburnt. D'oh! The 75 mile trip ended up being about 100 miles.
There was a professor (Stuart Kim) and one of his students that had also biked in. They went through Gilroy and over 152. When I went to my room, there was a do not disturb thing in the door. When I game back with my bike, one of the bikers appeared there. It turned out my roommate was in their same lab, and was letting them borrow the room to shower because her room was not ready yet. I finally had a nice shower and realized I was a little fried. The bathtub was also a slow drainer. D'oh. This room was not on the beach side, so I didn't have all the load beach waves at night... Instead there was highway noise.
The next day, I had visions of going down to Big Sur. However, it was a little further than I had anticipated, and I was a little slower than I hoped. I also got a little twisted up on the way to Carmel. Going down Highway 1 in to Carmel, I decided I would not repeat that route on the way back. (I had done that last year. It did not look like a fun hill to climb, especially with rush hour traffic.)
Highway 1 south of Carmel was uninspiring. The heavy traffic made it loud, and the mixture of wind and hills made for a challenging bike ride. Perhaps the greatest challenge was the fact that it was an 'out and back' route. There was no other road to turn on to make a loop back. I would just be going on the same road that I took there. And the scenery was just cliffs, hills and beaches. It started to get old.
So, around mile marking 62 (Rocky Point restaurant), I turned around to head back. There I realized that the bits were I seemed to be making good speed were really due to a tailwind. D'oh! That left me with a nice headwind going back.
Near the turnaround, there were a group of beachfront estates - it looked like everyone was for sale - for about $6 million dollars. The multimillion dollar homes in Carmel Highlands looked a little more appealing, but I think I would pass on the beach view... Just a little too loud for my tastes.
On the way back, I went by Carmel's beach, through Pebble Beach, and around the end of the '1X' bus route only the coast and eventually to the bike path. With all the detours, the total trip was somewhere in the 40-50 mile range.
For the trip home, I decided to try to be as direct as possible. But things can sometimes get in the way. I took the Bike Path, then continued on to Del Monte. Near Marina, I really had to go to the bathroom, I jumped over the railroad tracks to Marina Library. Then I got twisted up, going out to the Reservation beach before eventually finding my way back to Del Monte/Monte. Then it was on to Castroville via a road and bike path that connects Nashua to Merrit. I tried to hunt again for a public facility, but I just seemed to see industrial areas. Castroville also seemed rather small for the population figure given. Finally I crossed the highway and found the "artichoke capitol" (75% of the US artichokes come from here according to wikipedia). I eventually found the Castroville library - had to ask for a restroom key ("due to vandalism").
From there I continued on Merrit Street, which eventually came to 1. This section of Highway 1 is not horrid, but not fun. It is loud with a lot of traffic, and it goes close to the coast, making for lots of wind.
Shortly before reaching Jensen, I noticed a lull in traffic, and thought I might try to make a left turn to go through the strawberry fields. However, when I got closer, there was a steady stream of traffic, so I decided to continue onward. Then the road became a freeway, with a bikes must exit sign. (I never understand why they make bikes exit when it becomes a freeway - this seems to make it safer for bikes. The traffic splits in to two lanes and the shoulder gets wider. And exits are to the right rather than forcing left turns. Oh well.)
I noticed some "Pacific Coast Bike Route" signs, so I attempted to follow them. This directed me down Salinas Rd. Then a sign
pointed left, so I dutifully turned left at the next intersection - which turned out a private road for a couple businesses. Then I realized it was pointing to the next street, so I eventually made it to the right location, and kept going down Salinas as directed. This lead me through downtown Watsonville, but then the signs seem to have failed me. I continued going straight on the road. But eventually it forked, without a sign.
I continued on Main Street. But, eventually, it entered the freeway. So I followed along the parallel road (westgate). It eventually turned in to Larkin Valley. This is a nice road with rolling hills and very little traffic (but also very little tree cover) Eventually it crossed over Highway 1, and became San Andreas. And right afterwards, it intersected with Bonita, where I found the trusty "Pacific Coast Bike Route" sign again. This lead a short bit down Bonita to Freedom and back to Soquel. Then I continued down Soquel to Porter which becomes San Jose Soquel. I stopped at the park there to 'refuel' for the trip up the hill.
San Jose Soquel seems much longer on the way up than the way down. It really does go past the 10 mile marker. There were hardly any cars going in my direction, but a decent number going the other way (early commuters heading back home?) I had managed to break out a nice sweat by then. Once I started going down the summit, the temperature jumped up noticeably.
This time, I decided to go down Old Santa Cruz Highway all the way (instead of Aldercroft Heights.) It was a fairly nice decent. Good pavement, hardly any traffic. I noticed a VTA bus just ahead of me on summit. I thought I would have a chance to outrun it, but some of the intermediate hills did me in. On the way down, I found myself breaking a little more than San Jose Soquel - partly due to the sun (I just couldn't make out the road.) I road on the shoulder of 17 for the brief bit between the end of Old Santa Cruz and Aldercroft Heights. The shoulder has a few real bad patches there. But, there is still plenty of room. And the rightmost lane is actually an 'exit' lane, so there is plenty of buffer.
After jumping on the Los Gatos Creek trail, I had wished I just stayed on 17 to Los Gatos. To get to the trail, first you have to go down a steep gravel hill. I tried riding, but eventually walked down it. Then up a hill, then down a hill. All pretty much need to be walked, unless you are good with a mountain bike. Yuck.
From there, it was the direct route down Santa Cruz to Highway 9. I had planned on continuing down Saratoga-San Jose to Prospect. However, I got a red light at Pierce, with another car in the left turn lane, so I decided to take that shortcut through the Prospect. I found the right streets, with only one little detour (through a "no outlet" sign I didn't trust, which ended up being true.)
I had already gone through all my water, so just decided to zoom towards home. Eventually made it there, and quickly guzzled the two water bottles that I had forgotten (somebody had placed them in the fridge.)
Trip there was a little before 7 am to 3pm. Trip back was between 10:30-11am to 5:30-6:00pm.
As for the Genetics conference, the talk I found the most interesting was on "barcoding". The goal is to allow quick, cheap tests to determine the identity of species of plants and animals based on a quick DNA sample. The tests have already been used for identifying new species among similar animals in Costa Rica. The speaker envisioned a $2.50 device that would allow for identification, along with a 'tax' that would help support the scientific research and classification. (Somehow, I see the $2.50 device much more likely than the research tax.)
There was also an interesting panel on consumer genetics companies. Should people have access to their genetic information, and what are the consequences. Will some of these super cheep sequencing technologies come aboard? (And not discussed - will this amount to anything? Or will we discover that were missing some other huge aspect of the genetic system?)
View Larger Map
Friday, September 11, 2009
Stolen Garmin Forerunner GPS watch
racquetball gear in to the locker room with me. I didn't want to risk
any of it getting stolen. However, I gradually started to let my guard
down. First I'd leave the racquet in the pannier. Then the balls,
goggles and gloves would begin to stay there also. And today, I made
the ultimate faux-pax: I left my Garmin Forerunner 305 GPS watch in there.
I even saw it there and thought, "I should really bring that in with me."
"Nah, it will only be a few minutes. It will be fine."
"Well, ok. But let me move some of these bags on top of the stuff just
to be safe."
Well, somebody may have seen me move the stuff, or they may just have
thought that a full pannier was worth rifling through. When I came out,
there were a few bags on the ground, as well as an inner-tube box. The
balls, gloves and racquets were still there - as well as the pluot book
that I need to return.
But no watch. And no innertube. (And I would later realize, no goggles).
At first I thought it might have been some animal that happened to grab
some stuff. (After all, who would still an innertube while leaving the
handball/racqetball equipment?) So, I took a look around the area for
any sign of animals. Also checked the garbage cans, just in case
somebody just grabbed it and tossed it. No dice. So, off to file a
police report.
Perhaps even more unsettling was the fact that I had not downloaded data
for the past few days - even charging it up for the past few times
without doing a download.
Whoever has it also wont get much use out of it - after all, they don't
have a charger. They may be able to use it for a dozen hours, and then
the batteries will be dead, and they'll probably toss it. The goggles
may have a little more value. The innertube? Now that is really
baffling. Why would somebody rifle through a saddlebag, through some
plastic bags on the ground and take an innertube out of a box and run
off with it?
On the positive side, I have been trying to dejunk. This is one less
thing I will need to keep track of. And now I need to start being more
careful with my stuff.
Quick bike turn at home
drop off the triple, pick up my bike, and bike in to work. I had been
attempting to analyze it, saying that, in theory it could be a route
taken directly to get from the school to work... Alright, there is a
little detour, but not much.
Well, today, I was waiting with another cyclist at a red light at
Stelling and Stevens Creek. I passed her on Stelling. Then after going
home and changing out the bikes, I ended up passing her again on Fremont
between Wright and Bernardo.
I guess it really isn't too much of a detour.
Friday, September 04, 2009
Rural vs. Urban
El Camino is the quintessential urban route. There are plenty of lights, but they tend to be rather short. There is also the constant stimulus of traffic, businesses and the like.
Foothill has a very rural feel. Built in the location of a former railroad, it seems to be mostly surrounded by trees. Intersections are fewer, but the lights cycles tend to be longer. Most intersections also seem to be "small towns" (many former railroad stops.)
It is nice to be able to switch from city to country without significantly impacting commute distance or time.
There are also other alternatives, like caltrain, that can take about the same time. as well as Alma/Central or Park/Evelyn that parallel the caltrain tracks and may take only a little longer.
Why I don't work in Sunnyvale...
Wrong.
It may have been a lower traffic way than Mathilda, but the stress of traffic was replaced by the stress of poor design. At the Smart station, the first obvious problem with the lack of a signal that was tripped by bikes. (The other side of the intersection had nice embossed bike markings. Not so for the southbound side.) Ok. No big deal. There was a ped button nearby, and the signal was fairly quick. Going down Borregas there were a couple large tree branches in the bike lane. Annoying, but there was little traffic.
Finally the first bike bridge. Rather than a straight bridge over the freeway, they created a massive curve. This results in an offset entrance perpendicular to Borregas (and slightly offset from the street.) Luckily Moffett Park Blvd. was fairly low traffic in the area. Still, getting on was not the most low stress maneuver. The long curve over the freeway also means that you are exposed to the maximum amount of freeway noise. The exit on the other end was similar. Why not just extend the bridge straight and have at end a little further down the block? It may have caused the elimination of a couple (unused) street parking spaces. Horrors.
However, Sunnyvale seemed to like the design, and the next bridge suffered from similar problems.
Borregas itself was not too bad. There were few stop signs or stop lights. However, it was built to "Sunnyvale road standards", meaning it was about as smooth as sandpaper. One section was even recently repaved (or maybe 'blackened' would be more accurate. We should really pitch in and get Sunnyvale a good roller.)
The Maude/Borregas/Sunnyvale intersection is the next bit of fun. Borregas and Sunnyvale are slightly offset, making it an interesting left turn maneuver. It's not incredibly challenging, but it does slow you down a bit. From Sunnyvale, you have an overpass over Central and then a grade crossing over caltrain. Then you can sneak under the Mathilda overpass to get to Pastoria and Hollenbeck.
In theory, the Borregas way avoids most of the nasty intersections. However, most of its problems are structural in nature (thus little hope of fast trips). It took me 35 minutes from the Smart Station, and that was with a fairly quick run down Hollenbeck. I could probably go a little faster down some stretches of Borregas. But, would then be slowed down by the bridges. From some the office parks, there would also be some of the other nasty crossings (like Mathilda/Carribean and Java.) I think I would just stick with Mathilda.
But, Carribean has its own problems - lights. At Moffet Park and Mathilda, the light is not well synched with the others and too quick. The result is that Mathilda and turning traffic blocks the intersection, making it impossible for through Mofett Park traffic to move. The signal changes so fast that it turns red before the intersection clears. (Perhaps the city should try to balance its budget by handing out tickets to cars blocking the intersection.)
Other lights seem to suffer from the opposite problem. Java and Caribbean/Mathilda seemed to be red forever, with a few random railroad crossing bells thrown in for good measure (only one that was actually accompanied by a light-rail train.)
The density of office development would seem to be the ideal for setting up transit. If only... Instead it is the ideal area for huge ugly traffic jams. (And the poor configuration and frequency of the light rail seems to guarantee that it will only be lightly used.) But, hey, what do you expect from a Sunnyvale?
Tuesday, August 18, 2009
Residential parking?
If the city is willing to spend the money to post signs giving these residents semi-private use of previous public parking, why is it also requiring them to have devote much of their lot to providing additional parking for cars? And furthermore, if street parking is so important, why does it let developers rip out street parking to add multiple private driveways (often leading to private roads with no street parking.)
It probably just comes down to a hidden method of discrimination. Require excessive space devoted to non-living areas, thus keeping property values high. Then donate those 'public' resources in the area to the local residents. In order to not appear too callous, funds can be allocated to subsidized housing. However, these are often kept away from the monolithic single family areas (often in isolated new developments disconnected from most public amenities.) The city also gets to serve as a gatekeeper, allowing it to enforce some restriction of access.
Removing parking requirements and regulations would be the free market solution to obtaining the proper allocation of parking space. However, that would hurt some of the 'sinister' motives in parking policy. Thus we are left with pockets of parking shortages, even while having a huge glut of parking spaces in the city.
keyboard shortcuts
Apple-tab switches between programs
Apple-tilde switches between windows of the same program
Apple-Q closes a program
Apple-W closes one window (or tab) of a program
If you take a look at the keyboard, you'll notice that they are all
right next together. A slight slip of the finger, and instead of
switching between programs, you'll be closing them. (But at least when
the old when is closed, you'll be 'switched' to the other program...)
Thursday, August 06, 2009
Bus ride to Monterey
How tempting. We could easily get to Santa Cruz, San Francisco or Monterey - all free with the Ecopass and Go pass. We stuck with our original plans of going down to the Aquarium. We had just enough time to hit the restroom, and then head back out to the bus.
The bus was surprising empty. There were also very few people that got on at any of the other stops. (I think there were a couple of people getting on at another stop in San Jose, and not much more than that.) It seems we got to each intermediate stop (Morgan Hill, Gilroy, Prunedale) well ahead of schedule, and had a lot of time to wait there. However, by the time we got closer to Monterey we were closer to schedule. (Perhaps the driver was just putting the pedal to the metal in order to get some quick breaks.)
The Monterey "transit center" is a simple plaza, near a Trader Joe's and a used book store. According to the MST website, the eco pass is good for local fare on all MST buses, so we tried to catch the next bus that came through, a little 1X bus. The bus driver had never seen it before, but let us on. The bus had a window in the back, and it was a quick trip to the aquarium.
The Aquarium was somewhat of a disappointment. It seemed half the displays were video monitors or other sorts of 'interactive' displays. No need to go to an aquarium for that. We had some guest passes to get in free, but otherwise, the admission price of about $30 is rather steep.
We were in time for the feeding of the penguins. I was expecting to see a punch of penguins diving in to the water to catch fish, but instead, we saw a few employees giving them some little fish. We did get to see some of the penguins 'greedy' behavior as they looked for the food, but we almost felt sorry for him.
There were a number of other sea creature exhibits. The most surprising for me was the seahorses exhibit - I thought they were much larger than the small creatures that they had on display. (Unfortunately, a lot of the exhibit was made up of video monitors.)
After going to the museum, we walked down Cannery Row. It is now a trendy yuppified shopping and dining area. However, it is ironically filled with banners containing quotes from Steinbeck's novel. (The same novel that centers around the lives of some homeless guys in a run down cannery row.)
After walking a bit, we found a falafel and hot dog vendor to grab some lunch, and then caught the "brown bus" back. The walk from the aquarium to downtown is around two miles, and it looks like it can be done mostly along the beach. However, we were intrigued by the free trolleys that run every 10 minutes during the summer. They make a loop from downtown to cannery row, stopping at all the tourist traps on the way.
We get off at Fisherman's Warf (which the automated announcement informed us was some good place to part with our money.) There was a plaza that was also some historical park (first capitol?) From there it was a short pleasant walk to the downtown bus station. We had some time to kill before the bus came, so we checked out the bookstore, Trader Joe's and pharmacy that were all right there.
The return bus actually originates at a different point downtown, and just stops at the transit center, so we had a little wait for it. MST also has a '22' bus that goes out to Big Sur. It would be an interesting trip to take the 55 from De Anza College to the the 22 down El Camino to the 55 to Monterey to the 22 to Big Sur... One long trip with the same bus numbers over and over.
The return bus was also fairly empty, though there were a few more people than the way out. MST has actually started a new bus primarily to serve the Presidio that also stop s downtown and provides a later trip back. (Around 5pm instead of the 3pm 55). It tends to be a little more direct, and comping the two, you could get to Monterey by around 10 and return at 5, allowing for a day trip. (Or if you are into early trips you can take the early trip in.)
The 55 buses may have been "dead head" buses. The bus we took to Monterey originated as the one bringing commuters from Monterey to San Jose, and the one we took back was getting ready to take them back home. Perhaps these buses are more popular than the ones we took.
The way home seemed to be better timed. There were no long waits at the intermediate stops. We got to San Jose in enough time to hit the restrooms and then catch the caltrain back home. Then we arrived just in time to catch the final bus home.
Thursday, June 04, 2009
More stupid car tricks
In Cupertino, I was waiting at a red light at Bollinger and De Anza. A car came next to me, slowed down, then plowed through the red light to cross 8 lanes of traffic. Luckily she didn't hit anyone else. Had she simply waited 5-10 seconds more, she could have gone through a green light.
On another section of De Anza, I saw a car come to the red light at Lazaneo and De Anza, stop for a bit, then make a left turn across the 8 lane street on De Anza. (Here it would have been about 30 seconds more waiting for a green.)
In Sunnyvale, at the The Dalles and Lewiston, the crosswalk is painted bright yellow, the word "STOP" has been been freshly painted on the ground, and the stop sign is plainly visible. All this didn't stop a car from zooming right through at speed that looked to be faster than the 25 mph speed limit.
These are just some of the really bad 'car tricks'. There are plenty more of the garden variety "going through a stop sign at 15 mph". (It's ok because they slowed down from 35 mph, right? Uh, even though it was a 25 mph zone.) And of course the 'left turn on stale green arrow'. (Though perhaps they just have lights timed badly to give opposing traffic a green light for 5 seconds before the arrow turns red.)
Sunday, May 24, 2009
Ruin of the Roman Empire
His central thesis appears to that Alexander blew the opportunity to create a great secular empire, and it was religion that really led to the final fall of Roman 'civilization'. However, the focus seems to be evolving over the course of the book. Early on, it seems to be more historical, with an attempt to more accurate assess the history of 'barbarian' rulers of Rome, without being blinded by the labels. (The barbarians were in fact often more 'civilized' than those that they replaced.) Early historical writers has colored the history with their worldview, and thus only be filtering out the view could an accurate history be obtained.
For the section on Justinian, however, he goes a step further, removing the ancient worldview and applying a modern "secular multicultural" filter. Justinian becomes a religious tyrant (perhaps part Bush, part bin Laden), who manged to destroy the harmony of a multicultural civilization by enforcing religious orthodoxy and going out on rampant wars of empire.) If only he wouldn't have let religious orthodoxy take over, there would be one great unified state of Romano-Persia. Unfortunately, this view assumes that humans would not find some way to disagree and cause conflict. In a small southern town, Baptists and Methodists could be at constant loggerheads. Move them to larger US city, and they are lumped as protestants vs. Catholics. Take all three to the middle east, and they are Christians vs. Islam. And perhaps even further all the groups could be together as "Abrahamic religions" vs. others. Remove religion and there are further avenues for tyranny. (Saddam Husein did manage to somewhat quell religious conflict with his hard hand.)
Overall, the book has an interesting look at the final destruction of Rome, with good stories of others that I have not seen covered in great detail. However, it could be significantly improved. It also spends a long time discussing the empowerment of Christianity as a state religion. However, it could use more focus. It would have been interesting to see more attention paid to the "evolution" of the Roman empire from Rome to Constantinople to the Ottoman Empire to World War I. (This was mentioned as an aside that the empire really didn't 'fall' until the first World Wat, as the Ottoman Empire did appear to be a legitimate successor.) The title implies the ruin of the Roman empire, though the book ends primarily with the Ruin of the city of Rome.
Wednesday, May 20, 2009
Changing html classes - poor IE performance
First you need to find the stylesheet:
var getStyleSheet = function() {
var ss = document.styleSheets;
for (i=0;i<ss.length;i++) {
var s = ss[i];
if ((s.href != null) && (s.href.indexOf('myStyleSheet.css') != -1)) {
return s;
}
}
return null;
}
The you need to find the appropriate rules. The only catch: Internet Explorer does things wrong. So you have to go through a few tricks to get to the right place:
var getCssRules = function () {
if (g.cssRules != null) {
return g.cssRules;
}
var s = getStyleSheet();
if (s.rules) {
s = s.rules;
}
else {
s = s.cssRules;
}
g.cssRules = s;
return g.cssRules;
}
Once you find the appropriate rule, you need to set the appropriate value. Again, syntax is different:
var changeStyle = function(selector,key,val) {
for (i=0;i<rules.length;i++) {
if (rules[i].selectorText == selector) {
if (rules[0].style.setProperty) {
rules[i].style.setProperty(key,val,null);
}
else {
// IE
rules[i].style[key] = val;
}
return;
}
}
}
All seems well and good. It works for IE, Safari and Firefox. In Safari, it runs at lightning speed. In Firefox, it is fast. But IE? Well, IE takes its time. If it is setting the rule to the same value, then it is zippy. However, setting to a new value can take nearly forever (from times in milliseconds to seconds).
The alternative is to simply find all the elements in the document and manually change them. I use Robert Nyman's getelementsbyclassname, though many other js libraries have similar functions (and the newest firefox has it natively, but that doesn't help much for IE issues.)
This method seems to slow down Safari in updates (but somewhat speed it up in creating new rules.) However, it does significantly speed up IE, and make it almost competitive with other browsers. Since elements and a container can be specified it is also easier to narrow it down to a specific section of the document, thereby improving performance.
var changeStyle = function(selector,val) {
selector = selector.substring(1);
var elements = getElementsByClassName(selector,'tr',document.getElementById('containerelement'));
for (el in elements) {
elements[el].style.display=val;
}
}
Friday, April 03, 2009
Hmm... I guess its the thought that counts?
LEED standards are another matter. There are obviously some objects to the standards from interested parties like the shopping center council. However, more injurious for the city is the lack of a 'big picture' view. A 3000 square foot McMansion that uses 20% less energy than other 3000 square foot McMansions seems like a good thing. However, compared to 3 1000 square foot townhomes that could occupy the same area and hold 3 times as many residents, it looks downright horrible. Its even worse when you consider that these McMansions will have large landscaped yards - which will be the source of most of the water use, and extensive energy used by the hired gardeners and their gas-powered leaf blowers. Perhaps the best benefit of the ordinance is that it allows 5% extra lot coverage for meeting the highest standards. At least its a start.