Saturday, May 28, 2011

Learning Java

Well, I'm finally learning Java.

I've taken half-hearted stabs at it before, but stalled out each time.  I've got several good Java books.

I've written a production Java application at work.  It's somewhat of a mess, but it mostly works.  It transforms some XML.  The XML I get to feed into it is hard to work with.  It has unquoted entities, bare ampersands, which I had to preprocess to get it to work at all.

I also found that javax.xml.stream.getLocation() doesn't really return a useful offset into the document of where an event occurs, but rather where the parser currently is at.  Not very useful.

I think the mindset of having a getLocation() method that returns an internal value not interesting to users of the  Class is a problem that is typical in Java class implementors. I know the IDEs will create getter and setter methods for you almost automatically.  I think for good OO design, you'd be very reluctant to expose an internal value 'location', but it's so common in the Java world just to throw in getters and setters without regard to their use that they just do it.  Really, you might need to have an internal pointer used by the parser, but getLocation() should return an actual pointer to where the event was detected in the stream.

In my Java studies, I've found a lot of great resources on the net.  I think I've found none better than this site, though.  I don't know about you, but I love real world examples in real world programs that I can build and run.  That's what this site has and it has the good examples indexed by language features, which could save me a lot of research.

One thing that really bums me out about Java is all the damn boilerplate.  Some say that a good IDE takes care of that, but really, all the clutter in your typical Java program makes it hard to read.  There should be some kind of pre-processor or macro facility in Java to help deal with this.  We should be able to do something like:

define println System.out.println

in a program and not have to type sop (in NetBeans) to expand that.  Clean, clear source should be a goal, not just a nice to have.  Most real programs spend a lot more time in maintenance than in development and the easier they are to pickup and maintain the better.

I guess ideally, there'd be support for first-class procedure objects that would allow you to capture a lot of this boilerplate in ways that could be inspected and manipulated by programs. I think something like Clojure might be an interesting thing to investigate. A lisp-language that integrates with the JVM might give you everything you need in terms of clarity and simplicity.

One pretty serious indictment of Java is that they implementors found that there was need for overloading in operators, specifically '+', to make concise coding for building strings from many different data types, but there's no provision for doing your own operator overloading. I could see why the mess that occurred with C++ and operating overloading might have frightened them away, but I think that resorting to features not available to users to make the language more expressive is indicative of a weakness that they should have addressed.

Thus, Ruby developers like to capitalize on their ability to define DSLs (Domain Specific Languages) to express idioms for a particular application area. The best Java developers can do is build APIs, but you are often stuck with huge towers of complexity, with factory methods and the like. Just seems like too much work.

I wish there was more support for the kind of programming I do a lot, programming in the small. I'll need a quick tool to perform set operations on a list of files, on the filenames themselves or the contents of files. I'll need to generate a list of files that is the union of two sets of files, checking if the files are the same and renaming if not, for example. Or, extracting content from a set of files and matching a field found in one set with content found in another. You know, quick and dirty "database" operations with data in files. Database types actually advocate setting up database tables for this kind of thing and doing your selections using SQL, but that seems like overkill a lot of the time. I can run up Perl or a shell script to do this kind of thing all the time. I can be half done before you can type 'public static void main(' (OK, in an IDE, that can be generated for you or is a few key strokes, but starting up an IDE is a big deal sometimes, too).

Tuesday, May 03, 2011

Avoiding endless arguments

Sometimes, you just have to cut ties with those things that bring out the worst in you. Certain debates bring out the worst in me. I can feel my anger rising and I'm more likely to reply without careful thought.

When you are convinced you can't get anything from debate on an issue, better to skip trying.

Saturday, April 16, 2011

Interesting perspective on jobs and the iPad

http://www.geekwire.com/2011/rep-jesse-jackson-jr-antitech-rant-blames-ipad-killing-jobs

He doesn't blame the Kindle at all, which surely must be at least as responsible for the downfall of Borders as the iPad, but that's beside the point.

How is this any different than any other technological change that shifts and eliminates jobs? Surely, publishers won't need as many people in printing and distribution. Authors are moving away from using publishers at all and going more directly to readers, which will certainly lose jobs at publishing houses. Any jobs created in technology in the US will move away from booksellers and record shops in the communities to places like Cupertino or Seattle.

