The unit test is the test category with the finest granularity based on the test pyramid. Usually, it is focused on the functionality of a class, function, or a UI component and isolated from the external system like databases and third-party API.
Most of the time, the challenge of writing/refactoring code is to make sure that you do not break existing functionality. Prior to having unit tests, developers would need to tests the changed class/function manually in a black-box manner to make sure nothing goes wrong. Manual work is error-prone. Developers might forget some test cases and the buggy code is shipped to production. Having unit tests and having them configured properly on your deployment pipeline will save you from such scenarios. …
2 Cents From Me About Getting Tech Job Abroad
Hi, my name is Danang, and I am an Indonesian. For the past year, I’ve been living and working in Munich, Germany as a software developer. Before I moved here, I worked in a tech company in Jakarta and spend some time doing freelance jobs for about 1,5 years.
Pro and Cons Living and Working in Germany
Designing a reusable React component is definitely a challenge as, often, we work in a team and the user of our component is not only us but another developer as well.
Also, the bad abstraction would surely bite us back one day if not taken care of properly. I like to use word design here because the design process is the thinking and contemplating phase that happens before we do the actual coding part.
Ideally, we want to spend time designing before we do the actual coding.
This article will discuss common practices and principles we can apply to design a maintainable and developer-friendly React component. …
I consider myself a self-taught developer, even though I had some programming courses back in college like basic algorithm and data structure, object-oriented programming, database, software engineering, and integrated programming. (I have a degree in Information System and Technology, by the way, not computer science.) Unfortunately, I didn’t pay attention back then because I used to hate programming so much, (guess what? Now I’m a front-end engineer, joke’s on me) so I had to learn everything from scratch.
The world of software development is vast and complex. I had a hard time at the beginning of my career because I didn’t have a clue about the essentials for software developers (I didn’t even know what to look for). …
I was playing around with redux-saga, redux-thunk, and redux-observable, when I realized that Redux middleware could be a whole new topic because these libraries (especially redux-saga and redux-observable) rely on the implementation of Redux middleware.
If you are not familiar with Redux, I would suggest taking a look at the official documentation and taking notes of Redux’s main concepts:
Please take a look a the sample code below:
In short, what happened here is that we’ve created the store using the
createStore function from Redux which receives the
reducer function as an argument. …
This is definitely the classic way of building a ToDo App in React.
And this is how we do that using React Hooks.
Pretty neat, right? We can build the same App using only functional component.
Wait a second. This way, the onChange function will be re-created every time this component re-render right? Yep, that is totally right. I did a small experiment to prove this. Please check this code sandbox.
Who doesn’t want to be happy? Everybody wants to be happy and deserves to be happy. I was unhappy with my life, for quite a long time. Or maybe I think I was okay, I was fine, but the truth I was not. The past year had been quite adventurous for me. Please do not think that my adventure looks like Julia Roberts in Eat, Pray and Love, or doing backpacking and traveling around the world. Nope, it was nothing like that. It involved a lot of reading, self-reflection, thinking, and working. Sounds boring, but it works.
What is exactly the main source of our happiness? Is it gift? Affection? Money? Gift would definitely make me happy. Affection would also make me happy. Good food also made me happy. But the happiness would not last long. How about achievements? I got accepted in favourite college in Indonesia and graduated with a good GPA but I didn’t feel really happy about it. I was not sad tough. I wasn’t sad or happy at the same time. …
Writing sucks because like other skill, it need practice. I really wanna be good at writing something, but getting it out my mind is so difficult. Sometimes I think I got a great idea, but when I start to write it down I can only explain and elaborate it in no more than 3 paragraphs. I thought the idea was so shallow that I had difficulties in exploring it into interesting and mind challenging topic.
The other times, I just get the random idea, then I thought, let’s get over with it, just write it down!
Then it turns out didn’t very well, because it lacks of this depth and perspective in my opinion. Well, I read quite a lot of amazing article on medium and I think I still got a very very long way to go. …
This is my first writing in Medium, and I am going to share some of my most embarrassing mistakes in my life. What is important for me is that I just realize that those things are embarrassing and definitely not small mistakes recently. Here they are :