A teaser talk for Scala newbies, introducing five basic elements that (in my opinion) make the transition from Java to Scala a no-brainer.
Given at the 7th JJTV (Israeli Java/JVM user group) tool night, July 2nd, 2013.
This document discusses various techniques for working with types in Scala, including:
1. The main alternatives for Scala types including classical OO, algebraic, generic, and structured types. It recommends choosing styles based on use cases and setting guidelines.
2. The differences between run-time and compile-time dispatch and how they are implemented in Scala.
3. Techniques for working with types including tagged types, type aliases, and implicit evidence to provide different behaviors based on types known at compile-time.
4. Resources for learning more about advanced type-level programming in Scala, particularly the Shapeless library.
This document provides a dictionary of scala programming concepts including definitions of common jargon like ADT, typeclasses, extension methods, and call-by semantics. It defines ADT as algebraic data types, which were introduced in languages like Algol 60 and ML, and pattern matching which allows decomposing ADT values. Typeclasses are defined as rules for types like equality, with instances providing implementations. Extension methods and implicit conversions add methods to types via implicit parameters. Call-by-name and call-by-need semantics are discussed in relation to lazy evaluation.
This document discusses refactoring Scala code to improve quality and maintainability. It provides examples of issues like stringly typed code, abuse of collections, and poor scoping. The presentation recommends addressing these by using case classes instead of tuples, parsing values instead of passing raw strings, giving intermediate steps meaningful names, and separating logic and data through traits or type classes. Well-scoped code with a small public API and private implementation details is emphasized.
This document discusses the evolution of programming languages and hardware over time. It covers older languages like FORTRAN, BASIC, and C/C++. It also discusses newer languages like Rust, Go, and Julia. It describes how memory management, concurrency models, and distributed computing have changed. It proposes using techniques like functional interpreters and macros to allow languages to be more easily extended and adapted to new hardware. The document advocates for approaches that can efficiently support both old and new programming ideas.
The document provides an overview of higher-kinds, typeclasses, type-level encodings, and continuations in Scala. It discusses how kind systems classify types, how typeclasses allow abstraction over types, and examples of encoding data structures like linked lists at the type level. It also introduces delimited continuations in Scala and how they can be used to simulate control flow constructs like break statements.
This document provides a cheat sheet overview of Scala concepts including packages, imports, variables, constants, classes, traits, generics, methods, functions, operators, arrays, main methods, annotations, assignments, selection, iteration and references. Key points are that Scala uses packages similarly to Java but with curly brace delimiters, imports can be used anywhere in a file, variables use 'var', constants use 'val', classes inherit from Any and can use traits for mixins, generics are defined with type parameters, functions are objects, operators are methods, arrays are classes, main returns Unit, and assignments use = while iteration prefers recursion over loops.
This document provides an overview of Scala fundamentals including:
- Scala is a programming language for the JVM that supports both object-oriented and functional paradigms.
- It defines variables, values, lazy values, functions, types, classes, objects, traits, and higher-order functions.
- Classes can extend other classes and traits, allowing for multiple inheritance. Objects are used as singletons.
- Functional concepts like immutability, anonymous functions, and higher-order functions are supported.
Speaking Scala: Refactoring for Fun and Profit (Workshop)Tomer Gabel
These are the slides from half-day workshop on refactoring Scala code hosted by Wix Engineering (http://www.wix.com/wixengineering/scalaevent).
Watch video (in Hebrew): http://parleys.com/play/53f7a9cce4b06208c7b7ca1e
Type classes are a fundamental feature of Scala, which allows you to layer new functionality on top of existing types externally, i.e. without modifying or recompiling existing code. When combined with implicits, this is a truly remarkable tool that enables many of the advanced features offered by the Scala library ecosystem. In this talk we'll go back to basics: how type classes are defined and encoded, and cover several prominent use cases.
A talk given at the Underscore meetup on 19 August, 2014.
Some languages, like SML, Haskell, and Scala, have built-in support for pattern matching, which is a generic way of branching based on the structure of data.
While not without its drawbacks, pattern matching can help eliminate a lot of boilerplate, and it's often cited as a reason why functional programming languages are so concise.
In this talk, John A. De Goes talks about the differences between built-in patterns, and so-called first-class patterns (which are "do-it-yourself" patterns implemented using other language features).
Unlike built-in patterns, first-class patterns aren't magical, so you can store them in variables and combine them in lots of interesting ways that aren't always possible with built-in patterns. In addition, almost every programming language can support first-class patterns (albeit with differing levels of effort and type-safety).
During the talk, you'll watch as a mini-pattern matching library is developed, and have the opportunity to follow along and build your own pattern matching library in the language of your choice.
1. The document discusses Scala including learning it in half an hour, Scala being a JVM and .NET language, and examples of companies using Scala like Twitter and Foursquare.
2. It provides code examples of basic Scala programs and concepts like classes, objects, main methods, and printing output.
3. Later examples demonstrate more advanced concepts like domain specific languages, traits, mixins, pattern matching, actors, and message passing between actors.
Intro to Functional Programming in ScalaShai Yallin
Scala is a functional and object-oriented programming language that runs on the Java Virtual Machine. It features type inference, immutable collections, pattern matching, and functions as first-class values. The document provides an overview of Scala's features such as its static typing, traits for multiple inheritance, and case classes for value objects. It also demonstrates Scala's collections API and use of functions and pattern matching.
My Scala by the Bay 2014 talk on exploring the ideas behind the implementation of the generic library shapeless, and general ideas about how to do "type level" programming in Scala.
Slides for my recent presentation at the CASE meetup, May 21st. Discusses functional programming features in Scala. Goes from basic FP features like higher-order functions all the way through to monads.
I love Scala, I really do. I find Scala both more productive and more fun then any of the many languages I have worked with before. There are many reasons to use to Scala; however, I will not be talking about them.
Instead, in this talk I will cover some of the things I find annoying or disappointing in Scala. For each I will explain the issue, why it is so, whether or not it is likely to ever change, and what, if anything, we can do about it in the mean time.
The issues covered will include:
Limitations on type inference
Type Erasure
Binary incompatibility
Limitations on overloading
Standard library quality
And more
The lecture is geared towards those who have written between 10 and 10 millions lines of Scala code.
Scala Intro training @ Lohika, Odessa, UA.
This is a basic Scala Programming Language overview intended to evangelize the language among any-language programmers.
What You Need to Know about Lambdas - the problem with lambdas (as in anonymous functions) and the way to solve those problems (hint - using methods lifted to functions).
Property based Testing - generative data & executable domain rulesDebasish Ghosh
- Property based testing verifies properties and invariants of code through automated generation of random test data rather than testing with specific hard-coded test cases. This helps uncover subtle bugs and edge cases.
- Key aspects include defining properties to specify constraints that must hold, using a library like ScalaCheck to generate random data and verify properties hold, and defining custom generators for domain-specific types.
- Properties can verify things like business rules of a domain model in a more abstract way compared to traditional unit tests.
Slides for a lightning talk on Java 8 lambda expressions I gave at the Near Infinity (www.nearinfinity.com) 2013 spring conference.
The associated sample code is on GitHub at https://github.com/sleberknight/java8-lambda-samples
Slides from my talk at the Feb 2011 Seattle Tech Startups meeting. More info here (along with powerpoint slides): http://www.startupmonkeys.com/2011/02/scala-frugal-mechanic/
Scala collections api expressivity and brevity upgrade from javaIndicThreads
Session presented at the 6th IndicThreads.com Conference on Java held in Pune, India on 2-3 Dec. 2011.
http://Java.IndicThreads.com
Not so long ago Microsoft announced a new language trageting on front-end developers. Everybody's reaction was like: Why?!! Is it just Microsoft darting back to Google?!
So, why a new language? JavaScript has its bad parts. Mostly you can avoid them or workaraund. You can emulate class-based OOP style, modules, scoping and even run-time typing. But that is doomed to be clumsy. That's not in the language design. Google has pointed out these flaws, provided a new language and failed. Will the story of TypeScript be any different?
These are the outline slides that I used for the Pune Clojure Course.
The slides may not be much useful standalone, but I have uploaded them for reference.
This document provides an introduction to the Scala programming language. It discusses what Scala is, how to get started, basic concepts like mutability and functions, and Scala features like classes, traits, pattern matching, and collections. Scala combines object-oriented and functional programming. It runs on the Java Virtual Machine and is compatible with Java. The document provides code examples to demonstrate Scala concepts and features.
This document provides an overview of Scala fundamentals including:
- Scala is a programming language for the JVM that supports both object-oriented and functional paradigms.
- It defines variables, values, lazy values, functions, types, classes, objects, traits, and higher-order functions.
- Classes can extend other classes and traits, allowing for multiple inheritance. Objects are used as singletons.
- Functional concepts like immutability, anonymous functions, and higher-order functions are supported.
Speaking Scala: Refactoring for Fun and Profit (Workshop)Tomer Gabel
These are the slides from half-day workshop on refactoring Scala code hosted by Wix Engineering (http://www.wix.com/wixengineering/scalaevent).
Watch video (in Hebrew): http://parleys.com/play/53f7a9cce4b06208c7b7ca1e
Type classes are a fundamental feature of Scala, which allows you to layer new functionality on top of existing types externally, i.e. without modifying or recompiling existing code. When combined with implicits, this is a truly remarkable tool that enables many of the advanced features offered by the Scala library ecosystem. In this talk we'll go back to basics: how type classes are defined and encoded, and cover several prominent use cases.
A talk given at the Underscore meetup on 19 August, 2014.
Some languages, like SML, Haskell, and Scala, have built-in support for pattern matching, which is a generic way of branching based on the structure of data.
While not without its drawbacks, pattern matching can help eliminate a lot of boilerplate, and it's often cited as a reason why functional programming languages are so concise.
In this talk, John A. De Goes talks about the differences between built-in patterns, and so-called first-class patterns (which are "do-it-yourself" patterns implemented using other language features).
Unlike built-in patterns, first-class patterns aren't magical, so you can store them in variables and combine them in lots of interesting ways that aren't always possible with built-in patterns. In addition, almost every programming language can support first-class patterns (albeit with differing levels of effort and type-safety).
During the talk, you'll watch as a mini-pattern matching library is developed, and have the opportunity to follow along and build your own pattern matching library in the language of your choice.
1. The document discusses Scala including learning it in half an hour, Scala being a JVM and .NET language, and examples of companies using Scala like Twitter and Foursquare.
2. It provides code examples of basic Scala programs and concepts like classes, objects, main methods, and printing output.
3. Later examples demonstrate more advanced concepts like domain specific languages, traits, mixins, pattern matching, actors, and message passing between actors.
Intro to Functional Programming in ScalaShai Yallin
Scala is a functional and object-oriented programming language that runs on the Java Virtual Machine. It features type inference, immutable collections, pattern matching, and functions as first-class values. The document provides an overview of Scala's features such as its static typing, traits for multiple inheritance, and case classes for value objects. It also demonstrates Scala's collections API and use of functions and pattern matching.
My Scala by the Bay 2014 talk on exploring the ideas behind the implementation of the generic library shapeless, and general ideas about how to do "type level" programming in Scala.
Slides for my recent presentation at the CASE meetup, May 21st. Discusses functional programming features in Scala. Goes from basic FP features like higher-order functions all the way through to monads.
I love Scala, I really do. I find Scala both more productive and more fun then any of the many languages I have worked with before. There are many reasons to use to Scala; however, I will not be talking about them.
Instead, in this talk I will cover some of the things I find annoying or disappointing in Scala. For each I will explain the issue, why it is so, whether or not it is likely to ever change, and what, if anything, we can do about it in the mean time.
The issues covered will include:
Limitations on type inference
Type Erasure
Binary incompatibility
Limitations on overloading
Standard library quality
And more
The lecture is geared towards those who have written between 10 and 10 millions lines of Scala code.
Scala Intro training @ Lohika, Odessa, UA.
This is a basic Scala Programming Language overview intended to evangelize the language among any-language programmers.
What You Need to Know about Lambdas - the problem with lambdas (as in anonymous functions) and the way to solve those problems (hint - using methods lifted to functions).
Property based Testing - generative data & executable domain rulesDebasish Ghosh
- Property based testing verifies properties and invariants of code through automated generation of random test data rather than testing with specific hard-coded test cases. This helps uncover subtle bugs and edge cases.
- Key aspects include defining properties to specify constraints that must hold, using a library like ScalaCheck to generate random data and verify properties hold, and defining custom generators for domain-specific types.
- Properties can verify things like business rules of a domain model in a more abstract way compared to traditional unit tests.
Slides for a lightning talk on Java 8 lambda expressions I gave at the Near Infinity (www.nearinfinity.com) 2013 spring conference.
The associated sample code is on GitHub at https://github.com/sleberknight/java8-lambda-samples
Slides from my talk at the Feb 2011 Seattle Tech Startups meeting. More info here (along with powerpoint slides): http://www.startupmonkeys.com/2011/02/scala-frugal-mechanic/
Scala collections api expressivity and brevity upgrade from javaIndicThreads
Session presented at the 6th IndicThreads.com Conference on Java held in Pune, India on 2-3 Dec. 2011.
http://Java.IndicThreads.com
Not so long ago Microsoft announced a new language trageting on front-end developers. Everybody's reaction was like: Why?!! Is it just Microsoft darting back to Google?!
So, why a new language? JavaScript has its bad parts. Mostly you can avoid them or workaraund. You can emulate class-based OOP style, modules, scoping and even run-time typing. But that is doomed to be clumsy. That's not in the language design. Google has pointed out these flaws, provided a new language and failed. Will the story of TypeScript be any different?
These are the outline slides that I used for the Pune Clojure Course.
The slides may not be much useful standalone, but I have uploaded them for reference.
This document provides an introduction to the Scala programming language. It discusses what Scala is, how to get started, basic concepts like mutability and functions, and Scala features like classes, traits, pattern matching, and collections. Scala combines object-oriented and functional programming. It runs on the Java Virtual Machine and is compatible with Java. The document provides code examples to demonstrate Scala concepts and features.
This document compares the functional programming languages Haskell and Scala. It outlines their similarities such as being high-level, statically typed, and supporting functions as first-class values. It describes some of their conceptual differences like Haskell emphasizing purity and lazy evaluation while Scala allows side effects. It then provides examples to illustrate extra features of each language, such as Haskell's pointfree style and compiler extensions, and Scala's support for object-oriented and imperative programming. Finally, it discusses some practical considerations for using each language.
This document provides an introduction to Scala for Java developers. It discusses that Scala is a hybrid object-oriented and functional language that runs on the JVM and interoperates well with Java. It highlights several features of Scala that allow for more concise code compared to Java, such as type inference, expressions instead of statements, higher-order functions, and case classes.
Functional Programming - Past, Present and FuturePushkar Kulkarni
Functional programming has evolved significantly since its origins in lambda calculus. Key developments include Lisp (1958), ML (1973), Haskell (1990), and more recently languages for the JVM like Scala (2004) and Clojure (2007). Functional concepts like immutable data, higher-order functions, lazy evaluation and currying allow a more declarative style and improved performance. Advances like tail call optimization and parallelism address early performance issues. Future areas include dependent types as in Idris and embracing functional principles in mainstream languages like Java 8. Functional programming changes how we think about solving problems.
Functional Programming Past Present FutureIndicThreads
Presented at the IndicThreads.com Software Development Conference 2016 held in Pune, India. More at http://www.IndicThreads.com and http://Pune16.IndicThreads.com
--
C# 3.0 introduces many features common in functional programming languages like generics, first-class functions, lambda expressions, and type inference. However, C# retains its object-oriented roots, and some features like datatypes and laziness remain more fully realized in pure functional languages. While C# supports programming in a functional style, its performance characteristics and lack of optimizations mean it may not be a serious competitor to ML and Haskell for functional programming tasks.
The Swift Compiler and Standard LibrarySantosh Rajan
The document discusses the Swift compiler, standard library, and key language features. It provides an overview of the Swift compiler's location and how to compile and run Swift programs from the command line. It also summarizes the main types, protocols, operators and global functions that are included in Swift's standard library.
This document provides an overview of the Scala programming language. Some key points:
- Scala runs on the Java Virtual Machine and was created by Martin Odersky at EPFL.
- It has been around since 2003 and the current stable release is 2.7.7. Release 2.8 beta 1 is due out soon.
- Scala combines object-oriented and functional programming. It has features like pattern matching, actors, XML literals, and more that differ from Java. Everything in Scala is an object.
This document provides a taxonomy of Scala concepts including object-oriented features, pattern matching, functional programming, actors, futures, implicits, type theory, macros, and category theory. It aims to serve as a reference for many of the terms used in the Scala community. The document covers topics such as case classes, lazy definitions, imports, objects, tuples, pattern matching examples, immutable collections, higher order functions, parallel collections, partial functions, currying, actors, futures, implicit conversions, implicit parameters, implicit classes, type inference, type classes, higher kinded types, algebraic data types, macros, concepts and arrows in category theory, morphisms, and functors.
Lisp Macros in 20 Minutes (Featuring Clojure)Phil Calçado
"We just started holding 20 minutes presentations during lunch time in the ThoughtWorks Sydney office. For the first session I gave a not-that-short talk on Lisp macros using Clojure. The slides are below.
It turns out that 20 minutes is too little time to actually acquire content but I think at least we now have some people interested in how metaprogramming can be more than monkey patching."
http://fragmental.tw/2009/01/20/presentation-slides-macros-in-20-minutes/
The document discusses Scala and why some developers think it could replace Java on the JVM. It provides quotes from several influential developers, including the creator of Java and Groovy, expressing their view that Scala is the best candidate to replace Java in the long run. Specifically, James Gosling says that if he had to pick another language on the JVM besides Java, it would be Scala. Charlie Nutter describes Scala as the current heir apparent to the Java throne and the momentum behind Scala is now unquestionable. James Strachan says that if he had seen the Programming in Scala book in 2003, he may have never created Groovy and that his tip for a long term replacement for Java is
Standardizing on a single N-dimensional array API for PythonRalf Gommers
MXNet workshop Dec 2020 presentation on the array API standardization effort ongoing in the Consortium for Python Data API Standards - see data-apis.org
Scala: Object-Oriented Meets Functional, by Iulian Dragos3Pillar Global
A presentation from Iulian Dragos of Typesafe that gives an overview of the Scala programming language. The presentation was given at a Functional Angle conference in Timisoara, Romania sponsored by 3Pillar. Iulian Dragos has been working on Scala since 2004. He currently works for Typesafe, a start-up that was co-founded by Scala’s creator, Martin Odersky.
This document discusses monads by first explaining lambda calculus and functional programming concepts like function composition. It then introduces the idea of monads as a way to manage side effects in functional programs. Specifically, it explains that monads have three parts - the monadic type, a return function, and a bind function. The return function packages a value into the monadic context, while bind allows extracting the value and chaining monadic functions together. Finally, it shows how to modify ordinary functions to work with monads by changing their signatures and composing them using bind instead of normal function composition.
The code example shows 10 threads concurrently manipulating shared data of 100 vectors with 10 numbers each, by randomly swapping two positions in two random vectors using Clojure's Software Transactional Memory (STM) to ensure consistency across 100,000 iterations per thread, without any numbers getting lost due to the transactions. It initializes the vectors, defines a swap and report function, runs the threads concurrently swapping values, and reports the results.
The document tells the story of Adi and his journey working with event sourcing. It begins by introducing Adi and his dream. It then describes some of the challenges Adi faces with event streams exhibiting out of order, conflicting, and impossible state events. The document discusses how time works in distributed systems and challenges with clock drift. It proposes using causality and Lamport timestamps to provide a partial ordering of events while avoiding reliance on real time. Finally, it provides suggestions for Adi's data model and write process to fully order events and detect conflicts while respecting causality.
Nondeterministic Software for the Rest of UsTomer Gabel
A talk given at GeeCON 2018 in Krakow, Poland.
Classically-trained (if you can call it that) software engineers are used to clear problem statements and clear success and acceptance criteria. Need a mobile front-end for your blog? Sure! Support instant messaging for a million concurrent users? No problem! Store and serve 50TB of JSON blobs? Presto!
Unfortunately, it turns out modern software often includes challenges that we have a hard time with: those without clear criteria for correctness, no easy way to measure performance and success is about more than green dashboards. Your blog platform better have a spam filter, your instant messaging service has to have search, and your blobs will inevitably be fed into some data scientist's crazy contraption.
In this talk I'll share my experiences of learning to deal with non-deterministic problems, what made the process easier for me and what I've learned along the way. With any luck, you'll have an easier time of it!
This talk revisits dependency injection, and attempts to answer a single question honestly, or at least while pointing out and acknowledging the biases at play: "is dependency injection a good thing?"
Dependency injection has fast established itself as a major design pattern in modern software. No longer the province of server-side and enterprise software, it is now a fundamental component of frameworks from Spring to Angular.js.
With such widespread success, the time is ripe to take a fresh look at dependency injection if we are to understand it better. After all, DI is instrumental in building large systems that are loosely coupled, and it cleanly separates your tests from implementation... or does it?
(A talk given at GeeCON 2017 in Prague, Czech Republic)
Although event sourcing (and its sister pattern CQRS) has been gaining traction in recent years, it's still baffling for many engineers attempting to implement it for the first time. While there's plenty of material on the subject, most of it is too basic or theoretical for practical applications, and engineers often end up having to reinvent (or rediscover) suitable approaches and techniques.
This talk focuses on practical aspects of building event-sourced systems, lessons learned from our experience building such systems at Wix. We'll walk through the design and implementation of a relatively simple event-sourced system, covering the event model, underlying persistence model, code layering/factoring and operational considerations.
A talk given at Reversim Summit 2017 in Tel-Aviv, Israel.
The beautiful thing about software engineering is that it gives you the warm and fuzzy illusion of total understanding: I control this machine because I know how it operates. This is the result of layers upon layers of successful abstractions, which hide immense sophistication and complexity. As with any abstraction, though, these sometimes leak, and that's when a good grounding in what's under the hood pays off.
The second talk in this series peels a few layers of abstraction and takes a look under the hood of our "car engine", the CPU. While hardly anyone codes in assembly language anymore, your C# or JavaScript (or Scala or...) application still ends up executing machine code instructions on a processor; that is why Java has a memory model, why memory layout still matters at scale, and why you're usually free to ignore these considerations and go about your merry way.
You'll come away knowing a little bit about a lot of different moving parts under the hood; after all, isn't understanding how the machine operates what this is all about?
(From a talk given at BuildStuff 2016 in Vilnius, Lithuania.)
The beautiful thing about software engineering is that it gives you the warm and fuzzy illusion of total understanding: I control this machine because I know how it operates. This is the result of layers upon layers of successful abstractions, which hide immense sophistication and complexity. As with any abstraction, though, these sometimes leak, and that's when a good grounding in what's under the hood pays off.
This first in what will hopefully be a series of talks covers the fundamentals of storage, providing an overview of the three storage tiers commonly found on modern platforms (hard drives, RAM and CPU cache). You'll come away knowing a little bit about a lot of different moving parts under the hood; after all, isn't understanding how the machine operates what this is all about?
-- A talk given at GeeCON Kraków 2016.
With Java 8 adoption skyrocketing, is Scala still relevant? In our opinion, the answer is an unequivocal yes. To make our point, Tomer Gabel (system architect at Wix) will showcase practical examples where Scala's features provide a definitive advantage over Java 8. These include:
* Effective logging with traits and by-name parameters;
* Pattern matching for fun and profit;
* Type-safe, efficient serialization with type classes.
A talk given at a Wix Ukraine R&D meetup in Dnipropetrovsk, Ukraine on 6 April, 2016.
Video recording: https://youtu.be/EXxA3PlcdBg?t=3680
Sample code: https://github.com/holograph/scala-vs-java8
(A talk given at Wix R&D in Dnipro, Ukraine on March 2017. Video available at https://www.youtube.com/watch?v=eIX33mQdkAI&feature=youtu.be)
While microservices are conceptually simple, it's a deep rabbit hole to go down. Deceptively simple questions can have far-reaching implications: Which communication protocol should I choose? Is event-driven the way to go? What monitoring tools should I put in place?
In this talk we'll cover some of the fundamental questions, outline the solutions adopted or developed by Wix, and share our hindsight on what worked well for us, what didn't and thoughts on future directions for our stack.
Scala Refactoring for Fun and Profit (Japanese subtitles)Tomer Gabel
A talk given at Scala Matsuri 2016 in Tokyo, Japan.
New Scala practitioners often experience the uncomfortable feeling of "not quite getting it." If you've studied the syntax and written tests, maybe production code; if you're becoming comfortable with the language and libraries, but keep worrying that there's "a better way", or that your code isn't "idiomatic enough" - this session is for you.
By refactoring a real, live codebase, this talk will provide you with new tools and increased confidence. Between the provided examples and the ensuing discussion, you will walk away with a better feel for Scala and how to employ it in the real world.
Of the myriad challenges in scaling up an engineering organization, onboarding new employees is probably the least well-understood. There are relatively common solutions for large-scale recruitment, finance and administration, but onboarding remains a question that many organizations struggle with.
At Wix we've been struggling with massive scaling challenges: over the last two years our company headcount has doubled itself, and we had to learn to cope with the influx while maintaining velocity. In this talk we'll share with you the story of how we set up Wix Academy, an engineer-driven training organization, the solutions we've developed (and still are!), and what we've learned in our first year of operation.
A presentation given at Velocity 2016 in Amsterdam, The Netherlands (previously at BuildStuff 2015 in Vilnius, Lithuania).
The Scala programming language has been gaining significant traction over the last few years, being adopted by vastly different organizations from startups to large enterprises. While the language itself is pretty well understood and explained in tutorials and books, there is an apparent dearth of practical advice for new adopters on the best approach to integrating the new technology. In this talk I’ll attempt to offer such advice gathered over several years of production Scala use, focusing on tools, practices, patterns and the community, in the hope of making your transition into the Scala ecosystem easier and better-informed up front.
A talk given at JavaOne 2015 in San Francisco.
A talk given at JDay Lviv 2015 in Ukraine; originally developed by Yoav Abrahami, and based on the works of Kyle "Aphyr" Kingsbury:
Consistency, availability and partition tolerance: these seemingly innocuous concepts have been giving engineers and researchers of distributed systems headaches for over 15 years. But despite how important they are to the design and architecture of modern software, they are still poorly understood by many engineers.
This session covers the definition and practical ramifications of the CAP theorem; you may think that this has nothing to do with you because you "don't work on distributed systems", or possibly that it doesn't matter because you "run over a local network." Yet even traditional enterprise CRUD applications must obey the laws of physics, which are exactly what the CAP theorem describes. Know the rules of the game and they'll serve you well, or ignore them at your own peril...
Leveraging Scala Macros for Better ValidationTomer Gabel
A talk given at Scalapeño 2014 and JavaOne 2014 (video links to follow).
Data validation is a common enough problem that numerous attempts have been made to solve it elegantly. The de-facto solution in Java (JSR 303) has a number of shortcomings and fails to leverage the powerful Scala type system. The release of Scala 2.10.x introduced a couple of experimental metaprogramming features, namely reflection and macros. In this talk I'll introduce macros by way of a practical example: implementing a full-blown data validation engine, utilizing def macros and a Scala DSL to enable elegant validator definition syntax and call-site.
A talk given at ScalaUA 2016 in Kiev, Ukraine.
Scala combines a powerful type system with a lean but flexible syntax. This combination enables incredible flexibility in library design, most particularly in designing internal DSLs for many common scenarios: specification definition and matching in Specs² and ScalaTest, request routing in Spray and query construction in Squeryl, just to name a few. The budding DSL designer, however, will quickly realize that there are precious few resources on how to best approach the problem in Scala; the various techniques, limitations and workarounds are not generally well understood or documented, and every developer ends up running into the same challenges and dead-ends. In this talk I'll attempt to summarize what I've learned from reading, extending and designing Scala DSLs in the hopes that it'll save future Scala library designers a whole lot of pain.
Functional Leap of Faith (Keynote at JDay Lviv 2014)Tomer Gabel
Keynote talk given at JDay Lviv 2014 in Ukraine (http://www.jday.com.ua/). Video coming soon.
Abstract:
Some say that there's nothing new under the sun. However, looking back on five to six decades of computing, it's easy to see that things progress at their own leisurly pace. Structured programming, originating in the '60s, did not gain mainstream adoption until the '80s; object-oriented programming was hotly debated in the '70s and '80s but only gained widespread acceptance in the '90s. Every couple of decades sees an engineering leap that radically improves the software engineering discipline across the board. I believe we are now at such an inflection point, with functional programming concepts slowly sifting into the mainstream. After this talk, I hope you will too.
A talk given at the Wix Ukraine R&D meetup in Dnipropetrovsk, Ukraine on May 22, 2014.
So you've heard of this newfangled "Scala" thing and think it might be worth checking out. Good for you! Unfortunately, it's also daunting. Your first search for Scala is likely to pitch it as a "statically-typed hybrid object-oriented and functional language", which is technically true but doesn't really help much.
Instead, this talk will provide an overview of the language, focusing on five highly practical advantages Scala has over Java without a brain hemorrhage-inducing paradigm shift, followed by some tips and recommendations on Scala adoption in the real world and (as time allows) open-ended Q&A.
Nashorn: JavaScript that doesn’t suck (ILJUG)Tomer Gabel
View the video (in Hebrew) on Parleys: http://www.parleys.com/play/537f3dade4b0e9793767cd35
Java 8 introduces a new JavaScript engine called Nashorn. This presentation gives an overview of the new engine, provides some historical context and dives into the implementation details.
Originally presented at the Israeli Java User Group (ILJUG) Java 8 launch event on April 28th, 2014.
A lab given at the Reversim Summit on 19 February 2013.
http://summit2013.reversim.com/#/sessions/Lab:%20Java%20Production%20Debugging%20101
The code for the sample scenarios can be found on GitHub: https://github.com/holograph/examples/tree/master/reversim-proddbg-lab
A lecture given at the DevCon TLV conference in February 2013 (http://devcon-february.events.co.il/presentations/771-scala-best-practices):
Although Scala has been gaining tremendous traction over the last couple of years, it's still a relatively new language with few "common knowledge" best- and worst-practices.
This lecture will attempt to distill working knowledge from 1.5 years of production Scala use, articles from around the web and other sources into a coherent set of recommendations for those considering Scala, as well as existing practitioners.
A flash lecture given at the JJTV Tool Night #4 on 6 November, 2012.
The full lecture video (in Hebrew) can be found at http://www.youtube.com/watch?v=ozl6oBmAj1Y
What is Model Context Protocol(MCP) - The new technology for communication bw...Vishnu Singh Chundawat
The MCP (Model Context Protocol) is a framework designed to manage context and interaction within complex systems. This SlideShare presentation will provide a detailed overview of the MCP Model, its applications, and how it plays a crucial role in improving communication and decision-making in distributed systems. We will explore the key concepts behind the protocol, including the importance of context, data management, and how this model enhances system adaptability and responsiveness. Ideal for software developers, system architects, and IT professionals, this presentation will offer valuable insights into how the MCP Model can streamline workflows, improve efficiency, and create more intuitive systems for a wide range of use cases.
Big Data Analytics Quick Research Guide by Arthur MorganArthur Morgan
This is a Quick Research Guide (QRG).
QRGs include the following:
- A brief, high-level overview of the QRG topic.
- A milestone timeline for the QRG topic.
- Links to various free online resource materials to provide a deeper dive into the QRG topic.
- Conclusion and a recommendation for at least two books available in the SJPL system on the QRG topic.
QRGs planned for the series:
- Artificial Intelligence QRG
- Quantum Computing QRG
- Big Data Analytics QRG
- Spacecraft Guidance, Navigation & Control QRG (coming 2026)
- UK Home Computing & The Birth of ARM QRG (coming 2027)
Any questions or comments?
- Please contact Arthur Morgan at [email protected].
100% human made.
TrsLabs - Fintech Product & Business ConsultingTrs Labs
Hybrid Growth Mandate Model with TrsLabs
Strategic Investments, Inorganic Growth, Business Model Pivoting are critical activities that business don't do/change everyday. In cases like this, it may benefit your business to choose a temporary external consultant.
An unbiased plan driven by clearcut deliverables, market dynamics and without the influence of your internal office equations empower business leaders to make right choices.
Getting things done within a budget within a timeframe is key to Growing Business - No matter whether you are a start-up or a big company
Talk to us & Unlock the competitive advantage
Generative Artificial Intelligence (GenAI) in BusinessDr. Tathagat Varma
My talk for the Indian School of Business (ISB) Emerging Leaders Program Cohort 9. In this talk, I discussed key issues around adoption of GenAI in business - benefits, opportunities and limitations. I also discussed how my research on Theory of Cognitive Chasms helps address some of these issues
Mobile App Development Company in Saudi ArabiaSteve Jonas
EmizenTech is a globally recognized software development company, proudly serving businesses since 2013. With over 11+ years of industry experience and a team of 200+ skilled professionals, we have successfully delivered 1200+ projects across various sectors. As a leading Mobile App Development Company In Saudi Arabia we offer end-to-end solutions for iOS, Android, and cross-platform applications. Our apps are known for their user-friendly interfaces, scalability, high performance, and strong security features. We tailor each mobile application to meet the unique needs of different industries, ensuring a seamless user experience. EmizenTech is committed to turning your vision into a powerful digital product that drives growth, innovation, and long-term success in the competitive mobile landscape of Saudi Arabia.
Technology Trends in 2025: AI and Big Data AnalyticsInData Labs
At InData Labs, we have been keeping an ear to the ground, looking out for AI-enabled digital transformation trends coming our way in 2025. Our report will provide a look into the technology landscape of the future, including:
-Artificial Intelligence Market Overview
-Strategies for AI Adoption in 2025
-Anticipated drivers of AI adoption and transformative technologies
-Benefits of AI and Big data for your business
-Tips on how to prepare your business for innovation
-AI and data privacy: Strategies for securing data privacy in AI models, etc.
Download your free copy nowand implement the key findings to improve your business.
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxshyamraj55
We’re bringing the TDX energy to our community with 2 power-packed sessions:
🛠️ Workshop: MuleSoft for Agentforce
Explore the new version of our hands-on workshop featuring the latest Topic Center and API Catalog updates.
📄 Talk: Power Up Document Processing
Dive into smart automation with MuleSoft IDP, NLP, and Einstein AI for intelligent document workflows.
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPathCommunity
Join this UiPath Community Berlin meetup to explore the Orchestrator API, Swagger interface, and the Test Manager API. Learn how to leverage these tools to streamline automation, enhance testing, and integrate more efficiently with UiPath. Perfect for developers, testers, and automation enthusiasts!
📕 Agenda
Welcome & Introductions
Orchestrator API Overview
Exploring the Swagger Interface
Test Manager API Highlights
Streamlining Automation & Testing with APIs (Demo)
Q&A and Open Discussion
Perfect for developers, testers, and automation enthusiasts!
👉 Join our UiPath Community Berlin chapter: https://community.uipath.com/berlin/
This session streamed live on April 29, 2025, 18:00 CET.
Check out all our upcoming UiPath Community sessions at https://community.uipath.com/events/.
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...Alan Dix
Talk at the final event of Data Fusion Dynamics: A Collaborative UK-Saudi Initiative in Cybersecurity and Artificial Intelligence funded by the British Council UK-Saudi Challenge Fund 2024, Cardiff Metropolitan University, 29th April 2025
https://alandix.com/academic/talks/CMet2025-AI-Changes-Everything/
Is AI just another technology, or does it fundamentally change the way we live and think?
Every technology has a direct impact with micro-ethical consequences, some good, some bad. However more profound are the ways in which some technologies reshape the very fabric of society with macro-ethical impacts. The invention of the stirrup revolutionised mounted combat, but as a side effect gave rise to the feudal system, which still shapes politics today. The internal combustion engine offers personal freedom and creates pollution, but has also transformed the nature of urban planning and international trade. When we look at AI the micro-ethical issues, such as bias, are most obvious, but the macro-ethical challenges may be greater.
At a micro-ethical level AI has the potential to deepen social, ethnic and gender bias, issues I have warned about since the early 1990s! It is also being used increasingly on the battlefield. However, it also offers amazing opportunities in health and educations, as the recent Nobel prizes for the developers of AlphaFold illustrate. More radically, the need to encode ethics acts as a mirror to surface essential ethical problems and conflicts.
At the macro-ethical level, by the early 2000s digital technology had already begun to undermine sovereignty (e.g. gambling), market economics (through network effects and emergent monopolies), and the very meaning of money. Modern AI is the child of big data, big computation and ultimately big business, intensifying the inherent tendency of digital technology to concentrate power. AI is already unravelling the fundamentals of the social, political and economic world around us, but this is a world that needs radical reimagining to overcome the global environmental and human challenges that confront us. Our challenge is whether to let the threads fall as they may, or to use them to weave a better future.
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell
With expertise in data architecture, performance tracking, and revenue forecasting, Andrew Marnell plays a vital role in aligning business strategies with data insights. Andrew Marnell’s ability to lead cross-functional teams ensures businesses achieve sustainable growth and operational excellence.
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Aqusag Technologies
In late April 2025, a significant portion of Europe, particularly Spain, Portugal, and parts of southern France, experienced widespread, rolling power outages that continue to affect millions of residents, businesses, and infrastructure systems.
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveScyllaDB
Want to learn practical tips for designing systems that can scale efficiently without compromising speed?
Join us for a workshop where we’ll address these challenges head-on and explore how to architect low-latency systems using Rust. During this free interactive workshop oriented for developers, engineers, and architects, we’ll cover how Rust’s unique language features and the Tokio async runtime enable high-performance application development.
As you explore key principles of designing low-latency systems with Rust, you will learn how to:
- Create and compile a real-world app with Rust
- Connect the application to ScyllaDB (NoSQL data store)
- Negotiate tradeoffs related to data modeling and querying
- Manage and monitor the database for consistently low latencies
Procurement Insights Cost To Value Guide.pptxJon Hansen
Procurement Insights integrated Historic Procurement Industry Archives, serves as a powerful complement — not a competitor — to other procurement industry firms. It fills critical gaps in depth, agility, and contextual insight that most traditional analyst and association models overlook.
Learn more about this value- driven proprietary service offering here.
7. Simply put…
• Short-hand for unnamed functions
val isEven = ( v: Int ) => v % 2 == 0
• Can be passed around as parameters
def filterBy( predicate: Int => Boolean )
8. Functional building block
• All Scala collections (of T) support:
– Filtering by predicate (T=>Boolean)
– Finding a value by predicate
– Mapping by transformation (T=>R)
– Sorting by an arbitrary function
9. Compare…
List<Integer> list = …;
List<Integer> onlyEvens =
filter( list, new Predicate<Integer>() {
public boolean test( Integer value ) {
return value % 2 == 0;
}
} );
val list: List[ Int ] = …;
val onlyEvens = list.filter( _ % 2 == 0 )
10. Callbacks
// Runs a background process
def invokeProcess( command: String,
onExit: Int => Unit )
// Call site:
invokeProcess( “tar –cvjf backup.tar.bz2 *”,
exitCode =>
if ( exitCode <> 0 )
error( “Failed to generate backup!” )
)
12. NPEs are crap
String lower( String v ) {
if ( v == null )
return null;
else
return v.toLowerCase();
}
Does not document intent
Redundant
Always needs checking
13. NPEs are still crap
• In Scala, nulls are a code smell
• … except for legacy interop
def lower( v: Option[ String ] ) =
v.map( _.toLowerCase )
Clear semantics
Explicit access
14. Options are great!
• Loads of helpers:
– optional.getOrElse( “default value” )
– optional.orElse( anotherOption )
– optional.orNull // Legacy helper
• Just another collection!
– def lookup( id: Long ): Option[ User ] = …
for ( id <- idList; user <- lookup( id ) )
println( user.name )
22. It will rock your world
Given the following:
case class Person( name: String, age: Int )
val people: List[ Person ] = …
You can now do…
val firstTen = people.take( 10 )
val onlyMinors = people.filter( _.age < 18 )
val nameSet = people.map( _.name ).toSet
23. … and then some
That was just the tip of the iceberg.
val sorted = people.sortBy( _.age )
val index = people.groupBy( _.name.head )
val pairs = people.sliding( 2, 2 )
val ( minors, adults ) =
people.partition( _.age < 18 )
24. Maps
• Maps are also collections
• … and can be used as lookup functions
val peopleById: Map[ Long, Person ] = …
def getPeople( ids: List[ Long ] ) =
ids map peopleById
25. Over and out
• Thank you for your time!
• Questions and comments welcome!
– [email protected]
– http://www.tomergabel.com