I'm really not so sure that his concerns aren't valid, at least as valid as any concern about changing technologies, particularly considering it seems we don't manufacture many consumer goods anymore.

I don't know what can be done about it, though.

Saturday, March 19, 2011

The Cluetrain Manifesto - 12 years later

I was always skeptical of the The Cluetrain Manifesto, but I did like the energy and optimism of it all, so I didn't say anything negative about it in public.

Did their predictions come true? Almost entirely no.

The one that I find most hilarious is #74:
  1. We are immune to advertising. Just forget it.
What is the most successful Internet business? It's Google and they make pretty much all their money from advertising.

They also predicted that organizations that opened up their practices to the public, that shared everything about their products would be the most successful in the next few years.

Apple keeps practically everything secret and doesn't allow their developers to share anything and they are succeeding wildly. Sun, on the other hand, tried to share everything and sank in the marketplace.

The Manifesto was right about networking allowing the sharing of information in ways that weren't possible in the past and how this will cause big changes. Twitter, Yelp, Wikipedia and Wikileaks come immediately to mind.

I also think they are right that companies that talk with a human voice will be more successful. I think one of the secrets of Apple's success is that people feel that Jobs speaks directly to us, in a human voice.

Saturday, May 15, 2010

Big Hubris

Over at Bill Geist's blog:

"Seriously. Was there NO ONE in the brain trust at GM or their PR agency saying, ummmm, "hey, Ed...I think someone might challenge your claim that you've paid back all the federal bailout money?"

Or is the culture so toxic there that no one had the nerve to speak up?

...

Yeah...by using other federal funds.

What is it about running something big (a company, the government, etc.) that makes people at the top think everyone else is stoopid?"


HT: Tom McMahon

Friday, April 30, 2010

Fair use fairly important

A study to counteract all the baloney from the Content Cartels when they scream about how much they are losing to the "Theft" that is unauthorized copying.

HT: Karl Lehenbauer

Sunday, December 27, 2009

Google translate good for chess (at least from spanish)

I found the blog http://comentariosdeajedrez.blogspot.com/ recently. The authors posted a comment on the Google Group 'Chess Library' about a blog posting on the development of the use of time limits in chess.

Not being a spanish speaker (or reader), I attempted to use translate.google.com. It did an excellent job and I find I can understand all the posts there. One interesting thing is that it translated Spanish algebraic chess notation to English algebraic chess notation. For example, Cf3 was translated, correctly to Nf3. Pretty handy.

By comparison, babelfish didn't do nearly as good a job at the translations, and did not convert the chess notation. Here's a comparison of the translations:

Babelfish:

Until half-full of century XIX, the chess games were juegaron without no limitation in the necessary time for the examination of a movement.

Translate Google:

Until the mid-nineteenth century, chess is played without any limitation in time for consideration of a motion

This looks like a great site, by the way. I greatly appreciate their historic posts, which seem well researched and interesting. I'll try to follow it, using translate.google.com, of course.

