Archive for the ‘Everything Else’ Category

The Power of Friendship

Thursday, April 9th, 2015

Path

I was chatting with a friend today, and they are having a rough time, and feeling very much unlike themselves. Up and down... slight depression... things that are so very unlike this person it is amazing that they recognize them when they are happening to them. They were really struggling, and all I could think of was "I've been here! I know this!"

Which reminded me of this scene in The West Wing between Josh and Leo, who said:

This guy's walking down a street, when he falls in a hole. The walls are so steep, he can't get out. A doctor passes by, and the guy shouts up "Hey you! Can you help me out?" The doctor writes him a prescription, throws it down the hole and moves on. Then a priest comes along and the guy shouts up "Father, I'm down in this hole, can you help me out?" The priest writes out a prayer, throws it down in the hole and moves on. Then a friend walks by. "Hey Joe, it's me, can you help me out?" And the friend jumps in the hole! Our guy says "Are you stupid? Now we're both down here!" and the friend says, "Yeah, but I've been down here before, and I know the way out." As long as I got a job, you got a job, you understand me?

I told my friend, "Hey, I've been here for years, and I know my way around this hole. Trust me - I've got your back. It'll be OK."

And for the first time since I was kicked out, I felt that all that I had been through was worth it. Every horrible day - worth it. Because I could help my friend.

Amen

The Painfully Slow Updating of Mac OS X 10.10.3

Wednesday, April 8th, 2015

Yosemite

After updating my iPhone, I realized that I hadn't checked for updates to my laptop this afternoon, so I checked there, and sure enough - OS X 10.10.3 dropped as well. This is a 2.02 GB download and updates the Rescue Disk as well as several parts of Yosemite - including the new Photos app.

Now, I've been struggling with the Guest WiFi for a while, and to a point, I understand that there's a limit to the bandwidth they want to provide. But it's kinda silly to limit the bandwidth to what they have now given that you can get Comcast to deliver 50 Mbps to your home. It's kinda silly to cheap out on the network bandwidth.

So it's going to take me over two hours to download 10.10.3 to my personal laptop. It's OK... I've got time... it's just this kind of thing that makes it hard to convince people that this is a Software Company and not the traditional Service Company.

Until then, I wait and watch the download progress...

[3:28pm] UPDATE: finally finished, and then the 10.10 Command Line Tools needed to be updated as well. In the end, it was all done before I had to leave, and that's a win in my book.

Upgraded to iOS 8.3

Wednesday, April 8th, 2015

iPhone 4

I saw a tweet from Wil Shipley about iOS upgrading, so I decided to check and see is indeed there had been an update drop, or if it was a developer update for something he's working on. Turns out iOS 8.3 dropped, and so I spent the few minutes to download it and make sure it runs well.

They re-did the emoji keyboard, and it looks a little more dense to me, which is fine because before it was pages and pages of emoji. Not bad. They also said that it was a few bug fixes that impacted performance, and who doesn't like a little performance boost now and again?

After I was sure it was all OK, I sent out a text to me family saying that it was ready to use, and that I'd checked it out already. I know they don't need me to say this, but it's nice to know what someone is thinking of you - even if it's as silly as an automatic update of iOS.

They'll get it when they can, and that's fine.

Dropbox is an Amazing Tool

Wednesday, April 8th, 2015

Dropbox.jpg

I've been a Dropbox user for quite a while, and I've held off on the storing of Photos for now because of iCloud, and the fact that my iPhone and Mac already have those things handled quite nicely. But for all the other things I might need a cloud storage system for, I have to concede that Dropbox really is the best - by far.

When I need to move a file from one laptop to another - Dropbox is there. When I want to have it available on my phone - Dropbox is there. The seamlessness of Dropbox is really about as frictionless as possible. It really just something that fits in with the Mac user-experience very well. It Just Works.

What more could someone ask for?

I'm in the beginning of helping my niece learn to code, and it's so easy to share a folder with the code files to her. Simple. Easy. Painless. I just can't think of another product that's not made by Apple - that's this frictionless. I'm sure they exist, but none come to mind right now.

What a treat to be able to use great tools like these.

Getting Back into Python for my Niece

Tuesday, April 7th, 2015

python.jpg

This past weekend, I visited my sister in Iowa City, and my niece was there and asked about learning to program in Python. There were no classes in her graduate school (St. Louis University), and so I told her to just pick up a book and go at it. My sister pointed out that a lot of people learn better with the structure of a class, so I told my niece that I'd pick a book, and walk her through it - like a correspondence course in Python.

