new phone, new e-waste

I really enjoyed my iPhone 5S, to be honest. I liked that it was small enough to fit into any pocket I had. Part of Apple’s business plan appears to be to force older products into landfill by prematurely making them obsolete. And one aspect of that plan seems to be to strong-arm carriers like Comcast to not allow transfers of service onto older phones like mine. It’s too bad, really, because the phone otherwise works well for me.

The reason behind the carrier switch

I’ve recently moved and my Metro PCS (now T-Mobile) service is terrible here. And at $45/month that’s just not something I intend to keep.

Comcast’s up-sell attempt

So in Comcast’s retail store, the guy’s telling me that they can’t won’t transfer my phone number to an iPhone 5. “So how much is your used iPhone 6?“, I ask. (They want $450 plus tax which is so not going to happen.) He then gives me the hard-sell by suggesting that he could only give me the $100 transfer rebate by the end of tomorrow.

Somewhat-frantic used phone search

The next couple of hours involved me trying to find a local business which would sell me a used or refurbished iPhone 6 (noting of course that the iPhone X is the current model). I managed to find that Fry’s Electronics at the local branch had a refurbished one. And of course the sale ends by the end of that same day.

The purchase

So in this world-wind period I immediately jump into my car and visit Fry’s. Indeed, the sale ends on the same day so I’m reasonably forced to make the purchase on-the-spot. Of course, the phone has zero charge so I can’t even really verify that it’s not bricked. The price tag out the door is something like $180, less than half what Comcast would have charged me.

Metro PCS

I get the iPhone 6 home, charge it up (“100%”) and the next morning visit Comcast Metro PCS. You’re probably wondering why I didn’t just go straight over to Comcast. Because Comcast won’t just help me in this situation; they insist that the iPhone 6 be provisioned by my losing carrier first. So the Metro PCS people must be told by me that I’m innocently just upgrading my phone on the day before my new payment is due. I’m charged $15 for the changeover.

Comcast

Next stop is Comcast again and they can transfer the phone number. While the number is transferring, the iPhone dies from lack of battery charge. Er, what? It was 100% when I left this morning and I’ve barely used the phone. The iPhone 5S would go days before needing a recharge.

Research time

Back home—and with the phone on the charger again—I discover that Apple had a recall and a class action lawsuit regarding this particular phone with respect to the battery. I contact Apple Support to determine whether or not I can get the battery replaced for free. They indicate that they won’t pay for it but they can assist getting me into the service queue for the local store.

Apple Store

So I arrange the support visit at Apple only to find that I and many other people will be sitting here waiting to be helped for some time. I took the option to drop off my phone and to pick it up the following day.

The next day arrives and I find that I and many other people will be waiting some more to be helped for quite some time. I find it odd that a simple pickup like this took well over an hour. What I find even odder is that Apple would replace a battery and not charge it; the phone arrived with literally 0% charge and no way to determine whether the battery’s health was verifiable. The overworked support person—holding literally four products at once to deliver almost simultaneous to four customers—essentially put me on “ignore” when I indicated that it would be nice to know if my phone was working after the service-related activity. I think I paid $45 plus tax to get out the door.

New phone

So, now I have a new, working iPhone 6. Honestly, I didn’t need a new phone. I felt coerced into the upgrade to be honest.

Of course, then, I designed a new-and-improved holder for this one using Autodesk Fusion 360. It will clip onto the shoulder strap of my laptop bag and suitable for playing music while walking somewhere. I’ll print it on the 3D printer as soon as I get that unboxed and back in action.

Screen Shot 2019-07-05 at 11.29.29 AM

What next? (a.k.a. Combating e-waste)

I really have a hard time with this disposable-technology mentality. If we’re tied to a single operating system like iOS and it’s under Apple’s Machiavellian business plan then we’re left with two viable options: throw it away or change the operating system.

Having searched the Internet, I see no solutions in which someone has replaced iOS on an iPhone with anything like Linux. In theory, an older phone could be hacked as an amazing IoT device of some kind since the camera technology, RAM, processor and storage is killer compared to a Raspberry Pi, for instance. The street price two years ago for a used iPhone 5S was a mere $100 as I recall. So today, the street price of an iPhone 5 should be sub-$100. (I’ve just reviewed an eBay iPhone 4 ad which asks $7 as the price!) Imagine the supercomputer which you could build from a boxful of discarded iPhone 4’s and 5’s.

