Python

Summarized using AI

Whimsy: Babies just want to have fun

Ali Ibrahim • November 08, 2022 • Denver, CO

Summary of "Whimsy: Babies just want to have fun"

In this engaging presentation from RubyConf 2021, speaker Ali Ibrahim shares a personal project inspired by his young son who loves music, particularly the band Daft Punk. Ali discusses the challenges of providing his child with control over his music listening experience and outlines his journey of creating a customized music box.

Key Points:

  • Inspiration: The project stemmed from Ali's desire to enhance his young son’s music listening experience, which often involved frustration due to the lack of control when using traditional music players.
  • Conceptualization: Ali envisioned a toy-like music box that would have a simple interface with buttons—each linked to a different song—to make it accessible for his son.
  • Use of Technology: He initially planned to use a Raspberry Pi for the project, highlighting its capabilities for various DIY projects, though he faced time constraints due to parenting responsibilities.
  • Hackathon Opportunity: Ali seized the opportunity provided by a workplace hackathon to start building the music box. He followed a tutorial, learned Python scripting, and made progress wiring the buttons to play sound.
  • Collaborative Problem Solving: When hitting a roadblock with wiring, Ali utilized pair programming with colleagues to troubleshoot effectively, demonstrating the importance of collaborative efforts in tech projects.
  • Refinement of Design: Dissatisfied with the Raspberry Pi solution's complexity, Ali researched alternatives and found a pre-programmed board from Adafruit that better suited his needs for simplicity and functionality.
  • Research and Learning: Facing the challenge of soldering connections, Ali consulted with a knowledgeable colleague for guidance, underlining the significance of mentorship and collaboration in learning new skills.
  • Execution and Testing: Ali concludes the session excited about moving forward with creating the device, promising updates on its functionality in the future.

Conclusion

Ali Ibrahim’s presentation not only highlights a personal passion project but also showcases the intersection of parenthood and technology. It emphasizes hands-on learning, problem-solving through collaboration, and the joys of creating functional solutions for everyday challenges. This project illustrates how technical skills can be applied creatively to enhance interactions with loved ones.

Whimsy: Babies just want to have fun
Ali Ibrahim • November 08, 2022 • Denver, CO

RubyConf 2021

