Friday, October 15, 2010

Triggers

I've started a project: digitize all the cassette tapes I can find.
After I do that successfully, I'll digitize all of my dad's LPs.

Needless to say - I've found a lot of old memories listening to some of these tapes. Some of these memories I didn't even realize I'd forgotten.

One of the songs I found on a mix-tape was "Substitute" by The Who. The recording on the mix tape wasn't very good, but it was enough.

I haven't added any of the newly-digitized music to my library yet, so when "Substitute" was stuck in my head I had to go to the internet to hear it. I found a version on YouTube and listened all the way through. Then a funny thing happened: I thought I smelled markers and paint.

Usually smells trigger memories in me - but in this case, music triggered a remembered smell. A lot of "The Who" listening went on while I was in high school where I was taking a lot of "Commercial Art" from good old Tom Wood. The commercial art room (was it 702?) always had chemical smells coming from it. Whether it was markers, paint, various solvents to clean the same.

Monday, January 18, 2010

Inference from Apple Event Invitation

ArsTechnica
posts confirmation of an Apple event on Wednesday, 27 January, 2010.

Most speculate that this event will be the long-awaited announcement of the longer-awaited Apple tablet device. If that's the case, I draw the following inferences from the invitation's spray-paint motif – along with rumors about a radical new user-interface:

  1. The device will have a color display. Reading that back to myself, it seems obvious – however, many expect the device to compete with e-readers such as Amazon's Kindle.
  2. If the spray-paint motif is more than just a cool design element, the device's new UI will be able to emulate a spray can. Specifically, I imagine moving a spray can in and out to change the line-width. That would mean that the input mechanism will incorporate some 3-D elements. I envision a fancy stylus… but who knows.

P.S. I bought a few shares of Apple stock.

Wednesday, January 06, 2010

Where do We Put the Screen?

I don't know how old I was – but I was no more than six – probably closer to four. My parents came home and told me that they had rented a movie. They had a big, blue, padded case with them. I imagine that I said something like, "Coool!"

"Let's set it up and watch it!" was my dad's reply.

"Okay! Where should we put the screen?" I inquired.

"It doesn't go on the screen."

I returned a quizzical look.

"It hooks up to the TV."

Sunday, November 15, 2009

Other Radio Services

There has been some discussion in my local Amateur Radio community about what qualifies as "public service." A lot of the debate concerns a phrase in the FCC rules governing Amateur Radio. It states that amateur radio should not be used for
(5) Communications, on a regular basis, which could reasonably be
furnished alternatively through other radio services.
I just wanted to tell a story about when communications could not be furnished by any other means.

We were supporting the annual ("on a regular basis"?) Multiple-Sclerosis Society's MS 150. The rest-stop where lunch was served was up a canyon (Blacksmith Fork Canyon). One of the riders was run over by a small trailer being towed up the canyon by a pickup truck.

There were EMTs at the rest stop who were able to see to him, but he required a trip to the hospital. Cell phones weren't working in the canyon. A sheriff's depute wasn't able to reach his dispatcher. Only my ham radio could make it out of the canyon.

Scary - yet inspiring.

Monday, July 27, 2009

Sometimes I amaze even myself!

I built a generic method in C#. One of the parameters to the method was the generic type <T>

Looking at my method, I created some instances of T using the new keyword/operator.

I thought to myself, "some classes don't have a constructor... I'll need to restrict that in the declaration. Something like
private static long CreateInstances<T>(List<T> instanceCollection) where T "has a default constructor" {...}


I looked up the where contextual keyword and learned that the syntax for what I wanted to do was:
private static long CreateInstances<T>(List<T> instanceCollection) where T: new() {...}


Just before I hit that last parenthesis I noticed the red-squiggle. It was under some code down in the method body that used the type 'T'

T variable = new T();


I hovered over the squiggled text to see what was the matter:
Error: Cannot create an instance of the variable type 'T' because it does not have the new() constraint.


Ha!! I defeated the red-squiggle before I had even seen it!

Thursday, July 23, 2009

Experiments!

I wasn't sure if the C# is operator would throw a null-reference exception if I gave it a null object. (Katie, a null object is simply an empty placeholder - think of someone's name in your address book, but without an address. When you try to mail them something, you wouldn't just send a blank envelope to them, you're smart enough to recognize the "address not found exception". Null-reference exception is the same thing.)

So, I built an experiment:

