Loops and Unicorns - The Future of the Puppet Language - PuppetConf 2013Puppet
"Loops and Unicorns - The Future of the Puppet Language" by Henrik Lindberg, Platform Engineer, Puppet Labs.
Presentation Overview: Loops, Unicorns and other magical animals lives in your puppet since Puppet 3.2. This is the first version to ship with the future just a setting away! In this talk you will see the new features at work; we are talking loops, lambdas, puppet templates and other unicorns! In addition to learning how loops work, we will present the background to the new parser and the future capabilities this enables such as being able to support multiple language compliance levels, provide better error messages, and much more. Parts of this talk will touch on advanced topics such has to use lambdas in your custom functions.
Speaker Bio: Henrik has 30 years of experience architecting and developing software. Past positions include CTO of Cloudsmith Inc, leadership of BEA’s Java Run-Time Group (JRockit) and CTO and/or technical founder of several publicly and privately held software companies. Henrik works on the Platform team at Puppet Labs with special focus on the Puppet Language. He is also a committer and leader of several Eclipse projects, and leads the Puppet IDE Geppetto project.
One of the advantages of learning a new language is being exposed to new idioms and new approaches to solving old problems. In this talk, we will introduce the Ruby language with particular focus on the idioms and concepts that are different from what is found in Java.
We will introduce concepts such as closures, continuations and meta programming. We will also examine powerful techniques that are practically impossible in Java due to its compile time binding of types.
No experience with Ruby is assumed although an understanding of Java would be helpful.
This talk was given at the Toronto Java Users Group in April 2008
A retake of a 2002 presentation I did at YAPC::EU 2002 (I feel old now) about Source Filters in Perl. It attempts to shed some more light on code alterations and reveals some of the magic behind Acme::Bleach and Acme::Buffy
This is the first set of slightly updated slides from a Perl programming course that I held some years ago for the QA team of a big international company.
I want to share it with everyone looking for intransitive Perl-knowledge.
The updates after 1st of June 2014 are made with the kind support of Chain Solutions (http://chainsolutions.net/)
A table of content for all presentations can be found at i-can.eu.
The source code for the examples and the presentations in ODP format are on https://github.com/kberov/PerlProgrammingCourse
Drupal 8: A story of growing up and getting off the islandAngela Byron
The Drupal project has traditionally held a strong internal value for doing things "The Drupal Way." As a result, Drupal developers have historically needed to build up reams and reams of tricks and workarounds that were specific to Drupal itself, and Drupal was inaccessible to people with a more traditional programming background. Starting in Drupal 8, however, we've effectively done a ground-up rewrite of the underlying code and in the process made major inroads to getting more inline with the rest of the PHP world. Procedural code is out, OO code is in. "Creative" hacks have been replaced with FIG standards. "Not invented here" is now "Proudly found elsewhere." This story will talk about the journey that Drupal 8 and the Drupal core development team has taken during this transition over the past 3+ years, including some of the pros and cons of this approach and how we dealt (and are dealing) with some of the community management challenges that resulted.
Loops and Unicorns - The Future of the Puppet Language - PuppetConf 2013Puppet
"Loops and Unicorns - The Future of the Puppet Language" by Henrik Lindberg, Platform Engineer, Puppet Labs.
Presentation Overview: Loops, Unicorns and other magical animals lives in your puppet since Puppet 3.2. This is the first version to ship with the future just a setting away! In this talk you will see the new features at work; we are talking loops, lambdas, puppet templates and other unicorns! In addition to learning how loops work, we will present the background to the new parser and the future capabilities this enables such as being able to support multiple language compliance levels, provide better error messages, and much more. Parts of this talk will touch on advanced topics such has to use lambdas in your custom functions.
Speaker Bio: Henrik has 30 years of experience architecting and developing software. Past positions include CTO of Cloudsmith Inc, leadership of BEA’s Java Run-Time Group (JRockit) and CTO and/or technical founder of several publicly and privately held software companies. Henrik works on the Platform team at Puppet Labs with special focus on the Puppet Language. He is also a committer and leader of several Eclipse projects, and leads the Puppet IDE Geppetto project.
One of the advantages of learning a new language is being exposed to new idioms and new approaches to solving old problems. In this talk, we will introduce the Ruby language with particular focus on the idioms and concepts that are different from what is found in Java.
We will introduce concepts such as closures, continuations and meta programming. We will also examine powerful techniques that are practically impossible in Java due to its compile time binding of types.
No experience with Ruby is assumed although an understanding of Java would be helpful.
This talk was given at the Toronto Java Users Group in April 2008
A retake of a 2002 presentation I did at YAPC::EU 2002 (I feel old now) about Source Filters in Perl. It attempts to shed some more light on code alterations and reveals some of the magic behind Acme::Bleach and Acme::Buffy
This is the first set of slightly updated slides from a Perl programming course that I held some years ago for the QA team of a big international company.
I want to share it with everyone looking for intransitive Perl-knowledge.
The updates after 1st of June 2014 are made with the kind support of Chain Solutions (http://chainsolutions.net/)
A table of content for all presentations can be found at i-can.eu.
The source code for the examples and the presentations in ODP format are on https://github.com/kberov/PerlProgrammingCourse
Drupal 8: A story of growing up and getting off the islandAngela Byron
The Drupal project has traditionally held a strong internal value for doing things "The Drupal Way." As a result, Drupal developers have historically needed to build up reams and reams of tricks and workarounds that were specific to Drupal itself, and Drupal was inaccessible to people with a more traditional programming background. Starting in Drupal 8, however, we've effectively done a ground-up rewrite of the underlying code and in the process made major inroads to getting more inline with the rest of the PHP world. Procedural code is out, OO code is in. "Creative" hacks have been replaced with FIG standards. "Not invented here" is now "Proudly found elsewhere." This story will talk about the journey that Drupal 8 and the Drupal core development team has taken during this transition over the past 3+ years, including some of the pros and cons of this approach and how we dealt (and are dealing) with some of the community management challenges that resulted.
These are slides from a lecture on Red Flags in Programming that took place at an Israeli Open Source Developers meeting.
Red flags in programming are signs that you likely made a mistake with your application design or code.
Noticing and avoiding these mistakes help us write better code, at any language.
The subject related to mostly dynamic (higher level) languages, even though the sample code is in Perl.
Apple's Swift has achieved the top place in Stack Overflow's "Most Loved" list of programming languages in its 2015 Developer Survey. Based on information gleaned from GitHub and Stack Overflow, analyst firm RedMonk has seen Swift's popularity ranking soar from 68 to 22 in an unprecedented 6 months.
The "Extreme Swift" event does not require advanced, or even any, knowledge of Swift. Learn about some of the more outrageous features of the language which help explain what the fuss is all about!
Never look at programming the same way again — even if you never end up writing a single line of Swift code in your life.
Scala is a programming language that mixes object oriented and functional programming in a powerful and flexible way. While it can not be considered as a mainstream language, it has seen a growing adoption trend.An important ingredient for this diffusion is its complete interoperability with Java and the fact that it runs on a solid platform such as the JVM.
It is currently the 4th most loved programming language and the 2nd top paying technology of 2016 (StackOverflow Developers Survey).
These slides have been used for a 4h seminar at the University of Cagliari the 17th of December 2016
We <3 .rb
but - still .rb < perfect
This presentation shows some of the ways that this language, engineered for maximum programmer happiness and least surprise, can still have some nasty gotchas.
PHP is a very popular scripting language in the world. Currently, PHP is used in more than 81 % of websites. PHP is the most extensively used server side scripting language. Over 79% of server implementations today are in PHP.
Automatic generation control (AGC) is a system for adjusting the power output of multiple generators at different power plants, in response to changes in the load. Since a power grid requires that generation and load closely balance moment by moment, frequent adjustments to the output of generators are necessary. The balance can be judged by measuring the system frequency; if it is increasing, more power is being generated than used, which causes all the machines in the system to accelerate. If the system frequency is decreasing, more load is on the system than the instantaneous generation can provide, which causes all generators to slow down.
These are slides from a lecture on Red Flags in Programming that took place at an Israeli Open Source Developers meeting.
Red flags in programming are signs that you likely made a mistake with your application design or code.
Noticing and avoiding these mistakes help us write better code, at any language.
The subject related to mostly dynamic (higher level) languages, even though the sample code is in Perl.
Apple's Swift has achieved the top place in Stack Overflow's "Most Loved" list of programming languages in its 2015 Developer Survey. Based on information gleaned from GitHub and Stack Overflow, analyst firm RedMonk has seen Swift's popularity ranking soar from 68 to 22 in an unprecedented 6 months.
The "Extreme Swift" event does not require advanced, or even any, knowledge of Swift. Learn about some of the more outrageous features of the language which help explain what the fuss is all about!
Never look at programming the same way again — even if you never end up writing a single line of Swift code in your life.
Scala is a programming language that mixes object oriented and functional programming in a powerful and flexible way. While it can not be considered as a mainstream language, it has seen a growing adoption trend.An important ingredient for this diffusion is its complete interoperability with Java and the fact that it runs on a solid platform such as the JVM.
It is currently the 4th most loved programming language and the 2nd top paying technology of 2016 (StackOverflow Developers Survey).
These slides have been used for a 4h seminar at the University of Cagliari the 17th of December 2016
We <3 .rb
but - still .rb < perfect
This presentation shows some of the ways that this language, engineered for maximum programmer happiness and least surprise, can still have some nasty gotchas.
PHP is a very popular scripting language in the world. Currently, PHP is used in more than 81 % of websites. PHP is the most extensively used server side scripting language. Over 79% of server implementations today are in PHP.
Automatic generation control (AGC) is a system for adjusting the power output of multiple generators at different power plants, in response to changes in the load. Since a power grid requires that generation and load closely balance moment by moment, frequent adjustments to the output of generators are necessary. The balance can be judged by measuring the system frequency; if it is increasing, more power is being generated than used, which causes all the machines in the system to accelerate. If the system frequency is decreasing, more load is on the system than the instantaneous generation can provide, which causes all generators to slow down.
How to Use Publicity to Grow Your StartupJoy Schoffler
Presented by Leverage PR and Startup America, this presentation provides great tips on how to use publicity to grow your startup. This presentation also discusses to to raise crowdfunding capital with publicity.
This presentation was given as a Workshop at OSCON 2014.
New to Go? This tutorial will give developers an introduction and practical
experience in building applications with the Go language. Gopher Steve Francia,
Author of [Hugo](http://hugo.spf13.com),
[Cobra](http://github.com/spf13/cobra), and many other popular Go packages
breaks it down step by step as you build your own full featured Go application.
Starting with an introduction to the Go language. He then reviews the fantastic
go tools available. With our environment ready we will learn by doing. The
remainder of the time will be dedicated to building a working go web and cli
application. Through our application development experience we will introduce
key features, libraries and best practices of using Go.
This tutorial is designed with developers in mind. Prior experience with any of the
following languages: ruby, perl, java, c#, javascript, php, node.js, or python
is preferred. We will be using the MongoDB database as a backend for our
application.
We will be using/learning a variety of libraries including:
* bytes and strings
* templates
* net/http
* io, fmt, errors
* cobra
* mgo
* Gin
* Go.Rice
* Cobra
* Viper
PHP / MySQL applications are compatible to all operating systems, support all the popular databases, 100% remotely configurable, perfect for web programming & provide higher performance and speed.
PHP is an HTML-embedded scripting language. Much of its syntax is borrowed from C, Java and Perl with a couple of unique PHP-specific features thrown in. The goal of the language is to allow web developers to write dynamically generated pages quickly.
MySQL is a Relational Database Management System (RDBMS) that uses Structured Query Language (SQL).
PHP is the most popular scripting language for web development. It is free, open source and server-side (the code is executed on the server).
PHP third party tool and plug-in integration such as chat, forum, blog and search engine
Geecon 2019 - Taming Code Quality in the Worst Language I Know: BashMichał Kordas
I don't know any other languages with more pitfalls, perils and gotchas than Bash. Still, we use it in almost every larger project for deployment or maintenance scripts, because there is no better, more powerful and more universal choice on Unix platform. However, there is ridiculous amount of things that could go wrong if you don't have deep understanding of shell scripting. Your experience about typical issues with Java or other JVM languages is definitely not enough here. You need to deeply understand Linux ecosystem and its history in order to write correct script... or you don't? I will prove to you that Bash could be tamed and made easy if proper code quality standards and static analysis tools are applied and enforced in your delivery pipelines. I'll share my opinions and experiences from a large banking project and I'll tell you which tools and style guides we use.
Justin Donaldson's speech at WWX2014, other videos, photos, slides and comments : http://www.silexlabs.org/?p=202984
The 4th International Haxe Conference WWX2014 organized by Silex Labs took place from 23th to 26th may 2014 in Paris.
http://wwx.silexlabs.org/2014/
PHP (PHP: Hypertext Preprocessor) is a scripting language that helps people make web pages more interactive, by allowing them to do more things.
A website programmed with PHP can have pages that are password protected. A website with no programming cannot do this without other complex things. Standard PHP file extensions are: .php .php3 or .phtml, although a web server can be set up to use any extension
Slides from a talk I gave about using the Ruby on Rails console (and irb) to develop Web applications. Describes the features of the console, and how you might want to use it.
This talk will cover various aspects of Logic Programming. We examine Logic Programming in the contexts of Programming Languages, Mathematical Logic and Machine Learning.
We will we start with an introduction to Prolog and metaprogramming in Prolog. We will also discuss how miniKanren and Core.Logic differ from Prolog while maintaining the paradigms of logic programming.
We will then cover the Unification Algorithm in depth and examine the mathematical motivations which are rooted in Skolem Normal Form. We will describe the process of converting a statement in first order logic to clausal form logic. We will also discuss the applications of the Unification Algorithm to automated theorem proving and type inferencing.
Finally we will look at the role of Prolog in the context of Machine Learning. This is known as Inductive Logic Programming. In that context we will briefly review Decision Tree Learning and it's relationship to ILP. We will then examine Sequential Covering Algorithms for learning clauses in Propositional Calculus and then the more general FOIL algorithm for learning sets of Horn clauses in First Order Predicate Calculus. Examples will be given in both Common Lisp and Clojure for these algorithms.
Pierre de Lacaze has over 20 years’ experience with Lisp and AI based technologies. He holds a Bachelor of Science in Applied Mathematics and Computer Science and a Master’s Degree in Computer Science. He is the president of LispNYC.org
Welcome to the Program Your Destiny course. In this course, we will be learning the technology of personal transformation, neuroassociative conditioning (NAC) as pioneered by Tony Robbins. NAC is used to deprogram negative neuroassociations that are causing approach avoidance and instead reprogram yourself with positive neuroassociations that lead to being approach automatic. In doing so, you change your destiny, moving towards unlocking the hypersocial self within, the true self free from fear and operating from a place of personal power and love.
2. Who are you? FooLab
• Have you ever written PHP before?
• Have you ever written computer code before?
• Have you ever seen computer code?
• Ask for the name of your neighbor on each side.
2
3. Anna Filina FooLab
• PHP Quebec - user group, organizer.
• ConFoo - non for profit Web conference, organizer.
• FooLab Inc. - IT consulting, vice-president.
• I write code.
• I train people.
3
4. Programming FooLab
Describing procedures
Input
Find Password
username
username matches?
and password
Yes No
Open Display error
account page message
4
5. Functions FooLab
One step in the whole program
pi 3.141592 ...
26, 58 max 58
Y-m-d date 2012-04-26
5
6. Interactive Shell FooLab
• We can see result of PHP code as we type it.
• Open your console. Type phpsh
• After each line of code, press enter to execute it.
6
8. Interpreter FooLab
• I like like
php> echo echo;
• I like the word “like”
php> echo "echo";
8
9. Data Types FooLab
• Integer, can’t confuse with commands or functions:
php> echo 33;
• String, use quotes:
php> echo "Programming is cool";
• There are more types, but that’s for later.
9
10. Variables FooLab
• "Programming is cool"
• "Design is cool"
• "Video editing is cool"
php> $hobby = "Design";
php> echo $hobby;
php> echo "$hobby is cool";
10
11. FooLab
Design
• Use the $ sign to refer
to the bin’s name.
hobby
• Use the = sign to put
content in the bin.
$hobby = "Design"
11
12. FooLab
Design
• No sign is needed to get
the bin’s content out.
hobby
• A variable is where we
put a value.
echo $hobby
12
13. Writing Code in Files FooLab
• It’s easier to write multiple lines of code in a file.
• Open your text editor.
• Open the file /var/www/php1/script.php
13
14. FooLab
• Quit the interactive shell by typing:
php> q
• Now you can run your file using:
$ php /var/www/php1/script.php
• Repeat the previous command by pressing the up arrow.
• Every time we edit our file, we’ll test the code.
14
15. FooLab
• The file currently contains the following text:
<?php
$hobby = "Design";
echo "$hobby is cool";
?>
• The file ends in empty lines. Don’t delete them.
15
16. Movie Price FooLab
• Movie costs 12$
• Popcorn costs 8$
• Popcorn can be shared between two people.
16
17. FooLab
• What happens with popcorn when we have an odd
number of people?
ceil(3 / 2);
17
18. Procedure FooLab
Calculate total movie cost based on number of people
Set number of Get number of
people popcorns Popcorns * 8
(variable) required
Display sum Tickets * 12
18
19. Practice! FooLab
• Write a script that, given any number of people,
calculates the total price for movie and popcorn.
• Set number of people (variable)
• Get number of popcorns required
• Popcorns * 8
• Tickets * 12
• Display sum
19
26. String and Math Functions FooLab
• Open the interactive shell: phpsh
php> echo rand(1, 3);
php> echo rand(1, 100);
php> echo strlen("FooLab");
php> echo substr("FooLab", 3);
php> echo substr("FooLab", 3, 1);
26
27. Position zero FooLab
• Many programming languages start counting at zero.
F o o L a b
advance by: 0 1 2 3 4 5
27
28. Practice! FooLab
• Write a function that calculates a rectangle’s area using
height and width.
• Write a function that returns a random letter from the
alphabet. Hint: $letters = “abcdefg...”
• substr(text, start, length)
• rand(min, max)
28
39. Writing Loops FooLab
• for (initially ; iterate this time? ; after each iteration)
for ($i = 1; $i <= 3; $i++) {
echo $i;
}
• $i++ is the same as $i = $i + 1
39
41. Chorus FooLab
for ($i = 1; $i <= 4; $i++) {
echo "This song is just six words longn";
}
41
42. Array FooLab
An ordered set of related elements
42
43. Array FooLab
An ordered set of related elements
43
44. What Is An Array? FooLab
page page page
book
0 1 2
number number "Text"
• You can put books in boxes for “nested” arrays,
but that’s for another day.
44
45. Acces Elements By Index FooLab
$movies = array("Titanic", "Shrek", "Die Hard");
echo $movies[1];
45
46. Iterating Over Arrays FooLab
$movies = array("Titanic", "Shrek", "Die Hard");
foreach ($movies as $movie) {
echo "I watched $movien";
}
46
47. Getting Index and Value FooLab
• In addition to the value, you can also get the index for
each iteration:
foreach ($movies as $index => $movie)
47
48. Concatenation FooLab
• Link bits of text together using a dot (.)
echo "You rolled " . rand(2, 12);
• Useful in a loop
$sequence = "";
for ($i = 1; $i <= 10; $i++) {
$sequence = $sequence . rand(0, 9);
}
echo $sequence;
48
49. Practice! FooLab
• Write a function that creates a random 9-character,
pronouncable password.
• 3 cyllables, 3 letters each
• Consonant, vowel, consonant
• Should produce something like this:
“hagrokwag”
49
51. Trivia FooLab
• 6 ^ 21 + 3 ^ 5
gives over 20 quadrillions combinations
• It will take millions of years for a computer
to try them all
• And you can pronounce it, making it easy to memorize!
51
52. Next Steps FooLab
• Go to phpjunkyard.com
• Download some script
• See how it works
• Play with the code
• Anything you put in /var/www/php1 can be accessed in
the browser: http://php1.local/
52
53. Resources FooLab
• php.net has a manual and a reference for all functions.
• phpquebec.org is the PHP users group in Montreal.
53