Smart {Code};

Why ‘No Code’ Website Creation Services Will Not Be Stealing Your Job As Web Developer Any Time Soon

Today I feel like writing about web development jobs and the services we offer as web developers. I have always wanted to have the power to manipulate code to my will. Back then, being a web developer was a secure thing. How secure is it now as a career? I am going to talk ever so lightly about services like Squarespace, Wix, and WordPress. Could it potentially ever get to the point where I lose my job as a web developer because of the services they offer? These services offer a good solution to making websites for anyone with no technical expertise, which raises two main questions. Do we need to worry about that? Is it something that could one day replace us as developers?

. . .

The thing is, we are working with two different markets that might not be obvious at first, especially to someone who is not familiar with web development. One of them is for creating static, basic content, web pages, which is something that services like Squarespace, Wix, and WordPress offer. The other one is for creating bespoke web apps. Services like Squarespace, Wix, and WordPress the market that is for the creation of basic static websites, which only hold some information or e-commerce websites, which allow you to take your products, put them on that website, and sell them.

It is no lie that there are so many aspects of web development that these services offer. Tools like creating your backend for you, managing your data, managing your secure payments, your SEO, or in other words, the positioning of your website on Google search and how high you rank in the search. Said services are handy for a non-techie. The disadvantage of these services is that they are pretty limited in terms of what they can offer with built-in themes because even for more extensive and complex customizations of those websites, you would still probably need to refer to a developer. What is going on? Why are people saying that the world of web development is being taken over by such services? In my opinion, that is completely not the case, and to be frank, those online services do not cause a problem for us web developers.

There are very few minor scenarios that I can think of which might affect someone. If you are a developer who creates simple websites for people or websites that just dealt with simple e-commerce aspects, I would say you might find it hard to compete against them unless you are offering more than what said services offer on top of what they already offer. Take me, for example. I can create both simple and complex sites. I have a lot of WordPress clients, and I manage to keep being in business because I offer customization whether in design or functionality. I never use prebuilt themes nor page builders. I code the pages from scratch then add them onto WordPress as themes, except they are exactly what the client asks for.

Think of a web app like YouTube. You can make any site look like that using services like Squarespace, Wix, or WordPress. No argument there, but what about your watch and search history?

What about things like being able to create a channel? What about creating functionality to rank my videos as the YouTube algorithm does? You will never be able to create things like that with DIY services. This is where the clear line comes in between simple websites and bespoke web applications.

A Web application is something that needs an actual developer to sit down, think about, to plan the structure, the architecture, the databases, and all the seamless integration.

There is a lot of processes involved that would never be available on websites like Squarespace, Wix, or WordPress. Sure, WordPress can try and get a little deeper because of the plugins being actively developed, but that is usually not advisable because it affects the size of the site.

How has the presence of these services impacted us as web developers? Well, most probably in some small way, because they did take away that chunk of services that we used to offer. If you are on a path to becoming a web developer, do not lose hope because there are so many custom features that cannot be achieved with a basic template on one of those online tools. Do not get me wrong.

Sometimes I usually refer some clients to such services if I feel like what they want does not require a lot of coding and or customization. It is so effortless for someone to be able to do that, especially when you need something quickly. I refer some clients to such because it just seems like a convenient thing. There is no shame in saying that.

. . .

If you are someone learning or wanting to learn web development, and you were just unsure about a future in web dev, you have an amazing career in front of you, and you should definitely not stop.

How Many Programming Languages Do You Need to Know?

How many programming languages do you need to know as a developer? The main reason for this question is that most newbies see a lot of developers out knowing multiple languages or technologies, and that is the image they associate with when someone talks about a software engineer or any developer in tech. In this article, I am going to try and give my view on the subject with the hope that you will find it helpful and informative.

Now I want to start by saying that this is a very subjective topic. If you ask different software engineers, you are probably going to get a lot of different answers, and it is hard and virtually impossible for me to give an actual number on how many languages you should know. Why? There are a lot of different reasons why someone would choose to go with a specific language or a specific number of languages. Rather than me focusing on telling you to learn, say, five or six programming languages, I am going to focus on the type of programming languages that you should know and what you will gain in terms of knowledge of computer science fundamentals from learning those programming languages.

. . .

Before going into the types, I think it makes sense to discuss why you might want to learn multiple programming languages, even if you are not planning on using them to build applications or work on projects. Simply put, it makes you a better and more well-rounded programmer. I find that you learn more about programming when you learn different languages. There is no way to learn everything about programming from one or two programming languages or languages of the same type. It is valuable to learn different types of programming languages because they introduce new concepts and new features that you may not have seen before.

Another big reason is that it allows you to have a lot of tools under your belt and be able to make a better judgment about what language or technologies to use for a specific project. After all, programming languages are just tools used to accomplish a task. Ideally, you want to use the best tool for the job, and if you only know one or two programming languages, you might not even know that there is a better option out there for what you are trying to do.

. . .

There are two main categories of programming paradigms, and I am pretty sure all programming languages fall within these categories. We have either imperative programming languages or declarative programming languages. Of course, there are more specific categories within those, but first, I will explain the two main categories. An imperative programming paradigm is one in which we tell the computer how to come up with a solution. The important concept in this type of programming paradigm is how to design an algorithm in the process of finding the solution to a problem.

A declarative programming paradigm entails stating facts, asking questions, and having the computer come up with a solution for us. In this type of programming, we are less concerned with how we got that solution but more concerned with if the solution is correct and what do we need as inputs such that it gives us that correct solution. A good example of declarative programming would be something like SQL. You do not describe how you are going to come up with the query. You need only type it out, and the computer gives it to you.

. . .

Programming Paradigms Within the Context of Imperative Programming

The main paradigms that belong to imperative programming are object-oriented and procedural programming. There are a few others as well. There are many different programming paradigms, but these are, kind of, the main ones. It is worth noting that some languages implement multiple paradigms. For example, Python implements both the object-oriented paradigm, as well as the procedural paradigm.

When you look at the object-oriented programming paradigm, you will notice that the idea is to represent the program as a collection of objects that store their internal data and have external accessing parts like a method. Object-oriented programming languages use principles like encapsulation, inheritance, polymorphism, and so on.

Advantages

  • Features like inheritance can reduce redundancy and allow the same functionality to be used in multiple classes without having to rewrite it.
  • Programs are typically easy to maintain.
  • Code is easily reusable.
  • Some security benefits can be achieved through data abstraction that you cannot get in some other programming paradigms.

Disadvantages

  • The size of your programs will be quite large.
  • It takes a lot more effort to design and create programs using this paradigm. This has to do with its complexity, in general, and the larger amount of code that you need to write it.
  • The speed of programs created using said paradigm is usually fairly slow compared to programs built in something like functional programming or procedural.

When you look at procedural programming, you will notice that languages in said paradigm execute a sequence of procedures, which are usually called routines or sub-routines. In case you do not know, a routine or subroutine is simply a series of computational steps that need to be carried out in a specific order. Procedural languages usually rely on block and scope. You will see keywords like if, for, while, e.t.c and these are used to implement the control flow of the program.

Advantages

  • They do not require much memory to run.
  • They also work well with interpreters and compilers.
  • They have a simple structure and require a minimum amount of code.

