In this talk that I gave at RailsWayCon I talk about practices that help to maintain readable, fast and simple test. I also show some examples where hard tests point to design issues. In the last part i introduced some tool that may help to maintain a good test suite.
For a presentation given to the Angular DC Meetup on 3/19/14. (http://www.meetup.com/AngularJS-DC/events/169813802/) Part 2 of the "Angular from Scratch" series. Find part one at http://christianlilley.wordpress.com/2013/11/15/angular-from-scratch-slides-from-angularjs-meetup-dc/ . Find the accompanying demonstration files at https://github.com/xmlilley/ng-demos.
Fixing Magento Core for Better Performance - Ivan ChepurnyiMeet Magento Spain
The performance optimization of Magento webshop, it is not only writing your module in the clean way, it is also optimization of core code.
During the session, you will learn how to deal with optimization of most common Magento bottlenecks at catalog, shopping cart and checkout pages.
Processing more than 10 orders per second, serving category, product and checkout pages within 800 milliseconds (and even less) without front cache is possible.
This was a presentation slides for a webapp building workshop held at iCentre, Brunei. Learn how to build a simple web application with HTML, CSS and Javascript.
For a presentation given to the Angular DC Meetup on 3/19/14. (http://www.meetup.com/AngularJS-DC/events/169813802/) Part 2 of the "Angular from Scratch" series. Find part one at http://christianlilley.wordpress.com/2013/11/15/angular-from-scratch-slides-from-angularjs-meetup-dc/ . Find the accompanying demonstration files at https://github.com/xmlilley/ng-demos.
Fixing Magento Core for Better Performance - Ivan ChepurnyiMeet Magento Spain
The performance optimization of Magento webshop, it is not only writing your module in the clean way, it is also optimization of core code.
During the session, you will learn how to deal with optimization of most common Magento bottlenecks at catalog, shopping cart and checkout pages.
Processing more than 10 orders per second, serving category, product and checkout pages within 800 milliseconds (and even less) without front cache is possible.
This was a presentation slides for a webapp building workshop held at iCentre, Brunei. Learn how to build a simple web application with HTML, CSS and Javascript.
Hibernate Performance Tuning, presented on JEEConf 2012, Kiev, Ukraine.
Also see: http://branchandbound.net/blog/conferences/2012/05/jeeconf-tripreport/
Adaptation of presentation at http://www.slideshare.net/SanderMak/hibernate-performance-tuning
Deployments are one of the most important parts of any project. Yet in my experience deploying is one of the most dreaded parts of a project. Early starts, Rollbacks stress and joy. However deploying should not be like this. Continuous delivery and deployments are nothing new but they do take a shift in how we think as developers both from the infrastructure aspect and revisions in code. During this talk I will take you through my journey of continuous delivery with E-Commerce applications where we deploy several times a day, use feature toggles to hide functionality and how we handle git in an ever deployable environment.
This talk will take you through a history of how I previously handled PHP deployments highlighting the areas I wanted improving, Speed to deploy, Ease of deployment, Experimentation and agility. We will then learn more about CD with feature branching and feature toggles and what the infrastructure looks like for PHP projects wanting to take advantage of this. My hope is that people will leave the room with enough knowledge to explore there own deployment process and how they can leverage parts of CD to aid in there workflow.
This fast-paced presentation is for the medium-level and higher LotusScript programmer who wants bite-sized lessons from the field. It's presented in three categories, covering tips you should be using, tips you should know, and finally tips that you should be aware of.
This presentation was also used for the speedgeeking session. I had to give a 60 minute presentation in 4.5 minutes, 12 times. I managed to complete it once, and averaged getting throught 22 tips. The fun thing about speedgeeking is that it does force you to think how you can compress down a presentation, and make each word fight for survival..
Rails, Postgres, Angular, and Bootstrap: The Power StackDavid Copeland
Rails, Postgres, Angular, and Bootstrap are all powerful technologies in and of themselves. When used together, however, you get a powerful web application development stack that reduces friction between what you want for your users and what you can deliver.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Hibernate Performance Tuning, presented on JEEConf 2012, Kiev, Ukraine.
Also see: http://branchandbound.net/blog/conferences/2012/05/jeeconf-tripreport/
Adaptation of presentation at http://www.slideshare.net/SanderMak/hibernate-performance-tuning
Deployments are one of the most important parts of any project. Yet in my experience deploying is one of the most dreaded parts of a project. Early starts, Rollbacks stress and joy. However deploying should not be like this. Continuous delivery and deployments are nothing new but they do take a shift in how we think as developers both from the infrastructure aspect and revisions in code. During this talk I will take you through my journey of continuous delivery with E-Commerce applications where we deploy several times a day, use feature toggles to hide functionality and how we handle git in an ever deployable environment.
This talk will take you through a history of how I previously handled PHP deployments highlighting the areas I wanted improving, Speed to deploy, Ease of deployment, Experimentation and agility. We will then learn more about CD with feature branching and feature toggles and what the infrastructure looks like for PHP projects wanting to take advantage of this. My hope is that people will leave the room with enough knowledge to explore there own deployment process and how they can leverage parts of CD to aid in there workflow.
This fast-paced presentation is for the medium-level and higher LotusScript programmer who wants bite-sized lessons from the field. It's presented in three categories, covering tips you should be using, tips you should know, and finally tips that you should be aware of.
This presentation was also used for the speedgeeking session. I had to give a 60 minute presentation in 4.5 minutes, 12 times. I managed to complete it once, and averaged getting throught 22 tips. The fun thing about speedgeeking is that it does force you to think how you can compress down a presentation, and make each word fight for survival..
Rails, Postgres, Angular, and Bootstrap: The Power StackDavid Copeland
Rails, Postgres, Angular, and Bootstrap are all powerful technologies in and of themselves. When used together, however, you get a powerful web application development stack that reduces friction between what you want for your users and what you can deliver.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
The field of Information retrieval (IR) is currently undergoing a transformative shift, at least partly due to the emerging applications of generative AI to information access. In this talk, we will deliberate on the sociotechnical implications of generative AI for information access. We will argue that there is both a critical necessity and an exciting opportunity for the IR community to re-center our research agendas on societal needs while dismantling the artificial separation between the work on fairness, accountability, transparency, and ethics in IR and the rest of IR research. Instead of adopting a reactionary strategy of trying to mitigate potential social harms from emerging technologies, the community should aim to proactively set the research agenda for the kinds of systems we should build inspired by diverse explicitly stated sociotechnical imaginaries. The sociotechnical imaginaries that underpin the design and development of information access technologies needs to be explicitly articulated, and we need to develop theories of change in context of these diverse perspectives. Our guiding future imaginaries must be informed by other academic fields, such as democratic theory and critical theory, and should be co-developed with social science scholars, legal scholars, civil rights and social justice activists, and artists, among others.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
I have heard many times that architecture is not important for the front-end. Also, many times I have seen how developers implement features on the front-end just following the standard rules for a framework and think that this is enough to successfully launch the project, and then the project fails. How to prevent this and what approach to choose? I have launched dozens of complex projects and during the talk we will analyze which approaches have worked for me and which have not.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Let's dive deeper into the world of ODC! Ricardo Alves (OutSystems) will join us to tell all about the new Data Fabric. After that, Sezen de Bruijn (OutSystems) will get into the details on how to best design a sturdy architecture within ODC.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
3. TESTING CONS
Write Extra Code
Interrupt the Flow
Add Complexity to our Codebase
More Maintenance
the negative effects are either blends or can be minimized
4. TESTING PROS
Think Double
Avoid Errors
Narrow Down Bugs
Prevent Regression
Improve Design
This is what I get out of TDD
5. Failing Scenarios:
cucumber features/currency_conversion.feature:129 # Scenario: Using the web-
service supplied exchange rate for XAU
cucumber features/statistics.feature:161 # Scenario: view statistics for completed
withdrawals
cucumber features/statistics.feature:189 # Scenario: view statistics for completed
deposits
cucumber features/transaction_confirmation.feature:6 # Scenario: Fund transactions
must be confirmed before the funding is added to the balance
In situations like this I ask myself the following questions
14. class Test{
//JMock & JUnit
public void testWithCategoryNameGetNameOfPostCategory(){
final Category category = context.mock(Category.class) //MockObjects
final Post post = context.mock(Post.class)
oneOf (post).name; will(returnValue('TestPost')); //Stub Methods
oneOf (post).category; will(returnValue(category))
context.checking(new Expectations() {{ //Mock
oneOf (category).name; will(returnValue('TestCat'))
}}
PostNamesWithCategoryLoader loader = new PostNamesWithCategoryLoader
context.assertIsSatisfied();
}
}
might be improved a little (anotations?)
15. # mocha
def test_show_gets_name_of_post_category
category = mock('category', :name => 'test') # mock, name must be called
post = stub('post', :category => category) #stub
Post.stubs(:find).returns(post) #partial stub for find
get :show
end
Ruby the better Language for Testing DSL
16. DOING TDD RIGHT IS HARD
How often do you swear at your breaking test?
How often does you feel that tests break your flow?
17. Simple
Fast
Maintainable
Durable
Side-effect Free
Repeatable
Thats what you want.
18. GUIDELINES NOT RULES
1. Part
I assume the basics like using setups, cleaning up
mostly unittests
20. THINK DOUBLE
What I want Presentation
Required Info Controller
How get these Info DomainModel
21. STORY
For customer information I want a listing of payment providers
and their logos. Their logo should be linked when I provide a
link. If their is no logo, show the link instead.
How many started to think of it as one problem to solve?
Split it up in separate problems.
22. REDUCE TO NO-BRAINER
LOGO URL
X X
X
X
Do this on complex problems and you will implement them easier, sometimes this will leave
you wondering.
23. BE EXPLICIT
it "should show the description for a payment provider" do
payme = PaymentProvider.new(description: 'Pay me')
payment_provider_listing(payme).should include(payme.description)
end
Not a good Idea.
24. BE EXPLICIT
it "should show the description for a payment provider" do
payme = PaymentProvider.new(description: 'Pay me')
payment_provider_listing(payme).should include('Pay me')
end
Be explicit.
25. 1 THING AT A TIME
payment_provider_listing(payme).should ==
'<a href="pay.me">PayMe</a>, Get Paid'
VS
payment_provider_listing(payme).should
include('<a href="pay.me">PayMe</a>')
That also relates to another problem
27. 1 THING AT A TIME
payment_provider_listing(payme).should ==
'<a href="pay.me">PayMe</a>, Get Paid'
VS
payment_provider_listing(payme).should
include('<a href="pay.me">PayMe</a>')
28. RELAX SPECIFICATION
payment_provider_listing(payme).should
match(/<a.*href="pay.me".*>PayMe</a>/)
Improves durability but not so easy to read anymore. Some things contradict.
29. RELAX SPECIFICATION
it "should initialize the correct gateway with the order" do
order = Order.make(:ecurrency => 'GoldPay')
GoldPayGateway.should_receive(:new).with(order, anything)
GatewayFactory.build(order)
end
Next Topic
31. it "should return the last created owner as the current owner" do
gateway = Gateway.create!(api_key: 'XYZ', url: 'api.pay.me')
provider = PaymentProvider.create!(url: 'pay.me', name: 'Payme', gateway: gateway)
owner_1 = Owner.create!(first_name: 'Phil', name: 'Adams', provider: provider)
owner_2 = Owner.create!(first_name: 'Maria', name: 'Williams', provider: provider)
provider.current_owner.should == owner_2
end
This is not good!
32. it "should return the last created owner as the current owner" do
@provider_with_two_owners.current_owner.should == @owner_2
end
This neither
You ask why?
34. TOO NOISY
it "should return the last created owner as the current owner" do
gateway = Gateway.create!(api_key: 'XYZ', url: 'api.pay.me')
provider = PaymentProvider.create!(url: 'pay.me', name: 'Payme', gateway: gateway)
owner_1 = Owner.create!(first_name: 'Phil', last_name: 'Adams', provider: provider)
owner_2 = Owner.create!(first_name: 'Maria', last_name: 'Williams', provider: provider)
provider.current_owner.should == owner_2
end
To much
35. NO CONTEXT
it "should return the last created owner as the current owner" do
@provider_with_two_owners.current_owner.should == @owner_2
end
To little
36. MAINTAIN CONTEXT
it "should return the last created owner as the current owner" do
provider = Provider.make
owner_1 = Owner.make provider: provider
owner_2 = Owner.make provider: provider
provider.current_owner.should == owner_2
end
right amout
37. SPLIT SETUP TO DRY
CONTEXT
describe 'transaction' do
before(:each) do
@payer = User.make
end
describe "percentage payout bonus set" do
before(:each) do
PayoutBonus.create!(amount: 20, unit: :percentage)
end
end
describe "fixed payout bonus set" do
before(:each) do
PayoutBonus.create!(amount: 10, unit: :usd)
end
end
end
another contradiction because this also increases creates complexity by adding new places
40. TEST IN ISOLATION
it "should be false when order has a single product from a single partner" do
partner = Partner.make
product = Product.make new_partner_name: partner.name
order = Order.make_unsaved partner: partner, contact: Contact.make, address: Address.make
order.items.build product: product, price: 100, scale_basis: 1, quantity: 1
order.save!
order.reload
order.should_not have_multiple_product_partners
end
Most speed is gained if only that code executes that is necessary for that test
41. TEST IN ISOLATION
it "should be false when order has a single product from a single partner" do
product = Product.make new_partner_name: "Pear"
order = Order.make_unsaved
order.items << OrderItem.make_unsaved :product = product
order.should_not have_multiple_product_partners
end
Most speed is gained if only that code executes that is necessary for that test
42. ISOLATION THROUGH
MOCKING
Instead of real dependencies inject mocks
different techniques
43. FAKES
• Mimic the behavior of the real object but don’t share all
characteristics
good example are in memory data storage vs. persistence.
44. FAKE USAGE
class FakeActivityLogger
def log(object)
@changes[object.id] ||= []
@changes[object.id] << object.changes
end
def changes_for(object)
@changes[object.id]
end
end
it "should call loggers on changes" do
logger = FakeActivityLogger.new
@logger_config.register(logger, User)
user = User.make(name: 'Paul')
user.update_attribute(:name, 'Paula')
logger.changes_for(user).should = [:name, 'Paul', 'Paula']
end
46. STUB USAGE
it "should change the given attribute" do
logger = stub('stub_logger', log: true)
@logger_config.register(logger, User)
user = User.make(name: 'Paul')
user.update_attribute(:name, 'Paula')
user.name.should == 'Paula'
end
47. MOCKS
• Pretend to be some object, also no logic but monitor if
interaction with them is specified
48. MOCK USAGE
it "should call loggers on changes" do
logger = mock('mock_logger')
@logger_config.register(logger, User)
user = User.make(name: 'Paul')
logger.expects(:log).with(user).once
user.update_attribute(:name, 'Paula')
end
49. MOCKS AND FAKES CAN
HIDE INTEGRATION BUGS
Integration or Acceptancetests to the rescue
excessive use of mocking my counteract fast testing if more integration test is required
52. LISTEN TO YOUR TESTS
“If something hurts you probably doing it wrong”
examples taken from real code I was involved.
53. TO MANY DEPENDENCIES
it "should be false when order has a single product from a single partner" do
partner = Partner.make
product = Product.make new_partner_name: partner.name
order = Order.make_unsaved partner: partner, contact: Contact.make, address: Address.make
order.items.build product: product, price: 100, scale_basis: 1, quantity: 1
order.save!
order.reload
order.should_not have_multiple_product_partners
end
Bad Design
57. STUB CHAINS/METHOD
CHAINS
it "should be false when order has a single product from a single partner" do
order = Order.make_unsaved
item = OrderItem.make_unsaved :name => 'iPet'
order.stub_chain(:items, :delivered, :from_partner, :last => item)
last_delivered_item_for_partner_label(partner, order).should include('iPed')
end
artificial
exposes to many internals
58. EXPLAINING COMMENTS ON
EXPECTATIONS
it "should sum all credits for the partner" do
credit1 = @partner.credits.make(:order => @order, :payment => 100)
credit1.items.make :price => 100, :quantity => 1
credit2 = @partner.credits.make(:order => @order, :payment => 100)
credit2.items.make :price => 150, :quantity => 1
@partner.credits.sum_for_month(Date.today.month, Date.today.year).should ==
297.5 # including 19% tax
end
59. TOOLS
help to write faster/better tests
beside your test/mock framework of choice
62. SPORK
+ Reduce startup time for testing frameworks (RSpec,
Cucumber, Test-Unit)
- Reloading breaks for code loaded in environment/
initializers
Great timesaver in unittest for bigger projects with lot of gems and plugins
63. BUNDLER
+ full dependency resolution at once
+ version lockdown
- beta
fixed version are great, no surprises with unexpected updates.
64. FACTORIES
(MACHINIST, FACTORY GIRL)
+ Greatly remove noise in tests
+ Dry Setups
+ Keep Context
- DB Overhead
65. HYDRA/PARALLEL SPEC
+ distribute tests on multiple cores or even machines
- extra setup
- concurrency/load order issues
So far no serious project running with them
66. CAPYBARA
+ Allow to run cucumber features agains different backends
+ full stack testing with culerity or selenium where required
- not one feature on many backends
setup is a super easy with cucumber