Skip to content

Instantly share code, notes, and snippets.

View moshekarmel1's full-sized avatar
😀

Moshe Karmel moshekarmel1

😀
View GitHub Profile
@moshekarmel1
moshekarmel1 / 5years.md
Created March 3, 2021 14:51
Reflections on 5 years in the enterprise

🏛 Lessons learned in 5 years in the Enterprise

I just hit my 5-year anniversary this week, and I've been reflecting on the past. Here's a collection of tip & tricks and lessons learned in the trenches creating Software for 5 years here at QL.
Disclaimer: I am not necessarily fully compliant with all these rules, I've just noticed them along the way.
Disclaimer 2: YMMV, these have worked well for me, but we're all different.
Disclaimer 3: We already have some really good ISM's and Tech Philosophies, this is just an addition on those.

🏆 Criticize in private, Praise in public

Although a Team Member (TM) may have screwed up, there's never a good reason to call out a specific TM for screwing up in a public setting. No one like being called out for mistakes. On the other hand, when a TM does something great, shout it from the rooftops.

import sys
import xml.etree.ElementTree as ET
""" Skuint is a skuid linter to check your snippets and make sure that they are needed. """
# Change this filename to your filepath, relative to this python files location
FILENAME = 'Broker_CreateOpportunity.xml'
print(('*' * 10) + ' Running Skuint on ' + FILENAME + ' ' + ('*' * 10) + '\n')
tree = ET.parse(FILENAME)
root = tree.getroot()
public void MikvaCalculation(int year, int month, int day){
Calendar calendar = new GregorianCalendar(year, month, day);
Calendar diffCal = new GregorianCalendar(year, month, day);
//get the date of the flow
mFlow.setSawBlood(calendar.getTime());
if(mFlow.isBeforeSunset()){//before shkiah...
day += 4;//add 4 days
calendar.set(year, month, day);
mFlow.setHefsekTahara(calendar.getTime());//hefsek tahara
day += 7;//add 7 days
function checkForDupes(arr){
for(var i = arr.length - 1; i >= 0; i--){
if(arr.indexOf(arr[i]) !== i){
arr.splice(i,1);
}
}
return arr;
}
var x;
if(x){
//this will not run because x is undefined, (kind of like null in Java)
}
x = null;
if(x){
//this will not run because x is null, even though it is defined
}
x = true;
if(x){
List<Object> myList = new ArrayList<>();
//This line will throw an ERROR incompatible types required: boolean found: List<Object>
if(myList){//basically you need a boolean expression inside the if...
}
if(myList != null){//works fine because checking against null returns a boolean
//do stuff
}
//the one trick you can do, is to check for a truthy boolean
boolean bool = true;