Home | Random | Downloads | About | Hikes | 7,196,987,772 | Search | Feed

Vernal Equinox 2014

Vernal Equinox 2014

It's spring time in the northern hemisphere, autumn if your water flows the wrong way down the plughole. Rendered in Catfood Earth.

Commute failing to suck this morning...

Commute failing to suck this morning...

Presidio Theatre

Presidio Theatre

Personal Finger Daemon for Windows

Did you know that Windows still has a vestigial finger command with just about nothing left to talk to? One of my New Year's resolutions is to bring finger back and unlike the stalled webfinger project I need to make some progress. Here's some C# to run your own personal finger daemon... you just need to create a .plan file in your home directory (haven't done that for a while):

using System;
using System.Diagnostics;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;

namespace fingerd
{
    static class Program
    {
        private const int FingerPort = 79;
        private const int MaxFingerCommand = 256;
        private const string PlanFile = ".plan";

        private static readonly TcpListener _tcpListener = new TcpListener(
             IPAddress.Any, FingerPort);

        static void Main()
        {
            _tcpListener.Start();

            while (true)
            {
                TcpClient tcpClient = _tcpListener.AcceptTcpClient();
                Thread clientThread = new Thread(ClientThread);
                clientThread.Start(tcpClient);
            }
        }

        static void ClientThread(object client)
        {
            NetworkStream clientStream = null;
            TcpClient tcpClient = client as TcpClient;
            if (tcpClient == null) { return; }

            try
            {
                byte[] command = new byte[MaxFingerCommand];
                clientStream = tcpClient.GetStream();

                int read = clientStream.Read(command, 0, command.Length);
                if (read == 0) { return; }

                ASCIIEncoding asciiEncoding = new ASCIIEncoding();
                string commandText = asciiEncoding.GetString(command);

                int endOfCommand = commandText.IndexOf("\r\n"
                    StringComparison.InvariantCultureIgnoreCase);
                if (endOfCommand <= 0) { return; }

                string user = commandText.Substring(0, endOfCommand);
                if (string.Compare(user, Environment.UserName, 
                    StringComparison.InvariantCultureIgnoreCase) != 0) { return; }

                string planPath = Path.Combine(Environment.GetFolderPath(
                    Environment.SpecialFolder.UserProfile),
                    PlanFile);
                if (!File.Exists(planPath)) { return; }

                string plan = File.ReadAllText(planPath) + "\r\n";
                byte[] planBytes = asciiEncoding.GetBytes(plan);
                clientStream.Write(planBytes, 0, planBytes.Length);
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
            finally
            {
                if (clientStream != null)
                {
                    clientStream.Close();
                }
                tcpClient.Close();
            }
        }
    }
}

Book reviews for February 2014

Five Billion Years of Solitude: The Search for Life Among the Stars by Lee Billings

Five Billion Years of Solitude: The Search for Life Among the Stars by Lee Billings

4/5

Epic book about the origins, frequency and long term outlook of life in the universe.

 

Countdown City (The Last Policeman, #2) by Ben H. Winters

Countdown City (The Last Policeman, #2) by Ben H. Winters

4/5

A search for a missing person is the backdrop for watching society start to collapse and the plot begin to thicken in the sequel to The Last Policeman. Here's hoping that the third book will be worth the wait.

 

Skype for Android - Getting Closer

Skype for Android - Getting Closer

Skype for Android is finally getting there. Push support means that it is now useful for more than conditioning your battery. Conversation read status is mostly synced between different client instances which is a big time saver. I'm actually starting to use it.

There is one horrible usability crime. When you open the app you get a list of unread conversations. Your set your finger in flight to the first one and then notice an ad sliding down from the top of the screen. With horror you realize it's too late to change course and you hit the ad instead of the conversation.

I'm not complaining about Skype being ad supported here, but if you were going to try and design a UI to trick people into clicking ads you really couldn't do better than this. I expect better from Microsoft.

Other than this the only real complaint is that new posts to group messages sometimes make it through to the notification bar and sometimes don't. You have to run the app periodically to see if there is something new.

(previously, previously)

Pier 14

Pier 14

You won't believe this one crazy trick that would fix the broken patent system

You won't believe this one crazy trick that would fix the broken patent system

On Thursday The White House announced a trio of executive actions to fight patent trolls, most interestingly:

"Crowdsourcing Prior Art — To help ensure that U.S. patents are of the highest quality, the USPTO is announcing a new initiative focused on expanding ways for companies, experts, and the general public to help patent examiners, holders, and applicants find relevant “prior art”—that is, the technical information patent examiners need to make a determination of whether an invention is truly novel."

I've considered this for a few years as a for-profit business, paying a bounty to anyone who contributes prior art that helps take out a troll. But I have a way better idea: stop examining patents altogether.

(previously, previously, previously, previously, previously, previously, previously, previously, previously)

Fog over Twin Peaks

Fog over Twin Peaks

Fog sweeps in over Twin Peaks in San Francisco.

Book reviews for January 2014

Why Does E=mc²? (And Why Should We Care?) by Brian Cox

Why Does E=mc²? (And Why Should We Care?) by Brian Cox

4/5

Has some new (to me) angles to help you try and understand relativity and quantum mechanics so I enjoyed it. I can feel that clarity starting to slip away again two days later though...

 

The 4 Disciplines of Execution: Achieving Your Wildly Important Goals by Sean Covey

The 4 Disciplines of Execution: Achieving Your Wildly Important Goals by Sean Covey

3/5

Not as religious as your typical business self help book, still wildly repetitive though. Important goal -> focus on leading rather than lagging metrics -> simple scoreboard -> peer accountability on a weekly basis -> win. It's pretty much scrum for the non-development crowd (assuming that having a captive customer can be counted as a leading metric which I think it does).

 

A Good and Useful Hurt by Aric Davis

A Good and Useful Hurt by Aric Davis

4/5

Well paced and strange book about catching a serial killer via unexpectedly powerful tattoos.

 

Last Man in Tower by Aravind Adiga

Last Man in Tower by Aravind Adiga

3/5

It's like an episode of the A Team with two important differences - the book is set in India and the A Team don't show up. This means that it doesn't end well.

 

Previous Page | Next Page

I Thought He Came With You
Robert Ellison's blog.

Like I Thought He Came With You on Facebook