Skip to content

Instantly share code, notes, and snippets.

Building from Scratch

Please share an example of a time you’ve built something from scratch.

In rural regions of the developing world, healthcare facilities are quite sparse. The provision of regular healthcare is done by healthcare workers associated to the government or a non-profit hospital who serves one or more catchment of villages. The healthcare workers receive 2 years of training. Because of their workload, the diversity of issues they encounter, and not enough training, the quality isn't ideal leading to non-institutional deliveries and high childhood morbidity in cases of missed high risk pregnancies, missed immunisation schedules for the newly born kids etc. I developed an open source system Avni with an offline first app because of unreliable or non-existent internet connectivity for the healthcare workers to assist them with identifying high risk pregnancies by accounting for 300+ different factors which can lead to it, keeping track and record of immunisation schedules for kids in the

Goal

Learn a new language, which you have been putting off for sometime.

Process

  1. Form a team with similar interests as you in learning the new "thing" (1-4 people)
  2. Work on a Distributed Web Scraper (MVP Spec will be shared, but be creative on top of it) as a team on a full-stack of your choosing, Infra->Config-management->DB(s)->Backend->Inter service middleware(?)->Frontend.
  3. Be creative.
  4. Compete with other teams, on multiple aspects
  • Performance (same test bed)
-- Pre Scripts
CREATE EXTENSION "uuid-ossp";
ALTER TABLE mother
ADD COLUMN uuid VARCHAR(255) NOT NULL DEFAULT uuid_generate_v4();
ALTER TABLE child
ADD COLUMN uuid VARCHAR(255) NOT NULL DEFAULT uuid_generate_v4();
ALTER TABLE child_registration
ADD COLUMN enrolment_uuid VARCHAR(255) NOT NULL DEFAULT uuid_generate_v4();
ALTER TABLE pregnancy_registration
CREATE OR REPLACE FUNCTION pes()
RETURNS VOID AS $$
DECLARE something BIGINT;
BEGIN
FOR i IN 1..10000 LOOP
RAISE NOTICE 'Creating Row: %', i;
INSERT INTO program_encounter (observations, earliest_visit_date_time, encounter_date_time, program_enrolment_id, uuid, version, created_by_id, last_modified_by_id, created_date_time, last_modified_date_time, encounter_type_id, name, max_visit_date_time, organisation_id, cancel_date_time, cancel_observations)
VALUES ('{
"0e620ea5-1a80-499f-9d07-b972a9130d60": [
"3cf5e873-5b55-43ff-8fc2-15a0b78033f6",
DROP FUNCTION IF EXISTS adolescent_pivot_create();
CREATE OR REPLACE FUNCTION adolescent_pivot_create()
RETURNS VOID AS $$
DECLARE
BEGIN
EXECUTE format('create or replace view adolescent_program_pivot as SELECT *
FROM crosstab(
''WITH concept_uuid_name_mapping AS (
SELECT
c.uuid,

Integration Tests are my kind of tests. There are many like it, but the integration ones are mine. Integration tests are my best friend. It is my codebase's proof of life. I must master it as I must master my coding. Without code, my tests are useless. Without my integration tests, my codebase is useless. I must test my code truly. I must test better than my bug enemy which is trying to kill my app. I must shoot bugs before they shoot my app down.

import java.util.function.Function;
public class WeirdLinkedList {
public static Function<Boolean, Object> cons(Object head, Object tail) {
return (Boolean cond) -> cond ? head : tail;
}
public static Object nth(Function<Boolean, Object> list, Integer n) {
return n == 0 ? list.apply(true) : nth((Function<Boolean, Object>) list.apply(false), n - 1);
}