Focus is Hard

Did you know that writing is hard?

In this, my n-teenth attempt at keeping a blog, I wrote that I would make an attempt at keeping this blog with regular posts. This was the time I was sure that I’d put my head down to think, and write with frequency. This would be easy, because the times I’ve attempted this in the past, I had a very custom setup for blogging, which required me to remember my publishing workflow, but this time I had a VERY easy to use setup. That’s what stopped me before, process, not dedication or will.

Anyways, it’s been about a month since I last wrote, and if you read the previous blog post, it was PRETTY sparse.

I haven’t been doing nothing, but definitely less than I thought I’d do. I’ve also done very little in lots of places. So, I’ll just post here a couple of disparate list of things I’ve done, thought about maybe posting, but didn’t sit down to write about:

Thin Frontend for a Web App

I dabbled with writing an web app with Typescript, Stimulus (thin js framework), Bulma (great CSS framework), Parcel, with a Java backend. Stimulus is a pleasure to use. Did you know that today’s JS browser runtime and included library are pretty decent? It still has some rough areas, but honestly, it’s not bad. Stimulus provides just that last thin layer of hooking up actions to functions, and you do the rest. It really allowed me to enjoy writing code, and when I have a bug, it’s mostly my logic bug, not me not understanding what the framework is doing for me.

I’ve enjoyed writing frontend apps in the past, but the heaviness of today’s frameworks makes me dislike spending too much time writing web frontends. The last heavy frontend framework I liked was Angular 1. In part because the ‘hello world’ was SO easy, and in part because ‘it clicked’ for me. Anyways, I’ve since dabbled lightly in Vue and React, and found them frustrating. I’m sure someone with more experience than me will tell me why using something that isn’t as robust as these frameworks isn’t a good idea, but I gotta say, I really enjoy the setup I got going.

The one aspect I need to improve, is my build steps, and my dev environment. Is stuck to npm scripts, and node js scripts for these, but need to give it a bit more thought. I’ll probably keep working on this app, as I really enjoyed it, and it’s a couple of days away from being super useful for me. But I stopped spending a lot of time on it, because I lack focus.

Relaxing Ground: Links to relax to

I have lots of apps on my phone for things that make noises and sounds for me to relax to. On my desktop, I always find something that I use that one time, and then forget. I like to put up on my non-dominant monitor something to relax and help me to keep focus, but I keep needing to spend 15 minutes finding something to put. That… is distracting, and not relaxing. So I just put it up in a site on glitch! This also made me remember that just writing vanilla HTML is not a bad alternative to writing some quick thing if I want to. Specially with things like emmet, it’s not too bad if I just want a simple list of things. Anyways, have a looksee:

Golang: Chromebooks, Travel and Ssh

It’s been years since I’ve given golang a stab. Never really used it for anything serious. When I last used it, I felt it didn’t have enough to distinguish it from Java to make it worth my time to spend to learn it. Some may find it ‘offensive’ for me to make the comparison with Java, but 👅.

Anyways, one REALLY distinct way in which it DOES distinguish itself, is compile times. And I know that is an already ‘known’ distinction, but not to the level I’m thinking of. There is absolutely a difference in compile times between go, and Java (and most other languages for that matter); but on my day to day usage, it’s a distinction I can live with, having a beefy enough laptop for work, or personal desktop. However, on a low-end chromebook, it’s a whole other ball game. On my Samsung Chromebook 3, golang is the only bearable language; there is just no other way to put it. I haven’t tried Java, as the Chromebook has very little disk space, and I don’t like it’s chances it has against IntelliJ. I tried Rust, which is a lovely language, but just running rustup (rust environment downloader, compiler and setup) was a multihour step, and compiling programs was slow as well. I tried nodejs, and while it did run well enough, it was quite slow to what I’m used to with nodejs on desktop.

Simply put, go is the only viable high level programming language I’m willing to try on that Chromebook. And why would I bother? Because I like to travel! Not now of course, but I do hope to travel again. Next time I travel, I’d like to not carry my laptop if possible, instead carrying this comparatively cheap chromebook, and still be able to code here and there on some down time. Another neat thing is that go has some great libraries available to it included in the language distribution itself. Even including a robust fully working ssh client. Heavy batteries included.

I tried writing up some quick go code to ssh into a server with it, and within minutes I had it working, from my chromebook, using VSCode. On that note, I love VSCode. It’s probably the best electron app ever written, with the best performance as well. But like the other things mentioned, when running on the Chromebook, it can be kind of slow. Not a stop the world issue, but it’s noticeable. Made me try Sublime Text for the first time because of it, and let me tell you, the difference is day and night. I know I’m last to the party to realize it, but wow Sublime Text runs nice. If it had as good plugin support for go, I’d use it. But it doesn’t. ☹️.

GODOT: Shaken, but not Stirred

I haven’t given up on making a game! I definitely haven’t done as much as I thought I would, but I’ve done some. I’m really finding out how bad I am at writing code for games though. I may need to just finish this, so I can try from zero again, and not make this overly complex mess I’ve just made.

I have two things I wanted to blog about, but haven’t gotten around to yet. May never get around to. I’ll just blurb it out for now, and maybe I’ll expand on a single blog post later.

  • Debouncing: So you pressed a button which moves an entity to the right. How far right do they move? How many times will the move function be called based on pressing the button once? You’ll need to do a bit of debouncing to keep that under control!

  • TileMaps: Godot has a really neat support for setting up TileMaps. It lets you easily setup tiles based on some spritesheets on a map, with collision and other similar things. But how about things like “direction entity faces”, or “tile which triggers an action”. Well, it’s a bit more barebones than that. So I’m implementing my own thing for my game. Here is how it looks like without explaining any of it:

Godot-Example-Tilemap-Metadata.png

That’s it for now. Hopefully I’ll get around to cleaning up my terrible Godot code so I can make more progress and post that here. See you next time.

Previous
Previous

Bash-ly Powershell on Windows

Next
Next

Getting Started with Godot, C# and Rider