Posts

Interview Prep

06/03/19 Fizz Buzz Implementation Fizz Buzz is a very simple programming task, asked in software developer job interviews. A typical round of Fizz Buzz can be: Write a program that prints the numbers from 1 to 100 and for multiples of '3' print "Fizz" instead of the number and for the multiples of '5' print "Buzz". 1, 2, Fizz, 4, Buzz, Fizz, 7, 8, Fizz, Buzz, 11, Fizz, 13, 14, Fizz Buzz, 16, 17, Fizz, 19, Buzz, Fizz, 22, 23, Fizz, Buzz, 26, Fizz, 28, 29, Fizz Buzz, 31, 32, Fizz, 34, Buzz, Fizz, ... Corner case - Print FizzBuzz at multiples of 15  Bit reversal 

What's new for me ? JavaScript

05/05/19 Use of REGEX in printing vowels by consonants in different line from input string: const str = "The quick brown fox jumps over a lazy dog" ; const vowels = str . match ( /[aeiou]/ gi ); const consonants = str . match ( /[^aeiou]/ gi ); vowels . concat ([ '' ], consonants ). forEach ( k => { console . log ( k ); } );

What's new for me ? Java

05/05/2019 Types to read input from user: Input a string and a number using BufferedReader: InputStream inputStream = System . in ; Reader inputStreamReader = new InputStreamReader ( inputStream ) ; BufferedReader bufferedReader = new BufferedReader ( inputStreamReader ) ; String name = bufferedReader . readLine ( ) ; //Read a string from the keyboard String sAge = bufferedReader . readLine ( ) ; //Read a string from the keyboard int nAge = Integer . parseInt ( sAge ) ; //Convert the string to a number.   A more compact version of the previous example: BufferedReader reader = new BufferedReader ( new InputStreamReader ( System . in ) ) ; String name = reader . readLine ( ) ; String sAge = reader . readLine ( ) ; int nAge = Integer . parseInt ( sAge ) ;   Even more compact using Scanner : Scanner scanner = new Scanner ( System . in ) ; String name = scanner . nextLine ( ) ; int age = scanner . nextInt ( ) ; Shortcu...

Random Knowledge

07/05/19 Nib File A resource file used to store user interfaces of iOS and Mac apps. It is an interface builder used to design the virtual parts of the app - such as windows and views - and sometimes to configure non-visual objects, such as the controller objects that your app uses to manage its windows and views. The object graph is crated when we edit this file and archived when it is saved. When we load the file the object graph is unarchived. This fie contains static GUI design and it's relationship to other program resources. Things needed to open Nib file: The NIB file cannot be opened in Windows as the Apple Interface Builder(used to develop applications for iPhone), installed on a Mac, is required. Steps to open Nib file: 1. Open the Apple Interface Builder on a Mac. 2. Click the “File” option on the top navigation bar, then click “Open.” A file navigation window opens. 3. Navigate to and click on the NIB file. The file appears in the left pane,...

Data Science v/s Artificial Intelligence v/s Machine Learning v/s Deep Learning

Image
Data Science v/s Artificial Intelligence v/s Machine Learning v/s Deep Learning What is Data Science? Let’s break the term into its composite parts – data and science.  Science works fundamentally through the formulation of hypotheses – educated guesses that seek to explain how something works and then finding enough reasonable evidence through observations in the real world to either prove the hypothesis right, or falsify it. Data, on the other hand, refers simply to numbers and statistics which we gather for the sake of analysis. By combining these two, we get data science. What exactly does it mean? Data science is an umbrella term for all techniques and methods that we use to analyze massive amounts of data with the purpose of extracting knowledge from them. Example of Data Science: Let’s say you are crazy about Cricket, which I am sure you are, and there is an ongoing series between India and Australia. India loses the first two matche...

Full Stack Developers

Basic Knowledge a Full Stack developer MUST have: Server, Network, and Hosting Environment. This involves understanding what can break and why, taking no resource for granted. Appropriate use of the file system, cloud storage, network resources, and an understanding of data redundancy and availability is necessary. How does the application scale given the hardware constraints? What about multi-threading and race conditions? Guess what, you won’t see those on your development machine, but they can and do happen in the real world. Full stack developers can work side by side with DevOps. The system should provide useful error messages and logging capabilities. DevOps will see the messages before you will, so make them count. Data Modeling If the data model is flawed, the business logic and higher layers start to need strange (ugly) code to compensate for corner cases the data model doesn’t cover. Full stack developers know how to create a reasonably normalize...

Basic SEO Terminologies

Image
Organic search: Organic search is a method for entering one or several search terms as a single string of text into a search engine. Organic search results, appear as paginated lists, are based on relevance to the search terms; and exclude advertisements. Whereas, non-organic search results do not filter out pay per click advertising. Background: The Google, Yahoo!, and Bing search engines insert advertising on their search results pages. The ads are designed to look similar to the search results, though different enough for readers to distinguish between ads and actual results. This is done with various differences in background, text, link colors, and/or placement on the page. However, the appearance of ads on all major search engines is so similar to genuine search results that a majority of search engine users cannot effectively distinguish between the two. Because so few ordinary users (38% according to Pew Research Center) realized that many of the highest ...