{"componentChunkName":"component---node-modules-codebrahma-gatsby-theme-blog-src-templates-post-js","path":"/good-code-ideal-couple/","result":{"data":{"post":{"body":"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"Good code and an ideal couple\",\n  \"date\": \"2012-02-06T00:00:00.000Z\",\n  \"featuredpost\": false,\n  \"description\": \"Code has a lot to teach us. Can it teach us about a good couple too?\",\n  \"keywords\": [\"good code couple\"],\n  \"link\": \"/good-code-ideal-couple\",\n  \"category\": [\"Life\"],\n  \"author\": \"Anand Narayan\",\n  \"tags\": [\"good code\", \"ideal couple\"],\n  \"templateKey\": \"blog-post\"\n};\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, [\"components\"]);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, \"I was with a good friend of mine at Matteo cafe Bangalore where we made this analogy between an ideal couple and good object oriented code.\"), mdx(\"p\", null, mdx(\"span\", _extends({\n    parentName: \"p\"\n  }, {\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"1008px\"\n    }\n  }), \"\\n      \", mdx(\"a\", _extends({\n    parentName: \"span\"\n  }, {\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/static/433b6742d841f22e3358d4046b283a4f/8a8a2/matteo-cafe.jpg\",\n    \"style\": {\n      \"display\": \"block\"\n    },\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"\\n    \", mdx(\"span\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"74.90347490347492%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAPABQDASIAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAAAAEEAgP/xAAVAQEBAAAAAAAAAAAAAAAAAAACA//aAAwDAQACEAMQAAABhkbm8HMZ/8QAGxAAAgEFAAAAAAAAAAAAAAAAAAESAgMRITH/2gAIAQEAAQUCjS7bWoiyx8P/xAAUEQEAAAAAAAAAAAAAAAAAAAAQ/9oACAEDAQE/AT//xAAVEQEBAAAAAAAAAAAAAAAAAAAQMf/aAAgBAgEBPwGH/8QAFxAAAwEAAAAAAAAAAAAAAAAAARAhMf/aAAgBAQAGPwI0a6//xAAbEAADAAIDAAAAAAAAAAAAAAAAAREhMVGhwf/aAAgBAQABPyFoCpon4QbD3yKlb2PsYEzSLT//2gAMAwEAAgADAAAAEFzP/8QAFxEBAQEBAAAAAAAAAAAAAAAAAQARIf/aAAgBAwEBPxBB6Wl//8QAFhEBAQEAAAAAAAAAAAAAAAAAAREA/9oACAECAQE/EBqOjv/EABwQAQACAwADAAAAAAAAAAAAAAEAETFBcWGRof/aAAgBAQABPxAOLK2yw+IaFEpsEIgTxQr2whso4NsM7EQrSuT/2Q==')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  })), \"\\n  \", mdx(\"img\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-image\",\n    \"alt\": \"Matteo-Cafe\",\n    \"title\": \"Matteo-Cafe\",\n    \"src\": \"/static/433b6742d841f22e3358d4046b283a4f/8a8a2/matteo-cafe.jpg\",\n    \"srcSet\": [\"/static/433b6742d841f22e3358d4046b283a4f/8356d/matteo-cafe.jpg 259w\", \"/static/433b6742d841f22e3358d4046b283a4f/bc760/matteo-cafe.jpg 518w\", \"/static/433b6742d841f22e3358d4046b283a4f/8a8a2/matteo-cafe.jpg 1008w\"],\n    \"sizes\": \"(max-width: 1008px) 100vw, 1008px\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    },\n    \"loading\": \"lazy\"\n  })), \"\\n  \"), \"\\n    \"), \"\\nMatteo Cafe, my fav place in bangalore\"), mdx(\"p\", null, \"Loose coupling and high cohesion is a basic funda of Object Oriented Programming.\\n( Coupling is the degree to which each module relies on the other modules of the software.\\nCohesion is how strongly focused the responsibilites of the module are.).\\nYou want highly cohesive and loosely coupled modules.\\nOtherwise it becomes very tough to maintain them or re-use them.\"), mdx(\"p\", null, \"Similarly i feel that individuals in a relationship should be highly focused(cohesive) with their responsibilities and loosely coupled on carry them out.\\nDependancy on the other to carry out their own endeavours results in\"), mdx(\"ol\", null, mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"The other person eventually becomes tired catering to the dependant.\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"makes you spend more than needed time with each other.\\nSelf driven individuals spend a considerable amount of time on their interests/passion and that time they spend away develops yearning for the other.\\nOtherwise you feel you have had too much of the other person and you want some time alone.\")), mdx(\"p\", null, \"Offlate i am noticing my friends wanting to go out with driven independant individuals and this blog post is a result of this change and me reading some design patterns.\"), mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Overall loosely coupled couples might work out better than highly coupled ones\")));\n}\n;\nMDXContent.isMDXComponent = true;","frontmatter":{"title":"Good code and an ideal couple","description":"Code has a lot to teach us. Can it teach us about a good couple too?","category":["Life"],"tags":["good code","ideal couple"],"author":"Anand Narayan","keywords":["good code couple"],"link":"/good-code-ideal-couple","image":null,"datePublished":"2012-02-06T00:00:00+00:00"}}},"pageContext":{"link":"/good-code-ideal-couple"}},"staticQueryHashes":[]}