Good programmer habits
Upcoming SlideShare
Loading in...5
×
 

Good programmer habits

on

  • 1,311 views

 

Statistics

Views

Total Views
1,311
Views on SlideShare
1,245
Embed Views
66

Actions

Likes
0
Downloads
1
Comments
0

1 Embed 66

http://blog.kodelokus.com 66

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Good programmer habits Good programmer habits Presentation Transcript

  • It’s about doing the right thingsKodelokus
  • BE LAZYWoot??
  • I’m not sureI’m doing something useful
  • 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 = newArrayList<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 wordssimpler, more efficient,need less time
  • 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 weaponwhile you canI hope can win with just one click
  • CONCEPTUAL
  • Imagine if I’m an Architect
  • Software ArchitectureObject-OrientedFunctionalImperativeLogic ProgrammingEncapsulationPolymorphismInheritanceAbstractionProgramming ParadigmDesign PatternMVCObserverSingletonBuilderAbstract FactoryAdapterDecoratorStrategyProgramming TechniqueAnonymous FunctionInner ClassDependency InjectionMulti threadingSoftware DevelopmentEvent Driven DevelopmentDomain Driven DevelopmentService Oriented Architecture..?
  • WTF?
  • The invisible one is impossible to noticedUnless we understand our coding in design perspective
  • PASSION
  • That’s Interesting ….
  • And to improve, simply you need to enjoying the process…..