00:00:00.640 Hi everybody! This Wednesday session is heavily inspired by my son. He's about a year and a half old, well closer to two by the time you all watch this video, and he's really into music. You know, actually, he's really into Daft Punk.
00:00:10.400 No seriously, he's really into that. You can't tell from that video clip, but my son is listening to Daft Punk on a vinyl record. My son is amazing; he can do a lot of things, but he doesn't quite have the skills yet to turn on the stereo, put a record on, and then hang out and listen to it. So you can imagine when he wants to listen to Daft Punk, it can be a pretty frustrating experience.
00:01:06.760 Okay, but we don't have to listen to Daft Punk on a vinyl record; there are other options. For example, we all walk around every day with these pocket computers that have Spotify, Google Music, Apple Music, or whatever streaming service you want to subscribe to. After a couple of clicks, Daft Punk is playing—no problem! But again, this is another situation where my son doesn't have a lot of control over the experience.
00:01:32.240 So, like any good engineer, I came up with a really complicated solution to this problem. The basic criteria for what I was looking for was to have something that had the look and feel of a toy, something that my son is familiar with. You can imagine that I might have something that's the size of a little kid's shoebox. This box might have a speaker and three buttons, and as you click on each of the buttons, a different song plays.
00:02:14.080 When I first embarked on this mission to make this music box for my son, the first thing that came into my mind was a Raspberry Pi. Raspberry Pis are these special little computers that let us do anything really, like making a magic mirror. I’ve used them before; I don't really know the electrical wiring stuff too well, but I figured if I can do stuff with the Pi, I'm halfway there.
00:02:42.239 So I did a little research and found a tutorial on raspberrypi.org on how to make a music box with a Pi and a little Python script. Now I'm all in! I can definitely do this; I can buy a Pi, I can follow a tutorial—let's go! There’s only one thing I was missing and that was time. Despite living through this pandemic where we’re not going places or leaving the house and have a lot of time at home, I didn’t really have a ton of free time because it turns out when you have little kids, there is not much free time.
00:03:22.319 So, where was I going to find this time to work on this project? Fortunately, at the beginning of the year, we were having a hackathon at work, which was a perfect opportunity for me to work on this project and see if I could actually make something. When the hackathon came around, I pulled up the tutorial and started getting to work.
00:03:41.040 The first thing I had to do was write the Python script that would power the interactions with the Raspberry Pi and the buttons. Fortunately, it was not too hard to understand. I haven't done a ton of Python before this project, but it wasn't too hard to follow the instructions, pull in the library, and see things start to work.
00:04:09.200 I didn't have the music files yet, but I could pull some free sounds online to make it work. Things were going well! I had two buttons wired up playing sounds, but there was one that just was not working, and I could not figure out what was going on. I turned to a tool that has helped me get unstuck a lot in the past: pairing.
00:04:30.479 I reached out to a few coworkers and said, 'Hey, can you all look at this with me? Maybe you can figure this out.' The first thing we looked at was the Python script. There wasn't much to it, and it seemed to be working fine, so we immediately ruled out the software. The next thing we wanted to check was the board to see if something wasn’t wired correctly.
00:04:56.880 We tried to do this over Zoom. I had my phone overhead trying to show the board, but everything was shaking. It was not a great experience for anyone to pair and look at a board that way. Finally, my coworker Joey had a good idea: he suggested I take a picture of my board and send it over to them so they could see what was going on.
00:05:26.639 After a few minutes, fortunately, somebody saw something. Here’s my board with all the wiring, and there was a very subtle issue. If you have done electrical wiring before with a breadboard, it’ll stand out to you immediately, but it did not to me. There was a little gap between different parts of the board. Typically, this ground line will run all the way up and down; mine was split in half.
00:05:56.800 I didn't realize that, so I thought I had ground connections. Thankfully, pairing helped me fix this problem really quickly, and I was able to keep moving forward with the project, and it worked! Everything was going extremely well.
00:06:25.920 Now I had a thing that might someday become a music box for my son to use to listen to music. However, after putting this together and working through the hackathon, I wasn't entirely satisfied with the solution I had created.
00:06:51.680 As I mentioned before, Raspberry Pis are these amazing computers that let us do so many things, but I felt like it was somewhat of a disadvantage for this project. Raspberry Pis come with a lot of software, internet connections, and other features that I did not need, and honestly, could be a liability down the road.
00:07:18.560 So I returned to the internet for more research and came across a board from Adafruit. This board was exactly what I was looking for and what I had in mind. It’s a board that is pre-programmed to listen to inputs at different points, and once it receives input, it plays a file associated with that input.
00:07:48.399 However, I now faced a new challenge because with Raspberry Pis, I was somewhat familiar. While I hadn’t done a lot of Python programming before, I still had a sense of how to figure my way through it. With the Adafruit board, I was entering new territory. I hadn't done much electrical wiring, and the board was pretty bare-bones. If I wanted to wire up connections, I’d have to solder them together.
00:08:01.759 I conducted more research, trying to decide if this was a good idea or if it was something I could do myself. I really just wanted someone to talk through this idea with to see if it would work. Fortunately, my coworker Jason does a lot of electrical wiring, building amps, speakers, and guitar components, so I figured it would be right up his alley.
00:08:31.039 So, I messaged him and asked if he could spend a few minutes with me to talk through this project. He agreed, and I was eager to get started.
00:08:45.220 Now that I have some of my questions answered, it's time to make the thing. Now it's time to see if this thing works.
Explore all talks recorded at RubyConf 2021
+95