OK, I admit it. I went through a phase when I first heard the word memoization where I ignored that it existed. After all, what could a technique with a name like that have to offer me?
Well, I finally threw away my pride, admitted it might be valuable and spent some time learning about it. Yes, it is a technique used in functional programming, but it is a technique that can be applied to any coding paradigm. And it can be quite valuable.
So to make my penance complete, I thought it appropriate to do a tutorial on memoization.
Now don’t let the term scare you off. It really is not a complex concept. The patterns for implementing it are a bit involved, but the concept itself is pretty easy to understand.
I just published the tutorial on memoization and you can access it below. Take a look and give me your thoughts.
So this begs the question, how to get started? Well, as mentioned there are several books published about the subject, and I will be reviewing some of those in the future. But I think a great first step is to really understand some of the methods of the Array object. These methods were designed around functional programming concepts. For example, map, forEach, every and reduce are a few that are valuable to understand. And it just so happens we have a tutorial on some of those methods.
I just completed two tutorials on exception handling. The first shows how to use try catch statements in your code. The second talks about when you should and should not use try catch.
Take a look at both videos and if you have any additional rules to add for using try catch statements post them here.
I love the word obfuscation. It seems to reflect its own definition. To obfuscate something is to make it difficult to understand.
Now I find that a lot of my debugging is done with the console. At times I will open up the debugger, but for most things, I can figure it out pretty quickly using the console.
Over the years I have learned a few console commands that are very helpful. I know I would have loved to have these commands when I started out, so I put together a tutorial on some of the lesser known console commands. I think these can help you find a resolution faster.
Browsers have a DOMParser object that will allow you to make that conversion. Once you have the XML data as an XML DOM, you can then use the same commands you use to manipulate an HTML DOM to work with the XML data.
When you first start learning to program, your initial focus is on the language. You learn the syntax and the structure. Once you become comfortable and able to put statements together to solve programming problems, you are then free to think more about programming.
As experienced programmers have thought about the best ways to approach the building of an application or the best way to solve a particular problem, they have developed paradigms and design patterns. The smart developers draw on this expertise to improve their own programming skills by adopting paradigms and design patterns.
A paradigm is simply a style or an approach to programming. For example, Object Oriented programming is a paradigm. If you follow this paradigm you use objects to approach the overall program. The objects contain data and behaviors and you connect them in logical ways to successfully solve the task at hand.
Now a design pattern is a tried and tested solution to a common programming pattern. It could be considered a best practice. If you approach a program using an Object Oriented paradigm, there are a number of design patterns you can then draw on to solve specific problems.
I really like this quote by Angus Croll:
In these two tutorials I have tried to first explain prototype in a way that will make sense. And then I delve into three techniques for setting the prototype of an object.
If you have not watched these two tutorials yet, first watch the tutorial that explains prototypes.
Then you can watch how to set the prototype.
Sometimes the most difficult part about a project is starting. It can reduce a lot of stress and put you well ahead if you have a process for starting a project.
For example, something I commonly do is to spend time setting up the structure of the project and the processes needed to test and minify project files. That little bit gets my head into the project and then I can get going. Otherwise, I feel like I languish before I can really get started.
The other day I read a great article at Sitepoint about how to approach projects. I thought it organized all the starting tasks really well. These starting tasks are not only important, but I realized they can accomplish the same thing of getting your head in the project and getting you going in the right direction.