Posts

Protoype bean scope - real world usage

  Protoype scope illustration using Token Generator import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; @SpringBootApplication public class PrototypeScopeExample {   public static void main(String[] args) {     SpringApplication.run(PrototypeScopeExample.class, args);   } } @Component @Scope("prototype") class PrototypeBean {   private String message;   public String getMessage() {     return message;   }   public void setMessage(String message) {     this.message = message;   } } @Component class ClientBean {   @Autowired   private PrototypeBean prototypeBean;   public void printMessage() {     prototypeBean.setMessage("Hello, World!");     System.out.pr...

height checker better option

 Leetcode question of height checker given an array of integers, not in ascending order, find mismatch nodes count https://leetcode.com/problems/height-checker/description/ Typical solution is regular array sort and compare - O(n logn) Counting sort or use approach of buckets then scan again - O(n) counting sort approach - https://leetcode.com/problems/height-checker/solutions/299910/java-o-n-no-sort/ bucket based solution - https://leetcode.com/problems/height-checker/solutions/299910/java-o-n-no-sort/

Grafana in AWS; reference architectures

  https://aws.amazon.com/quickstart/architecture/eks-grafana/#   -Diagram https://aws-quickstart.github.io/quickstart-eks-grafana/ - Deployment guide

Java, Immutable class example with one of the member variable as a List

  Country class, this class is made immutable list of states as one of the member variable First general incorrect way is explained and correct way explained at the end. https://java2blog.com/how-to-create-immutable-class-in-java/

New Joinee confusion especially if base company location is Phoenix (MST)

Image
MST vs MDT Wikipedia Definition: In the United States and Canada, this time zone is generically called Mountain Time (MT). Specifically, it is Mountain Standard Time (MST) when observing standard time, and Mountain Daylight Time (MDT) when observing daylight saving time. Understanding USA Timezones and more on Arizona MST The crux of the problem is related to laptop settings in MST. Most of Arizona follows MST timezone through out the year. There are many Timezones in the USA. For general-purpose, let us focus on EST (Eastern), CST (Central), MST (Mountain), and PST (Pacific). And their Daylight equivalents are EDT, CST, MDT, and PDT. Daylight Months (DT):- March to November Non-Daylight or Standard Time (ST):-  November to March  For instance, in 2020, Daylight saving is from March 8th to November 1st. And in 2021, Daylight saving is from March 14th to November 7th. Some parts of Arizona, especially Phoenix city observes MST throughout the year. Usually, MST is the conventio...

Understanding the Glider Assessment Tests

Whether it is DevOps assessment or Java Fullstack or Python assessment tests, some of those are related to Glider assessment tests. I. Assessment Link and Instructions You get an email something like below. Import to note is "hire.glider.ai" Please take the assessment on a personal computer only. Once you are ready to take the assessment, please click on the "Start Assessment" link below. Link: https://hire.glider.ai/dataPrivacy/assignment/<Alpha numeric with a mix of upper case and lower case letters> Start Assessment   General instruction: ·  Make sure that you have a stable internet connection. We recommend using Chrome or Firefox browser. ·  We recommend you test your network, internet speed, browser, microphone, and webcam by clicking here. ·  Please close all programs that upload or download files in the background (eg. Dropbox, Google Drive, torrent, etc.) ·  To avoid any distractions, you should close all chat windows, screen-saver, etc. before sta...

AWS Training for Beginners - Day 6

Image
Previous posts in this series are  Day  1 ,  Day 2 ,  Day 3 ,  Day 4 , Day 5 Youtube video of this post - Day 6 Recap of Hands-on practised on Day 3, 4 and 5 AWS is an Ocean in itself. Try to get an overview of what we learnt so far and on the various AWS services. When you start as a beginner into AWS, use the first few weeks to understand more and more. And after that you can try specializing more into particular set of Services. AWS has various services. From a general perspective, focus here is to dwelve more into the following categories of AWS Services. Overview of AWS Services AWS Glossary - https://docs.aws.amazon.com/general/latest/gr/glos-chap.html Easy to remember slides from  https://www.slideshare.net/AmazonWebServices/getting-started-on-aws-awsome-day-2018 Understand the  High level view of AWS Services  (Slide 5) and quite easy to remember in this way.  VPC understanding   (Slide 25) and  Networking and VPC ...