Posts

Get started Oracle DB Express for development

Image
Oracle database is a Relational database developed by Oracle, Oracle DB provides high performance with failure recovery features, easy to manage the database, and has a good reputation for supporting Enterprise level applications. For you database admin or software developer that are newly using Oracle database, you can follow this simple get started guide. Follow each one of the instructions from installation to launch and create a new database table. Download and install Oracle DB Download the oracle database express edition from the following link : https://www.oracle.com/database/technologies/xe-downloads.html When the installation process is running, then you should set the default password that you will use for login. Login using SqlPlus Open terminal or command prompt and type "sqlplus”. Then enter the username SYSTEM and password you choose on the installation step earlier. Create new user Before the SYSTEM user can create new user, you have to execute this command: alter

Upload and Download Rest API using Spring Boot Reactive WebFlux

Image
Reactive Spring Logo This is maybe a very simple task, but for those of you that may not be familiar with WebFlux found it difficult to create a Rest API that handles upload and download in Reactive spring application. Create the skeleton Spring project Create a new project, go to start.spring.io , on the dependencies section, add Spring Reactive Web. Generate and extract it into your desired project location. Instead of using spring-boot-starter-web, use spring-boot-starter-webflux instead in your pom.xml. Here’s the pom.xml for our Reactive Rest API project. Create our Rest controller Now that you have set to use WebFlux instead of the usual web, we have to change a little bit in the Controller class that handles the API endpoints. It doesn’t change much but you have to wrap the Response in Mono and the request parameter to FilePart. So our upload and download file controller will look like this. Create utility to handle file upload We need to structure our project better, so we cr

Spring Kafka - how to use ReplyingKafkaTemplate send and reply synchronously

Image
Microservice Spring with Apache Kafka Kafka is an asynchronous messaging queuing system, but when you have a case in your project that you need to have the result immediately from another service you can do that quite easily. Kafka from the client side produces a message to the server side, then waiting for the server to return back the message exactly what the client wants. It’s identified in the kafka header request named KafkaHeaders.CORRELATION_ID and a topic where the server should send. If the server side produces the same correlation id to the same topic in the request, then the client side will catch that message as its reply. Although you can work with kafka from a different framework and language other than Java and Spring. Here’s in this example i just specifically giving the example of sending and replying kafka messages using Spring Boot. The Project Overview The client-project will send a string message to the server-project over kafka, then the server-project wil

Start small! You don’t have to solve world most difficult problem

Image
Start up meeting - Image by StartupStockPhotos from Pixabay You don’t have to create new business or solve the world's most difficult problem. You can just start a small doable business by following other businesses that already exist, as long as you have better product, packaging and marketing. People are too ambitious and think too far, it’s okay if you are Elon Musk, but if you just some random guy creating your own business, although it is possible to compete in space race, its chance is very slow compared to already exist doable business that you can just start So, start small, don’t overthink things. Only when your capital is significantly larger, only then you can start to think about expanding your business. Most businesses will fail before 1 year, so be careful, you have to manage your resources carefully. I read the book Atomic Habits, which can be summarized the following: Atomic Habits by James clear is a definitive guide for breaking bad behaviors, showing you how sma

5 Advices About Writing A Tech Blog For Beginner

Image
Blogger with laptop - Image by Peter Olexa from Pixabay Today’s is not going to be a technical tutorial about how to do stuff in some programming language or fixing some bug in some programming technique. It’s just my overall view about blogging without any preparation or research, it’s purely written straight from the document editor. As I am now a self-proclaimed tech blogger, because I feel I have written enough articles to have myself categorized as a blogger. I will be giving some advice about writing a tech blog, but this is for beginners. So, if you are not a beginner, maybe this is not the right article for you. Consistency Writing a blog is not easy, in fact it is very hard that every beginner will leave their blog untouched after a few tries writing less than 20 posts. For me the hardest part of writing a tech blog, or any other niche blog is the consistency, because we don’t always have perfect time, or perfect mood to develop a written article. To be consistent writing on

Better Understanding of ACID Principle In SQL Database

