Github Copilot is the Killer Dev Tool
March 18, 2023, 4:20 pm

I decided to take github copilot for a bit of a test run recently. It's been very interesting to test its capabilities, and see how it works around my own coding idiosyncrasies.

We worked together to make this tictactoe game today. And it works pretty ok. When working on a fresh project with copilot, it has no preconceived notions of your coding style, and so it just knows some of the absolute junior basics of coding.

As you start working through a project, it starts to learn what you've done, and it gets better not just about what to suggest to you, but about writing in your style. So if your style is "bad" it will be just as bad as you in style. It's very unopinionated in that way. Use a particular case? It will too. Tend to use arrows over functions, it will too. It's very forgiving in this way.

When you give it enough setup and foundation, it can start guessing a lot of what comes next. But if you start with a nebulously named function, it just sits there blinking at you. Even trying to start with a DOMContentLoaded just causes it to leave you room. But if you start with some html structure. And start with some css classes. And start throwing in some initial variables, by the time you need to do actual things, it starts to pick up real fast.

When you have an array called colors, and a function called rand, and you start to type out `const randColor` it is smart enough to guess what you're doing and predict the next bit.

And I think that's the big point about this. Is that copilot isn't the magic dev killer. But it's the killer dev tool that we've all been wishing snippets and intellisense really were. It's the next big evolution. And there is no reason to be scared of it. Because truthfully it's only ever usually right if it's iterating or duplicating, and it's only ever right when it guesses about 50% of the time.

Often it will spit out five lines of stuff that you only want one line of. It tries its best, but it's best is only really middling. It will make wild guesses, and often be close to but completely wrong for what you intended. In fact, it could be considered a senior engineer in knowledge base with a junior engineer's confidence and inference. It knows LOTS of stuff about all the languages you're using, it will even start throwing in dialogue or fakes string lists. But you have to be really good about your naming schemes and your setups for it to be even close to the mark on any first guess.

All told, I like it. I'm going to be using it forever now. It's truly remarkable when it's right, and it's headscratching sometimes when it's wrong. But it certainly does help on a lot of boilerplate, and can really keep you moving in times when you might otherwise sat down and just forgotten all the things you'd written up to that point.

In case it's not clear, this is an endorsement.

I gave myself the Christmas gift of finishing a project.
December 27, 2022, 2:04 am

I have so many projects that will never be finished. So many half started, or incomplete things. FilmsWith will probably never be "done". Hell, I've rewritten that thing in like 4 different languages now. A bunch of projects I will keep unfinished forever as lessons for bad ux or design.

But I've been working on my apptools for EVER. The first commit was in 2018, but that was just when I first moved it into github. Just before my Christmas break, I finally moved two chunks of it in to separate repos. Core CSS and QJS. Over the last two weeks, I have been absolutely thrashing through QJS and the routing system. I think I can make great things with it. But also I started writing documentation for it.

One of the reasons I never felt like I could promote apptools was because it was a hodgepodge mess of stuff I had thrown together. QJS has come a long way recently, mainly because I started writing the documentation. While writing it, I started testing all the old things I had made and forgotten about. Now they're tight. And they work exactly how I want them to... for the most part.

And it's good. I think it's very good. I think it might be one of the best things I ever made. I have probably said it here before, but people used to tell me I was a creative person, and I would always argue with them. I'm not a creative. I'm a puzzle solving programmer. That's what I love and what I'm best at. I'm a way better engineer than an artist. And I'm a pretty good artist.

I'm not actually done with the documentation yet. Now that I've written it all out, and gone through all the testing of the code, I want to see what I can build the way of a documentation website with this tool. Now that I have the code in a working state, I don't think I'll constantly be seeing the limitations of my own tools, and instead just be able to use them to move forward.

If you want to peruse the current state of the docs, they're here. That page is made with both the QJS and Core libraries, and it is very exciting. I can't wait to do more. I am going to go to sleep and sleep forever.

What is this a trend?
December 11, 2022, 8:17 pm

I did a lot of good work today. Some people go on vacation and they treat themselves. They go see things, and they meet people, and they do cool things.

I fucking wrote javascript and released a new better version of my code.

But I also made it easier for me to use my querying library in the future. I was always trying to find like... the last good project that used it, to copy the initialization process, and now I just built it into the library. And I made it work reliably. There were a couple features that I had made into a couple demos that like... didn't actually do any of the things I had planned for.

The new location is qjs. It's focused on just the querying library, instead of having all the other pieces. I think I originally had it separate but then I merged it, and now I'm separating it again. It's better this way. Trust me. In fact, here's my core css library separated as well.

Sometimes inspiration just hits
December 10, 2022, 10:54 am

When you get older, and you get a job, and you have friends, and all the social things you do in your life, it gets harder and harder to find not just time but energy for your hobbies.

