Author Archives: Mark Reyes

About Mark Reyes

Web Developer based out of Southern California.

Mahalo and Aloha 2020

Dear 2020,

I had to be sure. I had to be sure to not write this in advance because I needed definitive proof that you were effectively put to rest. And here I am. Alive, but with scars nonetheless. And the impact you caused mankind over the last 12 months can only be so coldly explained as, it is what it is.

But YOU for sure…were the cruelest of moments. I thank my lucky starts that I didn’t fall into quicksand because it very much felt like the world was disappearing right beneath me. Our response to adversity is what will define our generation. And thus far, despite the chaos, I do very much see light at the end of this tunnel. And I am at peace knowing things will never be the same…again.

It honestly baffles me. Pages from MCU forced its way into our reality. I’d be lying if I said Thanos had nothing to do with this horrific year. Spearheaded by a global pandemic, a recession, civil unrest and political divide you forced me to either do nothing…or choose a side.

So let it be known that today…I’ve chosen.

I choose to be David rather than Goliath. Live and let live. I choose to accept that tribalism will always exist and to read between the lines, rather than judging an article by its title. I will show up each and every day, to try and fail rather than not trying…at all.

I’m here to look at my family and friends as family and friends again, rather than family and friends that voted for him or her. I choose to trust the results from observations and experiments over a period of time. But I have no shame in admitting that I’ll look up at the heavens for a bit more.

This past year has been too much for me to comprehend. But TLDR is a short-sighted technique in understanding just what the fuck happened in the last 365 days. Although once again, Einstein would enforce that time is simply relative, today is the day I disagree.

Today is officially my Day 1. There will be no other Day 1. This is it. And whatever becomes of it from this day forward will also be it is what it is but with one silver lining attached. I will always remember the struggles and hardships made, carry its pain and see it through.

As long as I am of sound mind and body, I will continue.

Mahalo and Aloha, 2020 🤙🏾

Open Mat Series Invitational

Hey guys and welcome to the newest episode of AllWebSD. Where I put my city’s digital savants on the forefront, talk tech and find the proper moments of rest before burnout becomes a reality.

Hmmm…

My city’s digital savants. Let’s go there.

Today I’m hungry. And I’m hungry to be once again inspired…by YOU. Specifically, the you that right now in this very moment decided to undertake such an arduous specialization inside of software development. Recent graduates, career pivots  and the like, this round of dialogue is dedicated to you.

Let’s talk. Let’s break bread. Let’s train.

In my Jiu Jitsu school my Professor would call this an Open Mat. So let’s take this opportunity to be just that. A moment of time where we train together and pick each other’s brains on why we made this choice. Where we were, where we are and where we’d like to go with the decision already made.

You’ve gone all-in trusting your instincts and inner wisdom to be on this path and I’d like to be part of that journey, even if for a few short minutes. We can go here, we can go there and we can talk about any uncertainty you have along the way. 

Now…are you hesitant and a bit camera shy? That’s okay. It’s audio only. I’m opening the mat for up to 5 spots, first come, first served.

On a final note, I’d like you to take this chance and view it from a different perspective. A time capsule-like approach or a message in a bottle, if you will. A note you can look back on fondly down the line as a way to really gain some insight about yourself direct from no-one else…but YOU.

Be easy, take care and I’ll talk to you again in the new year.

Aloha, San Diego. 🤙🏾

Review of Pro JavaScript Techniques

TLDR – #quarantineandchill gave me the opportunity to read a JavaScript book from 2006 by jQuery creator, John Resig. What could possibly be relevant? Parts 3-5: Unobtrusive JavaScript, Ajax and The Future of JavaScript.


Introduction

Books. How many of us have them? I for one have several but just because I own a collection doesn’t mean I’ve read them all. I’m trying to improve on that habit and in doing so, I recently discovered a purchase which I had not touched at all. 

What adds to the problem is that this is a tech book and for those of you who’ve touched on this type of literature, you know that it can be a very dry read.

