Day 2 on slightly naive code
I still haven't set up my GitHub repo for this little project.
Day 2 on naive code and I'm already thinking ahead. I think, I may one day have to use a framework, and I better not have to refactor due to collisions in namespace or naming convention issues. I've looked up Vue.
I still don't have any autocomplete plugins. I used to have auto-closers for tags, stuff that wrote my functions out for me and the whole DOM javascript lib. For some reason I'm still writing out getElementById like I'm 12 years old and DHTML is still a thing.
I finished the log and playscreen window definitions. The log has a set height and opacity to give it that nice "receding into the past" look. I made sure the log starts from most recent to oldest. Day 2 of this incremental game, maybe 2 hours sunk in, and I know I already have to refactor my huge inspectPackage function. So this code is quickly not going to be naive.
Funny observations:
- I forgot that css goes into <head>, not <script>.
- I'm still enjoying seeing the whole game in 1 page. That's not going to last.
- It's nice to organically create abstractions.
- I wonder if by Day 3 I'll have created a data-driven event system, thereby ending my little naive code experiment way earlier than I thought I would.