Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/MJUIUC/2017Challenges
Browse files Browse the repository at this point in the history
wut is going on
  • Loading branch information
MJUIUC committed Jan 4, 2017
2 parents f089a68 + 1b1c63a commit 7ce9753
Show file tree
Hide file tree
Showing 240 changed files with 8,210 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ nppBackup

# SublimeText project files
*.sublime-workspace
*.sublime-project

# Textmate
*.tmproj
Expand Down
187 changes: 185 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,33 @@

# Year of Challenges 2017

Hello and welcome to the Year of Programming 2017's challenges repository! Here
we will be posting ~~daily~~ periodic challenges for the community to complete.

## Table of Contents

1. [The administration team](#the-administration-team)
2. [Challenges](#challenges)
3. [Solutions](#solutions)
4. [Submitting your work](#submitting-your-work)
5. [Getting set up](#getting-set-up)
1. [Verify git installation](#1-verify-git-installation)
2. [Fork the 2017Challenges repository](#2-fork-the-2017challenges-repository)
3. [Clone your fork](#3-clone-your-fork)
4. [Git configuration](#4-git-configuration)
5. [Proceeding with a challenge](#5-proceeding-with-a-chaellenge)
6. [Submitting your code](#6-submitting-your-code)
7. [Acquiring new challenges](#7-acquiring-new-challenges)

## The Administration Team
- [myrrlyn](https://github.com/myrrlyn "myrrlyn")
- [jremillard](https://github.com/jarydremillard "jaryd remillard")
- [sten](https://github.com/dashsten "dashten")
- [manuel](https://github.com/ManuelMeraz "ManuelMeraz")
- [marcus](https://github.com/MJUIUC "MJUIUC")
- [ae1vtas](https://github.com/aev1tas "aev1tas")
- [aakash](https://github.com/asethi77 "asethi77")

## Challenges

Each challenge will be posted in its own folder, in numbered order. Each
Expand All @@ -21,5 +46,163 @@ compare work!

## Submitting Your Work

To submit, just open a [pull request](https://help.github.com/articles/about-pull-requests/) on the main repository. We'll make sure
that merging won't cause any problems, and go from there.
To submit, open a [pull request](https://help.github.com/articles/about-pull-requests/) on the main repository. We'll make sure that merging won't cause any problems, and go from there.

Note: Your solution will not be instantly accepted onto repository. We will be reviewing your code, file formatting and directory structure of your code. If you satisfy the requirements, then we will accept and merge.

## Getting Set Up

If you do not have git [installed](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git), please do that first.

Note: If you have never used the command line a `$` before some text denotes a command and a line following that without the `$` denotes the output of that command.

#### 1. Verify Git Installation

To confirm that you have git installed type in:
```
$ git --version
git version 1.9.1
```
It should respond by showing you the version of git you have installed.


#### 2. [Fork](https://help.github.com/articles/fork-a-repo/) The 2017Challenges Repository


Click on the button on the top that says fork.

**Image 1 here**

You will now have a copy of the 2017Challenges repository in your profile.


#### 3. [Clone](https://help.github.com/articles/cloning-a-repository/) Your Fork


Click on the green dropdown button titled "Clone or download" and copy the URL there.

Note: I recommend cloning as [SSH](https://help.github.com/articles/generating-an-ssh-key/) as it will allow you to use git without constant user authentication. If you are not comfortable with this yet, proceed with HTTPS.

**Image 2 here**

Open up your command line tool and enter:

Note: Enter the following without the following without the angled brackets (i.e. `git clone git@github.com:ManuelMeraz/2017Challenges.git`)

```
$ cd ~
$ git clone <URL that you copied here>
Cloning into '2017Challenges'...
remote: Counting objects: 874, done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 874 (delta 4), reused 0 (delta 0), pack-reused 860
Receiving objects: 100% (874/874), 95.41 KiB | 0 bytes/s, done.
Resolving deltas: 100% (324/324), done.
Checking connectivity... done.
```


#### 4. Git Configuration


Next we will be [configuring](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup) your git setup.


Note: Simply replace the text inside the quotation marks with your name and email.

```
$ cd ~/2017Challenges/
$ git config --global push.default simple
$ git config --global user.name "John Doe"
$ git config --global user.email "your_email@example.com"
$ git remote add challenges https://github.com/YearOfProgramming/2017Challenges.git
```


#### 5. Proceeding With A Challenge


The challenges will be structured in the following format
```
/ -> root directory
README.md -> Contains the information in this help page
challenge_0/ -> challenge_<number>
README.md -> File containing challenge prompt
r/ -> lowercase directory with your preferred language.
php/ -> If it does not exist, then create one.
python/
cpp/
csharp/
.../
/john -> your username in slack
/nick
/nancy
.../
README.md -> Documentation for your program. Be creative!
src/ -> contains your source code
```

Assuming that you are in the root of the directory you will look for the challenge you want to complete.

`/challenge_#/`

Move into the directory for the challenge you want to complete and see if a directory already exists for your preferred programming language.

If it exists, move into that directory. Otherwise, make a new directory for your language.

Note: The format for directory naming for programming languages is all lowercase plain text with no special characters(i.e. csharp).

`/challenge_#/language/`

Once inside your preferred programming language directory you will create a directory with your slackusername or name you want to be identified by for your work.

`/challenge_#/language/name/`

###### Documentation For Your Program and Source Code

Inside this directory you will have 2 items:
* A file named 'README.md' and inside you will document how your program works.
* Your source code, preferably in a directory titled 'src'

Note: When you are documenting your program, pretend you are someone who has never seen that programming language and instruct them on the steps to run your program and how to use it

Your set up should be as follows so far:
```
/challenge_#/language/name/README.md
/challenge_#/language/name/src/file_1
/challenge_#/language/name/src/file_2
/challenge_#/language/name/src/...
```

#### 6. Submitting Your Code

Assuming you are in the directory under your name you will enter the following
```
$ git add ./*
$ git commit -m "challenge_# in language"
$ git pull challenges master
$ git push origin master
```

Note: Replace the text inside the quotations with the relevant information.

If you go to the page where your forked repository is contained your updated code should be there.

Click on the "New pull request" button button to submit your work for review. Be sure to include the challenge number and language of your solution!

**Image 3 here**


#### 7. Acquiring New Challenges

To get a new challenge that has just been posted you open your command line and enter
```
$ git pull challenges master
```

This will download the newest solutions and challenges to your computer


2 changes: 1 addition & 1 deletion challenge_0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
##Premise

- Hello and welcome to our little community! We're glad to have you!
- Your first task is to implement a simple Hello Wolrd program in the languge of your choice. Happy coding!
- Your first task is to implement a simple Hello World program in the language of your choice. Happy coding!
7 changes: 7 additions & 0 deletions challenge_0/c/almyk/src/helloworld.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include <stdio.h>

int main(void){
printf("Hello, World!\n");

return 0;
}
1 change: 1 addition & 0 deletions challenge_0/c/boilerup_brian/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hey there, world! let's do this thing.
5 changes: 5 additions & 0 deletions challenge_0/c/boilerup_brian/helloWorld.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include <stdio.h>
main () {
printf("Hello World!");
return 0;
}
7 changes: 7 additions & 0 deletions challenge_0/c/kmaitski/hello_world.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include <unistd.h>

int main(void)
{
write(1, "Hello World!\n", 13);
return (0);
}
15 changes: 15 additions & 0 deletions challenge_0/c/nasciiboy/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CC = gcc
SRCDIR = src
OUTDIR = bin
OUTPUT = helloWorld
RM = rm -rf

all: $(SRCDIR)/main.c
mkdir -p $(OUTDIR)
$(CC) -g -Wall -o $(OUTDIR)/$(OUTPUT) $(SRCDIR)/*.c

clean:
$(RM) $(OUTDIR)/*

test:
@$(OUTDIR)/$(OUTPUT)
21 changes: 21 additions & 0 deletions challenge_0/c/nasciiboy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Hello World

Print "Hello World" in stdout.

## Building

``` bash
make
```

## Running

``` bash
make test
```

## Cleanup

``` bash
make clean
```
7 changes: 7 additions & 0 deletions challenge_0/c/nasciiboy/src/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include <stdio.h>

int main(){
puts( "Hello World!");

return 0;
}
11 changes: 11 additions & 0 deletions challenge_0/c/scottsquatch/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
SRCDIR=src
OUTDIR=bin
APPNAME=helloworld
RM=rm -rf

all: $(SRCDIR)/main.c
mkdir -p $(OUTDIR)
gcc -g -Wall -o $(OUTDIR)/$(APPNAME) $(SRCDIR)/*

clean:
$(RM) $(OUTDIR)/*
17 changes: 17 additions & 0 deletions challenge_0/c/scottsquatch/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Hello World Program for c.
Prints a message to the screen.

## Building
``` bash
make
```

## Running
``` bash
./helloworld
```

## Cleanup
``` bash
make clean
```
8 changes: 8 additions & 0 deletions challenge_0/c/scottsquatch/src/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include <stdio.h>

int main()
{
printf("Hello YearOfProgramming!\n");

return 0;
}
9 changes: 9 additions & 0 deletions challenge_0/c/zooks97/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Compile
On a *nix system with gcc, run
$gcc helloWorld.c -o 'output.file'

## Run
$./'output.file'

## Explanation
Uses the stdio printf function to print "Hello, World!" to the screen with a new line.
6 changes: 6 additions & 0 deletions challenge_0/c/zooks97/src/helloWorld.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <stdio.h> /* standard i/o library */

int main(){
printf("Hello, World!\n"); /* print statement */
return 0; /* return that all went well */
}
5 changes: 5 additions & 0 deletions challenge_0/cpp/blakebarnes00/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
CXX = g++
FLG = -w -std=c++11

all:
$(CXX) $(FLG) -o HelloWorld main.cpp
7 changes: 7 additions & 0 deletions challenge_0/cpp/blakebarnes00/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include <iostream>

int main()
{
std::cout << "Hello World!\n";
return 0;
}
6 changes: 6 additions & 0 deletions challenge_0/cpp/chowey/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <iostream>

int main() {
std::cout << "Hello, World!" << std::endl;
return 0;
}
1 change: 1 addition & 0 deletions challenge_0/cpp/chowey/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Self-Explanatory.
7 changes: 7 additions & 0 deletions challenge_0/cpp/spudmonkey/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// challenge_0: spudmonkey

#include <iostream>

int main(){
std::cout << "Hello World!" << std::endl;
}
14 changes: 14 additions & 0 deletions challenge_0/csharp/badoomtch/helloworld.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;

namespace ProgrammingPlayground
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello, world!");
}
}
}


Loading

0 comments on commit 7ce9753

Please sign in to comment.