About Me Goals and Personality






My name is Dennis (Trey) Ivy, Jr. and I am a software developer and consultant. I firmly believe in hard work, honesty and perseverance. My current goal is to continually improve my skill set and find a position that will afford me opportunities for professional growth and financial stability. My long-term goal is to own a successful small business. To learn more about me, please visit my facebook profile and send me a friend request. Please feel free to reach out and call me for an interview. You may also click on the infographic for a summary of the results from an online personality profile test taken at talentoday.com. I scored as assertive, outgoing, determined and proactive.

Personality Radar

Education Formal Academic Training

I believe education is a life-long endeavor. I learn best from reading, practice and self-study, but I appreciate a good teacher. I enjoy learning anything new and I always excel in my academic pursuits.

  • (Full Ride) Presidential Academic Scholarship Award
  • Double Major in Computer Science and Math
  • Multiple Dean's List Awards
  • Alpha Lambda Delta Honors Fraternity
  • Founded Student Organization LANTech (Online Game Club)
  • United States Army Cryptolinguistic Analyst
  • Korean language training program
  • Approximately equivalent to Associate Degree
  • Learned to read and write some chinese characters
  • Top Secret Security Clearance
  • 4.0 GPA
  • 4.0 GPA in Accelerated Placement Program
  • 4th in class with High Honors
  • National Honors Society
  • Student of the Year, several subjects
  • Debate Team (State Qualifiers)
  • Soccer

Certifications


Key Skills Expertise

Technology

Integrations

My primary specialty is getting computer systems to talk to each other. Keeping enterprise applications and systems in sync with both internal tools and external vendor systems is no small task, especially on large scale implementations. As integrations evolve from periodic batch process flat files to real time transactional syncs performed via Rest API calls the landscape and range of possible data interchange methodologies and architectures continues to expand. Today's companies demand more robust solutions and flexibility that allow them to leverage legacy talent, stay competitive in a fast paced international business landscape and reduce overhead. As an experienced integrations architect, I help guide approaches, recommend industry best practices and troubleshoot performance bottlenecks to keep clients innovative and connected with their partners and service providers.

Security

Data in transit is at its most vulnerable. Understanding and leveraging the latest encryption tools and protecting personal data is no longer optional, its essential. Designing and configuring access policies and working to refine corporate security governance standards and protocols is all part of an effective and secure integrations architecture. I work with companies of all sizes and levels of sophistication spanning across multiple industries in both the public and private sectors to design safe transmission system that minimize risk and adhere to industry leading best practices.

Software Development

I have a solid grasp of object oriented programming. I'm well-versed in strongly-typed and interpreted c-based languages including C#, Java, python, etc. I try to stay current with all the pertinent libraries and plugins so I can increase productivity and speed up the development process. I truly enjoy learning about design patterns and algorithms and I'm (somewhat) active on programming challenge sites such as Hackerank and TopCoder, etc. I like solving complicated programming problems and learning about new and interesting ways to reduce asymptotic complexity and improve run-time. Feel free to browse my hackerrank profile , check out my github , or jump to code samples .

Web Development

I'm also experienced in web development and design. Most recently, I've worked with the .NET core platform but in the past I've used web forms and ASP.NET MVC as well as WebForm/MVC hybrids using ORMs such as hibernate and Entity. I've also done a lot of experimentation and programming in the LAMP stack (Linux, Apache, MySQL, PHP) I have extensive experience with SOAP and REST web services and APIs such as google, facebook, ebay, etc. I also know JSON, XML, XSLT, etc. Please visit some of the sites I'm currenrly developeing to learn more.

Languages

  • C#
  • Javascript/JQuery
  • Python
  • Java
  • HTML/CSS
  • XSLT/XPath

Technologies

  • Workday
  • HTTP
  • MVC
  • WebForms
  • Entity Framework
  • Bootstrap
  • REST
  • SOAP

Methodologies

  • Agile
  • Scrum
  • Design Thinking
  • Garage
  • Waterfall
  • Etc

Leadership

I have excellent leadership skills and know how to motivate people. In the military I served as a squad leader and platoon leader. I also had my own personal training business for two years and I got daily practice leading both small and medium sized groups, as well as individuals. Additionally, I've managed and supervised employees, subcontractors, laborers and peers. I'm comfortable serving in a leadership role and equally comfortable following orders.

Project Management


I have good project management skills and experience across a wide array of industries leading everything from large and medium enterprise integrations implementations to cellular network tower installations and buildouts. I am organized, diligent and communicative and bring projects in on time and under budget with a high rate of customer satisfaction in a demanding and competitive industry. I know that documentation in all phases of the project management process is key and I strive to always be available for my clients. I hate the idea that something is 'not my job' or cannot be done and I work with stakeholders and team members to find solutions and workarounds.


Work Experience Employment History

Integrations Architect

2018 - Present
IBM
Armonk, NY
  • Design and Lead Workday Implementation Integrations Efforts
    • Coordinate with clients, third-party vendors, workday and internal team members to establish timelines, identify deliverables, design and build solutions, provide production support, etc.

    • Bring projects in on time and under budge with high net promoter scores and customer satisfaction

    • Large and Medium Enterprise Clients including customer such as Newscorp, Horizon Blue Cross Blue Shield of NJ, SunRun, etc.

    • Way too many vendors to list, but everything from financial institutions to time tracking vendors to benefits providers to SSO and Identity Management, to retirement savings, etc. Here are a few:

      • Prudential
      • Met Life
      • Wells Fargo
      • United Health Care
      • Cigna
      • Etc. etc. etc....
  • Create custom studio integrations
    • Design, prototype, build and support complex, real-time, mission critical integrations for syncing data between external systems
    • Java, MVEL, Eclipse, XSLT, XML, SOAP, REST, JSON, etc.
  • Internal Document Repository
    • https://ibm-workday-kb.mybluemix.net
    • Created a custom .NET website that fosters collaboration and innovation by awarding points to consultants who share their designs and code with other team members.
    • This application is written on the ASP.NET Core 2.1x framework in the C# programming language using the MVC/MVVM/MV* Design Pattern(s) and hosted on IBM Cloud (formerly bluemix) running as a cloud foundry app.
    • The front end is standard bootstrap 3 with jQuery (and plain vanilla js) for client side processing. The app is designed to be browser independent, mobile first, responsive, asynchronous, loosely coupled and lightweight.
    • Authentication is via OIDC (OpenID Connect) and is an identity layer built on top of the of the OAuth 2.0 protocol using standard employee IBM w3id credentials for user claims.
    • Artifacts are stored in a Github Repository. Github API authentication is performed as a github app using RSA256 encryption key signing for authentication headers and the OAuth 2.0 bearer token exchange flow.
    • Artifact/Solution Metadata and user points information is stored in a PostgreSQL database service hosted on IBM Cloud and uses the code first approach with the entity framework as an ORM

