Wednesday, August 24, 2016

Putting effort into the wrong solutions

T.G.I Friday's is revamping its signature look by removing "Flair" from the walls of their restaurants.  They claim this is going to help them compete with restaurants like Chipotle, which have a cleaner more industrial look. This move will also help them save about $20,000 dollars for new franchises that won't have to buy all the novelty items.

This is the a textbook example of ignoring the real problem by tackling one that is either minor (or sometimes not even real) because it is easier.  I've watched many episodes of Kitchen Nightmares and eaten in plenty of restaurants and if there is one thing I agree with, it's Gordon Ramsay's notion that the number one reason people enjoy and keep coming to to a restaurant is the food. It seems almost silly to even point this out, yet episode after episode of Kitchen Nightmares, as in T.G.I Fridays, show people desperate to change anything about their restaurants except the food.

Are there really people out there having this conversation in their heads:  "Hey let's go to Fridays!", "No way, there's all that crap on the wall, let's go to Chipotle and admire their exposed ductwork"
Maybe this could happen between two interior design grad students...but I doubt it's happening very often.

So why did Fridays do this? It was probably just easier or less expensive than any other fix they could think of.  And this is a very human trait.  I do this all the time.  Sometimes the right choice is not even harder physically, just mentally.  Take clutter for example. Physically, there's not much easier than just throwing something into a trashcan, and we know this can have it's own positive feeling of accomplishment.  But we also know that throwing out something we have a nostalgic attachment to can be one of the toughest things in the world.

So I've been trying to figure out how to sum up this idea in a neat pithy package.  It's something I could put ona classroom poster. Something like,  "Do it the best way, not the easiest way"

Sunday, August 21, 2016

Using Linux Subsystem for windows as an ssh server

I want to eventually get to use the Linux subsystem for windows to act as a vpn server, but as a warmup I tried to get it to act as an ssh server.  I tried the most obvious steps and ran into some trouble, but google helped me out. I found this article which discusses a few technical details that you need to be aware of and how to fix them.

And then I used this to setup my RSA keys.

Now I can run an ssh server through Linux through windows, all using stuff built into Windows.  Weird, but it works.

Next stop, going to use this tutorial to try to setup the vpn.  It's intended for Raspeberry Pi computers so I will have to modify it, and I am not sure if I need to vary my ssh config, but I will learn as a go. This is more about the learning experience than actually needed to get any of this stuff to work anyway.

Note to self, tried the thing, got stuck on step ten because ipv4 forwarding is not implemented yet.

Thursday, August 18, 2016

What can a PC workstation get you if you can't wait for the new Mac Pro

The ATP podcast talked about the aging Mac lineup a few weeks ago, the most egregious of which is the Mac Pro, which is essentially a 3 year old computer.  So I wanted to see what was out there in terms of PC to get an idea of what you are missing out on if you bought a new Mac Pro today.

I found this article which describes basically that.

In short, the newer PCs have more cores, better graphics chips, DDR4 RAM compared to DDR3, better expandability, and better ports, especially Thunderbolt 3 compared to Thunderbolt 2.

That being said, the clockspeed on individual CPUs has not changed much, so at very least single threaded processes wouldn't be sped up very much by new machines.  On many tasks, a new PC similarly configured to the Mac Pro would have similar benchmarks.  However, anything that could benefit from more cores, data transfer rates, and gpu power, would be benefited by the new PCs/

Ideas for classroom posters

I'm going to update these as they come to me, but here's a few

Take a deep breath and drop the rope.

You can't control your feelings, but you can control your react

Struggle with math now and it will payoff later

Using matplotlib to get graphical plots in Python in the Windows Subsystem for Linux

The first anniversary update for Windows 10 includes the ability to install a Linux subsystem (LSW).  The technical details are a little beyond me, but the bottom line is it lets you run Linux programs inside Windows.  For more information on that, you can check out this link.

Since I am trying to get to know Python, and in general programming Python in Linux is easier than on Windows, I thought I could use the LSW to support my Python workflow.  I need to use the scipy libraries, including matplotlib for plotting.  Ideally, I'd like to see the plot.  I googled to see if other people had this figured out, and saw a few message boards where people asked this question but had no luck.  After some searching though, I got it to work, and here's how.

These directions are adapted from this PC World Article.  I assume you have already installed all the relevant Python packages.

Step one.

     Install xming, using the default settings.

Step two.

    Start the xming server

Step Three

     Start the Linux shell and type :"export DISPLAY=:0"

Step Four

     Start Python, and now you should be able to see all your matplotlib plots.

adapted from from

import matplotlib.pyplot as plt
import numpy as np

t = np.arange(0.0, 2.0, 0.01)
s = np.sin(2*np.pi*t)
plt.plot(t, s)