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.
Topic: WebDevelopmentAll Posts
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?
Posted 2 May 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.
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.
Posted 28 Mar 2019 by Brian
Speed up CSS
I learned about a new #CSS attribute that's pretty cool: will-change.
/* Warns the browser transform will be updated a fair amount */
will-change: transform;
It basically tells the browser "hey, this attribute's probably going to change on you, so you better be ready." I don't know exactly how it works- if it pre-processes most likely updates, passes processing to the GPU, etc- but it fixed some problems with moving elements smoothly on mobile for me.
MDN actually says it's "intended to be used as a last resort" which is always a good sign for a new web standard IMO. It's good to keep our devices on their toes.
I'm betting we'll see it being abused to heck if it hasn't been already. It may just become the new !important.
Posted 7 Mar 2019 by Josh
That Cast Button
Chrome wants to let you cast any video or audio from a phone. Even if you don't want it to be castable.
Fortunately, the fix is pretty easy. Just use:
video.disableRemotePlayback = true;
This will prevent a cast icon from showing up on videos that you don't want your users to be able to cast, like background videos.
Why isn't it instead something like
video.remotePlayback = false;
though?
Probably not for a good reason. It may be that since unset booleans default to false in most programming languages, this was easier to implement and have videos default to being castable. But I feel like it's pretty sloppy.
That's the fix anyhow.
Posted 4 Mar 2019 by Josh
Blog has moved!
Hey! If you're reading this, then you already noticed, but the #blog is now located at blog.bogedinbr.com and bogedinbr.com now has a bit of a front page for our development services. That page could use some work, it's a bit of a process. Of course I say "our" because #Josh and I are going in on this together. Should be fun!
Does the blog need to be a #subdomain? Probably not, but it's #cool right? Just another thing about #WebDevelopment that I understand even better now.
Posted 20 Feb 2019 by Brian
Solving Through Subtraction
Most of my #WebDevelopment work has been fixing broken #websites. And the first thing I do on any of these projects now is to start removing whatever I can.
Buggy #Wordpress site? I start deactivating plugins. If the website breaks further, I reactivate the plugin temporarily, but so far I've always been able to remove at least several plugins without it impacting the website at all. Usually the plugins that do impact site functionality can easily be replaced with some vanilla webcode.
Buggy non-Wordpress site? I start replacing #frameworks with vanilla webcode. It becomes easier to read, less convoluted, and it's easier to integrate the external code that really does matter (like Google Analytics code).
I call this process Subtraction. To me, it's an all-around win: the code is easier to read and faster to edit for me and future developers, and the website runs faster. Often Subtraction will solve the problems in and of themselves, or simplify the problems far enough that a solution is easy to implement (rather than trying to work around existing, conflicting webcode, which is often a problem).
Now, my first instinct on any project is to see what I can delete, and move forward from there. And I've always been glad that I took that step.
Posted 12 Feb 2019 by Josh
Round and Round!
What up! I'm Josh.
I like carousels. But not on a website. It feels like the creators of the site couldn't decide what information was the most important, and so tried to make it *all* super-important.
This site expresses the idea pretty well.
I have the habit of scrolling past automatic carousels so they don't distract me while I'm web-surfing. Usually, the constant change just distracts and frustrates me.
Manual carousels? I'm usually not bored enough to bother.
Also, I'm going to try to break Brian's #website with foreign characters. Because that's what friends do.
οικω
amígo
こんにちは
Posted 11 Feb 2019 by Josh
Symbolic. Links. Are. Awesome.
Have you ever wished you could have multiple folders on your system that contain the same files? And update in both places automatically? No? Oh, well then don't bother reading the rest of this.
For the cool people, symbolic links allow an operating system to treat files or folders as if they exist in multiple places. This is very useful for organization. In my case, I use them a lot for #WebDevelopment on my local server. I want to place all related project files in one place, but I need the actual web site to sit in the folder of the local server. Thanks to symbolic links, I can have both without manually updating the local site.
This works on a lot of operating systems, but for info on using them on #Windows, check out this HowToGeek article. I mostly use junctions to create folder links for entire websites, but the standard link type is also useful for single files. Just be careful, because a single file symbolic link looks EXACTLY the same as a shortcut in windows #explorer. But they are very different, as you can see if you check the properties. Also, the /H hard link seems to only make a copy, without auto updating the contents, so I don't ever use that.
You're welcome.
Posted 1 Feb 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.