SlideShare ist ein Scribd-Unternehmen logo
1 von 14
Art of Writing Small Code
                Sumit Misra
          General Manager
 RS Software (India) Limited
Code is developed to address a Problem Space




                                Problem Space




Learning by knowledge sharing
Code maps the Problem Plane to a Solution Plane

Higher the Solution Plane in abstraction – smaller would the
code be
                       Code

                                                 Solution Plane



                                 Problem Plane




 Learning by knowledge sharing
MASHUP CODE                 Abstraction
     LARGE GRAIN                          CODE
                                        ASSEMBLY CODE
                                    SCRIPTS
           << GRAIN >>




     ASSEMBLY CODE
      SMALL GRAIN               Problem Plane
Learning by knowledge sharing
Partitioning the Problem
            1                       2
                                          space such that the
                                          solution planes are
                                                consistent

                                                   IS

        3                       4         The prelude to the


            Problem Space
Learning by knowledge sharing
Large Code Base                                 Small Code Base


                                    Problem Plane




    1           2      3        4                   1   2           3     4




Learning by knowledge sharing
World's smallest TETRIS program - one line
                        of BBC BASIC, 256 bytes in all written by
                        Olly Betts



     0MODE9:OFF:GCOL-9:CLG:REPEATs=s+VPOS:PRINTCHR$30s:REPEATSYS6,135TOi,p,d:PRINTTAB
     (p=0)CHR$9;:IFPOS=22VDU3100;VPOS,21;6667;:UNTIL0ELSEUNTILVPOS=25:v=ABSRNDMOD7:VD
     U31:COLOUR3:REPEATm=9-INKEY(INKEYTRUEOR6)MOD3:FORr=TRUETO1:t=rANDSGNt:IFt=rCOLOU
     Rv-15:VDUrEORm:i+=m=7AND9-6*r:IF0ELSEFORn=0TO11:d=nDIV3OR2EORd:VDUd:IF1<<(n+i)MO
     D12AND&C2590ECDIV8^vAND975t+=POINT(p*POS,31-VPOS<<5):IFrVDUp,8:IF0ELSENEXT,:VDU2
     0:UNTILt*LOGm:UNTILVPOS=3:Z




             Is this the type of small code we want to write ?


Learning by knowledge sharing
High




                                          Meta Language (Haxe/Neko)
                       Web Programming Language (Dart – Google)

                       Distributed / Meta Program / Reflection
  Abstraction




                                           Internet / RAD

                                 Internet / Web

                        Object Oriented

                                  Structured Programs
  Low




                1950   1960    1970   1980       1990       2000   2010   >>


Learning by knowledge sharing
Problem Plane is Expanding

                                Web Services
                                                          Solution Plane


                                               Internet
                                Web Services




                                Web Services




Learning by knowledge sharing
Mobile Service


   LOCATION

                                             Web Services

    EMAIL
                                                     Smart
                                Internet /           Mobile    User Experience
                                  Web /
                                  Cloud
  APPLICATION                                GPS                CODE
                                             Gyro-meter         (HTML5)
                                             Magnetometer
    SOC IAL
                                             Pyrometer
   NETWORK                                   Light Sensor
                                             Face Detector
                                             Fingerprint Det
                                             … more …

Learning by knowledge sharing
Source: online.wsj.com



Learning by knowledge sharing
Stop Watch program



                  20 lines    HTML/Java Script


                   25 lines
User Experience




                                   Windows 7 Phone


                        43 lines          Java / AWT


                                           120 lines   Windows / C++




Learning by knowledge sharing
SMALL CODE would need
  BETTER DESIGN and
  GOOD KNOWLEDGE of the
  available frameworks and
  services

 “ I'm sorry for the long letter, my dear, but I did not have
 time to make it short. “ – Winston Churchill

Learning by knowledge sharing
Thank you


                       sumit@rssoftware.co.in

Learning by knowledge sharing

Weitere ähnliche Inhalte

Ähnlich wie Art of Writing Small Code by Sumit misra

Embracing concurrency for fun utility and simpler code
Embracing concurrency for fun utility and simpler codeEmbracing concurrency for fun utility and simpler code
Embracing concurrency for fun utility and simpler codekamaelian
 
Kamaelia lightning2010opensource
Kamaelia lightning2010opensourceKamaelia lightning2010opensource
Kamaelia lightning2010opensourcekamaelian
 
3-Way Scripts as a Base Unit for Flexible Scale-Out Code
3-Way Scripts as a Base Unit for Flexible Scale-Out Code3-Way Scripts as a Base Unit for Flexible Scale-Out Code
3-Way Scripts as a Base Unit for Flexible Scale-Out CodeTokyo University of Science
 
Device+Cloud: come sviluppare App moderne ed interconnesse
Device+Cloud: come sviluppare App moderne ed interconnesseDevice+Cloud: come sviluppare App moderne ed interconnesse
Device+Cloud: come sviluppare App moderne ed interconnesseNinja Marketing
 
