JavaScript Tricks to Save Time & Frustration
In my everyday life as technology leader (“tech lead”) and full stack developer I run into a lot of problems that need to be solved every day.
In my everyday life as technology leader (“tech lead”) and full stack developer I run into a lot of problems that need to be solved every day.
TDD is a lot more than vanity metrics like the percentage of code covered by tests. Test Driven Development (TDD) is a development process that consists of the tests being designed and written before most of the code is written.
JavaScript is really suitable for function programming because of functions being first class. Functions being first class means that JavaScript treats them as a type of object.
Developing locally makes a lot more sense than deploying to a dev environment consistently because it helps save time, save some cloud costs, and avoids obvious embarrassment. 🙂
I don’t think jQuery is dead at this point, but it’s growth seems to be slowing.
Arrays are usually used to store a list of elements that need to be accessed by a single variable.
I believe that to use JavaScript effectively every developer should be able to use any one of these methods on an array. These methods can save a lot of lines of codes and also allow us to do some pretty awesome function programming!
Over the years, I’ve worked on a number of projects where we deal with user or company provided images which are often very large resolutions which take a long time to download on mobile phones or or poor internet connections.
This is a simple script that can be used to compress images and avoid potential costs of a service like Kraken.io
As a JavaScript developer, there’s occasionally a need to remove duplicates from an array of values.
By using our knowledge of advanced data sets we can write a lot less code and take advantage of built in features in JavaScript.
Knex is a JavaScript / Node.js library that is designed to make working with relational databases easier. Knex.js is a SQL query builder.
It has the potential to make tdd and database versioning much easier.
Although, JavaScript: The Good Parts is nearly ten years old I would argue it’s still a pretty good book to read. Literally, as the title implies the book calls out the best parts of the javascript language and tells what parts of the language to avoid.…
Most software projects need to talk to a database at some point – they usually do GET queries for data, update a field or create a record. In the past, people would write raw code that communicated with the database and built an object or some code representation of the data that they would manipulate. This lead to an incredible amount of duplicated code for every project that usually had some subtle bug that was present in all libraries. …
A palindrome is a word or sentence that’s spelled the same way both forward and backwards. Most of the time when doing these challenges during programming interviews you’re told to ignore punctuation, case and spacing.
In JavaScript, it’s common to hear lots of strange terminology without a lot of description around what it is or what it does. I want to try and demystify what a self invoking function is and why you should consider them and the times when maybe you shouldn’t consider them.…
In the earlier days of the web, there was a battle between two scripting languages VBScript and JavaScript. VBScript, thankfully, eventually died and JavaScript became the dominant language for making really easy to use and interactive websites.
In the years since, JavaScript has become more and more used. Backend code can be written in basically any language, even in JavaScript, but the client side will almost always require a developer with some JavaScript knowledge. Every industry has a lot of javascript and some are even rewriting core functionality to use more. Surprisingly, even large banks and credit card companies are beginning to use JavaScript or Node in big ways. PayPal has been rewriting very large parts of their code base to make it more scalable and usable.…
In functional programming, being able to reduce is one of the fundamental concepts. Reduce is used to iterate through the values in an array and condense all of the values into a single value. Usually the value is a sum of all of the elements, but it could be used to decrement, multiply or even…
In a lot of web applications, it can be really useful to detect whether the user is still active or not. For example, when a user is no longer active it can make a lot of sense to automatically log the user out or remind them that they’re about to be logged out. …
Merging objects together in JavaScript isn’t very difficult although there’s quite a few different ways that it can be done.
Note, I’m not covering deep cloning for the sake of simplicity although this can be easily done through most of these different methods.
…
It’s no secret that JavaScript is now all around us, most html forms are using JavaScript for validation and of course there’s now JavaScript on the server. This post covers how to get the query string from the current page’s url.…
Traditionally when somebody said JavaScript, they were talking about a language that just did stuff on the client side like form validation or the occasional animation or UI enhancement. For years now, JavaScript has been all of the rage. Most new technology startups are now using JavaScript on the frontend, and on their backend services. …
Over the last few years, Salesforce has made some really significant changes that allow JavaScript to increasingly be used. By using Salesforce’s AJAX toolkit it’s possible to do an incredible amount of customization to a standard Salesforce Page Layout without ever having to write any apex.…