Disadvantages

  • They do not protect Data very well.
  • Error catching and debugging is pretty difficult.
  • A deeper knowledge of the language and computer instructions is required to write in a procedural language.

At this point, I have covered two main paradigms within the field of imperative programming. Again, the point of this is only to give you an idea of how programming languages differ, and again, why you may want to learn programming languages that are from different paradigms in that there are different concepts, advantages, and disadvantages to them.

. . .

Programming Paradigms Within the Context of Declarative Programming

Now within the field of declarative programming, there are three main paradigms, which are logic, functional, and database. To avoid repeating myself, I am only going to cover functional and logic paradigms. The database paradigm language would be something like SQL, and you can probably imagine why that would be a declarative programming language based on the explanations I gave previously.

Logic

The logic paradigm is based on formal logic and, essentially, lines that state a fact or rule about some domain. When you want to solve a problem, you ask questions or write queries that return results about the facts that you have declared. Logic programming allows you to express knowledge in a way that does not depend on the implementation. This means that you are not really telling the computer how to solve it but simply giving it a problem you want it to solve.

Advantages

  • Facts or information is separated from how it is used i.e separated from the implementation.
  • It is useful for non-computational disciplines.
  • It is very efficient at proving the correctness of solutions.

Disadvantages

  • It is not easy to learn or use.
  • It serves a specific purpose that is not appropriate for many of the tasks that you want to achieve.

Functional

Functional programming avoids shared data, state, and any side effects using only pure functions that return values rather than modifying the state of a program. This means that functional languages rely heavily on recursion and the passing around of functions as arguments and return values. This paradigm evolved from Lambda calculus and is implemented in some popular languages like Lisp, Scheme, Scala, and even R.

Advantages

  • Pure functions always return the same result for the same input, making them easier to test, easier to debug, and easier to comprehend.
  • Functional programming also makes parallel processing and concurrent programming much easier.

Disadvantages

  • It is hard to represent or implement some notion of state.
  • Recursion is used almost anywhere, which means that there are no standard loops and a lot of people do not like that.

. . .

The main goal of this article was to share these four paradigms and to illustrate that there are many different programming languages, each with a lot of unique features and use cases. Yes, some of the languages within some paradigms are outdated, and you probably will not want to use them. That does not mean that there is no value in experimenting with them for a few hours. I will leave you with a few languages that you could learn that cover those paradigms. I am not necessarily recommending that you learn all of these. I am simply trying to give you an idea of some languages that are in those paradigms that, I think, have some value in at least looking into.

Starting with some older programming languages, Scheme and Prolog are first in line, not that I would ever use them in any real-life project. I, however, think that learning the concepts of how the languages work can be beneficial. If you are looking to get into more modern programming languages that cover some of these paradigms, I would recommend learning Python or JavaScript. They are both scripting languages, and they are both dynamically typed. So, that already gives you a good introduction to a specific type of programming language that you can do a lot of projects in.

I would also recommend learning Java because it is a strongly typed language. It is also an object-oriented programming language, and it teaches you a lot about object-oriented design, good programming habits, and ways of writing production-level code that you might not get in, say, Python or JavaScript. My last recommendation would be to learn C or C++ because they are lower-level programming languages. In C and C++, you would need to use things like pointers, you would need to learn about memory management, and there would be a lot of programming concepts that you may not have seen in languages like Java, Python, or JavaScript.

. . .

Again, these are my thoughts and recommendations. There are a lot of other paradigms out there. The ones I have mentioned in this article are the main ones people use. You can do more research before deciding on the ones to learn. You do not have to learn all of them at once. Programming is not going anywhere. You have a lot of time to stretch yourself as a developer.

3 Lies Software Developers Put On Their Resume

How many jobs have you applied to this year alone? How many jobs have you landed? Is there a common denominator? Is there an art to job applications? Lately, I have been thinking about developer resumes and whether it is good or bad to lie when applying for a developer job. First of all, I will not tell you what to do, but it is not as black and white as you would think it is. Why? There are a couple of factors that can hinder you from getting that dream job. Allow me to go through the three that I think are major.

. . .

1. Job Gaps

Job gaps are probably the most prominent things on a resume that can destroy your chances of getting a job. In my opinion, that is pretty unfair. See, when you have a job gap, people think that there is something about you that makes you unhireable because why else would you not have a job by now? It has to be something that you are doing. It has to be your fault. And that is the thing with job gaps. The longer you have a gap, the harder it is to get a job because you have been out of the industry, you are out of touch, you are all washed up just by having a job gap.

To other employers out there, having a job gap implies laziness. I am sure some of you lucky ones have had experiences with people that do not care about job gaps. For most people, employers care about the job gap. So, should you lie about having a job gap? Should you leave your last employer, even though you do not work there, as current? Again, it is not as crystal clear as you would want it to be. Here are a few scenarios that employers do not consider. Say you got fired without warning around the holidays, say, November. Companies do not hire people during that period, so you might not be able to find a job. That is not your fault, but you will probably have at least a three-month job gap, which is not that good.

What if you have a major medical procedure, and you need to take care of yourself first? What if you have to take some time off to look after your family? What if a member of your family gets sick and needs care? What if you have had a job for 20 years and you cannot land a job because you spent those 20 years working with proprietary software? I mean, these are things that you are not allowed to talk about because you also signed an NDA, and no other company has access to it. What then? In such cases, I would leave my last job as current even if I am unemployed.

“I have been freelancing for the last 6 years.” This statement does not usually go smoothly with employers these days. You will get questions, to which if you do not have proper answers, you can kiss that opportunity goodbye. Go ahead, try it. Watch them ask, “Were those freelance projects paid? And can you show us, or were they your friends’ photography website?” They will do anything to dismiss any project you did during your job gap. Also, the employers dismiss the narrative of the personal project. For some reason, they will always interpret it negatively. They always say that personal projects do not count as experience.

The way I see it, you have two options when dealing with the job gap. You can go ahead and leave the last job that you worked at as present on your resume, or you can go through the honesty route and pray that they let you in. I hope that you can manage to find a decent human that believes you and understands that life happens. But in my experience, most people do not care. Do not get me wrong. Job gaps do not apply if it is your first job in the industry. If you come from working at a fast-food joint and have a job gap to go to school to get yourself job-ready, you are safe.

. . .

2. Background Checks

Do these even work properly? Last I checked, background checks usually verify that you do not have a criminal record or something like that. They do not run background checks to check your previous employment, and I do not know how they would do that anyway. How many companies have people on their websites that no longer work there? Probably a lot.

What about when they contact your last employer, Sam? Well, the companies usually ask you if it is okay to contact your previous employer. This is a double-edged sword and a stupid mind game that companies play, in my opinion. If you choose to have them contact your last employer, they will interpret that as you leaving your previous job on good terms with everybody.

Here is the funny part about that: if they are serious about contacting your previous company, they will ask you for the phone number, right? That is where you can provide your friend’s number and have them say nice things about you, hence the double-edged sword. No person in their right mind would give the honest details, especially if you had a manager you would rub shoulders with every day.

. . .

3. Job Titles

This is a juicy one. Personally, I never put the job title that the previous company gave me in my resume. I always put a job title that reflects what I did on the job. Is this lying? Well, let’s dive a little deeper. Let’s say your title at your last job was frontend engineer, but your responsibilities were everything. Frontend, backend, design, marketing, WordPress, you name it. If your previous company was a startup, I am willing to bet that you did almost everything. So, let’s say you apply for a full-stack job, but your resume has the title of frontend engineer because that is the title your previous job gave. You know, you are qualified for this full-stack position. You did all the heavy lifting at your last job. Is it really fair that the company you are applying to assumes that your ability extends as far as your title goes?

