Quantcast
Channel: Uncategorized – MikeDoesWeb
Browsing index pages (18 articles)
↧

Monkey Patching Event Listeners

There was an interesting question in my local slack javascript community for a way to capture the performance of different events that happen on a page.  One way that was suggested was to hook into the...

View Article


Ray tracing reflection depth demo

Here’s a quick visual demo of the effect of reflection depth in ray tracing, using the incredible Tiny Raytracer by Gabriel Gambetta. I have hosted a modified version of Tiny Raytracer on codepen for...

View Article


Adding GraphQL to Ruby on Rails

GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives...

View Article

Dynamic super classes (extends) in ES6

tl;dr Create a class factory which allows dynamic super classes to by applied to an es6 class (dynamic inheritance). This will be transparent to a consumer — meaning they will interact with it in the...

View Article

Adding mp3 files to a Create React App app

If you’re looking for the steps to include static files, like an mp3, to a create-react-app project — and use es6 import statements to use them in a component, here are the steps. This process will...

View Article


Simple React Examples

I ❤️  react, and have spent a bit of time teaching react concepts to others through bootcamp trainings, and university courses. Here are a few examples of concepts and code I’ve written for students...

View Article

Getting Started with Data Visualization in React

A primary goal of data visualization is to communicate information clearly and efficiently via statistical graphics, plots and information graphics. Numerical data may be encoded using dots, lines, or...

View Article

Modern 100% height divs

In 2011 I published a popular article, 100% height Divs with 2 lines of code, which showed how to use JavaScript to get around the difficult layout problem of having two elements side-by-side both at...

View Article


Recursive spiral art with canvas+javascript

Demo (Hide yo kids, hide yo RAM) See the Pen Fractal with inner circles by Michael Jasper (@mdjasper) on CodePen. Explanation The basic gist is that a circle is drawn, then another circle is drawn on...

View Article


The ultimate beginners guide to web performance and speed

Make your webpage blazingly fast! This beginners guide includes 14 performance tips (from simple to complex) that will help you speed up any site. No related posts.

View Article

Wrapping an element in Vanilla JavaScript

This is more of a snippet for my own memory — but here is a function to wrap an element (or set of elements with any arbitrary text. jQuery’s solution works well, but there’s no need to include such a...

View Article

Javascript Object – Next and Previous Keys

I often need to perform “next” and “previous” operations on standard JavaScript objects or JSON objects. There is no built-in functionality to do this, so here are some helper functions I’ve created to...

View Article

Creating your own JavaScript Library – part 2 – Event Handling

In Part 1 of Creating your own JavaScript library, we cover the library essentials: library design, creating a solid object constructor, and adding functions by extending the object prototype. This...

View Article


Custom events system in JavaScript – LightEvents.js

Needing an event subscription and publishing system for a HTML5/canvas game I’m creating, I wrote a very light event system. Anything than can call JavaScript (link, button, etc) can raise an event:...

View Article

Quick and reliable ad-rotator

In the course of my work, I’ve created and refined a simple ad rotator. It is built in JavaScript, and does not rely on any library, like jQuery, to function.  In my experience, it defeats ad-block,...

View Article


Interesting interview question #1

During an interview (for a software developer position) with a major employer in the state of Utah, I was asked an interesting programming question: Create a function that, given an integer parameter,...

View Article

Installing WordPress on a Windows Server (not through Gallery)

I administer a Windows server which runs multiple instances of WordPress.  Today I needed to install another instance, but the Gallery Installer through IIS kept failing. I resorted to installing...

View Article


JavaScript Constructors

Due to the familiar syntax of JavaScript, it is easy for experienced developers to make blunders without knowing it. One common problem is crafting object constructors. With some simple knowledge and...

View Article
Browsing index pages (18 articles)


Latest Images