Functional programming is all the rage. It can undoubtedly produce cleaner and more expressive code, but why switch to Scala or wait for Java 8? In fact, there are many ways to dramatically improve your Java code quality by using a more functional style today. This presentation discusses how techniques such as functional programming, using fluent APIs, and other clean coding practices can make your code more concise, more readable, and much easier to maintain. But more importantly, you will learn about libraries such as LambdaJ and Google Guava that make this possible today with your existing Java code base.
A talk presented in RubyConf India 2010 at Bangalore, India. It revisits the role of objects and classes in Ruby OOP, and encourages programmers to discover a new approach to OOP.
Основные понятия связанные с разработкой ПО: просто о сложном. Лаабе Дмитрий.IT-Доминанта
Основные понятия связанные с разработкой ПО: просто о сложном.
Лаабе Дмитрий
Генеральный директор и основатель IT-Доминанта, Технический директор, программист портала Айти-Событие.рф", Санкт-Петербург.
Functional programming is all the rage. It can undoubtedly produce cleaner and more expressive code, but why switch to Scala or wait for Java 8? In fact, there are many ways to dramatically improve your Java code quality by using a more functional style today. This presentation discusses how techniques such as functional programming, using fluent APIs, and other clean coding practices can make your code more concise, more readable, and much easier to maintain. But more importantly, you will learn about libraries such as LambdaJ and Google Guava that make this possible today with your existing Java code base.
A talk presented in RubyConf India 2010 at Bangalore, India. It revisits the role of objects and classes in Ruby OOP, and encourages programmers to discover a new approach to OOP.
Основные понятия связанные с разработкой ПО: просто о сложном. Лаабе Дмитрий.IT-Доминанта
Основные понятия связанные с разработкой ПО: просто о сложном.
Лаабе Дмитрий
Генеральный директор и основатель IT-Доминанта, Технический директор, программист портала Айти-Событие.рф", Санкт-Петербург.
User experience rules, pro-tips and patterns from a technical perspective. In this session we'll iterate over Google's quality application checklist, design guidelines and resource library as well as the material design guidelines, provide examples, clarifications and techniques to facilitate adherence along with tool suggestions from a developer's point of view.
GeoStories - Integration of Digital Media and Maps (GISCO Fall Meeting)Jeremy W. Goldsmith
This presentation was built off by Frank Biasi and Jeremy Goldsmith for the GIS COLORADO FALL Meeting in Georgetown, Colorado. Jeremy Goldsmith gave this presentation about GeoStories, storytelling with geography in mind, the integration of digital media and maps. It was Jeremy Goldsmith's first GIS and National Geographic Maps presentation of his career. For him, it was a great learning experience and a great opportunity to share the power of geographic storytelling for audience engagement and understanding.
There are many things that make Ruby a great language, but above all else, the beautiful and friendly syntax. A perfect exemplar of this is the case statement: case enables a flexible method of dispatching on an object that is both natural and intuitive. But case can't do it alone. No, it requires the help of it's little-known and under-appreciated sidekick the === (threequals) operator.
In this talk we'll dive into this fascinating corner of the Ruby language and see what trouble we can cause with the humble threequals. We'll go over the basics of how it interacts with case, and then go into some tips and tricks for making the most of this useful bit of syntax, and ultimately create a little pattern matching mini-language as a demonstration.
Scalding - Hadoop Word Count in LESS than 70 lines of codeKonrad Malawski
Twitter Scalding is built on top of Cascading, which is built on top of Hadoop. It's basically a very nice to read and extend DSL for writing map reduce jobs.
Discussing language constructs with fellow developers in the context of solving a particular problem is something we do routinely. While most such conversations are productive and useful, a fair portion degenerate into angry brawls. A pattern we've observed in the latter situation is that a surprising number of times the argument is that "Why shouldn't I use language feature X to achieve objective Y- after all, the language supports X."
In this talk Aakash and Niranjan walk through a few features of the Ruby language which when used wisely allows programmers to solve problems elegantly but if they are used without caution can lead to bad code.
10. Leaky Stack
F
E Push
Push
E F
D D E
C C D
B B C
A A B
Discard
A
11. class LeakyStack
def initialize(size)
@size = size
@stack = Array.new
end
def push(item)
@stack.push(item)
@stack.shift if @stack.size > @size
end
def pop
@stack.pop
end
end
12. class LeakyStack
def initialize(size)
@size = size
@stack = Array.new
end
def push(item)
@stack.push(item)
@stack.shift if @stack.size > @size
end
def pop
@stack.pop
end
end
13. class LeakyStack
def initialize(size)
@size = size
@stack = Array.new
end
def push(item)
@stack.push(item)
@stack.shift if @stack.size > @size
end
def pop
@stack.pop
end
end
17. class LeakyStack
def initialize(size)
@size = size
@stack = Array.new
end
def push(item)
@stack.push(item)
discard_overflow
end
def pop
@stack.pop
end
private
def discard_overflow
@stack.shift if @stack.size > @size
end
end
18. class LeakyStack
def initialize(size)
@size = size
@stack = Array.new
end
def push(item)
@stack.push(item)
discard_overflow
end
def pop
@stack.pop
end
private
def discard_overflow
@stack.shift if @stack.size > @size
end
end
19. class LeakyStack
def initialize(size)
@size = size
@stack = Array.new
end
def push(item)
@stack.push(item)
discard_overflow
end
def pop
@stack.pop
end
private
def discard_overflow
@stack.shift if @stack.size > @size
end
end
23. class LeakyStack < Array
def initialize(size)
@stack_size = size
super()
end
def push(item)
super(item)
discard_overflow
end
private
def discard_overflow
shift if size > @stack_size
end
end
24. class LeakyStack < Array
def initialize(size)
@stack_size = size
super()
end
def push(item)
super(item)
discard_overflow
end
private
def discard_overflow
shift if size > @stack_size
end
end
25. class LeakyStack < Array
def initialize(size)
@stack_size = size
super()
end
def push(item)
super(item)
discard_overflow
end
private
def discard_overflow
shift if size > @stack_size
end
end
28. Message stack = LeakyStack.new(10)
stack.push(“foo”)
Dynamic Binding
Run Time
class LeakyStack < Array
def push(item)
Method super(item)
discard_overflow
end
end
29. class LeakyStack < Array
def initialize(size)
@stack_size = size
super() Array
end
def push(item)
super(item)
discard_overflow
end
LeakyStack
private
def discard_overflow
shift if size > @stack_size
end
end
36. class LeakyStack
def initialize(size)
@size = size
@stack = Array.new
end
def push(item)
@stack.push(item)
@stack.shift if @stack.size > @size
end
def pop
@stack.pop
end
end