TheSlapDoctor Coder Application

Locked
User avatar
TheSlapDoctor
Registered user
Posts: 156
Joined: 11 Sep 2015, 08:45
Location: Ireland

TheSlapDoctor Coder Application

Post by TheSlapDoctor » 31 Jan 2016, 12:06

Byond ID:
TheSlapDoctor

Age:
20

Gender:
Male

How would you define yourself? (Coder, Mapper, Spriter):
Coder.

If Coder, what languages?

HTML, CSS, PHP, Java, MySql, minimal Javascript/JQuery.

Any previous experience developing with SS13?
None, but I've been interested in it for a long time, and have read much DM code, but never tried coding with it. I have a history of learning languages quickly, I'd appreciate the opportunity.

Proof of any previous or current work:
An awful lot of my work is back-end programming or Software testing for a pharma company, so I can't share that work with you.
I do have two current projects, which I can provide proof of if requested, but would rather not share on a public forum.

How well do you know Git?

Quite well, I've used Git for the majority of my work, and have experience with Git cmd and GitHub.

Your primary job is server development, not policing the server. You may be given Moderator-level of access but you should *not* be invoking any administrative actions unless there are no moderators or Admins online. Do you understand? (Yes/No)
Yes.

Anything else you'd like to add?
I'm Irish, and living in Ireland, so my timezone allows me to be online at low-pop times during the afternoon. This would allow me to make changes at a more convenient time, and also means that I would be online as a staff member at a time when most American/Canadian staff are asleep.

As I said above, I have experience as a Software Tester, and I enjoy optimising code and fixing bugs.
Fletcher Snowgood

Wiki Edit History: Check me out, son.

Image
Image

User avatar
TheSlapDoctor
Registered user
Posts: 156
Joined: 11 Sep 2015, 08:45
Location: Ireland

Re: TheSlapDoctor Coder Application

Post by TheSlapDoctor » 01 Feb 2016, 17:23

I hunted around a little bit and found some snippets of code I can show (and explain, on request).

For PHP, my example is a wrapper for database connection and manipulation:

Code: Select all

<?php
/*
DB class is a database wrapper to make communication with the Database more
reliable, readable and convenient. We're using a Singleton Pattern to make connection to the database more efficient. It prevents
us from re-connecting to the database unnecessarially.
*/
class DB{
	private static $_instance = null; 	//This variable holds the DB object if it has been instantiated previously.
	private $_pdo, 						//Holds PDO object (PHP Database Object)
			$_query,					//Holds SQL query to be used
			$_error = false,			//Holds errors or lets us know that there are none.
			$_results, 					//Holds results of SQL query
			$_count = 0; 				//Used to count number of results

	private function __construct(){
		try{
			$this->_pdo = new PDO('mysql:host=' . config::get('mysql/host') .';dbname=' . config::get('mysql/db'), config::get('mysql/username'), config::get('mysql/password'));
			//Construct a PDO with three parameters: host&dbname, username and password. config::get(mysql/x) gets value x from the mysql array in config.php
			//THIS IS THE MEAT OF HOW WE CONNECT TO THE DATABASE
			echo 'Connected';
		}catch(PDOException $e){
			die($e->getMessage());	//If we can't instantiate the PDO, kill the process and print the given error message
		}

	}
	/*
	getInstance(): If the DB object is not instantiated, do so. If it is already instantiated, then return the DB object.
	Basically, if we've connected to the DB on this page already, hand us the object we use to control the DB, otherwise, make us a new object and hand it to us.
	*/
	public static function getInstance(){
		if(!isset(self::$_instance)){										//if $_instance is not set.
			self::$_instance = new DB();									//Set $_instance as a new DB object.
		}	

		return self::$_instance;											//Hand back the DB object
	}

	public function query($sql, $params = array()){
		$this->_error = false; 												//Reset errors
		if($this->_query = $this->_pdo->prepare($sql)){						//Makes sure there is a query and prepares it to be used with SQL.
			$n = 1;															//We will be using wildcards ('?') in the query, this determines the parameters position in the group of wildcards.
			if(count($params)){												//If there ARE parameters.
				foreach ($params as $param){
					$this->_query->bindValue($n, $param);				//In the written query, this line binds the param value to the nth wildcard
					$n++;
				}
			}

			if($this->_query->execute()){									//Execute the query.
				$this->_results = $this->_query->fetchAll(PDO::FETCH_OBJ);	//Fetch the PDO object with our results
				$this->_count = $this->_query->rowCount();					//Count the number of rows in our result
			}else{
				$this->_error=true;											//If we couldn't execute, flag an error.
			}		
		}

		return $this;
	}

