• Always learning

    Throughout my career I have always had to learn new technologies in order to survive and thrive. New technologies include programming languages, toolkits, and operating systems. While I learned many things in college, the one idea that has been most important to me is the ability to teach myself anything that I need to know.

    In a field like technology where it is always changing, what I knew 5 years ago may no longer be relevant today. Recently I was asked about certain types of app architectures, MVC, MVVM and VIPER. At the moment I was asked, I had only used MVC and really didn't know anything about the other 2 architectures. I'm sure this made me look like I wasn't well versed in something that certain individuals may consider basic. Seeing a gap in my knowledge, I looked up information on what I didn't know, consulted with a friend (and former colleague) and decided to teach myself MVVM. Within a day I had a basic understanding of MVVM and within 2 weeks, I had completely overhauled an application to use MVVM as that architecture was easy to understand and made a lot of sense moving forward.

    In a job interview I'm sure employers are looking for what people know today and not what they can learn. Unfortunately they are potentially missing out on good, smart people. Technology will change; if people can't learn they may not be able to produce apps in a few years. However, if you know COBOL and haven't learning anything knew if 30 years, you still might be able to get a job.

    While I'm definitely not at the forefront of using and knowing technologies like I mentioned above and new ways of writing apps such as SwiftUI, I have the skills to learn just about anything and quickly. Knowing technologies is great, but being able to quickly learn new ways of writing software is possibly more valuable to me.

  • Revisiting Open Source

    I wrote about open source about a decade ago and how it can be good and bad. Recently I had a conversation with someone who said he wasn't dogmatic against using open source in certain projects, but was quite cautious. I'd call this pragmatic and is what I'd like to say I am with respect to open source. In my current project, I am the sole developer working on 7 applications at once (6 iOS, 1 Mac) so my resources are quite limited. I use open source because I don't have the time to write some code that isn't central to the apps. However, there are other pieces such as networking, that I've spent the time to write from scratch so that I have full control over them.

    If I was on a larger team or working on apps that couldn't fail, i.e. health and safety, I'd be a lot more cautious about open source. If I chose to use open source, I'd make sure that every aspect of the code was reviewed and understood. For instance, just last week there was an issue with the Facebook SDK that caused apps that included it to crash. This kind of behavior should not be tolerated on apps that should not fail; my apps today aren't going to harm anyone so while it would be inconvenient to have crashes, but wouldn't be the end of the world.

    In an ideal world, I'm not sure I'd use open source in my apps, but in the practical world, I don't have a choice. There are definitely some great pieces of open source that exist today, but if people rely on them and don't completely understand how they work, it will lead to failure. There are pieces of open source that are used as the fundamental building blocks of certain apps; in order to properly use them in my opinion, every developer must understand the inner workings of them so that they can debug if needed.

  • Working from home - Is it negotiable?

    With COVID-19 having people work from home, I'm reminded of my own history of working from home.

    More than 20 years ago, I worked for Critical Path Software (now part of eBay) in Portland. While Portland is a great place to visit, it wasn't for me. I decided to leave Portland and when I told the owners of the company I was moving back to San Diego, they asked if I wanted to continue working for them. Since I had nothing else lined up (not the brightest idea to move without a job), I said sure. That was the start of me working from home.

    Through many contract jobs and a full time job, I continued to work from home. I treated working from home just like working in an office and would rarely leave during the day; my work ethic wouldn't allow it. As time went on, I realized that being in one place (i.e., my home office), wasn't always where I did my best thinking. Running, doing errands, and being out of the house sometimes produced my best work which helped me relax the need to be in the "office". This didn't mean I was working any less and in fact, I'd argue that my productivity has gone up since I started being less rigid about being in the office.

    Several years ago, I was offered a position that met all my requirements for a job, except for one, working from home. I thought about this a lot and decided that commuting to an office would take a lot out of me and turned it down. I know that people commute all the time, but for someone that hasn't, I just couldn't make that sacrifice. Luckily I still had my contract work, so I was able to make the choice.

    Four years ago I was laid off and looking for work. The first job that I was offered seemed great, but I'd have to go into an office everyday. I figured how bad could it be since the commute was against traffic and just 30 minutes each way. As I didn't have any other job prospects, I took the job. As soon as I started the job, it started to wear me down. I got up at 6 am to be at work at 7 am and leave at 3:30 pm. Everyday I came home and fell asleep on the couch. Between the commute, having to be around people all day, and being stuck in a cubical was too much for me to handle. I did manage to work from home once a week towards the end of my short stint there and swore I'd never work in an office again.

    Now we're here with many people working from home and some are asking why can't they always work from home? I think that too many companies are stuck with the mentality that being in an office is required to do work. That clearly isn't the case for good people. I hope that having people work from home now will get companies to re-think their work from home strategy.

    Here's some advice I'd like to offer companies that haven't let people work from home in the past and won't let them work from home regularly once we get back to "normal":

    • A high performing person will be high performing no whatever where he or she is.
    • "Water cooler" talk can still happen using tools such as Slack. I chat with a former colleague and friend all the time; he helps me solve problems and is a great sounding board. I've only been in the same room with him maybe 3 or 4 times since we first started working together years ago.
    • Ad hoc design discussions can be just as effective through email, instant messages, screen sharing and phone.
    • People can be much less stressed by not having to deal with a commute and coming into an office.
    • Companies are missing out on good people by requiring them to come into the office or being in any particular location.
    • Being flexible makes people happier.

    I'd like to say that working from home is non-negotiable for any future job or contract I take. Going into an office every once in a while is fine, but I'm not sure I could be happy going into an office everyday and that directly translates into not being fully productive.

  • Monitoring a SunPower Solar System

    [Update: Here is a new Node-RED flow that works better with Home Assistant's Energy Dashboard.]

    After years of waffling on if I should install solar on my house, I finally decided that it would be a good investment. While the federal tax credit went down from 30% to 26%, I would still get a bit of my investment back. The tax credit goes to 22% next year and then goes away, so if I didn't make the leap now, I'm not sure financially it would make sense for a long time until the panel prices come way down.

    Like most major investments, I did a significant amount of research. I got proposals from 9 companies using a variety of panels and inverters. For better or worse, I went with a SunPower system. SunPower wants to make it easy for people to see how much energy they are producing and their monitoring site has a very, very simple dashboard. Apparently their older dashboard (still available via a different URL that uses Flash) showed output on a per panel basis. When I asked SunPower about this, here was their response:

    Unfortunately, our monitoring website only shows production data of the system as a whole. Inverter level monitoring was only offered to dealers for troubleshooting and/or repair purposes. This was not offered to homeowners because, after lengthy evaluation, that feature offers more information than is necessary to monitor ongoing system performance, but not enough information to help identify problems (on the rare occasions when they do occur). We also had concerns about the feature’s design, in part due to negative feedback from customers.

    After a bit of research, I found that the monitoring device (PVS6) actually has the ability to be queried for local data. An individual with better hacking/detective skills than me figured out the commands to send to the unit and posted information on GitHub describing the setup. That looked pretty straight forward. So I decided to figure out how to integrate it into Home Assistant and into my Grafana graphs.

    First step was to configure a Raspberry Pi as basically a bridge where HTTP requests sent to one port would be redirected out the other port. I didn't need a full fledged router for this, just an HTTP proxy. I decided to use a Raspberry Pi Zero W that I had lying around as a base. I ordered an Ethernet adapter for it and that was it for hardware. My son designed a case for both pieces and I 3D printed it.

    Configuring the Raspberry Pi

    1. Download the Raspberry Pi Imager
    2. Select the Raspbian Lite image.
    3. Write the image to an SD card.
    4. Create a file called wpa_supplicant.conf at the root of the image with the following:
      ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
      update_config=1
      country=US