Senior Integrations Consultant

2015 - 2018
Onesource Virtual
Irving, TX
  • Lead Workday Implementation Integrations Efforts
    • Coordinate with clients, third-party vendors, workday and internal team members to establish timelines, deliverables, design, build, production and support efforts

    • Bring projects in on time and under budge with high net promoter scores and customer satisfaction

    • Large and Medium Enterprise Clients including customer such as Walmart, Jet.com, The Children's Place, FINRA and others.

    • Way too many vendors to list, but everything from financial institutions to time tracking vendors to benefits providers to SSO and Identity Management, to retirement savings to restricted stock purchases, etc. Here are a few:

      • Bank of America/Merrill Lynch
      • T Rowe Price
      • Met Life
      • Blue Cross Blue Shield (Multiple states)
      • Wells Fargo
      • United Health Care
      • Cigna
      • Etc. etc. etc....
  • Create custom studio integrations
    • Design, prototype, build and support complex, real-time, mission critical integrations for syncing data between external systems
    • Java, MVEL, Eclipse, XSLT, XML, SOAP, REST, JSON, etc.
  • Hackathon team leader 2017
    • Created a custom chromecast integration to pull data out of workday and display on big board Workday Big Board
    • Visual Presentation services solution to integrate workday, slack and hey-taco
  • Create a custom realtime .NET solution to integrate slack and workday
    • Allow users to award badges and post feedback in slack using a slash command /kudos
    • Triggers feedback in workday
    • Leaderboards, rankings, milestones, etc.

Systems Integration Engineer

2014 - 2015
Selerix Inc
McKinney, TX
  • Architect and implement Selerix ACA reporting products
    • Design lookback report to identify transitional employees trending towards health care eligibility as well as logic to populate IRS Forms:

      • 1095-C
      • 1094-C
      • 1095-B
      • 1094-B
    • Resulting influx of clients utilizing ACA reporting revitalized the company and increased sales and revenue.

  • Create custom system data extracts and payroll files in various formats
    • Design and implement extracts to work across multiple cases and platforms for employers, insurance companies, third-party administrators, etc.
    • Formats:
      • Excel
      • HTML
      • CSV
      • Text
      • XML
      • PDF
      • Etc.
  • Daily use of programming languages and technologies
    • Javascript/JScript
    • C#
    • Web Forms
    • XSLT
  • Coordinate and create custom data imports for client data
    • Communicate with case managers and clients to gather requirements and existing data files.
    • Combine client data with scripting and proprietary software to massage data into format useable by Selerix systems.
  • Write unit tests, find and fix bugs, use collaborative software
    • Write unit tests for my own and other developers code using Mocking to create repeatable regression test suites for rate cards and Critical Illness engines.
    • Collaborative Software:
      • Microsoft Team Foundation Server (TFS)
      • GIT
      • Tortise SVN
      • Microsoft Dynamics
      • Bugzilla
      • Sharepoint

Web Developer

2012 - 2014
Fitness-IQ.com, LLC
Dallas, TX
  • Self employed full-stack development (Linux/Apache/MySQL/PHP)
    • I like to experiment with linux and I remember running RedHat 5 on an old box in my college dorm room, but I'm not a linux guru and although it may take me some time to research it, I can usually get things done.
    • Same thing with Apache webserver. I can find out how to do anything with it but it doesn't just fly off my fingers.
    • Mostly command line SQL to create and manage tables but I'm familiar with a few GUIs and other tools as well.
    • I cut my teeth learning about dynamic web development using PHP. See an example of my PHP programming skills.
  • Relational Database design and management.
    • I have a solid understanding of database design and persistant storage principles. I know the difference between an inner join and a left join and I understand concepts such as normalization and how to organize and map relationships between entities, etc., but I'm not an expert database administrator
  • Social media management.
    • Used OAuth to provide users an SSO option, thus enabling them to sign in using their facebook, google or microsoft credentials.
    • I have also worked as a social media manager creating facebook pages, applications twitter and instagram accounts, etc. I'm currently working on a tool that will push news and updates to several social media services at once as well as publishing to an RSS feed and/or blog on the originating site.
  • Create software tools to help clients improve their health and fitness.
    • I designed and implemented a calculator that used circumference measurements to determine a person's body fat percentage by averaging the results of several methods.
    • BMI Calculator that calculates an individual's Body Mass Index
    • Ideal Weight Estimator given a person's desired body fat percentage and current lean mass as derived from weight and current body fat percentage, this tool calculates their ideal weight.
    • BMR calculator to determine Basal Metabolic Rate
    • Macronutritional Requirements calculator determines the number of grams of protein, fats and carbohydrates a person must consume on a daily basis to meet different fitness goals such as loose fat, gain muscle or maintain.
    • Etc.
  • Work with affiliate programs and APIs to provide richer content.
    • Through affiliate marketing programs, managed and sold fitness gear, clothing and supplements and turned a profit.
    • Used Google API for creating custom searches, graphs, etc.
    • Also used other APIs such as Paypal, Ebay, etc.
  • Daily use of HTML, CSS, PHP, SQL, etc.

Project Manager

2005-2007
Berliner Communications
Forney, TX
  • Organize the building of cellular sites all over DFW for carriers:
      • Sprint/NEXTel
      • Verizon
      • AT&T
      • MetroPCS
      • etc.
  • Daily duties included the following:
    • Hiring and managing sub contractors
    • Estimate labor and materials for jobs
    • Deal with customers, suppliers, billing, etc.
  • Monitor and Track Project Progress
    • Designed an access database tracking system with a VBA front end to help track costs, materials, shipping, and project milestones.
  • Networked office computers, installed office phone systems, etc.

