2017-02-28

Python / Linux / VMware 5: Git-it with PyCharm

I'm trying to expand my knowledge of Linux and Python. I'm taking a "start from scratch" approach, building some virtual environments at home, and documenting every step along the way. This is the fifth of five posts capturing those steps; the end-state is PyCharm IDE, Python 3.6, CentOS 7.3, VMware Workstation Pro 12 running on Windows 10.

Part 1: Installing VMware and CentOS
Part 2: Expanding CentOS's Minimal Install
Part 3: Installing Python 3.6
Part 4: Linking PyCharm to Github via SSH
This is Part 5: Running through Git-It again, this time with PyCharm

Run through Git-it again, but with PyCharm


At this point we're just about ready to start working in PyCharm. All that remains is to work through Git-it again, but using only PyCharm, to discover any differences along the way (or to become more familiar with PyCharm). Each numbered step below corresponds to a step in the Git-it sequence.

Before you begin: Remove hello-world and patchwork


In Github, remove hello-world and patchwork by going to https://github.com/my_user_name/repo_name/settings (like https://github.com/gbarwis/hello-world/settings, for example) and scrolling down to the bottom of the page to the delete this repository feature.

In a terminal, remove both the hello-world and patchwork repositories from your local host via:
$ rm -rf ~/hello-world/ ~/patchwork/

2017-02-20

Python / Linux / VMware 4: Linking PyCharm to GitHub via SSH

I'm trying to expand my knowledge of Linux and Python. I'm taking a "start from scratch" approach, building some virtual environments at home, and documenting every step along the way. This is the fourth of five posts capturing those steps; the end-state is PyCharm IDE, Python 3.6, CentOS 7.3, VMware Workstation Pro 12 running on Windows 10.

Part 1: Installing VMware and CentOS
Part 2: Expanding CentOS's Minimal Install
Part 3: Installing Python 3.6
This is Part 4: Linking PyCharm to Github via SSH
Part 5: Running through Git-It again, this time with PyCharm

In this post I'm going to configure PyCharm to use GitHub for version control (then I'm going to get it working with SSH). This will let me accomplish two things:
  • It will let me work more easily from multiple machines on the same code.
  • It will make it easier for me to review or assist with other projects that are on my radar, because those are also in GitHub.

What is GitHub?


First, GitHub is not git. git is a version control tool written by Linus Torvalds, the guy responsible for Linux. Think of it as a series of snapshots of your code - so you can say 'oops, I really screwed this up, I want to go back to what I had 36 hours ago.'

GitHub is an online, web-based version control repository (with some other cool features, too). Imagine taking all of those incremental snapshots (with git) and saving them to DropBox or Google Drive. GitHub accomplishes this, but because it is specifically designed around this sort of purpose, it does it really, really well. This provides a few benefits:
  • It allows multiple people to work on the same project without the need for a common physical network. I can concurrently collaborate on code with colleagues in Kansas, Colorado, Kenya and Kuala Lumpur.
  • It allows work to continue on the same code, from multiple machines - I can make a lot of progress on my system at home, but if I have an idea while I'm at work, I can make a change without waiting to get back to my home system.

2017-02-08

Python / Linux / VMware 3: Installing Python 3.6

I'm trying to expand my knowledge of Linux and Python. I'm taking a "start from scratch" approach, building some virtual environments at home, and documenting every step along the way. This is the third of five posts capturing those steps; the end-state is PyCharm IDE, Python 3.6, CentOS 7.3, VMware Workstation Pro 12 running on Windows 10.

Part 1: Installing VMware and CentOS
Part 2: Expanding CentOS's Minimal Install
This is Part 3: Installing Python 3.6
Part 4: Linking PyCharm to Github via SSH
Part 5: Running through Git-It again, this time with PyCharm

I'm going to install the most recent version of Python, which at the moment is 3.6.0. I want to use the latest version for two reasons:
  • To align with the book that I'm using, which focuses on version 3
  • To experience software installation that's a bit more involved than yum install
This means that I'm going to need to download the source and compile it.

It's important to know that Python 2.7 is already installed, since it's a default part of most Linux distributions. Because of this, if I just install Python 3 without changing some of the standard installation behavior, I'm going to create trouble for myself later; the default Python installation and version are used by some important Linux system tools, which I'd rather not break.

2017-02-04

Python / Linux / VMware 2: Expanding CentOS's Minimal Install