So I'm back in Python.

I sent her a few book recommendations - an O'Reilly book, and this book from Pragmatic Programmers. I wanted her to be able to read the excerpts of both and see which voice of the author she liked more. It was no surprise to me that she picked the Pragmatic Programmer's book - I have several myself, and they are excellent.

So this morning I'm getting the Pragmatic Programmer book, and scanning the first two chapters. I think it'll be better to use Python 3 from Homebrew as opposed to another source, just because it's self-contained, updatable, and simple. I need to write up a few notes for the first two chapters and then shoot them off to her with a link to a shared Dropbox folder for us to exchange files in - that was her idea, and a good one.

If I can just get these things downloaded on The Shop's WiFi, I'd be in business... but it's a pain in the neck, so it's taking a lot longer than it should. But it'll get there... eventually...

Bitbucket Relative Image Markdown Links

Thursday, March 19th, 2015

Bitbucket

I've got a few projects on Bitbucket, and while it's nice to have an alternative to GitHub's policy on private repos, the Markdown rendering on Bitbucket is really sad. The problem is simple: If I have a repo with images in it, and I want to include them in the README.md, then for GitHub I need to include something like:

  <center>
    <img src="docs/img/logo.png" width="450" height="200"
    border="0"/>
  </center>

and it'll work - but including the HTML, as per the Markdown standard, on Bitbucket is not allowed. They have written that they don't allow any HTML in their Markdown due to safety reasons. But then why does GitHub? Is it just because Bitbucket isn't using as good a parser?

In addition to the lack of HTML, the relative links in the Markdown aren't supported, either. This means that in order to include an image in the README.md, I have to do something like:

  ![Using the correct G-REPL URL](https://bitbucket.org/applieddl/
    pocket/raw/master/doc/img/grepl-url.png)

this means that the links don't work in local preview mode, and a lot of folks have been asking for more than a year, to have this fixed. Their answers have ranged from "It's a feature", to "It's on the list, with no ETA". Clearly, the company isn't listening to it's users. That's sad.

For Bitbucket, the issue seems to be revenue. They don't seem to feel the need to fix this serious documentation issue, and it can't be all that hard if GitHub has had it from the beginning. The people on the ticket have even quoted (and linked) the Markdown spec as well as how GitHub is doing this - and nothing has changed.

I can appreciate that this is their choice. Mine is to use it only if I have to, and realize that their idea of support is "No, thanks", and accept what is, over any hopes of what might be.

Every Now and Then… SPICE

Wednesday, February 18th, 2015

MacSpice

Every now and then I remember all the work I did in college, and at Auburn University with SPICE and MAGIC. These are tools that I just can't ever forget, and all the time I spent on the terminals in the Terminal Rooms in the EE building... well... yes, let's just say they were some very Good Times. And of course, that was a good 30 years ago. Wow. In the subsequent years, MacSpice is around, and it's got all the models, and all the capabilities that the old SPICE had - plus some amazing plotting.

In fact, I'm sure my retina MacBook Pro is probably more powerful than all the computers the EE Dept. had in 1988, and it shows. I can start with this very simple LPF circuit:

  Four double-pole, low-pass, LC-filters
  VIN 1 0 AC 1
  * Q = 0.5
  R1 1 2 200
  L1 2 3 10mH
  C1 3 0 1uF
  * Q = 1
  R2 1 4 100
  L2 4 5 10mH
  C2 5 0 1uF
  * Q = 2
  R3 1 6 50
  L3 6 7 10mH
  C3 7 0 1uF
  * Q = 4
  R4 1 8 25
  L4 8 9 10mH
  C4 9 0 1uF
  .AC DEC 100 100hz 10khz
  .END

and then in the MacSpice console:

  MacSpice 1 -> source lpf.ckt
 
  Circuit: Four double-pole, low-pass, LC-filters
 
  MacSpice 2 -> run
  On line 2:
      vin 1 0 ac 1
      Warning: Source 'vin' has no DC value specified, 0V assumed.
  MacSpice 3 -> plot vm(3) vm(5) vm(7) vm(9)

and we see:

Four LPFs

It really is amazing what these tools can do, and they continue to bring a smile to my face. What a treat.

Postman in Chrome is a Wonderful Tool

Wednesday, February 4th, 2015

Google Chrome