[Assuming that we’ve replaced iOS on each…] imagine the supercomputer which you could build from a boxful of discarded iPhone 4’s and 5’s…

  • I’m sure the average phone retailer has a stash of these in their back office and would be delighted to remove them from the playing field.
  • You wouldn’t need it to be a phone anymore or to have a carrier.
  • At it’s heart, the average (old) smartphone is a very fast computer with lots of RAM and an amazing camera and hard drive.
  • In the average supercomputer scenario, you wouldn’t worry about batteries since it would be tethered to power. Most battery-related issues could then be ignored.
  • In theory, you could create low-cost projects which involve sending multiple old phones up into the stratosphere via a helium balloon, collecting a 360° views and transmitting them back.
  • Similarly, you could create a drone submarine with a dedicated old phone at every porthole to capture and forward live, streaming video.

I’ll continue to look into this as an option. There has to be a way of hacking these phones. Just imagine the possibilities if you could.

Screen Shot 2019-07-05 at 12.06.42 PM

synesthesia revisited

Today’s post is a revisit of the synesthesia topic. Earlier I talked about an innovative new means of creating colorized tablature to promote this cross-wiring of the senses in new piano students…

9crimes

Last weekend (for this installment), I thought it would be interesting to attempt to write a MIDI version of this so that I could create that same sort of feedback using color. Only this time, I would be playing the notes directly on my Yamaha digital keyboard.

Screen Shot 2019-05-04 at 5.20.32 PM

requestMIDIAccess()

The magic mostly comes from the new feature navigator.requestMIDIAccess() that’s been recently added to Chrome in JavaScript.

USB cable

Of course, this needs a Type A to Type B USB cable to connect the computer with the Yamaha digital keyboard. Mine is a P-45 in case you were wondering. It also requires Yamaha’s USB-MIDI driver (available from their website).

Code

As usual, I’ve provided the source code so that you can also play with this if you’d like. Just verify that you’re on the OG-missing-C8 branch if you’d like the latest. At the moment, the master branch is just the original fork of ScottMorse’s work.

Repository

Update

The latest version now renders tablature in realtime as well as indicating the notes on the keyboard. It will do accidentals, rests and chords so far (just in quarter notes).

Screen Shot 2019-05-18 at 7.20.24 PM

john lennon is spinning in his grave

In case you haven’t heard, Paul McCartney is the darling boy of the EU’s Article 13 which hopes to stab out YouTube’s heart with a spork. Since Google owns YouTube, it’s naturally worried about all this. To make matters worse, the EU’s Article 11 link tax is quite possibly aimed at Google itself. The former Beatle has stepped up to urge the European Parliament to…

“PLEASE VOTE TO UPHOLD THE MANDATE ON COPYRIGHT AND ARTICLE 13. YOU HOLD IN YOUR HANDS THE FUTURE OF MUSIC HERE IN EUROPE.”

From the tone and use of ALLCAPS you’d almost think this were the Crusades and they’re all mounted on horses pointed south, defending Christendom.

Let’s not forget though that in a public ranking of all Beatles songs ever made, topping the worst-of-the-Beatles list at #213 is none other than Good Day Sunshine.

From Vulture’s article:

Revolver (1966): Paul McCartney was welcome to write all the happy, upbeat, cheery-cheery songs he wanted. But this one is beyond the pale. It’s blaring, received, and strident. Even by McCartney standards (“Getting Better,” “Hello Goodbye”) the title is inane. It could have been “Yum Food Delicious,” or “Hot Sex Baby,” or any other three random words McCartney took out of his Young Man’s Collection of Positive Synonyms — and note that of these three choices McCartney chose the blandest. McCartney’s piano playing, which graced so many Beatles songs, right up to “A Day in the Life,” is a parody of itself. It’s the worst song in the Beatles’ classic period. And it ruins Revolver, otherwise the most consistent and mind-blowing collection of pop-rock songs ever conceived by man.

John Lennon’s song Imagine was liked much more and for good reason. I think the sentiment resonated more with the average person. But now I’d like to mashup the lyrics a bit in honor of Paul’s recent audacity. Note that I only changed the words in italics below so I’m not far from John’s original sentiment in the last stanza about no possessions (to include even the possession of songs themselves).

Imagine there’s no money
It’s easy if you try
No credit cards before us
Behind us only sky
Imagine all the people living for today

Imagine there’s no currency
It isn’t hard to do
Nothing to buy nor pay for
And no religion too
Imagine all the people living life so free

You may say I’m a dreamer
But I’m not the only one
I hope someday you’ll join us
And the world will be as one

Imagine no possessions
I wonder if you can
No need for greed or hunger
A brotherhood of man
Imagine all the people sharing all the world

I can’t imagine for even a single minute that John Lennon would have begged the European Parliament to protect his song rights from anyone.

