Monday, May 26, 2008

A Phone Call From Ralf

Today I recieved a phone call from Ralf, a friend of me and some of my other acquantances. The thing that was unusual about the call was that it was the first I have recieved using Voice Over Internet Protocol (VOIP) / Session Initiation Protocol (SIP). I've placed many outgoing calls in the past but never recieved any till today. The call was using the services and accounts of the Gizmo Project (http://www.gizmoproject.com) by both of us.

One of the cool things I like about Gizmo's service is that if you are not logged in with it, and you recieve a call, they will email you a .wav file of any voice message a caller leaves for you, effectively turning your inbound email into an answering machine. I've played these wav files with mplayer while browsing my email's web interface with Lynx. I consider this an indication of keeping things interoperable by sticking with basic, universal protocols and formats.

I'd just gotten outgoing calls using my Gizmo account to work yesterday with the Linphonec client, from the Debian Linux distribution package linphone-nox. This particular client is a text console application that simply presents you with a prompt to type in commands, and does offer a 'help' command to get a list and further details of possible commands as well as tab completion. In general the commands are fairly straight forward, but I do have a few complaints. It does not respond to 'exit', you must type in 'quit' to leave the program. There is no command to toggle muting on the microphone, so I have to put it in a wrapper alias to handle this with an 'amixer' command I figured out to work with my particular sound card. This probably varies from soundcard to soundcard. Also there is no direct command to dump the call log (the output of the 'call-log' command) into a file for saving. There may be a switch, '-l ' to handle saving the logfile, but that will need to be folded into the wrapper alias, so it has to be thought out a head of time.

One of the things that was notable about the call was that it traversed three firewalls, two of them performing NAT (Network Address Translation). There had been some adjustments to these firewalls to handle the outgoing calls, but apparently that was sufficient to enable incoming calls. NAT is frequently considered the bane of VOIP, but apparently, at least on a limited scale, it can be dealt with.

Anyway, before the day ended I'd recieved several other calls from Ralf and another friend further confirming that the combination of software, hardware and protocols provided functioning telephony.

Wednesday, April 30, 2008

Quick and Dirty TV Tuner for VLC

I'm partial to mplayer for most of my video and other media playing, but found myself using VLC a lot recently to verify that a V4L (Video for Linux) compatible 'PVR' (Personal Video Recorder) card had proper driver installation and was functioning correctly. I was frequently picking 'File / PVR' and entering

pvr:/dev/video0:channel=0:norm=ntsc:size=640x480:frequency=561250

something I find as awkward to type in as you probably would also. This sets the PVR card to 'channel' zero, the TV tuner, sets it for NTSC broadcast format, a typical screen pixel size, and a frequency from the standards that tunes to the local broadcast channel 28 (KCET, Los Angeles, CA). Fumbling around some, I figured out how to save this as a playlist, and since forgot that process.

But what I did remember was the format that the playlist was in. I used that sample playlist file, the information at http://en.wikipedia.org/wiki/North_American_broadcast_television_frequencies and created a 'TV tuner playlist', stashed online at http://www.lafn.org/~aw585/na.tv.channels.pls

The first few entries are what I want for a default channel, both the 'proper' and 'actual' frequency (perhaps the card or Wikipedia still needs some adjustment), entries for S-Video and Composite settings for the PVR card, and then settles into the standard North American channels in proper order. Using information online at Wikipedia it can of course be changed to personal/local needs. Someone more knowledgable about TV technology can probably suggest improvements on the playlist/table presented.

You can select from the VLC control panel 'Settings' / 'preferences' / 'playlist' and enter your local name of the file ('.vlc/na.tv.channels.pls' in my case, stored in the .vlc subdirectory of my home direcory) for the default playlist and save to get the first entry to start on VLC startup.

This leaves a lot to be desired as an interface, but you just click on the previous/next stream graphics (double arrows) to move up and down the North American TV bands. It sometimes seems to need double clicks to get past some 'humps' going down the bands past stations, but it is functional as a quick hack!

Tuesday, April 29, 2008

Ubuntu Battle Prep

I've ended up doing several Ubuntu installs lately, and find I have to go through a preceedure to get some favorite tools installed while trying to dig out information and solve problems.
  • Edit /etc/apt/sources.list. Make a second copy of all the default sources installed, and change on all the copies 'http://archive....' to 'http://us.archive....', to give some quick and easy extra depth to the available Ubuntu .deb package archives.
  • Immediately 'sudo aptitude update' to ensure access to the latest packages.
  • edit ~/.bashrc, including lines with:
    • set -o vi
    • export IRCSERVER='irc.freenode.net'
    • export IRCNICK='mr_dallas'
    • alias realias='vi ~/.bashrc ; source ~/.bashrc ' ;
  • sudo aptitude install screen lynx-cur tinyirc ckermit gkermit
  • edit /etc/lynx-cur/lynx.cfg, adding 'TEXTFIELDS_NEED_ACTIVATION:TRUE' (this and the below changes to lynx options move lynx from klutz to 'thought control' mode for rapid googling of answers.)
  • edit /etc/screenrc, adding
    • 'escape ^Oo' # this avoids a lot of conflicts of screen with other programs
    • 'startup_message off' # for less noise when starting screen
    • perhaps beefing up 'defscrollback' to maybe 4096.
  • startup Lynx, go into options ('o')
    • change it to advanced user mode
    • turn on 'vi' keymode
    • For the number pad set 'Links and form fields are numbered'
    • check the box to 'save options to disk' before accepting changes
    • Go to and bookmark my private portal page, where I have many usefull links and forms.
