Skip to content

Instantly share code, notes, and snippets.

#To delete local branches which have already been merged into master:
git branch --merged master | grep -v "\* master" | xargs -n 1 git branch -d
@amupoti
amupoti / Resources.md
Last active December 12, 2024 09:22
Useful links regarding different programming activities
@amupoti
amupoti / Pull Request checklist.txt
Last active April 9, 2018 10:13
Pull Request checklist
SCOPE
story is high priority, small, minimize creep, no stray changes, off-task changes added to backlog
WORKS CORRECTLY
master merged into branch,
all changes tested,
edge cases covered,
@amupoti
amupoti / Java snippet
Created June 21, 2019 21:57
Export boardgamestats player
public void extractPlayers() {
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
try {
BoardGameStats bgs = objectMapper.readValue(new File("target/bg.json"), BoardGameStats.class);
List<Play> collect = bgs.getPlays().stream().filter(p -> p.playerScores.stream().anyMatch(ps -> ps.playerRefId == 33)).collect(Collectors.toList());
log.info("there are {} plays for player 33", collect.size());
objectMapper.writeValue(new File("target/output.json"), collect);
} catch (IOException e) {

Reverse interview

Engineering

  1. What tech stack do you use? Are you rolling out new technologies or sunsetting older ones? Do you have any legacy system that you need to maintain?
  2. What is your maturity stage? Finding a direction, feature work, maintenance...
  3. What are the next big engineering challenges you will face?
  4. How are requirements delivered to the engineering teams? How are technical decisions made and communicated?
  5. What level of involvement do engineers have in relation to architecture and system design? How much freedom for decision making do individual developers have? What happens if an engineer identifies areas of improvement?
  6. What is the junior/senior balance of the team?
@amupoti
amupoti / rain_amount.py
Last active September 8, 2024 07:19
Get total rain for a location given 3 different stations
import requests
from lxml import html
import re
from datetime import datetime, timedelta
from math import radians, sin, cos, sqrt, atan2
# Function to calculate distance between two GPS coordinates (Haversine formula)
def haversine(lat1, lon1, lat2, lon2):
R = 6371.0 # Earth radius in kilometers
lat1, lon1, lat2, lon2 = map(radians, [lat1, lon1, lat2, lon2])