IoT Week 2022-NGIoT session_Micha vor dem Berge presentation
IoT Week 2022-NGIoT session_Micha vor dem Berge presentationIoT Week 2022-NGIoT session_Micha vor dem Berge presentation
IoT Week 2022-NGIoT session_Micha vor dem Berge presentationVEDLIoT Project
 
microsoft windows phone for government and citizens
microsoft  windows phone for government and citizensmicrosoft  windows phone for government and citizens
microsoft windows phone for government and citizensjoelcitizen
 
Brokerage 2007 presentation multimedia
Brokerage 2007 presentation multimediaBrokerage 2007 presentation multimedia
Brokerage 2007 presentation multimediaimec.archive
 
Distributed Shared Memory on Ericsson Labs
Distributed Shared Memory on Ericsson LabsDistributed Shared Memory on Ericsson Labs
Distributed Shared Memory on Ericsson LabsEricsson Labs
 
ALPHA Script - Ignite Athens 2012
ALPHA Script - Ignite Athens 2012ALPHA Script - Ignite Athens 2012
ALPHA Script - Ignite Athens 2012PROBOTEK
 
Alpha script George Delaportas
Alpha script George DelaportasAlpha script George Delaportas
Alpha script George DelaportasIgnite_Athens
 
Presenter manual android development (specially for summer interns)
Presenter manual   android development (specially for summer interns)Presenter manual   android development (specially for summer interns)
Presenter manual android development (specially for summer interns)XPERT INFOTECH
 
Developing i phone, android and windows phone 7 applications with c#
Developing i phone, android and windows phone 7 applications with c#Developing i phone, android and windows phone 7 applications with c#
Developing i phone, android and windows phone 7 applications with c#Marcel de Vries
 
Shape 2013 developing multi targeting windows store and windows phone apps
Shape 2013   developing multi targeting windows store and windows phone appsShape 2013   developing multi targeting windows store and windows phone apps
Shape 2013 developing multi targeting windows store and windows phone appsJose Luis Latorre Millas
 
Blackberrymobile Application Development Casestudy
Blackberrymobile Application Development CasestudyBlackberrymobile Application Development Casestudy
Blackberrymobile Application Development Casestudydheerajkureel
 
100108 Cloud Age Kawauso
100108 Cloud Age Kawauso100108 Cloud Age Kawauso
100108 Cloud Age Kawausomiyamura
 
100108 Cloud Age Kawauso
100108 Cloud Age Kawauso100108 Cloud Age Kawauso
100108 Cloud Age Kawausomiyamura
 
100108 Cloud Age Kawauso
100108 Cloud Age Kawauso100108 Cloud Age Kawauso
100108 Cloud Age Kawausomiyamura
 
Cisco Presentation 1
Cisco Presentation 1Cisco Presentation 1
Cisco Presentation 1changcai
 

Ähnlich wie Art of Writing Small Code by Sumit misra (20)

Embracing concurrency for fun utility and simpler code
Embracing concurrency for fun utility and simpler codeEmbracing concurrency for fun utility and simpler code
Embracing concurrency for fun utility and simpler code
 
Kamaelia lightning2010opensource
Kamaelia lightning2010opensourceKamaelia lightning2010opensource
Kamaelia lightning2010opensource
 
Lsms SUPSI DTI ISIN
Lsms SUPSI DTI ISINLsms SUPSI DTI ISIN
Lsms SUPSI DTI ISIN
 
3-Way Scripts as a Base Unit for Flexible Scale-Out Code
3-Way Scripts as a Base Unit for Flexible Scale-Out Code3-Way Scripts as a Base Unit for Flexible Scale-Out Code
3-Way Scripts as a Base Unit for Flexible Scale-Out Code
 
AR
ARAR
AR
 
Device+Cloud: come sviluppare App moderne ed interconnesse
Device+Cloud: come sviluppare App moderne ed interconnesseDevice+Cloud: come sviluppare App moderne ed interconnesse
Device+Cloud: come sviluppare App moderne ed interconnesse
 
IoT Week 2022-NGIoT session_Micha vor dem Berge presentation
IoT Week 2022-NGIoT session_Micha vor dem Berge presentationIoT Week 2022-NGIoT session_Micha vor dem Berge presentation
IoT Week 2022-NGIoT session_Micha vor dem Berge presentation
 
microsoft windows phone for government and citizens
microsoft  windows phone for government and citizensmicrosoft  windows phone for government and citizens
microsoft windows phone for government and citizens
 
Brokerage 2007 presentation multimedia
Brokerage 2007 presentation multimediaBrokerage 2007 presentation multimedia
Brokerage 2007 presentation multimedia
 
Distributed Shared Memory on Ericsson Labs
Distributed Shared Memory on Ericsson LabsDistributed Shared Memory on Ericsson Labs
Distributed Shared Memory on Ericsson Labs
 
ALPHA Script - Ignite Athens 2012
ALPHA Script - Ignite Athens 2012ALPHA Script - Ignite Athens 2012
ALPHA Script - Ignite Athens 2012
 
Alpha script George Delaportas
Alpha script George DelaportasAlpha script George Delaportas
Alpha script George Delaportas
 
