Intro to Programming with JavaScript Seminar, Fall 2017 semester
Week 2: Function
Led by Jeongbae Oh, in conjunction with YCC (Yonsei Computer Club) @ Yonsei University
This seminar intends to introduce newcomers to programming using JavaScript, one of the most versatile languages of the modern world.
Basic Introduction to programming functions, Contents include.
- Definition of function
- Structure of function
- Function calling
- Function Prototyping
- Scope of the function
- Input parameters to a function
- Returning from the function
- Types of function calling
Notes: Verilog Part 5 - Tasks and FunctionsJay Baxi
The document is the penultimate part of Verilog notes out of 6 total parts.
This contains brief theoretical points on Tasks and Functions, their differences, declaration and invocation and their types and applications.
Functional programming and ruby in functional styleNiranjan Sarade
This presentation gives brief introduction to Functional Programming and how we can apply functional style of programming in Ruby language. The mentioned references are of great help to prepare this presentation. Especially video talks of Dr. Venkat Subramaniam. Some slides are from his presentation.
Functional programming (FP) is becoming popular day by day ! The initial learning curve for some of the functional languages like Lisp, Haskell, OCaml, Scala, Scheme, Clojure, etc. .... (there are many) might be high, but once you know the problem context and power of functions, you will work like a boss ! You will be more declarative than imperative !
Ruby is an Object Oriented (OO) language and we love Ruby, isn't it ? But once you understand the importance of FP, you would certainly want to apply FP concepts while writing Ruby code. In fact, you might have used some of those concepts unknowingly. Yes, we are talking about lambda, proc .. but, that's not all. Learn to unleash the power of Ruby in the hands of a functional programmer! You can write wonderful (and working) ruby code with functional style. In this presentation, I will briefly go through FP basics and then jump over to code examples.
Finally, it's all about changing your mindset! No one has stopped you to become a Boss !
In this Meetup Victor Perepelitsky - R&D Technical Leader at LivePerson leading the 'Real Time Event Processing Platform' team , will talk about Java 8', 'Stream API', 'Lambda', and 'Method reference'.
Victor will clarify what functional programming is and how can you use java 8 in order to create better software.
Victor will also cover some pain points that Java 8 did not solve regarding functionality and see how you can work around it.
Functional programming with Ruby - can make you look smartChen Fisher
Functional programming can make you look smart and others feel stupid. Learn how with Ruby
code can be found here:
https://github.com/chenfisher/functional-programming-with-ruby
Youtube:
https://www.youtube.com/watch?v=Qzoh8w4OPtU
Basic Introduction to programming functions, Contents include.
- Definition of function
- Structure of function
- Function calling
- Function Prototyping
- Scope of the function
- Input parameters to a function
- Returning from the function
- Types of function calling
Notes: Verilog Part 5 - Tasks and FunctionsJay Baxi
The document is the penultimate part of Verilog notes out of 6 total parts.
This contains brief theoretical points on Tasks and Functions, their differences, declaration and invocation and their types and applications.
Functional programming and ruby in functional styleNiranjan Sarade
This presentation gives brief introduction to Functional Programming and how we can apply functional style of programming in Ruby language. The mentioned references are of great help to prepare this presentation. Especially video talks of Dr. Venkat Subramaniam. Some slides are from his presentation.
Functional programming (FP) is becoming popular day by day ! The initial learning curve for some of the functional languages like Lisp, Haskell, OCaml, Scala, Scheme, Clojure, etc. .... (there are many) might be high, but once you know the problem context and power of functions, you will work like a boss ! You will be more declarative than imperative !
Ruby is an Object Oriented (OO) language and we love Ruby, isn't it ? But once you understand the importance of FP, you would certainly want to apply FP concepts while writing Ruby code. In fact, you might have used some of those concepts unknowingly. Yes, we are talking about lambda, proc .. but, that's not all. Learn to unleash the power of Ruby in the hands of a functional programmer! You can write wonderful (and working) ruby code with functional style. In this presentation, I will briefly go through FP basics and then jump over to code examples.
Finally, it's all about changing your mindset! No one has stopped you to become a Boss !
In this Meetup Victor Perepelitsky - R&D Technical Leader at LivePerson leading the 'Real Time Event Processing Platform' team , will talk about Java 8', 'Stream API', 'Lambda', and 'Method reference'.
Victor will clarify what functional programming is and how can you use java 8 in order to create better software.
Victor will also cover some pain points that Java 8 did not solve regarding functionality and see how you can work around it.
Functional programming with Ruby - can make you look smartChen Fisher
Functional programming can make you look smart and others feel stupid. Learn how with Ruby
code can be found here:
https://github.com/chenfisher/functional-programming-with-ruby
Youtube:
https://www.youtube.com/watch?v=Qzoh8w4OPtU
This is a whirlwind tour of the FP land and is primarily meant for developers wanting to embark on their functional programming journey. Java is used to understand most of the concepts, however, where it falls short to explain certain concepts such as lazy evaluation, currying and partial function application, de-structuring and pattern-matching, Scala or Groovy or Clojure or even Haskell are used to demonstrate it.
Check out these exercises: http://de.slideshare.net/nicolayludwig/3-cpp-procedural-programmingexercises
- Procedural Programming
- Predefined and User defined Functions
- Declaration and Definition of Functions
- Procedural and recursive Function Calling
- Namespaces and separated Function Definitions
- A Glimpse of Separated Compilation and Translation Units
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
2. Function
• The most important part of JavaScript
• A "mini program" within the program
• Basis of the functional programming paradigm
3. Input / Output
• A function can receive inputs, process them, and return an output.
• But it doesn't have to get an input.
• Or return an output.
• Or process anything.
• Of course a function not doing any of the three is pretty meaningless.
• Put simply, the input of a function is called a parameter (매개변수), and
the output is called a return value (반환값, 리턴값)
4. Declaration
• function name(parameters) { }
• No semi-colon necessary
• Function naming rules (same as variable)
• Must consist of lower and upper case alphabet letters, numbers, and _
• Can only begin with lower and upper case alphabet letters
• Cannot use reserved words (e.g. function, var, etc.)
• Lower camel case recommended (e.g. getTaxRate) → Convention
• Function without a name is called an anonymous function (익명 함수).
5. Call / Invocation
• To execute codes within a function, it must be called (invoked).
• To call a function: name(argument);
• A function can be declared and called
immediately (immediately invoked function):
• (function name(parameter) { })();
• Anonymous functions are usually called immediately.
6. Call / Invocation
• Location of a function within a source code has no effect on
whether the function can be called.
(i.e. you can call a function before defining it)
• Not calling a function makes that function to have no effect
on the execution of the code.
7. return
• A function finishes running with return.
• Anything after return is not executed.
• Even without return, function finishes running at the end.
• Value after return becomes the return value of the function.
• Return value is not necessary.
8. return and console.log
• return makes the result of execution of the function available for use as a value,
and therefore not usually "printed" like console.log in a real setting.
• console.log is a special function/method which "prints" the value to the
console/REPL to make debugging easy.
• Therefore, the return value of console.log() is undefined (nothing is
returned).
console.log does not
have a return value.
console.log
return
console.log
return
9. Parameter / Argument
• To put simply:
• A parameter (매개변수) is the input of a function.
• An argument (인자) is what is passed to a function when called.
parameters
arguments
10. Function as a First-Class Citizen
• A function can be passed to
another function as an
argument.
• A function can be returned by
another function.
• A function can be assigned to a
variable (a function expression)
11. Scope
• Scope (범위) of a function
is defined by the portion
encompassed by braces
(block).
• Each function has its
own scope.
12. Nested Scope
• A function can have another function
within itself, which is called a nested
function.
• Function inside can access values in
the function outside.
(i.e. manipulate them without initializing)
• This means that if a variable is assigned
a different value within the inner
function, it changes the value for the
outer function as well.
13. Nested Scope
• However, if a variable is first initialized
and changed value within the inner
function, that change only takes effect
within that inner function.
• In other words, if the value in the outer
function's scope should not be changed,
1) Initialize the variable
2) Use a different variable name
14. Nested Scope
• If the outer function does not
directly call the inner function (i.e.
only returns the "function object"),
the latter should be called together
when the outer is called such as:
name()();
• To put simply, since the return
value of outer() is inner,
outer()() can be understood as
outer() + inner().
15. Multiple-Nested Scope
• Characteristics of nested scope apply to more-than-double-nested scope.
• The below two have the same results, but different approaches to nested
function structure.
16. Global Scope
• Scope outside of all functions is
called global scope.
• Global scope acts like a "global
function" that is defined and
executed automatically by
JavaScript interpreter itself.
• Characteristics of the global scope
is identical to the outermost function
in the nested function structure.
17. Closure
• A value/variable defined in the outside function can be accessed
by the inside function(s) without being explicitly defined in the
inside function.
• The reverse does not hold (i.e. the outer function cannot access
values of the inner function).
Closure Not a closure
18. Closure
• Closure makes programming easier by allowing variables to passed to inner
functions without precise declarations.
• Without closure, parameters/arguments throughout the entirety of the function
need to be matched.
Using closure Not using closure
19. Stack
• In JavaScript, information is stored in
memory as a "stack."
• LIFO (last-in, first-out): value stored
last is taken out first
• Put very very simply, values are
"pushed" into stack when defined
within a function, and "popped" from
stack when the function returns or
finishes running.
https://upload.wikimedia.org/wikipedia/commons/b/b4/Lifo_stack.png
20. How Stack Works
• outer() is called and pushed to the stack.
• inner() is called and pushed to the stack.
• inner() is executed, returns, and popped
from the stack.
• outer() is executed, returns, and popped
from the stack.
• Stack is emptied at the end.
* Please note that this is NOT actual way stack works; just an illustration
21. How Stack Works
• outer() is called and pushed to the
stack.
• inner() is called and pushed to the
stack.
• inner() is executed, returns, and
popped from the stack.
• outer() is executed, returns, and
popped from the s tack.
• Stack is emptied at the end.
* Please note that this is NOT actual way stack works; just an illustration
22. Recursion
• Calling the function within itself is called recursion (재귀).
• Recursion is an "elegant" way to code, but is inefficient because
it uses much more memory than non-recursive way.
• Example: the Fibonacci sequence
• 1 + 1 + 2 + 3 + 5 + 8 + ...
• Try fib(1000).
How does it work?
23. Stack Overflow
• Since memory is limited, size of stack
is limited as well. If a program creates
stack larger than the memory space, it
can no longer run. This is called stack
overflow.
• Recursion is the easiest way to cause
stack overflow, if it is not stopped at a
proper time.
• Stack Overflow is also the name of the
most popular developer community.
(뇌가 stack overflow 되었을 때 찾아오라는
뜻?)