Shame on you, Paul McCartney. If you’re mad at YouTube, don’t blindly lash out at the Internet-at-large and encourage the advent of “Lawyer-fest 2019”. You’d have to be daft to support legislation which gives full reign to every vulture of the world to now feed on the average Joe attempting to run a website.

old-fashioned milk bottles meet iot

If you remember from my last post on the subject, I’m into those old-school glass bottles of various sizes. Here’s the typical size and lid type that I’ll be talking about:

quart

The lids seem to come in a variety of colors and are probably made from ABS plastic—they work well and last a while. Everything cleans up nicely and I’ve had quite a few of these in my pantry for the last five years now.

Identification

There are times, though, when I wished that it were easier to tell what’s what. I honestly have a variety of things which kind of look the same: masa, ground corn meal, pancake batter, semolina flour, etc. They’re all vaguely yellowish. The same is true for the many flours which I buy.

My usual routine is to put a small Post-It type of note of some kind on the front of the bottle. But sometimes these fall off. I have been known to tape them on.

It would be nice if I had a way of easily identifying the contents of the bottle as well as preserving things like nutritional information or the instructions that you might find on the back of a Cream of Wheat box. I could also record the date of purchase and/or the expiration date but I’m not that fussy.

High-tech version

Today’s creativity involves the idea of self-identifying bottles. I’ve just purchased some tiny RFID tags which I hope to embed inside my own self-made bottle caps. I’ve just spent an hour designing the cap in Autodesk Fusion 360 and it’s now getting a test print to see if it fits. When the tags arrive I’ll carefully measure one and then design an internal cavity to accommodate the tag inside the cap. Given that the tag is completely embedded, it should be waterproof as well and should stand up to being repeatedly washed.

 

The usual tactic with respect to printing these with an embedded object is to create two jobs out of the part (1st half, 2nd half) and then insert the tag in between the print jobs. My own GetToDahChoppa project would be the way of chopping that. For this project it will be easier to just insert a pause command at the magic moment in the gcode file so that the printer pauses, alerting me to insert the tag and then I’ll manually resume. As long as I don’t include internal supports, this technique should work fine.

I thought I’d create a NodeJS-based server which sits on a Raspberry Pi computer which minimally includes an RFID reader. It would host a database of the RFID numbers and their corresponding information for each bottle in service.

The system should include a mechanism for simply reporting which bottle is being held up to the reader as well as several convenience features to include fetching the nutritional information given a UPC symbol. I’m guessing it would be nice to have something which actually scans UPC symbols but that’s not strictly necessary since it doesn’t take much to just type them in.

I guess I’ll have to type in the instructions or include a photograph of the box’s instructions.

Interface choices

I guess now, I’ll need to determine what kind of interface this will have. I could include a TFT panel. I think this would be the normal way of communicating things back to the user. In this way, you could click tabs on the screen if you wanted more information. I would assume that this would use Kivy as the graphical interface. It’s possible but I’d have to have somewhere near the pantry with power and the correct orientation, distance and lighting for the panel. And it must also work out with respect to the distance of the reader.

At the moment, though, I’m thinking that it might be interesting to push the report information to an Echo Dot that’s in the same room. In theory, you would hold the bottle’s top to the horizontally-mounted reader. There would be a delay of perhaps three seconds and then you’d hear Alexa say “Cream of Wheat”, having initiated an Alexa Skill of some kind. I’m guessing then that I might have to say “Alexa, read the instructions” to have her then read from another topic.

Given the way Amazon’s Lambda functions work, it feels like it will be problematic unless I host the database in the cloud otherwise the function wouldn’t easily have access to that information. I dunno, but I kind of like the idea that the database just lives on the Raspberry Pi itself.

I could use a simpler text-to-speech project from earlier, requiring a speaker on the Raspberry. The sound quality is basically similar to listening to Stephen Hawkins reading your panty list. I’ve also been successful using the Snips home assistant interface for doing something Alexa-like without the cloud. The quality of the output voice isn’t as slick as Alexa but it’s good enough.

Hot off the printer

While I’ve been thinking about all this, the first draft print has finished. It’s very nearly identical to the hand-measured original lid only that inner insert seems to be slightly too wide for the bottle. The PLA plastic I’m using is more rigid or I’ve made that wall too thick; it will need a slight adjustment and another test fit before I advance to the next step. It lacks subtle details that aren’t actually necessary on the original lid like central spokes and outer ribs.

FirstVersion

I’ll tweak the design and reprint it. And I guess I have to wait for those RFID tags to arrive in the mail before the next phase of this.

switch-case in python

