
My Experience Working at Lyquix: My First Co-Op Experience
For my first Co-op at Drexel University, I was hired by a small web development based in center city Philadelphia company called Lyquix. While I was initially hesitant to join a small company, I could not be happier with my experience over the past year. Before I signed on, I had taken several classes in web development and was overly confident in both my ability and that web development was not for me. However, this co-op experience opened my eyes to a new side of web development I had never seen before and quickly proved to me that I still had a lot to learn.
Over the six months of my co-op, I worked full time as a junior full-stack developer with two other developers. During this time I worked on several different client sites, learning how to use Wordpress, a content management system, alongside Advanced Custom Fields' Gutenberg Blocks to create modular sites that were easy for non-technical people to edit and maintain. I learned a lot of best practices for coding as well as for development workflow and communicating with a development team. Under the senior developer's leadership, I was able to improve my coding skills in a variety of languages, such as PHP, JavaScript, HTML, and CSS. More importantly, I learned to always ask questions, get clarification, ask for help, document my code, and better communicate complex technical solutions. Here are some client projects I had a large part in building:
As my six month co-op came to an end, Lyquix offered me a part time position while I was in school to help them upgrade their open-source wordpress theme to version 3.x. This version would add a lot of new functionality as well as remove a lot of old, unused functionality. More importantly, it would be based in TypeScript instead of JavaScript, and would incorporate Vue 3 in a lot of their pre-existing modules. Over the next six months, I worked on this new version, converting thousands of lines of code from JavaScript to Microsoft's TypeScript. I also learned Vue in order to transition their commonly used Accordion and Tab modules to be Vue Single-File Components. During this time I also made other small updates to pre-existing client sites and created new functionality for the theme. Here is an example of a function I wrote to validate JSON based on a schema, so that we can check if JSON looks the way we expect it to:
// Return Variable
interface ValidJSON {
data: Object;
err: boolean;
missing: string[];
wrong: string[];
msg: string;
}
// Function to validate JSON data
export function validateData(schema: Object, data: Object, fix: boolean): ValidJSON {
// Global Defalts
const defaults = {
number: 0,
string: "",
object: {},
array: [],
boolean: false,
}
const validJSON: ValidJSON = {
data: {},
err: false,
missing: [],
wrong: [],
msg: "",
};
// Grab the keys present in the schema
const schemaKeys = Object.keys(schema);
// For each key in the schema, check if it is required
for(const key of schemaKeys){
// If the key is required and missing in the data, either flag it or fix it
if(!data[key] && schema[key].hasOwnProperty('required') && schema[key]['required']){
if(fix){
schema[key].hasOwnProperty('default') ? data[key] = schema[key]['default'] : data[key] = defaults[schema[key]['type']];
}
else{
validJSON.err = true;
validJSON.missing.push(key);
}
}
// If the key exists but is of the wrong type, warn the user
else if(data[key] && typeof(data[key]) != schema[key]['type']){
let warnmsg = key+" should be "+schema[key]['type']+" but is of type "+typeof(data[key]);
validJSON.err = true;
validJSON.wrong.push(warnmsg);
}
// If the key exists and is of the right type, but is an object, recursively check its keys
else if(data[key] && typeof(data[key]) == "object"){
let subKeyCheck = validateData(schema[key]['sub_keys'], data[key], fix);
validJSON.data = subKeyCheck.data;
validJSON.err = subKeyCheck.err;
validJSON.missing = validJSON.missing.concat(subKeyCheck.missing);
validJSON.wrong = validJSON.wrong.concat(subKeyCheck.wrong);
}
};
if(validJSON.err){
if(validJSON.missing.length) validJSON.msg += "ERROR: JSON missing key(s): " + validJSON.missing.join(", ");
if(validJSON.wrong.length) validJSON.msg += "Warning: " + validJSON.wrong.join("\n");
}
validJSON.data = data
// Return finalized data
return validJSON;
}