Preston L. Bannister { random memes }

2008.07.30

Presidential candidates at the local mega-church

Filed under: Politics — Preston @ 12:20 am

This is so very odd. Both presidential candidates are doing to appear, on the same day, at the same place, for the first time, within walking distance of my house.

Saddleback Civil Forum
This historic forum will be the only joint event for the two, and the last public appearance for either candidate prior to the two-week hiatus during each party’s national convention.

Due to Secret Service mandate, tickets will be required for the event in the main auditorium, but the program will be broadcast live in multiple venues on the Saddleback campus, as well as on several national broadcast networks and online. It will also be streamed live on www.SaddlebackCivilForum.com.

The local Saddleback Church is an argument for taxing “church” property. They rake in so much money that they can build the equivalent of a “church” Disneyland. With so much money coming to so few people – I suspect their owners are more interested in money than morality.

The odd bit here is that I like the idea of tax-exempt status for small churches. When wealth is not a reason to head a local church, I like the idea of making survival easier for local churches. About mega-churches and franchise operations disguised as churches, I have doubts.

I am an agnostic, which for me means I find religion a mostly-harmless fantasy practiced by others. About the larger forms of “religious” organizations … I have doubts. Doubt enough to suspect some of those larger outfits are the moral equivalent of evil.

Every Sunday they hold their sideshow, collect unholy amounts of money – and this is the first common place where the Presidential candidates are going to speak. Odd.

2008.07.29

Today’s surprise – applet reload does not sandbox

Filed under: Software, Web — Preston @ 11:06 pm

In retrospect I should not have been surprised – in either case.

Load an applet into Internet Explorer (version 7 in this case). Hit “refresh” on the page from which the applet was loaded. Some classes used by the applet have static initializers. Some of the static initializers start threads. The threads are part of a thread group associated with the first applet instance. On the first reload, all(?) the threads in the first applet’s group are terminated. Second instance of the applet does not start the background threads, since the classes (already) loaded think the background thread exists.

Right. Is this the right behavior? Sometimes. Maybe. My take? Not so much.

Should the state of a re-loaded web page (though applets) share state from the first load? Sometimes this is useful, but this always makes the programmer’s job more complicated. My preference – as with re-loaded server-side web application – would be to share nothing (by default).


On a related but distinct note – ran into a reason for Microsoft to improve the shitty garbage collection in their Javascript interpreter. My daughter provided the use-case. She is very fond of a site called “Horseland”. Her laptop (with 0.5GB memory) was running very slowly. Found Internet Explorer are using 1.3GB of memory. Clearly her favored site was using Javascript, but did not know how to avoid the problem with Javascript in Internet Explorer.

There are a lot of second or third tier web sites that lack the skill to work around the Microsoft Javascript problems. They are going to deploy sites (sometimes quite popular) that – over time – perform very poorly on Internet Explorer, and perform well on Firefox.

I had thought Microsoft was not likely to improve Javascript garbage collection, given that all the first tier sites must write for Internet Explorer. What I had not considered was the effect of the large mass of second and third tier sites. For those sites, there is not the skill to work around Microsoft’s weakness. The net effect is a large number of semi-skilled sites that over time perform better on Firefox than on Internet Explorer.

Yes, there is a good mass-market reason for Microsoft to improve the garbage collection in their implementation of Javascript.

2008.07.19

Linus is a bit of a jerk

Filed under: Software — Preston @ 2:14 pm

… from a somewhat emotional discussion …
C++ is a horrible language. It’s made more horrible by the fact that a lot of substandard programmers use it, to the point where it’s much much easier to generate total and utter crap with it. Quite frankly, even if the choice of C were to do *nothing* but keep the C++ programmers out, that in itself would be a huge reason to use C.

Apparently Linus is not a very good programmer – and by extension thinks no one else could be – when using C++ as a tool.

Sounds familiar. Heard the same sort of rants out of ego-laden assembly language programmers dismissing higher level languages (C or Pascal) back in the early 1980’s. Makes as little sense now as it did then.

C++ is an extension of C. In every way C is good, C++ is exactly as good, and some large ways C++ is better. C++ is a dangerous language (as is C), just as a knife is a dangerous tool. (I keep the knives in my kitchen very, very sharp.) A mediocre programmer can write very bad code in C++. A good programmer can write clean and hideously efficient code in C++. For a good programmer C++ is always and without exception a better tool than C.

