Posts in guide

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 →

How Much Stuff Can You Fit in Memory?

So you’re given a limit on the amount of random access memory your program can use, how much stuff (ints, chars, booleans, bytes) can you cache in there before having to store it in physical media?

written in guide, java Read on →

A Basic Rundown of How the Internet Works

So how does the internet work? How does your desktop, phone, laptop, Xbox, television, all get access to YouTube or Facebook? It’s actually kind of miraculous that something that was once used as a long distance communication protocol to share research amongst universities is now being used as what I think is the hottest commodity of the modern world. What’s even more miraculous is that the internet is just a bunch of machines playing the largest game of telephone at an incredibly blistering rate.

written in guide 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 →

Executing Highlighted Code in Eclipse Debugger

Just a short one for my sake since I keep forgetting.
Highlight a segment of Java code while on a breakpoint and press ctrl+u to execute, or ctrl+shift+d to execute and display the result. Helpful for when you want to check if a certain conditional that’s coming up in the next lines will return what you believe for it to return.

Having this is super handy and something I miss when jumping from Chrome’s javascript debugger that allows you to execute any arbitrary code in the console.

written in debugging, guide, java

Unit Testing Random Behavior With Mock Objects

What happens when you’re trying to write some unit tests and suddenly you need to test a method with non-deterministic properties. In other words how do you test a method whose expected behavior is random behavior? The answer is with mock objects. I’ve seen a bunch of suggestions to use a mock randomizer but I haven’t seen anyone actually explain it further than that. Hopefully this will help someone out

written in guide, java, testing Read on →