Presenter manual android development (specially for summer interns)
Presenter manual   android development (specially for summer interns)Presenter manual   android development (specially for summer interns)
Presenter manual android development (specially for summer interns)
 
Developing i phone, android and windows phone 7 applications with c#
Developing i phone, android and windows phone 7 applications with c#Developing i phone, android and windows phone 7 applications with c#
Developing i phone, android and windows phone 7 applications with c#
 
Shape 2013 developing multi targeting windows store and windows phone apps
Shape 2013   developing multi targeting windows store and windows phone appsShape 2013   developing multi targeting windows store and windows phone apps
Shape 2013 developing multi targeting windows store and windows phone apps
 
Blackberrymobile Application Development Casestudy
Blackberrymobile Application Development CasestudyBlackberrymobile Application Development Casestudy
Blackberrymobile Application Development Casestudy
 
100108 Cloud Age Kawauso
100108 Cloud Age Kawauso100108 Cloud Age Kawauso
100108 Cloud Age Kawauso
 
100108 Cloud Age Kawauso
100108 Cloud Age Kawauso100108 Cloud Age Kawauso
100108 Cloud Age Kawauso
 
100108 Cloud Age Kawauso
100108 Cloud Age Kawauso100108 Cloud Age Kawauso
100108 Cloud Age Kawauso
 
Cisco Presentation 1
Cisco Presentation 1Cisco Presentation 1
Cisco Presentation 1
 

Kürzlich hochgeladen

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 

Kürzlich hochgeladen (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 

Art of Writing Small Code by Sumit misra

  • 1. Art of Writing Small Code Sumit Misra General Manager RS Software (India) Limited
  • 2. Code is developed to address a Problem Space Problem Space Learning by knowledge sharing
  • 3. Code maps the Problem Plane to a Solution Plane Higher the Solution Plane in abstraction – smaller would the code be Code Solution Plane Problem Plane Learning by knowledge sharing
  • 4. MASHUP CODE Abstraction LARGE GRAIN CODE ASSEMBLY CODE SCRIPTS << GRAIN >> ASSEMBLY CODE SMALL GRAIN Problem Plane Learning by knowledge sharing
  • 5. Partitioning the Problem 1 2 space such that the solution planes are consistent IS 3 4 The prelude to the Problem Space Learning by knowledge sharing
  • 6. Large Code Base Small Code Base Problem Plane 1 2 3 4 1 2 3 4 Learning by knowledge sharing
  • 7. World's smallest TETRIS program - one line of BBC BASIC, 256 bytes in all written by Olly Betts 0MODE9:OFF:GCOL-9:CLG:REPEATs=s+VPOS:PRINTCHR$30s:REPEATSYS6,135TOi,p,d:PRINTTAB (p=0)CHR$9;:IFPOS=22VDU3100;VPOS,21;6667;:UNTIL0ELSEUNTILVPOS=25:v=ABSRNDMOD7:VD U31:COLOUR3:REPEATm=9-INKEY(INKEYTRUEOR6)MOD3:FORr=TRUETO1:t=rANDSGNt:IFt=rCOLOU Rv-15:VDUrEORm:i+=m=7AND9-6*r:IF0ELSEFORn=0TO11:d=nDIV3OR2EORd:VDUd:IF1<<(n+i)MO D12AND&C2590ECDIV8^vAND975t+=POINT(p*POS,31-VPOS<<5):IFrVDUp,8:IF0ELSENEXT,:VDU2 0:UNTILt*LOGm:UNTILVPOS=3:Z Is this the type of small code we want to write ? Learning by knowledge sharing
  • 8. High Meta Language (Haxe/Neko) Web Programming Language (Dart – Google) Distributed / Meta Program / Reflection Abstraction Internet / RAD Internet / Web Object Oriented Structured Programs Low 1950 1960 1970 1980 1990 2000 2010 >> Learning by knowledge sharing
  • 9. Problem Plane is Expanding Web Services Solution Plane Internet Web Services Web Services Learning by knowledge sharing
  • 10. Mobile Service LOCATION Web Services EMAIL Smart Internet / Mobile User Experience Web / Cloud APPLICATION GPS CODE Gyro-meter (HTML5) Magnetometer SOC IAL Pyrometer NETWORK Light Sensor Face Detector Fingerprint Det … more … Learning by knowledge sharing
  • 12. Stop Watch program 20 lines HTML/Java Script 25 lines User Experience Windows 7 Phone 43 lines Java / AWT 120 lines Windows / C++ Learning by knowledge sharing
  • 13. SMALL CODE would need BETTER DESIGN and GOOD KNOWLEDGE of the available frameworks and services “ I'm sorry for the long letter, my dear, but I did not have time to make it short. “ – Winston Churchill Learning by knowledge sharing
  • 14. Thank you sumit@rssoftware.co.in Learning by knowledge sharing

Hinweis der Redaktion

  1. Stopwatch programHTML/JavaScript: 20 linesWindows 7 Phone : 25 linesJava AWT: 43 linesWindows C++: 120 lines