Even if you have done way more and you know that you can do the job, you will not get a chance to explain yourself if you do not get your foot in the door. So, on my resume, I would put full-stack engineer. Is this lying? Yes. It is not what the last job gave you, but you did it for a good reason, right? It is actually better than using the title that your job gave you. It makes yourself and your abilities more transparent and gives the prospective company a better insight into what you can do. So, you changed it in a positive light, but technically yes, that is lying because it was not the last title your previous company gave you.

. . .

How About the Other End?

Think about this for a second, do you think companies are 100% transparent with you during those interviews or when they are posting for vacancies? Do you ever look at the absurd requirements? “We are looking for a passionate developer with expertise in Java, C#, C++, x86 Assembly, Python, Ruby . . . ” and the list goes on. Where on earth are they going to find a junior developer with said requirements? Finding a senior developer with those requirements alone is a challenge. Really?

Companies can lie and mislead in the job descriptions and on interviews. They can promise you that you will get to work from home and then require you to be at the office because that privilege is only for the CTO. How about the vacation period? Do they ever deliver on that? Here is the big one, the reviews. Companies will promise a yearly review or every six months, and they can say that full well knowing that they are about to go on a budget freeze and no one is getting a raise at all.

. . .

Why Do We Even Use a Resume?

The entire goal when using a resume when applying for a job is to get a conversation. A conversation will give you a chance to explain your job gap. Guess what, that conversation would not happen if you include a job gap on your resume. Let that sink in for a minute. If I think that I can do the job, I will apply, and I will do what I need to do to make that happen. If I am a perfect fit for the job, I will go for it. I am not talking about security clearance for government jobs here. I am talking about you saying you worked somewhere for two years when, in reality, you worked there for one year and eight months.

I would like you to ask yourself this question: Why are you required to be 100% transparent with a company when it does not have to do that with you? Pro-tip, you are not. It is just what good and honest people do. People like you and me, and in the end, it ends up hurting us. This is very hard to learn and understand because I want to be a good person. I want to be honest. I want to be truthful.

. . .

My Take

The truth is, like with everything in life, there is a game when applying to jobs or working a job, and there is no opting out of playing the game. You have to play the game, or you will get played. Again, I am not suggesting that you tell them that you trained monkeys for Nasa or something like that, but do not let the companies rob you of the opportunity you deserve. You have worked so hard to get to where you are. Let your job be your proof when you get in. Until then, do anything to get that foot in the door.

These are just my thoughts and feelings based on what I have seen and experienced. Sure, you can be good at what you do, but you need to prove that when you get in. I do not think it is lying. I think it is just being true to yourself and omitting the words that will get your application thrown in the trash. I am certain if everyone took the genuine route when applying for jobs, many people would not have jobs anyways. Think about that for a while. I would love to hear what you think.

Most Useful Modules Every Python Developer Should Know

Have you ever been overwhelmed by the sheer number of python modules? Have you ever been stranded on picking the one to use for a specific project? In this article, I am going to be sharing with you some of the python modules that I believe every python developer should be familiar with. I am going to categorize these modules up into four different categories to make things a little bit easier.

. . .

1. Web Development

The first category of modules that I would like to discuss is those that deal with web development in HTTP requests. Python is heavily known for back-end web development, and therefore you could assume that there is a lot of different modules available to make enterprise-level websites in Python.


Requests

Python built-in modules ( urllib and urllib2 ) are used to handle HTTP related operation. Both modules come with a different set of functionalities, and many times they need to be used together. The main drawback of using urllib is that it is confusing in that few methods are available in both urllib, urllib2. Another drawback is that the documentation is not very clear, and we need to write a lot of code to make even a simple HTTP request. To make these things simpler, most developers prefer to use request as a third-party module instead. It is an Apache2 licensed HTTP library powered by urllib3 and httplib.


Django

Django is more of a high-level Python Web framework than a module, but you have to download and install it none the less. It takes care of the stress of building web apps from scratch. The main advantages of the framework include rapid development, pragmatic design, speed, and high scalability. You can also use other languages with it. You can connect it with other frameworks, and it comes with a lot of tools and complex developer features that allow you to make well enterprise-level websites.


Flask

Flask is also a web framework that usually competes with Django. The choice of which one to use for a web app is totally dependent on the project to be built. Flask is much easier and faster to get set up, and it does not come with all of the tools that come with Django. Django is best suited for applications with heavy features like authentication. Flask can be used for basic simple web apps.


BeautifulSoup

Beautiful soup is a great module for scraping the web. So if you are doing web scraping, beautiful soup can do that for you. It provides a few simple methods and Pythonic idioms for navigating, searching, and modifying a parse tree. It also converts incoming documents to Unicode and outgoing documents to UTF-8. You do not have to think about encodings unless the document does not specify an encoding, and Beautiful Soup cannot detect one, in which case you have to specify the original encoding. Beautiful Soup parses anything you give it and does the tree traversal stuff for you.


Selenium

Selenium is used to do automation on websites. This essentially allows you to either test your websites or to make a bot that will interact with other websites. So you could do things like accessing HTML fields, move your mouse cursor around, access buttons e.t.c I have used this before when I was working on a virtual assistant that would search the web for the information I asked it to. It could access the search bar, key in the search term, then go through the different results and pick one to follow. This module is powerful when used in the right way.

. . .


2. Data Science

Python is very popular for data science. It has a lot of different modules that are available to make the life of a data scientist much easier.


NumPy

Numpy is an amazing module for doing mathematical operations in Python. So what it allows you to do is work with array-like objects of multiple dimensions, and do all kinds of complicated, three-dimensional, four-dimensional, five-dimensional, math, very fast. One of the reasons it is so fast is because a lot of its operations are implemented in C, which means using NumPy will make your program a lot faster than if you were to say not use that module and implement those operations in standard Python.


Pandas

Pandas is great for reading and working with data frames and just data in general. It makes it very easy to manipulate data. It has a relatively steep learning curve, but it is well worth the effort. Pandas deals with data processing and analysis in five steps: load, prepare, manipulate, model, and analyze.


Matplotlib

Matplotlib is used for data visualization like making plots, charts, and it is also suitable for working with machine learning models. I know Matplotlib gets a lot of negativity, but this is mainly because of the confusion it causes new users since it has two interfaces. The first is based on MATLAB and uses a state-based interface. The second is an object-oriented interface. The reasons for the two are far too long to discuss in this particular article but knowing that there are two approaches is vitally important when plotting with Matplotlib.


NLTK

NLTK stands for natural language toolkit, and it is used for doing any data processing or text processing. So if you have textual data and you want to remove things like punctuation or spaces or tokenize your data.


OpenCV

OpenCV is a powerful module that is used for many different things. Its main focus is on image and video data processing. So we can do things like feature detection and description, object recognition, and it has machine learning tools built into the module that you can use to manipulate data or work with images.

. . .


3. Machine Learning and AI

This field commands a lot of attention, especially for where tech is moving. Almost everything these days runs some machine learning code. Self-driving cars, image recognition, personalized search, e.t.c


