Database Programming
I have professional and curricular experience with various SQL based database languages. While working at Engine Room Technology as a Frontend Dev / Full Stack software developer, I led deployments for the two sites listed here (Northwest Bank and LBBC) which means I was in change of making sure databases were consistent and up to date across local environments, test environments, and production environments. These databases were in MySQL, and I would connect to them through a virtual computer. My coursework was in PostgreSQL, and below I have a video demonstration of a group database project I worked on over covid which presented clear data on covid 19 statistics through schemas.
Network Programming
A class focused on the principles of computer networks, including the OSI reference model and various popular network protocol suites. There was concentration on Unix interprocess communication (IPC), and network programming using TCP and UDP. This was a small assignment on multithreading.
Here is a snippet of my code from the main function:
int main() {
    pthread_t children[NUM_CHILD * (NUM_CHILD-1) + 1];
    children[NUM_CHILD * (NUM_CHILD-1) + 1] = '\0';
    addition * addition_arr[NUM_CHILD * (NUM_CHILD-1) + 1];
    addition_arr[NUM_CHILD * (NUM_CHILD-1) + 1] = '\0';
    for (int i = 0; i < NUM_CHILD-1; i++) {
        for (int j = 1; j <= NUM_CHILD; j++) {
            pthread_t tid;
            printf("Main starting thread add() for [%d + %d]\n", i+1, j);
            addition *a;
            a = calloc(1, sizeof(addition));
            (*a).num1 = i+1;
            (*a).num2 = j;
            addition_arr[(i*NUM_CHILD) + j] = a;
            addition *a_copy;
            a_copy = calloc(1, sizeof(addition));
            (*a_copy).num1 = i+1;
            (*a_copy).num2 = j;
            int val = pthread_create(&tid, NULL, add, (void*)a_copy);
            if (val != 0) {
                /*error*/
                fprintf(stderr, "Could not create pthread\n");
                return -1;
            }
            else {
                /*success*/
                children[(i*NUM_CHILD) + j] = tid;
                printf("Thread %li starting thread add() for [%d + %d]\n", tid, i+1, j);
            }
        }
    }
    /*rejoin the children*/
    for (int m = 0; m < NUM_CHILD-1; m++) {
        for (int n = 1; n <= NUM_CHILD; n++) {
            int sum;
            pthread_join(children[(m*NUM_CHILD) + n], (void**)&sum);
            addition * new_a = addition_arr[(m*NUM_CHILD) + n];
            printf("In main, collecting thread %li computed [%d + %d] = %d\n", children[(m*NUM_CHILD) + n], (*new_a).num1, (*new_a).num2, sum);
            free(addition_arr[(m*NUM_CHILD) + n]);
        }
    }
}

Also from network programming, this was an assignment on client / server communication. We utilized a network of nodes that could communicate if they were within a certain distance of one another.
Here is part of the main method in the client file:
    /* set up the control port*/
    char* control_addr = argv[1]; //plug into getaddr to get ip address then connect
    int control_port = atoi(argv[2]);
    /* read in to make the client*/
    char* id = argv[3];
    int range = atoi(argv[4]);
    int xpos = atoi(argv[5]);
    int ypos = atoi(argv[6]);
    struct addrinfo hints;
    struct addrinfo *res;
    client sensor_client;
    memset(sensor_client.id, '\0', 100);
    memcpy(sensor_client.id, id, strlen(id));
    sensor_client.xpos = xpos;
    sensor_client.ypos = ypos;
    sensor_client.range = range;
    hints.ai_family = AF_UNSPEC;
    hints.ai_socktype = SOCK_DGRAM;
    hints.ai_flags = AI_PASSIVE;
    getaddrinfo(control_addr, NULL, &hints, &res);
    char address[1024];
    memset(address, '\0', 1024);
    getnameinfo(res->ai_addr, res->ai_addrlen, address, sizeof(address), NULL, 0, NI_NUMERICHOST);
    int sock = socket(AF_INET, SOCK_STREAM, 0);
    struct sockaddr_in serv_addr;
    memset(&serv_addr, 0x00, sizeof(serv_addr));
    serv_addr.sin_family = AF_INET;
    serv_addr.sin_port = htons(control_port);
    inet_pton(AF_INET, address, &serv_addr.sin_addr);
    /*try to connect to the server, check if it failed*/
    int success = connect(sock, (struct sockaddr *)&serv_addr, sizeof(serv_addr));
    if (success != 0){
        fprintf(stderr, "Connect failed, errno is %d, string is %s\n", errno, strerror(errno));
    }

See the rest of the client file, as well as the server file on my github: https://github.com/marymonty/sample_code/tree/master/c/NetworkProgramming
Back to Top