Blog Posts

New Year's Resolutions

I don't usually make resolutions. Kinda related to a previous post on the subject, I just don't think that it's necessary to restrict yourself to yearly self improvement. But that doesn't mean you shouldn't take the opportunity.

This year, for me, I decided to take advantage of it. I spend way too much time on Youtube. Not any more. So, to that end, I blocked it on my desktop, disabled the app on my phone, and most importantly, told my Mom and brother. It's always best to have someone to help you keep your promises to yourself.

I'll try to keep this blog up to date on how it goes.

Posted 2 Jan 2021 by Brian

Style

I bought a new #laptop. I'm liking it, might talk more about it later. It came with a default desktop wallpaper that wasn't bad, but had the manufacturer logo embedded in it. So I went looking on the internet, as you do, and found this beauty of a simple planet on this nice list of backgrounds.

But it wasn't quite right. No, it's not that it's bad, just not quite my #style. I like the concept, but just wanted to make some tweaks. Because I have some experience with #Adobe #Illustrator, I went ahead and re-drew it a little more to my liking. It could use some work. The stars are a little too bunched up, and the moons from the original would be a nice addition, but overall I'm very happy with it. Here is my version of the planet wallpaper.

Feel free to use or repost it if you like, but do me a favor and link back to this page. Thanks!

Posted 7 Sep 2020 by Brian

How to process a blog post

#Wordpress shortcodes are great. They allow a lot of flexibility in posts, and they are easy to create and manage. But they, in conjunction with everything else going on in wordpress, slow down a site. Every time a user views a post or page, the body must be searched for shortcodes, whether or not any exist, the code must be run and the codes replaced with whatever is required.

That's where caching plugins come in. They can store the pre-processed body of an article, so that it can be displayed much more quickly. There are limitations, as shortcodes account for much more that simple replacements. And then caches can be invalidated.

On this blog, the processing is more simple. But I still have to format and adjust some things, especially because I don't allow HTML when writing. Currently, I do all the processing at the time of publishing, so the body is fully prepared for a viewer. This has the downside that all operations must be reversible, in order to preserve editing functionality.

But recently, I thought of a better solution. Add a column to the database for the original, unprocessed version of the post. It's effectively like a built in cache. The unprocessed version is the "actual post" in wordpress terms. And the processed version is the cached version that gets displayed.

Currently, it is not possible for any of the processing to become invalidated by changes outside of the post, without modifying the function of the site. But in future, there would need to be a way to invalidate all posts and have them reprocessed from the raw version.

Posted 19 Aug 2020 by Brian

Been busy, Surprised?

Of course not, life's been crazy for everyone. My last post was basically just before I got a new job, and blogging didn't seem as important. But I'm trying to get back into this and step up my game.

At my job, we use a lot of #wordpress. As a tool for getting a website up and running quickly and easily, especially for non-programmers, it's great. But I'm not a non-programmer. Plus it's really easy to let plugins get out of control, the backend to become disorganized, and page load speed is... not ideal.

I've learned a lot, and it's super helpful to know how to work with wordpress, because so many sites use it. But I still like my custom blog, and I want to continue developing it. So that's what I'm gonna do. Maybe tangentially for a while, there's a related project that'll I'll post more about soon.

Until then, stay safe!

Posted 14 Aug 2020 by Brian

Object-fit and overflow: hidden

Use 'em both. It is not explained in this Mozilla page, but on mobile #Chrome, when using object-fit, the overflow is drawn. This is not the case on desktop. Maybe that's a bug, maybe #Mozilla doesn't care, 'cuz it's not their browser, just be aware of that.

#WebDevelopment #flexbox #mobile #css

Posted 9 May 2019 by Brian

SVG Embedding

If you use an img tag to add an #SVG to your web page, you can't use #CSS to style it. Which is a shame, because I want to change the colors interactively or use the same icon with multiple colors quite often. Actually, almost as often as I use SVGs. But, I don't want to see the actual definition of the SVG repeated all over the place in my #code. There are probably a few solutions to this, but #PHP readfile() is my current favorite. Simply call #readfile to output the contents of a file. You might have to edit the SVG to remove some cruft, but it won't affect the way it looks. Plus you might want to add some classes to it. Then you just treat it as an inline SVG for styling purposes. Handy, right?

