Categories
PyCharm Python

Fixing a PyCharm issue when updating Python made via HomeBrew

I’ve written before about how easy it is to update your version of Python using homebrew. And it totally is easy.

The thing that isn’t super clear is that when you do update Python via Homebrew, it seems to break your virtual environments in PyCharm. 🤦‍♂️

I did a bit of searching to find this nice post on the JetBrains forum which indicated

unfortunately it’s a known issue: https://youtrack.jetbrains.com/issue/PY-27251 . Please close Pycharm and remove jdk.table.xml file from ~/Library/Preferences/.PyCharm2018.1/options directory, then start Pycharm again.

OK. I removed the file, but then you have to rebuild the virtual environments because that file is what stores PyCharms knowledge of those virtual environments.

In order to get you back to where you need to be, do the following (after removing the jdk.table.xml file:

  1. pip-freeze > requirements.txt
  2. Remove old virtual environment rm -r venv
  3. Create a new Virtual Environemtn with PyCharm
    1. Go to Preferences
    2. Project > Project Interpreter
    3. Show All
    4. Click ‘+’ button
  4. pip install -r requirements.txt
  5. Restart PyCharm
  6. You’re back

This is a giant PITA but thankfully it didn’t take too much to find the issue, nor to fix it. With that being said, I totally shouldn’t have to do this. But I’m writing it down so that once Python 3.8 is available I’ll be able to remember what I did to fix going from Python 3.7.1 to 3.7.5.

Categories
Python

Keeping Python up to date on macOS

Sometimes the internet is a horrible, awful, ugly thing. And then other times, it’s exactly what you need.

I have 2 Raspberry Pi each with different versions of Python. One running python 3.4.2 and the other running Python 3.5.3. I have previously tried to upgrade the version of the Pi running 3.5.3 to a more recent version (in this case 3.6.1) and read 10s of articles on how to do it. It did not go well. Parts seemed to have worked, while others didn’t. I have 3.6.1 installed, but in order to run it I have to issue the command python3.6 which is fine but not really what I was looking for.

For whatever reason, although I do nearly all of my Python development on my Mac, it hadn’t occurred to me to upgrade Python there until last night.

With a simple Google search the first result came to Stackoverflow (what else?) and this answer.

brew update
brew upgrade python3

Sometimes things on a Mac do ‘just work’. This was one of those times.

I’m now running Python 3.7.1 and I’ll I needed to do was a simple command in the terminal.

God bless the internet.

Categories
Computers

iPad versus MacBook Pro

May people ask the question … iPad Pro or MacBook Pro. I decided to really think about this question and see, what is it that I do with each device.

Initially I thought of each device as being its own ‘thing’. I did these things on my iPad Pro and those things on my MacBook Pro. But when I really sat down and thought about it, it turns out that there are things I do exclusively on my iPad Pro, and other things that I do exclusively on my MacBook Pro … but there are also many things that I do on both.

iPad Pro

There are apps which only run on iOS. Drafts is a perfect example. It’s my note taking app of choice. Using my iPhone in conjunction with my iPad makes Drafts one of the most powerful apps I use in the iOS ecosystem.

During meetings I can quickly jot down things that I need to know using my iPhone and no one notices or cares. Later, I can use my iPad Pro to process these notes and make sure that everything gets taken care of.

I can also use Drafts as a powerful automation tool to get ideas into OmniFocus (my To Do App of Choice) easily and without any fuss.

I also use my iPad Pro to process the expenses my family incurs. We use Siri Shortcuts to take a picture of a receipt which is then saved in a folder in Dropbox.

I monitor these images and match them up against expenses (or income) in Mint and categorize the expenses.

This workflow helps to keep me (and my family) in the know about how (and more importantly where) we’re spending our money.

Mint is available as a web page, and I’ve tried to use macOS and this workflow, but it simply didn’t work for me.

Using OmniFocus on the iPad is a dream. I am easily able to process my inbox, perform my weekly review and quickly add new items to do inbox. The ability to drag and drop with with either Apple Pencil or my finger makes it so easy to move tasks around.

The other (obvious) use case for my iPad Pro over my MacBook Pro is media consumption. Everyone says you can’t get real work done on an iPad and they point to how easy it is to consume media on the iPad, but I think that shows the opposite.

When you’re ready to take a break from doing real work, the best media consumption device is the one you have with you 😀

MacBook Pro

When I really thought about what I use my MacBook Pro for I was … surprised. Quite honestly, it’s used mostly to write code (in Python) using my favorite editor (PyCharm) but other than that … I don’t do much on it that I can’t do on my iPad.

When I record podcast (OK, really, just that one and just that one time) I use my MBP, and if I have a ton of stuff I need to clean up in OmniFocus then I’m over at the MacBook, but really, it’s doesn’t do anything I can’t do on the iPad Pro.

Maybe I don’t do real work in the macOS ecosystem?

What I do on both MacBook Pro and iPad Pro

Honestly, they both do a great job of getting me to where I want to go on the internet. Some people think that mobile safari isn’t up to it’s macOS counterpart (and they’re right) but for my (non-coding) needs, it doesn’t really matter to me. They both work really well for me.

I also tend to use OmniFocus on both when I want to mark things as done, add new items, or make bulk edits (OF3 on iOS finally made this one a possibility).

I also use the terminal to access servers via ssh on both platforms. The great thing about the command line is that it’s mostly the same where ever you’re coming from.

Terminus on iOS is a a great terminal app and I can just as easily navigate the server there as I can using the terminal app in macOS.

I’m also just as likely to plan my family’s budget on iOS as I am macOS. It just kind of depends which device is easier to get to, not what I’m planning on doing. Excel on both platforms works really well for me (I work in a Windows environment professionally so Excel is what I use and know for that kind of thing).

Finally, writing. I use Ulysses on both macOS and iOS and really, I love them both. Each app has parity with the other so I never feel like I’m losing something when I write on my MacBook Pro (or on my iPad Pro). Sometimes, it’s hard to really tell which platform I’m on because they do such a good job (for me) to make them basically the same.

All in all, I don’t think it’s a question of which to choose, iPad Pro or MacBook Pro, iOS or macOS … it’s a matter of what device is closest to me right now? What device will bring me the most joy to use, right now? What device do I want to use right now?

iOS or macOS? iPad Pro or MacBook Pro? These aren’t the right questions to be asking. It should be … what device do I want to use right now? And don’t care what anyone else thinks.

Categories
Technology

Hosing my WiFi set up

I have been wanting to put shelves up in my office above my desk for some time. The problem has been that the ones that are sold at Lowe’s or Home Depot are not really what I wanted (too short) and I’m not a super handy guy with building stuff (that’s more my dad and brother) so I’ve just been putting it off. For an embarrassingly long time.

Last a couple of weekends ago my dad had volunteered to help me out in putting up some shelves.

On Saturday at 8:30 we started. All in all the process went really, really well. Only one extra trip to the hardware store (it’s usually about 3) and the shelves were nice and level.

Since I wanted the shelves above my desk we needed to move it, and all of the electronics that were on it, and plugged into the outlet behind it. This included a UPS / Battery backup that all of my electronics were plugged into.

We moved everything away from the wall, and then I moved it back. No. Big. Deal.

Now, the timing may have just been coincidental, but the next morning I needed to do some work for my job-y job from home. I took my laptop into my office (with the brand new shelves) and plugged it into the UPS.

I noticed the lights flicker and discovered that the WiFi router (my trusty AirPort Extreme) seem to have reset itself.

No big deal. I just rebooted and we were all good.

Later that day I plugged in my iMac and then stuff got real. The lights went out. I figured that the breaker tripped, but the sprinklers next to the breaker were on so I waded out through to the box and turned the breaker back on. Or so I thought. I came back in and the lights were still off.

At this point I freaked out because, well, that’s kind of what I do. I went back out and turned the breaker off and then back on. Lights are back.

OK, lets try this again. I plug the iMac back in and … crap. Lights are off again.

Back to the breaker (at this point the sprinklers are off) so off and on the breaker went.

OK, one last time and … mother f!

Somehow I was able to go from being able to have my UPS plugged in and everything being fine, to not.

OK. Swap out the UPS and put back the Surge Protectors. Everything powers on and we’re good.

Except we’re not. The light on my AirPort Extreme is suddenly not a solid green, but instead a flashing amber. I consult the internet and get a very unhelpful message

These are some typical reasons for the status light to flash amber:

The base station hasn’t been set up, or it was reset and needs to be set up again. Use AirPort Utility to set up your base station.

A firmware update is available for the base station.

The base station is set up to use Back to My Mac, but Back to My Mac isn’t working or the password is incorrect. If you’ve upgraded to macOS Mojave, you should remove the base station from your Back to My Mac network, because Mojave doesn’t support Back to My Mac.

The base station can’t connect to the Internet, such as when Internet service is down at your location, the base station can’t acquire an IP address from your primary router, or the WAN Ethernet connection to your router isn’t working.

The base station is set up to wirelessly extend the range of your network, but is too far away from the primary Wi-Fi base station.

If your base station is an AirPort Time Capsule, its internal hard disk is experiencing an issue that requires repair.

And suddenly my entire WiFi is down. And I am sad.

I tried a ton of things to get the AirPort Extreme Back, but nothing is working. I finally throw in the towel and decide to to use the WiFi access point from my Fios router.

This means that I have to update the WiFi on:

  • 3 iPhones
  • 2 iPads
  • 1 MacBook
  • 2 MacBookPros
  • 1 iMac
  • 2 Wemo Switches
  • 2 Raspberry Pi
  • 3 Apple TVs (2 4th Gen and 1 3rd Gen)
  • 1 WiFi connected Scale
  • 1 Ring Doorbell
  • 1 Ring Chime (connected to Ring Doorbell)

It also means that I need to plug my Netgear switch into my Fios router instead of the AirPort Extreme. No big deal, right? Except that it was because I forget that the port that the Cat5 cable is plugged into on a router is important.

I spent an embarrassingly long time trying to figure out why my Sonos and Hue Lights weren’t on my network.

Emily kept telling me to take a break and relax and that was, in that moment, the last thing I wanted to do.

I was able to get all of the iOS and MacOS devices connected back to the internet (via WiFi) and decided that I needed to forget the network and watch game 5 of the World Series.

By the end of the 7th we had the game off and were catching up on CW Comic Book shows.

It was a rough day. But I learned a couple of things:

  1. LAN Port 1 on the Fios Router is the right port
  2. Sometimes, you just need to take a step back and think instead of just react
  3. I have a crap ton of WiFi devices

I’m still working on trying to get the AirPort Extreme back to working so that I don’t need to get a new WiFi router ( have I mentioned how awful the Fios one is? ).

Categories
Technology

My Mac session with Apple

For Christmas I bought myself a 2017 13-inch MacBook Pro with Touch Bar. Several bonuses were associated with the purchase:

  1. A $150 Apple Gift Card because I bought the MacBook Pro on Black Friday and Apple had a special going (w00t!)
  2. The Credit Card I use to make ALL of my purchases at Apple has a 3% cash back (in the form of iTunes cards)
  3. A free 30 minute online / phone session with an ‘Apple Specialist’

Now I didn’t know about item number 3 when I made the purchase, but was greeted with an email informing me of my great luck.

This is my fifth Mac1 and I don’t remember ever getting this kind of service before. So I figured, what the hell and decided to snooze the email until the day after Christmas to remind myself to sign up for the session.

When I entered the session I was asked to optionally provide some information about myself. I indicated that I had been using a Mac for several years and considered myself an intermediate user.

My Apple ‘Specialist’ was Jaime. She confirmed the optional notes that I entered and we were off to the races.

Now a lot of what she told me about Safari (blocking creepy tracking behavior, ability to mute sound from auto play videos, default site to display in reader view) I knew from the WWDC Keynote that I watched back in June, but I listened just in case I had missed something from that session (or the 10s / 100s of hours of podcasts I listened to about the Keynote).

One thing that I had heard about was the ability to pin tabs in Safari. I never really knew what that meant and figured it wasn’t anything that I needed.

I was wrong. Holy crap is pinning tabs in Safari a useful feature! I can keep all of my most used sites pinned and get to them really quickly and they get auto refreshed! Sweet!

The other super useful thing I found out about was the Split Screen feature that allows you to split apps on your screen (in a very iOS-y way!).

Finally, Jaime reviewed how to customize the touch bar! This one was super useful as I think there are 2 discoverability issues with it:

  1. The option to Customize Touch Bar is hidden in the View menu which isn’t somewhere I’d look for it
  2. To Customize the Touch Bar you drag down from the Main Screen onto the Touch Bar.

After the call I received a nice follow up email from Apple / Jaime

Now that you’re more familiar with your new Mac, here are some additional resources that can help you go further.

Apple Support
Find answers to common questions, watch video tutorials, download user guides, and share solutions with the Apple community. Visit Support

Today at Apple
Discover inspiring programs happening near you. Visit Today at Apple

Accessories
From the Apple accessories page, you can learn about all kinds of new and innovative products that work with iPhone, iPad, Mac and more. Visit Accessories

How to use the Touch Bar on your MacBook Pro – https://support.apple.com/en- us/HT207055

Use Mission Control on your Mac – https://support.apple.com/en- us/HT204100

Use two Mac apps side by side in Split View – https://support.apple.com/en- us/HT204948

Websites preferences – https://support.apple.com/ guide/safari/websites- preferences-ibrwe2159f50

I’m glad that I had the Mac session and I will encourage anyone that buys a Mac in the future to schedule one.

  1. They are in order of purchase: 2012 15-inch MacBook Pro, 2014 27-inch 5K iMac, 2015 MacBook, 2016 13-inch 2 Thunderbolt MacBook Pro; 2017 13-inch MacBook Pro with Touch Bar
Categories
Wordpress

Why Ulysses is Awesome

I started writing my last post on my iMac but because Apple Photos is a bit … finicky with the iCloud syncing a screenshot I had taken on my iPad wasn’t there.

No fear, just keep writing in Ulysses, then move from the iMac to the iPad and drop the image in. It worked, no problems no fuss. It just works.

Now, if only iCloud would just work …

Categories
Uncategorized

Home, End, PgUp, PgDn … BBEdit Preferences

As I’ve been writing up my posts for the last couple of days I’ve been using the amazing macOS Text Editor BBEdit. One of the things that has been tripping me up though are my ‘Windows’ tendencies on the keyboard. Specifically, my muscle memory of the use and behavior of the Home, End, PgUp and PgDn keys. The default behavior for these keys in BBEdit are not what I needed (nor wanted). I lived with it for a couple of days figuring I’d get used to it and that would be that.

While driving home from work today I was listening to ATP Episode 196 and their Post-Show discussion of the recent departure of Sal Soghoian who was the Project Manager for the macOS automation. I’m not sure why, but suddenly it clicked with me that I could probably change the behavior of the keys through the Preferences for the Keyboard (either system wide, or just in the Application).

When I got home I fired up BBEdit and jumped into the preferences and saw this:

I made a couple of changes, and now the keys that I use to navigate through the text editor are now how I want them to be:

Nothing too fancy, or anything, but goodness, does it feel right to have the keys work the way I need them to.