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.

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

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.