Tuesday, November 02, 2010

World Series Giants and me...

This is one of those little kid inside me takes over posts.

I was lucky enough and old enough to see the Beatles from their (U.S.) beginnings, but I consider myself even more fortunate to have seen Willie Mays, Willie McCovey, Orlando Cepeda, Jimmy Davenport, Juan Marichal and Jack Sanford all through the 60's. Those Candlestick memories have dominated my thoughts the past few weeks and re-introduced my Dad in my day-to-day thoughts as well. I'm a pretty private person and don't intend to blog much about that, but I will say that I absolutely love my past as a young kid. I was pretty damn lucky.

The even better part of the whole Giants-Rangers-Phillies-Braves experience was hanging out with my New York daughter Amanda over the phone. She kicked things off by calling me from a downtown pub in Philadelphia the evening the Giants won that last game... wearing her Giants hat! Brave young woman and a TRUE Giants fan. Will Clark, Kevin Mitchell and Rod Beck were the guys during Amanda's early days. It was wonderful to feel so connected between PA, NY and ABQ! Thanks Amanda!

This is from the San Francisco Chronicle website @ http://www.sfgate.com :

Sunday, October 10, 2010

The little things in vi that make folks watch and go "wow"

My guess is that I'll add more hints & tips to this posting, so be sure to bookmark it and revisit every now and then.

-- David 10Oct2010

I don't know if all of your colleagues will go "wow", but I know you'll be a lot more productive than you would with a standard Eclipse editor or MS Word.

Task: You want to enter command mode to try all of the commands in the rest of this page:

# press Esc key
<ESC>

Task: You want to find whole words spelled "the", excluding words like "them".

<ESC>
/\<the\>

Task: You have a text file of numbers representing some of your customer account ID numbers. You're creating an SQL query statement and you want to corral those numbers into an IN clause like "... where clientId in (333, 444, 555...). But the 10 numbers are listed, one by one, on ten lines. How do you get them collected into your IN claus?

First thing, you want to append commas after each number, with the exception of the 10th number.

# replace the endline of each line with a comma.
# to avoid putting a comma after the 10th number, specify the line range as 1 through 9.
:1,9s/$/,/g

Now it's time to bring everything onto a single line. Do this using "J" for join.

# Join the 10 lines onto a single line
<ESC>
:10J

You should see all 10 numbers on the same line now. Fill out the rest of your SQL query.

Task: You have a bunch of concatenated strings that each should occupy a single line. Each string is separated by the damn ^M characters that do nothing to create a visual line break.

<ESC>
:1,$s/<cntr-v>M/\\r/g

Task: You want to insert "</span>" between "Task" and ":", like I did when I decided to wrap a span tag around each Task word in this blog posting.

<ESC>
:1,$s/Task:/Task<\/span>:/g

Task: You want to jump to the 13th line in your text file.

<ESC>
:13

Task: Come back on occassion to see additional vi editor tasks here.

# At your browser's URL:
http://discretepassions.blogspot.com/2010/10/little-things-in-vi-that-may-folks.html

Thursday, October 07, 2010

The miracle called "Khan Academy" -- Web-Ed the maximized way

It took me 5 minutes to realize I was witnessing a miracle. What grabbed me about Sal and his www.khanacademy.org?

  • A charismatic, humorous voice.
  • 1,800 12 to 15 minutes lectures - physics, math, business, chemistry, statistics and more.
  • Explained at a pace and in a style that makes comprehension possible.
  • Makes you feel like you can learn things you were never able to nail down back in college.
  • And I sensed immediately that my 10 year old would relate to him, thanks to his trusting humor and kind voice.

So where does Khan Academy fit in? The answer: where doesn't it fit in?

  • My daughter loves Migaland, a 2nd Life for kids. The agreement we have is that she must watch one Khan Academy math class before logging in to Migaland.
  • This is the perfect supplemental homework pill for school teachers to give to their kids. Kids get distracted in class, kids have poor listening habits. Khan gives them a resource at home that 1) the kid can trust, 2) the teacher can trust and 3) the parents can trust.

