Posts in javascript

Logging Information on Browser Crashes

Every now and then your web application does something so wild and unpredictable that it crashes the browser that you’re running it on. In order to create a better product for our users, we would need to log pertinent information every time our app crashes. Unfortunately there is no way to send a crash log before or during the crash due to the unpredictable nature of the crash and the browser’s web environment no longer working. The best thing to do is to send the logs after the crash. This post will go through a technique to detect when the user’s previous session has crashed so that we can perform the relevant logging actions.

written in browsers, javascript, logging Read on →

Rendering List of Elements in React With JSX

Understanding how JSX is processed can be slightly tricky to understand. Knowing when its appropriate to use JavaScript code and when to use HTML in your JSX can be very nuanced when writing React code. Understanding how the JSX will compile is critical in writing basic React that will render in predictable ways every time. This guide will go over the slightly tricky scenario of getting a list to render and how it can help us understand more about React and JSX.

written in guide, javascript, jsx, react Read on →

JavaScript Inheritance

As you may already know, Javascript has an interesting inheritance pattern called prototypal inheritance. You too can start using prototyping powers of Javascript with this one weird trick found by an Orange County mom. James Gosling creator of Java hates it!

written in guide, javascript Read on →

6.82 Visualizer Postmortem

source code

6.82 Visualizer is a gold and experience data visualizer (grapher) for the game Dota 2. There was a controversial update to the game where the game would give the losing team drastic advantages so that they would be able to catch up to the leader. The changes are difficult to imagine due to the amount of variables so this program was created to show the data on how much the game had changed.

written in angular, javascript, postmortem, project Read on → Postmortem

source code is an anonymous real-time secret posting website. Other supportive members can send comforting messages of support to the anonymous secret sharer. The secret sharer can thank these anonymous eyes and ears for their support in turn. All of this is done in real time letting users have an outlet for those things that they hide to themselves.

written in javascript, mongoose, node, postmortem, project Read on →

What Is This?

The this keyword in JavaScript is probably one of the most confusing and misunderstood fundamental concepts of the language. The use of this allows for repeatable creation of objects and flexibility in method sharing, but its often the source of many problems through misuse and misunderstanding. It’s honestly not something that’s too terribly intuitive or something that’s understood even after reading several articles and putting in the actual effort to learn it. The process of completely learning about this and its uses to the language is a long journey of reading and experimenting. Here’s another effort in explaining this. As a preface, you will be introduced to calls and bindsas well as this so get ready.

written in guide, javascript Read on →

Organizing Object Oriented Javascript

Object oriented Javascript isn’t really a new concept. For years people have been trying to make JavaScript more familiar towards object oriented programmers by perverting its naturally prototypical architecture towards something more classical. There are many guides on how to create classes with private and public members and inheritance but there aren’t as many guides on how to organize these into an actual usable and familiar project structure. I think the primary problem in why developers have so many varying ways of organizing their Javascript code is in that the language was never really meant to be built to such huge degrees. Large scale Javascript projects are popping up with the rise in popularity of NodeJS and large-scale front end frameworks that try to organize the usual mess that comes from hacking together a ‘native’ application experience on the web. The need for organized module JS is becoming increasingly important which is why I think I’ve found a pretty decent solution from the wide amount of options out there.

written in guide, javascript Read on →

Regular Expressions

regular expression crossword

Regular expressions are hard. There’s a lot to them that vary between different regular expression engines. They’re often considered to be an afterthought when it comes to a programmer’s tools due to the relative infrequency at which they’re used. Whenever they are actually needed, the programmer most likely only reads the minimum amount required that will fulfill the parsing problem at hand. Regular expressions are super cryptic to read and even more so when writing them in Java. While I don’t necessarily enjoy working with regular expressions, I highly respect those who are comfortable enough to take on any sort of parsing problem. This post is an attempt for me to solidify some of the basic and advanced things I’ve been picking up with regular expressions recently.

written in javascript, programming Read on →

Framework Frustration

Let me preface this by saying that I understand why frameworks exists. They solve repeatable problems in application development in a team environment by maintaining consistent development standards with tried and tested techniques that stood the test of time against thousands of projects and developer input that’s supposed to ultimately save the developer time. That’s great, that’s all really great. But, if it takes the user longer to develop the application with the framework than without it, then you have a framework deal breaker.

written in frameworks, java, javascript, programming Read on →

Javascript, Pass by Value or Pass by Reference?

This is something you don’t have to question until you need to pass the contents of an object around or pass the same exact reference around. For me this knowledge became important during the development of Angular and Node applications where objects and primitives are passed around like a hot potato.

written in javascript, programming Read on →