In other words: the choice of C is the only sane choice. I know Miles Bader jokingly said “to piss you off”, but it’s actually true. I’ve come to the conclusion that any programmer that would prefer the project to be in C++ over C is likely a programmer that I really *would* prefer to piss off, so that he doesn’t come and screw up any project I’m involved with.

C++ leads to really really bad design choices. You invariably start using the “nice” library features of the language like STL and Boost and other total and utter crap, that may “help” you program, but causes:

– infinite amounts of pain when they don’t work (and anybody who tells me that STL and especially Boost are stable and portable is just so full of BS that it’s not even funny)
– inefficient abstracted programming models where two years down the road you notice that some abstraction wasn’t very efficient, but now all your code depends on all the nice object models around it, and you cannot fix it without rewriting your app.

The last bit I will agree with somewhat. I played a bit with STL and Boost – enough to form an opinion – but never in code that shipped to a customer. Not so much that I am convinced either library is necessarily bad, rather more that I am not convinced those big gobs of code are all good enough for my purpose. Digging into the code for large libraries, what I usually find is a mixed bag. Some of the code is quite good, but not all.

I very often write my own string, list and hash classes – none of which are difficult to write. There is very often some aspect of the problem to be solved that benefits greatly from a tweaked implementation, and the same end result is just not possible with a general purpose implementation. Often I can re-use a bit of prior work, with adjustment to fit the problem at hand.

There are parts of the C++ language which I do not consider well done. Trying to throw new features into a language during the standardization process is an amazingly bad idea – and the C++ standard is a good/bad example. (In contrast I believe the Standard C folk did an outstanding job.) Templates in particular do not seem well thought out. I do use C++ templates, but seldom. Not really a problem – just use the good bits.

There is another problem – excessive abstraction – common with C++ and Java programmers. As a group, Java programmers are especially prone to this excess. Note that I blame the programmers, not the language. There is nothing in either language that prevents writing efficient and clear code, but the ease of adding abstractions does make it possible for an incautious programmer to build things more complex than they can understand.

In other words, the only way to do good, efficient, and system-level and portable C++ ends up to limit yourself to all the things that are basically available in C. And limiting your project to C means that people don’t screw that up, and also means that you get a lot of programmers that do actually understand low-level issues and don’t screw things up with any idiotic “object model” crap.

This is nonsense. The problem is with the programmers, not the language.

C++ is dangerous in the same way that a sharp knife is dangerous. Used with insufficient skill or caution and you can do a lot more damage. Used well and you can get a lot more done.

Now if Linus were to say that the skill levels among the large group of Linux contributors is quite various, and not all are skilled enough (or able to be managed) to produce good C++ code … then he could have a good point.

Along the same lines … as a decoy I keep a block of gift knives (cheap steel, serrated edges, not very sharp) in plain view on the counter in the kitchen. The good hideously sharp knives are out of sight in a drawer. A guest in the kitchen is going to grab the gift knives, and so are somewhat less likely to get into trouble.

2008.07.16

Swing, Java, and old notions not yet met

Filed under: Music — Preston @ 8:40 pm

Of late I find myself in rather a strange place.

What I work on pretty much follows whatever my present employer currently needs. I’ve done pretty much everything – from device drivers to fancy web applications – and by this time have touched pretty much every major genre in programming. My starting interest in software came from the rise of personal computers (beginning with the Intel 8008 and contemporaries), and a very strong belief in graphical user interfaces (take SmallTalk as an early example).

Right. The current generations of programmers cannot imagine a time before small computers. The fact that there was once a time when graphical user interfaces were revolutionary is similarly inconcievable.

This long base of experience has an advantage. I can remember the original rationale for what now has become programming dogma. In some cases, what is now convention no longer makes sense.

After spending a few years pushing the envelope on web applications, of late I found myself sucked back into the realm of desktop (mostly) GUI applications written in Java. Not entirely a bad thing as I was curious what progress had been made in this area.

The Java library folk had an advantage in that when they started the Windows and Apple Mac programming domains for the construction of GUI applications were fairly well understood. At the same time they had the disadvantage of relative inexperience – the folk working on the Java libraries were young, and had not fully learned the lessons well-known to experienced Windows and Mac developers. That lack made them prone to a particular collection of mistakes.

In balance, you have to add in the fact that writing a cross-platform GUI (Windows, Mac, X-Windows) is difficult. To find an implementation path that does not over-serve any particular platform is … a lot more than tricky.