TensorFlow

TensorFlow is by far the most powerful module in this section. You can do some powerful things with it without really having a great understanding of how all the math works ( not that you should not geek out with math ). The benefit of TensorFlow is it allows you to create neural networks and run standard machine learning algorithms. I cannot stress enough how powerful this module is for those who are into machine learning. Maybe I will write another in-depth article on this later.


Keras

Keras is a module that is actually a higher-level API for TensorFlow. This module is usually more suitable for people who are just getting started in the field. Keras allows access to some of the TensorFlow features more easily. You can almost think of it as a wrapper for TensorFlow, where it just makes it much easier to make models and do things quickly.


Pytorch

I have not used this much, but I could not leave it out. It is another leading module in terms of machine learning and AI in Python. Pytorch boasts of two main features. The first is imperative programming as opposed to symbolic programming. An imperative program performs computation as you type. This feature makes the program more flexible. The second is dynamic computation graphing as opposed to static computation graphing. This means that at run-time, the system generates the graph structure, which works best for dynamic networks.


Scikit-learn

Scikit-learn is not as powerful as the previously mentioned modules. It is a little bit lighter weight and allows us to work with some things like clustering algorithms, linear progression, support, vector machines, and others. You could do these in TensorFlow, but it would be counterproductive to use a massive module for tasks that you can do with a lighter module.

. . .

4. Graphical User Interfaces in Python

Kivy

Kivy is a great module for actually building applications that will scale to all different platforms. Any Kivy app that you build will work on Linux, Mac, Windows, iOS, and Android.


PyQt5

In my opinion, this is the best graphical user interface builder for Python. It has the most options and flexibility in terms of what you can actually do with it. You can even use CSS styling to style your application. An example of something that is built with this module is the spyder IDE. If you want to make a more complex desktop application with Python, this should be the module that you pick.


Tkinter

Tkinter is an older module. It is also used for building graphical user interfaces. It is fairly similar to PyQt5 in terms of how the interfaces look, although it is definitely not as capable. I would say it is a little bit easier for beginners and people that are just looking to get something whipped up fast and pretty easily.

. . .


These are just a few that I believe every python developer going into any of the categories must know. Python is an amazing language to work with. This does not mean that you have to use everything it comes with. Some modules are better than others when it comes to different use cases. Choose the right tool for the job, and you’ll never go wrong.

Array Methods That Every JavaScript Developer Must Know

Arrays are one of the most common things that you’re going to use as a programmer. In this article, I’m going to be covering important JavaScript array methods that are going to make your life as a developer so much easier. As an example, I am going to use a student array of student objects for all of these different array methods

. . .

const students = [
        {name: "sam", age: 26, score: 80},
	{name: "john", age: 25, score: 86},
	{name: "dean", age: 20, score: 78},
	{name: "timothy", age: 18, score: 95},
	{name: "frank", age: 21, score: 67}
] 

filter()

So let’s assume that we want to get all of the students in this list whose ages are less than or equal to 24. All we would need to use is the filter method to filter out every student that’s not under 24.


const students = [
	{name: "sam", age: 26, score: 80},
	{name: "john", age: 25, score: 86},
	{name: "dean", age: 20, score: 78},
	{name: "timothy", age: 18, score: 95},
	{name: "frank", age: 21, score: 67}
] 

/*

this filter method just takes a single function, 
which is going to have one parameter of student which 
is every student/item in the array. we'd need to 
return a true or false statement on whether or 
not we want to include them in the new array

*/

const filteredStudents = students.filter((students) => {
	return students.age <= 24        
})

/* 

This line basically stashes all of the students 
whose ages are less than a 24 in the new 
filteredStudents array 

*/

console.log(filteredStudents)

This filtered array method is super easy to use. All you do is return true or false for each item. If it’s true, it is added into the new array, and if it’s false, it is not. The great thing about the filter method and all the other methods in this article is that they actually don’t change the underlying object that you’re filtering over so we can log the students array and it will still have all its items. This is very convenient because we don’t have to worry about changing the old array when we use these new array method to create new arrays.

. . .

map()

map() allows you to take one array and convert it into a new array. In this one, all the items in the new array are going to look slightly different. So let’s just say, we want to get the name of every student. we can get an array of the names by using map().


const students = [
	{name: "sam", age: 26, score: 80},
	{name: "john", age: 25, score: 86},
	{name: "dean", age: 20, score: 78},
	{name: "timothy", age: 18, score: 95},
	{name: "frank", age: 21, score: 67}
] 

/*
the method takes a single function, with the 
students/items as a parameter here we just 
return what we want in the new array
*/
const studentNames = students.map((students) => {
        return students.name
})

console.log(studentNames)

/*
If we print out these student names, console.log(studentNames)
we get a new array that is just full of all the different
names of the students.
*/
     

This can be done with anything within the array. The method is very useful when you want to take an object for example, and just get the names or a single key, or take one array and convert it into another array. This method is one of the most popular ones in JavaScript arrays.

. . .

find()

This method allows you to find a single object in an array. This is straight forward. Say we want to find a student with the name john,


const students = [
	{name: "sam", age: 26, score: 80},
	{name: "john", age: 25, score: 86},
	{name: "dean", age: 20, score: 78},
	{name: "timothy", age: 18, score: 95},
	{name: "frank", age: 21, score: 67}
] 

const singleStudent = students.find((students) => {
return students.name === 'john'
})

console.log(singleStudent)
/*
  console.log(singleStudent) will give the everything 
  associated with john in this example, I.e

   Object {
    age: 25,
    name: "john",
    score: 86
  }
  

*/

In this method, the logic is that there is a true or false statement, and it’s going to return the very first array item that evaluates to true.

. . .

forEach()

Unlike these other methods, forEach() does not actually return anything, hence no need for a return statement. Let’s say we need to print out all the names of the students within the student array, we would go about it as:


const students = [
	{name: "sam", age: 26, score: 80},
	{name: "john", age: 25, score: 86},
	{name: "dean", age: 20, score: 78},
	{name: "timothy", age: 18, score: 95},
	{name: "frank", age: 21, score: 67}
] 

students.forEach((students) => {
  console.log(students.name)
})

/*
  the result is the name property printed out on the 
  console line after line like so

  "sam"
  "john"
  "dean"
  "timothy"
  "frank"

 */

this is going to work very similarly to a for-loop, but it’s going to take a function instead. So, for every single array item, it’s going to do execute the block of code within the function. This approach just makes working with arrays where you need to loop over items so much easier since you don’t have to write out the clunky long for loop syntax as you’d normally have to.

. . .

some()

This method is a bit different than most of our other functions in that, instead of returning a brand new array, it’s actually going to return true or false. So we can check if some of the students in this array are underage,

const students = [
	{name: "sam", age: 26, score: 80},
	{name: "john", age: 25, score: 86},
	{name: "dean", age: 20, score: 78},
	{name: "timothy", age: 18, score: 95},
	{name: "frank", age: 21, score: 67}
] 

const hasUnderageStudents = students.some((students) => {
   return students.age < 18
})

console.log(hasUnderageStudents)
/*
  this will return false because there is no 
  underage student in the array.
*/

So if any student item has an age value below 18, the function will return true. The method just checks to see if anything in the array returns true and if it does, the entire thing returns true.

. . .

every()