This doesn't by any means duplicate all my environment on my personal machine, but it gets some simple tools that help quickly hunt for answers and solve problems available.

Saturday, April 5, 2008

Open(ing) ID(=)

The other day I was editing a personal, private portal page I've created for my own use. It has a lot of features I've been experimenting with such as accelerated login to some services by way of simplified login forms, search engine forms with a single search field set up so just hitting enter in the field starts the search etc.

I was checking the proper HTML for internal fragment links, recalling that a quick reference book I had the form '<A name="....' and some examples I had on another web page had '<A id="....'. This triggered a chain of thought when I was looking at another page, and noticed that 'id="'s were sprinkled all over the place in the HTML - if you don't believe me, just take a look at the source for http://en.wikipedia.org. So - could I tack #xxx's on the end of a URL and have it go to some spot corresponding to the arbitrary piece of html in a web page.

The answer for Lynx was yes, and some checking seemed to indicate the same held true for Firefox as well. Everything up to this point may seem obvious to someone with more in depth knowledge of HTML. My next thought though, was that I'd like to make it easier to bookmark a page with a more specific location added as an HTML fragment to the address.

A few hours of work on the idea turned out a modest sized script that can be used as an EXTERNAL for Lynx. It strips out the name= and id= fields of a web page, reformats them in to #<name> #<id> fragments on the URL and pumps both lists wrapped with appropriate HTML into Lynx for browsing/bookmarking. When you're finished, just exit Lynx to resume where you left off. An example of what gets kicked out when you run it on http://www.google.com:

This may not seem too important when used on such a deliberately simplified page, but it makes it much easier to bookmark the search field for http://en.wikipedia.com as an example. One weakness of this is that since most browsers make it relatively hard to bookmark such a specific location in a page, these are probably more subject to change with the whim of the HTML coder and/or their coding tools.

'name=' didn't seem to be noticed by the browsers I checked with, but was used in the example in the reference guide I looked at, so it may change in the future (or changed in the past.). I left it in the script. Some example pages I checked set 'name=' and 'id=' the same on many HTML elements. Glancing through the quick reference on HTML I found several elements that specificly allowed 'id=' attribute: <A>, <DIV>, <LAYER>, <PARAM> and <SPAN>. But on closer inspection, I found many listed a '%coreattrs', and when I found that in the guide it included besides 'id'; 'class', 'style', and 'title'. %coreattrs pretty much busts wide open the elements that can have 'id' attributes - <FORM>, <UL> etc. I used this to simplify the HTML in my portal page that triggered this discussion, rolling fragments for internal navigation into lists that group related links/forms.

This also is an example of a subject I've railed about in person on occasion, that web pages are subject to different interpretations ("renderings") depending on circumstances and the goals of the 'viewer'. This extreme view provides a list of everything I can think of that could be linked to on a web page.

I've pitched the script temporarily at: http://www.lafn.org/~aw585/microBkMrk

7 April 2008 Addendum:

    A few other points about this topic:
  • Since I suspect that the fragment addresses will be more subject to change than a base address for a page, it may be more important to monitor pages bookmarked/linked to in this manner for changes by whatever means.
  • Conversely this is yet another way to view of a web page that can be hashed/'fingerprinted' to monitor for changes in the page.
  • It might be usefull to dump out a few more attributes and maybe the element they are part of for the IDs and NAMEs, to provide a more human readable overview of the page, many of which are generated by tools that provided the author with a very abstract/high level relation to the html. In other words, he never actually saw the html, and there was no thought to anyone needing to look at it. This provides one view that summarizes features of the page. There are probably quite a few features that could be added to this tool.
  • From an accessability/usability view point, this might save repeated thrashing with a page. Someone might fight it out or get help a first time, but then by finding a precise spot they can either bookmark, link to or just go to with a #<fragment> address, they can effectively reuse the work of initially understanding how to navigate the page. This isn't neccessarily a result of a poorly designed page, but could in some instances merely be because of the nature of the information being presented or asked for. The full implications of this remain to be seen.

Tuesday, March 18, 2008

Breaking News

Tonight I finished reading "How to Break Software" by James A. Whittaker, 203 (C), ISBN 0-201-79619-8. I think the book is/was used as a text book on software testing at Florida Institute of Technology.

    There were a couple of things that stuck in my mind from reading the book.
  • Ultimately, and conceptually most accurately, all 'application software' interacts only with the Operating System. It is one job of the Operating System (OS) to provide access to various forms of I/O and other resources to the application software.
  • When this book was written, various special testing applications were used as wedges between the software under test and the Operating System to supply bogus I/O and envirounments to the tested software as part of the test program.

