My Best Teaching Is One-on-One

一対一が僕のベスト

Of course, I team teach and do special lessons, etc.

当然、先生方と共同レッスンも、特別レッスンの指導もします。

But my best work in the classroom is after the lesson is over --
going one-on-one,
helping individual students with their assignments.

しかし、僕の一番意味あると思っている仕事は、講義が終わってから、
一対一と
個人的にその課題の勉強を応援することです。

It's kind of like with computer programs, walking the client through hands-on.
The job isn't really done until the customer is using the program.

まあ、コンピュータプログラムにすると、得意先の方に出来上がった製品を体験させるようなことと思います。
役に立たない製品はまだ製品になっていないと同様です。

Saturday, December 31, 2011

Programmer's High

My son built his own BBS in perl. Got it working somewhat yesterday. Not on my server, on one of those ad-supported "free" servers.

家の息子は自分でウェブ上の掲示板を作っていて、昨日動かせた。ぼくのサーバーにやらせたわけではなく、広告の利益で営業していて、どこかのタダでやらせてくれるサーバーです。

He was high.

とんだ気分だったようです。少し酔っ払ったように思われるほど。

I realized something. Programming is kind of like a drug. When things don't work, you can get really low. When things do work, there's a rush of something (adrenalin? endorphins?), a natural high.

気がついたことがあります。プログラム製作は少し薬物のような影響があるかもしれません。巧く行けないときは落ち込む。ちゃんと動いてくれる時は、アドレナリンか、エンドルフィンか、何らかの自然な好い気分。