	public function error(){
		return $this->_error;												//If there's an error, say so, and vice versa.
	}

	public function count(){
		return $this->_count;												//Tells us how many results we have
	}
}
?>
For Java, I've attached a simple GUI Calculator (I don't use Java professionally, but It is the programming language I am most proficient in):

Code: Select all

import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.lang.Math;

/**
 * The Calculator class builds a calculator object, which takes in two operands and can perform various unary and binary operations.
 * @author Bobby Murray Walsh (ID 113563753)
 */
public class Calculator extends JFrame implements ActionListener{

/**
 * WIDTH determines the width in pixels of the frame.
 * HEIGHT determines the height in pixels.
 * UNARY_ERROR_MESSAGE displays the string if there is no left operand for a unary operation.
 * TOO_MANY_OPERANDS_ERROR displays if there are two operands for a unary operation.
 * NO_OPERANDS_ERROR displays when no operands are input.
 * OUTPUT_BOX_TEXT sets the placeholder text in the output field.
 * TITLE_TEXT sets the text on the title.
 *
 * Operations is an array of strings used to determine the text inside each JButton(which are created in the constructor)
 * ButtonArray is declared to hold the Jbuttons created in the contructor.
 * Textfield1 and textfield2 are declared here and created in the constructor. operand1 and operand2 later read the values of these two textfields.
 * Output is a textfield used to display a result
 */
    private static final int WIDTH = 600;
    private static final int HEIGHT = 300;
    private static final String UNARY_ERROR_MESSAGE = "Error: Left operand needed.";
    private static final String TOO_MANY_OPERANDS_ERROR = "Error: Needs left operand only.";
    private static final String NO_OPERANDS_ERROR = "Error: No operands provided.";
    private static final String OUTPUT_BOX_TEXT = "Output";
    private static final String TITLE_TEXT = "Calculator";

    private static final String[] operations = {"+", "-", "/", "*", "SQRT", "EXPO", "1/X"};
    private static JButton[] buttonArray;
    private static JTextField textField1;
    private static JTextField textField2;
    private static JTextField output;
    private static double operand1;
    private static double operand2;

/**
 * The Calculator constructor creates the JFrame, JTextField and an array of JButtons for each operation. It sets the title, width, height and close operation. The layout is a gridlayout with 4 rows and 2 columns.
 */
    public Calculator(){
        JFrame frame = new JFrame();

        textField1 = new JTextField();
        frame.getContentPane().add(textField1);
        textField2 = new JTextField();
        frame.getContentPane().add(textField2);

        output = new JTextField();
        frame.getContentPane().add(output);
        output.setText(OUTPUT_BOX_TEXT);

        buttonArray = new JButton[8];

        for(int i=0; i<7; i++){
            buttonArray[i] = new JButton(operations[i]);
            frame.getContentPane().add(buttonArray[i]);
            buttonArray[i].addActionListener(this);
         }

        frame.setTitle(TITLE_TEXT);
        frame.setSize(WIDTH, HEIGHT);
        frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
        frame.setLayout(new GridLayout (4, 2));
        frame.setVisible(true);
    }

