JErickson.net

The blog of Joe Erickson, 20+ year web programmer from Cleveland, Ohio.

Setting up a Vue CLI project for building Custom HTML Elements

I talked about what custom HTML elements were in my last post. Today, I’m going to walk through the process of getting a new Vue CLI project off the ground so that you can build your own. I’ll be using the <my-blink> tag example again, but will be focusing on the step by step1 instructions for creating the environment in which to build and deploy the tags you will be creating.

What are custom HTML elements?

As I’ve been looking at how to structure my JavaScript in my applications using modern JavaScript frameworks, I keep running into the same issue. I want to use component-based design, but I’m not always looking to build a Single Page Application. Sometimes, I just want to add a component onto a page that isn’t tied to the framework at all. In a framework like Angular, that’s fairly impossible. I’ve always seen Angular as an all or nothing framework.

My Current (and Completely Free) Developer Tools Setup

Having been a web developer for over 20 years, I’ve gone through a lot of tools and IDEs over the years. As 2019 kicks off, I thought I would document my current development environment for anyone who’s interested in what I use. As a note, I mainly work with PHP using the Laravel framework, JavaScript writing Riot and Vue components and deploy to a WebFaction cloud server. OS - Xubuntu 18.

How can you make learning programming less boring?

I’m sure you’ve run into it while trying to learn programming. You find a shiny new tutorial or video course and you dive in with excitement. Finally, this will be the one that sticks. And then you hit a brick wall. The boredom kicks in and you lose focus on what you’re doing. Soon, you completely lose track of whatever it was that you were supposed to be learning and you stop the course completely, adding it to the growing pile of half finished materials in your bookmarks folder.

Problem Solving in Programming with if and Logic Statements

Here’s a video I put together about Problem Solving. I think this is one of those topics that beginning programmers struggle the most with sometimes and this demonstrates a couple of techniques you can use to help you solve programming problems. I tackle the sumDouble and sleepIn problems from CodingBat.com.

How Will You Know if You'll Like Programming?

Learning programming to the level of being able to create web applications or work in the field can take a lot of time and effort. But what if you don’t like it? What if you spend all that time and effort and it ends up that you hate programming and never want to see its ugly face again? I hate to say it, but this can happen. I’ve seen it happen.

How to Measure Your Progress While Learning Programming

Learning programming can often feel like you’re running as fast as you can and getting nowhere fast. The minute you feel like you have something figured out, five more things pop up that you need to learn before you can even do anything useful. Measuring programming progress is extremely hard to do. It doesn’t come naturally to humans to measure progress of a mental skill. Programming is a very mental skill.

Java: Unstrung

So Strings are built for optimisation, but are you using it in an optimised way? If you understand interning and immutability, you can start looking at ways to use those features to your advantage. How to Waste Memory Without Really Trying Thinking about a String’s immutability, let’s look at String concatenation: String name = getName(); //Returns "Joe" String a = "Welcome "; a += name; a += ", Good to See You.

Java: The Unchangeable String

One of the fundamental data types in Java is the String. In fact, it’s used so often that most people don’t even think much about what a String is or how it works. But a String Object works like no other object in Java in two important ways; immutability and internment. You Can’t Touch This Immutability means that an object can’t be changed. Ever. You can’t modify any of its values in any way.

Thread Safety Dance

Another blast from the past. If you’re working with Servlets or in a Threaded environment, you need to be thinking about thread safety. Thread Bare Java has built in support for multiple threads in all its objects. The way it handles this, is each thread can get a handle on the object and run its methods at the same time which, for something like a servlet, cuts down on the amount of memory needed to load the servlets and the amount of time needed to instantiate multiple objects.