Cryptolinguistic Analyst

2001-2004
United States Army
Monterey, CA
  • Job Description: Currently MOS 35P (formerly MOS 98G)
  • 221st Military Intelligence Battaliion, Alpha Company
  • Basic Training at Fort Leonard Wood, Missouri
  • Advanced Individual Training at DLIFLC, Monterrey, CA
  • Top Secret Security Clearance

Code Samples

Fraud Prevention Example



This program helps detect and prevent fraudulent credit card purchases. The solution is DRY and fast with an asymptotic complexity of Θ(n log n) The majority of the code is defensive programming and error handling. Data is read from a file and creates a dictionary of objects indexed by transaction id. LINQ queries filter the list down to possible fraudulent entries. You can view the problem description , download this file , or see all my solutions on github

  1. /* solves the problem posted at http://www.hackerrank.com/challenges/fraud-prevention */
  2. using System;
  3. using System.Linq;
  4. using System.Collections.Generic;
  5. using System.Text;
  6. class FraudPrevention
  7. {
  8. static void Main(String[] args)
  9. {
  10. var file = new System.IO.StreamReader(@"C:\path\file.txt");
  11. Console.SetIn(file);
  12. int numRecords = int.Parse(Console.ReadLine());
  13. var FraudulentOrders = new HashSet();
  14. var Orderz = new Dictionary();
  15. for (int i = 0; i < numRecords; i++)
  16. {
  17. var o = new Order(Console.ReadLine().Split(','));
  18. Orderz[o.OrderID] = o;
  19. }
  20. foreach (var deal in Order.DealIDs)
  21. {
  22. if (deal.Value.Count > 1)
  23. {
  24. var byDeal = new List(); //create a list of orders (small list)
  25. foreach (var id in deal.Value) //foreach item with this deal ID
  26. {
  27. byDeal.Add(Orderz[id]); //create a list of objects
  28. }
  29. var byEmail = byDeal.GroupBy (x => x.Email ).Where(x => x.Count() > 1 ).SelectMany(x => x);
  30. var byAdds = byDeal.GroupBy (x => x.Address).Where(x => x.Count() > 1 ).SelectMany(x => x);
  31. var byE_CC = byEmail.GroupBy(x => x.ccNum ).Where(x => x.Count() >= 1).SelectMany(x => x);
  32. var byA_CC = byAdds.GroupBy (x => x.ccNum ).Where(x => x.Count() == 1).SelectMany(x => x);
  33. foreach (var item in byE_CC)
  34. {
  35. FraudulentOrders.Add(item.OrderID);
  36. }
  37. foreach (var item in byA_CC)
  38. {
  39. FraudulentOrders.Add(item.OrderID);
  40. }
  41. }
  42. }
  43. var answer = new StringBuilder();
  44. foreach (var item in FraudulentOrders.OrderBy(x => x))
  45. {
  46. answer.Append(item + ",");
  47. }
  48. Console.WriteLine(answer.ToString().Substring(0, answer.Length - 1));
  49. }
  50. ///
  51. /// the order class
  52. ///
  53. public class Order
  54. {
  55. ///
  56. /// a unique collection of orderids
  57. ///
  58. private HashSet OrderIDs = new HashSet(); //ensures orderID uniqueness
  59. ///
  60. /// a collection of deal ids
  61. ///
  62. public static Dictionary> DealIDs = new Dictionary>();
  63. ///
  64. /// the id for the order
  65. ///
  66. public int OrderID { get; set; }
  67. ///
  68. /// the id for the deal
  69. ///
  70. public int DealID { get; set; }
  71. ///
  72. /// the full email
  73. ///
  74. public Tuple Email
  75. {
  76. get { return new Tuple(this.User, this.Domain); }
  77. }
  78. ///
  79. /// the user
  80. ///
  81. public string User { get; set; }
  82. ///
  83. /// the email domain
  84. ///
  85. public string Domain { get; set; }
  86. ///
  87. /// a tuple representation of the address
  88. ///
  89. public Tuple Address
  90. {
  91. get { return new Tuple(this.Street, this.City, this.State, this.Zip); }
  92. }
  93. ///
  94. /// the city
  95. ///
  96. public string City { get; set; }
  97. ///
  98. /// the street address
  99. ///
  100. public string Street { get; set; }
  101. ///
  102. /// the state
  103. ///
  104. public string State { get; set; }
  105. ///
  106. /// the zip code
  107. ///
  108. public int Zip { get; set; }
  109. ///
  110. /// the credit card number
  111. ///
  112. public long ccNum { get; set; }
  113. ///
  114. /// constructor which takes a string array
  115. ///
  116. ///
  117. public Order(string[] s)
  118. {
  119. if (s.Length != 8)
  120. {
  121. throw new Exception("Wrong Number of fields in record");
  122. }
  123. try
  124. {
  125. var orderID = int.Parse(s[0]);
  126. if (!this.OrderIDs.Add(orderID))
  127. {
  128. throw new Exception("Order ID is not Unique!");
  129. }
  130. else
  131. {
  132. this.OrderID = orderID;
  133. }
  134. }
  135. catch (Exception e)
  136. {
  137. throw new Exception("Order ID creation Error:", e);
  138. }
  139. try
  140. {
  141. this.DealID = int.Parse(s[1]);
  142. if (DealIDs.ContainsKey(this.DealID))
  143. {
  144. DealIDs[this.DealID].Add(this.OrderID);
  145. }
  146. else
  147. {
  148. DealIDs.Add(this.DealID, new List()); //add key and initialize list
  149. DealIDs[this.DealID].Add(this.OrderID); //and add this to the list
  150. }
  151. }
  152. catch
  153. {
  154. throw new Exception("Deal ID creation Error");
  155. }
  156. try
  157. {
  158. var email = s[2].ToLower();
  159. int pos = email.IndexOf("@");
  160. if (pos < 0)
  161. {
  162. throw new Exception("Must contain @");
  163. }
  164. var user = email.Substring(0, pos); //split
  165. var domain = email.Substring(pos + 1);
  166. if (!domain.Contains("."))
  167. {
  168. throw new Exception("Domain Error, no '.' found");
  169. }
  170. while (user.Contains("."))
  171. {
  172. pos = user.IndexOf("."); //find them
  173. user = user.Remove(pos, 1); //and remove them
  174. }
  175. if (user.Contains("+"))
  176. {
  177. pos = user.IndexOf("+"); //find the first
  178. user = user.Remove(pos); //and remove everything after
  179. }
  180. this.User = user;
  181. this.Domain = domain;
  182. }
  183. catch (Exception e)
  184. {
  185. throw new Exception("Invalid Email Address:", e);
  186. }
  187. try
  188. {
  189. var street = s[3].ToLower();
  190. var city = s[4].ToLower();
  191. var state = s[5].ToLower();
  192. var zip = s[6];
  193. int pos = zip.IndexOf('-');
  194. if (pos > 0)
  195. {
  196. zip = zip.Remove(pos, 1);
  197. }
  198. try
  199. {
  200. this.Zip = int.Parse(zip);
  201. }
  202. catch
  203. {
  204. throw new Exception("Zipcode Error");
  205. }
  206. if (street.Contains("street"))
  207. {
  208. street = street.Replace("street", "st.");
  209. }
  210. if (street.Contains("road"))
  211. {
  212. street = street.Replace("road", "rd.");
  213. }
  214. switch (state)
  215. {
  216. case "illinois":
  217. state = "il";
  218. break;
  219. case "new york":
  220. state = "ny";
  221. break;
  222. case "california":
  223. state = "ca";
  224. break;
  225. //todo: implement additional states switches
  226. }
  227. this.Street = street;
  228. this.City = city;
  229. this.State = state;
  230. }
  231. catch (Exception e)
  232. {
  233. throw new Exception("Problem with Address:", e);
  234. }
  235. var cc = s[7].Trim();
  236. try
  237. {
  238. this.ccNum = long.Parse(cc);
  239. }
  240. catch
  241. {
  242. throw new Exception("Credit Card Number contains invalid characters");
  243. }
  244. }
  245. ///
  246. /// Overrides the ToString() method to provide additional information for debugging
  247. ///
  248. ///
  249. public override string ToString()
  250. {
  251. StringBuilder sb = new StringBuilder();
  252. sb.Append( "================================" +
  253. "\n Order Details:" +
  254. "\n================================" +
  255. "\nOrderID = " + this.OrderID +
  256. "\nDealID = " + this.DealID +
  257. "\nEmail = " + this.User + "@" + this.Domain +
  258. "\nccNum = " + this.ccNum +
  259. "\nAddress = " + this.Street +
  260. "\n " + this.City + ", " +
  261. this.State.ToUpper() + ", " +
  262. this.Zip);
  263. return sb.ToString();
  264. }
  265. }
  266. }

