Coder Social home page Coder Social logo

approachable-io / software-interview-prep Goto Github PK

View Code? Open in Web Editor NEW
37.0 7.0 87.0 9.89 MB

Whiteboard and technical questions to prepare you for a software interviews

License: MIT License

HTML 99.36% CSS 0.64%
approachable-open-source open-source interview-prep opensource

software-interview-prep's Introduction

software-interview-prep

Approachable IO is a website created to help those prepping for interviewing for positions in Software Engineering. It is also a great resource for anyone looking to practice their skills by making Pull Requests.

Table of Contents

Contribute an interview question

If you're a Git/Github expert, feel free to skip some sections. If you have never made a Pull Request before, check out our getting-started guide, which will show you how to create your Github account and make your first Open Source contribution. The following guide assumes you have already taken those steps. If you're ready, let's jump into contributing an interview question!

Back to Top

Install Git

Here is a detailed explanation of how to install git.

Back to Top

Fork the project

A fork is a copy of a project. In this case, you will be copying the project software-interview-prep, making a change to that copy, and then making a Pull Request. A Pull Request is a request for the original project to include your changes.

Click the Fork button in the top right corner of the screen to fork the repository.

Fork Github Repository

If everything goes smoothly it should look like this for a few seconds:

Forking Load Screen

And then it should look like this: After Fork Screen

The difference between the original repository and the new repository you created is that your username should appear in the top left. If your username is grace-hopper, it should say something like grace-hopper / software-interview-prep and the line below it should read forked from approachable-io / software-interview-prep.

Back to Top

Clone the fork

Once you've forked the repo, you need to be able to edit it on your local machine.

To do this, click on the green clone or download button, and click the clipboard to copy the repo URL.

Copy Clone URL

