Last active
October 17, 2022 04:27
-
-
Save Potherca/8b91a5212e29d3a8178f382de647d406 to your computer and use it in GitHub Desktop.
Revisions
-
Potherca revised this gist
Oct 1, 2016 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,9 +16,9 @@ The mug looks quite nice but sadly the code on it is crap. - The logic is only run once - The comment is totally useless - The code style does not adhere to the [C# coding standards for .NET](http://se.inf.ethz.ch/old/teaching/ss2007/251-0290-00/project/CSharpCodingStandards.pdf) - Rule 2.3. Do not create declarations of the same type (namespace, class, method, property, field, or parameter) and access modifier (protected, public, private, internal) that vary only by capitalization. - Rule 2.18. Try to prefix Boolean variables and properties with “Can”, “Is” or “Has”. - Rule 4.3.33. Avoid invoking methods within a conditional expression. - There is no logging, error handling or messaging Honestly, if I came across such code in a peer review it would not pass. -
Potherca revised this gist
Oct 1, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ The mug looks quite nice but sadly the code on it is crap. - The code is not placed in a separate namespace - A `var` keyword is not used when assigning the `Coffee` object - The object oriented style abstraction is broken - There is no container for the coffee - There is no dispenser for the coffee - There is no person to drink the coffee -
Potherca revised this gist
Oct 1, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -27,4 +27,4 @@ Beside these issues, the code is written in [C#](https://en.wikipedia.org/wiki/C At a certain point I might feel like writing a better version. Right now, my coffee mug is empty, so I'm going to get a refill first ;-) -
Potherca revised this gist
Oct 1, 2016 . 1 changed file with 8 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,21 +4,21 @@ There is a post going round on facebook of a mug with some code on it. There's even [a reddit post on it](https://www.reddit.com/r/csharp/comments/3xdikm/does_anybody_know_where_i_can_find_this_mug/?st=itrfyyvi&sh=e8448c85). The mug looks quite nice but sadly the code on it is crap. - The code is not placed in a separate namespace - A `var` keyword is not used when assigning the `Coffee` object - The object oriënted style abstraction is broken - There is no container for the coffee - There is no dispenser for the coffee - There is no person to drink the coffee - There is no SoftwareDeveloper object - There are flaws in the logic - When the `coffee` is refilled it is not drunk - The logic is only run once - The comment is totally useless - The code style does not adhere to the [C# coding standards for .NET](http://se.inf.ethz.ch/old/teaching/ss2007/251-0290-00/project/CSharpCodingStandards.pdf) - 2.3. Do not create declarations of the same type (namespace, class, method, property, field, or parameter) and access modifier (protected, public, private, internal) that vary only by capitalization. - 2.18. Try to prefix Boolean variables and properties with “Can”, “Is” or “Has”. - 4.3.33. Avoid invoking methods within a conditional expression. - There is no logging, error handling or messaging Honestly, if I came across such code in a peer review it would not pass. -
Potherca revised this gist
Oct 1, 2016 . 1 changed file with 6 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,12 @@ The mug looks quite nice but sadly the code on it is crap. - There is no dispenser for the cofee - There is no person to drink the coffee - There is no SoftwareDeveloper object - The code is not placed in a separate namespace - The code style does not adhere to the [C# coding standards for .NET](http://se.inf.ethz.ch/old/teaching/ss2007/251-0290-00/project/CSharpCodingStandards.pdf) - 2.3. Do not create declarations of the same type (namespace, class, method, property, field, or parameter) and access modifier (protected, public, private, internal) that vary only by capitalization. - 2.18. Try to prefix Boolean variables and properties with “Can”, “Is” or “Has”. - 4.3.33. Avoid invoking methods within a conditional expression. - A `var` keyword is not used when assigning the `Coffee` object - The comment is totally useless - There are flaws in the logic - When the `coffee` is refilled it is not drunk -
Potherca revised this gist
Oct 1, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,6 +8,7 @@ The mug looks quite nice but sadly the code on it is crap. - There is no container for the coffee - There is no dispenser for the cofee - There is no person to drink the coffee - There is no SoftwareDeveloper object - The code style is disappointing - The comment is totally useless - There are flaws in the logic -
Potherca revised this gist
Oct 1, 2016 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,6 +17,8 @@ The mug looks quite nice but sadly the code on it is crap. Honestly, if I came across such code in a peer review it would not pass. Beside these issues, the code is written in [C#](https://en.wikipedia.org/wiki/C_Sharp_(programming_language)) (created by Microsoft) and not in the more suitable [CoffeeScript](http://coffeescript.org/) At a certain point I might feel like writing a better version. Right now, my coffee mug is empty, so I'm going to get a refil first ;-) -
Potherca revised this gist
Oct 1, 2016 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@  There is a post going round on facebook of a mug with some code on it. There's even [a reddit post on it](https://www.reddit.com/r/csharp/comments/3xdikm/does_anybody_know_where_i_can_find_this_mug/?st=itrfyyvi&sh=e8448c85). The mug looks quite nice but sadly the code on it is crap. -
Potherca revised this gist
Oct 1, 2016 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,6 @@ There is a post going round on facebook of a mug with some code on it.  There's even [a reddit post on it](https://www.reddit.com/r/csharp/comments/3xdikm/does_anybody_know_where_i_can_find_this_mug/?st=itrfyyvi&sh=e8448c85). The mug looks quite nice but sadly the code on it is crap. - The object oriënted style abstraction -
Potherca revised this gist
Oct 1, 2016 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ There is a post going round on facebook of a mug with some code on it. The mug looks quite nice but sadly the code on it is crap. - The object oriënted style abstraction - There is no container for the coffee @@ -13,4 +14,6 @@ There is a post going round on facebook of a mug with some code on it. The mug l Honestly, if I came across such code in a peer review it would not pass. At a certain point I might feel like writing a better version. Right now, my coffee mug is empty, so I'm going to get a refil first ;-) -
Potherca renamed this gist
Oct 1, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Potherca created this gist
Oct 1, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ There is a post going round on facebook of a mug with some code on it. The mug looks quite nice but sadly the code on it is crap. - The object oriënted style abstraction - There is no container for the coffee - There is no dispenser for the cofee - There is no person to drink the coffee - The code style is disappointing - The comment is totally useless - There are flaws in the logic - When the `coffee` is refilled it is not drunk - The logic is only run once - There is no logging, error handling or messaging Honestly, if I came across such code in a peer review it would not pass. At a certain point I might feel like writing a better version but my coffee mug is empty right now, so I'm going to get a refil first ;-) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ Coffee coffee = new Coffee(); if (coffee.Empty) { coffee.Refill() } else { coffee.Drink() } //I am a software developer