Programming Tips, Tricks and Tools for Novices  Linux Users of Victoria Beginners Workshop Dec 2011 Alec Clews twitter:@al...
Agenda <ul><li>Introduction
Python programming
Debugging
Using an editor
How and why to use the shell
Git version control </li></ul>Short of time so many simplifications and omissions
Introduction <ul><li>Why </li><ul><li>Solve a problem (desktop, mobile, web, embedded and enterprise)
Have fun
Better jobs </li></ul></ul>“ Coding – the new Latin” <ul><li>How </li><ul><li>Write programs to solve problems
Use simple tools to complete the job </li></ul></ul>
Examples <ul><li>Write a Java app for your Android phone to track your petrol consumption and related data
Build an Arduino device to measure the water in your rainwater tank
Write a desktop application to track your Star Trek A/V material meta data
Create a web application to publish your Star Trek viewing stats and build community </li></ul>
<ul><li>Powerful OO language. Fills a lot of programming needs
Simple syntax and easy to learn
LOTS of learning material, support & user groups
Works for desktop, web and many enterprise applications </li></ul>
BUT <ul><li>If all you have is a hammer every problem looks like a nail!
Learn other languages later e.g. Lisp, Go or Java  </li></ul>
An easier learning curve <ul><li>Scratch is graphical programming system
Good introduction for younger programmers
Upcoming SlideShare
Loading in...5
×

Novice Programmers Workshop

288

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
288
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Novice Programmers Workshop

  1. 1. Programming Tips, Tricks and Tools for Novices Linux Users of Victoria Beginners Workshop Dec 2011 Alec Clews twitter:@alecthegeek email:alecclews@gmail.com
  2. 2. Agenda <ul><li>Introduction
  3. 3. Python programming
  4. 4. Debugging
  5. 5. Using an editor
  6. 6. How and why to use the shell
  7. 7. Git version control </li></ul>Short of time so many simplifications and omissions
  8. 8. Introduction <ul><li>Why </li><ul><li>Solve a problem (desktop, mobile, web, embedded and enterprise)
  9. 9. Have fun
  10. 10. Better jobs </li></ul></ul>“ Coding – the new Latin” <ul><li>How </li><ul><li>Write programs to solve problems
  11. 11. Use simple tools to complete the job </li></ul></ul>
  12. 12. Examples <ul><li>Write a Java app for your Android phone to track your petrol consumption and related data
  13. 13. Build an Arduino device to measure the water in your rainwater tank
  14. 14. Write a desktop application to track your Star Trek A/V material meta data
  15. 15. Create a web application to publish your Star Trek viewing stats and build community </li></ul>
  16. 16. <ul><li>Powerful OO language. Fills a lot of programming needs
  17. 17. Simple syntax and easy to learn
  18. 18. LOTS of learning material, support & user groups
  19. 19. Works for desktop, web and many enterprise applications </li></ul>
  20. 20. BUT <ul><li>If all you have is a hammer every problem looks like a nail!
  21. 21. Learn other languages later e.g. Lisp, Go or Java </li></ul>
  22. 22. An easier learning curve <ul><li>Scratch is graphical programming system
  23. 23. Good introduction for younger programmers
  24. 24. Demo </li></ul>
  25. 25. Demonstration of Python <ul><li>Running Python IDLE
  26. 26. Use Python 2.7 or below
  27. 27. Some useful libraries </li></ul>
  28. 28. Racket <ul><li>Lisp like programming language with an environment
  29. 29. Also has a free book “How to Design Programs, 2 nd ed”
  30. 30. http://www.racket-lang.org/ </li></ul>
  31. 31. Learning Java <ul><li>Greenfoot is development environment and related material for novices to learn Java
  32. 32. http://www.greenfoot.org/ </li></ul>
  33. 33. Testing and Debugging <ul><li>Make testing a regular part of your development process.
  34. 34. Look for tutorials to use the testing frameworks of your language (e.g. PyUnit)
  35. 35. Use a debugger e.g. pdb
  36. 36. An example debugging session </li></ul>
  37. 37. Using an editor <ul><li>IMPORTANT TOOL: The place were most work is done
  38. 38. Chose one and get good with it
  39. 39. Look for </li><ul><li>Regular expression support
  40. 40. Complex find and replace
  41. 41. Macros and scripting </li></ul><li>e.g. Vim, Emacs, Jedit: good enough & X platform </li></ul>
  42. 42. Regular expressions <ul><li>A way to look for “types” of strings rather than literal strings
  43. 43. Used in editors and tools like grep, sed
  44. 44. Also available in many languages to use in your code
  45. 45. Demonstration of grep </li></ul>
  46. 46. Avoid IDE <ul><li>Usually complex and hard to learn
  47. 47. Hides complexity from user => harder to fix problems </li></ul>
  48. 48. Vim features
  49. 49. Using the Shell <ul><li>The fasted and most powerful way to “Get Things Done” on a computer
  50. 50. GUI limited. OK for </li><ul><li>looking at stuff and
  51. 51. doing “one off actions” </li></ul><li>Write small shell scripts to automate things
  52. 52. Provides access to tools like grep, diff etc </li></ul>
  53. 53. Handy shell tips <ul><li>Install ack and use instead of grep to look for things in files http://betterthangrep.com/
  54. 54. Stuck on Windows? Install Cygwin (or learn the Power Shell?) http://www.cygwin.com/
  55. 55. On OS X? Use HomeBrew to install tools
  56. 56. Use links to create shortcuts to projects etc.
  57. 57. Building software? (compiling etc) Use a build tool like make </li></ul>
  58. 58. Version Control <ul><li>Track changes over time so you can: </li><ul><li>Roll back to fix problems
  59. 59. Answer questions
  60. 60. Work with others
  61. 61. Experiment freely
  62. 62. Create different variations of your program </li></ul></ul>
  63. 63. Use Git <ul><li>Powerful branching and merge support
  64. 64. Fast
  65. 65. Very flexible
  66. 66. Fast
  67. 67. Widely used
  68. 68. Fast
  69. 69. Lots of tutorials on the web
  70. 70. Did I mention is was fast? </li></ul>
  71. 71. Other VC tools <ul><li>Bazaar
  72. 72. Mercurial
  73. 73. Subversion – not distributed but used in many projects for historical reasons. Don't use for new projects
  74. 74. Kdiff3 – can be integrated for merging and diff. Works on all major desktop OS </li></ul>
  75. 75. Next Steps <ul><li>Write come code
  76. 76. Join a project
  77. 77. Start a project </li><ul><li>Free web apps deployed on Google App Engine
  78. 78. Free languages and tools
  79. 79. Free code hosting (+ bug trackers etc.)
  80. 80. Arduino boards cost A$40 from local firms
  81. 81. Android SDK is free </li></ul></ul>
  82. 82. Resources <ul><li>Arduino and other related electronics </li><ul><li>http://www.freetronics.com/collections/all-products
  83. 83. http://littlebirdelectronics.com/
  84. 84. http://www.jaycar.com.au/ </li></ul><li>ProGit Book (read online) http://progit.org/
  85. 85. Intro to Git (by me) http://www.sitepoint.com/version-control-git/
  86. 86. Vim Tutorial videos http://www.derekwyatt.org/vim/vim-tutorial-videos/ </li></ul>
  87. 87. More Resources <ul><li>Some Python links http://delicious.com/alecclews/python
  88. 88. Vim Links http://delicious.com/alecclews/vim </li></ul>
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×