In this picture, you can see that the clone is using HTTPS format (https://github.com/<user>/<repo>.git). You may also use the SSH format if you prefer ([email protected]:<user>/<repo>).

Once you have that copied, open your command line (cmd.exe on Windows, Terminal on macOS, and if you use linux you'll know where it is), cd to the directory you want to clone the repo into.

Once you're in your desired directory, run this command (remember to replace the <your-username> with your github username):

git clone https://github.com/<your-username>/software-interview-prep.git

That will be cloned into a directory called software-interview-prep. If I wanted to make it a different directory, such as ~/cloned-folder, I would run this command:

git clone https://github.com/<your-username>/software-interview-prep.git ~/cloned-folder

Once it finishes, you can cd into the directory with cd software-interview-prep.

Git Clone

Back to Top

Install dependencies

At this point, many projects will require you to install dependencies. Put simply, this is external software which is needed for the product to function correctly.

Currently, this repo only has dependency named doctoc which is only required for adding Tables of Content. But if you would like to learn more, click here.

Back to Top

Creating a branch

Most projects utilize git's branch feature, as they should. It's a powerful tool. I won't go into depth explaining it, but you can find many resources online. In a few words, they are ways to let multiple people work on separate things at the same time.

To create a branch for your contribution, run this command:

git checkout -b <branch name>

This creates a new branch in the repo, and checks it out (opens it). If there are already multiple branches, and you want to make a branched based off of another branch, use:

git checkout -b <branch name> master

Where master is the name of the branch you want to base your new branch off of. To switch to another branch that has already been created, run:

git checkout <branch name>

Git Branch

Back to Top

Making your changes

Now that we have our own branch, we can make our changes. There are two ways to edit files, either in GitHub, or with a text editor on your computer. Open the file containing the code in a code editor. You can use any code editing program you are comfortable with, popular choices are Atom, VS Code, and Sublime Text.

People spend a lot of time choosing their favorite text editor, but don't get stuck here, Atom and VS Code are both great options, so we recommend simply picking one quickly. For detailed help, see Using Atom or Using VS Code for more information about using a text editor to create new files and add them to the main lists of interview questions.

Directory Views

For the purpose of this project we will be adding an html file in one of the question directories located in views\questions with the name of your question as the file name:

  • If your question is a general technical question it would be placed in questions\technical.
  • If your question is asking for a code example it would be added to questions\whiteboard.

Remember to type the name in lowercase with - separating words instead of spaces (i.e.: for the Fizz Buzz question, the file name must be fizz-buzz.html).

If you made a copy of an existing question to get the basic formatting to be consistent, please make sure to update your h1 and title to match your question (i.e.: for the Fizz Buzz question, the <title> and the <h1> in the html file must be <title>Fizz Buzz | Software Interview Whiteboard Questions </title> and <h1>Fizz Buzz</h1>, respectively).

After adding your question file in the appropriate question directory you will want to add a link to the respective question list page in the views directory. You will be editing either views\technical.html or views\whiteboard.html.

Once we've made all the changes necessary, we need to stage them:

git add .

You can stage specific files by using git add <file> instead of .. This is useful when you have more than one file that has changed, but only specific files you want to commit. You can also pass a directory, for example git add images, to stage the entire directory that I put the images in. You can check the status of your changes with:

git status

And see what changes you've made since your latest commit with:

git diff

To exit this screen press q.

Git Status

Back to Top

Committing changes

Once you've staged your changes, you're ready to commit them. Committing is marking a change in your project, and you can reset to that commit easily. To commit your staged changes, run:

git commit -m "made changes"

The -m and "made changes" mean commit with message "made changes". Every commit needs a message, as it describes what the commit did. Try to make these messages useful, as not doing so can make it harder if you need to backtrack, and if anyone else wants to see what you've done.

If you're lazy, and want to save as many keystrokes as possible, you can run:

git commit -ma "made changes"

The a means stage all changes. This removes the need to git add ., as it does this already.

Git Commit

Back to Top

Pushing commits

Once you've made your changes and committed them, you'll want to share your changes to the original repo (the one you forked). The changes you've made will stay on your local machine until you push them. Pushing is quite simple. Most of the time, it's only two words to type in:

git push

However, sometimes you want to specify a location to push to, and a branch to push to. By default, when you clone a repo from github, it adds the origin remote location, and sets it as upstream, so just using push works fine. Sometimes, you might not want to send it the default location:

git push <remote> <branch>

The repo that you cloned will be set as remote origin, so git push origin master will push to the master branch on your fork on github. If you want to send it to your branch that you're working on (this is what I'm going to do here), you will need to specify that:

git push origin <branch>

This way, you can have your branch on your fork as well as on your local computer.

Sometimes, you will have to enter your github credentials, to make sure that you have write access to the repo. Just enter your github username and password and it will work. This can be avoided using SSH & SSH Keys, however that's way outside the scope of this guide.

Git Push

Back to Top

Stash and Pop

Sometimes, you make a few changes, and you're not quite ready to commit them, but you need to store them somewhere safe. This is the time for stashing and popping!

If you've made changes to the README.md file, and you wanted to stash it away, all you have to do is:

git add .

and

git stash

Git Stash

Once you've done what you need to do, you can un-stash (pop) the changes, and begin to work on them again! To do this, just run:

git stash pop

And your changes are there again.

Git Pop

Back to Top

Making a Pull Request (PR)

Once you've pushed your changes to your fork, you will want to make a PR to the original repo. To make a PR, go to the github page of your fork, and click on the Compare & Pull Request button.

Compare & PR

Clicking on this button will bring you to a page where you can look at the commits, files changed, and make comments if you would like. Choose an appropriate title for your PR, and also a description. Many projects come with pull request template that will tell you what you should put in description. You should check if there is any, usually named PULL_REQUEST_TEMPLATE.md or PRTemplate.md.

Edit PR

If there is a green check mark at the top saying "Able to merge", then the PR is ready to go! You don't need to do anything else special to make it work.

If there is a red x, this means that there is a conflict with the original repo: this conflict will need to be fixed before you can do a Pull Request.

A conflict happens when two people edit the same file at the same time.

If you have a conflict and are contributing to a beginner-friendly repo (like approachable-io), you can ask for advice on how to solve the conflict.

Once your code is ready to merge, make sure that the dropdown menus near the top of the page are correct.

open-a-pr-options.png

The options that should be selected are:

  • "base fork" (the repo you are requesting to make a PR into),
  • "base" (the branch in the original repo you want you code merged into),
  • "head fork" (your fork of the repo), and
  • "compare" (the branch you pushed your changes into).

When you're ready, click on "Create pull request": this sends the request to the owner of the original repo, who will be reviewing your request.

The person reviewing your request have a few options:

  • They can reject your request,
  • Ask that you make some changes, or
  • Approve it.

Once your PR is approved, your code will be merged into the original repo. Congrats, your PR has been added to the codebase!

Post PR Creation

Back to Top

Want to contribute in another way?

Anyone can help make this project better - check out issues!

Back to Top

Want to have even more fun with code?

This project is supported by Code Championship - Competitive Computer Coding. You can build your own bot to go head to head against others here: codechampionship.com/code

Back to Top

software-interview-prep's People

Contributors

abhishek3008 avatar advanheuit avatar amberjohnsonsmile avatar b-bly avatar chintankamani avatar chridgely avatar christophermoura avatar ericaustin avatar eriknoonan avatar hkdeman avatar iphytech avatar ipravin avatar izulien avatar k0r73z avatar leroyg avatar lukeschlangen avatar mare80 avatar melissagnz avatar mike8161990 avatar mohsinayaz avatar nvinayvarma189 avatar ramanmishra1 avatar rdoochin avatar redxtech avatar syedbilal5000 avatar techboy14 avatar techiepriyaranjan avatar travisbartholome avatar whizkevina avatar ziyadedher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

software-interview-prep's Issues

Documentation Review: Moving `dependency installation` and `creating a branch` to supplemental documentation

If you are new to this project and approachable.io, we would love your feedback (first time contributors welcome)!

I went back through our guide today and I think the dependency installation and creating a branch sections are well written, but I think it might make the guide less approachable for new users. We have a supplemental-documentation folder that could be used to store these sections. We could put links in the main guide for those interested in how to do things the right way?

@redxtech I would love your thoughts on this. I think it's definitely best practice to create a new branch, but I'm worried that it could make the project less approachable. This project in particular will probably remain npm install free in order to maintain approachability, so I'm not sure that the section is necessary here. It could be something we include in a later guide? The plan is to build to more and more complex topics. Is there maybe a balance where we add this as supplemental material like a suggested best practice instead of including it in the main guide?

Add new Agile / Scrum Technical Question

ISSUE TYPE

  • Typo
  • Bug
  • Feature

WHERE / WHAT

Continue filling the questions categories with at least one item per category.

EXPECTED BEHAVIOR

A good start is to define what it is and how it is useful.

REPRODUCTION STEPS

Add new document <agile-scrum-question>.html
Modify questions.html to link to new question page.

Add "Return largest number in array" whiteboard question solution

ISSUE TYPE

  • Typo
  • Bug
  • Feature

WHERE / WHAT

This is a question that comes up often (or ones like it) in interviews. It would be good to add an answer to this to our collection. It currently has an approach, so this is probably a matter of embedding a github gist like our other questions.

Add "Return largest number in array" whiteboard question

ISSUE TYPE

  • Typo
  • Bug
  • Feature

WHERE / WHAT

This is a question that comes up often (or ones like it) in interviews. It would be good to add this to our collection

EXPECTED BEHAVIOR

We should add this page (follow the guide in the README) to the application

update Class vs Object

ISSUE TYPE

  • Typo
  • Bug
  • Feature

WHERE / WHAT

--> Class vs object question in technical question

EXPECTED BEHAVIOR

Add more information about class vs object as the newbies won't understand a thing by reading that one line

REPRODUCTION STEPS

#

New Feature - Update project to include community guidelines

ISSUE TYPE

  • Typo
  • Bug
  • Feature

WHERE

Project's Community Profile will track this progress

EXPECTED BEHAVIOR

Completing the Community profile for the project. Adding in templates and overall guidelines will help Build a strong community

REPRODUCTION STEPS

I propose we add these items to a /docs/ directory to keep the root as clean as possible. The other option supported by GitHub is /.github/ which may not be intuitive or visible for users not familiar with hidden directories.

If interested, I have some starter templates for both Issues and PR that could be added in with minimal effort. If they turn out to bring no additional value the files can always be removed after.

If interested in learning more or you need ideas: Open Source Guides

Incorrect Link on Questions.html for Data Science Overview

ISSUE TYPE

  • Typo
  • Bug
  • Feature

WHERE / WHAT

Link on technical.html doesn't load the new data-science.html question.

EXPECTED BEHAVIOR

The Data Science question should link to the local repository's file for data science instead of the forked copy.

REPRODUCTION STEPS

  1. Visit interview.approachable.io
  2. Choose the View our list of technical questions link
  3. Follow the Data Science Overview link

You will find yourself at @syedbilal5000's repo instead of the question's HTML page in this repo.

Add New CSS Technical Question: What is CSS and what is its purpose?

ISSUE TYPE

  • Typo
  • Bug
  • Feature

WHERE / WHAT

Help flesh out technical questions page by adding categories not already represented.

EXPECTED BEHAVIOR

Give quick and simple "What is CSS" and give some general info on how it can be useful in web design.

REPRODUCTION STEPS

Add document what-is-css.html
Update link in technical.html to direct to new question page.

Add New Angular JS Technical Question

ISSUE TYPE

  • Typo
  • Bug
  • Feature

WHERE / WHAT

Continue filling the questions categories with at least one item per category.

EXPECTED BEHAVIOR

A good start is to define what it is and how it is useful.

REPRODUCTION STEPS

Add new document <angular-question>.html
Modify questions.html to link to new question page.

Pull Request Documentation should have checkboxes for adding a new question

ISSUE TYPE

  • Typo
  • Bug
  • Feature

WHERE / WHAT

https://github.com/approachable-io/software-interview-prep/blob/master/docs/PULL_REQUEST_TEMPLATE.md

EXPECTED BEHAVIOR

Many of our new Pull Requests are well-intentioned, but are missing things, would be good to have a checklist included on the Pull Request Template so that people had a reminder of all of the small things necessary to add a new question. A new section with checkboxes like this specifically for those PRs like:

  • <title> tag has been updated
  • <h1> tag has been updated
  • new file is kabob-case-like-this.html
  • link to question has been added in technical.html or whiteboard.html

REPRODUCTION STEPS

Create a new Pull Request and the new checkboxes should be added.

Add New JavaScript Question: What's a typical use case for anonymous functions?

ISSUE TYPE

  • Typo
  • Bug
  • Feature

WHERE / WHAT

Our technical interview questions are a little light on technical.html. It would be good to add this question to our list.

EXPECTED BEHAVIOR

Clicking a link will take you to the question page which will allow you to see a possible response to the question.

REPRODUCTION STEPS

To create this new question, you should be able to follow the guide in the README https://github.com/approachable-io/software-interview-prep

More detailed instructions around making changes to a project in VS Code or Atom

Right now, for instructions on making changes we basically just tell the user to "make changes". This makes sense to people who have been doing development for a while, but is super confusing to someone new to software.

Specifically, this guide should show a user how to add a new whiteboard question or add a new technical question. This involves:

  1. Adding a new html file
  2. Adding a link to that html file to its respective whiteboard.html or technical.html

Right now, the details suggest using an IDE, but I think we should be more explicit and tell the person following the guid (and potentially using GitHub or writing code for the very first time), exactly how to do this in detail with a specific editor. We can add more editors later, but I'd like to have one of these examples done in a free, approachable (no emacs or vim), editor like Atom or VS Code.

Remove demo-file - Great first issue for new developer

We accidentally created a file that isn't supposed to be a part of the project. We would like someone to remove the demo-file file in the root directory for us.

If you've never made a Pull Request before, check out this getting-started guide first, otherwise, this is a great issue for a new developer to tackle.

If you're a pretty experienced developer, we would love your help improving the guide for this repo or adding a whiteboard question or adding a technical question to this repository.

Angular2+ Questions

ISSUE TYPE

  • Typo
  • Bug
  • Feature

WHERE / WHAT

EXPECTED BEHAVIOR

REPRODUCTION STEPS

Back to Top / Back to TOC Links for README

ISSUE TYPE

  • Typo
  • Bug
  • Feature

WHERE / WHAT

Would love to have a "Back to Top" or "Back to TOC" type of link at each section to add to the easy navigation @AshBardhan built out.

EXPECTED BEHAVIOR

Click a section link from the table of contents and be able to quickly jump back up to the table with a quick link at each section.

Need relatively new Github users to test tutorial

We're creating a guide to making Pull Requests on projects and we would love feedback. If you're totally new to Github or Pull Requests, I would suggest starting with our getting-started guide.

If you are somewhat familiar with Github, we would love for you to follow the guide for this repository and add an issue or create a Pull Request for anything you find to be confusing. This is a work in progress, so please, if there's a point in the guide where you get stuck or even a point that took longer than you think it should have to figure out, let us know!

Default README should suggest `git add .` first

ISSUE TYPE

  • Typo
  • Bug
  • Feature

WHERE / WHAT

We suggest git add README.md instead of suggesting git add . and then we explain that . is an option. We should reverse this since most of our users will likely be using git add . and not selecting individual files to commit.

New Question: What is a CDN and what advantages or disadvantages does it have?

ISSUE TYPE

  • Typo
  • Bug
  • Feature

WHERE / WHAT

Our technical interview questions are a little light on technical.html. It would be good to add this question to our list.

EXPECTED BEHAVIOR

Clicking a link will take you to the question page which will allow you to see a possible response to the question.

REPRODUCTION STEPS

To create this new question, you should be able to follow the guide in the README https://github.com/approachable-io/software-interview-prep

Would love help with README to walk users through first commit

We are trying to make a website (plain html and css) that helps walk users through their first commit with an IDE. I tried simplifying things down, and thanks to Visual Studio Code's ability to clone a repository down from the application, I have gotten pretty far without the user needing to use the command line, but I've hit a point with being able to push where I don't know how to do it without the command line.

My biggest concern is that for a brand new user, the command line is a pretty big and intimidating beast, so I would like to do it without that. Any ideas or suggestions? Feel free to make a PR to the README.md if you have an idea.

I have also provided images up to that point (and am able/willing to produce them after that point) if someone has ideas. The biggest thing about not using the command line (besides the learning curve) is that if I can keep everything in Github and Visual Studio Code, then I don't need to write separate examples for Mac and PC and can still be inclusive.

Add New C# Technical Question

ISSUE TYPE

  • Typo
  • Bug
  • Feature

WHERE / WHAT

Continue filling the questions categories with at least one item per category.

EXPECTED BEHAVIOR

A good start is to define what it is and how it is useful.

REPRODUCTION STEPS

Add new document <c-sharp-question>.html
Modify questions.html to link to new question page.

Create 404.html for website

ISSUE TYPE

  • Typo
  • Bug
  • Feature

WHERE / WHAT

Right now, going to a route that doesn't exist will show a generic github 404 message

screen shot 2017-10-23 at 1 10 51 pm

It would be better to have a custom 404 message (information about approachable.io and how to get involved in this project) as well as the 404 message.

EXPECTED BEHAVIOR

visiting a link that doesn't exist (eg http://interview.approachable.io/qwerty) should display our custom 404.html

REPRODUCTION STEPS

I would suggest starting with this document:
https://help.github.com/articles/creating-a-custom-404-page-for-your-github-pages-site/

Supplemental Documentation Correction - using-atom.md needed

Error in directory notes

The last step is to add your question to the main list. If you wrote a whiteboard question, this list will be in views/questions/whiteboard.html; technical questions go in views/questions/technical.html.

Screencap of views directory

This should read The last step is to add your question to the main list. If you wrote a whiteboard question, this list will be in views/whiteboard.html; technical questions go in views/technical.html.

Typo: Recursion page improper title and h1

ISSUE TYPE

  • Typo
  • Bug
  • Feature

WHERE / WHAT

This view has Algorithms as the title and the h1. These should say Recursion instead

EXPECTED BEHAVIOR

Display correct title and h1.

Add detail to README for adding a new interview question

Note that the new question .html file should just be copied from an existing one in its respective /questions/technical/ or /question/whiteboard/ folder and modified accordingly to maintain consistency.

Note that the created technical or whiteboard question must be added to the respective whiteboard.html or technical.html file.

Note that the <title> and <h1> tags of the copied file must be changed to represent the new question.

Supported by #33

Add relevant links to 404.html

ISSUE TYPE

  • Typo
  • Bug
  • Feature

WHERE / WHAT

Users on our 404 page don't have suggestions on what to do next. We should probably provide suggestions on where they might want to go.

EXPECTED BEHAVIOR

Users who end up on our 404 page should be given links back to our index.html and possibly be told a little more about the organization.

REPRODUCTION STEPS

visit http://www.approachable.io/404 to see current state. Would like similar functionality, but with links to suggested content.

Name 3 ways to decrease page load (perceived or actual load time).

ISSUE TYPE

  • Typo
  • Bug
  • Feature

WHERE / WHAT

Our technical interview questions are a little light on technical.html. It would be good to add this question to our list.

EXPECTED BEHAVIOR

Clicking a link will take you to the question page which will allow you to see a possible response to the question.

REPRODUCTION STEPS

To create this new question, you should be able to follow the guide in the README https://github.com/approachable-io/software-interview-prep

Images require visual guides

Images are really good quality but give no hints as to that to do. Maybe cirles or arrows pointing to the actions to be used?

HTML 5 questions

ISSUE TYPE

  • Typo
  • Bug
  • Feature

WHERE / WHAT

EXPECTED BEHAVIOR

REPRODUCTION STEPS

Add headings for technical questions page categories

ISSUE TYPE

  • Typo
  • Bug
  • Feature

WHERE / WHAT

We're getting quite a few contributions (and merge conflicts) because everyone is adding questions to the bottom of the list. Moving the questions into categories would help us avoid this problem. Maybe these could have links at the top the would skip down to certain sections of the page (based on ids?), but that could be a separate issue.

EXPECTED BEHAVIOR

Questions on technical.html would be divided into categories like:
JavaScript
C#
Java
Agile / Scrum
HTML
CSS
ANGULARJS
OOP
NODE

with corresponding questions underneath them.

REPRODUCTION STEPS

Currently technical.html is just a list without any categories, adding categories will allow it to be searchable to those interested in specific topics.

New Question: What are differences between compiled and interpreted languages? Name an example of each.

ISSUE TYPE

  • Typo
  • Bug
  • Feature

WHERE / WHAT

Our technical interview questions are a little light on technical.html. It would be good to add this question to our list.

EXPECTED BEHAVIOR

Clicking a link will take you to the question page which will allow you to see a possible response to the question.

REPRODUCTION STEPS

To create this new question, you should be able to follow the guide in the README https://github.com/approachable-io/software-interview-prep

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.