I think video games are also a problem for me. A long long time ago, I recall reading an article about Joe Madureira and how he couldn't keep to a schedule for his comics because he was always playing video games. And I recall thinking to myself, that dummy, how can he not manage his time better? How could video games be a bad thing. But it's so true. You just waste all your time and energy on something that gives you those dopamines, but doesn't produce any results for you.

Whenever I have other things to do, that seems to always be the time when I'm most inspired to write. For code or prose or this blog, it always seems to strike when I have a deadline for something else.

I'm traveling to Los Angeles this week, and I should be packing. But I've been writing code and documentation for my apptools library all morning. I feel like I made all these things in my life, but I never released any of them. I never finished any of them. I desperately want to release the apptools library. I mean, I've made github releases for it, and I've used it in lots of stuff, but no one else has. And partially that's because no one else know how to use it. And I really want other people to be able to use it, because, genuinely I think it's good.

I'm not even using my Core CSS library that I've built there here on my site, and I totally should be. God, I need to redesign my website too... How many times have I had that scary thought? Ugh. Well. Back to writing code and documentation, and not doing the packing that I should be doing.

In which I have a new job
October 6, 2022, 1:23 pm

I've started a new job. I'm working for PUBG. Well, actually I'm working for a company called Krafton. They're a parent company that purchased PUBG. But I don't get paid by Krafton. It's all very confusing. Working for a modern game company is almost certainly going to be a confusing labyrinth of company names and organizations. But whatever it is, I work there now, and it's cool.

I work with cool people. I feel like I know what I'm doing. And I definitely don't know what I'm doing. :D I mean I do. I know how to program. I know how to code. I know how to design. And I know how to work the game of thrones a bit. But there's so much minutia that is new and different at any new job you'll get to. I'm still figuring it all out.

We had a design layout issue yesterday, and between me and two other extremely smart frontend engineers, we couldn't come up with a "simple" solution to it.

The concept is this:
  • A list of circle icons.
  • When just enough icons for one row can be shown, show one row.
  • If it is necessary to show more rows, show them as alternating even and odd count rows.
  • Whenever possible avoid having a single hanging item in the last row.

It's that last item that really throws everything into issue. It changes this problem from one that's possible, to one that turned out to be very difficult / near impossible.

And this is when every engineer / designer has to be willing to make compromises. Either compromises on how much work you're willing to put in to solving a problem as an engineer, or how much outlier design goofs you're willing to allow in to a solution which allows a 95% success rate.

After sitting down and pushing some things around, a solution was come to, but it wasn't easy, small, or perfect.

See the Pen even odd grids by Hamilton (@bronkula)

on CodePen.

Ultimately I think it is, however, an elegant solution. It solves for most of the problem, while solving entirely the spirit of the design. Sometimes this solution results in hanging last rows. But that compromise is so that the design always tries to take up as much horizontal space as it can. When it comes to responsive designs you MUST be willing to compromise and figure out what you're willing to give up to reach as close to your goal as possible. Sometimes the math just DOES NOT allow what you envisioned.

I made a tutorial
September 20, 2022, 12:03 pm

I still have a youtube channel. I lost my ability to monetize it a couple years ago, because I rarely upload anything to it, and I have almost no traffic through it. But I do still every so often upload to it.

Toward the end of last month I started work on a javascript written gaming engine. And mid way through it, I thought I should catalog the most basic steps in a video tutorial.

It was a fun little diversion, and it helped cement a couple concepts in my own mind as I went along.

And then I think youtube somehow threw this into some search parameters, and the video got a tiny bit of traction. And now people are saying they want more. And ugh. Fine! I guess I can do a little more. But genuinely I'm still making this all up as I go along, and I'm not sure how correct I am. A lot of the concepts I'm learning at the exact same time and it feels weird to try to explain something to someone else that you don't fully understand yourself.

But I guess that's the life of a teacher. You know just enough to do, and therefore other people only truly want to know just that much as well.

I'm not sure where I want to go with this game engine tho. I've been telling people that I'm working on it. And I HAVE been working on it. But I don't really have a game in mind for it. Truly, I just kind of love making the engine. I like working on library code. I suppose I could go back over other game types and just run them out one at a time in this new engine concept.

In which I updated a bunch of old projects that none of you will see.
August 22, 2022, 2:37 am

So this weekend has been a bit of a whirlwind of coding.

Two weeks ago, I started watching a video on how to make a python game using a library called pygame. Creating a Stardew Valley inspired game in Python. It's a pretty decent 6 hour tutorial on some basics of game design. It's incomplete in terms of its game outcome, but it will get anyone interested in the topic pretty far into the start of some concepts.

