Recently I was in Japan
It was just a month ago that I was in Japan. It is a beautiful country with wonderful people and vibrant history. I was really quite impressed with the food, the cleanliness, the orderliness, and generally how efficient everything was. It would have been even better if my Japanese was more than just a few simple sentences. Indeed, getting from the airport to the city was more challenging than I liked. Getting from one subway train to another was...challenging. Having a wife that was anxious and wanted me to solve everything faster certainly didn't help.
How did I manage? Well, my son had spent over a year studying the language and he was an immense help. Google Lens allowed me to "read" signs that were in Japanese. ChatGPT was also able to translate my English to Japanese in order to get my thoughts across when it was necessary. I was so pleased that I live in a time when learning a language is useful but optional and a time when my phone has applications that can give me some ability to deal with foreign languages.
So how do you write One Million?
Now that may seem like a silly question. You say "One Million" and if you are doing math you write "1,000,000". Yes that changes from language to language but usually not from calculator to calculator. However, what if you could write 1,000,000 as "D0JA". That would certainly speed things up as it is about half the total digits. But that would be in base64 and people just don't think that way. Besides it is just a halfway point to "11110100001001000000₂" which is how computers actually store the data. Just a string of 1's and 0's.
The simple fact is that people don't speak computer. Sure there are programmers who can code for the computer and make it do useful things but lets be realistic. There is a reason we have moved from flip switches and punch cards to computer language. Speaking to the computer in binary is stupidly slow for a person. As an example would you rather "press "a" on your keyboard" or enter "0110 0001" and hope you can find the right memory position to lock it into with flip switches or punchcard?
A lesson I didn't quite learn a long time ago
Unfortunately that isn't a lesson I learned until fairly recently. You see I've been working with computers for longer than most readers have been alive. I got my first Texas Instrument TI99/4a computer probably 40 years ago. A wonderful piece of technology which allowed me to play games like defender which I thought was awesome. I learned the computer allowed me to program in BASIC so I spent a lot of time learning the language and at one point made a BlackJack game. The logic was easy but the graphics? No matter how hard I tried I couldn't figure out how to make decent looking graphics.
My first program looked something like this:
10 for a=1 to 100
20 x=x+1
30 print x,
40 next
In an age before Internet and in a time when teachers knew nothing about computers. Well, the reason why I couldn't program wasn't obvious to my teenage self. The quick answer is this: BASIC converts human code and translates it to computer code...slowly. Assembler is a much closer to computer language so its is far more versatile... but it is computer / CPU specific and didn't come with my computer. Also..screw up in assembler and things go downhill fast, besides, its not exactly user friendly.
Ahh... if only I knew then what I knew now.
Fast forward to my time on HIVE
Much more recently I learned about HIVE and the most I investigated it the more I realized that it was an awesome platform that could do a wide variety of very very useful things. I also realized that the number of quality dApps out there was seriously limited. I thought to myself : Self--you should learn to program so you can turn ideas into useful dApps. Of course BASIC was 30 years out of date so I looked at a modern language and started learning Python. Honesty, it wasn't that hard as much of it was just stuff I learned in BASIC with a different syntax. Things were going well until I learned that the link between Python and Hive (BEEM) was flaky and poorly documented. It was like BASIC all over again. I was learning a language that wasn't going to let me do what I wanted to do.
I gave up
My ideas didn't go away but...
Now my ideas didn't go away but something interesting happened. Which I realized when I went to Japan. I tried to learn Japanese but android tools (don't go to Japan without Google Lens) made it way easier to just use the tool than learn the language. Then it dawned on me: ChatGPT and other AI actually do speak for English and computer. Sure I could learn a high level language like Java and let it do the translating for me OR I could learn how to use a higher level language like ChatGPT and let IT do the translating for me.
I sat down with ChatGPT and Thonny (Python) and within an evening I had code that did exactly what I wanted it to do.
The first lines looked something like this :
--- CONSTANTS ---
import random
import math
from dataclasses import dataclass, field
from itertools import product
ALPHA_25 = [chr(i) for i in range(ord('a'), ord('y')+1)] # map 1–25 to 'a'–'y'
DRAGON_TYPES = [(a, f, fi) for a, f, fi in product(range(4), repeat=3) if a + f + fi == 3]
ALIGNMENTS = {'Good': 50, 'Evil': -50}
TRAINER_TYPES = ['Sedentary', 'Semi-Active', 'Active']
TRAINING_STYLES = ['Specialist', 'Balanced', 'Flawless']
DRAGON_TEMPERAMENTS = {'Aggressive': ['STR','CHA'], 'Defensive': ['FORT','WIS'], 'Balanced': ['DEX','INT']}
DAILY_CHOICES = [
('forest','dark'), ('forest','light'),
('air','dark'), ('air','light'),
('fire','dark'), ('fire','light')
]
= [chr(i) for i in range(ord('a'), ord('y')+1)] # map 1–25 to 'a'–'y'
DRAGON_TYPES = [(a, f, fi) for a, f, fi in product(range(4), repeat=3) if a + f + fi == 3]
ALIGNMENTS = {'Good': 50, 'Evil': -50}
TRAINER_TYPES = ['Sedentary', 'Semi-Active', 'Active']
TRAINING_STYLES = ['Specialist', 'Balanced', 'Flawless']
DRAGON_TEMPERAMENTS = {'Aggressive': ['STR','CHA'], 'Defensive': ['FORT','WIS'], 'Balanced': ['DEX','INT']}
DAILY_CHOICES = [
('forest','dark'), ('forest','light'),
('air','dark'), ('air','light'),
('fire','dark'), ('fire','light')
]
And next up is Java
Now the entire program was close to 300 lines of code. I could go through the code and have a good idea what it was doing. I knew enough about data structure that when it went off the rails I could ask the right questions to get the AI to make the necessary changes. It was a collaborative effort where its knowledge of code and my idea and logic made it all work together.
Will it ever come to HIVE?
In its current form. Not a chance. From what little I know Java is the go to language and library to get your program to talk to HIVE. In that respect I'm going to need a different language to get the job done. I've downloaded Android Studio and with a little help from my translator I'm hoping that I can get my Python logic reworded to match up with Android input and actually make an interesting dApp for HIVE.
Percent chance it will actually work? Well, I'm giving it a 20% chance at best. But here is the point: Without AI to do the translating that 20% would be a hard 0%. Also, BEEM could work fine and JAVA tools might not...I don't know enough to be certain but I know at least with AI I have a chance to find out.
So, if you ever come across an app which lets you train a dragon while you walk around the park and upload it to HIVE to battle others. With a title screen that looks something like this:
Should students learn to code?
That's the question that I saw on the Hive Learners topic for today. My first thought: Should electricians learn how to make wire? Should carpenters learn how to make a saw? Should students learn how to build a car before getting a license?
I think the answer is pretty obvious.
Why should they?
It is very much like my trip to Japan. I could learn Japanese and if I ever move there I absolutely WILL learn Japanese. However for a short trip into the country I think I'll rely on the apps that are so very useful.
I think that applies to programming as well. If I'm taking a quick foray into the dApp creation world I think I'll rely on the AI and a bit of luck. If I enjoy it then absolutely I'll be looking at the code created and learn how to program. Little by little and bit by bit with code that reflects what I wanted done so I'll understand how things got put together so much better than by just reading some dry coding book.
Why should I learn little bits? Because AI can be a really bad coder. In Python it kept on forgetting to close off the PRINT commands. After the 6th time going back saying "can you solve this" I just started going.... OK, its faster for me to just put in the parenthesis.
While I think learning to code is a massive waste of time for students. Learning to THINK is a way better use of their time. Learning logic, learning how to focus and make small pieces that work and fit together is really useful. Not just in computer programming but for life in general. Sure I'm using the AI to write the code, but the behind the scenes logic? The math that gets things done? How to tackle cheating, how to make it rewarding, how to drive engagement? That's all me. Those are my ideas and I'm just using a tool to get it to work.
AI is here to stay and it is likely just going to get better with time. Why would I want to waste my time learning something that can be done very quickly by a tool?
BUT
I guess there is something to be said about old techniques. When I was in Japan there were entire buildings that were put together without nails. A craftsman with hammer and chisel would shape each board and interlock every piece of wood by hand to make something beautiful and sturdy. Those were true craftsman who took things to an artform. I guess I'd love to see the same thing in coding. Most of the time though, apps just need to get done quickly, cheaply and inexpensively. For all those times and for the majority of people, I bet an AI with a qualified person at the keyboard will work just fine.
Just my two cents worth and I'm glad you made it this far. As always I love comments so if you want to drop a line I'd love to hear from you.
And as a side note to anyone reading this far. After putting in the Python code two things happened. First everything got a weird background and Second all the text turned red.
That was weird. Proofreading with an AI told me I could get rid of the red with a < pre > code which I have never once seen in Hive or any of its documentation. Guess the AI can help me learn a new trick even when just making an article :)