The document discusses monads and functional programming concepts. It begins by explaining that monads are structures that put values in computational contexts. It then provides a technical definition of a monad involving endofunctors, natural transformations, and laws. Several examples are given to illustrate monads, including the Optional monad in Java to handle null values, and the Stream monad to represent sequences. The document advocates using monads to make aspects like errors, state, and effects explicit in a program's type system.
The document discusses monads and functional programming concepts. It begins by introducing monads and defining them mathematically. It then provides examples of monads in Java like Optional and Stream. It discusses how monads can be used to make errors, null values, and asynchronous behavior explicit in code through types. The document also shows how to create a custom Validation monad to handle errors from functions. Overall, it promotes using monads and the type system to build robust and readable functional code.
This presentation is about Java performance and the most effective ways to work with Java memory, including memory saving techniques and overcoming of memory barriers. Moreover, it contains debunking of the most popular myths on speed boosting.
This presentation by Andrii Antilikatorov (Consultant, GlobalLogic) was delivered at GlobalLogic Java Conference #2 in Krakow on April 23, 2016.
The document discusses the introduction and advantages of lambda expressions and functional programming in Java 8. Some key points include:
- Lambda expressions allow passing behaviors as arguments to methods, simplifying code by removing bulky anonymous class syntax. This enables more powerful and expressive APIs.
- Streams provide a way to process collections of data in a declarative way, leveraging laziness to improve efficiency. Operations can be pipelined for fluent processing.
- Functional programming with immutable data and avoidance of side effects makes code more modular and easier to reason about, enabling optimizations like parallelism. While not natively supported, Java 8 features like lambda expressions facilitate a more functional approach.
This document provides an overview of the Java Collections Framework. It discusses key interfaces like Collection, List, Set, Queue and Map. It also covers concrete classes that implement these interfaces like ArrayList, LinkedList, HashSet, HashMap. The document compares different collection classes and their usage. It describes concepts like iterators, fail-fast behavior, wrapper classes and autoboxing/unboxing. Synchronization of collections and usage of equals() and hashCode() methods is also summarized.
Mockito is a mocking framework for Java that allows developers to focus tests on interactions between objects rather than states. It provides test doubles like mocks and spies to simulate dependencies and verify expected interactions. Mockito allows mocking method calls and configuring return values or exceptions to test different scenarios. It provides default values for unstubbed calls to avoid overspecifying tests.
자프링(자바 + 스프링) 외길 12년차 서버 개발자가 코프링(코틀린 + 스프링)을 만난 후 코틀린의 특징과 스프링의 코틀린 지원을 알아가며 코프링 월드에서 살아남은 이야기…
코드 저장소: https://github.com/arawn/kotlin-support-in-spring
Building a turn-based game prototype using ECS - Unite Copenhagen 2019Unity Technologies
Get a high-level overview of the Entity Component System (ECS) and turn-based game loops, and see a proof of concept built using ECS. These slides will cover some of the pitfalls and also show concepts of ECS in a slightly exotic context.
Speaker:
Florian Uhde - Three Eyed Games
Watch the session on YouTube: https://youtu.be/mL4qrt-15TE
2018.10.18
OKKYCON: 2018 《The Real TDD - TDD 제대로 알기》
정진욱님의 <테스트하기 쉬운 코드로 개발하기> 발표자료입니다.
(PPT 원본 ☞ https://1drv.ms/p/s!ApDGhCqxGI8ohJlUuAk_3_LxpRFz0A )
[연사 소개]
정진욱 - PUBLYTO CPO
8년간 장래 교통량 예측을 하다, 개발에 흥미를 느껴 전업했다. 현재 PUBLYTO에서 백엔드를 맡고 있다. 교통량 계산 실수가 빈번할 때 TDD 방법론을 처음 접했다. 테스트부터 만든다는 TDD의 역발상이 계산 실수를 줄이는 데 도움이 되었다. 그때부터 TDD에 관심을 갖게 되었으며, 현재는 Property-based Testing 기법을 사내 프로젝트에 적용하고 있다.
[발표 소개]
TDD가 어려운 이유는 테스트 기술이 부족해서가 아닙니다. 가장 큰 원인은 테스트 대상 코드(System Under Test, SUT)가 테스트하기 힘들게 디자인되었기 때문입니다. 우리는 테스트하기 쉬운 형태로 SUT를 디자인해야 합니다. 쉬운 테스트 코드가 주도하는 개발 방법을 실전 코드 중심으로 살펴봅니다.
http://okkycon.com
More and more web projects require interfacing with the backend using a REST-ful interface. In this presentation we'll discuss Django-REST-Framework's features and walk through how to integrate it into your next project!
This document discusses authenticating Angular apps with JSON Web Tokens (JWTs). It begins with background on OAuth 2.0 bearer tokens and then explains that JWTs are commonly used as bearer tokens. It describes the three parts of a JWT - the header, payload, and signature. It outlines the JWT authentication token lifecycle, from a user logging in to receive a JWT from the server to sending that JWT on subsequent requests. Finally, it presents an Angular HTTP interceptor design pattern to automatically add the JWT to requests by intercepting HTTP calls and modifying the authorization header.
This document provides an introduction to JUnit and Mockito for testing Java code. It discusses how to set up JUnit tests with annotations like @Before, @After, and @Test. It also covers using JUnit assertions and test suites. For Mockito, the document discusses how to create and use mock objects to stub behavior and verify interactions. It provides examples of argument matchers and consecutive stubbing in Mockito.
The document discusses key concepts related to threads and concurrency in Java. It defines processes, threads, and the Java memory model. It then covers various concurrency utilities in Java like synchronized blocks, volatile fields, atomic classes, thread pools, blocking queues, and locking mechanisms like ReentrantLock. The last part discusses high-level concurrency constructs like semaphores, latches, barriers, and phaser.
The document discusses clean coding practices for Java developers. It covers topics such as choosing meaningful names for variables, methods, and classes; writing code that is easy for others to understand; breaking methods down into single logical steps; and using fluent APIs to make code more readable. The presentation provides examples of clean code and ways to refactor code to follow best practices.
(Video and code available at http://fsharpforfunandprofit.com/turtle)
In this fast-paced talk, I'll start with the well known API for turtle graphics, and then stretch it to the breaking point by creating 13 different implementations, each demonstrating a different functional programming technique.
Along the way, we'll use partial application, functional dependency injection, validation
with Success/Failure results, the Either monad, the State monad, agents with message queues, event sourcing, stream processing, capability-based design, and the interpreter pattern (aka free monad). Phew!
The document describes the scoring rules for the game of bowling. It explains that in each of the 10 frames, a player has two rolls to knock down pins. The score for a frame is the total pins knocked down plus bonuses for strikes and spares. A spare occurs when a player knocks down all 10 pins over two rolls, and the bonus is the number of pins from the next roll. A strike knocks down all 10 pins in one roll, and the bonus is the number of pins from the next two rolls. The 10th frame allows for a third roll if a strike or spare is achieved.
Coder sans peur du changement avec la meme pas mal hexagonal architectureThomas Pierrain
Découvrez en pratique l'architecture hexagonale, indispensable pour vos applications complexes !
Ce style d'architecture permet d'adapter votre code à tout changement de technologie sans souffrir. Si vous aimez changer de frameworks ou de librairies, tester correctement ou appliquer le Domain-Driven Design, alors vous avez besoin d'architecture hexagonale !
Avec des exemples en code Java, et au travers d’un kata d’architecture auquel vous pourrez participer, nous vous montrerons les pièges à éviter et comment mettre en œuvre ce pattern sans trop galérer, et ce dès votre retour au bureau !
This document discusses Java input/output (IO) streams and serialization. It covers reading and writing text and binary files using classes like FileReader, FileWriter, ObjectInputStream and ObjectOutputStream. It also discusses reading from the keyboard, reading file attributes, serialization which converts an object to bytes, deserialization which converts bytes to an object, and using the Externalizable interface to customize serialization. The goal is to provide an overview of performing IO operations and serialization in Java.
Celery is a distributed task queue that allows long-running processes to be executed asynchronously outside of the main request-response cycle. It uses message brokers like RabbitMQ to distribute jobs to worker nodes for processing. This improves request performance and allows tasks to be distributed across multiple machines. Common use cases include asynchronous tasks like email sending, long database operations, image/video processing, and external API calls.
The document discusses principles of clean code, beginning with definitions of clean code from various authors. It outlines key principles like the single responsibility principle and open/closed principle. It then covers sections on meaningful naming, functions, and classes. For functions, it recommends they be small, do one thing, avoid flag arguments, and have no side effects. For classes, it advocates for small size, encapsulation, high cohesion and low coupling following the single responsibility principle.
The document discusses the MyBatis configuration XML file, which contains settings that affect how MyBatis behaves. The configuration includes properties, settings, type aliases, type handlers, object factories, plugins, environments (transaction managers and data sources), and mappers. It describes each of these sections in detail, covering things like how properties can be substituted dynamically, the different type aliases, plugins that can be used to intercept method calls, the different transaction managers and data source types (unpooled, pooled, JNDI), and how mappers are defined to connect SQL statements to Java methods.
This document discusses techniques for working with legacy code, including sprout method, wrap method, and wrap class. Sprout method involves extracting part of an existing method into a new method. Wrap method surrounds an existing method with new code. Wrap class creates a new class that delegates to the original class, allowing new behavior to be added. The techniques allow new functionality to be added to legacy code in a way that does not disrupt existing behavior and allows the new code to be tested independently.
Building a turn-based game prototype using ECS - Unite Copenhagen 2019Unity Technologies
Get a high-level overview of the Entity Component System (ECS) and turn-based game loops, and see a proof of concept built using ECS. These slides will cover some of the pitfalls and also show concepts of ECS in a slightly exotic context.
Speaker:
Florian Uhde - Three Eyed Games
Watch the session on YouTube: https://youtu.be/mL4qrt-15TE
2018.10.18
OKKYCON: 2018 《The Real TDD - TDD 제대로 알기》
정진욱님의 <테스트하기 쉬운 코드로 개발하기> 발표자료입니다.
(PPT 원본 ☞ https://1drv.ms/p/s!ApDGhCqxGI8ohJlUuAk_3_LxpRFz0A )
[연사 소개]
정진욱 - PUBLYTO CPO
8년간 장래 교통량 예측을 하다, 개발에 흥미를 느껴 전업했다. 현재 PUBLYTO에서 백엔드를 맡고 있다. 교통량 계산 실수가 빈번할 때 TDD 방법론을 처음 접했다. 테스트부터 만든다는 TDD의 역발상이 계산 실수를 줄이는 데 도움이 되었다. 그때부터 TDD에 관심을 갖게 되었으며, 현재는 Property-based Testing 기법을 사내 프로젝트에 적용하고 있다.
[발표 소개]
TDD가 어려운 이유는 테스트 기술이 부족해서가 아닙니다. 가장 큰 원인은 테스트 대상 코드(System Under Test, SUT)가 테스트하기 힘들게 디자인되었기 때문입니다. 우리는 테스트하기 쉬운 형태로 SUT를 디자인해야 합니다. 쉬운 테스트 코드가 주도하는 개발 방법을 실전 코드 중심으로 살펴봅니다.
http://okkycon.com
More and more web projects require interfacing with the backend using a REST-ful interface. In this presentation we'll discuss Django-REST-Framework's features and walk through how to integrate it into your next project!
This document discusses authenticating Angular apps with JSON Web Tokens (JWTs). It begins with background on OAuth 2.0 bearer tokens and then explains that JWTs are commonly used as bearer tokens. It describes the three parts of a JWT - the header, payload, and signature. It outlines the JWT authentication token lifecycle, from a user logging in to receive a JWT from the server to sending that JWT on subsequent requests. Finally, it presents an Angular HTTP interceptor design pattern to automatically add the JWT to requests by intercepting HTTP calls and modifying the authorization header.
This document provides an introduction to JUnit and Mockito for testing Java code. It discusses how to set up JUnit tests with annotations like @Before, @After, and @Test. It also covers using JUnit assertions and test suites. For Mockito, the document discusses how to create and use mock objects to stub behavior and verify interactions. It provides examples of argument matchers and consecutive stubbing in Mockito.
The document discusses key concepts related to threads and concurrency in Java. It defines processes, threads, and the Java memory model. It then covers various concurrency utilities in Java like synchronized blocks, volatile fields, atomic classes, thread pools, blocking queues, and locking mechanisms like ReentrantLock. The last part discusses high-level concurrency constructs like semaphores, latches, barriers, and phaser.
The document discusses clean coding practices for Java developers. It covers topics such as choosing meaningful names for variables, methods, and classes; writing code that is easy for others to understand; breaking methods down into single logical steps; and using fluent APIs to make code more readable. The presentation provides examples of clean code and ways to refactor code to follow best practices.
(Video and code available at http://fsharpforfunandprofit.com/turtle)
In this fast-paced talk, I'll start with the well known API for turtle graphics, and then stretch it to the breaking point by creating 13 different implementations, each demonstrating a different functional programming technique.
Along the way, we'll use partial application, functional dependency injection, validation
with Success/Failure results, the Either monad, the State monad, agents with message queues, event sourcing, stream processing, capability-based design, and the interpreter pattern (aka free monad). Phew!
The document describes the scoring rules for the game of bowling. It explains that in each of the 10 frames, a player has two rolls to knock down pins. The score for a frame is the total pins knocked down plus bonuses for strikes and spares. A spare occurs when a player knocks down all 10 pins over two rolls, and the bonus is the number of pins from the next roll. A strike knocks down all 10 pins in one roll, and the bonus is the number of pins from the next two rolls. The 10th frame allows for a third roll if a strike or spare is achieved.
Coder sans peur du changement avec la meme pas mal hexagonal architectureThomas Pierrain
Découvrez en pratique l'architecture hexagonale, indispensable pour vos applications complexes !
Ce style d'architecture permet d'adapter votre code à tout changement de technologie sans souffrir. Si vous aimez changer de frameworks ou de librairies, tester correctement ou appliquer le Domain-Driven Design, alors vous avez besoin d'architecture hexagonale !
Avec des exemples en code Java, et au travers d’un kata d’architecture auquel vous pourrez participer, nous vous montrerons les pièges à éviter et comment mettre en œuvre ce pattern sans trop galérer, et ce dès votre retour au bureau !
This document discusses Java input/output (IO) streams and serialization. It covers reading and writing text and binary files using classes like FileReader, FileWriter, ObjectInputStream and ObjectOutputStream. It also discusses reading from the keyboard, reading file attributes, serialization which converts an object to bytes, deserialization which converts bytes to an object, and using the Externalizable interface to customize serialization. The goal is to provide an overview of performing IO operations and serialization in Java.
Celery is a distributed task queue that allows long-running processes to be executed asynchronously outside of the main request-response cycle. It uses message brokers like RabbitMQ to distribute jobs to worker nodes for processing. This improves request performance and allows tasks to be distributed across multiple machines. Common use cases include asynchronous tasks like email sending, long database operations, image/video processing, and external API calls.
The document discusses principles of clean code, beginning with definitions of clean code from various authors. It outlines key principles like the single responsibility principle and open/closed principle. It then covers sections on meaningful naming, functions, and classes. For functions, it recommends they be small, do one thing, avoid flag arguments, and have no side effects. For classes, it advocates for small size, encapsulation, high cohesion and low coupling following the single responsibility principle.
The document discusses the MyBatis configuration XML file, which contains settings that affect how MyBatis behaves. The configuration includes properties, settings, type aliases, type handlers, object factories, plugins, environments (transaction managers and data sources), and mappers. It describes each of these sections in detail, covering things like how properties can be substituted dynamically, the different type aliases, plugins that can be used to intercept method calls, the different transaction managers and data source types (unpooled, pooled, JNDI), and how mappers are defined to connect SQL statements to Java methods.
This document discusses techniques for working with legacy code, including sprout method, wrap method, and wrap class. Sprout method involves extracting part of an existing method into a new method. Wrap method surrounds an existing method with new code. Wrap class creates a new class that delegates to the original class, allowing new behavior to be added. The techniques allow new functionality to be added to legacy code in a way that does not disrupt existing behavior and allows the new code to be tested independently.
Paulo Morgado presented an overview of new features in C# 6.0. Some key points:
- The .NET Compiler Platform ("Roslyn") reimplements the C# and VB compilers in C# with public APIs.
- New C# 6.0 features include auto-property initializers, primary constructors, string interpolation, null propagation, expression-bodied members, and await in catch/finally blocks.
- Many features are still being implemented or considered for inclusion in C# 6.0 based on the April 2014 preview release.
- The presentation demonstrated examples of the new C# 6.0 language features and their syntax. Attendees were encouraged to try
The document provides an overview and summary of key features of C# classes, including:
- Class declaration syntax and default access levels
- Constructors and initializing fields
- Static and readonly fields
- Value and reference parameters
- Arrays as reference types that can be initialized with shorthand syntax
It also briefly discusses the System.Array base class and how to safely access elements in multi-dimensional arrays.
The document summarizes new features that have been added to C# programming language over different versions of Visual Studio. It discusses features such as generics, lambda expressions, LINQ, tuples, pattern matching, exception filters, auto-property initializers, expression-bodied members and more. It also provides code examples to illustrate some of these features like tuples, deconstruction, pattern matching with case statements, async Main method and others.
This document provides an overview of Metro style apps and the C++ language features for building them. It compares the architecture and frameworks of Metro style apps to desktop apps. It then summarizes key C++ language features for Metro style development including reference types, memory management, pointers, events, generics and libraries. The document promotes C++ for building high performance Metro style apps and provides examples of key language concepts.
The document discusses the key ideas and features of the C# programming language. It covers C# being the first component-oriented language in the C/C++ family, that everything in C# is an object, and that C# enables robust and durable software while preserving investments in existing code and technologies. It provides examples of core C# concepts like classes, interfaces, properties, events, generics, operator overloading, and more.
1. The document discusses the evolution of the C# programming language from versions 1.0 through 4.0, highlighting new features introduced in each version such as generics, LINQ, dynamic programming, and covariance/contravariance.
2. It provides code examples to illustrate key concepts like generics, LINQ queries, dynamic binding, and how covariance/contravariance enables safer usage of generics.
3. The last section summarizes some of the main features introduced in each C# version from managed code to generics to dynamic programming.
The document discusses various concepts related to abstraction in software development including project architecture, code refactoring, enumerations, and the static keyword in Java. It describes how to split code into logical parts using methods and classes to improve readability, reuse code, and avoid repetition. Refactoring techniques like extracting methods and classes are presented to restructure code without changing behavior. Enumerations are covered as a way to represent numeric values from a fixed set as text. The static keyword is explained for use with classes, variables, methods, and blocks to belong to the class rather than object instances.
All you need to know about JS functions. talk was given by Oluwaleke Fakorede in JavaScript Ife Meetup.
Contains ways to declare javascript functions
methods in JavaScript.
This document discusses optimizing C# code for speed, maintainability, and flexibility. It provides tips for using profilers to optimize for speed, establishing coding standards to improve maintainability, and refactoring code. Exceptions, allocation in loops, string concatenation, and validating enum values are discussed as examples of code that could be optimized. Guidelines are provided around using exceptions, GC.Collect, and designing enums.
A brief overview about how to write human readable and meaningful code. Here is described why and how to write meaningful names of variables or method, what to follow about writing a function for SRP / Open-Closed principle rule, when to write comments and rules of Code Formatting. Advantages of clean code is also described here.
C# is a component-oriented language that introduces object-oriented improvements to the C/C++ family of languages. Everything in C# is an object, providing a unified type system without performance costs. C# aims to produce robust, durable software using techniques like garbage collection and exceptions, while preserving investments in existing C/C++ code through interoperability. The document provides an overview of key C# concepts like classes, interfaces, attributes, and events to illustrate how C# supports component-based development.
Introduction to Csharp (C-Sharp) is a programming language developed by Micro...NALESVPMEngg
The document provides an introduction to the C# programming language. It discusses some of the key ideas and concepts of C# including that it is a component-oriented language where everything is an object. It aims to provide robust and durable software through features like garbage collection, exceptions, and type safety. C# also aims to preserve investments in existing code through interoperability and allowing C++ constructs. The document then provides examples and explanations of various C# language features like classes, structs, interfaces, properties, events, and attributes.
The document provides an introduction to the C# programming language. It discusses some of the key ideas and concepts of C# including that it is a component-oriented language where everything is an object. It aims to provide robust and durable software through features like garbage collection, exceptions, and type safety. C# also aims to preserve investments in existing code through interoperability and allowing C++ constructs. The document then provides examples and explanations of various C# language features like classes, structs, interfaces, properties, events, and attributes.
C# is a component-oriented language that introduces object-oriented improvements to the C/C++ family of languages. Everything in C# is an object, providing a unified type system without performance costs. C# aims to produce robust, durable software using techniques like garbage collection and exceptions, while preserving investments in existing C/C++ code through interoperability. The document provides an overview of key C# concepts like classes, interfaces, attributes, events, operators and more.
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.
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
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfAbi john
Analyze the growth of meme coins from mere online jokes to potential assets in the digital economy. Explore the community, culture, and utility as they elevate themselves to a new era in cryptocurrency.
Dev Dives: Automate and orchestrate your processes with UiPath MaestroUiPathCommunity
This session is designed to equip developers with the skills needed to build mission-critical, end-to-end processes that seamlessly orchestrate agents, people, and robots.
📕 Here's what you can expect:
- Modeling: Build end-to-end processes using BPMN.
- Implementing: Integrate agentic tasks, RPA, APIs, and advanced decisioning into processes.
- Operating: Control process instances with rewind, replay, pause, and stop functions.
- Monitoring: Use dashboards and embedded analytics for real-time insights into process instances.
This webinar is a must-attend for developers looking to enhance their agentic automation skills and orchestrate robust, mission-critical processes.
👨🏫 Speaker:
Andrei Vintila, Principal Product Manager @UiPath
This session streamed live on April 29, 2025, 16:00 CET.
Check out all our upcoming Dev Dives sessions at https://community.uipath.com/dev-dives-automation-developer-2025/.
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc
Most consumers believe they’re making informed decisions about their personal data—adjusting privacy settings, blocking trackers, and opting out where they can. However, our new research reveals that while awareness is high, taking meaningful action is still lacking. On the corporate side, many organizations report strong policies for managing third-party data and consumer consent yet fall short when it comes to consistency, accountability and transparency.
This session will explore the research findings from TrustArc’s Privacy Pulse Survey, examining consumer attitudes toward personal data collection and practical suggestions for corporate practices around purchasing third-party data.
Attendees will learn:
- Consumer awareness around data brokers and what consumers are doing to limit data collection
- How businesses assess third-party vendors and their consent management operations
- Where business preparedness needs improvement
- What these trends mean for the future of privacy governance and public trust
This discussion is essential for privacy, risk, and compliance professionals who want to ground their strategies in current data and prepare for what’s next in the privacy landscape.
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersToradex
Toradex brings robust Linux support to SMARC (Smart Mobility Architecture), ensuring high performance and long-term reliability for embedded applications. Here’s how:
• Optimized Torizon OS & Yocto Support – Toradex provides Torizon OS, a Debian-based easy-to-use platform, and Yocto BSPs for customized Linux images on SMARC modules.
• Seamless Integration with i.MX 8M Plus and i.MX 95 – Toradex SMARC solutions leverage NXP’s i.MX 8 M Plus and i.MX 95 SoCs, delivering power efficiency and AI-ready performance.
• Secure and Reliable – With Secure Boot, over-the-air (OTA) updates, and LTS kernel support, Toradex ensures industrial-grade security and longevity.
• Containerized Workflows for AI & IoT – Support for Docker, ROS, and real-time Linux enables scalable AI, ML, and IoT applications.
• Strong Ecosystem & Developer Support – Toradex offers comprehensive documentation, developer tools, and dedicated support, accelerating time-to-market.
With Toradex’s Linux support for SMARC, developers get a scalable, secure, and high-performance solution for industrial, medical, and AI-driven applications.
Do you have a specific project or application in mind where you're considering SMARC? We can help with Free Compatibility Check and help you with quick time-to-market
For more information: https://www.toradex.com/computer-on-modules/smarc-arm-family
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxJustin Reock
Building 10x Organizations with Modern Productivity Metrics
10x developers may be a myth, but 10x organizations are very real, as proven by the influential study performed in the 1980s, ‘The Coding War Games.’
Right now, here in early 2025, we seem to be experiencing YAPP (Yet Another Productivity Philosophy), and that philosophy is converging on developer experience. It seems that with every new method we invent for the delivery of products, whether physical or virtual, we reinvent productivity philosophies to go alongside them.
But which of these approaches actually work? DORA? SPACE? DevEx? What should we invest in and create urgency behind today, so that we don’t find ourselves having the same discussion again in a decade?
AI and Data Privacy in 2025: Global TrendsInData Labs
In this infographic, we explore how businesses can implement effective governance frameworks to address AI data privacy. Understanding it is crucial for developing effective strategies that ensure compliance, safeguard customer trust, and leverage AI responsibly. Equip yourself with insights that can drive informed decision-making and position your organization for success in the future of data privacy.
This infographic contains:
-AI and data privacy: Key findings
-Statistics on AI data privacy in the today’s world
-Tips on how to overcome data privacy challenges
-Benefits of AI data security investments.
Keep up-to-date on how AI is reshaping privacy standards and what this entails for both individuals and organizations.
Artificial Intelligence is providing benefits in many areas of work within the heritage sector, from image analysis, to ideas generation, and new research tools. However, it is more critical than ever for people, with analogue intelligence, to ensure the integrity and ethical use of AI. Including real people can improve the use of AI by identifying potential biases, cross-checking results, refining workflows, and providing contextual relevance to AI-driven results.
News about the impact of AI often paints a rosy picture. In practice, there are many potential pitfalls. This presentation discusses these issues and looks at the role of analogue intelligence and analogue interfaces in providing the best results to our audiences. How do we deal with factually incorrect results? How do we get content generated that better reflects the diversity of our communities? What roles are there for physical, in-person experiences in the digital world?
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.
Role of Data Annotation Services in AI-Powered ManufacturingAndrew Leo
From predictive maintenance to robotic automation, AI is driving the future of manufacturing. But without high-quality annotated data, even the smartest models fall short.
Discover how data annotation services are powering accuracy, safety, and efficiency in AI-driven manufacturing systems.
Precision in data labeling = Precision on the production floor.
This is the keynote of the Into the Box conference, highlighting the release of the BoxLang JVM language, its key enhancements, and its vision for the future.
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.
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.
Linux Professional Institute LPIC-1 Exam.pdfRHCSA Guru
Ad
Practices For Becoming A Better Programmer
1. Practices for becoming a better programmer Srikanth P Shreenivas [email_address] http://www.srikanthps.com
2. Joys of the craft The Mythical Man-Month, Frederick P. Brooks. Jr Slide Why is programming fun? What delights may its practitioner expect as reward? First is the sheer joy of making things. Second is pleasure of making things that are useful to other people. Third is the fascination of fashioning complex puzzle-like objects of interlocking moving parts and watching them work in subtle cycles, playing out the consequences of principles built in the beginning. The programmed computer has all the effects of a pinball machine or jukebox mechanism, carried to the ultimate. Fourth is the joy of always learning, which springs from non-repeating nature of the task. Finally, there is the delight of working in such a tractable medium. The programmer, like the poet, works only slightly removed from pure thought-stuff. He builds his castles in the air, from the air, creating by exertion of imagination. Programming gratifies creative longings built deep within us
3. Values of Programming Implementation Patterns, Kent Beck Communication Simplicity Flexibility Slide
5. Use Meaningful Names int d; //elapsed time in days int elapsedTimeInDays; int fileAgeInDays; int daysSinceLastModification; Intention-revealing names
9. Meaningful names Slide int r = 0; for (int j = 0; j < 5; j++) { r = r + j * 8; } Use searchable names int workingDaysInWeek = 5; int workingHoursPerDay = 8; int hoursInWeek = 0; for (int dayIndex = 0; dayIndex < workingDaysInWeek ; dayIndex ++) { hoursInWeek = hoursInWeek + dayIndex * workingHoursPerDay; }
10. Meaningful names Slide Class names Should be nouns or noun phrases. Examples: Car, Account, DataRetrievalService, AddressParser
11. Meaningful names Slide Method names Should be verb or verbPhrases Examples: parseData , deletePage , save Methods that return boolean values should sound like question. Example: isAuthenticated , hasNoErrors , isEmpty if (user.isAuthenticated()) { String data = parseData(input); if (hasErrors(data)) { throw ErrorInDataException(); } }
12. Meaningful names Slide Pick one word per concept Don’t mix words like “fetch”, “get”, “retrieve”. Be consistent.
13. Meaningful names Slide Don’t use same word for two different concepts Example: Don’t use “add”, where “insert” makes sense.
14. Meaningful names Slide Use names from problem/solution domain Prefer “InvoiceGenerator” to “DataExtractor”
16. Turning Comments into Code Slide class InchToPointConvertor { //convert the quantity in inches to points. static float parseInch(float inch) { return inch * 72; //one inch contains 72 points. } } class InchToPointConvertor { final static int POINTS_PER_INCH=72; static float convertToPoints (float inch) { return inch * POINTS_PER_INCH ; } }
17. Turning Comments into Code Slide class Account { ... //check if the password is complex enough, i.e., //contains letter and digit/symbol. boolean isComplexPassword(String password) { //found a digit or symbol? boolean dg_sym_found=false; //found a letter? boolean letter_found=false; for(int i=0; i<password.length(); i++){ char c=password.charAt(i); if(Character.isLowerCase(c)||Character.isUpperCase(c)) letter_found=true; else dg_sym_found=true; } return (letter_found) && (dg_sym_found); } } class Account { ... boolean isComplexPassword(String password){ return containsLetter(password) && (containsDigit(password) || containsSymbol(password)); } boolean containsLetter(String password) { ... } boolean containsDigit(String password) { ... } boolean containsSymbol(String password) { ... } }
18. Turning comments into code Slide Are we writing comments because our code is unclear? Will you keep the comments up-to-date whenever code is updated? What’s wrong with Comments? Nothing wrong with comments. They are not bad. Why avoid comments? Unclear code with outdated comments. You don’t want: Try to convert comments into code that bring out the intent of the code, and use comments sparingly.
20. Functions Slide Write small functions … .and try to write even smaller functions. Aim for functions that are not longer than 4 to 5 lines. Split the big methods in smaller methods (Extract method) Use intention-revealing names for methods. Public List<Person> filterList(List<Person> input) { List filteredList = new ArrayList(); for (Person p : input) { if (p.getDateOfBirth().getYear() > 1997) { filteredList.add(p); } if (p.getAddress().getCity().equals(“Bangalore”)) { filteredList.add(p); } } return filterdList; } Public List<Person> selectTeenAgersFromBangalore (List<Person> input) { List filteredList = new ArrayList(); for (Person p : input) { if (isTeenAger(p) || isFromBangalore(p)) { filteredList.add(p); } } return filterdList; }
21. Functions Slide Do one thing in a function (Single responsibility) Public List<Person> filterList(List<Person> input) { List filteredList = new ArrayList(); for (Person p : input) { if (p.getDateOfBirth().getYear() > 1997) { filteredList.add(p); } if (p.getAddress().getCity().equals(“Bangalore”)) { filteredList.add(p); } } return filterdList; } Public List<Person> selectTeenAgersFromBangalore (List<Person> input) { List filteredList = new ArrayList(); for (Person p : input) { if (isTeenAger(p) && isFromBangalore(p)) { filteredList.add(p); } } return filterdList; } Filtering logic moved out
22. Functions Slide All statements should be at same level of abstraction. Employee employee = employeeRepository.get(“m100XXXX”); employee.getSalaryDetails().setBasic( employee.getSalaryDetails().getBasic () * 1.10); employeeRepository.save(employee); Employee employee = employeeRepository.get(“m100XXXX”); raiseSalary(empoyee, “10%”); employeeRepository.save(employee); Functions should be read like top-down narrative. Every function should be followed by functions of next level of abstraction.
23. Functions Slide Have no side effects. Public boolean checkPassword(String userName, String password) { User user = userService.getUser(userName); if (user.password.equals(password)) { Session.initalize(); return true; } return false; }
24. Functions Slide Command query separation. Public boolean set(String attribute, String value) { … . } if (set(“color”, “red”)) { … . } if (attributeExists(“color”)) { }
26. Functions Slide Format your code. Use IDE supported code formatting tools. Configure IDE to support team-specific alignment rules. opening brace “{“ should be on the same line as the statement. use space after keywords if (someCondtion) use space to separate method arguments doSomething( param1, param2, param3 ); indent each scope by 4 spaces Ctrl+Shift+F in Eclipse
28. Code which started well… Slide public class BookRental { String id; String customerName; ... } public class BookRentals { private Vector rentals; public String getCustomerName(String rentalId) { for (int i = 0; i < rentals.size(); i++) { BookRental rental = (BookRental) rentals.elementAt(i); if (rental.getId().equals(rentalId)) { return rental.getCustomerName(); } } throw new RentalNotFoundException(); } } public class RentalNotFoundException extends Exception { ... } Book Rentals Applications: Maintains a list of books rented to customers. New requirement: Add a method to delete rental given its id.
29. Code updated for new requirement… Slide public class BookRental { String id; String customerName; ... } public class BookRentals { private Vector rentals; public String getCustomerName(String rentalId) { for (int i = 0; i < rentals.size(); i++) { BookRental rental = (BookRental) rentals.elementAt(i); if (rental.getId().equals(rentalId)) { return rental.getCustomerName(); } } throw new RentalNotFoundException(); } public void deleteRental(String rentalId) { for (int i = 0; i < rentals.size(); i++) { BookRental rental = (BookRental) rentals.elementAt(i); if (rental.getId().equals(rentalId)) { rentals.remove(i); return; } } throw new RentalNotFoundException(); } } public class RentalNotFoundException extends Exception { ... } Duplicate Code
30. Duplicate code should be avoided Slide What’s wrong with duplicate code? If there is a bug in the code or code requires changes, then, one has to change it at multiple places. This is error-prone. public class BookRentals { private Vector rentals; public String getCustomerName(String rentalId) { int rentalIdx = getRentalIdxById(rentalId); return ((BookRental) rentals.elementAt(rentalIdx)).getCustomerName(); } public void deleteRental(String rentalId) { rentals.remove(getRentalIdxById(rentalId)); } private int getRentalIdxById(String rentalId) { for (int i = 0; i < rentals.size(); i++) { BookRental rental = (BookRental) rentals.elementAt(i); if (rental.getId().equals(rentalId)) { return i; } } throw new RentalNotFoundException(); } }
31. Removing duplicate code Slide Point out and remove duplicate code class Organization { String id; String eName; //English name String cName; //Chinese name String telCountryCode; String telAreaCode; String telLocalNumber; String faxCountryCode; String faxAreaCode; String faxLocalNumber; String contactPersonEFirstName; //First name and last name in English String contactPersonELastName; String contactPersonCFirstName; //First name and last name in Chinese String contactPersonCLastName; String contactPersonTelCountryCode; String contactPersonTelAreaCode; String contactPersonTelNumber; String contactPersonFaxCountryCode; String contactPersonFaxAreaCode; String contactPersonFaxLocalNumber; String contactPersonMobileCountryCode; String contactPersonMobileAreaCode; String contactPersonMobileLocalNumber; ... } Organization’s and Person’s Telephone number format is same Organization’s and Person’s names are stored in English and Chinese.
34. Code Smells Duplicate code Switch statements Long method Large class Long parameter list Temporary field Etc. Slide “ If it stinks, change it.”
35. How to remove a long if-then-else-if Slide class Shape { } class Line extends Shape { Point startPoint; Point endPoint; } class Rectangle extends Shape { Point lowerLeftCorner; Point upperRightCorner; } class Circle extends Shape { Point center; int radius; } class CADApp { void drawShapes(Graphics graphics, Shape shapes[]) { for (int i = 0; i < shapes.length; i++) { if (shapes[i] instanceof Line) { Line line = (Line)shapes[i]; graphics.drawLine(line.getStartPoint(),line.getEndPoint()); } else if (shapes[i] instanceof Rectangle) { Rectangle rect = (Rectangle)shapes[i]; graphics.drawLine(...); graphics.drawLine(...); graphics.drawLine(...); graphics.drawLine(...); } else if (shapes[i] instanceof Circle) { Circle circle = (Circle)shapes[i]; graphics.drawCircle(circle.getCenter(), circle.getRadius()); } } } }
36. How to remove a long if-then-else-if Slide class CADApp { void drawShapes(Graphics graphics, Shape shapes[]) { for (int i = 0; i < shapes.length; i++) { if (shapes[i] instanceof Line) { draw the line } else if (shapes[i] instanceof Rectangle) { draw the rectangle } else if (shapes[i] instanceof Circle) { draw the circle } } } } To remove long if-else conditions, try to make the code identical in each of the if else blocks class CADApp { void drawShapes(Graphics graphics, Shape shapes[]) { for (int i = 0; i < shapes.length; i++) { if (shapes[i] instanceof Line) { draw the shape } else if (shapes[i] instanceof Rectangle) { draw the shape } else if (shapes[i] instanceof Circle) { draw the shape } } } } class CADApp { void drawShapes(Graphics graphics, Shape shapes[]) { for (int i = 0; i < shapes.length; i++) { draw the shape } } } class CADApp { void drawShapes(Graphics graphics, Shape shapes[]) { for (int i = 0; i < shapes.length; i++) { shapes[i].draw(graphics); } } }
37. How to remove a long if-then-else-if Slide abstract class Shape { abstract void draw(Graphics graphics); } class Line extends Shape { Point startPoint; Point endPoint; void draw(Graphics graphics) { graphics.drawLine(getStartPoint(), getEndPoint()); } } class Rectangle extends Shape { Point lowerLeftCorner; Point upperRightCorner; void draw(Graphics graphics) { graphics.drawLine(...); graphics.drawLine(...); graphics.drawLine(...); graphics.drawLine(...); } } class Circle extends Shape { Point center; int radius; void draw(Graphics graphics) { graphics.drawCircle(getCenter(), getRadius()); } } interface Shape { abstract void draw(Graphics graphics); } class Line implements Shape { … } class Rectangle implements Shape { … } class Circle implements Shape { … }
38. Improved Code Slide interface Shape { void draw(Graphics graphics); } class Line implements Shape { Point startPoint; Point endPoint; void draw(Graphics graphics) { graphics.drawLine(getStartPoint(), getEndPoint()); } } class Rectangle implements Shape { Point lowerLeftCorner; Point upperRightCorner; void draw(Graphics graphics) { graphics.drawLine(...); graphics.drawLine(...); graphics.drawLine(...); graphics.drawLine(...); } } class Circle implements Shape { Point center; int radius; void draw(Graphics graphics) { graphics.drawCircle(getCenter(), getRadius()); } } class CADApp { void drawShapes(Graphics graphics, Shape shapes[]) { for ( int i = 0; i < shapes.length; i++) { shapes[i].draw(graphics); } } } If we need to support one more shape (e.g., triangle), none of classes needs to change. All it takes is to create a new Triangle class.
39. Another Example There are three types of users: regular users,administrators and guests. Regular users must change their password once every 90 days (or sooner). Administrators must change their password once every 30 days. Guests don't need to change passwords. Only regular users and administrators can print reports. Slide
40. Original code Slide class UserAccount { final static int USERTYPE_NORMAL = 0; final static int USERTYPE_ADMIN = 1; final static int USERTYPE_GUEST = 2; int userType; String id; String name; String password; Date dateOfLastPasswdChange; public boolean checkPassword(String password) { ... } } class InventoryApp { int getPasswordMaxAgeInDays(UserAccount account) { switch (account.getType()) { case UserAccount.USERTYPE_NORMAL: return 90; case UserAccount.USERTYPE_ADMIN: return 30; case UserAccount.USERTYPE_GUEST: return Integer.MAX_VALUE; } } void printReport(UserAccount currentUser) { boolean canPrint; switch (currentUser.getType()) { case UserAccount.USERTYPE_NORMAL: canPrint = true; break; case UserAccount.USERTYPE_ADMIN: canPrint = true; break; case UserAccount.USERTYPE_GUEST: canPrint = false; } if (!canPrint) { throw new SecurityException("You have no right"); } //print the report. } } Issue is same as long if-then-else!
41. Use subclass to represent type code value Slide abstract class UserAccount { String id; String name; String password; Date dateOfLastPasswdChange; abstract int getPasswordMaxAgeInDays(); abstract boolean canPrintReport(); } class NormalUserAccount extends UserAccount { int getPasswordMaxAgeInDays() { return 90; } boolean canPrintReport() { return true; } } class AdminUserAccount extends UserAccount { int getPasswordMaxAgeInDays() { return 30; } boolean canPrintReport() { return true; } } class GuestUserAccount extends UserAccount { int getPasswordMaxAgeInDays() { return Integer.MAX_VALUE; } boolean canPrintReport() { return false; } } Subclasses differ in values they return.
42. Use an object to represent a type code value Slide class UserAccount { UserType userType; String id; String name; String password; Date dateOfLastPasswdChange; UserType getType() { return userType; } } class UserType { int passwordMaxAgeInDays; boolean allowedToPrintReport; UserType(int passwordMaxAgeInDays, boolean allowedToPrintReport) { this.passwordMaxAgeInDays = passwordMaxAgeInDays; this.allowedToPrintReport = allowedToPrintReport; } int getPasswordMaxAgeInDays() { return passwordMaxAgeInDays; } boolean canPrintReport() { return allowedToPrintReport; } static UserType normalUserType = new UserType(90, true); static UserType adminUserType = new UserType(30, true); static UserType guestUserType = new UserType(Integer.MAX_VALUE, false); } int getPasswordMaxAgeInDays(UserAccount account) { return account.getType().getPasswordMaxAgeInDays(); } void printReport(UserAccount currentUser) { boolean canPrint; canPrint = currentUser.getType().canPrintReport(); if (!canPrint) { throw new SecurityException("You have no right"); } //print the report. }
44. Apply the basic concepts Slide Goal of OOAD: Identify the classes and relations between them for a given problem. Read the problem statement carefully and identify: Nouns (Classes) Verbs (Behavior) Actors (Users) Identify relationships between classes Is-A (Generalization / Inheritance) Has-A (Composition) Uses (Dependency)
45. Example Slide A basket contains oranges and apples. Basket Apple Orange Fruits have cost Basket Apple Orange Fruit 1 * * int Price; 1 * Generalize to accommodate new requirements.
46. Example continued… Slide A user has password. Password can be encrypted and decrypted. User Password public String encrypt(); public String decrypt(); 1 1 String userid; Password is encrypted using a encryption service. User Password public String encrypt(); public String decrypt(); 1 1 String userid; EncryptionService public String encrypt(String); public String decrypt(String);
47. Single responsibility principle Slide Class should have one and only one reason to change. Rectangle public draw() public area() Two responsibilities: Mathematical model of the geometry of rectangle Render rectangle to a graphical user interface. Rectangle Point topLeftCorner Point bottomRightCorner G eometric Rectangle public area()
48. Law of demeter Principle of least knowledge Slide Module should not know internal details of objects it manipulates. A method M of an object O may only invoke the methods of the following kinds of objects: O itself M' s parameters any objects created/instantiated within M O' s instance variables Class PaperBoy { void collectPaymetents() { float payment = 2.0; float fundsCollected = 0.0; for (Customer customer : customerList) { float moneyInWallet = customer.getWallet().getMoney(); if (moneyInWallet >= payment) { customer.getWallet.setMoney(moneyInWallet – payment); fundsCollected += payment; } } } } Class PaperBoy { void collectPaymetents() { float payment = 2.0; float fundsCollected = 0.0; for (Customer customer : customerList) { try { fundsCollected += customer.makePayment(payment); } catch (NotEnoughMoneyComeLaterException e) { } } }
49. Make good use of polymorphism Slide In object oriented languages, power of polymorphism comes from Liskov’s substitution principle . “ A subclass can be used as an argument where a base class is expected” Class Mechanic { public void repair (Car car) { } } class HyundaiCar implements Car { } class MarutiCar implements Car { } class HyundaiSantro extends HyundaiCar { } HyundaiCar faultyHyundai = new HyundaiCar(); mechanic.repair (faultyHyunai); MarutiCar faultyMaruti = new MarutiCar(); mechanic.repair(faultyMaruti);
50. Program to interface, and put polymorphism to better use Slide Class Driver { public void drive (Car car) { } public void drive (Truck truck) { } } Class Driver { public void drive (Vehicle vehicle) { } }
51. Open-closed principle Slide if ( isGoingToMovie() ) { Vehicle vehicle = new Car(); driver.drive (vehicle ) } else ( ifRelocatingToNewHome () ) { Vehicle vehicle = new Truck(); driver.drive (vehicle ); } Vehicle vehicle = getVehicle(conditions); driver.drive (vehicle ); Class should be open for extension, but closed for modification.
53. Problem You can order a cup of coffee. A cup of coffee costs Rs. 10. You can add many ingredients to it, say, chocolate chips, extra cream, Ice cream, etc. Each ingredients has its own cost. Slide
54. Traditional testing public static void main() { Coffee c = new Coffee(); c.add(new ExtraCream()); c.add(new ChocolateChip()); long cost = c.getCost(); system.out.println(“Pay : Rs.” + cost); } Slide Issue: Requires a human to confirm the value printed on console.
55. JUnit style of testing public class coffeeTest extends TestCase { public testCompuatationOfCoffeeCost() { Coffee c = new Coffee(); c.add(new ExtraCream()); c.add(new ChocolateChip()); long cost = c.getCost(); assertTrue(cost > 0); assetEquals(cost, Coffee.COST + ExtraCream.COST + ChocolateChip.COST); } } Slide Instant feedback (GUI ): Green Bar indicates success, a red bar indicates failure.
56. Test Driven Development Cycle Add a test Run all tests and see the new one fail. Write some code. Run the automated tests and see them succeed. Refactor code Repeat http://en.wikipedia.org/wiki/Test-driven_development Slide
58. Don’t live with broken windows The pragmatic programmer by Andrew Hunt, David Thomas Slide http://en.wikipedia.org/wiki/Fixing_Broken_Windows "Consider a building with a few broken windows. If the windows are not repaired, the tendency is for vandals to break a few more windows. Eventually, they may even break into the building, and if it's unoccupied, perhaps become squatters or light fires inside. Or consider a sidewalk. Some litter accumulates. Soon, more litter accumulates. Eventually, people even start leaving bags of trash from take-out restaurants there or breaking into cars." Psychology or culture at work is one of the factors that contribute to bad code. So, try to clean up every time you see a messy code. Broken Windows = Bad Design, Wrong decisions, Poor code
59. Knowledge Portfolio The pragmatic programmer by Andrew Hunt, David Thomas Slide An investment in knowledge always pays the best interest Benjamin Franklin, One of the Founding Fathers of the United States of America Invest regularly Diversify Manage risk Buy low, sell high Review and re-balance Learn at least one new language every year. Read a technical book each quarter. Read non-technical books too. Take classes. Participate in local user groups. Experiment with different environments. Stay current. Get wired. Building investment portfolio Building knowledge portfolio
60. Write programs for fellow humans Slide Any damn fool can write code that a computer can understand, the trick is to write code that humans can understand. Martin Fowler, Author of book “Refactoring” http://martinfowler.com/distributedComputing/refactoring.pdf
61. Books for someone aspiring to become a great (Java) programmer Slide
62. Books for someone aspiring to become a great (Java) programmer Slide Free PDF available online ( http://www.agileskills.org/download.html.en ) Some examples in these slides are from this book Some examples in these slides are from this book
63. Find a role model and follow them …read about what they are working on, what they consider exciting. Slide Rod Johnson, Founder of Spring Framework Douglas Crockford, Yahoo JavaScript Architect Yukihiro “Matz” Matsumoto , Creator of “Ruby” language David Heinemeier Hansson Creator of “Ruby on RAILS” framework Gavin King Creation of “Hibernate” Framework
64. Copyright notice For more information see http://creativecommons.org/licenses/by/3.0/