The thing is, I don't really want to learn python. Not really. Not right now. I already know javascript. And the two languages aren't THAT divergent, so I thought I'd give a shot at converting his example into javascript.

The immediate problem I ran into is his use of the pygame library. Its documentation is... rough. But the thing is, I've made a lot of libraries in my time, including math, graphics, and querying concepts. I just needed to bring them all together, and sort of adapt any interesting pygame concepts I came across.

So I started into it. And after about a week, I was doing pretty well. And then on friday something terrible happened. Well this whole time I had been diving through old code, to see if any of my stuff I'd already written was compatible to be brought into this project. But then I started looking through old projects and applications on my server.

You guys, a few months ago I updated my php installation to php8. I don't regret this. But it broke like 10 of my websites immediately when I did it. After making sure all of the sites I could think of were fixed, I moved on. But this weekend I found more. And more.

I found old scripts like my file browser that weren't working. And then trying to fix that made me realize my php package manager wasn't working. Then I made myself a link page to some behind the scenes projects of mine and realized my sql manager wasn't working either. Then I noticed a bunch of my old AAU example files weren't working either. It was a mess.

Slowly but surely over the course of this weekend I've been not only fixing php8 bugs, but I've been adding to and completing a bunch of old projects. Hell, I'm writing this in my blog editor, and I've even started updating the css and layouts of that tool as well.

I'm writing some of the best code I've written in years. I'm way better at javascript and php now than I was even 6 years ago, and both languages have improved a ton on their own. For a few years I've had zero motivation to work on my own projects. Getting laid off put me down low for a bit, but I think I'm coming around the corner. Now my only enemy is sleep. And money, I suppose. I wish I could just keep going forever.

Is it bad to not update your blog?
December 30, 2021, 10:29 pm

What if it was extraordinary times? What about then? What if life went absolutely nuts all around you, and you just sort of forgot to update it? What then?

It's been a hot minute since I've put very much on this website. I need to redesign it. I need to rewrite some things (especially an image uploader), and I need to make more of an effort to keep my self honest about my projects by posting about them in public. Let's see... where was I?

This year has been a series of big changes. At the beginning of 2021 I was let go from my full time status at the Academy of Art and I got a job as a Senior Frontend Engineer at a company called IMVU. This job has been really fantastic. But it's the first fully remote job I've ever had. Working fully remote is not something I ever sought, and it's been both freeing and frustrating in a lot of ways. I like to be around people, and if I'm totally honest, when I'm stuck in a house, I find it hard to motivate myself.

I am still teaching at the Academy sometimes. I like it. Not sure how much longer I'll be able to continue, but I think for now if they keep inviting me back, I'll continue teaching a class.

I worked on a number of personal projects. I've been doing a lot of things with themoviedb api. Did a little project with a friend for figuring out which of your friends you're most compatible with, based on the movies you like. And I just pushed a big update to filmswith, a website for browsing movie data, and comparing people and movies together. I rebuilt that app from the bottom up in React, and I've learned so much during the process.

I'm not sure I'd call 2021 a success. When 2020 started, I thought it was going to be such a good year. I had so many plans. In some ways it was great for me. But 2021 just feels like a blur. I'm not sure what to expect in 2022. I just have no idea. But I think I'm going to try to work on more personal projects. Here's hoping I can stick to that. Someone keep me honest.

Icons and libraries
July 10, 2020, 3:15 pm

So I have a thing that I work on periodically. It's a library of javascript code that is... well more or less a jquery replacement. But it's something I wrote, and it's something that does what I want. And I made it to learn a lot, but also because it's small, and it's clean, and I like it. It doesn't really have a name, but it's part of my apptools collection on github, and it just got a new release.

I was working on another project, my icon library, and I started to convert it to something that uses my library, and it had ALL KINDS of problems when it came to querying on an svg element. Turns out I had to solve lots of problems, and I had to solve a number of them, and I had to set up an ampps server to get everything working right, and it was just a whole thing.

But I think I fixed a number of necessary issues with my library, and it's never felt better. Not just its use, but also my whole work process got streamlined a bit, and it felt really good.

... Maybe I'll update my website one of these days.

A bit of an overreaction
March 7, 2020, 2:15 pm

So I've been learning react recently. I've been getting pretty far into it. I'm pretty confident at this point that I understand the concepts, and I'm able to execute on React Hooks effectively.

I made a quick little demo example TicTacToe game, because one of my colleagues was doing a tutorial, and I wondered if I could write one from scratch. And the answer is, I COULD, but also I pulled a tiny bit of code from one of my old examples. But honestly I just pulled the win arrays, because my brain shut down, and I couldn't think of how to do them for a second.

So if you're interested, here's a quick React app of TicTacToe, and the Github repo to go along with it.

I'm enjoying React a lot these days, and I've started multiple projects in it. It's groovy, and I like the build processes.