I'm trying to expand my knowledge of Linux and Python. I'm taking a "start from scratch" approach, building some virtual environments at home, and documenting every step along the way. This is the second of five posts capturing those steps; the end-state is PyCharm IDE, Python 3.6, CentOS 7.3, VMware Workstation Pro 12 running on Windows 10.

Part 1: Installing VMware and CentOS
This is Part 2: Expanding CentOS's Minimal Install
Part 3: Installing Python 3.6
Part 4: Linking PyCharm to Github via SSH
Part 5: Running through Git-It again, this time with PyCharm

At this point, I'm working with a CentOS 7 virtual machine based on a Minimal Install. I have Internet connectivity, and have used yum update to make sure that all currently installed packages are at their latest versions.

Today I'm going to install the things I need to get started working in Python 3.6 in a graphical IDE. I could have taken care of all of this by using something other than the Minimal Install when I installed CentOS, but where's the fun in that?

Linux-based systems use a Package Manager to find and install software. CentOS uses yum so that's what I'll be playing with today. On Debian and Ubuntu, apt or apt-get are more common; here is a good reference if you're more familiar with those than with yum.

Note that the next few sections explain my thought process as I figured out what I'd need to install (so it's easier for folks to tell me where I went wrong, if they spot something). If you want to skip straight to the actual install steps, then go to the Putting it all together section, further down the page.

Figuring out what to install: nslookup is inside of package bind-utils

When I had finished the preliminary installation of CentOS, before I tried to ping an IP address, I had first tried to use nslookup - and discovered that it is not included in the Minimal Install. That's a tool I will want to have available, but I want to find out a little bit more.

2017-01-31

Python / Linux / VMware 1: Installing CentOS

I'm trying to expand my knowledge of Linux and Python. I'm taking a "start from scratch" approach, building some virtual environments at home, and documenting every step along the way. This is the first of five posts capturing those steps; the end-state is PyCharm IDE, Python 3.6, CentOS 7.3, VMware Workstation Pro 12 running on Windows 10.

This is Part 1: Installing VMware and CentOS
Part 2: Expanding CentOS's Minimal Install
Part 3: Installing Python 3.6
Part 4: Linking PyCharm to Github via SSH
Part 5: Running through Git-It again, this time with PyCharm

Create the Virtual Machine

As part of creating your Virtual Machine, it's useful to already have an image of the operating system you want to install - so go to https://www.centos.org/download/ and click on Minimal ISO, then choose one of those files to download the latest version of CentOS. Odds are good that you're going to want the 64-bit version.

In VMware, click on Create a New Virtual Machine to start the wizard. You'll be prompted to choose your configuration type; stick with Typical and click on Next.

2017-01-29

I love Alaska - I've been there a number of times and each time it feels more like "let's live here".

For the first week in January, we visited the Alyeka Resort just outside of Girdwood, and had a great time. If you like the snow, it's a great place to visit in winter; from what I've read, it's got some great hiking and biking in the the summer season, too.

We took a hike along Winners Creek Trail one afternoon. This photo was from that hike, taken on this bridge facing northeast.


I haven't posted any more photos from that trip, but I have a few others that are up over on Tumblr. Check 'em out!

Learning Python and Linux on VMware in Windows

I've been a reasonably technical guy for a long time, but I've lost touch over time with my technical roots as I've focused more on management and leadership. When I think about that too much, it makes me a little sad, because I always have a lot of fun figuring out technical puzzles or otherwise solving problems.

Sometimes this will bubble up into side projects. I've always been a fan of Excel (don't laugh) for data analysis and visualization, I've hunted down some elusive problems in data centers using my own Splunk server, I've learned a little bit of Groovy so I could do some automation in Jira, and so forth. These are almost always emergent, though, so I learn just enough to accomplish my specific goal, and then stop.

My background is in Windows (my first MCSE, for example, focused on NT 4.0 and Exchange 5.5) and storage (everything from tuning two-drive RAID-1 arrays to the bigger multi-rack stuff - DAS, SAN, NAS, JBODs, tape robots, etc). My Linux knowledge, though, has always been of the "learn what I need to know" variety. I'm sort of like an tourist that's memorized a good German phrasebook - I could be situationally proficient, but couldn't necessarily write an article for Welt.

2017-01-28

July 4th, 2076? Yup, that's a Saturday.

When I was younger, I used to think that it would be really cool to be able to figure out (in my head) the day of the week for any date. I don't remember ever really thinking that this would be useful, in particular, but that it would be more of a nifty parlor trick. A "Have fun at parties! Impress your friends!" kind of thing. Then, I forgot about it.

