SlideShare ist ein Scribd-Unternehmen logo
1 von 19
It’s about doing the right things




                  Mukhamad Ikhsan
BE LAZY
Woot??
Find the number of unique word by letter combination
             (`aab`, `aba`, `bba`, `baa`) = 2 unique words
Class FindUniqueWord {                                  Class FindUniqueWord {


   def alphabets = [‘a’, ‘b’, ‘c’, ‘d’, ‘e’,                function getUniqueWords(String[] words) {
‘f’, ‘g’, ‘h’, ‘i’, ‘j’, ‘k’, ‘l’, ‘m’, ‘n’,                  List<String> unique = new
‘o’, ‘p’, ‘q’, ‘r’, ‘s’, ‘t’, ‘u’, ‘v’, ‘w’,            ArrayList<String>();
‘x’, ‘y’, ‘z’]
                                                                for (i=0; i<words.length; i++) {
                                                                    char[] c1 = words[i].toCharArray();
     function getWeight(String word) {
                                                                    Arrays.sort(c1);
         int weight = 0;
                                                                    if (!unique.contains(new String(c1)) {
         for (i=0; i<word.length(); i++) {
                                                                        unique.add(new String(c1));
             for (j=0; j<alphabets.length(); j++) {
                                                                    }
                 if (word.chartAt(i) == alphabets[j])
                                                                }
                    weight += j;
                                                                return unique.count();
             }
                                                            }
         }
                                                        }
         return weight;
     }


     function getUniqueWords(String[] words) {
         List<int> unique = new ArrayList<int>();
         for (i=0; i<words.length; i++) {
             int weight = this.getWeight(words[i]);
             if (!unique.contains(weight)) {
                  unique.add(weight);
             }
         }
         return unique.count();
     }
}
What I Imagine When I’m Coding
The Reality…
The Point of being lazy is, you stop doing anything but think,
to find an easy way to solve.
More simple means less bug.
So prepare before he come…
Gather all mighty equipment and weapon
           while you can




   I hope can win with just one click
CONCEPTUAL
Imagine if I’m an Architect
Functional


     Programming Paradigm                                       Anonymous Function
                                                Imperative
                                                                      Dependency Injection
       Object-Oriented
                                   Logic Programming

                                                         Multi threading      Inner Class
 Inheritance            Polymorphism

  Abstraction      Encapsulation
                                                Programming Technique

  Software Architecture                         Software Development
            Design Pattern
                                  Builder                       Event Driven Development
                                             Singleton
Decorator
                    Observer       Abstract Factory          Domain Driven Development
     Strategy
                               Adapter
                  MVC                                 Service Oriented Architecture..?
WTF?
The invisible one is impossible to noticed

           Unless we understand our coding in design perspective
P
A
S
S
I
O
N
That’s Interesting ….
To improve, simply you need to enjoying the process…..

Weitere ähnliche Inhalte

Andere mochten auch

Ipad apps used in pilot program
Ipad apps used in pilot programIpad apps used in pilot program
Ipad apps used in pilot programlnash
 
Formato de clase 6 y 7 general review
Formato de clase 6 y 7 general reviewFormato de clase 6 y 7 general review
Formato de clase 6 y 7 general reviewEvelin Peña
 
Camsu e.v Presentation
Camsu e.v  PresentationCamsu e.v  Presentation
Camsu e.v Presentationkmichel
 
2011 05 11 hpm tweetchat transcript
2011 05 11 hpm tweetchat transcript2011 05 11 hpm tweetchat transcript
2011 05 11 hpm tweetchat transcriptChristian Sinclair
 
iPads in libraries 10ways
iPads in libraries 10waysiPads in libraries 10ways
iPads in libraries 10wayslnash
 
Social Media In Palliative Care Communities 1 of 3 - Smith
Social Media In Palliative Care Communities 1 of 3 - SmithSocial Media In Palliative Care Communities 1 of 3 - Smith
Social Media In Palliative Care Communities 1 of 3 - SmithChristian Sinclair
 
Eclipse Modeling QVT
Eclipse Modeling QVTEclipse Modeling QVT
Eclipse Modeling QVTAkira Tanaka
 
I pad pilot apps used
I pad pilot apps usedI pad pilot apps used
I pad pilot apps usedlnash
 
iPads in Education QLD study tour
iPads in Education QLD study touriPads in Education QLD study tour
iPads in Education QLD study tourlnash
 
Social Media
Social MediaSocial Media
Social Mediajtravis16
 
Formato plano 10th week2_form_noungerund
Formato plano 10th week2_form_noungerundFormato plano 10th week2_form_noungerund
Formato plano 10th week2_form_noungerundEvelin Peña
 
2011 03 23 hpm tweetchat transcript
2011 03 23 hpm tweetchat transcript2011 03 23 hpm tweetchat transcript
2011 03 23 hpm tweetchat transcriptChristian Sinclair
 
智能车软件设计浅谈 清华-张天雷-上传版本
智能车软件设计浅谈 清华-张天雷-上传版本智能车软件设计浅谈 清华-张天雷-上传版本
智能车软件设计浅谈 清华-张天雷-上传版本ztl2004
 
Formato de clase 4 y 4 general review
Formato de clase 4 y 4 general reviewFormato de clase 4 y 4 general review
Formato de clase 4 y 4 general reviewEvelin Peña
 
2011 03 30 hpm tweetchat transcript
2011 03 30 hpm tweetchat transcript2011 03 30 hpm tweetchat transcript
2011 03 30 hpm tweetchat transcriptChristian Sinclair
 
2011 06 22 hpm tweetchat transcript
2011 06 22 hpm tweetchat transcript2011 06 22 hpm tweetchat transcript
2011 06 22 hpm tweetchat transcriptChristian Sinclair
 

Andere mochten auch (20)

Ipad apps used in pilot program
Ipad apps used in pilot programIpad apps used in pilot program
Ipad apps used in pilot program
 
Formato de clase 6 y 7 general review
Formato de clase 6 y 7 general reviewFormato de clase 6 y 7 general review
Formato de clase 6 y 7 general review
 
Camsu e.v Presentation
Camsu e.v  PresentationCamsu e.v  Presentation
Camsu e.v Presentation
 
2011 05 11 hpm tweetchat transcript
2011 05 11 hpm tweetchat transcript2011 05 11 hpm tweetchat transcript
2011 05 11 hpm tweetchat transcript
 
iPads in libraries 10ways
iPads in libraries 10waysiPads in libraries 10ways
iPads in libraries 10ways
 
Tweet chat #hpm 2010 28 07
Tweet chat   #hpm 2010 28 07Tweet chat   #hpm 2010 28 07
Tweet chat #hpm 2010 28 07
 
Social Media In Palliative Care Communities 1 of 3 - Smith
Social Media In Palliative Care Communities 1 of 3 - SmithSocial Media In Palliative Care Communities 1 of 3 - Smith
Social Media In Palliative Care Communities 1 of 3 - Smith
 
Eclipse Modeling QVT
Eclipse Modeling QVTEclipse Modeling QVT
Eclipse Modeling QVT
 
I pad pilot apps used
I pad pilot apps usedI pad pilot apps used
I pad pilot apps used
 
iPads in Education QLD study tour
iPads in Education QLD study touriPads in Education QLD study tour
iPads in Education QLD study tour
 
Social Media
Social MediaSocial Media
Social Media
 
Formato plano 10th week2_form_noungerund
Formato plano 10th week2_form_noungerundFormato plano 10th week2_form_noungerund
Formato plano 10th week2_form_noungerund
 
Sinclair standard slides
Sinclair standard slidesSinclair standard slides
Sinclair standard slides
 
2011 03 23 hpm tweetchat transcript
2011 03 23 hpm tweetchat transcript2011 03 23 hpm tweetchat transcript
2011 03 23 hpm tweetchat transcript
 
智能车软件设计浅谈 清华-张天雷-上传版本
智能车软件设计浅谈 清华-张天雷-上传版本智能车软件设计浅谈 清华-张天雷-上传版本
智能车软件设计浅谈 清华-张天雷-上传版本
 
Formato de clase 4 y 4 general review
Formato de clase 4 y 4 general reviewFormato de clase 4 y 4 general review
Formato de clase 4 y 4 general review
 
2011 03 30 hpm tweetchat transcript
2011 03 30 hpm tweetchat transcript2011 03 30 hpm tweetchat transcript
2011 03 30 hpm tweetchat transcript
 
2011 06 22 hpm tweetchat transcript
2011 06 22 hpm tweetchat transcript2011 06 22 hpm tweetchat transcript
2011 06 22 hpm tweetchat transcript
 
The Career Heist
The Career HeistThe Career Heist
The Career Heist
 
LW SOQ
LW SOQLW SOQ
LW SOQ
 

Ähnlich wie Good programmer habits

Practices For Becoming A Better Programmer
Practices For Becoming A Better ProgrammerPractices For Becoming A Better Programmer
Practices For Becoming A Better ProgrammerSrikanth Shreenivas
 
Java Simple Programs
Java Simple ProgramsJava Simple Programs
Java Simple ProgramsUpender Upr
 
How To Make Your Component Compliant
How To Make Your Component CompliantHow To Make Your Component Compliant
How To Make Your Component CompliantJan Gregersen
 
Why Java Sucks and C# Rocks (Final)
Why Java Sucks and C# Rocks (Final)Why Java Sucks and C# Rocks (Final)
Why Java Sucks and C# Rocks (Final)jeffz
 
Java parallel programming made simple
Java parallel programming made simpleJava parallel programming made simple
Java parallel programming made simpleAteji Px
 
The battle of Protractor and Cypress - RunIT Conference 2019
The battle of Protractor and Cypress - RunIT Conference 2019The battle of Protractor and Cypress - RunIT Conference 2019
The battle of Protractor and Cypress - RunIT Conference 2019Ludmila Nesvitiy
 
Let the type system be your friend
Let the type system be your friendLet the type system be your friend
Let the type system be your friendThe Software House
 
Prompt engineering for iOS developers (How LLMs and GenAI work)
Prompt engineering for iOS developers (How LLMs and GenAI work)Prompt engineering for iOS developers (How LLMs and GenAI work)
Prompt engineering for iOS developers (How LLMs and GenAI work)Andrey Volobuev
 
Matteo Vaccari - TDD per Android | Codemotion Milan 2015
Matteo Vaccari - TDD per Android | Codemotion Milan 2015Matteo Vaccari - TDD per Android | Codemotion Milan 2015
Matteo Vaccari - TDD per Android | Codemotion Milan 2015Codemotion
 
TDD and mobile development: some forgotten techniques, illustrated with Android
TDD and mobile development: some forgotten techniques, illustrated with AndroidTDD and mobile development: some forgotten techniques, illustrated with Android
TDD and mobile development: some forgotten techniques, illustrated with AndroidCodemotion
 

Ähnlich wie Good programmer habits (20)

Practices For Becoming A Better Programmer
Practices For Becoming A Better ProgrammerPractices For Becoming A Better Programmer
Practices For Becoming A Better Programmer
 
Java Simple Programs
Java Simple ProgramsJava Simple Programs
Java Simple Programs
 
How To Make Your Component Compliant
How To Make Your Component CompliantHow To Make Your Component Compliant
How To Make Your Component Compliant
 
informatics practices practical file
informatics practices practical fileinformatics practices practical file
informatics practices practical file
 
Introduction to kotlin
Introduction to kotlinIntroduction to kotlin
Introduction to kotlin
 
Coding in Style
Coding in StyleCoding in Style
Coding in Style
 
Why Java Sucks and C# Rocks (Final)
Why Java Sucks and C# Rocks (Final)Why Java Sucks and C# Rocks (Final)
Why Java Sucks and C# Rocks (Final)
 
Elementary Sort
Elementary SortElementary Sort
Elementary Sort
 
Effective Object Oriented Design in Cpp
Effective Object Oriented Design in CppEffective Object Oriented Design in Cpp
Effective Object Oriented Design in Cpp
 
Java parallel programming made simple
Java parallel programming made simpleJava parallel programming made simple
Java parallel programming made simple
 
The battle of Protractor and Cypress - RunIT Conference 2019
The battle of Protractor and Cypress - RunIT Conference 2019The battle of Protractor and Cypress - RunIT Conference 2019
The battle of Protractor and Cypress - RunIT Conference 2019
 
обзор Python
обзор Pythonобзор Python
обзор Python
 
Let the type system be your friend
Let the type system be your friendLet the type system be your friend
Let the type system be your friend
 
Kotlin talk
Kotlin talkKotlin talk
Kotlin talk
 
An introduction to scala
An introduction to scalaAn introduction to scala
An introduction to scala
 
Cpp tutorial
Cpp tutorialCpp tutorial
Cpp tutorial
 
Prompt engineering for iOS developers (How LLMs and GenAI work)
Prompt engineering for iOS developers (How LLMs and GenAI work)Prompt engineering for iOS developers (How LLMs and GenAI work)
Prompt engineering for iOS developers (How LLMs and GenAI work)
 
Mercado iOS & Swift vs Objective-C
Mercado iOS & Swift vs Objective-CMercado iOS & Swift vs Objective-C
Mercado iOS & Swift vs Objective-C
 
Matteo Vaccari - TDD per Android | Codemotion Milan 2015
Matteo Vaccari - TDD per Android | Codemotion Milan 2015Matteo Vaccari - TDD per Android | Codemotion Milan 2015
Matteo Vaccari - TDD per Android | Codemotion Milan 2015
 
TDD and mobile development: some forgotten techniques, illustrated with Android
TDD and mobile development: some forgotten techniques, illustrated with AndroidTDD and mobile development: some forgotten techniques, illustrated with Android
TDD and mobile development: some forgotten techniques, illustrated with Android
 

Good programmer habits

  • 1. It’s about doing the right things Mukhamad Ikhsan
  • 2.
  • 4.
  • 5. Find the number of unique word by letter combination (`aab`, `aba`, `bba`, `baa`) = 2 unique words Class FindUniqueWord { Class FindUniqueWord { def alphabets = [‘a’, ‘b’, ‘c’, ‘d’, ‘e’, function getUniqueWords(String[] words) { ‘f’, ‘g’, ‘h’, ‘i’, ‘j’, ‘k’, ‘l’, ‘m’, ‘n’, List<String> unique = new ‘o’, ‘p’, ‘q’, ‘r’, ‘s’, ‘t’, ‘u’, ‘v’, ‘w’, ArrayList<String>(); ‘x’, ‘y’, ‘z’] for (i=0; i<words.length; i++) { char[] c1 = words[i].toCharArray(); function getWeight(String word) { Arrays.sort(c1); int weight = 0; if (!unique.contains(new String(c1)) { for (i=0; i<word.length(); i++) { unique.add(new String(c1)); for (j=0; j<alphabets.length(); j++) { } if (word.chartAt(i) == alphabets[j]) } weight += j; return unique.count(); } } } } return weight; } function getUniqueWords(String[] words) { List<int> unique = new ArrayList<int>(); for (i=0; i<words.length; i++) { int weight = this.getWeight(words[i]); if (!unique.contains(weight)) { unique.add(weight); } } return unique.count(); } }
  • 6. What I Imagine When I’m Coding
  • 8.
  • 9. The Point of being lazy is, you stop doing anything but think, to find an easy way to solve. More simple means less bug.
  • 10. So prepare before he come…
  • 11. Gather all mighty equipment and weapon while you can I hope can win with just one click
  • 13. Imagine if I’m an Architect
  • 14. Functional Programming Paradigm Anonymous Function Imperative Dependency Injection Object-Oriented Logic Programming Multi threading Inner Class Inheritance Polymorphism Abstraction Encapsulation Programming Technique Software Architecture Software Development Design Pattern Builder Event Driven Development Singleton Decorator Observer Abstract Factory Domain Driven Development Strategy Adapter MVC Service Oriented Architecture..?
  • 15. WTF?
  • 16. The invisible one is impossible to noticed Unless we understand our coding in design perspective
  • 19. To improve, simply you need to enjoying the process…..