This method is very similar to some() except for instead checking for at least one item to evaluate to true or false, it checks to make sure every single item falls under a given condition.
if I use the same code used in the some() code example,

const students = [
	{name: "sam", age: 26, score: 80},
	{name: "john", age: 25, score: 86},
	{name: "dean", age: 20, score: 78},
	{name: "timothy", age: 18, score: 95},
	{name: "frank", age: 21, score: 67}
] 

const hasUnderageStudents = students.every((students) => {
return students.age < 18
})

console.log(hasUnderageStudents)
// this returns false because there are no ages below 18

If I am to change the condition to one which every item evaluates to true, the whole thing returns true

const students = [
	{name: "sam", age: 26, score: 80},
	{name: "john", age: 25, score: 86},
	{name: "dean", age: 20, score: 78},
	{name: "timothy", age: 18, score: 95},
	{name: "frank", age: 21, score: 67}
] 
const hasUnderageStudents = students.every((students) => {
  return students.age < 40
})

console.log(hasUnderageStudents)
// this will return true because every single age property is below 40

. . .

reduce()

This method is quite different than all the other methods because it is actually doing some operation on the array and returning a combination of all those different operations. Let’s say I wanted the total scores for all the items in the student array, normally one would go for a for loop and add the score every single time, and at the end of the loop, you would print out the total score. To avoid the long process, you can use the reduce() method to do this.


The syntax for the reduced method differs from the other methods. Instead of taking the array itself, it takes an array and a property for what we want to reduce everything into and in our example, score. it also takes a second parameter aside from the function, which is going to be your starting point, and in our case, we want to start our total at zero.


const students = [
	{name: "sam", age: 26, score: 80},
	{name: "john", age: 25, score: 86},
	{name: "dean", age: 20, score: 78},
	{name: "timothy", age: 18, score: 95},
	{name: "frank", age: 21, score: 67}
] 
const totalScore = students.reduce((currentTotal, students) => {
  return students.score + currentTotal
}, 0)

console.log(totalScore)
  • As the code reads, we have the reduce() method, which runs a function on every single item inside the array.
  • The first parameter of that function is going to be whatever the previous iteration of this array returned and the second parameter is the actual item in the array.
  • The currentTotal is going to start on the very first iteration with whatever we pass in as the second parameter of the reduce() method which is zero in our case.
  • The first time this reduce() method runs, so we get zero and the ‘sam’ item. So it just does 80 plus zero and returns that, which is 80.
  • The second time the method runs, that return value of 80 becomes the current total, and our next item is ‘john’, so it does 86 plus our current total of 80, which is 166, and puts that back in for the current total. It does that until we get to the very last item in the array, which will output as the total in the totalScore variable.

This method is a bit more confusing, but it is incredibly useful when you need to do some kind of operation cumulatively to all the items in an array, such as grabbing the total price for all the items, daily stock prices e.t.c

. . .

includes()

This method doesn’t take a function as an argument. It takes a single argument. It is usually used in simple arrays that don’t need a lot of heavy operations. Let’s say you have an array of fruits, const fruits = [ ‘mango’, ‘apple’, ‘orange’, ‘pineapple’, ‘lemon’]. a simple way of showing the implementation of the includes() method would be to check if a certain fruit is in the array.


const fruits = [ 'mango', 'apple', 'orange', 'pineapple', 'lemon']

const includesApple = fruits.includes('apple')

console.log(includesApple) 
/* 
this will return true because 'apple' is 
one of the items inside the array. 
*/

. . .

In my opinion, these methods are a must-know for any JavaScript developer because arrays are one of the data structures that are most commonly used for organization. Having a good grasp of these methods will greatly improve your skills and problem-solving ability when it comes to arrays.

Should You Learn TypeScript?

I have been putting writing this article off for a while now, but I thought it would be nice to share my thoughts on TypeScript as something that you might want to add onto your belt. TypeScript is a fairly new programming language. Since 2012, the language has become massively popular to the point of taking over front-end development, especially in large applications. Simply put, it is an enhanced version of JavaScript.


The relationship between TypeScript and JavaScript is similar to that of C and C++. The nice thing about TypeScript is that it is interchangeable with JavaScript. Any TypeScript code can be transpiled and translated into native JavaScript. You can therefore use the JavaScript that you already know inside of TypeScript. Most developers are adopting the use of TypeScript because you can use all its features, then translate into a native JavaScript file when you need to run it. Doing this may seem redundant at first because you can do a lot with plain old JavaScript, but TypeScript has better features.


TypeScript shines when it comes to large scale projects and enterprise-level applications. The use of TS should be judicial though because it would be a little bit of an overkill to use it for small side projects or an application where you merely have one or two JS files. I think one should reserve its use when you get to a point where you have a lot of structure involved in your program.

If you know JavaScript, you pretty much already know TypeScript, anything you can write in native JavaScript, you can write in TypeScript almost line for line. The core features it adds is the ability to add static typing to JavaScript. This feature does not change the fact that JavaScript is a dynamically typed language, nor does it change anything during runtime. It just means that when you are writing TypeScript code, you have type enforcement and you can choose if you want to declare the type of variables, method, parameters, return types, whatever it may be. The reason static typing is so important is that it comes with so many different advantages.


When you have static typing, and you have type reinforcement, the first thing that is a big deal is that catching errors becomes a lot easier. In dynamically typed languages like Python or JavaScript, almost all your errors are happening at runtime. That raises a lot of issues because you have to figure out what the problem is at runtime, which is more complicated than before, at compile time. There are also chances that you may miss errors because they just have not run yet. Take Python as an example, you can write some random code that makes no sense, but it will still run. Unless you hit that line of error-prone code, you may never know that that error exists, which is the same as in JavaScript.


When you have TypeScript, about 90% of the errors that you are commonly getting in a dynamically typed language, will be eliminated. How? In TS, the errors will be visible to you before you can even execute the program. You are going to have to fix the errors even before running your code. Without TS, you are going to have to debug your code at runtime that will require the use of a debugger which you might not have access to. This becomes hard for the most part when you are dealing with a large scale software, that is going out to millions of people. You want to make sure that you are catching all those bugs, especially any detrimental ones, and that you are getting them in your IDE before you go to the software. The idea is to give your IDE more information about your code so that it can do more work for you. Think about it this way. If you can have your IDE carry a lot of the weight, you will be saving yourself time and probably a bit of money too, especially if you are paying employers to code.


TypeScript comes with a bunch of other great features too, but the one I wanted to dial in on here is “typing”. Some people might think that it is going to be hard because you have to declare the types. It is not very difficult. The thing to take home here is that using this technology is entirely optional. If you are in a situation where it does not make sense to use it, you do not have to. In my opinion, TypeScript is a great language. It is an easy language to pick up specifically if you already know JavaScript. It just makes things way more powerful.


I have seen people online saying that it takes a little bit longer to write because you have to put the types. It is true, but I think that that is a marginal difference. I believe the types are just way more beneficial than they are harmful, and I would encourage all of you to look into TypeScript. Do not be intimidated by it. If the doubt comes along, just remember that TypeScript is just JavaScript on steroids. It is a great language to add to your resume because it shows that you are keeping up with trends. If you are already familiar with JavaScript, why not?

7 Best Practices for a Better Experience with MySQL