Python is a great language if you’re coding to IoT (Internet of Things) like small devices. If you’re coming from another language though you might be surprised that it doesn’t include the classic switch-case statement construct like you’d find in JavaScript, for example.

Fortunately, I just managed to create something that seems to work and the syntax isn’t too far off from the expected.

def switch(key, default):
    case = {
        0.0: 'zero-point-zero',
        0.1: 'zero-point-one',
        0.2: 'zero-point-two',
        0.3: 'zero-point-three',
        0.4: 'zero-point-four'
    }
    return case.get(key, default)

print switch(0.1, 'Unknown')
Running this would produce “zero-point-one”. This isn’t as robust as JavaScript’s or C’s implementation but this can be adjusted for lambda functions in a similar fashion.

 

python

remember internet radio on itunes?

Years ago on macOS and when iTunes first came out, it included an awesome feature—you could easily stream Internet radio from within the interface in iTunes. Apparently that got in the way of Apple’s revenue on iTunes, always trying to sell you something.

morpheus

iTunes -> click on the down arrow next to Library -> Ctl+click Songs -> Edit List -> add a checkmark next to Internet Radio

 

And that’s all it takes to return this sought-after feature to iTunes.

Screen Shot 2019-02-11 at 12.06.24 PM

kivy, the hero of iot gui developers

Kivy – An open-source Python library for rapid development of applications that make use of innovative user interfaces, such as multi-touch apps.

The Internet of Things (IoT) is the likely future of gadgets and devices that you’ll have in your homes and cars (if you don’t already) as well as technology that you wear. As a minimal criteria, these things use the cloud to gather and store information. In a way, even smartphones fall into this category if you think about it. Amazon’s Echo device is a good example.

For many of us who self-identify as “makers”, we use small computers with similar capabilities and we create these type of gadgets. Often when we’re coding software in this space, the Python language is the usual choice for the task.

Until now, we’ve not had many options for displaying graphical menus on such tiny screens other than the full “Desktop” GUI of some Linux-like operating system which didn’t really work, to be honest.

Introducing Kivy

A relatively new technology is the Kivy library. Imagine being able to describe the many screens you’d find in an application, whether it’s a smartphone or the touchscreen of a printer or even a watch. Then Kivy takes care of the rest for you, rendering those screens using a graphics engine behind-the-scenes. It even manages clicks and other gestures, getting these to fire off portions of your code.

Kivy comes equipped with an impressive collection of pre-defined screen widgets as well as the ability to create your own custom types. And you get all this for the low, low price of free (unlike its $5K+/year—priced competitor Qt).

I’ve had the pleasure of working on an almost daily basis with Kivy over the last two months and I must say that I’m still just as fond of it now as the day I originally learned of it.

If you’re a coder and you know Python, I would suggest that you add Kivy to your toolbelt. You’ll find that it’s easy to use and worth the effort you put into it.

metro app is metro

I thought I’d share a couple screenshots of a web app I worked on a couple of months ago. I was cleaning up my computer’s Desktop space today and it made me smile, remembering the work that I’d done then.

I doubt if I’ll continue the project since I’m now working on something new.

home

login

The site was to be a code-learning area for kids. The requirements for not using/saving personal data was the reason for the interesting username behavior shown above. Usernames are combinations of adjective-noun and passwords then are combinations of color + icon.

to author or to fork?

I was interested in exercising Github’s REST API so I burned out a quick-and-dirty applic-ation to display some statistics.

Screen Shot 2019-01-02 at 1.53.46 PM

Honestly, a tool like this would be useful for a hiring manager in the software develop-ment space. Imagine being able to enter a list of ten accounts and to see a side-by-side comparison of the coders like this.

Puffed-up Like a Cheeto

I’m surprised at the number of Github accounts which are mostly filled with dead forks of someone else’s code with no contributions whatsoever. I don’t know if people are trying to pad their profile intentionally or if they just are unclear of the cloning behavior expected of them most of the time.

A good collection of code should include mostly your own authored work. You’re hoping to give something back to the community. From the standpoint of your résumé, you’re hoping to show what kind of work you’re capable of doing.

So What’s Good?

I think I’d suggest that for anyone who’s looking for a new position as a coder, that Authored percentage value should be above 75%. I suppose the theoretical limit of 100% could potentially be the best and yet it would likely indicate that you don’t help out other coders with their repositories.

Rule of Thumb

If you fork a repository, you should do one of two things:

  1. immediately start creating your own new software from it or…
  2. immediately start working to help the original author so as to create a pull request.

This behavior of fork-and-do-nothing just seems patently wrong to me. If you think about it, it’s almost the equivalent of copying someone else’s résumé content into your own.