At the same time there are old ideas about what counts as good design – in contrast to common practice – that remain outside most-common practice.

How should I evaluate this?

Over the last several months I’ve taken a badly written Java desktop GUI application, and re-written a huge fraction to remove problems. Along the way I found missing bits in the Swing classes – or that I think are missing – and am coding notions that are 10 or 20 years old. Maybe I’m missing something. Maybe not.

2008.07.06

Looking for a good breakfast, found another Sysco restaurant instead.

Filed under: General — Preston @ 7:02 pm

There is something odd going on in restaurant and fast food business. Lots of places opening well-funded, with fancy decor and not very much skill in the kitchen. As though there is a lot of money looking for a place to invest, and not enough skilled help to make the investment work.

This morning I was looking for a good place to eat breakfast. We don’t really have any good weekend breakfast places around here. The good places I know of are not at all close, and usually very busy on the weekends. For the record, the places I do know that are at least somewhat local:

  • Omelette Parlor – very nice breakfast (mostly omelettes) at very reasonable prices with efficient service. More of a drive than I like, and much worse during the summer beach-season months. Obscure location yet usually a substantial wait on weekends. Never been disappointed in twenty-odd years, and very much wish there was a place like this closer.
  • Original Pancake House – most excellent breakfast (mostly pancakes) with an impossibly long wait on weekends. Have not been there in years (I do not like long waits). Have driven past, saw long lines, and kept driving.
  • Bagels and Brew – decent bagels and coffee. A short drive, but long lines on the weekend, and often no good place to sit and eat. If you are not so much interested in a high-carb breakfast, this is not so interesting.
  • Citrus Cafe … depends on the owner. This place used to be called “Cookie’s” and was very decent. Then the place got a new owner, and went downhill. The prior owners (Steve Tsirtsis and Steve Xenos) bought the place back (at a bargain price, apparently), changed the name to “Citrus Cafe”, and once again the service and food was excellent. The same owners were also was associated with the “Lakeview Cafe” and the Citrus City Grill – and both were very good. I visited Lakeview Cafe a couple months back, and could tell from the food (not in a good way) that it had changed owners.
  • Ruby’s Diner … this is a definite maybe. Some Ruby’s locations were consistently good, and others not. The nearest Ruby’s (in Rancho Santa Margarita) was always a disappointment. I have not been to any lately to offer a recommendation. For all I know the entire chain has gone downhill. Worth a try, maybe.
  • Coco’s Bakery … another definite maybe. Sometimes the local Coco’s is very decent, and other times … not so much. Used to live near an Irvine location that was very good then went downhill. Lived near the Mission Viejo location, which was then … passable. The closest location now is in Laguna Hills, that was not more than mediocre a decade ago, but seems to have improved. Perhaps I should go there more often…

Definite pattern here, as the good places all have more business than they can handle, while dozens on nearby eating places are near empty. At the same time, the good places are remarkably few. My guess is that the difference in the end probably comes down to one or a couple guys … owner or operator … that makes all the difference.

Looking for a new place to try, not too much of a drive from here. Went on the Internet, and hit this site.

Pacific Whey Cafe
We use only the highest quality and freshest ingredients to prepare our made-to-order dishes. From our Organic Buckwheat Hotcakes to our Pacific Cobb Sandwich on Fresh Artisan Bread to Filet Mignon over Biscuits, we invite you to explore our savory offerings listed below.

Sounded good so rounded up the kids and got into the car. On arrival was not immediately impressed. The place was obviously very new, not too heavily used (though there was a line at the time), and a bit baroque. Ordered an omelet and a cafe mocha. The coffee drink was far too sweet, and I drank only half before switching to water. The omelet came with avocado, whole wheat bread, and fried potatoes. The omelet was unimpressive – passable but my routine efforts are better. The avocado was obviously the bland and watery Fuerte, or a picked-too-young Hass (my favorite – when properly ripe). Both the bread and potatoes might have been good when fresh, but were instead bland and stale.

Since my teenage son started working food-service jobs, he can often identify ingredients as sourced from Sysco, and even guess their place in the Sysco price list. Sysco is the largest foodservice distributor in North America, and supply most of the local eating places. By itself there is nothing wrong with this. Some of the items offered by Sysco are of good quality. But Sysco also offers for almost(?) every item a range of similar choices of lesser cost and quality. For the owner of a food-serving business, the temptation to shift down the Sysco price-list to items of lesser cost (and quality) must be almost irresistible.

There is a rather odd pattern to all this.