MySQL is the very first database I learned when I was starting my journey. I have been using it for a while now, and there has been a lot of things that I wish I knew the day I started using MySQL. I decided to write this article in hopes that it will help other beginners trying to learn MySQL. These are the seven simple tips I have used along the way that helped me become successful with MySQL

. . .

Use Indexes

Using indexes properly can drastically speed up the query times of your application. The trade-off is well worth it. You will have a slight increase in storage requirements and a slight decrease in write speed. Being able to do this will help you stand out in an organization that has a database that is not indexed at all I have heard of some debate around this. Some only use it when they need to. I cannot give a thumbs up or down to that because, ultimately, it all comes down to preference. However, in my experience, I have noticed that I prefer using them.

Normalize your data and use joins

This practice involves storing your data separate from one another and then referencing that data with foreign keys. Now, imagine you are making a blog, so you have a post table, and in that post table, you have a post_id and a title. At this point, it might be tempting to store just the author name. Instead of that, why not create an author’s table and then store the author_id in the post table? I mean, rather than just querying on the post table, you can query on the post table and then join the author’s table onto the post table. By doing this, you have set yourself up so that when you add additional fields to the author’s table, it will be available immediately in the query. Another upside is that if a piece of data changes for an author, you don’t have to update anything in the posts.

Use of InnoDB

There are only two storage engines with my SQL that people use a lot. And it is MyISAM and InnoDB. MyISAM is going not as widely used, so you are going to want to use InnoDB because it is an all-around better engine. Besides performing better and the fact that your data is more durable, you also have access to transactions. This is something that MyISAM does not have, and in 2020/2021, that is something you need for your database.

Enforce data integrity at the database level

For this, you are going to want to use things like unique constraints and cascade deletes. A lot of times, it is compelling to do things in your application that you should be doing in your database. Cascading deletes can be best demonstrated in the earlier used post and author’s table example. Imagine you have an author_id x. If you were to delete that author, then it would look in the post table and delete all the posts with author_id x. The reason cascading deletes is crucial is because if you do not cascade delete, the post table will have posts that do not have an attached author. Keep in mind that you can also do this in your application. At the time you delete one record application, you could also query for all the posts and then delete those as well. It is best handled at the database level. This is because application logic can break but database constraints cannot.

Log queries in development

It is great to see queries happening in real-time. It can help you a lot while you are developing. To log queries, edit the “my.cnf” file like so:


Create a log file:


general_log_file = /var/log/mysql.log


Then do:


general_log = 1


This will make sure every time a query happens to the database, it will show up in that log. Just make sure you do not do this in production because it will add strain to your database.

Use consistent naming

It is typical to use short, easy to type field names, but whichever format you do choose do it everywhere. Variability and inconsistencies often lead to confusion, error and loss of time. It is not uncommon to come across tables and columns cluttered with abbreviations or shorthand that may be insightful to some, but enigmatic to others. Again, you do not have to adhere to someone else’s ideal conventions. Implement those that make sense to you and your team. Whether it be the addition of a prefix or inclusion of the application name, be sure those standards are consistent.

Use transactions for bulk insert

The reason for the use of transactions is because every time you insert a record, the table has to re-index. When using a transaction, you get one re-index at the end of the transaction. So if you insert 15,000 records, you get one re-index at the end of the 15,000. Whereas if you insert 15,000 individual records, you get 15,000 re-indexes. And the performance boost is significant. Without using transactions, you may get hundreds or thousands of records per minute. With using a transaction, you are going to get tens of thousands, if not hundreds of thousands of records per minute.


Example:

five re-indexes ( instead of doing this )


insert into value x (default, 1);
insert into value x (default, 2);
insert into value x (default, 3);
insert into value x (default, 4);
insert into value x (default, 5);


One re-index ( best way )


start transaction;
insert into value x (default, 1);
insert into value x (default, 2);
insert into value x (default, 3);
insert into value x (default, 4);
insert into value x (default, 5);
commit;


This has the added benefit of making all your data available immediately at the end. If you were to insert a hundred thousand individual records, the hundred thousand records would slowly insert, and they would be visible to your application. If you do it in one transaction, a hundred thousand records appear instantly at the end of the transaction.


When you get comfortable with MySQl, you will notice how easier it becomes to work with other databases.

Skills You Should Have Before Learning A JavaScript Framework

How much JavaScript should you know to move on to a framework? I get this question a lot from beginners in the field of web development. This article is just a simple guide on the skills that I recommend learning before jumping into a framework like React, Angular, or Vue. These frameworks are all different, but certain things are used in every single one of them, and if you learn these skills beforehand, you will have much less trouble grasping the concepts of a particular framework.


First of all, every beginner should have the fundamentals of JavaScript before moving to a framework. They include basic syntax variables, arrays, objects, functions, loops, all the other concepts that you would learn when you’re starting to learn the language. With most frameworks, you do not directly touch the DOM. However, I would still recommend learning how to manipulate it if you ever want to build something in pure vanilla JavaScript.
One problem I have seen is that people want to jump right into a framework after learning the fundamentals. I think that is a big mistake because not only are they attempting to learn the concepts of the framework, they are also learning all of ES6 at the same time. Things like classes, arrow functions, destructuring. The problem with this approach is that they will not be able to identify what is part of the framework and what what is JavaScript.

. . .

Modules

Modules are used in every framework because they are used to import files into other files or to import packages. Without modules, there would not be any framework because modules allow everything to work together instead of having isolated code files. There are different types of modules, but you want to focus on ES6, which is the “import-from” syntax. Angular uses TypeScript, which has many of the same features that ES6 has including modules. So if you learn ES6 modules, you will be fine with TypeScript.


Modules are not supported in browsers directly, therefore, you have to use some kind of tooling, like Parcel or Webpack with Babble if you want to be able to compile modules. I am not going to say that you have to learn how to do that before moving to a framework, but I would suggest at least reading about modules a little bit, looking at the syntax, maybe watching a tutorial before you move on to learning a framework.

. . .

Classes

Classes are introduced in ES6. Classes are used in many languages and you may even be familiar with classes from another OOP language. Classes are more commonly used in React and Angular. Vue uses object literal types. I would suggest learning classes, even if you are learning Vue. Learn how to structure them, learn about constructors, methods and properties, instantiation, as well as extending classes and inheritance.

. . .

Arrow functions

Arrow functions will make your code much more compact and clean, even though there are many situations where you will not need to use arrow functions. In my experience, they are the norm when it comes to building applications with these frameworks. It is cleaner, requires fewer lines of code, and there can also be advantages within scope because it uses something called a lexical this, so you want to look more into that.

. . .

Promises

ES6 introduced promises as an alternative to using callbacks for asynchronous code. If we make a request to a server or anything that could take a while, we want to do it asynchronously so that we can move on with our application and not have to stop and wait for a response. This is achieved through the use of promises. In simple terms, they make a promise and then fulfil it when the task is done.


When a promise completes, you want to use .then() to catch the response and get the data back and then .catch() to catch any possible errors. You may also want to look into Async/Await syntax, but I do not think it is necessary to be able to use a framework. You will also need to learn how to use the fetch API to make HTTP requests. There are other tools like Axios that you can use, but it is good to know how to do this with vanilla JavaScript.

. . .

Destructuring