MIT Shortest Path Problem



The following program uses object oriented python to solve the problemset posted at the Massechusetts Institute of Technology Open CourseWare (MIT OCW) site, Course number 6.00SC, Lecture 24. The goal of this particular problem is to find the fastest way around the MIT campus and compare a brute force technique with a dynamic programming solution. I enjoyed watching the lectures and working through all the problem sets for this online course. For an extra challenge, I reworked all the solutions, unit tests and helper functions from Python 2.x to Python 3 This is the final problem set for the class. If you're interested, I posted all my answers to all the problem sets on github To download this file, click the icon

  1. ###################################################################
  2. ## Dennis Tracy Ivy, Jr.
  3. ## 04/2/2014
  4. ## self study of MIT 6.00
  5. ## ps11 - optimization, dynamic programming, graphs, etc
  6. ###################################################################
  7. import string
  8. #class for node objects
  9. class Node(object):
  10. def __init__(self, name):
  11. self.name = str(name)
  12. def getName(self):
  13. return self.name
  14. def __str__(self):
  15. return self.name
  16. def __repr__(self):
  17. return self.name
  18. def __eq__(self, other):
  19. return self.name == other.name
  20. def __ne__(self, other):
  21. return not self.__eq__(other)
  22. #class for edges
  23. class Edge(object):
  24. def __init__(self, src, dest):
  25. self.src = src
  26. self.dest = dest
  27. def getSource(self):
  28. return self.src
  29. def getDestination(self):
  30. return self.dest
  31. def __str__(self):
  32. return str(self.src) + '->' + str(self.dest)
  33. #weighted edges(extends edge)
  34. class WEdge(Edge):
  35. def __init__(self, src, dest, distance, outdoor):
  36. self.src = src
  37. self.dest = dest
  38. self.distance = int(distance)
  39. self.outdoor = int(outdoor)
  40. def getSource(self):
  41. return self.src
  42. def getDestination(self):
  43. return self.dest
  44. def getDistance(self):
  45. return int(self.distance)
  46. def getOutdoorDistance(self):
  47. return int(self.outdoor)
  48. def __str__(self):
  49. return str(self.src.getName().rjust(2) ) + '->' + \
  50. str(self.dest.getName().ljust(2) ) + \
  51. ' distance=' + str(self.distance).rjust(3) + \
  52. ' outdoor=' + str(self.outdoor).rjust(3)
  53. #digraph
  54. class Digraph(object):
  55. def __init__(self):
  56. self.nodes = []
  57. self.edges = {}
  58. #add a node to the graph
  59. def addNode(self, node):
  60. if node in self.nodes:
  61. #print("Duplicate Node!")
  62. raise ValueError('Duplicate node')
  63. else:
  64. if type(node) != Node:
  65. raise TypeError
  66. self.nodes.append(node)
  67. self.edges[str(node)] = []
  68. #add an edge to the graph
  69. def addEdge(self, edge):
  70. src = edge.getSource()
  71. dest = edge.getDestination()
  72. if not(src in self.nodes and dest in self.nodes):
  73. #print ("Node not in graph!")
  74. raise ValueError('Node not in graph')
  75. self.edges[str(src)].append(edge)
  76. #get this nodes children
  77. def childrenOf(self, node):
  78. return self.edges[ str(node) ]
  79. #check if node exists in graph
  80. def hasNode(self, node):
  81. if node in self.nodes:
  82. return True
  83. else: return False
  84. #calc the path length
  85. def calcPathLength(self, path, toPrint=False):
  86. distances=[]
  87. outdoors=[]
  88. for i in range (0,len(path)-1):
  89. d,o = self.distanceFromParentToChild(Node(path[i]),Node(path[i+1]))
  90. distances.append(d)
  91. outdoors.append(o)
  92. if toPrint==True:
  93. print (str(sum(distances)).rjust(3), "/", str(sum(outdoors)).ljust(3))
  94. return ( sum(distances), sum(outdoors) )
  95. #distance from parent node to child node
  96. def distanceFromParentToChild(self, src, dest):
  97. for i in self.edges[str(src)]:
  98. if i.getDestination() == dest:
  99. return (i.getDistance(), i.getOutdoorDistance())
  100. #pretty print
  101. def __str__(self):
  102. res = ''
  103. for k in sorted(self.edges):
  104. for d in self.edges[k]:
  105. res = res + str(d) + '\n'
  106. return res[:-1]
  107. #read the map and create a digraph
  108. def load_map(mapFilename):
  109. print ("Loading map from file...")
  110. g=Digraph()
  111. if type(mapFilename) != str:
  112. raise FileNotFoundError("Trouble opening" + mapFilename)
  113. with open(mapFilename, 'r') as f:
  114. for line in f:
  115. try:
  116. src,dest,dist,outdoor = line.split()
  117. except:
  118. raise Exception("Trouble reading from file" + mapFilename)
  119. src_node = Node(src)
  120. dest_node = Node(dest)
  121. if not g.hasNode(src_node) : g.addNode(src_node)
  122. if not g.hasNode(dest_node) : g.addNode(dest_node)
  123. edge=WEdge(src_node,dest_node,dist,outdoor)
  124. g.addEdge(edge)
  125. #with open("graph.txt", 'w') as out:
  126. # out.write(str(g))
  127. #print(g)
  128. return g
  129. ###################################################################
  130. #recursive function to find the shortest path thru the graph using
  131. #brute force exhaustive depth first search
  132. ###################################################################
  133. def bruteForceSearch(digraph, start, end, maxTotalDist, maxDistOutdoors, visited=None, counter=0):
  134. if visited == None : visited = []
  135. try:
  136. start = Node(start)
  137. end = Node(end)
  138. except:
  139. raise ChildProcessError('Unable to create nodes')
  140. if not ( digraph.hasNode(start) and digraph.hasNode(end) ):
  141. raise ValueError("Start or End does not exist")
  142. path = [str(start)]
  143. if start == end : return path
  144. shortest = None
  145. bestPath = None
  146. for node in digraph.childrenOf(start):
  147. destination = node.getDestination()
  148. if ( str(destination) not in visited ):
  149. visited = visited + [str(destination)]
  150. newPath = bruteForceSearch(digraph,
  151. destination,
  152. end,
  153. maxTotalDist,
  154. maxDistOutdoors,
  155. visited,
  156. counter=counter+1)
  157. if newPath == None :
  158. continue
  159. currentPath,outdoor=digraph.calcPathLength(path + newPath)
  160. if outdoor > maxDistOutdoors or currentPath > maxTotalDist:
  161. visited.remove(str(destination))
  162. continue
  163. currentPath, outdoor=digraph.calcPathLength(newPath)
  164. if bestPath == None or (currentPath < bestPath):
  165. shortest = newPath
  166. bestPath,outdoor = digraph.calcPathLength(shortest)
  167. if shortest != None:
  168. return path + shortest
  169. else :
  170. if counter==0: raise ValueError
  171. return None
  172. ###################################################################
  173. #recursive function to find the shortest path thru the graph using
  174. #directed depth first search w/memoization/dynamic programming
  175. ###################################################################
  176. def directedDFS(digraph, start, end, maxTotalDist, maxDistOutdoors,visited = None, memo = None, counter=0):
  177. if visited == None : visited = []
  178. if memo == None : memo = {}
  179. start = Node(start)
  180. end = Node(end)
  181. if not (digraph.hasNode(start) and digraph.hasNode(end)):
  182. raise ValueError("Start or End does not exist")
  183. path = [str(start)]
  184. if start == end : return path
  185. shortest = None
  186. bestPath = None
  187. for node in digraph.childrenOf(start):
  188. destination = node.getDestination()
  189. if ( str(destination) not in visited ):
  190. visited = visited + [str(destination)]
  191. try:
  192. newPath = memo[str(destination),str(end)]
  193. except:
  194. newPath = directedDFS (digraph,
  195. destination,
  196. end,
  197. maxTotalDist,
  198. maxDistOutdoors,
  199. visited,
  200. memo,
  201. counter=counter+1)
  202. if newPath == None :
  203. continue
  204. currentPath,outdoor=digraph.calcPathLength(path + newPath)
  205. if outdoor > maxDistOutdoors or currentPath > maxTotalDist:
  206. visited.remove(str(destination))
  207. try:
  208. del(memo[str(destination),str(end)])
  209. except:
  210. pass
  211. continue
  212. currentPath, outdoor=digraph.calcPathLength(newPath)
  213. if bestPath == None or (currentPath < bestPath):
  214. shortest = newPath
  215. bestPath,outdoor = digraph.calcPathLength(shortest)
  216. memo[str(destination), str(end)] = newPath
  217. if shortest != None:
  218. return path + shortest
  219. else :
  220. if counter==0: raise ValueError
  221. return None
  222. ###################################################################
  223. #### The following unit tests are part of this assignment,
  224. ###################################################################
  225. if __name__ == '__main__':
  226. LARGE_DIST = 1000000
  227. digraph = load_map("mit_map.txt")
  228. # Test case 1
  229. print ("---------------")
  230. print ("Test case 1:")
  231. print ("Find the shortest-path from Building 32 to 56")
  232. expectedPath1 = ['32', '56']
  233. print ("Expected: ", expectedPath1)
  234. brutePath1 = bruteForceSearch(digraph, '32', '56', LARGE_DIST, LARGE_DIST)
  235. print ("Brute-force: ", brutePath1)
  236. dfsPath1 = directedDFS(digraph, '32', '56', LARGE_DIST, LARGE_DIST)
  237. print ("DFS: ", dfsPath1)
  238. # Test case 2
  239. print ("---------------")
  240. print ("Test case 2:")
  241. print ("Find the shortest-path from Building 32 to 56 without going outdoors")
  242. expectedPath2 = ['32', '36', '26', '16', '56']
  243. print ("Expected: ", expectedPath2)
  244. brutePath2 = bruteForceSearch(digraph, '32', '56', LARGE_DIST, 0)
  245. print ("Brute-force: ", brutePath2)
  246. dfsPath2 = directedDFS(digraph, '32', '56', LARGE_DIST, 0)
  247. print ("DFS: ", dfsPath2)
  248. # Test case 3
  249. print ("---------------")
  250. print ("Test case 3:")
  251. print ("Find the shortest-path from Building 2 to 9")
  252. expectedPath3 = ['2', '3', '7', '9']
  253. print ("Expected: ", expectedPath3)
  254. brutePath3 = bruteForceSearch(digraph, '2', '9', LARGE_DIST, LARGE_DIST)
  255. print ("Brute-force: ", brutePath3)
  256. dfsPath3 = directedDFS(digraph, '2', '9', LARGE_DIST, LARGE_DIST)
  257. print ("DFS: ", dfsPath3)
  258. # Test case 4
  259. print ("---------------")
  260. print ("Test case 4:")
  261. print ("Find the shortest-path from Building 2 to 9 without going outdoors")
  262. expectedPath4 = ['2', '4', '10', '13', '9']
  263. print ("Expected: ", expectedPath4)
  264. brutePath4 = bruteForceSearch(digraph, '2', '9', LARGE_DIST, 0)
  265. print ("Brute-force: ", brutePath4)
  266. dfsPath4 = directedDFS(digraph, '2', '9', LARGE_DIST, 0)
  267. print ("DFS: ", dfsPath4)
  268. # Test case 5
  269. print ("---------------")
  270. print ("Test case 5:")
  271. print ("Find the shortest-path from Building 1 to 32")
  272. expectedPath5 = ['1', '4', '12', '32']
  273. print ("Expected: ", expectedPath5)
  274. brutePath5 = bruteForceSearch(digraph, '1', '32', LARGE_DIST, LARGE_DIST)
  275. print ("Brute-force: ", brutePath5)
  276. dfsPath5 = directedDFS(digraph, '1', '32', LARGE_DIST, LARGE_DIST)
  277. print ("DFS: ", dfsPath5)
  278. # Test case 6
  279. print ("---------------")
  280. print ("Test case 6:")
  281. print ("Find the shortest-path from Building 1 to 32 without going outdoors")
  282. expectedPath6 = ['1', '3', '10', '4', '12', '24', '34', '36', '32']
  283. print ("Expected: ", expectedPath6)
  284. brutePath6 = bruteForceSearch(digraph, '1', '32', LARGE_DIST, 0)
  285. print ("Brute-force: ", brutePath6)
  286. dfsPath6 = directedDFS(digraph, '1', '32', LARGE_DIST, 0)
  287. print ("DFS: ", dfsPath6)
  288. # Test case 7
  289. print ("---------------")
  290. print ("Test case 7:")
  291. print ("Find the shortest-path from Building 8 to 50 without going outdoors")
  292. bruteRaisedErr = 'No'
  293. dfsRaisedErr = 'No'
  294. try:
  295. bruteForceSearch(digraph, '8', '50', LARGE_DIST, 0)
  296. except ValueError:
  297. bruteRaisedErr = 'Yes'
  298. try:
  299. directedDFS(digraph, '8', '50', LARGE_DIST, 0)
  300. except ValueError:
  301. dfsRaisedErr = 'Yes'
  302. print ("Expected: No such path! Should throw a value error.")
  303. print ("Did brute force search raise an error?", bruteRaisedErr)
  304. print ("Did DFS search raise an error?", dfsRaisedErr)
  305. # Test case 8
  306. print ("---------------")
  307. print ("Test case 8:")
  308. print ("Find the shortest-path from Building 10 to 32 without walking")
  309. print ("more than 100 meters in total")
  310. bruteRaisedErr = 'No'
  311. dfsRaisedErr = 'No'
  312. try:
  313. x=bruteForceSearch(digraph, '10', '32', 100, LARGE_DIST)
  314. except ValueError:
  315. bruteRaisedErr = 'Yes'
  316. try:
  317. y=directedDFS(digraph, '10', '32', 100, LARGE_DIST)
  318. except ValueError:
  319. dfsRaisedErr = 'Yes'
  320. print ("Expected: No such path! Should throw a value error.")
  321. print ("Did brute force search raise an error?", bruteRaisedErr)
  322. print ("Did DFS search raise an error?", dfsRaisedErr)

