SlideShare a Scribd company logo
It’s about doing the right things




                  Mukhamad Ikhsan
Good programmer habits
BE LAZY
Woot??
Good programmer habits
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…
Good programmer habits
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…..

More Related Content

PPTX
Max Koretskyi "Why are Angular and React so fast?"
PPTX
Learning from other's mistakes: Data-driven code analysis
PDF
Composite Pattern
PPTX
Code is not text! How graph technologies can help us to understand our code b...
PDF
Uncommon Design Patterns
PPT
JavaScript Data Types
PPSX
Concepts of oop
PPTX
Software design principles SOLID
Max Koretskyi "Why are Angular and React so fast?"
Learning from other's mistakes: Data-driven code analysis
Composite Pattern
Code is not text! How graph technologies can help us to understand our code b...
Uncommon Design Patterns
JavaScript Data Types
Concepts of oop
Software design principles SOLID

Viewers also liked (20)

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

Similar to Good programmer habits (20)

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

Good programmer habits

  • 1. It’s about doing the right things Mukhamad Ikhsan
  • 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
  • 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…..