Destructuring is a powerful way unpack values and assign variables from objects and arrays. It makes your code cleaner. Most developers prefer using it in applications built with said frameworks. Keep in mind that destructuring is part of ES6 and is not compatible with every browser. I recommend using Babel, Typescript, or anything that will compile your code into ES5 to ensure full compatibility for every user.

. . .

Components and State

When you first learn basic HTML, CSS, JavaScript, you are taught about separation of concerns. You have your HTML markup, your CSS styling and your JavaScript for any dynamic type functionality. So you select elements from the DOM and manipulate them in a monolithic way. With frameworks, it is a little different in terms of how you think of the mechanics of your application. You want to think of pieces of your user interface as components. View the menu bar, search bar, the main content, whatever it may be, as encapsulated entities that include both the markup and the functionality, and in some cases, the styling.


Each component has its own state, which is usually the data that is associated with it along with the just its state of being. So for example, you might have a menu component that has a state of open and the state of close so that if you click it, maybe it opens up and closes if you click it again. You will have that in your state. That is how you should start thinking in terms of your UI when you’re dealing with frameworks. In a lot of cases, you are going to want to share data or share state. That is when you look into things like Redux in case of React for state level management.

. . .

Spread Operator (…)

This is important, especially when dealing with State. State is usually immutable, which means it can not be directly changed. What usually happens is you have to make a copy of it and add what you want, and then send it down to the application or the component. The spread operator allows us to do that. So here’s a really simple example. So let’s say we have this user state that just has one property of name it is equal to Samuel, and we want to add an age property to this user state.


const userState = {
name: ‘Samuel’
}


What we could do is create a new user state, and we can use the spread operator, which is just three dots and put in user state, and it will give us whatever is original user state. It will make a copy of the original, and then we can add the age property to it like so,

const newUserState = {
…userState,
age: 26
}

. . .

Higher-order array functions

There are a plethora of such functions in JavaScript. Some of the common ones include forEach(), map(), and filter(). A higher-order function is a function that takes another function as a parameter, but these all have to do with arrays, iterating through them and manipulating data. forEach() is probably the most basic. It is used for iteration like a for-loop return. It loops through an array and you can do what you want with the array items.


map() is heavily used in React, and it is used to create an array from another array. You may have an array of user objects and let’s say there is an age property, among others. If you want to create an array of just their ages, you can do that with map(). filter() which will, as the name suggests, filter items out based on a condition. It is mostly used in reducers and state management.

. . .

I think once you get a good grasp of those things, you will be ready to learn any front end framework. You will also be able to pick up a second or third faster. In JavaScript, it is never about how many frameworks you can use. Some developers actually prefer pure vanilla JavaScript. Take your time understanding these concepts. Don’t just gloss over them, practice using them on some side projects. You will get better in no time and you will be ready to jump, headfirst, into a framework of your choice

5 Design Patterns Every Developer Should Learn

In tech, most developers tend to think about a career progression as junior to senior, to lead, to architect and so on. To some extent, I think something is usually missing from that progression, technical proficiency. One can describe it as going from a consumer to a creator. Think of it like using something like React or Angular in the beginning, and then moving up that technology proficiency chain. From where you are just consuming that framework to where you end up creating a framework that is used by other developers, and they become your consumers.


To get to that point, you have to build up your skill-set, and you start with basic proficiency in your language of choice. From here, you work up to data structures and algorithms, and finally into design patterns. Design patterns are general, reusable solution to a commonly occurring problem within a given context in software design. They are reusable, extensible, and are of industry standards. In this article, I am going to go through five different design patterns that I believe every developer should learn.

. . .

Singleton Pattern

This pattern involves a single class which is responsible for the creation of an object while making sure that it is the only one created. This class provides a way to access it, which can be accessed directly without the need for instantiation of the class object. The most common reason for this is to control access to some shared resource.


As an example, the pattern may come in handy when doing things like a database driver. If you are over on the client, it comes in handy when you want to know the current state of the app that is in a Singleton. The advantage is that you can go and get to that data anytime that you want. The disadvantage is that once you have added that constraint, instead of everybody being able to go and access it directly, you have got narrow down to whomever the consumers are.


This pattern is one of the most misused. Singletons are for use when a class must have exactly one instance, no more, no less. Some developers frequently use Singletons in an attempt to replace global variables. For intents and purposes, a Singleton is a global variable, in that it does not do away with the global variable, it simply renames it. The use of a Singleton is uncalled for if it is simpler to pass an object resource as a reference to the objects that need it rather than letting objects access it globally. You, therefore, have to know and make sure that you are using it the right way and at the right time.

. . .

Facade Pattern

Simply put, this is a structural design pattern that provides a simplified interface to a library, a framework, or any other complex set of classes. A facade in the real world would be the front of a building, which it hides all of the internal mechanics of the building. These would be the insulation, the rooms, the plumbing, the wiring e.t.c. The facade pattern gives you the ability to put a nice external veneer on your app. Take a compiler as an example. It has a parser, a lexical analyzer, a tokenizer, and all kinds of fun stuff that no consumer sees.


The advantage of using this pattern is that it gives your consumer a good interface. You can also choose to allow your consumers into the internals if you wish. One of the things to watch out for is the possibility of an oversimplification. You may end up oversimplifying the interface of that compiler that it is no longer usable or valuable. Another thing is over verticalization. You may end up creating a facade that is so specific to a single use case that it is no longer generalized enough to be generally useful.

. . .

Bridge Pattern

This design pattern that lets you split a large class or a set of closely related classes into two separate hierarchies which can be developed independently of each other. Another way of explaining this is progressively adding functionality while separating major differences using abstract classes. A problem that requires this pattern occurs because sometimes developers try to extend subclasses in two independent dimensions. That is a common issue with class inheritance. The Bridge pattern attempts to solve this problem by switching from Inheritance to the object composition.


This pattern involves an interface that acts as a bridge between the abstraction classes and the implementation classes. In a development example, the bridge interface would be something like an API. This approach simplifies code maintenance and minimizes the risk of breaking existing code.

. . .

Strategy Pattern

This design pattern lets you define a family of algorithms, then put each of them into a separate class, and make their objects interchangeable. Consider a scenario where you have a code that is going to go and find customers, filter through them and then send out notifications to them via email and text. You can use the strategy pattern to significantly clean this up by taking the mechanics of getting access to the customer records, sending out the messages and emails, and then creating that as an infrastructure layer. Factor out the filtering of those customers into one strategy, which is the strategy that helps you find the target customers you want. Take the notification strategy as a different strategy which helps to decide when, where and how you want to contact those customers. You can then use that library or that system in a whole bunch of different scenarios, and it becomes much less stressful.

One thing you got to look out for on this is to make sure that you have decent default strategies. So in the case of our refactoring, we go and take the existing logic around the customer filtering and the customer send-outs and turn those into the default strategies, which people can extend later. Otherwise, you get a system whereby default, you are asked to do a lot up front, and no customer wants to do that.

. . .

Observer Pattern

This pattern is the most popular by far because it is almost everywhere. It allows for loose coupling between the publisher, that is creating events and the subscriber or subscribers that are listening for those events, and you can use it anywhere. The con on this particular pattern is that you can go overboard with it. If everything is communicating by events, you can get into nasty event loops, which make the code hard to debug and it just gets chaotic.

There are a couple of solves for this. One, do not use the same message bus for everything, have a specific purpose for each message bus. Two, keep these systems localized. If you are on the client and you have got a button, and it is an admitting and event, you are good to go. You do not need to go beyond that.