The time period since this book was written has seen the rise of OS virtualization in importance. Perhaps this has already been worked out, but it seems the ability to dynamicly inject I/O reactions and make arbitrary changes on demand to the the percieved environment of the application/OS system seems to be a logical developement to OS virtualization. By this I mean to literally dial in/make changes on the fly. This would effectively replace these 'wedge programs' with virtualized OS's, and would also extend the testing methodologies Whittaker documents to prepackaged app/virtual OS bundles.

Also I can't recall much in the way of specific web application testing information in the book. Sun proclaimed "The network is the computer", and the client is as much a part of that computer as the server and any intermediate routers are. One continually hears about the difficulty of testing web applications against all possible browsers the people out in user land may be using. An ideal client would of course adhere to all web standards strickly, but today no one is using such an abstraction in the real world. An ideal *test* client would be able to dial in the actual behaviour of all real world browsers as well as the ideal, perfect standard complient browser. Such a test tool would not only be a breakthrough in web testing, but the ideal chamleonic browser for the user, to deal with all the weird, poorly tested 'web apps' on the Internet.

Perhaps someone out there knows more about these subjects and can expand on these thoughts.

Friday, March 14, 2008

Let's be Frank

Continuing on about the Aloud talk, 13 March 2008, by Robin Wright. The moderator for the presentation made some mention that "some people think Rock and Roll brought down the Iron Curtain". This triggered a memory.

I was at a party some time in the late 80's. A woman asks if I've done anything important lately. My response, ~"I saw a Frank Zappa concert". Her response - eyes begin to bug out, face changing color, with a look of total outrage, "Well, I hope you *Rocked Out*....." and a tirade of abuse vented till it ran out of steam.

I want to go on record now, before the world, for all time. I not only glad I saw Frank Zappa while he was alive, I consider it at least on par with touring the Getty Museum or Rome/Vatican. I'd say the same for Carlos Santana, Wynton Marsaillis and Miles Davis, but those are other articles to be written. I understand there are college classes/symoposium to study Frank Sinatra and Madonna - Zappa is at least as worthy.

Producer Tom Wilson thought he'd latched onto an American equivalent of the Rolling Stones, some white guys forming a blues band, when he heard "Trouble Every Day" (about the Watts Riots of the 60's). This idea was greatly changed when he heard "Any Way the Wind Blows" and "Who Are the Brain Police". The list of ~"people who have made this possible. Please do not hold it against them" on one of their first albums was a cultural education most colleges barely begin to match.

Besides dealing with musicians from Edgard Varese, Zubin Mehta, Pierre Boulez to Johnny "Guitar" Watson, Zappa created satire on the level of Groucho Marx and H.L. Menken simply by singing about topics from the Illinois Enema Bandit to Senate hearings:

"Government is the entertainment division of the military industrial complex."

(rock journalism is) "people who can't write interviewing people who can't talk for people who can't read."

and on and on....

But just google "Vaclav Havel" and "Frank Zappa", and you'll get hundreds of hits. Zappa's "question authority" outlook, coupled with his free use of traditional and avant-guarde elements of Central and Eastern European music, putting it in a context of where freedom held sway, provided an inspiring alternative to the "Socialist Realism" the public was expected to buy into during the period between the 60's Czech crisis to the final fall of Communism in Europe. He was labeled "Underground" in the U.S.A. when the public noticed him, but fueled the real "Underground" in societies where the problems were much more serious then some of the silliness he lampooned.

Nerdistan

One of the things I created this blog for was to discuss some of the "ALoud" talks given at the Los Angeles (City) Public Library sponsored by the Library Foundation of Los Angeles. Today, Thursday 13 March 2008 I was at a talk by Robin Wright, who'd recently completed the book 'Dreams and Shadows: The Future of the Middle East'. A podcast of here talk should be up soon, I'll probably post an addendum when it is.

One of her goals in writing the book was to try and find the "Lech Walensas, Nelson Mandelas" of the Middle East. She gave some interesting stories about people committed to fighting the injustices of the area, getting out of prison only to return to the same kind of protests they did time for, but perhaps the most interesting aspects of the story was something she hit on early in the talk. This was referred to by one of the audience questioners as "Nerdistan". In most Western Societies, most people take it for granted that governments are generally benign, but this has largely been the exception in overall human history. (You might want to check out http://en.wikipedia.org/wiki/R._J._Rummel) Basicly, people in the Middle East are using high technology to bypass government controlled media and organize public outrage against injustice and corruption. Wright discussed one example of people video recording government thugs trying to intimidate voters, blogging it, and eventually the videos making it's way to Youtube. In another case people organized protests texting messages by cell phone. As we've learned with things like the Rodney King video, the act of recording governments in action and showing it to the public can sometimes have explosive effects, for good or bad.

Sun Tzu, in the "Art of War"'s last chapter talks about the importance of information in armed struggle. Perhaps the most titanic historical event of my lifetime, the Cold War, while definitly having some real deaths by physical struggle, was largely fought at an abstract level with the Venona Decrypts, spy planes, satillites, submarines, signals intelligence, defectors, etc. We're beginning to see the implications of information getting into the hands, and control of the common man, the pen beating the sword into submission.