Unfinished Projects — Nutrition Solver
I restart this project while rambling about tech influencers
If you go through my Medium, you will find references to a lot of unfinished projects. Sometimes I have an idea, and then I feel like I hit a wall. One idea I had was Rudeness Translator, something that would take rude comments on my blog and convert them into constructive criticism. I recently discovered that you can go the other way, and use ChatGPT to convert constructive criticism into rudeness by simply adding “be rude” to the end of your prompt. In my mind, this made the whole idea a lot funnier.
But then I couldn’t figure out how to calculate token cost. Yes, you don’t need that, but my idea was that you would input your API key, and then it would calculate the cost before you hit “enter.” Sure, this would reduce the usability by about 99%, but I was not comfortable releasing it to the public otherwise.
The last project I worked on for this blog was something called Nutrition Solver — it was supposed to just be this really simple, vanilla web app to counter Smack’s effort to achieve the same thing. He was doing it with vanilla HTML/CSS/JavaScript, so I wanted to go overboard with Vue/Vuetify.
I didn’t get stuck on anything, I just didn’t want to blog about it anymore. I stopped working on it and I stopped committing to it. To get things running again, I had a new idea: What if I used my blog to just ramble about random tech topics, WHILE working on personal projects? That way it would be less noticeable if I didn’t make much progress from one week to the next.
The comment I imagine getting: Well if you don’t make much progress, why bother blogging about it? Shouldn’t you reserve this for when you have a significant contribution to make? Isn’t Medium polluted enough as it is?
Me: Go away, Steven
Today’s Topic: Tech Influencers
There was this ultra-popular tech influencer whose most popular video was them coding a game in a 9-second montage. You would see them write code, you would see a snippet of the code, and then you would see this fully functional game in Pygame.
They posted it on TikTok, then reposted it to Instagram and YouTube Shorts. The code itself matched someone else’s work line-for-line (they only seemed to change the color scheme), but it turned out they weren’t hiding it. Their full-length video, a tutorial, was a video of them following this person’s tutorial.
So…problem? I don’t know, it still struck me as a little deceptive. It would be one thing if their 9-second montage simply made things look easier than they did, which could hardly be called unethical, but they wrote on TikTok that they built it. They would include their tutorial, and then they asked their audience what they should build next. All these thousands of views, including advertisements, that ultimately led to a tech influencer following a tutorial by an experienced university professor with 1100 followers on Medium?
Working through my own thing, though, I can kind of see why they did this. I imagine tech influencers have to spend a lot of time thinking about things like what song to include, and what camera angle to use, and which advertiser to take on. If you do all that, it’s not going to be very impressive if your code does not work at all or if after a week you have nothing to show except an error.
I’m not trying to justify what they did, I’m just stating that I can see why they did it. Making it look like you effortlessly coded tetris in Python is pretty dang impressive.
Nutrition Solver — Vue3 and v-data-table
Last time I only felt comfortable talking about Nutrition Solver (which is, after all, a pretty simple project) because it served as a segue into Vue3. Last time I wrote that I could not use a v-data-table in vuetify3, as it was not out yet, so I had to use Vuetify Labs.
Looks to me on their roadmap like this was solved in late 2023.
v-data-table has a neat feature. You have a table, you can put in a little search bar, and it will automatically/reactively search your table for the value you inputted.
Only…mine didn’t. Why?
Well, it turns out I was trying to replicate what Smack had. You weren’t supposed to input a bunch of foods, then search your own table for foods you have already inputted — that would not be a great use case. Smack’s app actually uses a nutrition API to search the food you input.
I went hunting for a source. Someone on Stackoverflow mentioned this. That could be worth looking into.
Random Tangent: Coding from documentation vs example
Not long ago, I had this experience with the ArcGIS JavaScript API. Someone wanted the lines thicker, and as dumb as it sounds, I thought this was just unrealistically difficult. I browsed through forums, and a lot of people just said you couldn’t do it without something resource-exhaustive, like making a giant for-each loop and drawing a point next to each existing point.
Then someone looked at the documentation, recognized how the values translated, and told me how to make the lines thicker. I still had my doubts. It was a geojson layer, not a feature layer. It was a multiline, not a polyline, so it was of size of one automatically. But I tried anyway, and it worked.
Is that how you distinguish a good coder from a bad coder, someone who can use critical thinking from documentation vs. someone who simply accepts forum responses and existing code as the truth?
All of this to say, I was looking for people who wrote open source code that used the FDA API. All I found was this, but what if I tried going from the documentation first?
Closing Thoughts
Here is the Medium account of the professor who actually wrote the Tetris game that the influencer copied.