This is a repost of a previous Tiny Marketing Lab Newsletter. If you haven’t been receiving my email newsletter, you can subscribe here.
Hello,
Oh well, it’s me, Bank.
You received the email from the right person. My account isn’t hacked lol
This email isn’t about print-on-demand because I spent most of my time writing code last week.
Just want to share it with you today :)
(You can skip this email if you don’t want to read about coding and geeky stuff. I totally understand. I just want to share what I did last week lol)
Well, we hired a new dev team to build PODtomatic V2 from scratch around October last year.
It’s been tough moving everything from V1 to V2 because the code and architecture of V1 are very messy.
V2 has been working perfectly for many months, but we still needed V1 to process orders because we couldn’t migrate the designs to V2.
I didn’t want the new dev team to check the V1 code and move stuff to V2 because it’s very complicated, and developers usually don’t like reading code written by others.
I’m a developer too, so I know this well lol
Anyway, I want to completely close V1, and I also want our founding members to manage Amazon orders that contain products from V1 easily.
So I spent the whole week working on moving V1 products to V2 so our founding members can process all orders with the V2 system.
There are two things I had to do:
- Export all designs and product info, map them with Gearbubble and Laser Chili products, map the user IDs in V1 and V2 (they have different IDs in each version), and put them into a CSV file (so the dev team can use it to build the function to process the V1 orders).
- Delete all designs in Amazon S3 server to reduce costs (V1 consumes too much storage in S3, and we have paid thousands of dollars every month).
I know how to write code, but I haven’t done it for a long time.
I know Python (the programming language) is quite easy to write, so I asked ChatGPT to do the work for me.
I started by asking what program I need to write and run Python on my Mac, what I need to install, yada yada yada.
It’s quite easy; you can also try it if you want.
Then, I had the database that contains all designs and products of V1. I had to write the SQL code to extract all this data.
I learned it in university but forgot most of it lol
So, I told ChatGPT that I have the database and want to extract data from a few tables, and these tables have column names A, B, C, D, etc.
“Write me the SQL code to extract [data I want]” - this is what I told ChatGPT.
It surprisingly gave me very well-written SQL code.
I put it into the server and boom! - almost perfect.
Some data was still wrong.
But it’s no issue, I just needed to explain to ChatGPT what it missed and more about what I wanted. I did this back and forth with ChatGPT a few times and finally got the data I wanted.
Now, it’s time to write the code in Python to map some data from V1 and V2.
*Easy - *Just asked ChatGPT again and let it do the work.
(Let me skip the detailed instructions I sent to ChatGPT because we won’t finish this email)
After spending three days working on this, I finally finished the first task.
The coding part didn’t take too much time. What took too much time is that the V1 database is very huge. We have millions of products in the system, and it took hours to export and check the data each time we ran the code.
Anyway, I got it now.
I have all product info, design URLs, and user IDs in V2 in a single CSV file (with millions of records) and already sent it to my dev team to create the function to process V1 orders. Hopefully, they can get it done soon :)
For the second task, deleting all design files in V1, I got help from my CTO, and it was done pretty quickly!
He wrote the Python code and sent me the script to help him run it to delete millions of files in the V1 system.
I needed to run this script for over ten hours to delete the files. I really liked this script because it looked like the Matrix while running.
You can check it out lol
Alright, the geeky tasks on my part are all done now. Just waiting for my dev team to finish it.
It was pretty fun for me, and it’s really good that we have ChatGPT nowadays. I wouldn’t have gotten this done so quickly if I had to learn Python from scratch.
AI changes everything.
Okay, that’s it for this email. I need to go back to work on my print-on-demand stuff now.
Talk soon,
—Bank K.

P.S. Thank you if you read till the end. You’re as geeky as I am!
Please reply to this message and let me know if you made it to the end. I want to see how geeky my subscribers are lol