Understanding CName record FAQs

Q1. What is the difference between CName and A record with example ?   CName makes one domain name an alias of another i.e all aliased domain gets all the subdomains and DNS records of the original.   Example of a CNAME record: "qiblah.whatsnew.ng CNAME dev.whatsnew.ng" where 'dev.whatsnew.ng' is A record listing an IP address,... Continue Reading →

Featured post

Understanding A record FAQs

A record... They assigns an IP address to a domain or subdomain name in which no two A records refer to the same IP address. Q1. When and where is A record used ? when you have subdomains residing on various systems. Q2. Can you give me two real examples of A record   whatsnew.ng... Continue Reading →

Featured post

Understading DNS FAQs

DNS is used to translate word-based addresses of systems (such as http://www.whatsnew.ng ) to the corresponding numerical IP i.e After typing a web address,the computer needs to understand what numerical IP addresses it needs to contact, and this is accomplished through DNS servers. Q1. Does DNS work for email server ? Yes,it works for Web... Continue Reading →

Featured post

Who are the smoke testers for software ?

Smoke testers are responsible for taking the first testing on a software to reveal the failure, challenges and other issues before the first build. They run subset of test cases on the important functionality to ensure the software work as expected. Smoke tester use the smoke testing method( also known as confidence testing, build verification... Continue Reading →

Featured post

Understanding software behaviour parameterization II

  Please read the part I on this article. To provide a nice basic solution to the stated problem in part I, let's define a family of algorithms that encapsulate each algorithm (called a strategy), and select an algorithm at run-time. In this case the family of algorithms is StudentPredicate and different strategies including StudentCgpaPredicate... Continue Reading →

Featured post

Understanding software behaviour parameterization I

Writing  code that is susceptible to change is always difficult for newbie and easy for the expert . Understanding behavior parameterization is a software development pattern or process that allows programmers, developers and engineers to handle frequent requirement changes in a smart way. Or The ability to tell a method to take multiple behaviors (or... Continue Reading →

Featured post

WHY JAVA IS STILL THE BEST

There are lots of criticism on Java, some keep saying it's bad, good , fair and the likes , but the reality is that, out of many of the programming languages ,majority of great scientist and engineers in both academics and industries have concluded that programming  languages behave like an ecosystem: new languages appear and... Continue Reading →

Featured post

How to take screenshot with Java.

There is nothing new in taking a screenshot . In all software or hardware there is something known as  frame buffer which stores all the currently pixel on the displayed screen as numbers. Screenshot are the main output of the numbers into a file to interpreter as png ,  jpg . There are many screenshot utilities resources... Continue Reading →

Featured post

Understanding Runtime annotation checks via reflection

Reflection API allows Java programmer to perform different checks and operations on class ,fields, methods and annotations during. To make an annotation to be at all visible at runtime,  the RetentionPolicy must be migrated to RUNTIME, as shown in the below example     @interface MyDefaultAnnotation { } @Retention(RetentionPolicy.RUNTIME) @interface MyRuntimeVisibleAnnotation { } public class... Continue Reading →

Featured post

How and when @Deprecated annotation is used

@Deprecated are majorly used when 1. API is experimental and likely been subjected to incompatible changes, 2.Error is likely to occur from usage of the API 3. API is obsolete 4. API is flawed and is impractical to fix and few more... The @Deprecated annotation will cause the compiler to emit an error when invoked,... Continue Reading →

Featured post

Understanding Compile time processing using annotation processor

Different ways to understand Compile time processing using annotation processor 1. Using the @Setter annotation means a marker can be applied to methods. The annotation will no doubt be discarded during compilation not be available after compilation. package annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.SOURCE) @Target(ElementType.METHOD) public @interface Setter { } The... Continue Reading →

Featured post

How to detect and fix bugs in software I

The term bug is no longer a new word, bugs may be unexpected error, failure or flaw which yield unexpected or incorrect result which might cause a great disaster to the software  and also the time require for bug fixing depends on the complexity of the code, structure of the code  , experience and the given... Continue Reading →

Featured post

How to identify response code.

Response codes are always three digit numbers that are divided into groups. Each group has a meaning as shown below: lxx: Informational: Request received, continuing process. 2xx: Success: The action was successfully received, understood, and accepted. 3xx: Redirection: Further action must be taken in order to complete the request. 4xx: User—Agent Error: The request contains... Continue Reading →

Featured post

How to Convert JSON string to Map.

How to Convert JSON string to Map. This articles focus on how to convert JSON string to/from a Map, before moving to the java code to convert JSON to/from map, likely ask questions are 1. What do I need JSON for ? 2. What is the benfit of JSON ...? In the 'old' days, web... Continue Reading →

Featured post

How to calculate islamic ramadan date with Java 8

package com.amudabadmus.ramadandate; import java.time.LocalDate; import java.time.chrono.HijrahDate; import java.time.temporal.ChronoField; import java.time.temporal.TemporalAdjusters; public class RamadanDate { public static void main(String[] args) { //first day of Ramadan, 9th month HijrahDate ramadan = HijrahDate.now() .with(ChronoField.DAY_OF_MONTH, 1).with(ChronoField.MONTH_OF_YEAR, 9); System.out.println("HijrahDate : " + ramadan); //HijrahDate -> LocalDate System.out.println("\n--- Ramandan 2017 ---"); System.out.println("Start : " + LocalDate.from(ramadan)); //until the end of the... Continue Reading →

Featured post

Get and Put pattern for for wildcards Part IV

This article focus on when and where to use ( !use ) wildcards. You need to know wildcard extends and super before reading this article It is good practice to use wildcards where you can in a signature, since this permits the widest range of calls. But how do we decide which wildcards to use?... Continue Reading →

Featured post

Writing Generic classes and methods Part III

Please make sure you read the part II of this article . Writing Generic Methods Just like generic classes, we can write generic methods that are highly general and reusable. There are also some differences when writing generic methods. Let’s see how a non-generic method is converted to a generic one. The following method counts... Continue Reading →

Featured post

Writing Generic classes and methods Part II

Please make sure you read the part I of this article . T is the abbrevated symbol for a type parameter, like a variable name. That means you can use any name you like for the type parameter. However, there are some conventions for naming type parameters in Java: T for type; E for element;... Continue Reading →

Featured post

Writing Generic classes and methods Part I

Two likely question to be asked is Why and When to write generic classes and methods ? 1 Why : When you want to saves time and effort, in terms of avoiding redundancy and creating more reusable and more general API. 2. When : You need a generic class that can be reused without writing... Continue Reading →

Featured post

Question #2

Three programmers lodge into the same hotel room before the competition, the pay the desk clerk $90. A new clerk comes on duty , and finds that the discounted rate for programmers should have been $85. The new clerk gives the bellhop $5 to return to the programmers, but the bellhop not having change and... Continue Reading →

Featured post

Question #2

Three programmers lodge into the same hotel room before the competition, the pay the desk clerk $90. A new clerk comes on duty , and finds that the discounted rate for programmers should have been $85. The new clerk gives the bellhop $5 to return to the programmers, but the bellhop not having change and... Continue Reading →

Featured post

A general strategy for solving algorithm problems.

What is the purpose of having a post that discusses how to solve different algorithm problems? The idea is to provide you with guidelines so that you can be efficient and effective in solving algorithm problems, If you begin to apply the suggested strategy at once. as you proceed through this post you will discover... Continue Reading →

Featured post

Question #2

Three programmers lodge into the same hotel room before the competition, the pay the desk clerk $90. A new clerk comes on duty , and finds that the discounted rate for programmers should have been $85. The new clerk gives the bellhop $5 to return to the programmers, but the bellhop not having change and... Continue Reading →

Featured post

Problem solving habit of a novice developer

A novice: Starts solving a problem before fully understanding what is wanted and/or what a good route for solution will be. Focuses only on a known problem set that he or she has seen before and tries to match the problem with one in the set. Chooses one procedure without exploring alternatives, Emphasizes speed of... Continue Reading →

Featured post

Question #1

A software company in Nigeria develop a software for a large steam evaporator of magnesium chloride service, the evaporator contain internal heating tubes and it was to be cleaned. It was shut down, drained and washed. The next day, two employees who were requested to clean and repair the evaporator entered the vessel to repair... Continue Reading →

Featured post

Problem solving habit of an expert developer

Reviews the entire plan. mentally explores alternative strategies, and clearly understands what result is to be obtained. Concentrates on similarities to and differences from known problems; uses generic principles rather than problem matching. Examines several procedures serially or in parallel. Emphasizes care and accuracy in the solution. Goes through the problem-solving process step by step.... Continue Reading →

Featured post

Extracting Text from Image || Converting Image – Text

This article is a code for  extracting text from images using Java Tesseract API from   net.sourceforge.tess4j.*; STEP 1 : ADD THE  net.sourceforge.tess4j.*; API to your POM.XML net.sourceforge.tess4j tess4j 3.2.1 Image to extract text from STEP 2 : DOWNLOAD  AND PUT THE CAPTCHAS LANGUAGE EXTRACTOR in the tessdata folder https://github.com/tesseract-ocr/tessdata Suppose you download eng.trainedata from the above... Continue Reading →

Featured post

Undestanding SortedSet Basic Operation

1. Understanding SortedSet The key characteristic of a SortedSet is that, it sorts elements according to their natural ordering or by a specified comparator. So considering using a TreeSet when you want a collection that satisfies the following conditions: Duplicate elements are not allowed. Elements are sorted by their natural ordering (default) or by a... Continue Reading →

Featured post

SortedMap Part I

1. Understanding SortedMap The main characteristic of a SortedMap is that, it orders the keys by their natural ordering, or by a specified comparator. So consider using a TreeMap when you want a map that satisfies the following criteria: null key or null value are not permitted. The keys are sorted either by natural ordering... Continue Reading →

Featured post

Queue basic operation

1. Creating a New Queue Instance As a best practice, it’s recommended to use generic type and interface as reference type when creating a new collection. For queues, depending on the need of a particular type (queue, deque and blocking queue), use the corresponding interface as the reference type.For example, the following statements create 3... Continue Reading →

Featured post

Java Queue Part I

To Queue means ‘ to waiting in line’, which is very similar to queues in real life: a queue of people standing in an airport’s check-in gate; a queue of cars waiting for green light in a road in the city; a queue of customers waiting to be served in a bank’s counter, etc. During... Continue Reading →

Featured post

Map Basic operation II

Checking if the map contains a specified value:The method containsValue(Object value) returns true if the map contains one or more keys associated with the specified value. For example: 1 2 3 if (mapHttpErrors.containsValue("OK")) {     System.out.println("Found status OK"); } Output: 1 Found status OK Removing a mapping from the map:The remove(Object key) method removes the mapping... Continue Reading →

Featured post

Java Map Part I

Java Map is an object that maps keys to values, or is a collection of attribute-value pairs. It models the function abstraction in mathematics.   Note that a Map is not considered to be a true collection, as the Map interface does not extend the Collection interface. Instead, it starts an independent branch in the Java... Continue Reading →

Featured post

Bsic Operation on Set part II

Adding elements to a Set:The add()method returns true if the set does not contain the specified element, and returns false if the set already contains the specified element: 1 2 3 4 5 6 7 8 9 10 11 Set<String> names = new HashSet<>(); names.add("Tom"); names.add("Mary"); if (names.add("Peter")) {     System.out.println("Peter is added to the set");... Continue Reading →

Featured post

Java Set Part I

Java  Set is a type of collection that does not allow duplicate elements. That means an element can only exist once in a Set. It models the set abstraction in mathematics. This picture illustrates six spoon sets of different color with the same shape  in mathematics: In set Duplicate elements are not allowed. Elements are... Continue Reading →

Featured post

Basic operations: in List Part III

Iterating over a list Basically, we can use the enhanced for loop to iterate through all elements in the list, as follows: 1 2 3 for (String element : listStrings) {     System.out.println(element); } Or use an iterator like this: 1 2 3 4 5 Iterator<String> iterator = listStrings.iterator(); while (iterator.hasNext()) {     System.out.println(iterator.next()); } For more... Continue Reading →

Featured post

Basic operations: in List Part II

Adding elements The methods add(Object), add(index, Object) and addAll() are used to add elements to the list. It requires to add elements of the same type (or sub type) as the type parameter declared by the list. For example: List<String> listStrings = new ArrayList<>(); // OK to add Strings: listStrings.add("One"); listStrings.add("Two"); listStrings.add("Three"); // But this... Continue Reading →

Featured post

Java List Part I

Java list<> is a collection stores elements by insertion order (either at the end or at a specific position in the list). A list maintains indices of its elements so it allows adding, retrieving, modifying, removing elements by an integer index (zero-based index; the first element is at 0-index, the second at 1-index, the third... Continue Reading →

Featured post

Choice Of Software Algorithm I

Honestly, there's no hard and fast rule when it comes to solving a given problem or solution regarding suitable algorithms. It depends on the nature of the problem. The WYWIWYG (what you write is what you get) principle holds true for complete software and for any subdivision of an algorithm that has solved any problem.... Continue Reading →

Featured post

Blog at WordPress.com.

Up ↑