Counter Resets and Database Magic

Recently, the need for a standard numbering convention came up for one of our projects at work. The client requested to be able to access protocols by a unique ID. Originally I thought it’d be a no brainer, I’d explain to them that the each protocol is already uniquely identifiable within the database, and they can just refer to protocols by their unique ID in the database. Unfortunately, they didn’t seem too fond of the unique ID numbering scheme and proposed that the application follow a certain convention, which they created....

December 8, 2013

Flatten Dictionary Challenge

While browsing /r/javascript Thursday night, I came across a post regrading a mildly interesting interview question which had to do with flattening a Javascript object to a URI. Two things immediately jumped into my mind: I have to show one of my coworkers. This would make a “midly interesting” Python challenge! Friday morning, the first thing I did when I got into work was write the challenge on our white board and my solution in Python....

November 17, 2013

More TDD and Recursion Practice

It seems that Javascript challenges are more frequent at work. Thursday afternoon when we got back from lunch, my coworker was testing himself in the You Can’t Javascript Under Pressure challenges. As great coworkers, we (by that I mean, me) decided to help out and put more pressure on our fellow coworker, without even being asked to! One of the challenges that came up during the test was a function ArraySum() which accepts a list (array) of values and you must total all the integers within the array....

November 14, 2013

Why Barakyo?

Over this past weekend I was asked, twice, “Why Barakyo?” While the explanation is simple enough, I sometimes get the response that my Barakyo nickname isn’t professional. I’ve even been told I should consider choosing another domain name. While I understand that my nickname isn’t professional and even though I share my blog with companies that I am interested in, I didn’t want to strip my blog of me, hence the reason for the personal category....

November 12, 2013

Writing Test Cases for Laravel

Besides writing test cases just because “everyone else is”, we should be writing test cases since they’ll help create a stronger trust in our code that our functions are doing what they should be doing. Requirements PHP PHPUnit (you will most likely need a global install) Test Cases (DUH) Helpers Helpers are a set of classes that we create to take care of common mundane tasks. For example, the User Helper for testing provides functions for returning a user with a specified role or easily create a new user with the specified role if one does not exist or the user requests one....

November 10, 2013

Python Excel XLRD and XLWT

The other week we received a request for a small script from a department on campus. The department needed to evaluate data from a Microsoft Excel worksheet which they wrote a macro for. Their problem, though, was to aggregate all their data into one sheet. This aggregation process was not only the most tedious but was also their longest task taking nearly 2 weeks to complete. My coworkers and I were shocked that they’ve continued this process for so long without looking to automate it somehow, so we took on the challenge to ease the pain in their lives....

May 29, 2013