Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
CYPRESS SEMICONDUCTOR 1 RUBY CONF 2004
TEACHING RUBY IN ACORPORATE ENVIRONMENT
JIM FREEZEOCT 1, 2004
CYPRESS SEMICONDUCTOR 2 RUBY CONF 2004
BACKGROUND
CYPRESS SEMICONDUCTOR
ACRONYMSEDA - ELECTRONIC DESIGN AUTOMATIONCAD - BACKEND TOOL SUPPORT
CYPRESS SEMICONDUCTOR 3 RUBY CONF 2004
RUBY IN THE EDA
EDA COMPANIES USING RUBY(THAT I KNOW OF)
CYPRESS AGILENT INTELAT&T MAXIM-IC MOTOROLA
CYPRESS SEMICONDUCTOR 4 RUBY CONF 2004
OUTLINE
COURSE HISTORYSTUDENT PROFILETOOLS AND TEXTSCURRICULUMCOURSE FLOW (STYLE)PUBLICIZINGINFRASTRUCTUREBEST PRACTICES
CYPRESS SEMICONDUCTOR 5 RUBY CONF 2004
COURSE HISTORY
ORIGINALLY TAUGHT IN ONE QTRTWO LESSONS PER WEEK20 LESSONSHOMEWORK
WRITTEN EXERCISESPROGRAMMING LABS
CONDENSED INTO 2.5 DAY COURSENOW TAUGHT 1-2 TIMES PER QTR
CYPRESS SEMICONDUCTOR 6 RUBY CONF 2004
COURSE OVERVIEW
REQUIRES COMPUTER ACCESS IN CLASSROOM1-3 STUDENTS PER COMPUTER
LENGTH IS 2.5 TO 3 DAYSINTERACTIVE EXAMPLESEXCERCISES AND PROGRAMMING LABSCODE REVIEWSPLENTY OF GOOD FOOD AND SNACKSIT’S A CLASS, NOT A PRESENTATION
CYPRESS SEMICONDUCTOR 7 RUBY CONF 2004
STUDENT PROFILE
MANAGERSTEST ENGINEERSMODELING ENGINEERSCAD ENGINEERSTECHNOLOGY INTEGRATION CAD ENGRSDESIGN ENGINEERS
CYPRESS SEMICONDUCTOR 8 RUBY CONF 2004
TOOLS AND TEXTS
CYPRESS SEMICONDUCTOR 9 RUBY CONF 2004
TOOLS
IRBRIEDITOR WITH SYNTAX HIGHLIGHTINGCOMMAND LINE
CYPRESS SEMICONDUCTOR 10 RUBY CONF 2004
TEXTS
PRINTOUT OF LECTURE SLIDES320+ PAGES OF POWERPOINT
Programming Ruby: The PragmaticProgrammer’s Guide
David Thomas, Andrew HuntAddison Wesley Longman, Inc.
CYPRESS SEMICONDUCTOR 11 RUBY CONF 2004
TEXTS CON’T
TEXT MUST HAVE INDEX
STUDENTS WOULD LIKE A QUICK HELPGUIDE
CYPRESS SEMICONDUCTOR 12 RUBY CONF 2004
CURRICULUM
CYPRESS SEMICONDUCTOR 13 RUBY CONF 2004
Course Outline - Day 1• Introduction 7• Ruby Design Principles 23• Getting Started 33• Lab 1 40• Variable, Methods, Classes and Objects 41
• Variables 43• Methods 47• Classes and Objects 52
• OO Theory 59• Lab 2 68• Standard Types 69• Variables 79• Control Structures 87• Printing, Strings and Statements 96• Documentation 104• Lab 3 119• Test First Development 120• Lab 4 148• Regular Expressions and Case Statement 149• Lab 5 174
LET’S RUBY
CYPRESS SEMICONDUCTOR 14 RUBY CONF 2004
CURRICULUM
INTRODUCTION TO RUBY AND MATZHAVE FUNWOW ‘EM
SYNTAX BASICS - NAMING, CONTROL FLOWVARIABLES, METHODS, CLASSES & OBJECTS
INTERNALIZING NEW CONCEPTS MAY BE SLOWCUSTOMIZE CONTENT CAN HELP
CYPRESS SEMICONDUCTOR 15 RUBY CONF 2004
WHAT IS A CLASS?A CLASS IS A COMBINATION OF
• STATE• BEHAVIOR
EXAMPLES:
extract_netlistrmin, fmaxLayout
BehaviorStateClass
simulatevdd, vccFET
to_raphael2dnum_metalsStackup
CYPRESS SEMICONDUCTOR 16 RUBY CONF 2004
STACKUP OBJECT
AN OBJECT IS AN INSTANTIATION OF A CLASS.
Object
Class to_raphael_2dnum_metalsStackup
BehaviorStateName
ram5.to_raphael_2d2ram5
r95ld
Stackup
CYPRESS SEMICONDUCTOR 17 RUBY CONF 2004
NMOS OBJECT
AN OBJECT IS AN INSTANTIATION OF A CLASS.
Object
Class simulatevdd, vccFET
BehaviorStateName
nmos.simulate3.3, 0.0nmos
nmos
FET
CYPRESS SEMICONDUCTOR 18 RUBY CONF 2004
Course Outline - Day 1• Introduction 7• Ruby Design Principles 23• Getting Started 33• Lab 1 40• Variable, Methods, Classes and Objects 41
• Variables 43• Methods 47• Classes and Objects 52
• OO Theory 59• Lab 2 68• Standard Types 69• Variables 79• Control Structures 87• Printing, Strings and Statements 96• Documentation 104• Lab 3 119• Test First Development 120• Lab 4 148• Regular Expressions and Case Statement 149• Lab 5 174
CYPRESS SEMICONDUCTOR 19 RUBY CONF 2004
CURRICULUM
SOLVE COMMON PROBLEMSCODE DOCUMENTATIONSHORT HALF-LIFE OF SCRIPTS
LET’S KEEP UNREADABLE LANGUAGES UNREAD
CYPRESS SEMICONDUCTOR 20 RUBY CONF 2004
Course Outline - Day 1• Introduction 7• Ruby Design Principles 23• Getting Started 33• Lab 1 40• Variable, Methods, Classes and Objects 41
• Variables 43• Methods 47• Classes and Objects 52
• OO Theory 59• Lab 2 68• Standard Types 69• Variables 79• Control Structures 87• Printing, Strings and Statements 96• Documentation 104• Lab 3 119• Test First Development 120• Lab 4 148• Regular Expressions and Case Statement 149• Lab 5 174
CYPRESS SEMICONDUCTOR 21 RUBY CONF 2004
Course Outline - Day 2• Lab 5 174• Iterators and Blocks 175• Method Invocation and Method Missing 188• Lab 6 196• Files and Directory 197• Lab 7 211• Class Variables & Methods and Inheritance 212• Modules, Module Methods and Eval 230• Command Line Applications 242• Exceptions, Catch and Throw 257• Lab 8 273• Daemons, System Calls and Forking 274• Debugging, Profiling and Benchmarking 285• Threads and IO 298• Deployment 305• Best Practices 312• Mail 317• HTTP 319• Resources 321
CYPRESS SEMICONDUCTOR 22 RUBY CONF 2004
CURRICULUM
BLOCKS, PROCS, LAMBDAS, ITERATORS, …GENERALLY MIND WARPING
METHOD INVOCATIONFILE AND DIRECTORY ACCESS
“RUBY SAY …”, GUY DECOUX
CYPRESS SEMICONDUCTOR 23 RUBY CONF 2004
Course Outline - Day 2• Lab 5 174• Iterators and Blocks 175• Method Invocation and Method Missing 188• Lab 6 196• Files and Directory 197• Lab 7 211• Class Variables & Methods and Inheritance 212• Modules, Module Methods and Eval 230• Command Line Applications 242• Exceptions, Catch and Throw 257• Lab 8 273• Daemons, System Calls and Forking 274• Debugging, Profiling and Benchmarking 285• Threads and IO 298• Deployment 305• Best Practices 312• Mail 317• HTTP 319• Resources 321
CYPRESS SEMICONDUCTOR 24 RUBY CONF 2004
Course Outline - Day 2• Lab 5 174• Iterators and Blocks 175• Method Invocation and Method Missing 188• Lab 6 196• Files and Directory 197• Lab 7 211• Class Variables & Methods and Inheritance 212• Modules, Module Methods and Eval 230• Command Line Applications 242• Exceptions, Catch and Throw 257• Lab 8 273• Daemons, System Calls and Forking 274• Debugging, Profiling and Benchmarking 285• Threads and IO 298• Deployment 305• Best Practices 312• Mail 317• HTTP 319• Resources 321
CYPRESS SEMICONDUCTOR 25 RUBY CONF 2004
CURRICULUM
TYING UP LOOSE ENDSFORKING, DEBUGGING, PROFILING,
BENCHMARKING
CORPORATION CUSTOMIZATIONDEPLOYMENTBEST PRACTICESINFRASTRUCTURE
“IT’S A PROGRAMMING IDIOM, NOT A TEST OF CHARACTER”,DAVID BLACK
CYPRESS SEMICONDUCTOR 26 RUBY CONF 2004
Course Outline - Day 2• Lab 5 174• Iterators and Blocks 175• Method Invocation and Method Missing 188• Lab 6 196• Files and Directory 197• Lab 7 211• Class Variables & Methods and Inheritance 212• Modules, Module Methods and Eval 230• Command Line Applications 242• Exceptions, Catch and Throw 257• Lab 8 273• Daemons, System Calls and Forking 274• Debugging, Profiling and Benchmarking 285• Threads and IO 298• Deployment 305• Best Practices 312• Mail 317• HTTP 319• Resources 321
CYPRESS SEMICONDUCTOR 27 RUBY CONF 2004
CURRICULUM
SENDING EMAILHTTP DATA MINING
CYPRESS SEMICONDUCTOR 28 RUBY CONF 2004
COURSE FLOW/INTENSITY
LECTURES MIX OF SLIDES AND IRBEXERCISES DONE BEFORE LABSLABS
LAB TIME USED FOR BREAKSNO SPOON FEEDINGNO FIREHOSEAMPLE COACHING AND SUPPORT
CYPRESS SEMICONDUCTOR 29 RUBY CONF 2004
PUBLICITYWEBSITE - (RUBLOG)
MEMOS
CYPRESS SEMICONDUCTOR 30 RUBY CONF 2004
INFRASTRUCTURE
CUSTOM CORPORATE LIBRARIES AND APPSrequire ‘cypress_init’Cypress::ApplicationCypress::OptionParserproject_config
IP REPOSITORY (DESTOOLS)LIGHTWEIGHT APPLICATION REVIEW BOARD
REVIEW CODEMANAGE IP
CYPRESS SEMICONDUCTOR 31 RUBY CONF 2004
CODE REVIEW
KEEP RUBY CODE LOOKING LIKE RUBYKEEP THINGS SIMPLEENSURE REUSE OF CYPRESS RUBY LIBRARIESENSURE USE OF ‘GLOBAL’ RUBY LIBRARIES
CYPRESS SEMICONDUCTOR 32 RUBY CONF 2004
BEST PRACTICES
BE PATIENT, BE A TEACHER
FACILITATE INTEGRATION, TAKE NO CREDIT
PROMOTE RUBY CODERS, NOT RUBY
CYPRESS SEMICONDUCTOR 33 RUBY CONF 2004
WHAT NEXT?
OPEN SOURCE COURSEWARE?