I've been doing a little work on the Clojure CryptoQuip solver by adding a new RESTful endpoint for the server that takes the quip and the clue and solves the puzzle. It's not all that hard, but it's a POST call, as the body of the POST is JSON, and I needed a tool to hit my server to make sure that I had it all working. Enter Postman.

This is just an amazing tool for Chrome. It's a very singular task, and it does an excellent job of making sure that you can make all the calls you need with all the headers and arguments and get back what you need - and even keep a running history of all the calls to re-do should you need them.

Clearly the folks that wrote this knew what they needed and spent quite a bit of time on it. I have yet to find a hole, a bug, or a limitation. It's just good, solid working code. And it's free. Wow. Impressive.

I looked at several of the OS X tools on the App Store, and even on the web and the nice ones were more than $20, and most weren't nearly as nice as Postman. If you need something like this, you need it, and this is as good a tool for the job as you can get.

Having Fun with a Paralegal

Wednesday, February 4th, 2015

PHB.gif

OK, this isn't something that typically happens, but today I got an email from the paralegal assigned to my lawyer for my divorce. Typically, I hate getting emails because it's either bad news, or a bill. Some would argue they are one in the same, but I see the bills as slightly less depressing than the "regular" bad news I get about the divorce.

So I got an empty email from her, so I wrote back:

This email is empty - I have no idea what this is about.

Please provide me a little context.

and she replied:

Ha! I was adding to my previous email that I could email you record (in several sections) AND deliver the paper copies so you don’t have to print it out and you will still have electronic copies. OK?

I had no idea whatsoever what she was talking about, but clearly she thought this was funny. She still didn't know that she was talking to the wrong person. So I went along with the joke, and wrote back:

I’m sure to you this all makes perfect sense, but to me I’m still thinking “What is this thing that Beth wants to get to me?” and “Why do I need paper copies and electronic ones?”

Maybe it’s an invitation to a party?

Maybe it’s a movie - Oh… I do love movies. Spy ones are good… I like Comedy too.

Maybe it’s a sandwich? No… well… maybe - a paper sandwich?

So I must not have communicated clearly… my fault… I do that a lot.

Let’s try again...

What is this email about?

What do you need to get to me? And why?

Is it important, or just informational?

I think if you answer these, I’ll have a lot better idea what you’re talking about. No guarantees, mind you, but I think I’ll have a better handle on things.

I could go on, and we did for another round of emails until she realized that she was mailing to me, and not another "Bob B" that she needed to be emailing. Then she picked up the phone and was quite apologetic. I thought it was at least a little amusing, but clearly she seemed to think the lawyer(s) would not find this comical - in the least.

I feel for her. An honest mistake is going to be a source of grief and embarrassment for her for the next day or so. I understand that lawyers are meant to be flawless, but we're all people, and we all make mistakes - big and small. I hope they don't give her too hard a time.

CryptoQuip Solver in Swift

Tuesday, February 3rd, 2015

Swift

OK, I've spent several hours with Swift, and it's pretty close to Ruby, but it's not the same in that the String is still a class, and that means that it doesn't have the duality that a string in Ruby - or clojure - has. This makes a lot of the functions in the CryptoQuip solver a lot harder.

Little things, too - like finding the distinct characters in a String. In clojure it's easy:

  (count (distinct "rabbit"))
  => 5

and even ruby it's nearly as easy:

  "rabbit".chars.to_a.uniq.count
  => 5

but in Swift, it's nasty:

  func distinct(list: [Character]) -> [Character]  {
    var buff = Dictionary<Character, Character>()
    for x in list {
      buff[x] = x
    }
    return buff.keys.array
  }
 
  let src = Array("rabbit")
  distinct(src).count

I did find a StackOverflow idea that does it, but it's a function that basically builds up a new list by adding one element at a time, and then checking before each add that the new element doesn't already exist in the collection. Since both these collections are Arrays, this is a linear search over and over and over again, and it's a mess.

I'm sure Swift has a ton of nice features, and it's quoted as faster than ObjC - which is nice, but issues like this make me realize it's a 1.x language and that the builders haven't had the time to go into the same use-cases that they have for other code bases, and fill in all these kinds of features that will make it a lot easier to write more complex systems.

For now, I'm content to hold off on more Swift work. It's just not where I'd like it to be.

UPDATE: I added in the function that I wrote, and it works, but Holy Cow! it's a mess. You can't easily make it one call:

  distinct(Array("rabbit")).count

because you have to worry about the mutability of the Array, and that causes warnings in the code... it's just not ready for all the things you need to do. Soon, hopefully.