Saturday, October 17, 2020

Design Pattern Walkthrough

The term Design Pattern is a buzzword in the software development world. Actually, we can develop software even without a design pattern, but software development is a continuous process, changes come and the software should adapt to the changes. So, if the software is developed without any consideration of the design pattern, then it is difficult to scale and maintain. Also, if design patterns are properly used, it's very easy to understand your code to other developers. A design pattern is nothing, but the adapted practices by experienced software developers, so it is a good idea to consider design patterns while we develop software.

Basically, we can divide the design pattern into the following categories:

A. Creational Design Pattern
B. Structural Design Pattern
C. Behavioural Design Pattern
D. J2EE Design Pattern (Only for Java)


A. Creational Design Pattern
1) Singleton
2) Factory
3) Abstract Factory 
4) Builder
5) Prototype 

B. Structural Design Pattern
1) Adapter 
2) Decorator
3) Bridge
4) Composite
5) Facade 
6) Flyweight 
7) Proxy

C. Behavioural Design Pattern
1) Command
2) Observer
3) Iterator
4) Memento
5) Template
6) State
7) Strategy
8) Visitor
9) Mediator 
10) Chain of Responsibility

D. J2EE Design Pattern



Thursday, October 15, 2020

Create USB Windows 10 Installer in Ubuntu System

 As the title clearly says, creating bootable USB in the Ubuntu system is a bit challenging as compared to the Windows system. Windows system provided their own tool and we can seamlessly create a bootable thumb drive. After the less availability of CD ROMs, it is very important to know how to create bootable USB disks. 

Yes, I also tried to use some of the tools I was familiar with, such as UnetBootIn, copying with dd tool, etc, but unfortunately, I was unsuccessful. It creates a bootable USB, but the problem, the installation of windows crashes, with some file related error. 

Because I did not have any windows system in my machines, and I have to install windows in my newly bought notebook, I have to create anyhow a bootable Windows 10 installer using my Linux machine. I carried out some research on this, got a working tool to create a bootable Windows installer on USB.

1) Installation of WOEUSB command

What I did is, I have first of all run a couple of Linux commands to add the repository, then install the tool.

sudo add-apt-repository ppa:nilarimogard/webupd8

sudo apt udpate

sudo apt intall woeusb

Now installation completes. 

2) Get USB Info

We have to find out the usb device id (for example: /dev/sdb or /dev/sdc). Using one of the following commands, we can find out that information:

sudo fdisk -l

lsblk 

3) Unmount the USB Disk

This is important, we have to unmount the USB before carrying out the problem. There is a simple command to carry out this task:

sudo umount /dev/sdb1

3) Create the installer 

The final step is to run a command to create the actual installer. 

sudo woeusb --target-filesystem NTFS --device Win10_2004_English_x64.iso /dev/sdb

Here, Win10_2004_English_x64.iso is the iso file downloaded from the Microsoft site. Which can be freely downloaded. 

/dev/sdb is the path of the USB disk.

It can take up to 5-6 minutes depending upon how fast your system is.

After the process finishes, we are ready to use it as a windows 10 installer.