Calculate Body Fat Percentage



This is a simple javascript function for crunching numbers to calculate body fat percentage. I wrote it a few years ago when I was first learning javascript. It uses four distinct formulas to calculate body fat using various accepted methods such as the U.S. Naval method, circumference measurement, height/weight/BMI ratio, etc. It reads values from a web form , branches based on sex, performs the calculations and displays the results to the user. My JavaScript skills have evolved since writing this. I use jquery a lot now, but I selected this example because its an original script that displayes an understanding of JavaScript, the DOM and how to apply some basic Math skills to a real world programming problem. To download this file, click the icon. Another good example is the custom jQuery for this online résumé

  1. /*
  2. this function calculates body fat percentage using four different
  3. methods and displays results to the user. live version at
  4. http://www.fitness-iq.com/tools.php#bodyFatCalc
  5. */
  6. function CalcBodyFat()
  7. {
  8. CalcBodyFat.sexEnum = {
  9. male : 1,
  10. female : 0
  11. }
  12. //get common data
  13. var vWeight = document.BodyFatCalc.weight.value - 0;
  14. var vWaist = document.BodyFatCalc.waist.value - 0;
  15. var vWaistMetric = vWaist * 2.54;
  16. var vNeck = document.BodyFatCalc.neck.value - 0;
  17. var vNeckMetric = vNeck * 2.54;
  18. var vFeet = document.BodyFatCalc.feet.value - 0;
  19. var vInch = document.BodyFatCalc.inches.value - 0;
  20. var vHeight = vInch + (vFeet * 12); //in inches
  21. var vHeightMetric = vHeight * 2.54;
  22. var vHeightMeters = vHeightMetric / 100; //convert centimeters to meters
  23. var vHips = document.BodyFatCalc.hips.value - 0;
  24. var vHipsMetric = vHips * 2.54;
  25. var vSex = '';
  26. var log10 = Math.log(10);
  27. var vBMI = (vWeight * 703) / Math.pow(vHeight,2);
  28. var vAge = document.BodyFatCalc.age.value - 0;
  29. if (document.BodyFatCalc.sex[0].checked == true) {
  30. vSex = CalcBodyFat.sexEnum.male;
  31. } else if (document.BodyFatCalc.sex[1].checked == true) {
  32. vSex = CalcBodyFat.sexEnum.female;
  33. }
  34. //check if man or woman
  35. if (vSex == CalcBodyFat.sexEnum.male) {
  36. //if male, calculate using method 1
  37. var vFactor1 = (vWeight * 1.082) + 94.42;
  38. var vFactor2 = vWaist * 4.15;
  39. var vLeanBodyMass = vFactor1 - vFactor2;
  40. var vFatWeight = vWeight - vLeanBodyMass;
  41. var vBodyFatPercent1 = (vFatWeight * 100) / vWeight;
  42. //calculate using method 2
  43. var vDiff = vWaistMetric - vNeckMetric;
  44. var vLogDiff = Math.log(vDiff) / Math.log(10);
  45. var vLogHeight = Math.log(vHeightMetric) / log10;
  46. var vBodyDensity = 1.0324 - ( 0.19077 * vLogDiff ) + ( 0.15456 * vLogHeight );
  47. var vBodyFatPercent2 = (495 / vBodyDensity ) - 450;
  48. //calculate using method 4
  49. var vBodyFatPercent4 = (1.20 * vBMI) + (0.23 * vAge) - (10.8 * 1) - 5.4;
  50. }
  51. else if( vSex == CalcBodyFat.sexEnum.female) //if its a girl!!!
  52. {
  53. //if female
  54. var vWrist = document.BodyFatCalc.wrist.value -0;
  55. var vForeArm = document.BodyFatCalc.forearm.value - 0;
  56. //calculate using method 1
  57. //get factors
  58. var vFactor1 = ( vWeight * 0.732 ) + 8.987;
  59. var vFactor2 = vWrist / 3.14;
  60. var vFactor3 = vWaist * 0.157;
  61. var vFactor4 = vHips * 0.249;
  62. var vFactor5 = vForeArm * 0.434;
  63. //calc lbm and fat %
  64. var vLeanBodyMass = vFactor1 + vFactor2 - vFactor3 - vFactor4 + vFactor5;
  65. var vFatWeight = vWeight - vLeanBodyMass;
  66. var vBodyFatPercent1 = ( vFatWeight * 100 ) / vWeight;
  67. var vHipsMetric = vHips * 2.54;
  68. var vDiff = (vWaistMetric + vHipsMetric) - vNeckMetric;
  69. var vLogDiff = Math.log(vDiff) / log10;
  70. var vLogHeight = Math.log(vHeightMetric) / log10;
  71. var vBodyDensity = 1.29579 - ( 0.35004 * vLogDiff ) + ( 0.22100 * vLogHeight );
  72. var vBodyFatPercent2 = (495 / vBodyDensity ) - 450;
  73. }
  74. //calculate using method 3
  75. var vBodyFatPercent3 = ( vHipsMetric /( vHeightMeters * Math.sqrt(vHeightMeters))) - 18;
  76. //calculate using method 4
  77. var vBodyFatPercent4 = (1.20 * vBMI) + (0.23 * vAge) - (10.8 * vSex) - 5.4;
  78. //get averages
  79. var vAvgBodyFatPercent = ( vBodyFatPercent1 + vBodyFatPercent2 + vBodyFatPercent3 + vBodyFatPercent4 ) / 4;
  80. var vAvgAthlete = ( vBodyFatPercent1 + vBodyFatPercent2 ) / 2;
  81. //display resulting individual methods
  82. document.BodyFatCalc.method1.value = vBodyFatPercent1.toFixed(2);
  83. document.BodyFatCalc.method2.value = vBodyFatPercent2.toFixed(2);
  84. document.BodyFatCalc.method3.value = vBodyFatPercent3.toFixed(2);
  85. document.BodyFatCalc.method4.value = vBodyFatPercent4.toFixed(2);
  86. //and averages
  87. document.BodyFatCalc.avgAthlete.value = vAvgAthlete.toFixed(2);
  88. document.BodyFatCalc.bodyFatPercent.value = vAvgBodyFatPercent.toFixed(2);
  89. //and update form data elsewhere for user convenience
  90. document.BMICalc.BMIheightFeet.value = vFeet;
  91. document.BMICalc.BMIheightInch.value = vInch;
  92. document.BMICalc.BMIweight.value = vWeight;
  93. document.idealWeightCalc.currentWeight.value = vWeight;
  94. document.idealWeightCalc.currentBodyFat.value = vAvgAthlete.toFixed(2);
  95. document.CalcIdeal.feet.value = vFeet;
  96. document.CalcIdeal.inch.value = vInch;
  97. document.HRZoneCalc.age.value = vAge;
  98. }

