Good programmer habits
-
Upload
mukhamad-ikhsan -
Category
Documents
-
view
428 -
download
0
description
Transcript of Good programmer habits
![Page 1: Good programmer habits](https://reader036.fdocuments.in/reader036/viewer/2022062308/558ff51d1a28abed798b459b/html5/thumbnails/1.jpg)
GOOD PROGRAMMER
HABITSIt’s about doing the right things
Mukhamad Ikhsan
![Page 2: Good programmer habits](https://reader036.fdocuments.in/reader036/viewer/2022062308/558ff51d1a28abed798b459b/html5/thumbnails/2.jpg)
![Page 3: Good programmer habits](https://reader036.fdocuments.in/reader036/viewer/2022062308/558ff51d1a28abed798b459b/html5/thumbnails/3.jpg)
BE LAZYWoot??
![Page 4: Good programmer habits](https://reader036.fdocuments.in/reader036/viewer/2022062308/558ff51d1a28abed798b459b/html5/thumbnails/4.jpg)
![Page 5: Good programmer habits](https://reader036.fdocuments.in/reader036/viewer/2022062308/558ff51d1a28abed798b459b/html5/thumbnails/5.jpg)
Class FindUniqueWord {
def alphabets = [‘a’, ‘b’, ‘c’, ‘d’, ‘e’, ‘f’, ‘g’, ‘h’, ‘i’, ‘j’, ‘k’, ‘l’, ‘m’, ‘n’, ‘o’, ‘p’, ‘q’, ‘r’, ‘s’, ‘t’, ‘u’, ‘v’, ‘w’, ‘x’, ‘y’, ‘z’]
function getWeight(String word) {
int weight = 0;
for (i=0; i<word.length(); i++) {
for (j=0; j<alphabets.length(); j++) {
if (word.chartAt(i) == alphabets[j])
weight += j;
}
}
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();
}
}
Class FindUniqueWord {
function getUniqueWords(String[] words) {
List<String> unique = new ArrayList<String>();
for (i=0; i<words.length; i++) {
char[] c1 = words[i].toCharArray();
Arrays.sort(c1);
if (!unique.contains(new String(c1)) {
unique.add(new String(c1));
}
}
return unique.count();
}
}
Find the number of unique word by letter combination
(`aab`, `aba`, `bba`, `baa`) = 2 unique words
![Page 6: Good programmer habits](https://reader036.fdocuments.in/reader036/viewer/2022062308/558ff51d1a28abed798b459b/html5/thumbnails/6.jpg)
What I Imagine When I’m Coding
![Page 7: Good programmer habits](https://reader036.fdocuments.in/reader036/viewer/2022062308/558ff51d1a28abed798b459b/html5/thumbnails/7.jpg)
The Reality…
![Page 8: Good programmer habits](https://reader036.fdocuments.in/reader036/viewer/2022062308/558ff51d1a28abed798b459b/html5/thumbnails/8.jpg)
![Page 9: Good programmer habits](https://reader036.fdocuments.in/reader036/viewer/2022062308/558ff51d1a28abed798b459b/html5/thumbnails/9.jpg)
The Point of being lazy is, you stop doing anything but think, to find an easy way to solve.More simple means less bug.
![Page 10: Good programmer habits](https://reader036.fdocuments.in/reader036/viewer/2022062308/558ff51d1a28abed798b459b/html5/thumbnails/10.jpg)
the greatest enemy of lazy!
So prepare before he come…
![Page 11: Good programmer habits](https://reader036.fdocuments.in/reader036/viewer/2022062308/558ff51d1a28abed798b459b/html5/thumbnails/11.jpg)
Gather all mighty equipment and weapon while you can
I hope can win with just one click
![Page 12: Good programmer habits](https://reader036.fdocuments.in/reader036/viewer/2022062308/558ff51d1a28abed798b459b/html5/thumbnails/12.jpg)
CONCEPTUAL
![Page 13: Good programmer habits](https://reader036.fdocuments.in/reader036/viewer/2022062308/558ff51d1a28abed798b459b/html5/thumbnails/13.jpg)
Imagine if I’m an Architect
![Page 14: Good programmer habits](https://reader036.fdocuments.in/reader036/viewer/2022062308/558ff51d1a28abed798b459b/html5/thumbnails/14.jpg)
Software Architecture
Object-Oriented
Functional
Imperative
Logic Programming
Encapsulation
PolymorphismInheritance
Abstraction
Programming Paradigm
Design Pattern
MVC
Observer
SingletonBuilder
Abstract Factory
Adapter
Decorator
Strategy
Programming Technique
Anonymous Function
Inner Class
Dependency Injection
Multi threading
Software Development
Event Driven Development
Domain Driven Development
Service Oriented Architecture..?
![Page 15: Good programmer habits](https://reader036.fdocuments.in/reader036/viewer/2022062308/558ff51d1a28abed798b459b/html5/thumbnails/15.jpg)
WTF?
![Page 16: Good programmer habits](https://reader036.fdocuments.in/reader036/viewer/2022062308/558ff51d1a28abed798b459b/html5/thumbnails/16.jpg)
The invisible one is impossible to noticed
Unless we understand our coding in design perspective
![Page 17: Good programmer habits](https://reader036.fdocuments.in/reader036/viewer/2022062308/558ff51d1a28abed798b459b/html5/thumbnails/17.jpg)
PASSION
![Page 18: Good programmer habits](https://reader036.fdocuments.in/reader036/viewer/2022062308/558ff51d1a28abed798b459b/html5/thumbnails/18.jpg)
That’s Interesting ….
![Page 19: Good programmer habits](https://reader036.fdocuments.in/reader036/viewer/2022062308/558ff51d1a28abed798b459b/html5/thumbnails/19.jpg)
To improve, simply you need to enjoying the process…..