Wednesday, June 27, 2007

Visual Studio Debug Windows

I'm always accidentally closing windows inside of Visual Studio and forgetting how to get them back.  Here's a little tip for anybody else that's having the same problem. Within Visual Studio, the concept of "windows" is managed from at least three different places that I can find:

  1. View menu.  The logical place where you might go first.  There you'll find many "explorers", several "views", a "toolbox" and even a submenu for "Other windows" (which sort of implies that the other things on this menu are also windows, doesn't it?), which contains things like a call browser and a bookmark window, things I don't think I've ever used.
  2. Window menu.  Another semi-obvious choice.  However, all this menu does is control how to manage your existing windows - shortcuts to jump to them, and various ways to tab and cascade them.
  3. Debug->Windows.  Aha!  The Debug menu has its own Windows menu.  Inside that menu you'll find breakpoints, watches, locals, and all that sort of thing.

It's typically the Debug windows that I kill by mistake.  Glad I finally figured out how to get them back.

Tuesday, June 26, 2007

PowerDock : Goodbye, Windows Taskbar

For a brief time at my last job I switched to OS X.  One thing it had that was very cool was the dock, a combination of customized quickstart buttons for your favorite apps as well as a system tray where apps went when you minimized them.  The windows task bar is really nothing but the latter - it'll tell you what's open, but it doesn't give you the chance to open new things.

RocketDock, linked above, is exactly that and it's very good at what it does.  Create yourself a dock, put the apps on it that you need, and you're good to go.  Perfect example of good software.  Small, light, and very good at what it does.  If I could get the task bar to just go away completely, I don't think I'd miss it.

I Did Not Marry A Geek

This past weekend over dinner, I was explaining to my wife the theory about how if PI represents an infinite, non-repeating string of digits, and if all letters of the alphabet can be encoded as digits, then it is mathematically provable that the complete works of shakespeare can be found in the digits of PI.  "So you've got the first digits, 3.141592653..."

"What was that?" she asked.

"PI?" I answered.

"You know more than 3.1415?"



"Because it's PI???"

"Oh.  Ok.  Continue."

She would have loved the guys in college that memorized a thousand digits or more.

Geek Humor

This morning a friend emails me this story about a "half a petaflop" supercomputer, adding the semi-obligatory joke "Let's calculate PI!"

"Old joke," I respond.  "Have you heard about the new Cray supercomputer?  It can calculate the sum of digits from 1 to infinity in 4.5 seconds."

A polite smiley followed.

"Wait," I responded to myself after a pause, "Isn't the sum of digits from 1 to infinity just infinity squared? Hell, that didn't take me 4.5 seconds either.  I think I told the joke wrong."


Monday, June 25, 2007

Rubik's Cube : The Search for God's Number

I had no idea that the Rubik's Cube fad was back, but as a geek I have to appreciate the algorithmic approach to solving the problem.  God's Number represents the minimum number of moves it would take to solve even the most difficult of the puzzle's 43 quintillion possible combinations.  The current proof is apparently at 26, which is just insane if you think about it.  No wonder the world record is 9 seconds.

Way back in high school I was one of the kids that could solve the thing.  Classmates would bring me their cubes, I'd solve them and give them back.  I signed up for a competition once.  I got there are everybody began pulling out their books for some last cramming and memorizing, apparently.

Who knew you could use books?  I never used one.  Taught myself.  Reading the book was basically cheating, to me.

No, I did not win the competition.  But I did walk away from it with this odd sort of confusion about how you could actually care about winning if all you really did was memorize a book that told you how to do it in the first place.

Thursday, June 21, 2007

XmlStarlet : Command-Line XML Processing

As a general rule, I love XML.  I've been using it for a good 10 years now, and it's never failed me.  Except when I hit that wall of whether to deal with it as an XML file or a text file.  After all there are a million text utilities out there for searching, replacing, counting, analyzing, editing and so forth.  With your XML file, once you take it out of its application context you're left with either treating it like a fairly wordy text file, or else loading it up into a dedicated XML editor.  Even then, it's hard to accomplish bulk tasks like "Transform these 300 XML files using this style sheet" or "Extract out all the different values for Career/Title that are used". 

XmlStarlet gives you the ability to manipulate your XML files directly from the command line, and it is awesome.  Here's just some of the things you can do:

  1. XSL Transformations. 
  2. Search and extract.  Far more useful than just grepping for your text, you can use XPath to go exactly to the element (or elements) you want.
  3. Editing.  Insert/delete/move stuff around.
  4. Validate against a DTD or Schema.

Remember, if you can do it from the command line, you can do it from a script.  Highly recommended app.


Technorati tags: ,

Wednesday, June 20, 2007

Stop Summer Brain Drain

I've got three kids who are going to be 5, 3 and 1 this summer (well, the 1 is already 1).  The 5yr old in particular is getting to an age where she can appreciate the computer in more than just "moving the mouse around" ways, and I want to find time to encourage that.  She's also begun asking questions of the "why is the sky blue" variety, so it's good to see that she's inquisitive and I want to encourage that, too.

Macworld has a surprisingly not-very-Mac-centric list of stuff to do with your kids over the summer. I really have to get in the better habit of letting my daughter play with the computer instead of sitting in front of the tv.  The problem is that the 3yr old demands equal time, so it's hard to find things that will occupy them both without being too trivial for one and too complex for the other. 

Tuesday, June 12, 2007

Is this irony? Or just coincidence? I'm never really sure anymore.

So today I get one of many unsolicited emails from a headhunter asking if I want a job.  This one is for 6 months in Chicago working on Java, ATG Dynamo, etc... on Solaris.

This one, though, caught my eye.  You see, this one is for DeutscheBank.  In 1999, when DeutscheBank was still called Kemper and Scudder had just bought it, I went out to Chicago for a month and trained them in how to use ATG in the first place.  My team from Boston had created the "enterprise architecture", and their group was "application development."  Of course, that's the story I tell that has the punchline "I engineered myself out of a job," because when the time came around 2002 for the layoffs, they threw all of us Boston folks out on the street and kept the Chicago team.

So...I trained them....I lost my job, they kept apparently there's an opening on that side that I might be able to fill?

Call it what you will.  Damn you Alanis Morrissette for forever screwing up anybody else's chances to incorrectly use the word ironic!

(Of course this could be an entirely different team that I have no association with at all, but I'm pretty sure that my project introduced ATG to the company and they never expanded beyond that group.)