    public static void main(String[] args) {
        Calculator calculator = new Calculator();
        JFrame frame = new JFrame();
    }
    /**
     * actionPerformed checks for buttons pressed and distinguished which operation to use for each button
     * @param actionEvent This parameter links a button to a certain event
     */
    @Override
    public void actionPerformed(ActionEvent actionEvent){
        if(textField1.getText().equals("") && textField2.getText().equals("")){
            output.setText(NO_OPERANDS_ERROR);
        }
        else if(textField1.getText().equals("")){
                output.setText(UNARY_ERROR_MESSAGE);
        }
        else{
            if(textField2.getText().equals("")){
                if((JButton)actionEvent.getSource() == buttonArray[0]){
                    unaryPlus();
                }
                else if((JButton)actionEvent.getSource() == buttonArray[1]){
                    unaryMinus();
                }
                else if((JButton)actionEvent.getSource() == buttonArray[4]){
                    squareRoot();
                }
                else if((JButton)actionEvent.getSource() == buttonArray[6]){
                    reciprocal();
                }

            }
            else if((JButton)actionEvent.getSource() == buttonArray[0]){
                binaryPlus();
            }
            else if((JButton)actionEvent.getSource() == buttonArray[1]){
                binaryMinus();
            }
            else if((JButton)actionEvent.getSource() == buttonArray[2]){
                divide();
            }
            else if((JButton)actionEvent.getSource() == buttonArray[3]){
                multiply();
            }
            else if((JButton)actionEvent.getSource() == buttonArray[5]){
                exponentiation();
            }
        }
    }
    /**
     * UnaryPlus converts a single Double into it's positive equivalent and displays the result in the output textfield
     */
    public void unaryPlus(){
        operand1 = Double.parseDouble(textField1.getText());
        output.setText("+" + Double.toString(operand1 * 1));
    }
    /**
     * BinaryPlus adds two Doubles together and displays the result in the output box
     */
    public void binaryPlus(){
        operand1 = Double.parseDouble(textField1.getText());
        operand2 = Double.parseDouble(textField2.getText());
        output.setText(Double.toString(operand1 + operand2));
    }
    /**
     * UnaryMinus convers a single Double into it's negative equivalent and displays it to the output textfield
     */
    public void unaryMinus(){
        operand1 = Double.parseDouble(textField1.getText()) * -1;
        output.setText(Double.toString(operand1));
    }
    /**
     * BinaryMinus subtracts two Doubles and displays it to the output textfield
     */
    public void binaryMinus(){
        operand1 = Double.parseDouble(textField1.getText());
        operand2 = Double.parseDouble(textField2.getText());
        output.setText(Double.toString(operand1 - operand2));
    }
    /**
     * Divide divides operand2 into operand1 and displays the result to the output textfield
     */
    public void divide(){
        operand1 = Double.parseDouble(textField1.getText());
        operand2 = Double.parseDouble(textField2.getText());
        output.setText(Double.toString(operand1 / operand2));
    }

    /**
     * Multiply multiplies operand1 by operand2 and displays the result to the output textfield
     */
    public void multiply(){
        operand1 = Double.parseDouble(textField1.getText());
        operand2 = Double.parseDouble(textField2.getText());
        output.setText(Double.toString(operand1 * operand2));
    }

    /**
     * SquareRoot displays the square root of operand1 into the output textfield
     */
    public void squareRoot(){
        operand1 = Double.parseDouble(textField1.getText());
        output.setText(Double.toString(Math.sqrt(operand1)));
    }

    /**
     * Exponentiation displays operand1 to the power of operand 2 into the output textfield
     */
    public void exponentiation(){
        operand1 = Double.parseDouble(textField1.getText());
        operand2 = Double.parseDouble(textField2.getText());
        output.setText(Double.toString((Math.pow(operand1, operand2))));
    }

    /**
     * Reciprocal displays 1 / operand1 to the output textfield
     */
    public void reciprocal(){
        operand1 = Double.parseDouble(textField1.getText());
        output.setText(Double.toString(1 / operand1));
    
    }

}
Fletcher Snowgood

Wiki Edit History: Check me out, son.

Image
Image

User avatar
Abbysynth
Registered user
Posts: 465
Joined: 30 Apr 2015, 21:15
Location: Ottawa, Ontario

Re: TheSlapDoctor Coder Application

Post by Abbysynth » 01 Feb 2016, 22:49

Do you work on manufacturer software or retail/hospital stuff? Ever heard of Nexxus or Kroll? Dunno what you use over in Irelandia

Most of us are North American, how confident are you in learning on your own without a mentor? What did you intend/want to focus your attentions on?

User avatar
TheSlapDoctor
Registered user
Posts: 156
Joined: 11 Sep 2015, 08:45
Location: Ireland

Re: TheSlapDoctor Coder Application

Post by TheSlapDoctor » 01 Feb 2016, 23:12

Abbysynth wrote:Do you work on manufacturer software or retail/hospital stuff? Ever heard of Nexxus or Kroll? Dunno what you use over in Irelandia

Most of us are North American, how confident are you in learning on your own without a mentor? What did you intend/want to focus your attentions on?
I can't tell you much about it, but it's Hospital Equipment Software, and the majority of the code written by our small dev team (3 people) is done in ASP.net MVC

I do most of my editing in Sublime Text, IDEs never sat well with me.


As I said, I'm quite comfortable learning a language once I have practical examples and a platform to work with. It's learning in theory that I struggle with. And regardless, I'm online during the High-Pop times too (playing Spitter 602 right now) so I'll be able to keep in contact.

I'd like to refine the codebase that already exists before moving onto developing new areas. I have a few ideas on how to improve performance, which are pretty baseless until I get a chance to look at the code. I think we can get an awful lot more out of the BYOND engine if we have a focused approach.
Fletcher Snowgood

Wiki Edit History: Check me out, son.

