Programovacı Jazyky Pro Vy´Uku Programova´Nı Na

Total Page:16

File Type:pdf, Size:1020Kb

Programovacı Jazyky Pro Vy´Uku Programova´Nı Na MASARYKOVA UNIVERZITA }w¡¢£¤¥¦§¨ FAKULTA INFORMATIKY !"#$%&'()+,-./012345<yA| Programovacı´jazyky pro vy´uku programova´nı´na SSˇ DIPLOMOVA´ PRA´ CE Bc. Luka´sˇRy´dlo Brno, 2012 Prohla´sˇenı´ Prohlasˇuji, zˇe tato diplomova´pra´ce je my´m pu˚vodnı´m autorsky´m dı´lem, ktere´ jsem vypracoval samostatneˇ. Vsˇechny zdroje, prameny a literaturu, ktere´jsem prˇi vypracova´nı´pouzˇı´val nebo z nich cˇerpal, v pra´ci rˇa´dneˇcituji s uvedenı´m u´plne´ho odkazu na prˇı´slusˇny´zdroj. Vedoucı´pra´ce: doc. RNDr. Toma´sˇPitner, Ph.D. iii Podeˇkova´nı´ Ra´d bych podeˇkoval vedoucı´mu sve´pra´ce, doc. RNDr. Toma´sˇi Pitnerovi, Ph.D. za ochotu ve´st me´te´ma, nevsˇednı´vstrˇı´cnost a trpeˇlivost i konkre´tnı´tipy. v Abstrakt Pra´ce prˇina´sˇı´zhodnocenı´ru˚zny´ch programovacı´ch jazyku˚, metodik a prostrˇedı´ pro potrˇeby vy´uky na strˇednı´ch sˇkola´ch. V u´vodnı´kapitole jsou popsane´teoreticke´ koncepty, formy vy´uky, analy´za metodik v oblasti vy´uky programova´nı´, vhodnost jednotlivy´ch paradigmat. Druha´kapitola prˇina´sˇı´prˇehled za´kladnı´ch metod graficke´ho popisu algoritmu, jejich vhodnost a vyuzˇitelnost prˇi vy´uce. Trˇetı´kapitola zacˇı´na´na´vrhem metodiky hodnocenı´programovacı´ch jazyku˚pro potrˇeby vy´uky a jejich prˇehledem. Dalsˇı´ka- pitola hodnotı´pro zmeˇnu ru˚zna´vy´vojova´prostrˇedı´, at’uzˇpouzˇı´vana´v beˇzˇne´praxi nebo urcˇena´prˇı´mo pro vy´uku. Za´veˇr pra´ce je veˇnova´n vy´ukovy´m materia´lu˚m pro semina´rˇz programova´nı´na gymna´ziu v jazyce Java metodou objects first, resp. model first (viz kapitola 1.5). Abstract This thesis is focused on teaching programming at secondary level schools, in the way of choosing languages, methodics, paradigms and development environment useful for educational process as well as real life. First chapter contains theoretical concepts, teaching methods, paradigm analy- sis. Second chapter briefly describes graphical representation of algorithms. Third chapter begins with language comparison methodics and then compares selected lan- guages with description. Next chapter compares development environments, both used in real work and specialized on teaching purposes. Last part brings teaching materials for programming course on high school, in or- der to support teaching Java and object oriented programming/modeling in objects- first way. This thesis is written in Czech language. Klı´cˇova´slova vy´uka programova´nı´, programovacı´jazyky, didaktika informatiky, strˇednı´sˇkoly, IDE, teaching programming, high school, paradigms vi Obsah 0 U´ vod .........................................1 1 Teoreticky´za´klad ..................................3 1.1 Koho budu ucˇit .................................3 1.2 Forma vy´uky ..................................5 1.3 Co a procˇbudu ucˇit ...............................6 1.4 Paradigmata ...................................8 1.4.1 Funkciona´lnı´.............................8 1.4.2 Logicke´.................................9 1.4.3 Imperativnı´strukturovane´.....................9 1.4.4 Objektoveˇorientovane´........................ 10 1.4.5 Uda´lostmi rˇı´zene´........................... 11 1.4.6 Multiparadigmaticke´jazyky.................... 11 1.5 Zarˇazenı´paradigmat do vy´uky ......................... 12 1.6 Jak budu ucˇit – obecna´metodika ........................ 14 2 Graficky´popis algoritmu˚ ............................. 21 2.1 Vy´vojove´diagramy ............................... 21 2.2 Kopenogram ................................... 24 2.3 Nassi-Shneidermannu˚v diagram ........................ 26 2.4 UML ...................................... 26 3 Jazyky ........................................ 35 3.1 Metodika volby jazyka ............................. 35 3.1.1 Kriteria hodnocenı´jazyku˚...................... 36 3.2 Prˇehled vybrany´ch jazyku˚ ........................... 39 3.2.1 Pascal................................. 39 3.2.2 C.................................... 41 3.2.3 C++................................... 42 3.2.4 C# (.NET)............................... 44 3.2.5 Visual Basic.............................. 45 3.2.6 Java................................... 46 3.2.7 PHP.................................. 48 3.2.8 JavaScript (resp. ECMAScript)................... 50 3.2.9 Perl................................... 51 3.2.10 Python................................. 53 3.2.11 Ruby.................................. 54 3.2.12 Karel.................................. 56 vii 4 Vy´vojova´a vy´ukova´prostrˇedı´ .......................... 57 4.1 Robot Karel ................................... 57 4.2 Lego Mindstorms ................................ 58 4.3 Arduino ..................................... 59 4.4 Baltı´k ...................................... 59 4.5 Scratch ..................................... 61 4.6 Alice 3D ..................................... 61 4.7 BlueJ ....................................... 62 4.8 Greenfoot .................................... 62 4.9 Dev-C++ .................................... 63 4.10 MS Visual Studio Express ........................... 63 4.11 Netbeans .................................... 64 5 Prˇı´pravypro semina´rˇprogramova´nı´ ....................... 65 1. lekce – Terminologie a algoritmizace...................... 66 2. lekce – Algoritmizace.............................. 70 3. lekce – Za´klady OOP............................... 75 4. lekce – Atributy a datove´typy......................... 77 5. lekce – Metody, API Greenfootu........................ 78 6. lekce – Podmı´nky a vy´jimky.......................... 79 7. lekce – Cykly................................... 80 8. lekce – Procvicˇova´nı´............................... 81 9. lekce – Testy a TDD, BlueJ............................ 82 10. a 11. lekce – Pole, kolekce, itera´tory...................... 83 12. lekce – Souborovy´vstup/vy´stup....................... 84 Dalsˇı´navrhovane´lekce............................... 85 6 Shrnutı´ ........................................ 89 viii Kapitola 0 U´ vod Jizˇneˇkolik let docha´zı´ke zmeˇna´m v prˇı´stupu k vy´uce programova´nı´na vysoky´ch sˇkola´ch, byt’v Cˇeske´republice k tomu docha´zı´s mı´rny´m zpozˇdeˇnı´m vu˚cˇi za´padnı´mu sveˇtu. Meˇnı´ se nabı´dka programovacı´ch jazyku˚ i metody vy´uky, zacˇı´na´ se kla´st du˚raz i na ru˚zne´ metodiky vy´voje software, nejen na pouhou znalost syntaxe a se´mantiky konkre´tnı´ho jazyka, neˇktere´jazyky se opousˇtı´(jazyk symbolicky´ch adres – neprˇesneˇnazy´vany´assembler), jine´se dosta´vajı´do poprˇedı´za´jmu a dalsˇı´se teprve prosazujı´(naprˇ. Ruby). Podobneˇdocha´zı´k diskusı´m a postupne´mu vy´voji i ve vy´uce informatiky na strˇednı´ch sˇkola´ch, v soucˇasne´dobeˇprˇedevsˇı´m dı´ky sta´tnı´maturiteˇ. Prˇesto na mnohy´ch strˇednı´ch sˇkola´ch v Cˇeske´republice se programova´nı´sta´le ucˇı´ stary´mi metodami a v „osveˇdcˇeny´ch“ jazycı´ch jako je Pascal nebo VisualBasic. Zmeˇna veˇtsˇinou za´visı´na samotny´ch vyucˇujı´cı´ch informatiky,protozˇe zavedenı´m RVP 1 dosˇlo k prˇevedenı´zodpoveˇdnosti za volbu na´plneˇvy´uky na sˇkoly. Nemalou roli ve volbeˇprogramovacı´ho jazyka pro vy´uku hraje jisteˇi setrvacˇnost vyucˇujı´cı´ch a prˇedevsˇı´m absence mozˇnosti efektivnı´cestou se novy´jazyk naucˇit. Pro mnohe´je ota´zkou „Ktery´je ten spra´vny´?“, protozˇe neexistuje v cˇesˇtineˇdostupne´shrnutı´dnes pouzˇı´vany´ch jazyku˚a jejich vhodnosti. Ve zmeˇti knih ru˚zny´ch u´rovnı´na´rocˇnosti, kvality a cı´love´skupiny cˇtena´rˇu˚se lze teˇzˇko orientovat. Acˇkoliv Ra´mcovy´vzdeˇla´vacı´program pro gymna´zia [2, str. 63] deklaruje vy´chovu zˇa´ku˚k algoritmicke´mu mysˇlenı´, vyucˇujı´cı´postra´dajı´ucˇebnice a metodiku, ktera´by takovou abstraktnı´proklamaci aplikovala do prakticke´vy´uky. Lepsˇı´situace nenı´ ani prˇi vy´beˇru ucˇebnic. Nabı´dka je sice sˇiroka´, ale pomeˇrneˇma´lo knih je vhodny´ch jako ucˇebnice pro strˇednı´sˇkoly – veˇtsˇinu z nich lze doporucˇit spı´sˇe jako doplneˇk vy´uky pro samostudium. Pedagogicka´opora ve formeˇsbı´rek prˇı´kladu˚k procvicˇenı´ opeˇt neexistuje, stare´sbı´rky veˇtsˇinou nelze pouzˇı´t, protozˇe obsahujı´prˇeva´zˇneˇu´lohy matematicke´, ktere´ dnesˇnı´ zˇa´ky nemotivujı´ a svy´m zameˇrˇenı´m na strukturovane´ paradigma se nehodı´prˇi vy´uce objektove´ho programova´nı´. V te´to diplomove´pra´ci si kladu za cı´l jednak analyzovat nabı´dku programovacı´ch a skriptovacı´ch jazyku˚z hlediska jejich vhodnosti pro vy´uku programova´nı´, ale take´ prˇehledneˇprˇine´st na´vrhy k alternativnı´m forma´m vy´uky programova´nı´a algoritmi- zace prˇedevsˇı´m v prostrˇedı´strˇednı´ch sˇkol, respektive na vysˇsˇı´m stupni za´kladnı´ch sˇkol. V pra´ci se pokusı´m zohlednit te´meˇrˇtrˇı´letou praxi ve vy´uce strukturovane´ho 1. RVP – Ra´mcovy´vzdeˇla´vacı´program, popisuje pouze obecna´te´mata a vı´ceme´neˇabstraktnı´cı´love´ dovednosti (tzv. klı´cˇove´kompetence) na rozdı´l od drˇı´ve pouzˇı´vany´ch pomeˇrneˇkonkre´tnı´ch osnov. To umozˇnˇuje sˇkola´m prˇizpu˚sobit svu˚j SˇVP – sˇkolnı´vzdeˇla´vacı´program – a odlisˇit se od jiny´ch sˇkol. 1 0. U´ VOD programova´nı´v jazyce C na gymna´ziu a ra´d bych touto pracı´prˇispeˇl k sˇirsˇı´diskusi a zmeˇneˇ, jaka´probeˇhla naprˇ. v Neˇmecku [6]. Pocˇı´tacˇova´gramotnost ve smyslu schopnosti ovla´dat pocˇı´tacˇv beˇzˇny´ch zˇivotnı´ch situacı´ch informacˇnı´spolecˇnosti jako je komunikace prˇes internet, vyhleda´va´nı´infor- macı´nebo jejich zpracova´nı´v ru˚zny´ch programech, je pro dnesˇnı´mla´dezˇnaprostou nezbytnostı´a jako takovou ji lze srovna´vat s prima´rnı´gramotnostı´. Je pravdeˇpo- dobneˇ jen ota´zkou cˇasu, kdy vy´uka vyhleda´va´nı´ na internetu nebo typografie a psanı´v textovy´ch procesorech prˇejde
Recommended publications
  • The Shogun Machine Learning Toolbox
    The Shogun Machine Learning Toolbox Heiko Strathmann, Gatsby Unit, UCL London Open Machine Learning Workshop, MSR, NY August 22, 2014 A bit about Shogun I Open-Source tools for ML problems I Started 1999 by SÖren Sonnenburg & GUNnar Rätsch, made public in 2004 I Currently 8 core-developers + 20 regular contributors I Purely open-source community driven I In Google Summer of Code since 2010 (29 projects!) Ohloh - Summary Ohloh - Code Supervised Learning Given: x y n , want: y ∗ x ∗ I f( i ; i )gi=1 j I Classication: y discrete I Support Vector Machine I Gaussian Processes I Logistic Regression I Decision Trees I Nearest Neighbours I Naive Bayes I Regression: y continuous I Gaussian Processes I Support Vector Regression I (Kernel) Ridge Regression I (Group) LASSO Unsupervised Learning Given: x n , want notion of p x I f i gi=1 ( ) I Clustering: I K-Means I (Gaussian) Mixture Models I Hierarchical clustering I Latent Models I (K) PCA I Latent Discriminant Analysis I Independent Component Analysis I Dimension reduction I (K) Locally Linear Embeddings I Many more... And many more I Multiple Kernel Learning I Structured Output I Metric Learning I Variational Inference I Kernel hypothesis testing I Deep Learning (whooo!) I ... I Bindings to: LibLinear, VowpalWabbit, etc.. http://www.shogun-toolbox.org/page/documentation/ notebook Some Large-Scale Applications I Splice Site prediction: 50m examples of 200m dimensions I Face recognition: 20k examples of 750k dimensions ML in Practice I Modular data represetation I Dense, Sparse, Strings, Streams, ... I Multiple types: 8-128 bit word size I Preprocessing tools I Evaluation I Cross-Validation I Accuracy, ROC, MSE, ..
    [Show full text]
  • Java Code Documentation Example
    Java Code Documentation Example Fruitless Martino sometimes quick-freeze his peritonitis hugely and night-club so dispraisingly! Glottogonic and sublinear Finn melt his bodice permeates podding benevolently. Oswald usually medicines surgically or orbs telescopically when polyunsaturated Hugh dement evidentially and lewdly. The javadoc itself an unsupported extension and is also important in the description for code documentation comment merely repeats the banner section DocsapijavanetURLhtmlgetAuthority-- a method getAuhority in the. API reference code comments Google Developers. Omitting many times classes being documented type, and java example of each field, all trademarks and description below code completion window, which we used to. Java Programming Style Guide. The keyboard shortcut to comment multiple in Windows is shift alt A. 10 Best Practices to multiple While Writing Code Javarevisited. Concise presentations of java programming practices tasks and conventions amply illustrated with syntax highlighted code examples. Java Documentation Comments Tutorialspoint. Java Programming Guidelines. If this tag easily comment related comments java code, this user to new field in the dependency. The following examples demonstrate a pain line summary followed by detailed documentation in song three. CS 302 Commenting Guide Program Commenting Guide File. For sober you spawn use author tag to identify the author of a. Opinions expressed by the code example code documentation is overridden in the documentation for example code base classes and decide to allow bikes to achieve these methods. Example slope from the Javadoc documentation code can be documented inline Single Line comments are started by each may be positioned after a. The Documentation Comment Specification permits leading asterisks on enough first.
    [Show full text]
  • Comments and Documentation 2501ICT/7421Ictnathan
    C Comments Using Doxygen Comments and Documentation 2501ICT/7421ICTNathan René Hexel School of Information and Communication Technology Griffith University Semester 1, 2012 René Hexel Comments and Documentation C Comments Using Doxygen Outline 1 C Comments 2 Using Doxygen René Hexel Comments and Documentation C Comments Using Doxygen Comments Plain C allows comments between /* and */ /* this is a valid C comment */ Comments may not be nested /* this /* is not a valid C comment */ */ C99 also allows double-slash // end-of-line comments // this is a valid comment no closing sequence needed – the comment ends at the end of the line René Hexel Comments and Documentation C Comments Using Doxygen Comment Example Example (Program with Comments) /* * This program prints "j = 007". * It does not take any parameters and returns 0 on success. */ int main(void)/ * main function definition */ { int j; // our int variable to play with j=7; // assign a value to be printed printf("j = %03.3dnn",j); // print value with leading zeroes return 0; // everything is fine, exit program } René Hexel Comments and Documentation C Comments Using Doxygen Where to put comments? At the beginning of each file (module) describe the name of the module, purpose, author, and dates when first created and last modified Before each function (method) describe the purpose of the function or method, input parameters (arguments), return values (output parameters), and pre- and postconditions (contract) At the beginning of each class describe the purpose of the class, and things to
    [Show full text]
  • SWIG and Ruby
    SWIG and Ruby David Grayson Las Vegas Ruby Meetup 2014-09-10 SWIG ● SWIG stands for: Simplified Wrapper and Interface Generator ● SWIG helps you access C or C++ code from 22 different languages, including Ruby SWIG inputs and outputs Ruby C extension SWIG interface file (.i) source (.c or .cxx) Simple C++ example libdavid.h: libdavid.i #include <stdio.h> %module "david" class David %{ { #include <libdavid.h> public: %} David(int x) { class David this->x = x; { } public: David(int x); void announce() void announce(); { int x; }; printf("David %d\n", x); } int x; }; Compiling Simple C++ example extconf.rb require 'mkmf' system('swig -c++ -ruby libdavid.i') or abort create_makefile('david') Commands to run: $ ruby extconf.rb # create libdavid_wrap.cxx and Makefile $ make # compile david.so $ irb -r./david # try it out irb(main):001:0> d = David::David.new(4) => #<David::David:0x007f40090a5280 @__swigtype__="_p_David"> irb(main):002:0> d.announce David 4 => nil (This example worked for me with SWIG 3.0.2 and Ruby 2.1.2.) That example was pretty simple ● All code was in a .h file ● No external libraries ● Simple data types ● No consideration of deployment ...but SWIG has tons of features C: C++: ● All ISO C datatypes ● All C++ datatypes ● Global functions ● References ● Global variables, constants ● Pointers to members ● Structures and unions ● Classes ● Pointers ● (Multiple) inheritance ● (Multidimensional) arrays ● Overloaded functions ● Pointers to functions ● Overloaded methods ● Variable length arguments ● Overloaded operators ● Typedefs ● Static members ● Enums ● Namespaces ● Templates ● Nested classes ... SWIG Typemaps ● Define custom ways to map between scripting- language types and C++ types. ● Can be used to add and remove parameters from of exposed functions.
    [Show full text]
  • Dragonfly.Wpi.Edu/Book/ February 28, 2013 8:8 Computer Science Education Paper
    February 28, 2013 8:8 Computer Science Education paper Computer Science Education Vol. XX, No. XX, June 2013, 1–18 RESEARCH ARTICLE Dragonfly – Strengthening Programming Skills by Building a Game Engine from Scratch Mark Claypool Computer Science and Interactive Media & Game Development Worcester Polytechnic Institute, Worcester, MA 01609, USA email: [email protected] (Received 00 Month 200x; final version received 00 Month 200x) Computer game development has been shown to be an effective hook for motivating students to learn both introductory and advanced computer science topics. While games can be made from scratch, to simplify the programming required game development often uses game engines that handle complicated or frequently used components of the game. These game engines present the opportunity to strengthen programming skills and expose students to a range of fundamental computer science topics. While educational efforts have been effective in using game engines to improve computer science education, there have been no published papers describing and evaluating students building a game engine from scratch as part of their course work. This paper presents the Dragonfly-approach in which students build a fully functional game engine from scratch and make a game using their engine as part of a junior-level course. Details on the programming projects are presented, as well as an evaluation of the results from two offerings that used Dragonfly. Student performance on the projects as well as student assessments demonstrate the efficacy of having students build a game engine from scratch in strengthening their programming skills. Keywords: game engine, programming, object-oriented design, software engineering, game development 1 Introduction By the end of their second year, most computer science students have been exposed to a breadth of foundational materials, such as introductory programming, basic data structures and algo- rithms, and have begun to write programs of moderate size – hundreds of lines of code, perhaps up to even a thousand lines of code.
    [Show full text]
  • PHP Beyond the Web Shell Scripts, Desktop Software, System Daemons and More
    PHP Beyond the web Shell scripts, desktop software, system daemons and more Rob Aley This book is for sale at http://leanpub.com/php This version was published on 2013-11-25 This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and many iterations to get reader feedback, pivot until you have the right book and build traction once you do. ©2012 - 2013 Rob Aley Tweet This Book! Please help Rob Aley by spreading the word about this book on Twitter! The suggested hashtag for this book is #phpbeyondtheweb. Find out what other people are saying about the book by clicking on this link to search for this hashtag on Twitter: https://twitter.com/search?q=#phpbeyondtheweb Contents Welcome ............................................ i About the author ...................................... i Acknowledgements ..................................... ii 1 Introduction ........................................ 1 1.1 “Use PHP? We’re not building a website, you know!”. ............... 1 1.2 Are you new to PHP? ................................. 2 1.3 Reader prerequisites. Or, what this book isn’t .................... 3 1.4 An important note for Windows and Mac users ................... 3 1.5 About the sample code ................................ 4 1.6 External resources ................................... 4 1.7 Book formats/versions available, and access to updates ............... 5 1.8 English. The Real English. .............................. 5 2 Getting away from the Web - the basics ......................... 6 2.1 PHP without a web server .............................. 6 2.2 PHP versions - what’s yours? ............................. 7 2.3 A few good reasons NOT to do it in PHP ...................... 8 2.4 Thinking about security ...............................
    [Show full text]
  • Analytic Center Cutting Plane Method for Multiple Kernel Learning
    Ann Math Artif Intell DOI 10.1007/s10472-013-9331-4 Analytic center cutting plane method for multiple kernel learning Sharon Wulff · Cheng Soon Ong © Springer Science+Business Media Dordrecht 2013 Abstract Multiple Kernel Learning (MKL) is a popular generalization of kernel methods which allows the practitioner to optimize over convex combinations of kernels. We observe that many recent MKL solutions can be cast in the framework of oracle based optimization, and show that they vary in terms of query point generation. The popularity of such methods is because the oracle can fortuitously be implemented as a support vector machine. Motivated by the success of centering approaches in interior point methods, we propose a new approach to optimize the MKL objective based on the analytic center cutting plane method (accpm). Our experimental results show that accpm outperforms state of the art in terms of rate of convergence and robustness. Further analysis sheds some light as to why MKL may not always improve classification accuracy over naive solutions. Keywords Multiple kernel learning · accpm · Oracle methods · Machine learning Mathematics Subject Classification (2010) 68T05 1 Introduction Kernel methods, for example the support vector machine (SVM), are a class of algorithms that consider only the similarity between examples [1]. A kernel function S. Wulff Department of Computer Science, ETH, Zürich, Switzerland e-mail: [email protected] C. S. Ong (B) NICTA, The University of Melbourne, Melbourne, Australia e-mail: [email protected] S. Wulff, C.S. Ong k implicitly maps examples x to a feature space given by a feature map via the identity k(xi, x j) = (xi), (x j) .
    [Show full text]
  • Intro to Doxygen
    Intro to Doxygen Stephen Herbener JEDI Core Team 4/19/18 Doxywizard • GUI that helps you configure and run doxygen • Doxywizard assists in the creation of a doxygen configuration file • User enters information through GUI forms • The configuration file created by Doxywizard can be used directly by doxygen • Enables batch processing from the command line: doxygen <config_file> • Doxywizard can run doxygen for you • Hit the “Run” button • Captures output from doxygen in a GUI window • Doxywizard is supported by the developers of doxygen • https://www.stack.nl/~dimitri/doxygen/manual/doxywizard_usage.html Doxywizard: Start up On the Mac, click on the Doxygen icon in the Applications folder • Configuration buttons • Wizard: Quick and easy • Expert: All the gory details Doxywizard: Wizard configuration • Project • Mode • Set paths to source code and destination to • Select what to extract and the primary output documentation programming language in the source code Doxywizard: Wizard configuration • Output • Diagrams • Set the formats for the generated • Select any diagrams to be placed in the documentation generated documentation Doxywizard: Expert configuration • Set the path to the dot executable • EXTRACT_PRIVATE will include private data members • Typically: /usr/local/bin/dot and methods in generated documentation • EXTRACT_STATIC will include static members in generated documentation Doxywizard: Expert configuration • Make sure to include *.F90 file pattern Doxywizard: Run doxygen • You will get the same result by running on the command
    [Show full text]
  • Python and Epics: Channel Access Interface to Python
    Python and Epics: Channel Access Interface to Python Matthew Newville Consortium for Advanced Radiation Sciences University of Chicago October 12, 2010 http://cars9.uchicago.edu/software/python/pyepics3/ Matthew Newville (CARS, Univ Chicago) Epics and Python October 12, 2010 Why Python? The Standard Answers Clean Syntax Easy to learn, remember, and read High Level Language No pointers, dynamic memory, automatic memory Cross Platform code portable to Unix, Windows, Mac. Object Oriented full object model, name spaces. Also: procedural! Extensible with C, C++, Fortran, Java, .NET Many Libraries GUIs, Databases, Web, Image Processing, Array math Free Both senses of the word. No, really: completely free. Matthew Newville (CARS, Univ Chicago) Epics and Python October 12, 2010 Why Python? The Real Answer Scientists use Python. Matthew Newville (CARS, Univ Chicago) Epics and Python October 12, 2010 All of these tools use the C implementation of Python. NOT Jython (Python in Java) or IronPython (Python in .NET): I am not talking about Jython. Why Do Scientists Use Python? Python is great. The tools are even better: numpy Fast arrays. matplotlib Excellent Plotting library scipy Numerical Algorithms (FFT, lapack, fitting, . ) f2py Wrapping Fortran for Python sage Symbolic math (ala Maple, Mathematica) GUI Choices Tk, wxWidgets, Qt, . Free Python is Free. All these tools are Free (BSD). Matthew Newville (CARS, Univ Chicago) Epics and Python October 12, 2010 Why Do Scientists Use Python? Python is great. The tools are even better: numpy Fast arrays. matplotlib Excellent Plotting library scipy Numerical Algorithms (FFT, lapack, fitting, . ) f2py Wrapping Fortran for Python sage Symbolic math (ala Maple, Mathematica) GUI Choices Tk, wxWidgets, Qt, .
    [Show full text]
  • Session 402 Evan Cheng Sr
    What's New in the LLVM Compiler Session 402 Evan Cheng Sr. Manager, Compilation Technologies These are confidential sessions—please refrain from streaming, blogging, or taking pictures Focused on Providing Best-in-Class Tools Focused on Providing Best-in-Class Tools Support for latest hardware Focused on Providing Best-in-Class Tools Support for latest hardware Improving performance Focused on Providing Best-in-Class Tools Support for latest hardware Improving performance Improving developer productivity Support for Latest Hardware armv7s Architecture • Architecture for Apple A6 processor ■ iPhone 5 and new iPads • Extensive tuning and optimization in the compiler ■ Uses instructions only available in armv7s armv7s Architecture • Architecture for Apple A6 processor ■ iPhone 5 and new iPads • Extensive tuning and optimization in the compiler ■ Uses instructions only available in armv7s Important for achieving max performance! armv7s Architecture • Already part of the standard architectures for iOS apps Intel AVX • 256-bit floating-point vector computation ■ Twice as wide as SSE vectors ■ Supported in Sandy Bridge and Ivy Bridge processors • Good for loops with operations that can be performed in parallel ■ Floating-point intensive ■ High ratio of computation to memory bandwidth Intel AVX2 • Supported in “Haswell” processors ■ Extend the AVX instruction set to integers ■ Adds fused multiply-accumulate for increased floating point throughput ■ More extensive set of vector shuffle instructions Using AVX2 with Fallback to AVX / SSE • Check
    [Show full text]
  • Advanced Wxpython Nuts and Bolts Robin Dunn O'reilly Open
    Advanced wxPython Nuts and Bolts Robin Dunn Software Craftsman O’Reilly Open Source Convention July 21–25, 2008 Slides available at http://wxPython.org/OSCON2008/ wxPython: Cross Platform GUI Toolkit 1 Presentation Overview • Introduction • Widget Inspection Tool • wx.ListCtrl • Keeping the UI Updated • Virtual wx.ListCtrl • Sizers and more sizers • wx.TreeCtrl • XML based resource system • wx.gizmos.TreeListCtrl • Data transfer • CustomTreeCtrl – data objects • wx.grid.Grid – clipboard • ScrolledPanel – drag and drop • wx.HtmlWindow • Creating custom widgets • Double buffered drawing wxPython: Cross Platform GUI Toolkit 2 Introduction to wxPython • wxPython is a GUI toolkit for Python, built upon the wxWidgets C++ toolkit. (See http://wxWidgets.org/) – Cross platform: Windows, Linux, Unix, OS X. – Uses native widgets/controls, plus many platform independent widgets. • Mature, well established projects. – wxWidgets: 1992 – wxPython: 1996 wxPython: Cross Platform GUI Toolkit 3 Introduction: architecture wxPython Library Proxy classes wxPython Extension Modules wxWidgets Toolkit Platform GUI Operating System wxPython: Cross Platform GUI Toolkit 4 Introduction: partial class hierarchy wx.Object wx.EvtHandler wx.Window wx.TopLevelWindow wx.Panel wx.Control wx.Frame wx.Dialog wx.ScrolledWindow wxPython: Cross Platform GUI Toolkit 5 wx.ListCtrl • Presents a list of items with one of several possible views – List – Report – Icon • Supports various attributes and operations on the list data – Icons, and colors – Sorting – multiple selection •
    [Show full text]
  • Raritas: a Program for Counting High Diversity Categorical Data with Highly Unequal Abundances
    Raritas: a program for counting high diversity categorical data with highly unequal abundances David B. Lazarus1, Johan Renaudie1, Dorina Lenz2, Patrick Diver3 and Jens Klump4 1 Museum für Naturkunde, Berlin, Germany 2 Leibniz-Institut für Zoo- und Wildtierforschung, Berlin, Germany 3 Divdat Consulting, Wesley, AR, USA 4 CSIRO, Mineral Resources, Kensington, NSW, Australia ABSTRACT Acquiring data on the occurrences of many types of difficult to identify objects are often still made by human observation, for example, in biodiversity and paleontologic research. Existing computer counting programs used to record such data have various limitations, including inflexibility and cost. We describe a new open-source program for this purpose—Raritas. Raritas is written in Python and can be run as a standalone app for recent versions of either MacOS or Windows, or from the command line as easily customized source code. The program explicitly supports a rare category count mode which makes it easier to collect quantitative data on rare categories, for example, rare species which are important in biodiversity surveys. Lastly, we describe the file format used by Raritas and propose it as a standard for storing geologic biodiversity data. ‘Stratigraphic occurrence data’ file format combines extensive sample metadata and a flexible structure for recording occurrence data of species or other categories in a series of samples. Subjects Biodiversity, Bioinformatics, Ecology, Paleontology Keywords Software, Point-counting, Rarity, Data standards, Micropaleontology, Biostratigraphy, Submitted 5 April 2018 Biodiversity, Ecology, Python, Range chart Accepted 26 July 2018 Published 9 October 2018 Corresponding author INTRODUCTION David B. Lazarus, Human observations as a source of scientific data [email protected] Quantitative data about many aspects of the natural world are collected in modern Academic editor Donald Baird science with the use of instruments, but a substantial amount of observational data is still Additional Information and collected by human observation.
    [Show full text]