So, why does this work? Why am I so convinced that this IS the greatest gift of the Internet?

  • It's teaching using common sense... a person who has the gift is able to share that gift in a way that only the Internet can make possible.
  • 15 minute lessons. How perfect is that? Life is fast. Afternoons are short. Evenings are just about impossible. But 15 minutes is a reasonable commitment with the option of doing another 15 minutes.
  • 15 minutes is the perfect amount of time to except hyper focus. Yes, we do, can and should go longer than 15 minutes when we need to. But 15 minutes is also a way of limiting us from gorging, so that we can develop the long term memory of the lesson in a high quality, quickening manner.
  • It's a huge opportunity for folks to diversify their knowledge. Go to the Khan Bank of Knowledge and check out "credit default swaps" or "La Place transforms." It's almost analogous to take a little pill and you have instant knowledge.
  • It's been awhile since college for me. I've had a great career as a software developer and business executive. Khan is a gold mine of possibilities for me for "the next phase" of my life. It's all there.

Enough cheerleading for now. I don't know if Khan's courses will prevent Alzheimer's, but it sure will make life feel more unlimited than it already does. And for parents, it's a true answer to the on-going challenging of keep that kid learning...

Sunday, September 26, 2010

Here comes Graphene... sharpen your pencils!

Reading about research and development around carbon-based, two dimensional, nano-worldly Graphene has been a lot of fun. If you're just ramping up as well, I thought I'd jot down some of my collected notes to help others on their way to good knowledge of Graphene.

First of all, Graphene is a one atom thick, 2-D slice of graphite, the "pure" stuff in your 2H pencil. It looks like a cross-section of a honey-comb with carbon atoms in a chicken wire-like pattern. Scribble on a piece of paper, take some scotch tape and left up your carbon-based jottings. Then desolve the tape with a solvent, like Benzene, and you're left with a few (or more) layers called Graphene.

Now, some tidbits or "reasons to care"...

  1. Graphene is the strongest material known.
  2. It's the thinnest membrane known, in the lab, to separate two bodies of liquids.
  3. Pop a hole in a sheet of Graphene a few carbon atoms wide, you have a "nanopore". Drag a strand of DNA through it, you can figure out its sequencing (all that G, T, C A stuff). FAST.
  4. Thanks to its incredible conductivity, it may eventually replace silicon as chip fodder. It's 100x more conductive than silica and isn't it nice it's not environmentally toxic as those other silica alternatives, like gallium arsenide?
  5. As part of the quest to utilize Graphene as laid on substrates of silica, researchers are working heavily on getting the signal-to-noise ratio ramped up to maximize all that good conductivity.
  6. Nanotubes are rolled up single layer sheets of Graphene.
  7. Because of its high conductivity, Graphene makes great sensor devices, able to detect substances and get the word out quickly.
  8. Graphene may represent a new class of capacitors, thanks to its conductivity and extremely large ratio of surface area to mass.

Lost the article I grabbed some of these details from. I'll post the link as soon as I find it. The bit about nanopores came from http://www.physorg.com/news203345672.html

Hope you found this helpful and now see Graphene as slightly less mystifying.

Saturday, September 18, 2010

Server software architecture technology today... a "drive by" appraisal

A colleague at my company distributed a couple of links on MUD -- "A BIG BALL OF MUD is haphazardly structured, sprawling, sloppy, duct-tape and bailing wire, spaghetti code jungle." from A Big Ball of Mud.

I never liked chaining (object methods end-to-end, ad nausem) because it made me feel stupid... It always came off as the "cool" thing at the expense, to me, of clarity. It also felt like a side-effect of IDEs where you just keep getting a drop-down pick list of methods once you complete the previous method name. I know I'm ridiculously blue collar about using vi instead, but what I like about it (being the absence of an IDE) is that it forces you to become more knowledgeable about the object/class definitions you're referencing. You know at some point you're going to have to track down a bug and wouldn't it be nice if you've already explored that deeper code, often written by somebody else. It gives you the extra layer of perspective you need when bug-chasing...

Yes, architectures are beginning to feel commoditized. But I like that. It's like design patterns. When Microsoft came out with C# it pissed me off, big time, as a rip-off of my beloved Java. But then I realized that the favor MS did for all of us was to raise the conversation to the next level of design patterns where the implementation details became less important. My guess is that was not MS's intent, but I believe it was a favorable consequence.

Anther advantage (or consequence) of commoditization is that these architectures are beginning to feel canned and the tools that support them are like-wise starting to feel that way, as they continue to mimic each other... Grails-Rails... does it really matter other than some business considerations?

But I have become a believer in the programming-by-convention. Yes, it goes overboard when you realize so many methods have been automatically created (views, controllers, services, session variables, etc.). But at least there's a higher level of "local standardization" that anybody who dives into the project can expect. I used to like thinner, start-from-scratch architectures... but it's so incredibly silly to have to re-think how to track session, how to send email, how to configure security, how to do things you've done a few hundred times over the past 15 years.

How's that for a preach-y entry?