That said, this book was and is for the most part still an important one to highlight. For all the web development addicts out there, this contribution is from John Resig, the creator of jQuery. His book, Pro JavaScript Techniques is almost 350 pages of content breaking down JavaScript implementations for commonplace interactions. Here’s the kicker – this book has a copyright of 2006 but there is a 2015 second edition.

Summary

Ironically, I could very well say that all chapters are important but that defeats the purpose. However, when tying in the lessons to modern day problems, three specific parts are very much everlasting:

PART 3 Unobtrusive JavaScript

Chapter 5: The Document Object Model

Take a tour of the HTML you use routinely through the perspective of the DOM. Here, you’ll take a glimpse of what the makeup of an HTML element looks like from JavaScript’s point of view, what you can do with it, how you can access it (by selector, XPath, etc.) and its surrounding parts like text, siblings and attributes.

Chapter 6: Events

Go head first into the crucial aspects of event bubbling, capturing and canceling. This deep dive will teach you how to tie user-driven behavior to an HTML element of your choice (e.g. clicking a button tag) and how that event is managed should more HTML be encapsulating that element. You’ll also learn ways on overwriting default web browser behavior (e.g. clicking an anchor tag – you may not want it heading into another page).

Chapter 7: JavaScript and CSS

Use plain ol’ vanilla JavaScript to access an element’s current style properties or create them on the fly, determine the x and y position of any element you reference, toggle visibility, animations, examine the viewport and play around with scrolling behaviors.

But the drag and drop section referenced some older technologies like script.aculo.us and moo.fx. I’d say it’s worth the read if you want to simply review on how code was organized. On the basis of that alone, it’s pretty clean (see Module Pattern by Addy Osmani).

Chapter 8: Improving Forms

In my opinion, this section alone is the BIGGEST win. Learn form validation in an exceptionally straightforward way. The markup alone is crystal clear and when you add John’s opinion on layering in validations for required fields, pattern matching and displaying error messages, it creates for a fairly strong HTML form for everyday use. I’d recommend you visit the codebase for more details.

PART 4 Ajax

Chapter 10: Introduction to Ajax

While deceptively simple, the concept of Ajax web applications is a powerful one.

Chapter 10: Introduction to Ajax (p. 232)

John provides a rundown of the full Ajax process and what’s involved with the HTTP request and response. He also provides insight on error handling and the types of data that gets passed back and forth between client and server. If you’re a server-side developer that makes APIs for a living, you would appreciate this chapter.

PART 5 The Future of JavaScript

Chapter 14: Where is JavaScript Going?

If you believe hindsight is 20/20 then give this chapter a go. Let expectations meet reality and observe what really did take place like Array Extras (p. 289-90) and Let Scoping (p. 290). Gloss over on what could have been by way of Comet (p. 301-03).

Conclusion

So, why did I bother with such an old book? A lot of us have John Resig to thank for not pulling our hair out when dealing with Internet Explorer. For those of you entering the field now, this comment holds zero weight but for those of us who developed sites and apps which pre-date the original iPhone and Google Chrome, know how much of a pain it was to equalize the playing field in what was then an IE6 marketplace. This book offered options on how to address the browser ecosystems of that time.

If taking this writeup at face value, you’ll want to ensure you are at minimum, a solid beginner at web development. Understand your HTML and CSS first, then you can begin to ponder why you’d need JavaScript in the first place. Rightfully so, this book (and I assume its 2015 follow-up) fits the bill for beginners and intermediates. If you feel you are far past this level, this book is not for you.

But for me personally, it was worth the time to at least leaf through these pages once before I set it back on the shelf. Some comments still hold true to this day (especially PARTS 3 and 4) and that’s ultimately what drove me to come full circle with the book as JavaScript sets foot into the next decade.


This article appeared on ISSUE 517 of JavaScript Weekly. I’ve found Cooper Press to be a great resource in sending out weekly emails pertinent to all aspects of web technology. If you haven’t yet, subscribe to them for FREE!


This post may contain affiliate links. Should you make a purchase by clicking on any of the links, I may earn a commission at no extra cost to you. Read my full affiliate disclosure here.