[Update: Tried Microsoft Translator from bing.com. It didn't do well in the translation. Confusingly, it translated some of the chess notation correctly and some not correctly and strangely used mixed case in the chess notation that was not in the original Spanish text.

Actually, I'm reading the translation now more carefully with translate.google.com and it appears to get confused in the translation of spanish algebraic to english algebraic also.]

Monday, December 14, 2009

Sunday, December 06, 2009

Google burying climategate in a turn toward evil

Google is famous for favoring left leaning sites and causes (see link below).

Now, it seems, they are trying to bury climategate.

It's often seemed to me that blogging about things on blogger, a Google facility, appeared to help the page rank. I wonder if this will be buried also?

Guess I'll be switching over to Bing.

Tuesday, November 24, 2009

Jonah Goldberg on CRU scandal

You should read the whole article. Here's a particularly good paragraph:
This should be considered not merely a scientific scandal but an enormous journalistic scandal. The elite press treats skepticism about global warming as a mental defect. It uses a form of the No True Scotsman fallacy to delegitimize people who dissent from the (manufactured) "consensus." Dissent is scientifically unserious, therefore dissenting scientist A is unserious. There's no way to break in. The moment someone disagrees with the "consensus" they disqualify themselves from criticizing the consensus. That's not how science is supposed to work. Skeptics who've received a tote bag from some oil company are branded as shills, but scientists who live off of climate change obsessed foundations or congressional fiefdoms are objective, call-it-like-they-see-it truth seekers. Question these folks and you get a Bill Murrayesque "Back off, man. We're scientists."

Saturday, February 07, 2009

The Great Depression and how we got out of it..

There's been a lot of discussion about how to get out of the Recession and how we got out of the Great Depression.

A lot of focus is on the New Deal and Government spending. Others say it was the War that jump started the economy.

I've read some on it and I think there's a perspective you hear sometimes, but doesn't get enough play. The US economy in the late 30s was terrible and getting worse. The economy in the 40s was better by some measures. Sure, GDP went way up, but we were building tanks, planes and ships. Standard of living was terrible during the War as you would expect.

What happened to the economy when the War ended? In '46-'48 there was high inflation and then a bad recession hit with high unenployment. It appeared that the Depression might have come back. What happened then? The economy picked up as markets started opening world wide for US goods.

I'm no economist, but could it have been the case that it was the destruction of world-wide productive capacity (primarily Europe and Far East) during the War that accelerated the US economy out of the duldrums? Perhaps this continued until the bad economies of the late 60s/70s? Not sure what happened during the 80s/90s, but I think maybe we've been living on debt during that period and the basic realities of the economy haven't changed.

It's cautionary. If we have another Great Depression, will there be pressure for us to use our status as the only Superpower to start or encourage the start of a Great War? A War that would diminish world productivity to our benefit?

Saturday, January 03, 2009

Madoff and those who invested

I've been reading some articles on the Madoff scandal and I haven't heard this opinion stated, so here it goes.

I think that some (many?) of the people who invested with Madoff thought they were benefitting from a network of connected people. With his secretive investment strategies, his reputation and his consistent returns the investors could assume that Madoff was getting inside information from other investors that they couldn't act on themselves, but could reap reciprocal rewards from other insiders who similarly helped guide Madoff's investments.

It was just insider trading, once removed. It was a scam on Madoff's part, he wasn't brave enough to actually DO that, but that's what I think he was selling. Whenever you look into what he said he was doing to make such consistent returns, it didn't make sense, so "smart" money would assume he was doing something he couldn't talk about.

Insider trading is such a complex subject. I think, more and more, I'm coming around to the view that we should abolish insider trader restrictions. I read an opinion piece on insider trading in the WSJ a few years back that took this stand. I was suprised to learn a few years back that they are a fairly recent invention, going back only to the 60s. Used to be, CEOs were rewarded by insider trading, but their trades were all public (still are), so you could follow them. Sure, they were front runners, but shouldn't someone who worked hard and came up with a winning strategy be rewarded? Note that in this world, the CEOs (and other well-connected people) typically made money only when they did well for their companies. Now, we have these arrangements where CEOs make many millions whether their companies prosper or not.

Getting back to Madoff, here's my takeaway. The "smart" money, the big players who were investing with Madoff knew (or should have known) that they were involved in risky business and they got what they deserved. The little guys who were hurt in this were either conned by their advisers or shouldn't have been involved with Madoff at all. I do think that there should be criminal penalties for not just Madoff but advisers who were directing money into what should have been viewed as a risky investments.

Thursday, December 13, 2007

Text to speech tools, The Creed and other things

Saw this list of TTS tools on doggdott.us.

I've been playing with them and the one I like the most right now is Spokentext.

As a recent Catholic convert, I find myself stumbling through the Creed. I made these recordings with Spokentext to help here. I'm currently using a recording I made using VozMe.com, which is very easy to use and doesn't embed the ad in the recording, on my iPod. I set the iPod to repeat the same song and listen to it and talk along while in the car. I think I've about gotten it down.

Anyway, I've posted the Spokentext recordings. And he made them, Male and Female. Sorry, I couldn't resist.

With Spokentext, you can upload arbitrarily long texts, like Spe Salvi, for example. I've recorded this, but I can't post that, because it's copyrighted material.

Sunday, December 09, 2007

NaNoWriMoReView

As I reported last, I "Won" this year's NaNoWriMo.

It was a wonderful experience. It was the first fiction I ever wrote and it certainly showed. I like the ideas behind the story I wrote and I may rewrite it someday, but until then, it won't see the light of day.

There are a few things I would do differently now.

First, I would have studied writing I admired more for structure. I wrote like I talk, lots of odd digressions and rambling. My story was very challenging because it was had a lot of back-story to get out and I'm not satisfied that I did get all the back-story out very well (or did anything very well, actually).

Then, the pacing was poor. I had 40,000 words (the NaNoWriMo goal is 50K) and less than half the story told. Perhaps I should have followed the advice of the FAQ Entry and did my 50K without finishing my story, but I felt that was cheating somehow. So, I decided which scenes and facts from the story arc were absolutely necessary and rushed through them and got out the complete story. I'm somewhat glad I did, although the result is scary bad.

It was a very positive experience. I'd recommend it to anyone, but I will warn you that it is more work than you think it'll be. Especially if you hadn't written before, like me.

Now, I think I'll focus on some short stories. I've got a story idea that's been kicking around for awhile that I might just throw together. I'd be surprised if I could do more than 20K words on this story, but that's a good size short story. 50K is really short for a Novel. I think I could easily take my story and flesh it out to 150-200K, which is more typical of the length of a Novel. I'm concerned that I don't have the skills necessary to do justice to my story ideas, but we all suffer with our limitations and I don't know why my stories shouldn't suffer with my limitations.

I'm going to try and read more, also. I think I'll read what's at hand rather than any great plan. Right now, I'm going through C.S. Lewis' The Chronicles of Narnia. I'd never read them before. They are fun but not as interesting as I thought they'd be. I'd read some of Lewis' other works years ago, stuff for adults like Screwtape and I thought they'd have more observations like I found there. Well, they are for children, so I should give them a break, I guess.

Saturday, December 01, 2007

I'm back, perhaps for a limited time only

After that last post, I just didn't feel like writing any more.

I'm seriously considering deleting the last post, about my friend Margaret Patton. If you do a Google Search for Margaret Patton, I believe it's the first link. I know that Google customizes results based on information it keeps about you, so your mileage might vary, but I'm not comfortable with my reminisces and the broken link to the news article being the Internet Record of Margaret Patton's life. If you read this and have an opinion, one way or the other, I'd love to hear it. As always, it's Jordan dot Henderson at gmail dot com.

The problem, for me, with blogging is that the things that really interest me have aspects that are too personal to share on a blog. I see a lot interesting blogs out there, they talk about their lives, people they know are carelessly insulted or criticized in public. I don't feel comfortable doing that.

I think it is possible to blog, be interesting and be charitable at the same time. It's harder to do it right, but that's no reason not to try.

Let's see. A lot has happened since I last posted. I don't think I ever wrote about my weight loss. When I posted my last, I was still working on it. I was down by 110 pounds at one point. Now, I'm back up about 20, but I think I'll fight my way back to where I want to be.

I was accepted into full communion in the Roman Catholic Church, April 7th, 2007 at St. Francis of Assisi Church.


Just last night, I finished my novel and became a Winner of the 2007 NaNoWriMo.

Saturday, August 13, 2005

Margaret Patton, 1960 - 2005

I've deleted this post.

This post referred to a newspaper article about Margaret Patton that's no longer available. I emailed the editors at the newspaper to see if they had a copy, but hadn't heard back.

The post didn't work without the referenced article and I hate uncurated pages with broken links.

Even when this page was "whole" and the linked article was available, this page had entirely too much page rank. This page served as a strange and unfitting memorial so prominently featured by the Google search algorithm.

I still have a copy of this page if there's anything in there someone wants, I can email it to you.

If you do need to get in touch with Margaret's family, try Katherine Patton Fisher's email address in the comments below.

Sunday, June 12, 2005

Still alive

I'm still alive out here.

I'm sick of politics and the media. I don't think I'm going to write much about that. Maybe meta-observations only. I think the media is spinning us up all the time for their own purposes and writing about that is serving their purpose. I wish people, including bloggers, would show responsibility and just ignore those things that are unhealthy or bad for our society. There's so much to be done and so little time for purposeless outrage.

I'm trying to learn Haskell. I wasn't happy with Scheme. I just wasn't pleased with the balkanization of the Scheme community, how software has to be ported to implementations. I'm concerned that Haskell has some of that also, but I am attracted by the purity of it all. I'm also very impressed with what Autrijus Tang has done with Pugs in a relatively short time.

Sunday, November 07, 2004

A Ritual to Read to Each Other

The Writer's Almanac - NOVEMBER 1 - 7, 2004

The poem 'A Ritual to Read to Each Other'. This is the most wonderful thing that I can remember reading or hearing recited in a very long time.

A quote:


For it is important that awake people be awake,
or a breaking line may discourage them back to sleep;
the signals we give - yes or no, or maybe—
should be clear: the darkness around us is deep.

Saturday, November 06, 2004

You too can train your brain- The Times of India

You too can train your brain- The Times of India

Saw this on Science Journal on WSJ (pay site), but it's in The Times of India too.

Anyone have any ideas on how to go about directing neuroplasticity toward goals you might have for yourself? I imagine there's no good science yet on this question, but it seems like some exercising the brain wouldn't be time terribly wasted in any case.

Wednesday, October 27, 2004

Best Software Essays of 2004

Best Software Essays of 2004

This is a great resource. I've browsed some of these and it appears that there are hours upon hours of wonderful reading here. The biggest problem I have with the Internet is that it's hard to prioritize all the good stuff you can find on it.

Thursday, October 21, 2004

Quote Details: Kurt Vonnegut: We are what we... - The Quotations Page

We are what we pretend to be, so we must be careful what we pretend to be.

Got this on from Quotes of the Day yesterday, which I follow via Bloglines.

I recommend Bloglines. I much prefer a web-based aggregator. I understand that Yahoo has a similar service, but I haven't tried it.

Enough of meta-discussions, the Vonnegut quote is one of those things that is really important to remember, all the time.

Sunday, October 17, 2004

[plt-scheme] Re: Programming for non-programmers

[plt-scheme] Re: Programming for non-programmers: "It is a sad state, because for me, recursion has now become almost second nature, and if I did not have that skill, most of my programs would cease to be working ones. I think recursively, and without that skill, I do not know where I would be."

Saw this discussion referenced over at Lambda the Ultimate.

Go read this mailing list entry. It's full of wisdom, I think. Another gem:
Programming is just another name for the lost art of thinking. People are quite capable of thinking, but they do not. If they are taught how to think, they are also taught how to program, and vice versa. It is simply a necessity that people learn to program, it is part of a liberal education.
There is so much garbage out there about the Lisp languages and recursion as a technique. People complain about it being used when it's "inefficient" or "obscure". I don't get it. In a time when we are supposed to model our programs in "objects" that reflect the "real world", it is common to denigrate modeling conceptual entities in a natural recursive way, just as they appear in mathematics.

Chains

A singer/songwriter that I enjoy, I won't say who it is, uses a lot of imagery and metaphor from things that are translucent and insubstantial. I often think about the power of the insubstantial.

The James Legge translation of the Tao Te Ching has this for Chapter XLIII:
1. The softest thing in the world dashes against and overcomes the hardest; that which has no (substantial) existence enters where there is no crevice. I know hereby what advantage belongs to doing nothing (with a purpose). ...
"that which has no substance enters where there is no crevice." I just love that.

I feel that the most powerful things are those things which are indefinable, unsubstantial, have no substantial existence.

Some translations of this chapter of the Tao Te Ching refer to water as the thing that dashes against anything in it's path and wears it away. Ice will eventually bring down a mountain. Ice, water, air, light, space, time, truth, love, beauty... Anyone can see where the most substantial of these, ice, water air and light, determine our whole existence. If there were too much or too little of any of these things, we could not exist, certainly the foundations of existence would be radically changed, yet we rarely think of them in our day to day.

But, even moreso, these seemingly insubstantial conceptual things such as space, time, truth love and beauty have control over us. These things permeate our beings at the most seminal level. Those of us who are seen as being the most self-actualized, the most independent and capable are chained to these things. To the fully indepent artistic mind, beauty is the most compelling thing. The pursuit of beauty becomes the master.

I'm not being prescriptive, I would not say it should be different. While slavery and chains have a negative connotation of limitation and the Buddhist or Taoist would say that such striving is vain, I would say instead that it is a high calling to become enslaved to those things that are insubstantial, to truth, to love, to beauty. The scientist who studies the unseen, like light, space and time comes to touch the deeper understanding of existence. The thinker who dwells in the insubstantial comes to touch the deeper reality. To reach to the deepest reality is why we have comprehension, I believe.

Saturday, September 18, 2004

Memory

The Writer's Almanac - AUGUST 16 - 22, 2004: "It's the birthday of author and editor William Maxwell ... He said, 'What we ... refer to confidently as memory ... is really a form of storytelling that goes on continually in the mind and often changes with the telling.'"

Garrison Keillor's Writer's Almanac is wonderful. I heard this quote on there some weeks back and was meaning to blog it. It has such relevance to me.

I was catching it most every weekday morning on the Radio, but my schedule changed and now I rarely catch it. I must remember to sign up for it in email or something, because it really is worthwhile.

If I were making a suggestion for improving the Writer's Almanac, I might wish that Keillor sometimes have guest readers in for the poetry recitations. Much of the poetry that is selected for the show is beautiful, but sometimes, I feel, Keillor's delivery isn't always fitting to the particular piece. I mean no criticism of Keillor or his delivery style by this. Specifically, some pieces might be better recited with a woman's voice, I feel.

Friday, September 10, 2004

java.net: The Blacksmith and the Bookkeeper:The Evolving Modalities of Human Missions [Sep. 09, 2004]

java.net: The Blacksmith and the Bookkeeper:The Evolving Modalities of Human Missions [Sep. 09, 2004] looks like an interesting article.

I'm waiting on the next installment. This could be good, or it could be yet another overreaching theory of everything.

Don't get me wrong, I enjoy overreaching theories of everything... really, I do, it's just that they aren't useful for much, well, except for getting people to buy in to your world view and making them your mindslaves, other than that, not useful.

Saturday, September 04, 2004

Gmail

Well, I'm on Gmail now. I got an invitation the other day and took them up on it. I'd gotten an invitation before and didn't follow up...

It's great. I really like the convenience of web mail. I use 3 or 4 different computers and it's nice to be able to check mail really quickly. Gmail is by far the best web mail program I've ever used.

I think the model with labels and starred email for the stuff you are currently working on is good, but I'll have to use it awhile to see. Good search will be a help once I have enough of it... I think. Keeping things in linear conversations is a good way to go also.

One thing that's annoying. It's been down a couple of times recently. If it happens a lot, that'll be a big downside, but I'm willing to wait and see before I pass judgement here. It could well be that I've just started using it when it had a few problems.

Scheme and Java project report

Remember the project talked about here? Well, I stalled on it and I'm doing it in Perl.

I already had some modules for doing this laying around, so it was easier to just do it in Perl. I do want to get back to it, though. I decided to drop the Jakarta Net Commons stuff. It appeared to me that java.net had everything I needed, and the Jakarta Net Commons stuff is largely plug compatible, so...

I will say that LWP is just a lot easier to use, even when you forget about the fact that Perl is easier to get simple things done in quickly than Java. The perspective of java.net is wrong, to me. Doing Basic Authentication is way more complicated in java.net than it is in LWP and there's no real reason for it except bad choices for the objects, from what I can tell.

Once I had some Java interfaces built, things seemed pretty easy to do in SISC Scheme, but I still had a lot of convenience functions built up to deal with my application in Perl that made things a lot simpler.

Thursday, August 26, 2004

Richard Feynman - Get your free audio lectures

If you are a Richard Feynman fan, as I am, you'll be thrilled to learn that a set of four audio lectures are available on QED and related subjects.

I don't have time to listen to them right now, but I'll be checking them out over the weekend and I'll write something about them here.


Friday, August 20, 2004

NYTimes.com Article: The Probability That a Real-Estate Agent Is Cheating You (and Other Riddles of Modern Life)

NYTimes.com Article: The Probability That a Real-Estate Agent Is Cheating You (and Other Riddles of Modern Life): "NYTimes.com Article: The Probability That a Real-Estate Agent Is Cheating You (and Other Riddles of Modern Life)"

Read this NYT article. It's just wonderful.

This is what academia should be all about. Asking interesting questions, maybe sometimes even trivial or silly questions, and getting better answers.