#WebDevelopment

Posted 2 May 2019 by Brian

Game Jam! Team Spirit!

I was part of another #GameJam. This time we decided to enter an actual game jam on itch.io. The theme was spirits, and there was a rule that there be no text in the game. We had a lot of fun with this one. The official jam was a bit longer, but we only spend about 12 hours on the game. It's not too shabby, check it out!

Team Spirit

#gameDev #gameMaker

Posted 7 Apr 2019 by Brian

Introducing Radish

I've been working on getting comments working for the #blog, but I got a little sidetracked. Anyone who's worked with #HTML knows that you end up doing a lot of stuff over and over again. That's why #frameworks exist. I was skeptical of most of these frameworks for a while, because I didn't consider anything that they offered to be of much use.

Then I started adding comments to the blog.

So, I get it. But I still don't like the mentality of frameworks. It's all closed up, hard to understand how they work, all or nothing, install it with NPM (it's definitely easier that way -_-), blah blah blah. I don't like it. If I'm working with a team, or need to get stuff out quick? Cool, frameworks got me covered. But for my personal stuff?

There's #Radish
Radish - The JavaScript Starter Kit - Github

Just a collection of various small, easy to comprehend, simple functions that take care of the most repetitive stuff that I have to do all the time. Is it very complete? Intuitive? I don't know, but it's a work in progress. And I'd love to hear your suggestions.

#WebDevelopment

Posted 28 Mar 2019 by Brian

createElement() vs createDocumentFragment()

I've been working on some #JavaScript to help populate pages with data returned from #AJAX requests. Generating #HTML elements or duplicating existing ones is pretty important for that sort of code. #Josh recommended checking out document fragments as they might be able to help. So I did. They can, but it depends what you're trying to do. In my case, it doesn't make much of a difference, as long as you put all the elements to be added into one container node before appending to the document. Otherwise, you could take a performance hit.

Check out this StackOverflow discussion for details on the differences.

#WebDevelopment

Posted 28 Mar 2019 by Brian

Chrome Bug w/transitions

I have discovered a minor #CSS #bug in #Chrome. I don't think it existed before, because I don't remember the issue that I am now seeing. It does not occur in #Firefox.

The button element has User Agent Styles for text and background color. If you set these to something else, but also have a transition on those properties, you will see a transition on page load. This transition will change from the user agent style, to the style you set. This ONLY applies if you are using a linked style sheet. Which, you are, because you don't want to have to update styles on multiple pages. I assume this is not restricted to the button element, that's just my example.

My biggest problem was that this caused my buttons to change size because I had the transition set to 'all'. I changed it to only affect the required properties, and the brief color change is much less noticeable.

Maybe someone will bump into this and save themselves a headache.

Posted 12 Mar 2019 by Brian

About

You found me! I'm Brian Bogedin. This is my website and blog. Obviously. Anyway, I'm a full stack web developer and game programmer operating in Southeast Michigan. I do freelance, too, so feel free to contact me with business inquiries. Thanks for stopping by!

Ping me: brian@bogedinbr.com

Projects

This blog!

I'm making this blog from scratch. No CMS, frameworks or libraries! Just MySQL, PHP, JS, HTML and CSS. Is it necessary to create a blog from scratch? No, but it is great for learning, and customization. Does your blog have hashtags?

DrawingWiffWaffles.com

Website for a youtube channel that creates instructional and entertainment videos about illustration. I built the site and manage giveaways there from time to time. Currently working on a miniature custom CMS so that the site owner can administer the giveaways without my assistance.

SECO Tools

I do some work here and there for a company that sells mill tooling. Most recently built a batch processor for their tool converter. Basically, it takes a bunch of competitor product numbers and returns the information on tools offered by SECO with similar specs. Still needs some user friendliness enhancement, but it's currently only for internal use.

Geospin

This is a small couch multiplayer game made in gamemaker for a game jam I organized with some friends. Up to 6 players use controllers or the keyboard to fire rockets on the side of their city to rotate a planet and avoid incoming missile. The trouble is, everyone else is trying to rotate the same planet! Download it on itch.io!

Showpony

Mulitimedia engine being developed by my friend, Josh Powlison. Plays audio, video, comics, text, and kinetic novels. Cool stuff. I'm helping out a tiny bit. See the demo here.