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've been graphing a lot of photo lately
March 9, 2023, 6:15 pm

A few years ago, I bought a camera. I thought I did my research. I wanted a camera I could connect to my computer and use as a webcam. And I found this camera. The camera for bloggers. And I thought, that's a webcam! And I bought the Canon M50.

The camera was almost immediately replaced with a better version that year. I eventually found out this is the camera for OUTDOOR bloggers, and it basically can't connect to a computer for crap. The camera is a crop sensor, so it will never be great, and by the time I got it, basically everyone had already stopped making lenses for it. And so I had some pretty severe buyer's remorse pretty quick.


The camera is actually pretty good, for what it is. It's a crop sensor, but really it's still a good Canon camera, it just will only ever be good, and never be great. But great cameras are expensive, sometimes 6-8 times as expensive as this camera. And the M50 is good.

So anyone that has a good camera, knows that half the battle is getting lenses. Canon only made a few lenses for the EF-M line. And other companies made more, but often with lots of compromises. But once you get an adapter for EF lenses, the camera can actually cover almost all bases. I can get as extreme in telephoto as any lens has gone, and I can get as good at lowlight as any lens is willing to give me.

I am only just now starting to branch out into more interesting lenses. I got my first fisheye lens recently, and I've been pushing my telephotos slowly out past 300mm.

And I like learning the craft of photography. I'm enjoying learning not just the basics of camera equipment, but fumbling my way through issues of subject, framing, and light. It's a slow process. I am concerned not with winning quickly, but enjoying the war of attrition. I will slowly do right, by continuing to try to learn from what I do wrong.

So I've been posting my photos on instagram recently, and a number of people have been asking about my photo gear, and so I put together all the knowledge I have about my own kit into a little webpage. You can check that out here. I will continue to add stuff to it.

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.

I think I need to get away from my house more
December 11, 2022, 9:22 am

I'm sitting on the toilet in a hotel in Santa Monica, and I've never felt so inspired to create. If you think that's weird, clearly you haven't spent enough time in a bathroom that someone else will clean. Something about being in your own space just puts your mind to all the problems and chores around you. And then getting away from that just frees it up.

I get the feeling this is not some grand epiphany that no one has ever had before. But it's at least something I've never put thought into before.

I had such high hopes for this trip to LA. But it is raining. It's not a storm, but it's like wet rain. You know how some rain is light and fun and breezy? And some rain is crazy and windy and terrible? Well this rain is just like... wet. It's just a dump of water. It's a puddle maker. They say the rain will drift off mid day, and then I hope to be able to walk around the beach for a bit.

But right now. Here in this stark white bathroom. With no things leaning. And all clean linens. And a bare counter top. I feel compelled to create. Or at least I feel the urge to write.

I actually love writing. I like writing my thoughts. I like writing poetry. I enjoy the process of thought distillation. And I enjoy writing on a keyboard, more than writing with a pen. And I have so many implements for writing with pens. I wish I liked that more. Does anyone else do that? Get tools for things they wish they could like, but ultimately never get in to? Who am I talking to? I'm the only one that reads these blogs.

I should probably some time add the ability to comment on this blog. But if I were honest, although I like the idea that no one sees this blog but me, it also somewhat makes me sad that perhaps no one sees this blog but me.

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.

Something needed mending
April 20, 2022, 11:53 am

While talking with some students, I noticed some parts of this site need some work. I did some spring cleaning and updated some things surrounding images. You might never even notice anything happened. A couple links were wrong. Some stuff I wrote 6 years ago and I never figured out how to do right, and now that I've learned more, and javascript and css have improved, some of those things could be fixed quite simply.

The march of time goes on, and things that were hard are now easy. Things that were great have crumbled, and some things that we set up long ago and forgot about suddenly find relevance again.

I've created a number of image uploaders over the years. With varying degrees of complexity and ux. But I often don't upload my images here, because it's such a hassle to resize them and upload them and rename them and archive them. It's a whole process. And sometimes my server just won't allow image uploads for php memory reasons.

And sometimes I remember that a long time ago I made a really good image uploader. One that works on mobile and accounts for all kinds of common factors that I want. Because I made it for me. And then suddenly I can start uploading images to my own website again, because it is not in fact a tremendous hassle anymore. In some ways it's a breeze. I did a little more work on my image uploader to make it even smarter, able to handle bigger images, and have a few more bells and whistles, and now it's pretty good. I'm kind of pleased with it, actually. Very pleased indeed.

I also started cataloging all my art recently. Figuring out who I drew, and making sure I had a full size archive of as much of my art created in the last few years as I could find. I'll be slowly leaking that stuff into my portfolio, as I figure out the best way to manage all of that.