Disclaimer

The content of this blog is my personal opinion only. Although I am an employee - currently of Nvidia, in the past of other companies such as Iagination Technologies, MIPS, Intellectual Ventures, Intel, AMD, Motorola, and Gould - I reveal this only so that the reader may account for any possible bias I may have towards my employer's products. The statements I make here in no way represent my employer's position, nor am I authorized to speak on behalf of my employer. In fact, this posting may not even represent my personal opinion, since occasionally I play devil's advocate.

See http://docs.google.com/View?id=dcxddbtr_23cg5thdfj for photo credits.

Thursday, January 26, 2012

Perl test brackets with deterministic finalization

I just realized that you can use deterministic finalization in Perl just like C++. Yay!
{
    package Brackets;
    # my first attempt to use determinsitic finalization in Perl;
    sub name {
 my $self = {};
 $self->{name} = shift @_;
 bless $self;
 print "{name}>\n";
 return $self;
    }
    sub DESTROY {
 my $self = shift @_;
 print "{name}>\n";
    }
}
Note that I use my "pseudo-XML" notation:
<TEST START name>
...
</TEST END name>
It's not nice to violate the standard, but IMHO this is a alot easirr to read than
<TEST context="START" name="name">
...
</TEST context="END" name="name">
and readability is a concern - since I plop these things in test output read by my human coworkers. Human coworkers who really don't like XML because it is so ugly. I can readily translate my pseudo XML into real XML, in case I wanted to use any real XML tools. And can do many operations without such translation. Unfortunately, there aren't many real XML tools to be used withot a lot of work :-(. I need to fix up my pseudo-XML UNIX command line tools, suitable fr use in pipezs and so on.

Wednesday, January 25, 2012

googletalkplugin issues

I started having problems with google talk, specifically the googletalkplugin that I get when clicking on "phone" in gmail. I believe I have had these before. Not sure of old workarounds have all been tried, none so far work. Started off with not being able to hear gtalk dial. Then got messages like "XXX-XXX-XXXX (a phone number) cannot be reached." Uninstalled/reinstalled. Witho rebooting. Running as Asministrator. No joy. Just noticed many googletalkplugin processes running. This is what tickled my memory. A new one starts every time I start Chrome. Doesn't always go away.

Tuesday, January 24, 2012

Code ordering, want none: perl example

I have several times posted how I find languages without code ordering pleasant, more readable.

E.g.
  let x = y + z
      where z = some log and complicated expressions
Here's an example from writing "shell scripts" - although here I am doing the shell script in Perl: Start off with:
   system("command with some long and complicated command line");
Realize that you want to repeat the command in a pre-announcement of what you are doing, and in an error message: Start off with:
   print "RUNNING: command with some long and complicated command line\n";
   my $exitcode = system("command with some long and complicated command line");
   print "error: exitcode=$exitcode: command with some long and complicated command line\n"
      if there_is_a_problem($exitcode);
Now avoid repetition: Standard way:
   my $cmd = command with some long and complicated command line";
   print "RUNNING: $cmd";
   my $exitcode = system("cmd");
   print "error: exitcode=$exitcode: $cmd\n"
      if there_is_a_problem($exitcode);
In my opinion the non-code ordered way is more readable:
{
   my $cmd;  # maybe some declaration to say it is not ordered?
   print "RUNNING: $cmd";
   my $exitcode = system($cmd = "command with some long and complicated command line");
   print "error: exitcode=$exitcode: $cmd\n"
      if there_is_a_problem($exitcode);
}
I think it is more readable because you see the value set at the point where it matters, where it is used most intensely (the other uses are mild, just prints). Note that I have used a scope.

Friday, January 20, 2012

Tagging is so passe'

Tagging is so passe'.

Manually adding keywords to stuff you do.

What we need is "tag suggestion" software.  Software that looks at what you have written, compares it to a corpus - perhaps your stuff, but perhaps stuff from others - and gives you the choice.

---

Automatic email folder classification rules are so passe'...

---

Gmail's labels are so passe'.  Same reasons.

(Plus the absolute lack of structure.)

---

I have played around with Bayesian codes, for determining if tags or labels should apply.

---

Gmail's "important" filter is a step.  But more needed.  Plus, a more personal classification system.

---

I remember GNUS gnus-topic-mode.el  in EMACS fondly.  Realizes that at different times of the day, or in different modes, I may prioritize things differehntly.

THERE ARE NO FIXED PRIORITIES for personal information management.

My priorities when I am reading email on vacation, or in the evening at home, are different than in the day at work.

---

Why tag?

Why not just use search?

Tagging is a crystallization of information content.  E.g. it records the fact that, at some time, you decided that a post was about VCS, Version Control Software, even though it might not contain the phrase in a way that seach would turn up.

Tags make it easier to track [[terminology drift]].  (TBD, need to write a wiki/blog on that).

E.g. what we call now VCS (Version Control) might have been called REvision Control years ago, or CM (Configuration Management).

Terminology drifts over time.  Tags make it easier to track such drift, although even tags drift.


AAdvantage versus Account Aggregation

I just learned that American Airlines' AAdvantage frequent flyer program has sent cease and desist letters to account aggregators.

(This shows how often I check my AAdvantage miles balance - only when I am planning vacation.  It also shows exactly why I depend on an account aggregator - for all of these bleeding accounts...)

Now, perhaps I am exposing myself to hackers because I admit that I use an account aggregator.  Single point of failure, and all that.

(By the way, I would be much happier if the aggregators had read-only access to my accounts - if they could only see balances, but not change passwords.)

But the overall thing is: there are, I have, too many bleeding accounts. Too many blinking passwords.

Account aggregators are one major tool to manage this.

If a company will not let *any* account aggregator access them, well, then I do not need to be a customer of that company.

I was considering dropping American Airlines anyway, because of their financial position. This is just more incentive.

---

Heck, if AAdvantage was implementing better security, such as captchas, I would be happy.But sending "cease and desist" letters - that's garbage.

Thursday, January 19, 2012

Branch purpose commit message

I would still like to have a commit message that I write at the time I generate a branch, saying why I am bothering tio generate a named branch.

Wednesday, January 18, 2012

VCS thoughts

Some fast, probably cryptic, thoughts after a day merging with a "I wasn't familiar with it originally but I am painfully familiar with it now" VCS tool.


  •  Merges are branches.
    • Mercurial tracks merge workflow in a workspace, assuming that a merge will be a single commit.
    • But today I had a complicated enough merge that I started a named branch off just for it. Accomplished the merge between my tasj branch and the trunk. And then merged back from this "merge branch" to the trunk.
    • Worked fine, but it would have been nice to have some workflow tracking along the branch. Like "hg resolve", but "hg resolve" stops at the first commit boundary.
    • Had to fall back to tracking things by hand, in a text file.


  • Mercurial 's names are awkard
    • "hg revert" isn't revert
      • "hg revert -r REV file" isn't "revert".  It is "include this revision of the file in the candidate commit that you are building in your workspace.
      • hg revert corresponds to cvs update
    • "hg update" isn't update
      • "hg update -r REVorBRABCH" isn't "update". It is "switch the revision or branch that the candidate commit you are building ijn the workspace will be applied to as a child."
      • hg update corresponds to cvs checkout, although cvs is pretty sucky there too.  
      • It's rather like a rebase when you have no revisions checked in yet
    • Mercurial's branchs are not branches.
      • They are floating tags
      • Not necessarily lines of evolution.
      • What would be a better name? "Stream of development?" "Genealogy line"?
      • I'd like to have evolutionary branch0lines, as well as what Mercurial has.

  • Tags should be versioned. 
    • At least Mercurial got that right.
    • But old tag versions should be visible in the log.
    • And it should be possible to refer to an old tag version, something like "last week's official release"

  • Mercurial's anonymous branches rule
    • See, I am not purely dissing hg
    • But "hg tip" has obviously not been brought up0 to date with named branches

  • Can anyone tell me how to do the equivalent of "cvs update -j branch-base -j branch" in Mercurial?
    • Without using an external patch
    • Hint: "hg merge -r branch" doesn't work, if you have anti-patches on the branch

  • I want to be able to "pull onto a branch" or "push a branch".  Not just "push or pull all the branches in the repository".  I.e. I want branch renaming or mapping in pull and push

  • Mercurial doesn't do partial checkouts or checkins?
    • Maybe not everywhere
    • But you can screw yourself up in the same way with "hg ci incomplete list of files"
      • I'm not suggesrting denying hg ci files partial
      • But I'd like to do it in general.

  • Partial checkins and checjkourts should correspond to brancges, with merging actively encouraged.
    • I've talked about this many times.

Enough already.