static void Main(string[] args)
{
object foo = new System.Xml.XmlDocument();
object bar = null;
System.Uri zap = new Uri("http://fake.uri.nategrigg.com");

try {
Console.WriteLine("foo.GetType(): {0}", foo.GetType().ToString());
Console.WriteLine("foo: {0}", foo.ToString());
Console.WriteLine("bar: null");
Console.WriteLine("zap.GetType(): {0}", zap.GetType().ToString());
Console.WriteLine("zap: {0}", zap.ToString());
Console.WriteLine("foo is object: {0}", foo is object);
Console.WriteLine("bar is object: {0}", bar is object);
Console.WriteLine("zap is object: {0}", zap is object);
Console.WriteLine("foo is XmlDocument: {0}", foo is System.Xml.XmlDocument);
Console.WriteLine("zap is Uri: {0}", zap is Uri);
Console.WriteLine("bar = zap");
bar = zap;
Console.WriteLine("bar is Uri: {0}", bar is Uri);
} catch ( NullReferenceException nullex ) {
Console.WriteLine("Null reference exception: {0}", nullex.Message);
}

Console.ReadKey();
}


Conclusion: When given a null variable, the is operator simply returns false. Which is just what I needed!

Also, the program had the following output (in case you're curious):

foo.GetType(): System.Xml.XmlDocument
foo: System.Xml.XmlDocument
bar: null
zap.GetType(): System.Uri
zap: http://fake.uri.nategrigg.com/
foo is object: True
bar is object: False
zap is object: True
foo is XmlDocument: True
zap is Uri: True
bar = zap
bar is Uri: True

Tuesday, June 30, 2009

localRepo

Man... what a hassle!

Why do I bother checking "specific version" if Visual Studio just copies a different version over the top? Maybe it's MSBuild that's doing the copying.

The secret is that the wrong version of the assembly gets cached here (on my vista box, it may be different in XP):
~/AppData/Roaming/localRepo/Cache/wrongDllVersion.dll

I found the path by checking "read only" on the DLL that kept getting overwritten with the wrong version. When I built the project there was a warning about how Visual Studio was unable to copy the dll.

HA! Take that, Visual Studio!

Sorry if you don't care about DLLs or Visual Studio; I had to put this up so I can find it next time I google: ".net dll wrong version cache"...

Thursday, June 25, 2009

M3 Racecar

It's been more than ten years since Gran Turismo came out for the original Sony Playstation.


I'd always liked racing games. When I saw how the ad recommended following a "racing line" through a corner I was already interested. Then I realized that the picture in the middle of the ad was from the game. I called my brother and told him I was coming home with it.


Playing that game has led to my purchasing more than one sporty model of car in the last few years. I even paid extra for the "Speed" channel. The speed channel has introduced me to Formula 1 racing.


While watching some Formula 1 racing I saw this ad:


M3 Racecar


I don't know what it is. There's something with the audio. The video has been messed up a little. Is that Leonard Nimoy narrating?


The ad feels like something from 20 or 30 years ago.


I don't know what it is - but I like it. And it works! I've never wanted a BMW more.

Wednesday, June 03, 2009

Why Bother?

At work we use this system all the time. I noticed that the length of the text in the password field changed whenever I submitted the form.

Some investigation revealed this:


function getScrambledPassword(pwd) {
var cipher = ['k', 's', 'z', 'h', 'x', 'b', 'p', 'j', 'v', 'c', 'g', 'f', 'q', 'n', 't', 'm'];
var result="";
if (pwd == null)
pwd = "";
pwd = encodeURIComponent(pwd);
//alert("encoded password: " + pwd);
for(var i=0;i<pwd.length;i++) {
var cc = pwd.charCodeAt(i);
result += cipher[Math.floor(cc/16)] + cipher[cc%16];
}
//alert("scrambled password: " + result);
return result;
}

Tuesday, March 10, 2009

Microsoft Certified Professional Developer in Enterprise Applications

Microsoft Certified Technology Specialist Logo

The Microsoft Certified Professional web site hasn't received my latest test, so it won't let me have a logo with "Professional Developer" in it.

Anyway, today I passed Microsoft's Exam 70-565: Pro: Designing and Developing Enterprise Applications Using the Microsoft .NET Framework 3.5. Quite a name, eh?

I'm not sure what it will mean for me, besides being able to put logos on my stuff now.

The logo usage guidelines say that I should put it on a white background. So I used my certified skills to modify the template for this blog to give it a white background. (I also had to widen the stupid thing to let me put pictures at the size I want - but that's another story.)

Monday, February 16, 2009

Baby Sweetheart

Hi, all!

Baby Sweetheart (a.k.a. Dorothea Elizabeth Grigg) was born at five minutes to nine on the evening of Friday, the Thirteenth day of February, the year of our Lord Two Thousand and Nine.

They Hate This Part

She weighed 7 pounds and 10 ounces (or 3.45 kg) (or a little more than half a stone).
She was 19 inches long (between 48 and 50cm) (or 4.75 hands).

Mom Sweetheart (a.k.a. Libby) was having some high blood pressure (PIH or pregnancy-induced hypertension). The doctor wanted to make sure she delivered soon, so he planned to induce her Friday morning at 7:30. Around 4 o'clock that morning Libby woke up and noticed some contractions. She decided to start timing them and they were coming regularly at 12 minutes or so.

Around 6 A.M. we were supposed to call the labor and delivery group at the hospital and make sure there was a bed available. We called and told them that we were having contractions about 9 minutes apart; they said that we should come in anyway.

We finally made it to the hospital around 8:30 and the doctor came to check Libby a little while later. When he checked her he confirmed that the process was started and we wouldn't need to induce labor.

Do What Now?

12 "short" hours later and our family had increased in size by fifty percent!

Click on the pictures to see more!

Monday, October 06, 2008

Does Nobody Else Want Details?

I like Vista.

I am being driven berzerk by the open-file dialog box.
Actually it's the "Small Icons" view.
Actually it's the open-file dialog box's refusal to open in anything but the "Small Icons" view.

Who uses this view?
What good is it?
I'll tell you what good it isn't!
It isn't any good at not looking like a "Details" view with missing files!

Seriously. It has columns, but they are columns of files.
It has column headers!! But it doesn't arrange the files in columns!!! NO!!! It arranges them in ROWS! They just happen to fall into columns!!!!!



But you click on the column headers to change the sort order

Double-U Tee Eff??!!

Every time I want to open a file I look down the list (I think I'm looking down the list) and say, "that file's missing? No wonder nothing works!!"

Saturday, October 04, 2008

The Plan was to Take Photos On The Way

Intersection

I just got back from dinner at T.G.I. Friday's. Yes I'm in Brazil; but it was close to my hotel and the other direction from where I usually go (i.e. toward the client's office).

I decided that I would skip the "afternoon" conference session and take advantage of "the magic hour". My plan went awry in several ways. First, there weren't many interesting photos on the way. It was just another two blocks down a road with which I was already familiar (Av. Santo Amaro). Second, the real magic hour hadn't started yet. Third, Friday's was much closer than I had anticipated.

Surprised at seeing the restaurant so soon, I went in. (This happens to me a lot; I get surprised and then forget my cool plan.) They sat me upstairs by a window, so I had the whole meal to watch the light get more interesting. Luckily, it didn't look like I missed anything too spectacular. Then again, the definition of "missing something" is not seeing it -- so who knows what I missed.

Oh well. If I weren't up in the restaurant, I wouldn't have had this view of the intersection below.

Monday, September 29, 2008

Too Many Doughnuts

I went to the big mall here in São Paulo: Shopping Ibirapuera. Mostly I wanted some quick food, but being a mall rat I decided to check things out a little before I ate.

I saw suits that ranged from R$399 to R$1599.
A new base-model MacBook was R$3k
PSP Games that are $15 at Target were R$49, PS3 games were R$230

I saw a little kiosk in the middle called "Happy Donuts". I decided then that I should get some before I leave Shopping Ibirapuera.

For dinner I had some gnocchi. They kept asking me what else I wanted on it... all I wanted was some good cheese and sauce... I guess they didn't have that so they made up for it with bacon and onions and stuff. I think I was paying for 8 toppings or something, because at one point I said, "that's all" and pantomimed the best I could, but the guy said, "two more".

It was fine.

After I finished that I searched for the Happy Donuts that I had seen but lost. Eventually I found them.

I couldn't believe how hard it was to order doughnuts in another language. I think the little girl was trying to get me to buy a dozen... Any way, I ended up with almost a dozen mini filled doughnuts and two big ones. Let me tell you: Bavarian cream at Happy Donut makes me very happy. I can't wait to try the Bavarian lemon cream!

Oh, right... the point. Besides being too many doughnuts to eat comfortably, I was R$2 short of cab-fare back to the hotel. I think the guy understood when I explained that I had more money in my hotel room, because he took me back. I got some more cash and gave him a good tip.

The End

Friday, July 25, 2008

(Nothing But) Flowers

Recently I purchased The Best of the Talking Heads from iTunes. On it was the song (Nothing But) Flowers.


I like the song: the melody, the vocals, whatever it is that makes one like a Talking Heads song. I listened to it a couple times the last couple days and started noticing lyrics like "There was a factory, now there are mountains and rivers" and "There was a Pizza Hut, now it's all covered with Daisies." Pretty standard "return to Eden"-type sentiments.


Then I noticed "if this is paradise, I wish I had a lawnmower" and at the end "Don't leave me stranded here, I can't get used to this lifestyle." This added an interesting layer to the ideas presented by the song.


Let me tell you the three layers that I see in the order that I thought of them. First, the hippie, environmentalist, return-to-Eden view where things were better when they were simpler. Second is recognizing the fact that we might not enjoy things if we "went back". Recognizing that it would be hard to "get used to this lifestyle." My third interpretation is some kind of sophisticated hippie who thinks that while it would be hard to get used to living without Pizza Hut and 7 Eleven, it would still be better. This sophisticated Luddite makes fun of the whining portrayed in the song.

Unless we talk to the David Byrne, we can't know what he was thinking. Even if we did talk to him, he may not have an answer for us.

Tuesday, March 18, 2008

Why Would You Want a Police Scanner?

I recently purchased a new police scanner. (I say "police scanner" because most people think of (flat-bed) image scanners when I just say "scanner"… I guess I could say "scanning multi-band radio receiver"… anyway.) I had it delivered to the place where I work so I wouldn't have to stay home to sign for it or go pick it up at the shipping company when nobody was at my house to sign for it.

I explained to everyone before the package arrived that it was "a toy" and nothing business related. Of course, everyone asked what toy it was. I was surprised by how many of the geeks here at this high-tech company barely understood what a police scanner was, let alone why I would want one.


By way of explaining the fun of scanning and radio-hobbies in general, I offer part of my story.


Awe


When I was 15 (maybe I had just turned 16) my friend Kris's dad, Bob, managed the local office of Pac*Tel paging. They were moving offices and he had enlisted Kris and me to move some back-up batteries for the big "paging terminal". Kris and I had recently watched Weird Al's movie: UHF.

We were talking about how much fun it would be to run our own UHF TV station. Bob overheard us and mentioned that they broadcast UHF there at the pager company. I don't know how Kris felt but I was astonished. Bob then punched up their frequency on a scanner in the engineer's office. Bee-oww wooooooooong brchzhzhzhzhzhzhzhzhzh shshsh chachachachack… He explained that the paging signal was basically data modulating an FM signal that the pager decoded. At that moment I learned that RF was RF. AM, FM, TV, two-way radios, pagers…


Scanner


After I got my first job selling pagers for this same outfit at the mall, I saved up the dough for a hand-held scanner from Radio Shack. After a few days of searching around and wondering what all these frequencies were I bought Police Call. This had information on FCC radio licenses in my area. I'd look up an agency in the book and program all of the frequencies listed in the guide for that agency. Then I'd scan around these frequencies to see what I could hear.

At least one evening I remember logging everything I heard. Scanner channel, frequency, and what was said. I quickly learned how to recognize dispatch channels, request channels, car-to-car channels etc. I noticed that the Salt Lake County Sheriff's Office had more than one channel that sounded like a dispatch channel. It turns out that the valley was divided into geographic areas and each had its own dispatch channel.

Given enough time my buddies and I could have figured out which channel was which area of the valley, but some intelligence was obtained (somehow) that described which channel was for which area. Combine that with some of the other geographically-defined agencies around the valley and we could tune in "areas" instead of just listening to… whatever.

If I was headed to work at, say, Valley Fair Mall I'd tune in the Sheriff's Office West Patrol, West Jordan PD, Salt Lake Community College, Valley Fair Mall. I'd listen to these agencies before I left the house and on the drive over. By the time I got there I already knew that the two police cars across the street from the mall was just one cop on a traffic stop and another one driving by offered assistance.

Which I think is cool.

Maybe next time I'll tell you about how this led to my exciting adventures in Ham Radio.

Tuesday, May 30, 2006

Forever!

It's been almost a year since I posted anything here!
Check out Schnivic.net, my project log and Flickr to see what I've been up to.

I've finished up school so now I'm a Bachelor of Science!

Tuesday, June 14, 2005

"Visual" Programming

I just remembered a feature from the Visual Basic world: the IDE would hide all of the code file except for the function with which you were currently working. You would pick a function in a little menu and only that function would appear.

I'm not sure if I like this or not. I know I like having access to functions. During my last round of Linux hacking I set Emacs bookmarks for most of the functions with which I was working. This allowed me to flip around without navigating the pile of code that had accreted.

In Visual Studio .NET 2003 the "Class View" feature allows you to browse your classes to find a particular function and then you can just double-click on the function name and it opens the file and puts the cursor at the function. This is identical to the Emacs bookmarks, but with Emacs you had to put the bookmarks in yourself.

There's a project that wouldn't be too hard: build a bookmarker for Emacs that would put a bookmark at the beginning of each function in a code file.

Maybe one day I'll get to it.

Friday, June 10, 2005

Dimentia, or not

Do you ever just stare at your screen for a few minutes trying to figure out what you're doing and then realize you're looking at the wrong file and it's no wonder it doesn't make sense?

Where have I been?

I guess I got busy with finals and things. Now it's Summer Semester and all I'm taking is Calculus III, "Multivariable Calculus".