{"action":"created","comment":{"url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/pulls/comments/62541401","id":62541401,"diff_hunk":"@@ -0,0 +1,71 @@\n+---\n+layout: post-no-feature\n+title: Write code for the dumbest person you know\n+description: \"I'm dumb and I'm unable to understand your clever code.\"\n+category: articles\n+tags:\n+  - Dev\n+  - craftmanship\n+published: false\n+comments: true\n+\n+---\n+\n+*I wrote this text a few months ago while I was angry and decided to not publish it right away, letting it sink in. I kept it, made a few changes and finally decided to publish it.*\n+\n+## I'm dumb\n+\n+You're lucky. You're lucky because you're clever and I'm not.\n+\n+I noted that I was dumb when I was unable to understand how some data was injected into an object during its instantiation.\n+I know what a depency injection manager is but that time was not like the others. It took me one hour to figure where that configuration parameter was coming from. I had to go through 8 code files and 3 configuration files and I had to make several full text searches in order to jump from file to file because following the code was misleading. This exercise was really hard to me because I'm barely able to remember my own phone number so I had to write down to paper the path of your clever way to do depency injection because I couldn't keep it in memory.\n+\n+I have to say that I started to be pissed off - allright, this is not uncommon - because you code was telling me that I was stupid, and no one likes beeing told that he is stupid.\n+\n+Someone then came by and told me it was the tool, a cool feature provided by the tool, that you were using. Again, I know what a dependency injection manager are, and how they work, but that one magical feature which allows you to make the same thing as usual but in a very clever way I don't know it. Probably because I never needed it. I guess appart from beeing dumb I also lack of culture about that tool features.\n+\n+I was sure that I was dumb when I couldn't understand what you're abstraction was for. For me all the interesting thing your code was doing was concentrated in one class. That one class I found after going through several classes doing I don't really know what. That one class which was wrapping a class from a library.\n+\n+I probably missed something but I have to say that [I started to be pissed off](https://twitter.com/Selrahcd/status/701794483726323712) again - I think there is some kind of pattern here. I tried to understand, because, after all, you're clever. Why would you do something that complicated when just using the class from the library, or your wrapper, would have done the job ? Maybe you were protecting us from the coupling to that library and making its use simpler. I have to confess that I was surprised when I saw a massive chain of getters going all the way down to get the library object you were wrapping and pass it to the some other object.\n+\n+This are some of the times I noticed I was dumb. Hard truth...\n+\n+Thank you for beeing an eye opener.\n+\n+\n+## I used to be clever though\n+\n+I used to be clever though. I used to write some pretty pieces of code which were doing all kind of cool stuff. I was theorically able to change the way the whole system was working by changing one parameter in a configuraion file. My code was able to cope with all future issues I had foreseen. I knew how to do some tricky things with all sort of tools.\n+\n+But time goes on and aging probably made me dumb.\n+\n+Aging or discoveries and failures.\n+\n+Abstractions are good when you know what you're abstracting. Apparently you only know what you're abstracting based on the information you currently have. I couldn't predict future and the next needs. I tried though, I failed, and ended up [locked down by my clever abstraction](http://www.sandimetz.com/blog/2016/1/20/the-wrong-abstraction). And as we all do I started to cheat, broke my abstraction, used getters in order to get the internals and be able to manipulate them.\n+\n+Not once but several times.\n+\n+I made complicated stuff too. They looked hard to understand at first glance but once you managed to wrap your head around the problem being solved everyone could see how my solution was elegant and was able to get it. I was at least. I wrote it after all. Then I moved on, worked on something else, and had to came by to it later probably because of something to fix. It seems like complicated code tend to be buggy. Worst, apparently time had increased code complexity. I was now unable to understand easily what was going on with this code and all choices I made a few days before.","path":"_posts/2016-02-27-write-code-for-the-dumbest-person-you-know.md","position":48,"original_position":48,"commit_id":"b712273f954833c4d19e63fedb603f94b7f9462a","original_commit_id":"b712273f954833c4d19e63fedb603f94b7f9462a","user":{"login":"remi-san","id":5213540,"avatar_url":"https://avatars.githubusercontent.com/u/5213540?v=3","gravatar_id":"","url":"https://api.github.com/users/remi-san","html_url":"https://github.com/remi-san","followers_url":"https://api.github.com/users/remi-san/followers","following_url":"https://api.github.com/users/remi-san/following{/other_user}","gists_url":"https://api.github.com/users/remi-san/gists{/gist_id}","starred_url":"https://api.github.com/users/remi-san/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remi-san/subscriptions","organizations_url":"https://api.github.com/users/remi-san/orgs","repos_url":"https://api.github.com/users/remi-san/repos","events_url":"https://api.github.com/users/remi-san/events{/privacy}","received_events_url":"https://api.github.com/users/remi-san/received_events","type":"User","site_admin":false},"body":"being solved**,** everyone\r\n\r\nToo complicated to understand the sentence otherwise ","created_at":"2016-05-09T17:47:59Z","updated_at":"2016-05-09T17:47:59Z","html_url":"https://github.com/SelrahcD/selrahcd.github.io/pull/2#discussion_r62541401","pull_request_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/pulls/comments/62541401"},"html":{"href":"https://github.com/SelrahcD/selrahcd.github.io/pull/2#discussion_r62541401"},"pull_request":{"href":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/pulls/2","id":69381464,"html_url":"https://github.com/SelrahcD/selrahcd.github.io/pull/2","diff_url":"https://github.com/SelrahcD/selrahcd.github.io/pull/2.diff","patch_url":"https://github.com/SelrahcD/selrahcd.github.io/pull/2.patch","issue_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/issues/2","number":2,"state":"open","locked":false,"title":"Simple things","user":{"login":"SelrahcD","id":1864786,"avatar_url":"https://avatars.githubusercontent.com/u/1864786?v=3","gravatar_id":"","url":"https://api.github.com/users/SelrahcD","html_url":"https://github.com/SelrahcD","followers_url":"https://api.github.com/users/SelrahcD/followers","following_url":"https://api.github.com/users/SelrahcD/following{/other_user}","gists_url":"https://api.github.com/users/SelrahcD/gists{/gist_id}","starred_url":"https://api.github.com/users/SelrahcD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SelrahcD/subscriptions","organizations_url":"https://api.github.com/users/SelrahcD/orgs","repos_url":"https://api.github.com/users/SelrahcD/repos","events_url":"https://api.github.com/users/SelrahcD/events{/privacy}","received_events_url":"https://api.github.com/users/SelrahcD/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-05-09T17:33:29Z","updated_at":"2016-05-09T17:47:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ddb3d80aa5e272572d05a1aea15988a11c90549e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/pulls/2/commits","review_comments_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/pulls/2/comments","review_comment_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/issues/2/comments","statuses_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/statuses/b712273f954833c4d19e63fedb603f94b7f9462a","head":{"label":"SelrahcD:simple-code","ref":"simple-code","sha":"b712273f954833c4d19e63fedb603f94b7f9462a","user":{"login":"SelrahcD","id":1864786,"avatar_url":"https://avatars.githubusercontent.com/u/1864786?v=3","gravatar_id":"","url":"https://api.github.com/users/SelrahcD","html_url":"https://github.com/SelrahcD","followers_url":"https://api.github.com/users/SelrahcD/followers","following_url":"https://api.github.com/users/SelrahcD/following{/other_user}","gists_url":"https://api.github.com/users/SelrahcD/gists{/gist_id}","starred_url":"https://api.github.com/users/SelrahcD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SelrahcD/subscriptions","organizations_url":"https://api.github.com/users/SelrahcD/orgs","repos_url":"https://api.github.com/users/SelrahcD/repos","events_url":"https://api.github.com/users/SelrahcD/events{/privacy}","received_events_url":"https://api.github.com/users/SelrahcD/received_events","type":"User","site_admin":false},"repo":{"id":13675080,"name":"selrahcd.github.io","full_name":"SelrahcD/selrahcd.github.io","owner":{"login":"SelrahcD","id":1864786,"avatar_url":"https://avatars.githubusercontent.com/u/1864786?v=3","gravatar_id":"","url":"https://api.github.com/users/SelrahcD","html_url":"https://github.com/SelrahcD","followers_url":"https://api.github.com/users/SelrahcD/followers","following_url":"https://api.github.com/users/SelrahcD/following{/other_user}","gists_url":"https://api.github.com/users/SelrahcD/gists{/gist_id}","starred_url":"https://api.github.com/users/SelrahcD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SelrahcD/subscriptions","organizations_url":"https://api.github.com/users/SelrahcD/orgs","repos_url":"https://api.github.com/users/SelrahcD/repos","events_url":"https://api.github.com/users/SelrahcD/events{/privacy}","received_events_url":"https://api.github.com/users/SelrahcD/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SelrahcD/selrahcd.github.io","description":"","fork":false,"url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io","forks_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/forks","keys_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/teams","hooks_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/hooks","issue_events_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/events","assignees_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/tags","blobs_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/languages","stargazers_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/stargazers","contributors_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/contributors","subscribers_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/subscribers","subscription_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/subscription","commits_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/merges","archive_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/downloads","issues_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/labels{/name}","releases_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/releases{/id}","deployments_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/deployments","created_at":"2013-10-18T10:15:47Z","updated_at":"2016-02-10T09:02:08Z","pushed_at":"2016-05-09T17:33:36Z","git_url":"git://github.com/SelrahcD/selrahcd.github.io.git","ssh_url":"git@github.com:SelrahcD/selrahcd.github.io.git","clone_url":"https://github.com/SelrahcD/selrahcd.github.io.git","svn_url":"https://github.com/SelrahcD/selrahcd.github.io","homepage":null,"size":4399,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"SelrahcD:master","ref":"master","sha":"3f81fa83312bf1bfb68b6bdad481dad6f1878982","user":{"login":"SelrahcD","id":1864786,"avatar_url":"https://avatars.githubusercontent.com/u/1864786?v=3","gravatar_id":"","url":"https://api.github.com/users/SelrahcD","html_url":"https://github.com/SelrahcD","followers_url":"https://api.github.com/users/SelrahcD/followers","following_url":"https://api.github.com/users/SelrahcD/following{/other_user}","gists_url":"https://api.github.com/users/SelrahcD/gists{/gist_id}","starred_url":"https://api.github.com/users/SelrahcD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SelrahcD/subscriptions","organizations_url":"https://api.github.com/users/SelrahcD/orgs","repos_url":"https://api.github.com/users/SelrahcD/repos","events_url":"https://api.github.com/users/SelrahcD/events{/privacy}","received_events_url":"https://api.github.com/users/SelrahcD/received_events","type":"User","site_admin":false},"repo":{"id":13675080,"name":"selrahcd.github.io","full_name":"SelrahcD/selrahcd.github.io","owner":{"login":"SelrahcD","id":1864786,"avatar_url":"https://avatars.githubusercontent.com/u/1864786?v=3","gravatar_id":"","url":"https://api.github.com/users/SelrahcD","html_url":"https://github.com/SelrahcD","followers_url":"https://api.github.com/users/SelrahcD/followers","following_url":"https://api.github.com/users/SelrahcD/following{/other_user}","gists_url":"https://api.github.com/users/SelrahcD/gists{/gist_id}","starred_url":"https://api.github.com/users/SelrahcD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SelrahcD/subscriptions","organizations_url":"https://api.github.com/users/SelrahcD/orgs","repos_url":"https://api.github.com/users/SelrahcD/repos","events_url":"https://api.github.com/users/SelrahcD/events{/privacy}","received_events_url":"https://api.github.com/users/SelrahcD/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SelrahcD/selrahcd.github.io","description":"","fork":false,"url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io","forks_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/forks","keys_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/teams","hooks_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/hooks","issue_events_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/events","assignees_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/tags","blobs_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/languages","stargazers_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/stargazers","contributors_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/contributors","subscribers_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/subscribers","subscription_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/subscription","commits_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/merges","archive_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/downloads","issues_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/labels{/name}","releases_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/releases{/id}","deployments_url":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/deployments","created_at":"2013-10-18T10:15:47Z","updated_at":"2016-02-10T09:02:08Z","pushed_at":"2016-05-09T17:33:36Z","git_url":"git://github.com/SelrahcD/selrahcd.github.io.git","ssh_url":"git@github.com:SelrahcD/selrahcd.github.io.git","clone_url":"https://github.com/SelrahcD/selrahcd.github.io.git","svn_url":"https://github.com/SelrahcD/selrahcd.github.io","homepage":null,"size":4399,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/pulls/2"},"html":{"href":"https://github.com/SelrahcD/selrahcd.github.io/pull/2"},"issue":{"href":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/issues/2"},"comments":{"href":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/SelrahcD/selrahcd.github.io/statuses/b712273f954833c4d19e63fedb603f94b7f9462a"}}}}