Fast forward a few decades, and like magic, the Internet holds the answers. Whee! Time and Date has one good approach. There's a different method over on the Grey Matters blog.

Part of me still thinks that this would be really fun to learn, and part of me thinks it's sort of like knowing how the sausage is made. What do you think - worth the time or waste of time?

2017-01-14

Running multiple antivirus tools simultaneously

I like sugary breakfast cereal. I'm kind of a traditionalist - Frosted Flakes and Captain Crunch are my favorites - but I dig some of the newer brands, too. I'm also a big fan of wines from the southern Rhône; man oh man, there's nothing like a glass of Châteauneuf-du-Pape with a big bowl of cassoulet.

But.

Most folks would agree that pouring a bowl of tasty Captain Crunch and then adding to it a cup of delicious Rhône red would lead to unsatisfactory results.

Running antivirus software is a great idea; everybody should do it, and there are lots of good options available. Running two antivirus programs at the same time, though, is about like mixing wine and cereal - it's all going to end in sadness and tears.

Antivirus software can be resource-intensive, competing for time from your CPU or your disk subsystem. If you run more than one antivirus product at a time, the resulting load can often be even greater than just the sum of the separate products. This is because they're fighting over the same files and data at the same time. They'll get involved in a tug-of-war over files as your system is accessing them, they'll argue over whether each other's files are viruses or not, they'll call each other names and flood your logfiles with complaints, and in the worst cases, their intransigence can cause your system to lock up entirely for minutes or more.

On the other hand, it can be worth having a second anti-malware program installed, as long as you don't have it memory-resident or running in the background. For example, I have both Malwarebytes and Spybot - Search and Destroy installed on my system, and run them manually every other week. This can be a great way to get an additional layer of protection without making your computer resent you forever.

“Our security policy requires that all systems have a minimum of 2 antivirus programs installed and running. Why do you ask?"

2017-01-13

Blogger: "SSL or custom domain. Pick one."

So apparently Blogger (who hosts this site) only supports SSL on non-custom domains. I get to choose to use either my own "barwis.net" domain, or to support HTTPS, but not both.

My hope is that Google will one day introduce SSL support for custom domains. However, since they haven't done this since they acquired Blogger in 2003, I'm not exactly holding my breath.

    poo.

I've found two sites that discuss a partial workaround for this by using Cloudflare, but from what I can tell it requires a non-free Cloudflare account - and it's not that important to me yet. Apart from the Cloudflare solution, I'd love to hear if anybody knows of other ways to get this working. I'll purchase my own cert, of course, but this seems like it should be more straightforward than it's proving to be.

Update, Dec 2018:

I'm not sure when, but it looks like this has changed - custom domains have SSL support. All traffic to this site is now HTTPS-enabled - and any regular HTTP traffic is automatically redirected to HTTPS. Thanks, Google!

Founder's Mentality and the paths to sustainable growth

This is a good video from Bain in their Founder's Mentality series. It discusses some of the benefits that come with scale and scope as organizations grow, and some of the losses to Founder's Mentality (or startup mentality, as I've heard it called elsewhere) that can also accompany that growth. Perhaps most insidiously, the benefits gained with scale and scope can mask the damage of losing that Founder's Mentality - and recovering it can be far more difficult than maintaining it.
The whole thing is worth a watch, but two parts particularly resonated with me:
  • The idea of frontline obsession. In a startup, you're talent obsessed, customer obsessed, and advocacy obsessed. As companies grow, and the frontline is no longer at the table for strategic conversations (instead replaced by managers or managers of managers), the company is increasingly distanced from the real experience of the customer.
  • The addition and codification of process and procedure, while important, brings other dangers. If these serve to attract talent that only wants to work from a manual, only following predefined processes, then they lead to an organization that eschews large individual or organizational risks. This incumbency mindset is a major step down the path of an organization becoming a struggling bureaucracy.

Most fast-growing companies aspire to global leadership in their industries. They often start as insurgents: fast, agile and adaptable. But to win in the long term they must scale, often losing what we call the Founder's Mentality. Bain's James Allen explains the elements of Founder's Mentality and the "winds" that can blow a company off course.

2017-01-12

Hello, world.

Howdy.

First blog post here, mostly just to see what the formatting looks like and to experiment a bit with labels.

Over time I expect the theme of this blog to become "stuff that I care about" - nothing more than that. There's likely to be a broad mix of random things, from weblinks to code snippets to political ramblings to random bits of information.

Comments are welcome - if you see something interesting, or worth contradicting, jump right in.