. . .

So again, as with all, all of these patterns, use them wisely but use them because most people understand those systems when they see them. For people, who are interested in learning the design patterns, these are just 5 to get started with as you get your feet wet. There are more patterns out there, and many tutorials online that can help you get a good grasp of the different ones.


Do not just learn or read about the different patterns, practice them at least in small projects. The ability to see where specific concepts might be useful in larger codebases comes only with practice, experience, and time. Do not be in a hurry to get as many as you can under your tool belt. If you do not get a pattern instantaneously, look for different explanations and tutorials online, and you will get the hang of it after investing time to research.

The Beginner’s Guide to Web Development: Starting Out Right!

Are you stuck wondering where to start? It is hard to find the right advice without suffering from information overload.
In this article, I have laid out all the basics you will need to learn web development. With this, you will have an understanding of the basics of web development and what skills you need. I will take you through the basics step by step. I recommend learning the basics of both the front end and back end before specializing.

. . .

Do You Have an Understanding of the Subject?

Before getting your feet wet, you will need to understand some general concepts like how websites work, the difference between the front end and back end, and the use of a code editor.


If you strip a site down to its core, you will notice that it comprises of a bunch of files stored on a computer called a server with an internet connection. You can then load that website through a browser, which is referred to as the client in this situation. So every time you are on the internet, you, the client, are loading data from the server as well as submitting data back to the server. This back-and-forth between the client and the server is the basis of the internet.


Web developer roles typically fall into front-end, back-end, and full-stack. These terms describe what part of a client-server relationship will be your specialty. Front end means that you work mainly with the client side. The back end is a part of the website that handles a lot of the logic and functionality that are necessary for the website/web app to work. Both front-end and back-end web development serve separate but critical functions.


When you build a website, one of the tools that you will use is your code editor or IDE ( integrated development environment ). This tool allows you to write the markup and code that will make up the website. There are quite a few good options out there, but currently, the most popular editor is VS Code.

. . .

Basic Front End

HTML, CSS, and JavaScript files are what make up the front end. The browser loads these files on the client side. HTML (hypertext markup language ) is the foundation of all websites. When you look at a website, the HTML file contains all the content on the page, and it uses tags to denote different types of content. For example, you can use text to create headline titles, paragraphs, bulleted lists, images etc.


HTML tags by themselves do have some styles attached but are pretty basic. CSS (cascading style sheets) lets you manipulate that HTML content so it looks more appealing to the viewer. You can add colors, custom fonts, and lay the elements of your website as you wish. People sometimes tend to gloss over CSS so they can move on to things like JavaScript, but it is good to note that there is much more depth to CSS than what meets the eye.


JavaScript is a programming language designed to run in the browser. Using JavaScript, you can make your website more interactive. For example, you can build a pop-up that shows the menu links when a user clicks it.

. . .

Tools to Get Familiar With After the Basics

Now that you know that HTML, CSS, and JavaScript are the basic building blocks of front-end web development, there are a few other tools that you will want to learn before going forward.


Package managers are online collections of mostly open source software. Each piece of software — usually referred to as a package — is available for installation and use in your projects. Think of them as plug-ins. Instead of writing everything from scratch, you can use helpful utilities that other people have already written. The most popular package manager is called NPM (node package manager). You can also use another manager called yarn. Both are good options, but as a beginner, it is probably best to start with NPM.


In addition to package managers, you will need to become familiar with module bundlers and build tools for they are another essential part of the front-end workflow for running tasks and processing files. You can use them to compile your SASS files to CSS, transpile your ES6 JavaScript files down to ES5 for better browser support, run a local web server, and many other helpful tasks. The most popular tools that you are going to come across a lot are gulp, Webpack, and parcel. You will have to choose the one best suited for your project.


The next thing to learn about in this stage is version control. Version control keeps track of every code change that you make in your project files. You can even revert to a previous change in case you make a mistake. The most popular version control system is an open source system called Git. With Git, you can store all your files and their change history in collections called repositories. You may also have heard of GitHub, which is an online hosting company owned by Microsoft, where you can store all your Git repositories.

. . .

Going a Little Deeper

At this point, you have a choice to either delve into additional front-end skills or learn about back-end web development. If you choose to go deeper into front-end, there are some more intermediate skills that you will want under your belt. I recommend that you look at SASS, responsive design, and a JavaScript framework. SASS is an extension of CSS that makes writing styles more intuitive and modular. With SASS, you can split up your CSS into multiple files for better organization, create variables to store colors and fonts, and use mixins and placeholders for reuse. Even if you utilize just some of the basic features like nesting, you’ll be able to write your styles quicker and with fewer headaches.


Responsive design ensures that your styles will look good on all devices. The core practices of responsive design include using flexible sizing for elements as well as utilizing the media queries to target styles for specific devices and widths. Building your website with responsive CSS is a must these days since mobile traffic is outpacing desktop traffic.


After getting the basics of vanilla JavaScript down, you may want to learn one of the JavaScript frameworks — especially if you are looking to be a full-stack JavaScript developer. Frameworks come with prebuilt structures and components that allow you to build apps quicker than if you started from scratch. Currently, you have three main choices: React, Angular, and Vue. React, which is technically a library, is the most popular framework right now. The truth is, there is no best framework for everything. There’s rarely a single choice that is 100% the best choice for every person in every situation. The framework you chose will depend on either your job or your comfort level.


Don’t worry too much about which framework to choose. It’s more important that you learn and understand the concepts behind them. Once you get a handle on one framework, it will be much easier to learn other ones after that.

. . .

Back End

Three main components make up the back end or server side of web development. The server, a server-side programming language, and a database. As mentioned at the very beginning, the server is a computer where all website files, the database, and other components are stored. Traditional servers run on operating systems, such as Linux or Windows, and are centralized because everything is stored all together on the server. These days, there are serverless architectures, which are a more decentralized type of setup. This type of application puts up those components and leverages third-party vendors to handle each of them. Despite the name, though, you still do need a webserver to at least store your website files. Some examples of serverless providers are AWS and Netlify.


Serverless setups are popular because they are fast, cheap, and you don’t need to worry about server maintenance. They’re great for simple static websites that don’t require a traditional server-side language. However, for very complex applications, the long-established server setup might be a better option on the server.


To write the functions and logic for your application, you need a programming language. The server will compile your code and convey the result back to the client. Popular programming languages for the web include PHP, Python, Ruby, C#, and Java. There’s also a form of service-side JavaScript, Node.js, which is a runtime environment that can run JavaScript code on the server.


Finally, you’ll need to learn about databases. Databases, as the name implies, are where you store information on your server for your website. Most databases use a language called SQL, which stands for Structured Query Language. Data resides in tables within the database, sort of like complex Excel documents on which one can write queries in SQL to create, read, update, and delete data. The database is run on the server using servers like Microsoft SQL Server on Windows servers and MYSQL for Linux.


There are also no-SQL databases that store the data in JSON files as opposed to the traditional tables. One type of no-SQL database is MongoDB, which often goes hand in hand with React, Angular, and Vue applications.

. . .

Conclusion

As a beginner, I would recommend you start your journey into web development following these steps. From here, you’ll learn different stacks should you want to go deeper down the rabbit hole. Happy coding!