├── .gitignore ├── 404.html ├── CNAME ├── LICENSE ├── README.md ├── docs ├── PULL_REQUEST_TEMPLATE.md ├── code_of_conduct.md ├── contributing.md └── issue_template.md ├── favicon.ico ├── images ├── angular2.png ├── approachable-open-source-logo.png ├── command-line │ ├── branch-command.png │ ├── clone-commmand.png │ ├── commit-command.png │ ├── pop-command.png │ ├── push-command.png │ ├── stash-command.png │ └── status-command.png ├── compare-and-pr.png ├── copy-clone-url.png ├── directory-views-annotation.png ├── directory-views.png ├── editor-atom │ ├── add-new-file.png │ ├── add-project.png │ ├── add-question-to-list.png │ ├── expand-tree-view.png │ ├── finished-question.png │ ├── name-new-file.png │ └── select-project-folder.png ├── editor-vs-code │ ├── add-new-file.png │ ├── add-question-to-list.png │ ├── expand-view-explorer.png │ ├── file-add-folder.png │ ├── name-new-file.png │ ├── source-control.png │ └── welcome-add.png ├── es6.png ├── fork-loading.png ├── fork-repo.png ├── icons │ ├── android-chrome-192x192.png │ ├── android-chrome-512x512.png │ ├── apple-touch-icon.png │ ├── browserconfig.xml │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── manifest.json │ ├── mstile-144x144.png │ ├── mstile-150x150.png │ ├── mstile-310x150.png │ ├── mstile-310x310.png │ ├── mstile-70x70.png │ └── safari-pinned-tab.svg ├── open-a-pr-options.png ├── open-a-pr.png ├── post-fork.png ├── post-pr-creation.png ├── sad_face.png ├── unused-so-far │ ├── Screen Shot 2017-10-13 at 9.06.28 PM.png │ ├── Screen Shot 2017-10-13 at 9.08.14 PM.png │ ├── Screen Shot 2017-10-13 at 9.08.30 PM.png │ ├── Screen Shot 2017-10-13 at 9.08.50 PM.png │ ├── Screen Shot 2017-10-13 at 9.09.19 PM.png │ ├── Screen Shot 2017-10-13 at 9.09.34 PM.png │ ├── Screen Shot 2017-10-13 at 9.09.39 PM.png │ ├── Screen Shot 2017-10-13 at 9.09.46 PM.png │ ├── Screen Shot 2017-10-13 at 9.10.16 PM.png │ ├── Screen Shot 2017-10-13 at 9.10.58 PM.png │ ├── Screen Shot 2017-10-13 at 9.11.15 PM.png │ ├── Screen Shot 2017-10-13 at 9.11.32 PM.png │ ├── Screen Shot 2017-10-13 at 9.12.18 PM.png │ ├── Screen Shot 2017-10-13 at 9.13.45 PM.png │ ├── Screen Shot 2017-10-13 at 9.14.35 PM.png │ ├── Screen Shot 2017-10-13 at 9.16.14 PM.png │ ├── Screen Shot 2017-10-13 at 9.16.32 PM.png │ ├── Screen Shot 2017-10-13 at 9.16.41 PM.png │ ├── noun_14432.png │ └── noun_14432.svg └── whiteboard-answers │ ├── table-layout.png │ └── takeout-object-model.jpg ├── index.html ├── sitemap.xml ├── styles.css ├── supplemental-documentation ├── dependencies.md ├── text-editor-explanation.md ├── using-atom.md └── using-vs-code.md └── views ├── contribute.html ├── questions ├── technical │ ├── Agile.html │ ├── Index_At_Array.html │ ├── OOPS.html │ ├── System_out_println.html │ ├── algorithms.html │ ├── angular2-questions.html │ ├── angularjs.html │ ├── anonymous-functions.html │ ├── async-programming.html │ ├── cdn.html │ ├── class-vs-object.html │ ├── closure.html │ ├── compiled-vs-interpreted.html │ ├── data-science.html │ ├── data-scientist.png │ ├── encapsulation.html │ ├── es6.html │ ├── functional-components.html │ ├── html5.html │ ├── importance-of-css.html │ ├── inheritance.html │ ├── java-annotations.html │ ├── java-collections.html │ ├── js-variables.html │ ├── linkedLists.html │ ├── page_load.html │ ├── polymorphism.html │ ├── recursion.html │ ├── regular-expressions.html │ ├── sdlc.html │ ├── unshift.html │ ├── what-are-crud-operations.html │ ├── what-are-primitive-datatypes.html │ ├── what-are-the-components-of-a-css-style.html │ ├── what-is-DOM.html │ ├── what-is-a-cdn.html │ ├── what-is-agile-software-development.html │ ├── what-is-an-api.html │ ├── what-is-cdn.html │ ├── what-is-flexbox.html │ ├── what-is-the-difference-and-similarity-between-agile-and-scrum.html │ └── when-to-use-using.html └── whiteboard │ ├── breadth-first-search.html │ ├── concatenate.html │ ├── find-duplicates-from-multiple-arrays.html │ ├── fizz-buzz.html │ ├── maxNumberArray.html │ ├── number-swap-no-temp.html │ ├── palindrome.html │ ├── rhyme-time.html │ ├── sql-joins.html │ ├── sum-strings.html │ └── takeout-object-model.html ├── technical.html └── whiteboard.html /.gitignore: -------------------------------------------------------------------------------- 1 | ##Folders 2 | .idea 3 | node_modules 4 | 5 | ##Files 6 | *.iml 7 | .DS_Store 8 | .vs -------------------------------------------------------------------------------- /404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |You probably want to go back to the homepage
22 | 23 |24 | Approachable IO is an organization committed to creating projects that allow developers of all experience levels to contribute to the project. 25 | For more information about our goals and projects, click here. 26 |
27 | 28 |Help others by contributing your interview questions to this site by following this guide! This project is an Approachable Open Source project from Approachable IO, which means we try to make it as straightforward as possible to contribute to the project.
27 |Don't have an interview question to share but still want to get involved? Regardless of your skill level, we're glad you're here and would love your contribution to our projects. If you're looking for how to get involved with your very first open source project, check out our getting-started project which will guide you through your very first open source contribution.
28 |Your contributions are also welcome on any of our projects on our Github Account, including the project for this website!
29 |What is Agile Methodology in Project Management
30 |31 | Agile is a process by which a team can manage a project by breaking it up into several stages and involving constant 32 | collaboration with stakeholders and continuous improvement and iteration at every stage. The Agile methodology begins 33 | with clients describing how the end product will be used and what problem it will solve. This clarifies the customer's 34 | expectations to the project team. Once the work begins, teams cycle through a process of planning, executing, and 35 | evaluating — which might just change the final deliverable to fit the customer's needs better. Continuous collaboration 36 | is key, both among team members and with project stakeholders, to make fully-informed decisions. 37 |
38 |The array index in C starts with 0 because in C the name of an array is a pointer, which is a reference to a memory location. Therefore, an expression *(arr + n) or arr[n] locates an element n-locations away from the starting location because the index is used as an offset. Likewise, the first element of the array is exactly contained by the memory location that array refers (0 elements away), so it should be denoted as *(arr + 0) or *(arr) or arr[0].
30 |31 | C programming language has been designed this way, so indexing from 0 is inherent to the language. 32 | 33 | However, some languages give user a choice to start index from zero or any other positive integer. For an example, in Fortran, when an array is declared with integer a(10) (an array of 10 integer elements), the index starts from 1 and ends at 10. However, this behavior can be overridden using a statement like, integer a(0:9), declaring an array with indices from 0 to 9. 34 |
35 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /views/questions/technical/OOPS.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |What is OOPS?
30 |31 | Object oriented design started right from the moment computers were invented. 32 | Programming was there, and programming approaches came into the picture. 33 | Programming is basically giving certain instructions to the computer. 34 |
35 |36 | The OOP concept was basically designed to overcome the drawback of the above programming methodologies, 37 | which were not so close to real-world applications. The demand was increased, 38 | but still, conventional methods were used. This new approach brought a revolution 39 | in the programming methodology field. 40 |
41 |42 | Object-oriented programming (OOP) is nothing but that which allows the writing of 43 | programs with the help of certain classes and real-time objects. We can say that 44 | this approach is very close to the real-world and its applications because the 45 | state and behaviour of these classes and objects are almost the same as real-world objects. 46 |
47 |
30 | System.out.println(exp); is used to display messages to the command window. If we go further to the functioning of System.out.println() statement, we will find that:
31 |
32 |
1. System is a class built into the core Java language and it is defined within the java.lang package.
33 |
34 |
2. out is a public static member of the System class, of type PrintStream.
35 | Thus, the expression System.out refers to an object of type PrintStream.
36 |
37 |
3. The (overloaded) println method of the PrintStream class accepts an expression as an argument and displays it in String form to the standard output window (i.e., the command-line window from which the program was invoked). There are multiple println overloaded methods with different arguments. Every println makes a call to print method and adds a newline.
38 |
Internally, print calls write() and write() takes care of displaying data to the standard output window.
39 |
41 | We therefore don't need to ever instantiate a System object to print messages to the screen; we simply call the println method on the System class's public static PrintStream member, out.
42 |
43 |
Now, you might be thinking that can we create an object of PrintStream and call println function with that object to print to the standard output (usually the console)? The answer is NO. When you want to print to the standard output, then you will use System.out.
That's the only way. Instantiating a PrintStream will allow you to write to a File or OutputStream you specify, but don't have anything to do with the console.
44 |
45 |
However, you can pass System.out to PrintStream and then invoke println on PrintStream object to print to the standard output
46 |
49 | An 50 | Approachable Open Source project from 51 | Approachable IO 52 |
53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /views/questions/technical/algorithms.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |What is Algorithm?
30 |31 | Algorithm is a step by step procedure, which defines a set of instructions to be executed in certain order to get the desired 32 | output. 33 |
34 |Why we need to do algorithm analysis?
35 |36 | A problem can be solved in more than one ways. So, many solution algorithms can be derived for a given problem. We 37 | analyze available algorithms to find and implement the best suitable algorithm. 38 |
39 |What are the criteria of algorithm analysis?
40 |41 | An algorithm are generally analyzed on two factors − time and space. That is, how much execution time and how much 42 | extra space required by the algorithm. 43 |
44 | 45 |Angular is single page Application. 28 | Angular 4 is a JavaScript framework for building web applications and apps in JavaScript, html, and TypeScript, which is a superset of JavaScript. 29 | Angular provides built-in features for animation, http service, and materials which in turn has features such as auto-complete, navigation, toolbar, menus, etc. 30 | The code is written in TypeScript, which compiles to JavaScript and displays the same in the browser. 31 |
32 | 33 |TypeScript is an open-source programming language developed and maintained by Microsoft. It is a strict syntactical superset of JavaScript, and adds optional static typing to the language. 36 | TypeScript is designed for development of large applications and transcompiles to JavaScript. 37 |
38 | 39 |Angular CLI makes it easy to start with any Angular project. 41 | Angular CLI comes with commands that help us create and start on our project very fast. 42 | Let us now go through the commands available to create a project, a component and services, change the port, etc. 43 |
44 | 45 | Module in Angular refers to a place where you can group the components, directives, pipes, and services, which are related to the application.
47 |
48 |
To define module, we can use the NgModule. 50 | When you create a new project using the Angular –cli command, the ngmodule is created in the app.module.ts file by default. 51 |
52 | 53 | 54 | Major part of the development with Angular 4 is done in the components. Components are basically classes that interact with the .html file of the component, which gets displayed on the browser. We have seen the file structure in one of our previous chapters. The file structure has the app component and it consists of the following files −
56 |
57 |
- app.component.css58 |
- app.component.html59 |
- app.component.ts60 |
- app.module.ts61 | 62 | 63 |
Routing basically means navigating between pages. You have seen many sites with links that direct you to a new page. This can be achieved using routing. Here the pages that we are referring to will be in the form of components. We have already seen how to create a component. Let us now create a component and see how to use routing with it. 65 |
66 | 67 |We might come across a situation where we need some code to be used everywhere on the page. It can be for data connection that needs to be shared across components, etc. Services help us achieve that. With services, we can access methods and properties across other components in the entire project. 69 |
70 | 71 |AngularJS is a structural framework for dynamic web apps. It lets you use HTML as your template language and lets you extend 28 | HTML's syntax to express your application's components clearly and succinctly. AngularJS's data binding and dependency injection 29 | eliminate much of the code you would otherwise have to write. And it all happens within the browser, making it an ideal partner 30 | with any server technology. 31 |
32 | 33 |AngularJS follows the traditional MVC architecture that comprises a model, a view, and a controller. 34 |
What is a typical use case for anonymous functions in Javascript?
31 |32 | Anonymous functions can be used for 33 |
34 |40 | Brevity 41 |
42 |If you are only using a function once and you're calling it right away, you probably don't want to wetten up your 43 | code by defining it. You could write code like this: 44 |
45 |var habits = ['making eye contact uncomfortably long',
47 |   'instigating slouching contests',
48 |   'saying good morning cheerfully to people who are probably not morning people'];
49 | function habbitsCallback(habbit, i) {
50 |   console.log(i + '. ' + habbit + '.');
51 | );
52 |
53 | habbits.forEach(habbitsCallback);
54 |
55 |
56 | But usually you will not define a callback function if you're only using it once. You'd use an anonymous function 58 | instead: 59 |
60 |habits.forEach(function(habbit, i) {
62 |   console.log(i + '. ' + habbit + '.');
63 | });
64 | 66 | Isolating scope 67 |
68 |69 | Sometimes you just want a little privacy. If you are writing code in a section that could possibly 70 | conflict with variable names or something from another section of your code, you can isolate it with an 71 | anonymous function. One example is with an immediately invoked function expression: 72 |
73 |(function() {
75 |   var habits = 'I have some interesting habits.';
76 | }();
77 |
78 | console.log(habits); //habits is not defined;
79 |
I have never seen that used, so to me a more familiar example is when using a Javascript library like 81 | jQuery or framework like Angular.js: 82 |
83 |app.controller('HabbitController', ['HabbitService', function (HabbitService) {
85 |   var habbit = 'Eating cold pop tarts';
86 | }
87 | console.log(habbit); //habbit is not defined.
More detailed discussion of local and global scope with anonymous functions: 89 | https://stackoverflow.com/questions/17058606/why-using-self-executing-function 90 |
91 | 92 |57 | What is asynchronous programming, and why is it important in JavaScript? 58 |
59 |60 | Synchronous programming means that, barring conditionals and function 61 | calls, code is executed sequentially from top-to-bottom, blocking on 62 | long-running taks such as a network request. 63 |
64 |65 | Asynchronous programming means that the engine runs in an event loop. 66 | When a blocking operation is needed, the request is started, and the 67 | code keeps running without blocking. When the response is ready, an 68 | interrupt is fired, which causes an event handler to be run, where the 69 | control flow continues. This way, a program thread can handle many 70 | concurrent operations. 71 |
72 |74 | User interfaces are asynchronous by nature, and spend most of their time 75 | waiting for user input to interrupt the event loop and trigger event 76 | handlers. 77 |
78 |79 | Node is also asynchronous by default. This means that the server works 80 | in the same way. It waits in a loop for a network request, and accepts 81 | more incoming requests while the first one is being handled. 82 |
83 |What is a CDN and what advantages or disadvantages does it have?
30 |31 | A content delivery network, also known as a CDN, transparently connects users with web content. Rather than retrieving information from just one central server, CDNs feature multiple servers that are spread out geographically. Whichever server is physically closest to the user will deliver the content. Each server, or point of presence (PoP), stores an identical copy of data so it is ready for transfer. 32 |
33 |34 | There are several advantages to using CDNs. Distributing service spatially increases content availability and improves speed and performance. Applications using CDNs can better protect against hackers, spammers, and other security threats. 35 |
36 |37 | CDNs also come with some disadvantages. For one, they incur extra cost. They make website deployment more complicated. And depending on where users are geographically, servers may not actually get the content closer to them. 38 |
39 |What are classes and objects in OOP, and what's the distinction between the two?
30 |31 | A Class is a blueprint of sorts; it outlines what attributes and 32 | functionalities a particular type of structure should have. For example, 33 | a Car object could have color, top speed, and transmission type attributes 34 | and accelerate, brake, and turn signal functions. 35 |
36 |37 | An Object is an instance of a Class. For instance (if you'll excuse the pun), 38 | myCar would be an instance of the class Car with color = gray, top 39 | speed = 15mph, transmission type = automatic. It would inherit the methods 40 | accelerate, brake, and turn signal functions from Car. 41 |
42 |An object is a member or an "instance" of a class.
43 |
44 | If channel is a class, Start Sports, BBC, and ESPN are its objects. If water is a Class, "Fresh Lime Water" and "Soup" are its objects.
45 |
46 | Although you might find this explanation vague, this is the answer that I could think of.
47 |
48 | Here is how you can learn about and distinguish classes:
49 |
50 | Say you have a class "CAR"
51 |
52 | Its objects are Hyundai, Ford, Suzuki. It will have the same methods but different designs -> this is how you can relate objects and classes with the real world.
53 |
What is a Closure in JavaScript?
30 |31 | A closure is a function that can access the outer function's variables. A closure has access to its own scope, to the outer function's variables, and to the global scope. 32 |
33 |Why would you use a closure?
34 |Separation of concerns is an important part of development, and closures allow you to give objects data privacy. The innermost function has access to information outside its scope, but you cannot access the innermost function's information from outside sources.
35 | 36 |What are differences between compiled and interpreted languages? Name an example of each.
30 |31 | Compiled languages must be run through a separate "compiler" program, while interpreted languages are run through an "interpreter" automatically when the code is executed. A compiler converts the code to machine code, a language the computer can understand. Interpreters perform the same function, but they translate the code as it is run, removing the extra step of compiling. 32 |
33 |34 | In terms of processing speed, compiled languages tend to run faster because they are translated all at once. Interpreted languages, on the other hand, are a bit slower because they are being run though an interpreter on the fly. 35 |
36 |37 | Compiled languages include BASIC, C++, C#, Java, and Swift. Some examples of interpreted languages are JavaScript, PHP, Python, and Ruby. 38 |
39 |33 | Data Science is a multi-disciplinary field that combines skills in 34 | software engineering and statistics with domain experience to 35 | support the end-to-end analysis of large and diverse data sets, 36 | ultimately uncovering value for an organization and then 37 | communicating that value to stakeholders as actionable results. 38 |
39 | 40 |43 | Person who is better at statistics than any software engineer and 44 | better at software engineering than any statistician. 45 |
46 | 47 |What is encapsulation, and why is it important in OOP?
30 |31 | Encapsulation is the idea that access to the inner workings of an 32 | object should be controlled carefully. A module is considered 33 | "encapsulated" iff its implementation is completely hidden, and it can 34 | only be accessed through a documented interface. 35 |
36 |37 | Encapsulation is important because it helps to compartmentalize 38 | elements within a larger project, and by so doing, helps to minimize 39 | the risk of misuse of particular functionalities. For example, think 40 | of how cars work; the driver gets a steering wheel, brakes, 41 | accelerator, et cetera, and it's only through these that they control 42 | how the car moves. The car itself handles the actual acceleration and 43 | turning, because the actual inner workings of the engine are too 44 | complex for the average user. If the user were to be allowed to meddle 45 | with the innermost workings of the vehicle, they could cause all kinds 46 | of damage due to their ignorance of how the actual act of acceleration 47 | (or what have you) was supposed to be performed. 48 |
49 |38 | First-class functions: Functions in JavaScript are utilized as first class objects. This usually means that these 39 | functions can be passed as arguments to other functions, returned as values from other functions, assigned to variables 40 | or can also be stored in data structures. 41 |
42 |43 | Nested functions: The functions, which are defined inside other functions, are called Nested functions. They are called 44 | 'everytime' the main function is invoked. 45 |
46 |HTML5 is the latest version of the HyperText Markup Language that can be referred to the WWW (World Wide 42 | Web) primary language, this markup language enhances a text file with bits of code, and this code which we 43 | can say as “markup” describes the structure of the document. 44 | 45 | HTML5 provides some standard features like that of CSS, HTML, JavaScript, and DOM, which in turn will reduce 46 | the requirement of external plugins. It’s more markup to replace scripting, better error handling, etc. 47 | HTML5 is device independent. 48 |
49 | 50 |The 54 | declaration provides instruction to the web browser to understand what information it should be 55 | display, and the need to start with 56 | declaration. In HTML5, DOCTYPE declaration is very short, and case-insensitive, and 57 | is written at the top of every HTML5 page. 58 | 59 |
A tag is a special content in HTML5, which is surrounded by an angle bracket (<,>). A slash (/) symbol is 88 | used to close the tag after completing the block. 89 |
90 | 91 |An Html5 tag is a set of characters that develop a formatted command for a web page. These formatted commands 98 | communicate and send the instruction to the Browser.
99 | 100 |Drag and Drop is the most important User Interface concept which makes it easy to grab an object and Drag it 102 | at the place you want with the help of a mouse click. 103 | 104 | Some common features that are mostly used by Drag and Drop operation include move, link or copy. 105 | 106 | We can drag an image using elements, type = 107 | < img draggable=“true”> 108 | , to make an image draggable and set the draggable image attribute to true. 109 |
110 | 111 |HTML5 supports animation, drawing, audio, video, etc and it easily embeds a video on the web page. It does 113 | not require any additional software like Flash for watching videos. 114 | 115 |
The hyperlink is a link that allows a user to move from one web page to another web page when clicked. 131 | Hyperlink concept is used on text and as well as image, and we can convert an image into a link with the 132 | help of < a href=“ ”….< /a>> tags. 133 |
134 | 135 |New HTML5-specific tags will not be interpreted by the browser. 137 |
138 | 139 |What is inheritance, and why is it important in OOP?
30 |31 | Inheritance further extends the sort of familial metaphor in OOP, and 32 | much like the actual concept, it just means that child classes get 33 | what their parents had (with the exception that no one need die for OOP 34 | inheritance to take place, and child classes needn't fight over who gets 35 | what). 36 |
37 |38 | It's important to note that inheritance is for "is-a" relationships, not 39 | for "has-a" relationships. For example, the class "Bathroom" should 40 | inherit from the "Room" class (because a bathroom is a room), but a "Shower" 41 | class should NOT inherit from "Bathroom" (because though a bathroom has 42 | a shower, the statement "a shower is a bathroom" is both inaccurate and 43 | markedly insalubrious). 44 |
45 |60 | Java Annotations provide information about the code and they have no direct effect on the code they annotate. Annotations are introduced in Java 5. Annotation is metadata about the program embedded in the program itself. It can be parsed by the annotation parsing tool or by the compiler. We can also specify annotation availability to either compile time only or till runtime also. 61 |
62 |63 | Annotations have a number of uses, among them: 64 |
72 |
60 | Java Collections Framework is very rich with features, it is designed for representing and manipulating the collections, helps developer with providing many inbuilt features, function to manage data. 61 |
62 |63 | It has got many advantages as listed below: 64 |
75 | Java Collections framework has got many interfaces which we can use based on our required implementation, like Collection, Set, List, Map, Queue, Dequeue, Iterator, SortedSet, SortedMap etc 76 |
77 |How do you create variables and what are the differences between methods?
* let and const available in ES2015 or ES6
31 | 32 |
38 | var declaration
39 |
40 |
48 | var, let, const
49 |
50 | When discussing the differences in declaration methods, you primarily need some knowledge of scope. In Javascript there are two kinds of scope – global scope, and function scope. Function scoped variables cannot be accessed outside of the function in which they are create.
55 | 56 |The difference between var
and let
is its focus in scope. Var
is scoped to the function as a whole, while let
is scoped to the block it was created in. A block in this case is easily referenced as anything within curly brackets {}
. Let
is more tightly defined, throwing a reference error when returned undefined. Var
would handle this by finding a fallback and is accessible before its declaration.
Const
is very similar to let
in that it is block scoped and returns a reference error before its declaration. The major difference is that a let
variable can be re-assigned while a const
variable cannot. It remains constant. This is perfect for immutable arrays or objects.
What is a Linked List?
30 |31 | Linked List is a data structure which consists of nodes and each node holds some data and a pointer to another node in the list. 32 |
33 |What limitations of arrays?And how linked lists solved those limitations?
34 |
30 | Page load time can be decreased in a number of ways. Limiting the number of requests on page is often the first step a developer will take.
31 | Serving minified images and code is another useful step that will decrease the actual load time of a page.
32 |
33 | While both of the above mentioned methods will create a finite decrease in load time, there are other methods that may result in a perceived decrease in page load.
34 | The most frequently used methods is to display a spinner or loading animation. Users will understand that something is happening behind the scenes and display more patience than if the page was static.
35 |
38 | An 39 | Approachable Open Source project from 40 | Approachable IO 41 |
42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /views/questions/technical/polymorphism.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |What is polymorphism, and why is it important in OOP?
30 |31 | Polymorphism comes from the Greek roots "poly," which means "many" and 32 | "morphe," which means "forms." It's a concept that allows for the 33 | construction of general data structures and methods, which is invaluable 34 | in OOP. 35 |
36 |37 | In the context of programming, polymorphism is the capacity of a given 38 | object to be regarded as an instance of its own class, an instance of 39 | its superclass, or an instance of its superclass's superclass (and so 40 | on and so forth up the hierarchy). This is valuable because it allows 41 | for the creation of interfaces that can be used to provide an 42 | instruction set of sorts for numerous subclasses. In other words, it 43 | makes it possible to use the same general formulae to construct similar 44 | objects, which means we don't need to rewrite the same functionality 45 | over and over again. This minimizes the potential for some miniscule 46 | difference being introduced (as will invariably occur when different 47 | people work on the same code) into the codebase. It may not sound like 48 | a huge problem, but it's actually one of the most insidious, ubiquitous, 49 | and apoplectic-rage inducing problems in team programming. It's the 50 | reuse and recycling of code that polymorphism enables that makes it so 51 | valuable in programming! 52 |
53 |What is Recursion?
30 |31 | Recursion is the process of defining a problem (or the solution to a problem) in terms of (a simpler version of) itself. 32 |
33 |34 | Recursion means "defining a problem in terms of itself". This can be a very powerful tool in writing algorithms. Recursion comes directly from Mathematics, where there are many examples of expressions written in terms of themselves. For example, the Fibonacci sequence is defined as: F(i) = F(i-1) + F(i-2) 35 |
36 |Here is an example code to calculate the power of a number provided with the exponent
37 |38 | def power(base,exp): 39 | if(exp==1): 40 | return(base) 41 | if(exp!=1): 42 | return(base*power(base,exp-1)) 43 | base=int(input("Enter base: ")) 44 | exp=int(input("Enter exponential value: ") 45 | print("Result:",power(base,exp)) 46 |47 | 48 |
They are strings and characters used as a search pattern which has multiple uses such 17 | as for searching text, matching certain words and values, or replacing text. 18 |
19 | 20 |Regex characters are placed in diagonal brackets '/regex characters/'. 23 | There are two main methods to test expressions with
24 | 25 |This method will return a boolean. First, you will define a set of characters you want to match
27 |let regexEx = /char/
28 | Then, use the test method on regexEx
, it will return true if characters
29 | match, false if they dont
regexEx.test('character')
31 | The above example will return true since 'char' is within the 'character' argument.
32 | 33 |This take an expression to match as an argument, and will return an array with the first value being the match found. 35 | There are multiple expressions that can be used, check out regex101 to see different expressions 36 | which can be used and practice with them.
37 |In the following example, a 'wildcard' is used which uses a period (.) to match any single character.
38 |let regexEx = /./
let stringEx = 'character'
stringEx.match(regexEx)
//[ 'c', index: 0, input: 'character', groups: undefined ]
41 | The above example returns an array, where the first value will be the value returned, which 42 | in the above case is 'c' because the period matches the first character and only that character. 43 |
44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /views/questions/technical/sdlc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |What is software process or Software Development Life Cycle (SDLC)?
30 |31 | Software Development Life Cycle, or software process is the systematic development of software by following every stage in 32 | the development process namely, Requirement Gathering, System Analysis, Design, Coding, Testing, Maintenance 33 | and Documentation in that order. 34 |
35 |What are SDLC models available?
36 |37 | There are several SDLC models available such as Waterfall Model, Iterative Model, Spiral model, V-model and Big-bang 38 | Model etc. 39 |
40 |What are various phases of SDLC?
41 |42 | The generic phases of SDLC are: Requirement Gathering, System Analysis and Design, Coding, Testing and implementation. The 43 | phases depend upon the model we choose to develop software. 44 |
45 |Which SDLC model is the best?
46 |47 | SDLC Models are adopted as per requirements of development process. It may very software-to-software to ensuring which model 48 | is suitable. 49 | 50 |
We can select the best SDLC model if following answers are satisfied -
51 |38 | This method is functional at the starting of the array, unlike the push(). It adds the desired number of elements to the 39 | top of an array. For example - 40 |
41 |var name = [ "john" ]; 42 | name.unshift( "charlie" ); 43 | name.unshift( "joseph", "Jane" ); 44 | console.log(name);45 |
46 | The output is shown below: 47 |
48 |[" joseph "," Jane ", " charlie ", " john "]49 |
CRUD is an acronym representing the four basic functions of persisted storage (most commonly a database).
33 |INSERT
statement. This is how data is initially loaded to storage.
36 | SELECT
statement. This is how data is retrieved and ultimated consumed by an application.
39 | UPDATE
statement. This is how data is modified in storage.
42 | DELETE
statement. This is how data is hard-deleted (permanently removed) from storage. This should not be confused with a soft-delete which may be implemented as an update to an "Active" or "Enabled" property.
45 | 38 | There are six (6) types considered primitive types, which have no methods of their own and are not objects. These are: 39 |
CSS stands for Cascading Style Sheets and is a style language that expresses the presentation of structured documents. The most common use of CSS is with HTML for web design, though these sheets can also be used with other markup languages such as XML.
33 | 34 |CSS allows styles to be added, momdified, or removed quickly for an entire page or site. This reduction in coding, which was once very repetivie in HTML, saves the programmer time and reduces keyed errors. We gain the added benefit of a faster load time for websites as a style can be loaded once and saved in cache for use throughout an entire site instead of loading a style per element.
36 | 37 |<style>
attribute to an element in your HTML file
41 |
43 | <h1 style="color:red;"> is a Red Heading</h1>
44 |
45 | <style>
element to your <head>
section
48 | <head>
49 | <style>
50 | h1 {color: red;}
51 | </style>
52 | </head>
53 | <link>
to an external CSS sheet in your <head>
section
56 | <head>
57 | <link rel="stylesheet" href="styles.css">
58 | </head>
59 | CSS specificity is the set of rules applied to CSS selectors in order to determine which style is applied to an element. The more specific a CSS style is, the higher point value it gets.
63 | 64 |Every style in CSS is made up of three parts :
66 |The Document Object Model (DOM) is a programming interface for HTML and XML documents. It represents the page so that programs can change the document structure, style, and content. The DOM represents the document as nodes and objects. That way, programming languages can connect to the page. 34 | 35 | A Web page is a document. This document can be either displayed in the browser window or as the HTML source. But it is the same document in both cases. The Document Object Model (DOM) represents that same document so it can be manipulated. The DOM is an object-oriented representation of the web page, which can be modified with a scripting language such as JavaScript.
36 | 37 |All of the properties, methods, and events available for manipulating and creating web pages are organized into objects (for example, the document object that represents the document itself, the table object that implements the special HTMLTableElement DOM interface for accessing HTML tables, and so forth). This documentation provides an object-by-object reference to the DOM. 39 | 40 | The modern DOM is built using multiple APIs that work together. The core DOM defines the objects that fundamentally describe a document and the objects within it. This is expanded upon as needed by other APIs that add new features and capabilities to the DOM. For example, the HTML DOM API adds support for representing HTML documents to the core DOM.
41 | 42 |
47 | var paragraphs = document.getElementsByTagName("p");
48 | // paragraphs[0] is the first element
49 | // paragraphs[1] is the second
element, etc.
50 | alert(paragraphs[0].nodeName);
51 |
52 |
53 | Being Agile means your development team collaborates closely with the end users of your product to iterate quickly and roll out value in small chunks. This allows the software product to respond quickly to changing requirements and ensure that effort developing invalid solutions is minimized as much as feasible.
33 | 34 |The most prevalent competing methodology to Agile is Waterfall. In that approach, the development process is strictly linear from requirements collection to end user delivery. This approach is typically less-favored because of the high risk to the value of the resulting solution which grows proportionally to the scale and timeline of the project.
36 | 37 |Scrum is a popular framework in which development progress is managed. At a high level, a development team will have recurring work cycles known as "sprints" which typically last 2-3 weeks in length. These sprints are scoped narrowly enough so that some value can be delivered to users upon sprint completion.
39 | 40 |What is an API?
30 |31 | An API, also known as an Application Program Interface, is an exposed method (or collection of methods) for use by an external service to make use of your service. APIs can take many forms with varying levels of robustness and convenience to developers. When APIs are public, they will typically be accompanied with documentation and a promise to not make breaking changes which impact dependent services. 32 |
33 |What is a CDN and what advantages or disadvantages does it have?
30 |31 | A Content Delivery Network(CDN) is a cluster of geographically distributed servers being used to deliver static content like images, scripts, CSS and libraries quickly to visitors from the nearest server. In simpler words; when visitors browse any website, CDN chooses the nearest server to deliver static content used in website. CDN allows the visitors faster page loads and enhanced user experience... 32 |
33 |34 | What are the Advantages of Content Delivery Network (CDN)? 35 |
36 |42 | Having learning the advantages/benefits of CDN (Content Delivery Network), it will be cool to also know what are the disadvantages/drawsback of using CDN (Content Delivery Network), because knowing the Do's and Dont's of a thing makes one utilize it very well and be conscious of what it can do. 43 |
44 |45 | What are the Disadvantages of Content Delivery Network (CDN)? 46 |
47 |Agile is a broad spectrum, it is a methodology used for project management while Scrum is just a form of the Agile that describes the process and its steps more concisely. Agile is a practice whereas scrum is a procedure to pursue this practice.
33 | 34 |The Agile involves completing projects in steps or incrementally. The Agile methodology is considered to be iterative in nature. Being a form of Agile, Scrum is same as that of the Agile. It is also incremental and iterative.
36 |It provides a convenient syntax that ensures the correct use of IDisposable objects. It ensures that the Dispose() method is called on the object even if an excepton occurs during code execution.
33 | 34 |It should be used whenever dealing with objects that implement IDisposable to ensure they are cleaned up properly after use. It also makes code easier to read and maintain.
36 | 37 |using (var connection = new SqlConnection(connectionString))
42 | {
43 | connection.Open();
44 | // Do stuff here
45 | }
46 | var connection = new SqlConnection(connectionString);
50 | try
51 | {
52 | connection.Open();
53 | // Do stuff here
54 | }
55 | finally
56 | {
57 | connection.Dispose();
58 | }
59 | Using Python, create breath first search algorithm in tree.
32 | 33 |Create tree using dictionary in python,than use the property of list (append or pop).
35 | 36 |How can you concatenate two strings?
32 | 33 |38 | Use the (.) dot operator. For instance: 39 |
40 | $foo = "Hello"; 41 | $bar = "World!"; 42 | echo $foo . " " . $bar; 43 | 44 |45 | Would result into "Hello World!" 46 | 47 |
Write a function to return duplicates (if any, in any order) that appear in multiple arrays (represented as a 2D array). Each array contains only unique integers.
32 |Example:
33 |Input: [[9,3,5,7,8,22], [29,13,6,4,3,22,9], [15,3,9,22,44]]
34 |Output: [3,9,22]
35 | 36 |Since the input is a 2D array (an array within an array), we'll have to use a nested loop to iterate over all the numbers in each array. We'll also have to keep a count of every duplicate we find to make sure it appears in each array inside the input array.
38 | 39 |Write a loop that prints numbers from 1 to 100. If the number is divisible by 3, print 'Fizz'. If the number is divisible by 5, print 'Buzz'. If the number is divisible by 15, print 'FizzBuzz'
32 | 33 |Most programming languages have either a modulus operator or function that can be called. This will give you the remainder from dividing one number by another, for example, in Javascript you would use var a % var b. If the number is divisible, there will be no remainder.
36 | 37 |Another point to consider is how your loop will be evaluated. In most cases it will be necessary to check the given conditions in reverse order. Check that the number is divisible by 15 first, then check if it is divisible by 5, then check if divisible by 3, and, if not, print the number. This is a little gotcha, because 15 is divisible by 3 and 5, you will never get to that part of your conditional statement, unless it is first.
38 | 39 |Write a function that returns the maximum number in an array.
32 | 33 |A simple way to get started would be to take a variable and then intialize it to the first index of the array. Loop through the array and if the number at the current index is greater than the intialized number at the start, then reinitialized the variable to the number at the current index. After doing this for the entire array, the max number would be saved in the variable. In python, you can use "max" function to get the maximum number in an array!
35 | 36 |Using C#, swap the values of x and y without using a tempoary or third variable. x = 20 and y = 10
32 | 33 |Most programming languages have a feature to iterate over a string. Utilize it creatively to check if the string is the same right-to-left and left-to-right.
35 | 36 |41 | using System; 42 | 43 | class NumberSwap { 44 | public static void Main() 45 | { 46 | int x = 20; 47 | int y = 10; 48 | Console.WriteLine("Before swap:"); 49 | Console.WriteLine("x value: " + x); 50 | Console.WriteLine("y value: " + y); 51 | x = x + y; 52 | y = x - y; 53 | x = x - y; 54 | Console.WriteLine("After swap:"); 55 | Console.WriteLine("x value: " + x); 56 | Console.WriteLine("y value: " + y); 57 | } 58 | } 59 |60 | 61 |
Write a function that checks if a string is a palindrome, which means that it is the same word whether read left-to-right or right-to-left.
32 | 33 |Most programming languages have a feature to iterate over a string. Utilize it creatively to check if the string is the same right-to-left and left-to-right.
35 | 36 |
32 | Write a function that returns the number of strings in the array that rhyme with the string.
33 |
For the purpose of this exercise, rhyming is considered to be identical except for the first letter.
34 |
35 |
For example, 'mist' would rhyme with 'gist', but not with 'cyst'.
36 |
37 |
String: 'sane'
38 |
Array: [ 'cane', 'came', 'rain', 'Jane', 'dame', 'main' ]
39 |
40 |
41 |
How would you change the code to make that function work with strings of any length.
42 |
Array: [ 'explain', 'hurricane', 'airplane', 'wane', 'insane', 'blame', 'shame', 'again', 'detain' ]
43 |
To solve this question, you will need to apply two techniques. The first is to loop through the array, the second is to compare the strings.
48 | 49 |Think about how you can manipulate strings to access only the part of the string that you're interested in.
50 | 51 |Based on the two tables listed below, write a SQL query to return a list of all invoices. Each invoice should 32 | return with an ID, billing date, customer's name, an dthe name of the customer that refered them, if available. 33 |
34 | 35 |This question is a rather simple one and is normally used to simply see the programming style of each applicant. 40 | A few key things to consider when writing your statement: 41 | 42 |
56 | SELECT i.Id, i.BillingDate, c.Name, r.Name AS ReferredByName
57 | FROM Invoices i
58 | INNER JOIN Customers c ON i.CustomerId = c.Id
59 | LEFT JOIN Customers r ON c.ReferredBy = r.Id
60 | ORDER BY i.BillingDate;
61 |
62 | Note: This first join assumes that all invoices will have a corresponding customer represented. This may not 63 | actually be the case and would exclude invoices with a "bad" cusotmer id. If these are not important, then the 64 | above query will work. 65 |
66 |
72 | SELECT i.Id, i.BillingDate, c.Name, r.Name AS ReferredByName
73 | FROM Invoices i
74 | LEFT JOIN Customers c ON i.CustomerId = c.Id
75 | LEFT JOIN Customers r ON c.ReferredBy = r.Id
76 | ORDER BY i.BillingDate;
77 |
78 | Using double left joins will ensure that all invoices will display even if they do not have a matching customer 79 | listed in the customers table. These may or may not be important to the client. They may also wish to have the 80 | NULL values replaced with different values if the results are going to be client facing. In this case you could 81 | include the ISNULL funciton. 82 |
83 |Write a function that takes in a list of strings that represent numbers and return the total after adding them all.
32 | 33 |Most programming languages have a feature to iterate over a list, and to convert from a string to a number. Utilize them both to solve this problem.
36 | 37 |How would you structure a system in which you needed to manage a take-out restaurant?
32 |33 | (Hint: Break down the problem into actors, or in other words, what 34 | different people/objects need to interact in this problem, and what they 35 | need to be able to do! Start with Order and Customer objects!) 36 | 37 |
Above is one possible solution from TutorialsPoint!
45 |Click the image for their UML Object Modeling tutorial!
46 |27 | 28 | Fizz Buzz 29 | 30 |
31 |32 | 33 | Sum List of Strings 34 | 35 |
36 |37 | 38 | Concatenate Strings 39 | 40 |
41 |42 | 43 | Palindrome Check 44 | 45 |
46 |47 | 48 | Maximum Number in an Array 49 | 50 |
51 |52 | 53 | Object Modeling: Takeout Order Model 54 | 55 |
56 |57 | 58 | String comparison: Rhyme Time 59 | 60 |
61 |62 | 63 | Swap Numbers without using temp Variable 64 | 65 |
66 |67 | 68 | Find Duplicates from Multiple Arrays 69 | 70 |
71 |72 | 73 | Breadth First Search 74 | 75 |
76 |77 | 78 | T-SQL Joining Tables 79 | 80 |
81 |