Image
Image

User avatar
Abbysynth
Registered user
Posts: 465
Joined: 30 Apr 2015, 21:15
Location: Ottawa, Ontario

Re: TheSlapDoctor Coder Application

Post by Abbysynth » 02 Feb 2016, 02:10

How often do you play CM or Byond in general? If you play often, what side do you usually play?

User avatar
TheSlapDoctor
Registered user
Posts: 156
Joined: 11 Sep 2015, 08:45
Location: Ireland

Re: TheSlapDoctor Coder Application

Post by TheSlapDoctor » 02 Feb 2016, 10:22

Very frequently, as of the past two weeks I've been playing around three rounds a day. Previously, (since registering his account) the amount I've played varied, from a round every two days to simply playing for most of a day off.

Recently, I've been playing alien, I discovered that I'm very fond of the sentinel caste. However, I play marine only slightly less than alien, and when I do, I've been playing doctor or squad medic, depending on pop.
Fletcher Snowgood

Wiki Edit History: Check me out, son.

Image
Image

User avatar
TR-BlackDragon
Registered user
Posts: 722
Joined: 30 Jul 2015, 17:24
Location: Usa eastern

Re: TheSlapDoctor Coder Application

Post by TR-BlackDragon » 05 Feb 2016, 07:54

I have been seeing them online frequently and so far havn't had any issues with them in game.

User avatar
SecretStamos (Joshuu)
Registered user
Posts: 1291
Joined: 15 Oct 2014, 12:32
Location: Stars & Stripes

Re: TheSlapDoctor Coder Application

Post by SecretStamos (Joshuu) » 05 Feb 2016, 10:24

TR-BlackDragon wrote:I have been seeing them online frequently and so far havn't had any issues with them in game.
Same with me. I've been seeing him a lot and he seems like a pretty responsible player.

User avatar
TheSlapDoctor
Registered user
Posts: 156
Joined: 11 Sep 2015, 08:45
Location: Ireland

Re: TheSlapDoctor Coder Application

Post by TheSlapDoctor » 05 Feb 2016, 15:34

TR-BlackDragon wrote:I have been seeing them online frequently and so far havn't had any issues with them in game.
SecretStamos (Joshuu) wrote:Same with me. I've been seeing him a lot and he seems like a pretty responsible player.
Thanks, guys. I'm really glad to hear it.

If the dev team would like to see more examples of my code, let me know. I've a webpage currently in development, but I'd much rather not link it publicly.
Fletcher Snowgood

Wiki Edit History: Check me out, son.

Image
Image

User avatar
SecretStamos (Joshuu)
Registered user
Posts: 1291
Joined: 15 Oct 2014, 12:32
Location: Stars & Stripes

Re: TheSlapDoctor Coder Application

Post by SecretStamos (Joshuu) » 06 Feb 2016, 16:29

Have you taken a look at much DM code? Does it look like something you could learn?

User avatar
TheSlapDoctor
Registered user
Posts: 156
Joined: 11 Sep 2015, 08:45
Location: Ireland

Re: TheSlapDoctor Coder Application

Post by TheSlapDoctor » 06 Feb 2016, 18:17

I've been reading the BYOND reference, but it's pretty awful. Other than getting to grips with the syntax, I don't see it being a problem at all.

If possible, having someone run me through a working example of code would be a huge help, but I'm working on learning it now.
Fletcher Snowgood

Wiki Edit History: Check me out, son.

Image
Image

User avatar
SecretStamos (Joshuu)
Registered user
Posts: 1291
Joined: 15 Oct 2014, 12:32
Location: Stars & Stripes

Re: TheSlapDoctor Coder Application

Post by SecretStamos (Joshuu) » 06 Feb 2016, 19:26

What I did to get a feel for it was dig through code repos on Github. Most servers publicly host all their code online.

We're on of the (few) closed source servers. But we use DM like everyone else.

User avatar
TheSlapDoctor
Registered user
Posts: 156
Joined: 11 Sep 2015, 08:45
Location: Ireland

Re: TheSlapDoctor Coder Application

Post by TheSlapDoctor » 06 Feb 2016, 19:49

Yeah, I took a look at Bay's repo when I first took an interest in DM.

Which server do you think I'd learn best from? Which would be most relevant out of the open source options?
Fletcher Snowgood

Wiki Edit History: Check me out, son.

Image
Image

User avatar
SecretStamos (Joshuu)
Registered user
Posts: 1291
Joined: 15 Oct 2014, 12:32
Location: Stars & Stripes