You could say this is like just about anything you do -- failures get you down, successes make you feel good. (Actually, I know people who get up for failures, but that's not really the same thing.)

まあ、どんな仕事もこうなると言えるでしょう。失敗しては落ち込んだり、成功するとハイになったりする。(知り合いの中に、失敗の性で我慢を起こす人もいるけど、それはちょっと違う話と思います。)

But getting a program to work requires no outside approval. The computer's functioning the way you intended is sufficient praise.

しかし、プログラムをやっと動かせるときは人の評価が要りません。コンピュータがちゃんと動くのが充分な賞賛になってしまう。

This effect also feeds your ego. This is probably why programmers are known for their hubris.

その影響うぬぼれることもある。これがため、プログラマーたちが自信たっぷりに知られるかもわからない。

This natural high may also feed into the unreasoning belief that, if you can just get this one working, you'll be able to get the computer to do anything you want.

この自然酔いが、今作っているプログラムを、ちゃんと動いてもらうことさえできたら、コンピュータに何でもやってもらえると思わせる気分を追い込む原因となるかもしれません。

Okay, this is not really all that big a deal, perhaps, not all that different from other things you can be successful at.

さて。本当にすごいものをさとった訳でもないでしょう。他の成功とそれほど変わらないでしょう。

Or is it?

かな?

Friday, December 30, 2011

Christmas vs. Christianity

Some of my friends wanted to know -- this is a simplified explanation.
友達の質問に答えて、簡単にお説明します。

"Christmas" is made up of two words, "Christ" and "Mass".
クリスマスと言っても、2語でできた言葉です。その語彙は「キリスト」(Christ) 及び「ミサ」(mass) です。

Christ is Jesus Christ, of course. (In Japanese, "Kirisuto".)
「キリスト」はもちろん、イエス・キリストのことです。
SLC Christus, Barbaricino 2008


Mass of Annunciation, Adrian Cozma 2008, GFDL
Mass, or "Misa" is the primary part of certain Christian solemn religious ceremonies.
「ミサ」 と言うのは、典礼(てんれい)と言っても、キリスト教の、ある厳かな儀式(おごそかなぎしき)の中心部です。英語では「マス」と言います。
"Mass" can also refer to the festivals which are celebrated along with the ceremonies.
引いて、その儀式と同じ時に祝っているお祭りのことも「マス」と言えます。

You might expect Christmas to turn out as "Kirisuto Matsuri" in Japanese, but historically it didn't work that way.

考えたら、「クリスマス」よりは「キリスト祭り」と言っても良かったぐらいかも知れませんが、歴史上ではそうならなかった。



Nativity, Charles Poerson 1667


For many Christians, Christmas is the celebration of the birth of Jesus Christ.
多くのキリスト教徒にとって、クリスマスはイエス・キリストの誕生(たんじょう)を祝う祝日です。
We don't really know when Jesus was born.
じつは、イエス様の本当の誕生日についてはよくわからないことがあります。
Some churches celebrate His birth on the 8th of January.

教会によっては、その誕生日を一月八日にします。


There are some historians who say that the date for Christmas was chosen to coincide with, or replace, winter festivals of the non-Christians.
ある歴史家によって、クリスマスの日にちはキリスト教徒ではなかった人々の冬祭りに合わせて選んだものであると考えています。あるいは、冬祭りを置き換えるものとしてできた、と。

Saturday, December 17, 2011

Coffee in school lunch? 給食にコーヒー?

Yesterday, I ate with the 1st graders at one of my elementary schools.

昨日、教えに行っている一つの小学校で一年生と昼ご飯を食べました。

The kids get school lunch, but I don't handle refined sugars well.

子供たちには給食ですが、私は精製された砂糖をちゃんと消化できないことがあります。

School lunches here are not actually that bad for sugar. Many days, I'm pretty sure, just from eyeballing and knowing (from what my wife tells me) what is probably in there, that I could safely eat with the kids.

この学校の給食は砂糖がそれほどひどくありません。大体の場合、見た目で、また家の嫁さんに教えてもらっていることで、内容についての予測によると、子供らと一緒に食べてもういいはずです。

But there are days when I definitely could not. Special days with cake or ice cream or sweetened beans and such. (Used to love those sweetened beans! Good stuff.) So I bring my own to avoid surprises. (My wife is a certified nutritionist, and she packs me a mean lunch, so I don't suffer. But it is extra work for her, and I do appreciate it.)

しかし、無理な給食の日もあります。ケーキやらアイスクリームやら餡などが出る特別な日。(恋しいですわ、餡が食べれた昔。大好きだった。)したがって、万一の場合に備えて弁当を持ってきます。(家の嫁さんは栄養士です。おいしい弁当作ってくださるので、ボクには難でもありません。確かに、給食をいつも食べれたら彼女の方が楽になるでしょう。感謝しています。)


Well, yesterday, they had pumpkin soup (looked and smelled good), sausage with cabbage, carrots, onions and some Japanese variation of Indian (I think) spices, hot dog style buns (Yeah, those would probably be not the best for me.), milk, and, uhm, sweetened instant coffee mix.

さて、昨日のことですが、給食には(いい香りのおいしそうな)パンプキンスープ、ソーセージにキャベツや人参やねぎに、多分インド風の味付けと、(アッ!これは俺には危険だ)ホットドッグ用の長いロールパン、ミルク、そして、・・・砂糖入のインスタントコーヒー粉。

I checked the ingredients. Real instant coffee.

パッケージの内容を見たら、本物のインスタントコーヒーでした。

(I know, I know, someone is going to tell me instant coffee is not real, and there is a point to that, ... )

(はい、はい。コーヒーを好む方にとっては、インスタント何て本物ではありません。そういう意見には確かに意味があります。認めます。)

The sweetened instant coffee mix is one of several flavors of Milmake (milk-make?) milk flavoring mixes made by Ohshima Foods and targeted at children. In addition to three kinds of coffee flavors, they make cocoa, strawberry, banana, melon, and caramel. (The wikipedia article references some other flavors, but I don't see those on their current site.)

この砂糖入インスタントコーヒー粉は大島食品工業株式会社さんが製造されているお子様向きの牛乳味の粉のミルメークの一種です。三種類のコーヒーの他に、ココア、いちご、バナナ、メロン、キャラメルを製造されているようです。(ウィキペディアの記事によると、また違う味もあるそうです。現在のウェブサイト広告には出ていませんけど。)

Now, I'm not one to tell parents not to feed their kids sweetened milk unless they ask me why their kids aren't drinking their milk. (Yeah, those kids did not drink the milk-coffee any faster than they drink the straight milk. The difference was that they were trying to convince themselves that the stuff tasted good, whereas they are usually trying to convince themselves that the straight milk tastes bad. And I'm pretty sure I'm not misreading their faces. Milk is not supposed to be cool.)

さて、砂糖入のミルクを子供にあげるなと、私は言うのではありません。もし、子供たちがミルクを飲んでいない分けを私にお聞きになるならば、説明は致しますが。(確かに、ミルクコーヒーを普通な牛乳よりも早くのんだりはしていなかった。何か違う雰囲気があったとすると、コーヒー入りのモノが美味しいと、自分を納得させようとしていたように思います。一方、何の味もない牛乳のときについては、味が嫌なはずと、自分を納得させようとしている様子です。まあ、ワタクシの見ている限り、そういう表情です。牛乳は格好良くあるはずはないでしょう。)

But I saw more than one kid looking at the powdered mix like, "Should I really be drinking this?" And, since there was no option, I did not feel free to discourage them from drinking it. (Yes, I did have some internal conflicts, watching this.)

しかも、”これ、本当に飲んでも、いい?”、のようにその粉をジロジロ見て、考えている子の顔は一人だけではなかったのです。他の選択肢があれば、違うのを飲んだらと、推めたくて、心の中に若干の不和を感じながら見ていたワタクシでした。

I checked with my kids when I got home, and, no, their elementary school never gave them any of the Milmake mixes with their lunches. In some ways, I wish my kids could have gone to the schools where I'm teaching, but in this case, I'm glad they were never faced with the choice, to mix the coffee in or leave the mix on their trays.

家に戻ったら、家の子に聞いてみたけど、こちの小学校ではミルメークのようなものを給食に出された覚えがなさそうです。ある違うことについてはボクが現在教えに行っている学校に、家の子供も行ってほしかったかも知りません。ただ、この場合は、コーヒーをミルクに入れるか、給食の一分だった粉を残すかの選択を直面する必要がなくてよかったように思っています。

I wouldn't be so concerned if these children could ask for other options for flavoring their milk, especially, if one of the options were straight roasted soy flour.

もし、仮に言っていますが、他のミルク味を選ばれたとしたら、これほど気にかかるものではなかったでしょう。特に、その選択肢の内にきな粉があったらよかったと思います。

The world is not an ideal place, I guess.

この世界は理想的なところではありません、ね。

But, coffee? A known psychoactive, habit-forming substance with complex health effects?

しかし、コーヒーですよ。神経に影響を及ぼすコーヒーです。習慣だけではなく、癖になるコーヒーです。健康にも複雑な影響を及ぼすコーヒーです。(残念ながら、英語のウィキペディアページにはコーヒーについての情報があって、日本語のウィキペディアページにはその情報がありません。こういうときは英語を教える必要性について納得できます。とにかく、その英語のページを一目見てください。)

Sunday, December 11, 2011

bringing fire to the mortals or burning them?

My wife had some Japanese blues on the box. X singing, "Say Anything" and Chekkaazu (Checkers, not Chubby) singing "Furete Goran" ("Touch, and See What Happens") among other things. Old stuff, but good blues.

The melancholy matches my state of mind after reading on Groklaw about Prometheus and the Mayo Clinic duking it out before the Supremes on Friday.

PJ is right. This is depressing. This is not just me being a melancholy man.

I hope that the justices were just giving Prometheus rope to hang themselves with. Still, a win for the Mayo Clinic is not the best result here, either. Neither side is arguing for reality.

Anyway, Prometheus invested a lot of time and money in this thing. So, they argue, they should be rewarded with a monopoly, not just on the numbers they were able to extract from nature, but on all the numbers around them. At least, that's what the lawyer for the Mayo Clinic says Prometheus' lawyers have been telling them.

False claims? Confidence games? Fraud? Racketeering? Telling the potential patentee one thing and telling the court another? Or are the lawyers for the Mayo Clinic just confused?

Yes, that's pretty much what the lawyers for Prometheus seem to be arguing -- "No, you're confused, we don't want patents on all the numbers from 400 to infinity, just on 400 to infinity when used diagnosing this particular condition."

Huh?

Let's back up.

So Prometheus spent a lot of time and money on this.

Bad investment happens. Since when is it the duty of the people of the United States of (North) America to bail out every Morgan, Wells, Goldman, and Prometheus who has made a bad bet?

Years ago, I made a bad bet on the M6809 and OS-9/6809, and then on Forth. I wasted 6 good years of my life trying to squeeze Forth onto OS-9/6809 without using other tools to help bridge the gap between position independent coding techniques in programming languages and the assumption that the memory management hardware would handle relocation issues, an assumption that is still fundamental in all the current standard programming tools. Trying to be the code jock and do it all on that poor overworked 6809 on the very limited floppy disks that I had.

My mistake. I paid for it.

Where is the government office I can go crying to with cap-in-hand, saying, I spent the equivalent of (claim top programmer rates, here, for good effect, 24,000 man-hours, USD100/hour) 2 and a half million dollars on the project, I deserve some kind of reward?

Give me a patent on program interpretation via function addresses as intermediate codes, with two stacks, and then let me broaden that to the interleaved stack, and I was doing this in the mid-'80s, so I have the right to control every interpreted language from perl to Java to Ruby to Lua and Python.

Shoot, just a little more broadening and I can reach back to SmallTalk and Lisp, and branch sideways to C, since C imposes a virtual runtime. Who cares that Kernighan and Ritchie put C together about fourteen years before I had a running Forth, and started their work at least ten years before I had any idea what a programming language was.

I invested all that time, and time is money, and I deserve SOMETHING for my efforts.

That's essentially what is happening in the intellectual property market, when you read the court cases with an understanding of the tech and the history thereof.

Won't somebody think of the children, if they can't be bothered to think of the Constitution?

[PS: It may be useful in this context to point to my mistakes. There were two primary mistakes.

I underestimated the ability of the microprocessor to induce hallucinations in businessmen. (Talking at you, Bill Gates.)

But, more importantly, I failed to follow through. At one point, I was ready to build my own 6809 assembler, with the self-relative labels that were missing on the OS-9 assembler. Probably six months of work to my modified figForth on OS-9, but I ended up wasting the next six months trying to get a start on writing a real Forth in C, instead.

My lack of real income scared me into trying to take what looked like a shortcut but wasn't.

The way for Prometheus to monetize their work is there, if they will simply quit insisting on trying to do it the wrong way.]

Sunday, December 4, 2011

Mis-Understanding Computers

Computers are too often viewed as machines. That's not the correct way to see things.

コンピュータというものは機械としてみられるガチです。

Computer memory is just fancy paper.

コンピュータの記憶というものはただ改良した紙です。

CPUs are just fancy pens, with fancy erasers.

CPU 何て特長ある筆に特殊の消しゴムがついたものにすぎない。

The network is just a fancy backyard fence.

ネットワークだって、裏庭の塀が少し拡大されたものぐらいです。

It's really easy to see, in the computer, ways to fulfill your fantasies, especially control fantasies. But that's all just illusion.

コンピュータに自分の気まぐれな幻想を見出す魔法を視るガチでしょう。特に支配の空想を。

しかし、その魔法は幻覚です。蜃気楼です。

キマグレ。

The magic is in language, itself.

魔法があれば、言語というものにあります。語、そのものに。

And there is no way to control that magic, no way to bend it to your own personal desires, no way to use it to enforce your own personal view of the world.

その言語にある魔法を制することはありません。自分の欲張りに枉げる方法はありません。自分の個人的な見解を世界に押し付ける方法としてその魔法を使うのは、本当にありませんよ。

Lots of ways to bend and break yourself, trying.

しようと、自分を枉げる方法、めげる方法は少なくない。

And, unfortunately, lots of ways to inflect collateral damage while you're at it.

悲しいこと、コンピュータを利用して制しようとする序でに、関係ない人に傷つける方法はタップリあります。その試みには色んな間接被害を与える方法は豊富にあります。

Why do people insist on seeing the computer as a magic box for controlling other people? Why do they want so much to control others when they won't control themselves?

人は何でコンピュータを、人を制する魔法の箱として考えたいのですか?どうしてそれほど、自分を制しないのに、他人をあんなに制したいのですか?

Monday, October 24, 2011

Conspiracy Theories

Had an epiphany while waking up this morning. Not new ideas, deep impressions. (Epiphanies tend to be such, not new information or synthesis, not factuality, deep impressions.)

Bill Gates is not really an evil genius. Nathan Myhrvold seems a bit more evil, but not as smart. Steve Ballmer is a gorilla. These guys are pains in the neck, but not really to be feared as much as to be avoided.

Steve Jobs? Johnathan Ive? Tim Cook?

Well, I would be more concerned about Apple as the defacto monopoly than Microsoft. I've been of that opinion since the days of the Apple II. I like their stuff to a certain extent, but I don't want to live in a world dominated by their tech.

But they are not the leaders of the conspiracy either.

The computer industry has seen more than one might think would be its share of plot and intrigue.There is a reason for this.

Conputers are much more about controlling the flow of information than about calculating. Programmable computers are, erm, programmable. Wonderful for enforcing protocol, if only there weren't that pesky halting problem. And that inscrutable NP complete nonsense. (It is nonsense, of course, right?)

Managerial types who get a taste of programming tend to be more than a little like the proverbial dog getting a taste of egg. And they unfortunately develop a blind streak relative to the limits of computers.

Control, control, CONTROL!!!!

No, this was not my epiphany.

You know, now that I'm back from work, I'm not sure what the epiphany was. (And that's not exactly atypical for epiphany, either.)

Years ago I had an epiphany about conspiracies. If you take the Bible seriously, conspiracies come as no surprise. We know they existed from Cain. And we know who the leader of the conspiracies is, too.

And there is something about the leader of the conspiracies that we know, he can't keep his stories straight. He was a liar from the beginning. If he could keep ever his stories straight for very long, he would quite possibly cease to be the devil.

Management that can't keep its stories straight tends to make for a volatile organization.

Thus, we can be sure that all conspiracies will sooner or later crumble under their own weight of lies.

Jesus said that we should fear God and not man. (He also tells us that God is watching us up close, not from a distance, that He knows when every sparrow falls or something like that.)

We need to recognize that there are conspiracies. We need to be cautious of them. Sometimes we need to take action relative to them. But we must never fear because of them.

[Note (15-17 July 2015)
One of my siggnatures used to read like this:

Be careful when you look at conspiracy.
Look first in your own heart,
and ask yourself if you are not your own worst enemy.
Arm yourself with knowledge of yourself, as well.

I think a lot of people misunderstood my intent. I do not mean to deny the existence or the dangers of conspiracies. I mean to point to what we, as individuals, can do about them.

So I changed that signature to point here, which is a bit of a half-way measure.

A little more to the point:

We can read in Moses 4: 4 about the spirit of deception and where it leads.

Conspiracies are one of the sub-themes of much of the Book of Mormon. They are often referred to there as "secret combinations". (I think this means the men and women combining to help each other to do bad things, and also the combinations of philosophies designed to confuse, mislead, and discourage people from thinking for themselves, among other things).

Third Nephi ch. 6 is rather poignant. Here, two cultural groups, the Nephites and the Lamanites, after having united to defeat a secret combination and restore peace to their land, prosper, get cocky, compete excessively, get their feelings hurt, and then start building the combinations up again. This leads to wars, and the complete destruction of their government.

And that is what that signature is supposed to be all about.
]

[For the record, I expanded a little further on this concept here. JMR20160106]

Sunday, October 23, 2011

Passed the LPIC Level 1



Since I bragged about the JLPT, I suppose I should tell anyone who's listening: I passed the Linux Professional Institute Certification at level 1 at the end of the summer. (Last day of August, in fact.)

I suppose it was about time. I've been using Linux and other *nix OSses long enough. I really should have passed both level 1 and 2 over the summer, but I let a lot of unimportant things (and a few important ones) get in the way. So I'm working through a level 2 text (in Japanese, Linux 教科書 LPIC レベル2 第3版 on the train home, and trying to squeeze time in on the computer on the weekends to practice some of the stuff I really haven't done yet, like setting up DNS and mail servers. Not squeezing in enough time, though.

Back-Seat Driving Apple

Or, perhaps, trying to drive from outside the car.

I'm definitely not showing a sense of social protocol here, but I've been daydreaming about this for a long time, since well before I knew Steve Jobs was losing his battle with cancer. (This is more-or-less what I would have posted back in October, but didn't have time to.)

(If the reports of Steve's last diatribe against Android are accurate, I'm inclined to think respect for the dead means something a little different in this case.)

But here's what I'd do, were I in a position to do so, to try to avoid Apple following Bill and Microsoft down the hill:

Start two sister companies, called, maybe, AppleSeed and Crabapple.

The "Appleseed" company would take over from Apple most infrastructure intellectual assets, including the continued development of the OSses and fundamental hardware.

Apple itself would stay focused on customer/end-user issues and on designing and selling the current and next models.
 The Appleseed company would also be tasked with setting up and supporting a true open source community around both Darwin and iOS. Not the non-community archival site at opensource.apple.com, nor the para-community you find at www.macosforge.org. A true community, something like the Fedora community that Red Hat supports. Around both Darwin and iOS.

And the Appleseed company would be tasked with moving discontinued products, both software and hardware, into a community supportable state, mostly under the Apple Public License, GPL, and so forth. Include hardware and circuit diagrams for the old 68k and PPC stuff. Part of that would be clearing "intellectual property" issues and releasing the old Macintosh system and (Apple's) application code from the original Mac through Mac OS 9 under open source licenses. And clearing the "IP" issues for re-implementing a desktop manager based on the old Mac UI.

The "Crabapple" company would be a community based prototyping company, where one would be able to buy such things as PPC, ARM, and ColdFire motherboards running DarwinOS and iOS-sans-UI, and other DIY gadgets. You would also be able to buy current AMD x86 processor based systems pre-loaded with DarwinOS and open source desktops like KDE or XFCE. (No need for INTEL systems, Apple itself can maintain its relationship with INTEL for as long as it seems prudent to do so.)

The Crabapple company would also be tasked with maintaining security level updates for the Mac OS X versions that Apple has EOLed. This would not be a free service, but would not be overly expensive, either, perhaps $25 a year as a subscription. And they could provide other fee-based services, such as providing several versions of non-warranteed Aqua UI to load on top of the most recent DarwinOS.

Or, instead of actually maintaining the down-level systems, the Crabapple company could support the MoL/MoM community, officially allowing the old systems to be run under emulation on newer hardware under current OSses.

The Crabapple company would also publish open source hardware drivers for use in the Linux and BSD communities, under appropriate licenses

Why? end-user buzz is not enough, and Apple is too big already.  This would help keep Apple small and competitive.

The licensing would allow non-Apple companies to compete with the Crabapple company, which would also build the community.

And the future is in communities, made of small companies.


Linux on iBook redux (not yet)

My son has been using my old tangerine clamshell iBook with the original 5.6 G hard disk. (There's a lot of water under that bridge.) Mostly, he listens to mp3s, but he also sometimes plays around with ECMAScript and perl. Has some strange interest in the three kingdoms of China, and games based on the old tales.

(Must be a teen-age boy?)

Well, my white iBook G4 died the death. It served me pretty faithfully for about three years after I bought it used and installed a 160G HD in it. Mac OS X 10.3, OpenBSD, and Fedora 12; Mac OS 9 under classic emulation, but not booting from power on, as Apple designed it. (Wasn't interested interest in ex post facto or whatever that was, it did what I needed. I'm kind of looking at the reverse problem, now, more below.)

Then, about a year ago it just suddenly started powering down for no reason. I'd read somewhere on the web about cold solder joints. Found out enough to identify the video controller (maybe?) and test it with pressure, and then re-solder it. (3mm by 1mm flat tip was not fat thirty years ago! It's fat now.) Careful work cleared the slop between pins and it was running again.

About three months later, I dropped the poor thing on my way into the train station. My shoulder-bag strap broke. It took about a meter drop, but it was in the bag, with all my books that I read on the train. Checked when I got to the school and it booted up. Checked it more carefully at home, and the chassis was bent in around the battery. Straightened that out, but now it was powering down unannounced again.

After another three months or so of taking it apart and resoldering again every now and then, it just was getting too much, too often, so I semi-retired it. Recently had a little time and tried one last time. Not enough money (I thought) for a real iron, so I found a cheap hobby iron (ungrounded) with a fine point tip and bought that. Also found some cheap hobby grade braid.

Not a good idea.

I should have been willing to wait until I can afford real tools. Somewhere, I either burned a short in a chip from the lack of grounding in the iron, or I left a piece of braid or a whisker of solder somewhere. A different chip bubbled, I smelled the smoke, and it does not boot. Period.

I wonder if I can find parts, other than a new motherboard. (I have found those listed on the web, used, but with 6 month guarantees.)

Anyway, my son gets the 160 G hard drive, but there's that problem with the limits of Mac OS 9 on the iBook. 120G max per drive. Not partition. Drive.

So, much to my son's distress, I started trying again to get Linux running in it. Tried Debian this time. But the version of gparted currently in Debian is worse than the one in Fedora 12 for walking on the Apple Partition Map. Seems to think formatting the drive with less than it has is an error condition or something. I need to file a bug for this, and add the information to the bug I filed on Fedora.

Dug into the partition map information, found some old stuff around, a somewhat inaccurate mactech article on the change from APM to INTEL's GPT junk, walked the map, and tried patching the map.

Arggghhh. The pre-Firewire iBooks have no target disk mode to allow you to directly access the disk. Can't boot from USB on them, either. (Blast you, INTEL, for expanding USB beyond keyboards and low-speed printers!) I'm going to have to set up a live CD of something really small (openBSD, I suppose) in order to be able to patch the drivers.

Tried various things, botched it all up, re-installed Mac OS X and 9, spent some time bringing it all up to speed. Still missing a few things. Need to finish cutting the partitions and install OpenBSD. (After I get OpenBSD running, I may try loading drivers for the Linux ext3 file system and using OpenBSD's tools to get a beachhead install of either Debian or Fedora 16's highly experimental stuff running.) In the meantime, my son has his iBook back. With the ancient browsers.

I suppose I can call this all lab work for when I go after the LPIC level 2.

But this is a big part of a certain daydream. (With apologies to Steve's family and friends, for touching on his management style so soon after he crossed the stream.)

I sure wish Apple supported their old hardware and software better. They have the money now, and have no need at all to push so hard to get their customers to move to the latest, greatest. It would be a common courtesy to their customers to keep the paths open to all the old data.
  • First, Mac-on-*nix. That really should be an official product of Apple, and it should run on Linux, BSD, and Mac OS X. If they didn't set the price too high, it would pay for itself monetarily and more than pay for itself in customer good will.
  • Second, the old versions of Mac OS X. They should try to to at least keep them road-worthy -- security fixes and a reasonably functional web browser. Maybe active support for the authors of some of the better alternative web browsers that still support the old systems.
  • Third, driver support for non-Apple Libre/Open OSses. Nothing to do with the crown jewels, it's just selfishness, pure and simple, to use closed drivers to try to force your customers to stay with you. Also reflects a lack of confidence in your product. Most important, it prevents your customers from helping you find and fix bugs. (Okay, that's the closed-vs.-open argument and it applies to all technical works. But these are real principles and they sit at the center of the current economic implosion, and they also drive a lot of the excess industrial activity that promotes the global climate changes.)
  • Fourth, the old system software and hardware. Apple is not using Mac OS 7 any more. Why shouldn't they let students play with it? Publish it for reference, license it for non-profit study use, if they don't want to put it under their APL.
I'm sure that there are "intellectual property" (that old oxymoron) issues that would get in the way. But that could be solved by setting up a sister company, maybe call it Crabapple Computers, or something, to "launder" the IP rights issues and manage the open source projects.

Just make open source projects for all the major elements, and support them the way Red Hat (the real leader in open source, you guys!) does Fedora. It shouldn't be that hard to do.

Expansion, contraction, it's all the same.

Expansion, contraction, it's all the same.

The Japanese government is all in heat, scrambling for a fix for the aging society.

What's the point?

We can make enough food.

After that, value is what people make of it.

The people. Themselves.

And yes, they have to be free to make it.

Free.

I know freedom is scary, but after all, what else do we have?

Freedom is just another word for recognizing you've got nothing left to lose.

Never had, never will have.

Time to open society back up and let the people fix the economy from the ground up, even if it means scary things like letting non-natives really certify to teach in public schools. As real, certified 教職員 (kyoushokuin), leading classes, setting up curricula, discussing progress with parents, the whole thing.

Friday, August 19, 2011

Principles of Security

Security. Lots of computer system companies are selling security these days. Ironic, when you think about it, because computer systems are systems, and systems are inherently, well, vulnerable. Not secure.

It's a feature of systems, even though systems designers from the times of the earliest recorded history have habitually insisted their systems are somehow different. (Vulnerability is not just a feature of mechanical systems.)

Security in the usual sense is a red herring, a distraction.

But if you want security, here are the two principal keys:

Know who you are and where you are.

Know what is most important and where it is.

If you don't know the above, what use is building walls?

If you do know the above, chances are you'll have little use for walls. Just enough to keep other people from getting worried.

This all sounds ridiculous, but it has practical application in computer and information science. Systems must understand identity at some level to be secure.

Which begs the question, what is identity?

Thursday, August 11, 2011

Entrepreneurship and Trust on the Internet

Have you seen kickstarter?

Well, it's an interesting concept, and I have wondered whether something like this might be part of the future way of doing business, after the current crop of robber barons and squatters get removed from the public commons that they are attempting to expropriate under the banner of "intellectual property". (This rant is threatening to get side-tracked, too.)

Not content with just wondering, I decided to set up a project, lay my ego on the line, and see if I could get funding for the clean-up work my BIF-C FORTH language project needs. But, ...

I live in Japan.

In order to run a project on Kickstarter, you have to register with Amazon's payment systems. This is good, because you can probably trust Amazon more than you can trust Kickstarter at this point. But that's not the primary reason.

Kickstarter requires you to set a target funding amount and goal date, and, through Amazon, holds the pledged money in escrow until the date set. If you meet your funding target by your goal date, Amazon gives you the money, minus service fees for both Amazon and Kickstarter. (The fees look reasonable to me, FWIW. But you have to remember the fees when you set your target.) If you don't meet your target, the pledges are refunded.

If you follow the link above to my BIF-C project over on sourceforge, you might notice that you can donate money to the project through pay-pal.

But why would you? You have no reason to trust me. Even if I took the time to make it look polished and presentable (whatever that might be), you don't have any guarantee that I would actually use the money to do more work on BIF-C.

You don't know who I am, and maybe it looks worthwhile to you, but you really don't know what anyone else thinks about the project.

If I put the project up on Kickstarter, I'm making a commitment to finish the project to a certain level, which I describe in my pages on the project. I'm putting my reputation on the line in a prominent way.

Moreover, you don't really have to rely on your own judgment alone. If I don't get a certain number of other people supporting me, you get your money back.

There are other ways that Kickstarter supports small-scale entrepreneurism, but these two points are, to me, the most important. Even though I don't personally know them and they don't me, they have provided an intermediary of trust.

But, ...

Amazon requires a USA credit card and address and bank account for their payment system.

(Never liked plastic money, didn't want to see the day it would become de-facto current money. GET OFF MY LAWN YOU YOUNG PUNKS! heh.)

Okay, I could claim a US address. (Have relatives in the States.) I could probably re-establish a relationship with a bank I used to use over there, maybe even get a credit card.

How do I tell the bank I used to use over there that I'm me? Send an e-mail? How do they know that the sender of the e-mail is not just a machine?

How do they tell me they decided to trust me (and someone over there who has an account there and told them that I'm me)?

E-mail is just plain, ordinary text. If you can read ASCII or Unicode, you can read ordinary e-mail. It has an envelope, but, speaking in physical terms, the envelope might as well be clear wrap. It's only intended to carry addressing labels, not keep prying eyes out.

That means that there are all sorts of people between me and the bank who could read that e-mail, people neither I nor the bank know, people that we have no reason to trust: people who work for Sannet (my provider) or the bank's provider, or Google or Microsoft or Yahoo or the North Korean government or some Nigerian ISP. (Sometimes e-mail goes almost straight from sender to receiver, sometimes it takes a round-about route. Otherwise, things tend to get stuck.)

(Oh, and, yeah, people who live in North Korea have to trust their government more than Google. It's not just about coerced preferences, they have no way of knowing enough about Google to trust them. And if you live in Nigeria, you'd better trust your ISP more than Google, or you'd better get a new ISP. Trust hangs a lot on acquaintance.)

And it's going to contain stuff like account numbers and passwords and other things that neither the bank nor I want to trust other people with. In the clear, where a random sysadmin for someone between me and the bank to see.

And that is not the worst of it. Since there is no handwriting in electronic communication, the mail could be intercepted, altered, and passed on. In fact, if someone interested in using my account for clandestine purposes (someone really bad) wanted to, he could invent mail to either me or the bank out of thin air. It's all plain text, and if no one checks my mail server or the banks before the logs are cleared, who is to know that the mail doesn't come from where it says it comes from.

(Handwriting. If you're thinking, pack up a gif of your signature, remember, that image can be borrowed by the same bad guy.)

PANIC! What to do? What to do!?!?!


Well, let's look at what is available. PGP provides some Pretty Good Privacy stuff. Maybe I can use it, but can you figure it out? I mean keys and algorithms and keystores, ...

keystores? huh?

Anyway, it takes two people (at least) to communicate. If you can't figure out how to use PGP, or if you can't afford the commercial contract and the IT support staff, it does you no good to know that it exists.

And it does me no good to know how to use gnupg, a free (as in libre) solution that is also available, at least when I want to talk to you.

Or the bank.

You see, the banks, for some reason (maybe related to "intellectual property" "owned" by Ronald A. Katz? Shot in the dark.), haven't tried to make communication using either PGP or gnupg available to their customers, for the most part. Instead, they rely on some of the hair of the dog that bit us.


You know how the web browser is not secure. You've heard all sorts of people tell you. They are too complicated. They have too many certificates, whatever those are. The have javascript, which is a security nightmare. Real Java, which would be (by no means perfect, but) much better, is not well integrated because Microsoft couldn't own Java (in spite of burning Sun down for it). (Oh, and C#, Microsoft's attempt to answer Java, well, it's better than javascript, we suppose.)


No, you don't really understand why. I could tell you why and you still wouldn't know why. But you do know that the Browser is not secure. At least, I will agree with you if you say you do. And you have seen Microsoft's Internet Explorer do funny things that you don't trust.


Well, a lot of the banks have gone to this company that built, not a single purpose browser, which would be the correct solution, but a clot of javascript that runs in MSIE and Apple's Safari (and, incidentally, Firefox, even on Linux). And they call it secure. 

They send it to you in an e-mail, as if that clot is any more dependable than plain text in an e-mail, likely from the parent corporation's IT department, whom you had never heard of until you got the e-mail. And they ask you to trust it. And what it does is send you to their server to get the "secure communication" from them.


If you're like me, you can look up the parent corporation and at least determine that the domain name is legitimate. If you don't know the "tricks" (technology, really) that I know, well, you end up trusting someone you don't know. 

And that is precisely what they tell you not to do relative to other clots of code that you've never seen arriving in your in-box from people with names that sort-of maybe look familiar, but you're not sure.

And all it does is connect you securely to their secure server. And you read their message over https (SSL/TLS). Which you could have done anyway. And they call it secure.


And what they use for an initial login ID, no, that is not supposed to be used that way. Puts the customer's data at risk. 

And the security theatre with the images they show you to "prove" they are they? PLEASE! That's not even they way that's supposed to be done, if you insist on doing that. There are better ways of proving themselves.


Then, just in case you forget your password or even your login ID, they tell you to specify a couple or three questions that end up being essentially alternative passcodes. And it's either/or, so the attacker gets three guesses instead of one.


And no human interaction. If you have problems, you have to call their toll free number (not toll free from out of the country) and try to work through their automated answering systems. In my case, my phone doesn't speak the same key-codes their machine does. (Are we still on pulse dial? is it still a couple of hundred yen cheaper here? Ouch).

What are they thinking of?


Signing up for Pay Pal is more secure, and more responsive.


(No I am not naming the banks because, from what I understand, most banks do the same thing.)


Maybe I'll figure out a way to use Kickstarter someday. Maybe I'll figure out a way to finish BIF-C on my own dime somehow. Maybe, someday, the mess that is the internet after Microsoft tried to own it will get straightened out.

A Simple Sandbox for Firefox

[Note: There are better ways to do this kind of thing, see
http://marc.info/?t=141848416000001&r=1&w=2  
and
http://marc.info/?t=141616714600001&r=1&w=1
for more information]
[Note: It's working in Fedora 15 after all. Did something get fixed in the last updates? 20120107]

Transferring my posts in Fedora users to my blog.

(Not yet sure how well this works, though.)

Taking a few clues from these old posts by kellyremo:

<http://lists.fedoraproject.org/pipermail/users/2011-February/392134.html>
<http://lists.fedoraproject.org/pipermail/users/2011-February/392136.html>

and doing this one step at a time, to avoid opening holes in my system (Being paranoid, I am not using the actual names from my system here.)

user9 is a user that I regularly login on.

user9-boxed is a user I just added, hardened password, but set to nologin, with home directory /home/boxes/user9-boxed .

user9 is a member of the user9-boxed group.

chmod -R o-rwx,g+rw /home/boxes/user9-boxed

Added a file: /etc/sudoers.d/77_boxers , owned by root, permissions go-rwx

Contents:
----------------------------------------------------
User_Alias USERDOER = user9
Runas_Alias USERBOXED = user9-boxed
Defaults:USERDOER !authenticate, always_set_home, set_logname, !preserve_groups
USERDOER ALL = (USERBOXED) ALL
----------------------------------------------------

I can sudo -u user9-boxed from the command line to my heart's content. Well, okay, tested lightly. I should probably see what gnupg would do.

I was able to do this from the command line:

xhost local:user9-boxed; sudo -u user9-boxed firefox

and get firefox running as user9-boxed. (Downloads to user9-boxed's Downloads directory, etc.) So I made a shell script, firebox, chmod-ed for +x:

----------------------------------------------
#! /bin/sh

xhost local:${1}; sudo -u ${1} firefox $2
----------------------------------------------

and running it as "./firebox user9-boxed http://www.fedora.org" today brings up a nice picture of a cute little dog wearing a hotdog bun. (Hmm. Yeah, the weather's hot these days.) Whatever. Firefox is clearly running.

However, pulling the firefox clicky icon out of the internet applications menu to the panel and editing the command hasn't gotten me good results.

sudo -u user9-boxed -- /usr/bin/firefox %u &

gives a "sorry, you must have a tty to run sudo" error in /var/log/secure . So does using the firebox command. But

xhost local:user9-boxed; sudo -u user9-boxed -- /usr/bin/firefox %u &

as the command gives no error messages in secure, but leaves a bunch of normal-looking messages in /var/log/Xorg.0.log . (Nothing stands out to me at any rate.) And no firefox session starting up.

ps wwaux | grep user9-boxed

doesn't show me any leftover processes.

For me and my children, I have no problem with using the command line version. My wife is not going to consider this fun at all, so I would like to make a clicky icon. Anyone care to offer a clue?

(I suppose I should look at Matt Hansens's comments on using PAM linked in the 2nd thread above, but that will be for another day.)
Then Andre Speelmans clued me in about requiretty, so the defaults lines will look like 
!authenticate, always_set_home, set_logname, !preserve_groups, !requiretty
and that seems to fix the problem with setting up a clickable icon in the panels to bring firefox up in a sandbox.

Like I say, I'm not sure this is as meaningful as it might seem. Not sure how much of the user environment leaks into the sub-user environment. Also, it would need a lot of work to be used in a corporate environment. (I'd be happy to do that for pay.)

[note (20120107)
The launcher command line for the icon in the panels looks like this:
./firebox user9-boxed %u ;
according to what I've described above.

I'm not sure it's quite right, but it seems to work. Oh, and I don't really put firebox right in my home directory, but I'll leave that as an exercise for the reader.
]

program bugs in context

A thread in the fedora users list on debugging html pages got me thinking about context, and I ended up posting this. You have to read it in context to follow what I'm talking about (if that's possible), so I'm posting the same here with some explanations:
Ten years ago, Japanese people who used the internet could (more or
less) read English, and Latinized (romaji) spellings of Japanese used
in urls didn't cause many problems either.
Twenty years ago, it was a common assumption in Japan that, programming languages being non-human languages anyway, English was the "proper" context language for all programming. The assumptions was so strong and ingrained that I was never able to sell my idea for a pre-processor for C that would allow the use of Japanese symbols, using headers that would contain suitable mappings between Japanese and English based variable, function, and macro names.

I think I have identified several reasons for that attitude.

One, of course, is that programmers tended to be not overly worried just by the mere sight of stuff that isn't their native language. (Not to say that they are all in love with the English language, just that they are not immediately threatened by discrete foreign symbols.)

Another is that it is (perversely) comfortable for them (and us, too) to isolate the entire technical context from their (our) day-to-day world. And English based symbols helps the isolation when English is not your native language.
These days, ordinary Japanese people use the internet, and the latin
basic set urls are just as meaningless as telephone numbers to them.
Less, perhaps. (Yeah, they get force-fed English in primary grades,
but that doesn't mean it is even comfortable for them to "read" -- and
comprehend -- new combinations of romaji.)
Yeah, that's what I do for a living these days.

(Not much of a living, and, even though I enjoy the work, I have to either change jobs or ask my poor wife to take full-time work. No money in it, no way to certify and get the same pay package that people born in Japan get. Without the bonuses, insurance, Japanese version of tenure, retirement plans, etc., no way to support even just two children through high school. You AET/ALTs who think you want to marry someone Japanese, be warned. You will have to find some other way to make a living, usually just when you get to where you can actually do the AET/ALT job reasonably well.)

Well, I try to avoid the force-feeding approach, but some of the students just aren't ready or interested. There are more teachers like me these days, who can make English less threatening, less of a trial and tribulation, more interesting, more fun. But we each have differing abilities to reach students, and there will always be at least one or two in ten who will not like English. No surprise, there, since even in the US there are students who don't like English.

Heh. I didn't like English in the primary grades. Not until my junior year in high school.

At any rate, the role of Japanese in URLs is not exactly limited to syntactic sugar.
On the other hand, simply allowing Kanji to be used in urls is going
to create as many problems as it solves. It would be almost easy to
fold hiragana and katakana, but not even possible to fold kanji and
kana. As a result, the ads you see in trains tend to show the katakana
or hiragana for a company's name in a search box, with the search
button being clicked.
Katakana is a kind of box-character phonetic writing system. These days it is primarily used for foreign (borrowed) words and emphasis. Kind of like italics are used in English. Hiragana, on the other hand, is more of a cursive phonetic writing system.

The two sets of characters are almost corollary, but native Japanese doesn't have certain sounds that are common in some languages, so there are a few characters (voiced "u", for instance) that exist in the katakana but not in the hiragana.

(I personally would like to research a reformed kana syllabary where all the permutations exist in both sets, but that sort of thing is definitely not in the standard Japanese character sets at this point.)


Just an aside, the roles of katakana and hiragana relative to foreign words sort of reversed before World War One and reversed back after WW II, in the processes of standardization.

And, lest we forget kanji, almost every kanji has more than one pronunciation. And almost every pronunciation that can be mapped to a kanji or a string of kanji has more than one mapping. Endemic one-to-one.
As Paul points out, we should solve our problems in the local context
first, since it's the one we best understand, and the one we probably
need most to work in.
That's such an important rule. It's founded in mathematics, or, at least, provable with advanced mathematics. So many wars and other social problems could be avoided and/or solved if we would all postpone our efforts to solve other people's problems until after we had solved our own.

Not talking about helping other people, taking about trying to solve their problems for them.
And then we try to figure out how to get things working in a broader
context, and at some point we have to resort to a layer of
translations (a human version of an API, perhaps?). 
APIs -- Application Programming Interfaces. These are the methods and definitions that a program module presents to the outside world, the interface by which the outside world "uses" or interacts with the module.
And our minds tend
to handle so much of this so well, that it's often a surprise how much
detail you have to add to mechanical rules. 
Mechanical, as in a context-free grammar or a state machine, with simple, straightforward rules that can generally be analyzed in a finite amount of time.
And then there are
problems that you just have to leave unsolved (and hope something
works out), like the issues with Japanese in urls. And that's when
there are no bugs.
This is the realm of the real world, unprovable systems that we use because, even though they are not proven, they seem to work.

Which is a long rant, just to say that, no matter how hard we try, the real world is never going to match our ideals.

I'm not saying we should give up on our ideals. But we do need a certain amount of flexibility to get along in the real world, including the flexibility to sometimes refine or even re-define our ideals.

The real world will always have plenty of problems to present us.

Monday, August 1, 2011

Ramifications of economic ethics and morals on the environment

Finally found the stuff for developing Google Apps (not Android) again. The free business accounts don't seem to have the link. So you have to look under the Account Settings of your personal google account.



Under Services, you'll see the App Engine, and, to the right of that, "My Applications". That's the link.

Waffling between starting with Java, which I have some experience with, Python, which I have played with, and Google's Go, which I really am not particularly interested in, myself, but, .....

SPLASH!

CRASH!   POW!!    
GASHAN!  GASHEEN!

Okay, okay, I'm still a little backwards on the Japanese onomatopoeia. Not reading enough  manga, I guess.

Daddy! The turtle's out! 

He knocked the tank over!

A family friend who has made an accidental hobby of raising turtles gave us one of the progeny a couple of years back.

Actually, gave us several, but the first two, well, they got stolen when we were keeping them out front. (We hope they went to a good home, anyway.) She later gave us another, and we keep that one on the balconey, and it's getting too big for the tank we have.

So we put water in an old medaka tank and put that on the lid of Spencer's tank, so he can't get out. But today he pushed the lid open far enough to knock the tank off the lid. It was time to go change his water and let him out for some exercise.

Cruelty to turtles. Yes. We can't afford a proper tank, with air pump and filtration, etc. I'd post pictures, but I don't want to get attention from the SPCTA. Bluntly speaking, I don't really make enough money to keep a turtle.

I don't really make enough money to keep a turtle.

There's something wrong in the world when an ordinary Joe can't make enough money to raise two kids and a turtle. 


What's that got to do with the economy and the environment and ethics and morals?

Well, we are getting to the point of having so many people that there's no more place for the critters. But the critters are important for the environment.

No, I'm not a tree-hugger in particular. I just notice that further refinements of our technologies are taking is, in every field, right where?

Biology.

And you say, so what?

Well, whether you call it nature and evolution or whether you call it God, we have a world full of advanced technology that we didn't invent. But we have convinced ourselves that,
if our hand ain't touched it, there ain't no point.
So we get tunnel-vision, focusing only on the inventions of our own hands.

But we keep finding that the things our hands haven't touched yet are the things that have the most value to us.

So, there's the conundrum, the dilemma:

If the economy does not expand, it contracts. If it contracts, scarcity reigns, and control freaks take over.

But we are clearly hitting limits.

Do we really dare risking having to re-boot the environment with our own crude technology?

Leaving a whole lot of questions begging, modern apartment buildings are too small to raise pets, even if the rules allowed it. But we have come to a point that the animals have no place besides where we are living.

Sure, we can talk about how vultures in the financials market force all the builders of apartments to do it as cheaply as possible, but that's just an excuse. Look in the mirror when you say "vulture". Look in the mirror when you excuse your corner-cutting on the competition and your investors.

Today's bottom line is important, but so is tomorrow's.

We need apartments with room for pets, because we, as a society, need the pets.

We need them for the future of the ecology, even if we think we can so casually squeeze people psychologically.

We need to move families out of apartments when we can, to houses with room for gardens, because the economy needs people who are somewhat independent, and because the ecology needs more plants.

We need to pay the guys at the bottom of the wage ladder more so that they can do this kind of stuff that keeps our society from imploding.

And we can afford to do it. The extra money is there, if we refuse to be scared of the mirage of the wolf at the door. If we have to see wolves, there is a wolf in the house and it is eating us alive because we refuse to let other people have enough economic room to make choices.

It is our duty to ourselves to quit trying to squeeze every last dime and penny out of every transaction.

Monday, July 25, 2011

Oracle's patent #6061520

I posted at groklaw on this and I want to keep track of what I wrote.


At the current point in the proxy skirmish that is the patent face-off between Oracle and Google, several patents have been overturned, and one has been allowed, with claims narrowed, as I recall. Several remain in process or waiting in the queue.

The one which I understand to have been allowed, well, for all that the patent office has allowed it, is quite typical of a patent that should not have issued.

US Patent 6061520 describes, rather ambiguously, a series of steps for applying the technique of code optimization known among other things as constant elimination by "pre-playing the code" (or "play executing"), applied to initializing Java classes.

When we write software, we generally include a large number of constants (numbers, text, and other things which don't change while the program is running). Many of these constants are used to set up starting values of stuff the program references (thus, to "initialize variables").

In order to save the computer some calculation time, we often pre-calculate these constants. Say we want to use π. We can approximate it roughly with

22 / 7
but that still is a division the computer has to perform. 3.1416 is much closer, but may not be as accurate as the computer can represent internally. We could also write it as
arctangent( 1 ) * 4
which will be very close to as accurate as the computer can get (without special help).

(Before I go further, I should note that the Java language contains the constant π, as java.lang.Math.PI , so this is a bit of a contrived example when talking about Java, unless we want to talk about the arbitrary precision java.math class, which introduces a whole bunch of arcane programming that this conversation would quickly get lost in. Not entirely irrelevant, but not useful for the conversation at this point.)

But taking the arctangent of 1 does not come completely free.

Wouldn't it be great if we could get the computer to make that calculation once, then use the pre-calculated result everywhere the constant shows up in the program.

Yes, we can. Usually. Sometimes. A lot, with modern languages.

The patent references an example of an array initialization:
static int setup[ ]={1, 2, 3, 4};
and then says some stuff that lets you know why Java has a reputation for slow startup.

In C, that array declaration would be simply the values 1, 2, 3, and 4 stored in sequence in a table of all the initial values constants that the C startup code just reads directly into memory. No calculation whatsoever. No loading constants to the stack just to store them. No dealing with individual values. It's just part of the machine code image and gets loaded en-masse into memory with the machine code for the program.

Pre-calculating 22 / 7 is easy. Most mature compilers of any language, whether byte-code interpreted or compiling down to machine code, have been able to recognize constant expressions like this since time immemorial, or at least since the early-'90s. That is, I used compilers that were developed in the mid-'80s which could do it. If I were in Utah, I have two old AT&T Unix machines there from that time period, which have compilers that do that much. I have with me now a Metrowerks C compiler from the early-90s that does at least that well.

The process is called scanning for invariants, and it often proceeds in two passes. One pass will see the 22 and the 7 as constants and the next pass will see an ordinary arithmetic expression involving nothing but constants, calculate the expression, and leave only the calculated result for the main pass of the compiler to use later.

Calls to functions are a little more difficult, because functions can have side-effects, but some compilers are able to at least work with standard library calls that are known to have no side-effects and are passed constant parameters, and have been able to do so since before Gosling and his friends started working on Java in the late '80s. (Microsoft C claimed it could do proper initialization, but their implementation was incomplete and not really correct during the '80s.)

The language Java is virtual, and is compiled class-by-class to byte-code. Byte code is kind of like standard function calls, and a little hard to predict the side-effects of sometimes. And then there was the question of where the constants should be stored, and, for some reason, with the byte code for the class apparently wasn't an interesting answer. So Java couldn't just generate the constants and store them with the compiled byte code. It had to store them within the instructions to explicitly initialize the array, one element at a time.

If I read the patent right, this patent is a specification for performing initializer invariance analysis in Java by the supposedly cheap method variously known as pre-flighting the constant space, simulated initialization, play execution (Sun's chosen term), and such, and for additional instructions which initialize the various data constructs of Java.

Except it doesn't solve certain difficult problems, just waves its hands about allocating a piece of memory for the initialization code to simulate its work on and building the initialization tables according to the effects on said memory.

I'm not sure why Java needs more than a block copy for the initialization, but they seem to think it helps overcome unnamed issues. Perhaps side-effects, volatile storage, and such?

This may be an improvement on one-at-a-time for Java, but not particularly new to the world of software in general, especially .

Pre-processing the source code for invariants is also conceptually at odds with the idea of interpreting byte-codes. (One of the design goals of Java is to refrain from programming devices like the C macro pre-processor.) In the end, I think it's a culture thing, but anyway, they didn't want to call it that.

At the time of the patent, many of the popular interpreted languages (certain BASICs, perl, etc.) did more-or-less what this patent talks about, and more. Some would set up a limited mock-up of the run-time, and compile the source into the mock-up, turn the initialization code loose, and look for constants that fall out. Then those constants would go into a table.

(Perl has a byte-code compiler, but it has not been very successful, in terms of saving the byte-code and running from that instead of from source. I think they got stuck in the same kind of places Java gets stuck in, and, instead of claiming a -- partial -- solution, just generally recommended not using those features unless you knew what you were doing. Still, Perl does compile to byte-code as it starts up, and it includes initialization constant evaluation as part of the compile phase, as I understand it.)

I re-read their method, and there is nothing either new or original about what they are doing. Maybe it was new to Java, but it was not particularly original. (I suppose I should go dig up the old perl newsgroup posts on the subject to prove it?) And the patent doesn't provide us with any clues as to what specifically was really innovative even if the patent is just to apply to Java as a language (a bit of a stretch) or just to Sun's implementation of Java.

I suppose they could claim that a bytecode instruction that initilizes an array is an innovation, but that would be just playing with words. A bytecode instruction is a function call, and many languages have function calls that do the equivalent. Class and object oriented languages build such functions as necessary for the class instance initialization, as this spec indicates.

Constant pre-evaluation is obvious and part of the state of the art, whether by play (simulated) execution or by the more explicit pre-processing methods of compiled languages. In fact, it is (and was at the time) among the implicit goals pursued as a language matures.

After several read-throughs, I think the innovation claimed is that they pick out the initialization code and execute only that against a pre-cleared, throw-away region of memory. But you still have to track which expressions are known invariant and make sure all the rest get executed after the first constant pass of the initialization. Or you have to limit the expressions allowed in initialization code. Java does both.

As to whether using a throw-away memory allocation to run the initialization code against, coming back from a break bringing in the laundry, I realize --

Any attempt to calculate the results of initialization code has to use a throw-away region of memory. Where else does one store the results?

And, as I said before, it's not really an innovation, when compared to what was available in other languages.

Come to think of it, I remember fighting with the Java compilers and wondering why the code I was writing looked okay by the spec as I read it, but kept being rejected by the compiler as containing non-final code. If I'd read this patent spec first, I'd have had a better idea how far one could go in initializations, and why things I expected from my work in other languages didn't work in Java.

I wonder if the problem is the confusion caused by incompatible use of jargon, as in "pre-flight invarant analysis" versus "play execution". (Or as in byte-code vs. p-code vs. pseudo-code [sic] vs. i-code vs. intermediate code [sic].)

Anyway, that this patent was not overturned is more evidence of the practical results that are making it obvious that software patents are at best wrong in their current form.

Too many software patents are just feature lists lifted from the marketing materials, and dressed up with just enough technical information to make it look interesting and unusual, but not including enough information to implement, and not including enough information to determine the pre-requisites of patentability: originality and innovation. (Whether software patents can be otherwise is a rant for another day.)

Saturday, July 16, 2011

What was the Thriller?

 [This is part of a meta-thread on Love and Romance.]

The 8th grade (middle school second grade in Japanese) English teacher I work with this year used Michael Jackson's Thriller in his relax-before-summer classes last week. (Summer starts a couple of days early this year.)

I was watching, and remembering dancing to it way back when. And I was thinking, man, this is chauvinistic.

Well, okay, it was Michael Jackson, struttin' his stuff, being his version of the alpha male. I would have liked it better if his date had been dancing with the ghouls during the credits. (Maybe she was? Too dark to tell. Who was she, anyway? Ah. Ola Ray, and, no she wasn't dancing in the credits. Darn.)

Working through the lyrics,
Cause this is Thriller Night
isn't bad grammar after all. I remember the lyrics always felt bumpy in my head, but I don't remember whether I figured out back then that the lyrics were saying it was thriller night at the theater. Half-memories there.

The Japanese translation we were working from missed the jokes, and plays it, near as I can read it, as straight horror. The line,
To terrorize y'alls neighborhood
is translated with the familiar form of "you", kimi, but ignores the southern sense of neighborliness in the word. (And Vincent Price did such a good job slipping into the drawl and back out.)

And then there's the give-away stanza,

And whosoever shall be found

without the soul for getting down

must stand and face the hounds of hell

and rot inside a corpse's shell.

that just gets completely lost. The "getting down" is completely missed, and the rest is mixed into other places, as if the translator were looking for some relative/conjunctive pronoun and reference that just isn't there.

It isn't there because this is it, the reference, right here. This is the verse the whole thing pivots on, the lines that bear out Michael Jackson's initial assertion that it isn't intended to encourage a belief in the occult.

David Bowie said it more directly, but this is what the whole video was all about:
Let's dance.
And the difficulty that young men have getting that invitation into words.

Well, one of the problems with horror as a genre is that it is usually misunderstood. Much like the rest of art.

Wednesday, July 6, 2011

this and next

I was talking with one of the teachers I work with about this Friday vs. next Friday and why it may be best to just avoid the word next in general, when teaching English as a foreign language.

And I realized what the semantics issue is.

When you're in between bus stops, it's a little bit hard to talk about a this stop. Maybe you think, going forward in time is closer than going backwards, but most likely that's just thinking too hard. And if you hear someone trying to argue that the next stop is the one after this one coming up, well, maybe you figure someone prefers arguing to communication.

Now it is true that there is always a this Friday, even when it is today or tomorrow. But the ambiguities are there.

Next has at least two, slightly different meanings, and a conversation could get lost in the gap.

Monday, June 20, 2011

meanings of "love"

[This is part of a meta-thread on Love and Romance.]

Lyrics to a song by Heart playing in my head on the way to work this morning:

we gotta look right at at each other and say it
turn on the radio and replay it
and fall in love again
we gotta be friends

 (I think my memory is pretty close there.)
The lyrics to the songs on Dreamboat Annie cover a broad chunk of the spectrum of the meanings of love in blue collar society, some ("Love Me Like Music") relatively positive and some ("Magic Man") not so much so.

The title cut, of course, ...

good music.

Anyway, I was thinking of the people in the band and how misinterpretations of the principles of love tend to be all tangled up in most of what ails society.

Sunday, June 19, 2011

the new greed

(I've said this before, but maybe I can make more sense this time.)

There is a new kind of greed in evidence.

I'm not talking about food. Not talking about money or material things. Not really talking (directly) about power.

Well, yeah, it's about power, and it's indirectly about the rest, but we've learned to hide all those obviously evil greeds from ourselves.

Bill Gates and company, back around the y2k fuss, started a publicity campaign called "Freedom to Innovate". (Links to this kind of stuff tend to disappear as the people who pull these gaffs realize what they've done in public.)

The first time I saw Microsoft waiving the US flag proudly on their web site and demanding their (not our) freedom to innovate, calling the campaign "grassroots", pretending that this was what "the people" wanted, I about fell out of my chair.

At the time I was avoiding blogging like the plague it is. But I sure wanted to jump all over their "Freedom to Innovate Network" and ask

Where is MY freedom to innovate? I have an OS and a runtime and an application paradigm that make the Mac OS in all its expressions look pale and tired. (Should be implicit that Microsoft's software was not even in the same game.)
Fiscal realities are keeping that locked up in my head. Those fiscal realities include Microsoft's anti-competitive behaviors.
You've had your freedom to innovate, you've had it all over the map, and you've blown it in a non-deterministic loop. (Random. Random.) You've had your turn.
Where's my turn?

Well, Gates's blind spot there could be viewed as evidence that he is, in fact, a geek. Hubris. The assumption that, just because it makes sense to you it must be logical to everyone.

And there is the greed:

I want to do it all.

And the reasoning behind the greed:

My thoughts are God's thoughts.

Okay, no one in their right minds is going to be that blatant. How about this:

I understand what is right and wrong.

Actually, that's not a bad point of view. We all have to believe that to a certain extent. It's the applying the logic of sequence to that when we only have the first example (close to) correct.

This is the greed
  • To want what is inside our own head to apply to everyone else. 
  • To want to justify ourselves by (1) justifying our understanding of the world around us (our religion, really) by (2) making it apply to everyone else.
Incidentally, this is not what missionary work is supposed to be all about, even though evangelism is often (mostly, in the present tense?) misunderstood to be the attempt to impose one's personal religion on the rest of the world.

What does this have to do with the economy?

Well, it's the wanting to do it all. The unwillingness to share the "jobs that matter" (whatever we perceive them to be) with other people.

The thing that is most scarce in our current economy is not food, not material stuff.

The thing that is scarcest is jobs.

Now you know why.

Sunday, May 22, 2011

Exposing myself on youtube

Just put my first video up on youtube. It's a song I put together last year using Garage Band and Sound It! and the internal mike on my iBook G4 (that has since succumbed to the zombie graphics chip symptoms), together with a bunch of shots I took of my efforts to get Fedora running on my even older clamshell iBook.

The interesting part where I got Mac OS 9 to revive itself didn't fit into the song.

Unfortunately, the 30G hard drive that I pulled from the white iBook G4 and installed on the tangerine clamshell died fairly quickly after the transplant. The G4 has since died, so I may pull the 160G drive I put in it and put that back in the tangerine so my son can use Fedora on it again. (He uses an old Mac OS X for now, with the tiny 5.6G drive the tangerine came with. That tangerine seems to be indestructible.)

Wish I could afford the tools to fix the G4.

Monday, May 2, 2011

Passed the JLPT.

Just for the record.

Heh. Maybe I should scan the "certificate" they sent me and post it. (Use the Gimp to wipe out the private information. Hahahahahahahah. What use would that be, other than to show the world what it looks like. Maybe not. I'm not sure the testing company would appreciate it. I had to sign an NDA to take the test. Seriously.)

It took about two and a half months to find out, from December 6th to Feb 14th. (Hah? Valentine's day? Did it realy come that day?)

I thought I had maybe just barely passed it. But my score turned out to be, by the curve, a B grade. Not bad for my first and last JLPT certification.

Oh. I went for the top level, level N1, just because I was too impatient. So there's nowhere left to go but the Nihongo Kentei.

Which may not be a bad idea, but I'm going to try to get the LPIC levels 1 and 2 first. Studying for it seems to be a good way to fill in the gaps in my sysad knowledge.