I've been trying to learn programming on the fly for a few years now. I imagine it will open up new possibilities. All the ideas I have I could bring to life.
I'll overlook the fact now that I wouldn't have time to use it anyway, just like I don't have time to learn it now.
But how do you actually learn something like that?
I tried going through a lot of different tutorials - but they were always extremely long and most of the information was useless. I couldn't invest the concentrated dozens of hours it required to be able to produce anything at all. I would need to ask specific questions and get specific answers. But for every question, google gave me a bunch of articles, discussions and videos. Any concept to understand was again long hours with unclear results.
So I tried to convince my friend to just answer the questions. However, getting any answer out of him usually took even longer than reading the google results.
-
Historically, for example, I have gotten very good at using Excel. I was given a simple task and gradually got better at it step by step. You may be familiar with it too. Soon, you feel like you can do anything with excel.
-
A couple of years later, I joined the startup builders data team. From day one, I was given tasks that required SQL. You write a simple statement that throws up a table. You add a few words and filter like Excel... and quite soon you feel like you can Google anything.
-
Years later, I've seen python all over the place. When my friend showed me how to automate work in it, I was absolutely fascinated. The next shift was again quick. I didn't master everything, but I just got the feeling that I could Google anything anymore.
But it took a lot more than that to build my own app. There was nothing for me to grab onto here.
Every single thing is terribly complicated. You have to understand a lot of different concepts. For example, how versioning works in git, how different packages communicate with each other, how to display the result on mobile, how to run the app, how to deploy it somewhere.. and these are just some of the little things that you don't really see at all. Aside from the obvious python commands, I find this javascript/react world incredibly confusing. You're simultaneously writing how something behaves, what it looks like and where it should be placed. Each thing has different rules. You use all sorts of parentheses and it just seems like the whole thing is terribly complicated and illogical.
I used to be pretty good at understanding css, html and partially javascript. Writing something in Svelte, for example, was liberating. But unfortunately nobody uses it, so you're on your own again.
Gradually I started to accept that I needed to learn to react. UseState, UseEffect, async, await, arrow function? Wtf. I guess the most annoying thing about this is that everyone around me gets it and I feel completely impossible. 🤦
I think the biggest breakthrough for me came last weekend. I got almost two days of solitude for my birthday so I could deep dive it in.
Quite bravely, I came up with what I think is a fairly complex project. A friend suggested I try making a todo sheet or something else that a lot of people have done. But I couldn't get excited about that.
I decided to create a mobile app that would serve as a validator for bitcoin notes.
I had a few things prepared in advance
- I ordered all sorts of NFC chips
- I had already gotten my hands on Git
- I created a project in Visual Studio Code
- Installing some stuff in there so I can see on my phone what I'm typing into my computer - this is where Expo is awesome
- I understand a little bit how NFC chips work
- I get a feel for LNbits and let's get going
Then on the fateful day I started putting it together. I had a pretty good idea of what I wanted to do but didn't know how.
So I started asking chatGPT. Weak, I know... but I'm writing this more to share the learning experience.
For example, I wrote, "Look at this file of mine... and tell me where to type what so I can see the button on the screen."
I got a specific piece of code right away with instructions on where to copy it and why. Other times I just wanted him to find the error, advise me how to install which packages or edit the stylesheet.
Often I got a satisfactory answer after only a few clarifications. I asked if I could do it differently and suggested alternative solutions myself.
This is how I iteratively built an application that can load an NFC chip in less than two days. It uses the given text to make an API call to a remote server, has a bitcoin invoice issued, collects the funds, checks the payment, and creates a new voucher to upload back to the chip. I'd expected to be doing this for at least a week and suddenly it was. I feel like I was in a trance for two whole days.
I think the AI was testing me a bit by deliberately showing me progressively less information. Often it would answer me with other examples so I had to apply it to my own... but when I didn't know how, it'd rewrite it right into my example. It advised me how to comb and optimize the code, it advised me where to add comments to make it more understandable.
Still long way to go, but I have finally started 🎉
You can have a look on the projet on GitHub
react-native-nfc-manager
)