Programming

These four points helped me the most as a developer

Image for post
Image for post
Photo by Alexey Suslyakov on Unsplash

1: Please, be consistent

Nothing is more confusing than seeing code where there is no consistency. All the things like; formatting, casing, name conventions, documentation. It could make your life easier if they are consistent. Try to do everything in one way, and make conventions/guidelines with your co-workers. So you will generally continue to do this the same way. But for example, when reviewing each other’s code, try adapting their approach and the way they do things to understand each other.

2: Ask for help on time

When dealing with something difficult, try to ask for help on time. I made this mistake too often in the past, and be struggling for hours. Timebox something and spend a maximum of 30 minutes. If you didn’t found a solution on time, try to rehearse the problem in your head before asking. Most of the time you discover the answer your self. Still no solution? Ask a colleague to view the problem. An outsider has other insights and speeds up problem-solving. …


Programming

Array methods push, shift, unshift, pop, reverse, splice, sort, copyWithin, fill — simple examples

Image for post
Image for post
Photo by Devin Avery on Unsplash

An overview of only the array methods that can mutate the original array. Some of these are already well-known, and some of them aren’t used as often. Let’s get through them all, without difficult explanations.

Note: this also applies for TypeScript

Adding items

1 — push

The most well-known method is push. In the example below, we have an array of two names (strings). With push, you add an item to the end of an array.

const array = ['John', 'Jeroen'];
array.push('Peter');
console.log(array);// ['John', 'Jeroen', 'Peter']// You can also add more arguments by separating them by a comma. E.g. array.push('Bob', 'Alice').

2 — unshift

With unshift you can add an item to the beginning of an array. It is called unshift because it’s the opposite of shift (which I explain later). …


Programming

Save a lot of time writing manual documentation

Image for post
Image for post
Photo by Kaleidico on Unsplash

As a developer, you should have heard of the term ‘DRY’ — Don't Repeat Yourself. You should avoid writing the same sentence over and over. This doesn’t only apply for code but also for documentation. And who wants to write basic documentation for fun?

To improve and speed up contribution to a project, you need documentation. Every project you worked on, has some kind of basic Markdown documentation:

A README to describe what the project is about, how to install and start the project.

This could be a Pull Request template to instruct contributors on how to set up a pull request. …

About

Jeroen Ouwehand

🔥Writing new articles every month — Software Developer from The Netherlands — Twitter/Github: Jeroenouw

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store