Re: TheSlapDoctor Coder Application

Post by SecretStamos (Joshuu) » 06 Feb 2016, 21:01

TheSlapDoctor wrote:Yeah, I took a look at Bay's repo when I first took an interest in DM.

Which server do you think I'd learn best from? Which would be most relevant out of the open source options?
Probably shouldn't matter too much, but we're built off a version of Baystation from last year.

User avatar
TheSlapDoctor
Registered user
Posts: 156
Joined: 11 Sep 2015, 08:45
Location: Ireland

Re: TheSlapDoctor Coder Application

Post by TheSlapDoctor » 08 Feb 2016, 16:10

Cool, I'll take a look at their Repo. MadSnailDisease has offered to help me get a handle on the syntax, so I've got experienced help if I need it.
Fletcher Snowgood

Wiki Edit History: Check me out, son.

Image
Image

User avatar
TheSlapDoctor
Registered user
Posts: 156
Joined: 11 Sep 2015, 08:45
Location: Ireland

Re: TheSlapDoctor Coder Application

Post by TheSlapDoctor » 15 Feb 2016, 11:21

If it's useful to the Dev team, here's another project I worked on.

It's a C Burglar Alarm.

It's designed to run off of an Arduino ATMega328 Microcontroller, and is controlled with an IR remote. It's not relevant at all, but I think it's interesting.

The password to access it is 'byteme'.


Also, I've attached a link to two quick screenshots of a portfolio I've been building for someone using HTML and CSS.

It's a WIP, but was easy to get permission to show you.
Fletcher Snowgood

Wiki Edit History: Check me out, son.

Image
Image

User avatar
apophis775
Host
Host
Posts: 6985
Joined: 22 Aug 2014, 18:05
Location: Ice Colony
Byond: Apophis775
Contact:

Re: TheSlapDoctor Coder Application

Post by apophis775 » 24 Apr 2016, 00:27

Are you still interested?

We've gone through some staff changes recently and I'm sorry it's taken this long to get back to you, but if you're still interested, I'll see about getting a dev to check this over again, and come up with a quick test..

User avatar
TheSlapDoctor
Registered user
Posts: 156
Joined: 11 Sep 2015, 08:45
Location: Ireland

Re: TheSlapDoctor Coder Application

Post by TheSlapDoctor » 14 May 2016, 16:32

Yeah, I'm still interested. I've had less activity because of taking up some new projects, but i can drop one or two to make the time if you're considering it.
Fletcher Snowgood

Wiki Edit History: Check me out, son.

Image
Image

User avatar
Abbysynth
Registered user
Posts: 465
Joined: 30 Apr 2015, 21:15
Location: Ottawa, Ontario

Re: TheSlapDoctor Coder Application

Post by Abbysynth » 19 May 2016, 22:48

An opening will likely appear pretty soon, I hate to tell you to have some more patience, but that's exactly what I'm doing. Sorry! Very soon here means next few days.

User avatar
TheSlapDoctor
Registered user
Posts: 156
Joined: 11 Sep 2015, 08:45
Location: Ireland

Re: TheSlapDoctor Coder Application

Post by TheSlapDoctor » 20 May 2016, 03:48

That's perfect, I'm on vacation anyways. Thanks for the update!
Fletcher Snowgood

Wiki Edit History: Check me out, son.

Image
Image

User avatar
MadSnailDisease
Registered user
Posts: 267
Joined: 20 Dec 2014, 22:05

Re: TheSlapDoctor Coder Application

Post by MadSnailDisease » 22 May 2016, 17:21

Since you don't have a ton of DM experience but more elsewhere, I'me gonna give you a slightly different test.

Please go to one or two other server's GitHub pages. Familiarize yourself with the code somewhat, and make an in-depth outline of a fix for at least one bug reported on the page.

PM me your results, preferable by the end of the month (but not concretely).

User avatar
TheSlapDoctor
Registered user
Posts: 156
Joined: 11 Sep 2015, 08:45
Location: Ireland

Re: TheSlapDoctor Coder Application

Post by TheSlapDoctor » 24 May 2016, 09:00

MadSnailDisease wrote:Since you don't have a ton of DM experience but more elsewhere, I'me gonna give you a slightly different test.

Please go to one or two other server's GitHub pages. Familiarize yourself with the code somewhat, and make an in-depth outline of a fix for at least one bug reported on the page.

PM me your results, preferable by the end of the month (but not concretely).
Sure thing, I'll get on that.
Fletcher Snowgood

Wiki Edit History: Check me out, son.

Image
Image

Locked