This Online Résumé


This online résumé is a good example of my HTML5 and CSS3 skills. I designed it to be mobile first, cross-browser and to scale elegantly through the different common viewport sizes and orientations so If you view it at different sizes the site has a slightly different look. I hand-coded and tested this site in about 4 days using mostly Visual Studio 2013 and Photoshop CS6. Feel free to view source. I kept it human readable. For your convenience, I've referenced an earlier iteration of the custom style sheet for this page below as well. Please be advised this style is one of many applied to this page. I'm also using a stylized version of bootstrap 3.1, and google's prettyprint for code syntax highlighting.

  1. /*
  2. custom style for http://trey.fitness-iq.com
  3. first portion uses media queries to position the
  4. selfie picture based on layout.
  5. */
  6. @media(max-width: 767px){
  7. #selfie{
  8. position:relative;
  9. width:100%;
  10. }
  11. }
  12. @media(min-width:768px) and (max-width:992px){
  13. #selfie{
  14. position:fixed;
  15. width:150px;
  16. }
  17. }
  18. @media(min-width:993px) and (max-width:1199px){
  19. #selfie{
  20. position:fixed;
  21. width:200px;
  22. }
  23. }
  24. @media(min-width:1200px){
  25. #selfie{
  26. position:fixed;
  27. width:250px;
  28. }
  29. }
  30. @media screen and (orientation:portrait){
  31. #selfie{
  32. position:relative;
  33. width:100%;
  34. }
  35. }
  36. .img-center{
  37. margin:auto;
  38. }
  39. section{
  40. margin-top:-70px;
  41. padding-top:70px;
  42. }
  43. .code-tab-content{
  44. padding:20px;
  45. }
  46. .code-tab-content p{
  47. margin-bottom:20px;
  48. }
  49. #imgZoomRadar{
  50. cursor:zoom-in;
  51. cursor:-webkit-zoom-in;
  52. cursor:-moz-zoom-in;
  53. margin-left:20px;
  54. margin-top:20px;
  55. opacity:.8;
  56. }
  57. .schools{
  58. opacity:.8;
  59. padding:0px 30px 0px 30px;
  60. }
  61. .zeroPad {
  62. padding: 0px;
  63. background-color: transparent;
  64. }
  65. .work-arrow{
  66. text-shadow : 3px 3px 3px #000;
  67. text-align:right;
  68. margin-top:-30px;
  69. }
  70. .work-table{
  71. width:100%;
  72. margin-top:40px;
  73. background-color:transparent;
  74. border:0px;
  75. border-top-left-radius:10px;
  76. border-top-right-radius:10px;
  77. }
  78. .work-details{
  79. background-color: #2e3337;
  80. border-bottom:solid thin black;
  81. border-left:solid thin black;
  82. border-right:solid thin black;
  83. border-top:none;
  84. border-bottom-left-radius:10px;
  85. border-bottom-right-radius:10px;
  86. padding:20px;
  87. }
  88. .work-headline{
  89. padding:20px;
  90. font-weight: bold;
  91. border:solid thin black;
  92. background: linear-gradient(to bottom, #333, #0d0e17);
  93. }
  94. .work-history{
  95. cursor:pointer;
  96. }
  97. .work-historyX{
  98. cursor:pointer;
  99. }
  100. .caroselPics{
  101. max-height:400px;
  102. height:400px;
  103. display:block;
  104. margin-left:auto;
  105. margin-right:auto;
  106. }
  107. p{
  108. padding-left:20px;
  109. }
  110. .edu{
  111. padding-top:5px;
  112. padding-bottom:20px;
  113. }
  114. .imageShadow{
  115. border:solid thin black;
  116. box-shadow:0px 0px 5px #777;
  117. }
  118. .marginLeft20{
  119. margin-left:20px;
  120. }
  121. .langs{
  122. margin:auto;
  123. opacity:.9;
  124. }
  125. .langs td{
  126. border:solid thin black;
  127. padding:20px;
  128. }
  129. .blu{
  130. padding:20px;
  131. background-color:#333;
  132. background: linear-gradient(to bottom, #333, #0d0e17);
  133. color:white;
  134. opacity:.85;
  135. fill-opacity:.6;
  136. text-shadow:2px 2px 2px #000;
  137. text-align:center;
  138. border:solid thin black;
  139. }
  140. .contactInfo{
  141. padding-top:15px;
  142. text-align:right;
  143. }
  144. a{
  145. color:#6781e5;
  146. }

Image Thumbnail Creator

I have a lot of experience working with PHP. I've created some really custom dynamic apps using PHP, AJAX and HTML. Here's a quick little script I wrote to automate some web admin tasks. I do all my own photography and found myself creating a lot of thumbnails for product shots. Creating each one by hand got old real quick so I hacked this little script together to speed things up. It creates high quality thumbnail images for all the picture files in a given directory. First it checks to see if the thumbnail already exists. If not, it creates a high quality thumbnail image with a max-width and/or max-height, while maintaining the original aspect ratio. It names the newly created .jpg file according to a naming convention I used for this project. Its not very robust or highly portable but it served my purposes at the time. To download this file, click the icon

  1. //create high quality aspect true thumbnails for all the files in a given directory
  2. if ($handle = opendir('path/to/directory/')) {
  3. echo "Directory handle: $handle\n";
  4. echo "Processing Entries:\n";
  5. while (false !== ($entry = readdir($handle))) {
  6. $isThumb = strpos($entry, 'thumb');
  7. if ($entry != "." && $entry != ".." && $isThumb === FALSE) {
  8. //echo "$entry\n";//debugging
  9. $filename = $entry; //for readability, now that we know its a valid filename.
  10. $width = 175; // maximum width
  11. $height = 175; // maximum height
  12. header('Content-Type: image/jpeg'); // set content type
  13. // Get new dimensions
  14. list($width_orig, $height_orig) = getimagesize($filename);
  15. $ratio_orig = $width_orig/$height_orig;
  16. if ($width/$height > $ratio_orig) {
  17. $width = $height*$ratio_orig;
  18. }
  19. else {
  20. $height = $width/$ratio_orig;
  21. }
  22. // Resample image
  23. $image_p = imagecreatetruecolor($width, $height);
  24. $image = imagecreatefromjpeg($filename);
  25. imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);
  26. // Output
  27. $newFileName = "thumb-" . $filename;
  28. //echo "thumb $newFileName created"; //debug
  29. imagejpeg($image_p, $newFileName, 100);
  30. imagedestroy($image_p);
  31. }
  32. }
  33. closedir($handle);
  34. }

Download Extras

For convenience, You can download my resume, certifications and code samples here.