A momentary crisis of faith, and who am I anyway?

Share

I find that I have these odd periods at the end of big projects. I wander around for a bit wondering what I am meant to do now that the burningly urgent things are off my todo list. This time normally ends up being playing with the kids, watching TV or being mopey.

I offer this little sequence as the blog form of a holding pattern until I know what I am going to work on next…

    The other day I discovered that I no longer know who I am all the time. Specifically, slack unsets the environment, which means that the whoami command no longer works when you are running a command as root. To whit:

    sudo bash
    Password:
    root@machine:~# whoami
    root
    root@machine:~# echo $SUDO_USER
    mikal
    

    So, if SUDO_USER is unset, how do I determine who the command is running as? Well, my immediate thought was that /proc would have something, and in fact it does. Here is what I ended up with:

    root@machine:~# cat /proc/$$/environ | sed 's/[^[:print:]]/\n/g' | grep USERNAME
    USERNAME=mikal
    

    Horrible, isn’t it? I must also admit that I had to get onto IRC and wait for Jaq to teach me about that :print: thing. Good on him for being nerdier than me.

    So, that’s still horrible. So horrible. What else can I do? Someone else in IRC land suggested:

    root@machine:~# ps auxeww | grep $$ | sed -e 's/^.*SUDO_USER=//' -e 's/ .*$//'
    root
    mikal
    

    Still ewwww. So what else is there? Well, one of the older geeks on the IRC channel suggested this:

    root@machine:~# who am i
    mikal    pts/16       Apr 15 15:38 (:0.0)
    root@machine:~# who -m
    mikal    pts/16       Apr 15 15:38 (:0.0)
    root@machine:~# who -m | awk '{print $1}'
    mikal
    

    who am i is an alias for the -m option in who. And it’s just what I want. We have a winner!

Share

Registered for MySQL User Conference 2006

Share

Well, I registered a while ago, but I picked up the conference satchel et cetera today. It’s a canvas satchel much like LCA 2005, but with fewer goodies (and more paper). There is one cool thing — I got to pick an O’Reilly book about MySQL to have in the bag. Interestingly, there is a SCAMP CD in the bag. That’s Sco, Apache, MySQL, PHP/Perl. Hmmmm. Kinda in poor taste that one me thinks.

Everything else is cool. That is all.

Share

Registered for MySQL User Conference 2006

Share

Well, I registered a while ago, but I picked up the conference satchel et cetera today. It’s a canvas satchel much like LCA 2005, but with fewer goodies (and more paper). There is one cool thing — I got to pick an O’Reilly book about MySQL to have in the bag. Interestingly, there is a SCAMP CD in the bag. That’s Sco, Apache, MySQL, PHP/Perl. Hmmmm. Kinda in poor taste that one me thinks.

Everything else is cool. That is all.

Share

MySQL User Conference coming up

Share

Stewart has a new toy for his MySQL User Conference presentation, which is probably for the best as I fully intend to ask why MySQL replication is so unreliable, why Innodb hot backup appears to hate me, and lots of other biting questions if I think of them. It does make me wonder what other Aussies are going to be in town for the conference? I have a survey for you to complete:

  • My name is: ________________________________
  • I am arriving: ________________________________
  • I will be staying in: ______________________________ (name of city only please)
  • I would be interested in drinking so much I fall off my chair: yes / no (please circle)
  • I would like to know where you can get Coopers beer in Silicon Valley: yes / no (please circle)
  • Is Frys really as dodgy as it looks? yes / no (please circle)

Let me know if you’re going to be in town for the conference, and perhaps we can all get together and do something geeky. If there aren’t too many of you, then perhaps I can organise a tour of the Googleplex or something. Hopefully it wont be raining the whole time like it has for the last few weeks, but I would bring rain gear just in case if I was you.

Share

The worst user interface I have seen in a long time

Share

Yesterday my wife told me about a user interface she actually experienced, and was surprised by the violence of my reaction. It’s simply the worst user interface I can think of for a scenario in question, and it comes from a major corporation with presumably UI experts and testers, and all of that fancy stuff.

So, what she was trying to do was transfer some money from the US to Australia. The user interface was a little bit like this:

So, you’re told how many US dollars you have in the account, and then asked how many Australian dollars you want to transfer. There is no select an amount in US dollars. Oh, and if you guess wrong and have to do another transfer, that will of course cost you another set of ten dollar fees.

In summary, this user interface:

  • Expects you to know what exchange rate Citibank is going to apply
  • How much the fees are
  • Perform the exchange rate maths in your head
  • Then enter a number

Ewwww.

Share

Alternate queries on results pages making it easier for future evilness?

Share

John Battelle implies that the new search result page being testing by Google could make evilness easier in the future. The premise is that offering alternate queries might be useful now, but it would make it easier to insert paid listings later.

I’m confused though, and John doesn’t have a comment link in his RSS output, so I’ll post it here. Surely if Google wanted to embrace evil later, they could just direct their coders to make it happen? They already know what keywords you’re searching for (i.e. Adwords), couldn’t they just roll those into the page in a way which looks like search results? I see no real way this positions for future evil.

I’ve been keeping an eye on Google news recently, and there seems to be a propensity towards paranoia in a lot of people (for instance the gmail displaying Adwords thing). If people are bothered, why don’t they just use another search engine? You can’t tell me that MSN and Yahoo! are any less evil…

Share

Small file open and save dialogs

Share

It occurred to me this afternoon while driving home from discussing my broken brain with the general practitioner. Why are file open and save dialogs so small? Screen resolutions have gone up, but the size of these windows haven’t. Often I find myself poking around in a tiny little hole into the filesystem trying to find what I want. Why can they resize to say 80% of the size of the screen automatically?

This complain applies to applications on Windows, Linux, and MacOS equally.

Share