Image
ACID principle in SQL database ACID  is a set of principles whose acronym is Atomicity, Consistency, isolation and durability. As any other principle, it’s done by the developer or database admin or available feature on the database system of choice (MySQL, Postgres, SQL server). So as a developer or data admin you must know this principle in order to design and develop a database system for your project. Dealing with database transactions that have many queries in it should be handled following the ACID principle. When a set of queries are executed ACID prevents disaster in your data because something that is partially error in the middle of transaction can lead into data inconsistency. Because the app query expects all the query should be completed with no interruption, sometimes your database depends on other data. So here’s what ACID principles acronym are: Atomicity All queries in a transaction are treated as a single thing, if one query fails, the whole thing shouldn’t change any

Some Common Java Developer Interview Questions In 2021 Onward

Image
Job Interview - Image by Sue Styles from Pixabay If you are a software developer currently looking for a job, these are some common questions that the interviewers usually ask you. So, you better prepare. The question in the interview process will range from basic to technical questions. The basic questions will assess your experience in your previous job. If you are just a fresh graduate, you just have to tell them about the internship and your contribution. If you are already working in a company, again the principle to answer all the questions is the same, just share your contribution on the team of your company that you work before. In my experiences applying for a software developer job, there’s not going to be tricky questions actually, it rarely happens. Tell me about yourself? This question is simply asking your experiences in the software development industry, just it, nothing else. To answer this question, you need to tell in detail what’s So as relax as you can, tell the in

How to start develop Spring Boot application from Notepad

Image
While writing our codes in Java is easier done using specialized Java IDE (integration development environment) like Eclipse, VS code, IntelliJ, there’s actually no requirement to make your java application. You can just write the code using any tools. The advantage of writing codes in a simple editor like notepad is the lightness of the program, when writing codes in IDE it just feels sluggish when we are typing on it. Because in Notepad, you won’t be given any code suggestions, like method, variable, class etc, so you are typing faster. It can be cumbersome for new developers writing java code in a simple editor, but it is worth a try. So, let’s do it. 1. Install notepad++ We are not going to use the default windows notepad, it’s too ancient to do basically anything, so let’ s just give you the improved version of notepad, the notepad++. You can download from the web official download page here https://notepad-plus-plus.org/downloads/ . 2. Create spring boot skeleton app Go to the pa

What's the advantages of SOLID principle in OOP Java

Image
SOLID Principle In OOP Java As is our nature of laziness, we tend to write codes as if we don’t look for future potential disasters. As long as the codes work, it will just work fine. And I even recommend that if you are just beginner coders, you shouldn't care much about what principles you should use to write code. The first step of becoming a developer is just writing lots of code, no need for structure, or anything else, the only thing that matters is that the code works and returns output as it expected. In other words, you need to master the code's syntax, setup, debug, the environment, etc. As you gain many experiences over the years as a software developer, then you will have the sense to write better code, at this point, you start to look at design principles, design patterns etc. The Advantages of the SOLID Principle? In object oriented programming (OOP), we must know about the SOLID principle on writing better codes. But why should we use SOLID principles? - The Soli

How to reverse string in Java without built in library

Image
Reversing string in java is available via StringBuilder class, we can use stringBuilder.reverse(), then it magically reverses the string. But like an interview task for a Java developer job, sometimes the interviewer wants you to test your algorithm ability. So we have to do it manually, but don't worry it’s not that hard to reverse a string in Java. The thing that you need to do to reverse the string is basically just split the string into arrays of characters, and then loop all those characters through the array, and combine all the array but from the back. And This is simple java code not using Java built in library that you can just copy paste for reverse a string in Java. And here’s the comparison if you want to use String builder, it’s much cleaner and if you want to do it in real life, it’s much better using this way. Java is a magical language, it’s general purpose higher level language support for developing scalable, from personal to enterprise application, with lots

Popular posts from this blog

ASUS Battery Health Charging Software To Make Your Battery Life Longer

Flutter Button With Left Align Text and Icon

ERROR 1348 Column Password Is Not Updatable When Updating MySQL Root Password

Flutter AppBar, With Icon, Title and Actions Link

Is Nox Player a Malware? Nox Android Emulator