-
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
- Download the Raspberry Pi Imager
- Select the Raspbian Lite image.
- Write the image to an SD card.
- 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
-
Printing on a Glass Bed and printing really flexible filament
When I purchased the Ender 3 Pro, I liked the idea of the magnetic flexible bed so that prints would easily come off of it. Reading on various forums, a large number of people seemed to prefer glass beds with either hairspray or a glue stick to get prints to stick to the bed. I've had good success with the magnetic bed, so I just filed the glass bed information in the back of my head.
As I wrote recently, I've been printing using flexible filament just because I think it is kind of neat. The ease with which I was able to print amazed me as I had read about people having problems left and right with flexible filament. In response to a video about a broken extruder by Chuck Hellebuyck, I commented that I had no problems printing TPU using on my Ender 3. Chuck pointed out that there are different types of TPU characterized by their shore hardness, which should have been obvious to me, but didn't dawn on me until Chuck's response. The SainSmart Flexible TPU filament has a shore hardness of 95A meaning it is pretty stiff and basically prints like PLA. This got me curious about printing more flexible filaments, so I purchased a roll of NinjaTek NinjaFlex which has a shore hardness of 85A and is basically light spaghetti.
My first print with it with the following settings:
- Infill density: 10%
- Print Speed: 10 mm/s
- Regular Fan Speed: 0%
- Regular Fan Speed at Layer: 1
- Material Flow: 110%
- Enable Retraction: Off
Seemed to work OK, but the bottom layer wasn't the best.
After thinking I was successful, I tried printing a poop emoji for my son. No matter what I tried, I couldn't get the TPU to stick to the bed. After a few unsuccessful tries, the filament started jamming in the extruder. Ah yes, exactly what Chuck said would happen. I ordered an EZR Struder to help with the extruding. However, that would only solve part of the problem. The other part was getting the print to stick to the bed.
I was somewhat prepared to use a glass bed as my wife had some scrap glass from a project of hers and I asked her to save a few pieces for me. She cut down the glass for me and then I beveled the edge and polished the edges. I removed the magnetic build sheet and put the glass bed on top of the magnetic layer on the bed. Since I could only find one binder clip, I used blue painter's tape to tape the glass to the bed.
For my first test, I cleaned the glass, put down 3 layers of glue, and printed a test cube. It printed out quite well, but was a bit of a challenge getting off the glass. I really liked how smooth the bottom of the cube was compared to the magnetic bed.
For my next test after installing the EZR Struder was to print a small poop emoji. From the settings above, I increased the flow to 115%. I put down the layer of glue and printed. The print came out flawlessly and it had no problems during the print.
Lessons learned:
- Different hardness TPU prints differently (duh!)
- A glass bed with a glue stick makes a world of difference in adhering prints (especially TPU) to the bed
- The EZR Struder is absolutely necessary to print more flexible TPU; if you are printing the stiffer TPU, the stock (or replacement metal) extruder works fine.
With this new setup, can I print the NinjaFlex faster? Only one way to know and that's to try it!
I'm quite pleased with the new extruder and the glass bed. 3D Printing is definitely a trial and error process. Each change, be it large or small, can have huge ramifications. If you combine them, it makes it even harder to figure out what is good. I'm having fun with this and learning a huge amount.