Refactoring involves restructuring existing code without changing its external behavior through small, behavior-preserving transformations. It improves code readability, maintainability, and quality over time. Refactoring is useful for prototyping with unclear specs, gaining project overview on large codebases, and improving poorly designed code. It can save significant time versus rewriting from scratch by allowing work to progress iteratively while preserving existing functionality and APIs. Examples demonstrate how refactoring authentication and database code improved structure without affecting existing features or tests.
My presentation from the PHP Matsuri 2011 conference. This presentation discusses the changes in CakePHP 2.0 and goes into more detail on some of the cooler features that PHP 5 allows us, and some of the internal restructuring.
Debugging code is an essential task for every software developer. PHP is one of the most popular programming languages, but setting up debugging for PHP applications may be tricky. This session will demonstrate what debugging technologies and tools are available for PHP. How to debug CLI scripts, Web apps and REST services. What's the easiest way to set up debugging for the different server environments: local, remote, cloud or virtualized; in development or in production.
PHP Mega Meetup, Sep, 2020, Anti patterns in phpAhmed Abdou
PHP is one of the easiest programming languages to use ever and powers more than half of the internet.
With this ease of use, certain common patterns emerge that become harmful. This is especially true when your product or service is not expected to die soon. Some anti-patterns are coding, others are related to operating your service, especially with new docker stacks. We will go over some of the most common pitfalls with a focus on enterprise development.
Managing Complexity with Module::Releasebrian d foy
Automating Perl module release with Module::Release, including distribution verification, automating testing, and anything else you need to check before you release your module on the world.
Professional PHP: an open-source alternative for enterprise development [Kort...Combell NV
A presentation on Enterprise PHP development for people who have no experience with PHP programming.
Basically this presentation defends PHP as a worthy technology for enterprise projects and is directly compared with other enterprise technologies such as Java and the .NET framework
When Good Code Goes Bad: Tools and Techniques for Troubleshooting PloneDavid Glick
Using real issues encountered in the wild, this session will help beginning integrators gain confidence in knowing what to do when Plone fails to behave as expected. Learn how to solve common problems like "My changes aren't taking effect" and "My Zope instance won't start," as well as how to use pdb to investigate more complex Python errors.
This talk is targeted at integrators who have some experience with Plone, but who are not confident in troubleshooting errors and other unexpected behavior. Knowledge of Python is not required, though at least a cursory familiarity with some programming language will make the talk more digestible.
Step-by-step debugging with Xdebug is no secret for you? Perfect then, because we won’t talk about it. We will rather see tools that let you know what’s really happening in your PHP code, like the recent phpdbg debugger and phptrace, process tracing tools like: strace, ltrace, the Linux inotify mechanism, tcpdump/wireshark for network analysis,…
My presentation from the PHP Matsuri 2011 conference. This presentation discusses the changes in CakePHP 2.0 and goes into more detail on some of the cooler features that PHP 5 allows us, and some of the internal restructuring.
Debugging code is an essential task for every software developer. PHP is one of the most popular programming languages, but setting up debugging for PHP applications may be tricky. This session will demonstrate what debugging technologies and tools are available for PHP. How to debug CLI scripts, Web apps and REST services. What's the easiest way to set up debugging for the different server environments: local, remote, cloud or virtualized; in development or in production.
PHP Mega Meetup, Sep, 2020, Anti patterns in phpAhmed Abdou
PHP is one of the easiest programming languages to use ever and powers more than half of the internet.
With this ease of use, certain common patterns emerge that become harmful. This is especially true when your product or service is not expected to die soon. Some anti-patterns are coding, others are related to operating your service, especially with new docker stacks. We will go over some of the most common pitfalls with a focus on enterprise development.
Managing Complexity with Module::Releasebrian d foy
Automating Perl module release with Module::Release, including distribution verification, automating testing, and anything else you need to check before you release your module on the world.
Professional PHP: an open-source alternative for enterprise development [Kort...Combell NV
A presentation on Enterprise PHP development for people who have no experience with PHP programming.
Basically this presentation defends PHP as a worthy technology for enterprise projects and is directly compared with other enterprise technologies such as Java and the .NET framework
When Good Code Goes Bad: Tools and Techniques for Troubleshooting PloneDavid Glick
Using real issues encountered in the wild, this session will help beginning integrators gain confidence in knowing what to do when Plone fails to behave as expected. Learn how to solve common problems like "My changes aren't taking effect" and "My Zope instance won't start," as well as how to use pdb to investigate more complex Python errors.
This talk is targeted at integrators who have some experience with Plone, but who are not confident in troubleshooting errors and other unexpected behavior. Knowledge of Python is not required, though at least a cursory familiarity with some programming language will make the talk more digestible.
Step-by-step debugging with Xdebug is no secret for you? Perfect then, because we won’t talk about it. We will rather see tools that let you know what’s really happening in your PHP code, like the recent phpdbg debugger and phptrace, process tracing tools like: strace, ltrace, the Linux inotify mechanism, tcpdump/wireshark for network analysis,…
Taller "Fármacos más usados en drogodependencias. Puesta al día". Impartido por Arancha Aranguez Ruiz, Farmacéutica de Área del Área de Salud de Mérida, y Olga Ortiz Rodríguez, Farmacéutica del Área de Salud de Badajoz-Llerena-Zafra, y coordinado por Urbano Vázquez Fernández, médico y director de la Comunidad Terapéutica "La Garrovilla" -CTLG- de Mérida.
Sanoma Media is begin dit jaar overgestapt op JIRA als algemene workflow tool binnen het bedrijf. Nick verteld waarom JIRA de tool naar keuze geworden is en hoe JIRA is ingericht zodat de verschillende afdelingen en merken van Sanoma in één systeem samen kunnen werken.
Pyruvate, a reasonably fast, non-blocking, multithreaded WSGI serverPloneFoundation
Thomas Schorr, https://2020.ploneconf.org/speakers/thomas-schorr
Pyruvate is a non-blocking, multithreaded WSGI server with competitive performance, implemented in Rust.
It features non-blocking read/write based on mio (https://docs.rs/mio/), a rust-cpython (https://docs.rs/cpython/) based Python interface and a worker pool based on threadpool (https://docs.rs/threadpool/).
The sendfile system call is used for efficient file transfer.
Pyruvate integrates with the Python logging API using asynchronous logging.
PasteDeploy configuration and systemd socket activation are supported.
Beta releases are available for CPython (>=3.6) and Linux.
The talk will present the current state of the project and show how to use Pyruvate with Zope/Plone and other Python web frameworks.
Another focus will be on the roadmap towards a 1.0 release scheduled for end of this year.
https://gitlab.com/tschorr/pyruvate
https://pypi.org/project/pyruvate/
https://2020.ploneconf.org/talks/pyruvate-a-reasonably-fast-non-blocking-multithreaded-wsgi-server/
A few tips on how to go to the next level in PHP web application development. Tells about SCM, code convention, code testing, DRY, etc. Targeted towards the new PHPers who have worked for around 6-12 months.
Some considerations for the software development process.
If you were present when I gave this talk at php|tek, please consider leaving me some feedback: http://joind.in/189
Here are the slides from my tutorial on Scripting Recipes for Testers. In it I share a number of reusable scripts and some tips I learned writing them to help testers do their job better.
The scripts themselves can be found on my site (http://adam.goucher.ca) under the category 'GLSEC2008'
Those days, when it seemed, that web applications have overthrown standard “cumbersome” client apps, we’ll speak about present and future of consumer oriented desktop applications. This includes, but not restricted to patterns of LOB applications development with WPF, right multimedia support of DirectX bridge and new features, waiting for you in Windows 7. Also we’ll speak about subject oriented programming, will be introduced in NET. 4.0 and how to leverage it even today with the current version of Microsoft framework. tits will be shown during the session, thus restricted to mature audiences
On Wednesday, May 27, Red Hat and its partners Xebia, Ciber, Profict and Sogeti had organized the seminar "Business-critical processes with JBoss'. They have shared what solutions they have developed for customers like the Nationale Postcodeloterij, NXP and NS-HiSpeed and what their benefits are.
This seminar was organized in Utrecht.
Xebia had covered the topic: "Migration to JBoss, Made Cost Effective and Easy"
These are the slides of the symfony 1.4 workshop I did at Symfony Day Cologne 2010. Not sure how useful they are for people (since the workshop was more about actually developing something), but perhaps it can help someone get started.
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.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
National Security Agency - NSA mobile device best practices
The Power of Refactoring
1. The Power of
Refactoring
Why doing things three times may speed up
development
The Power of
Refactoring
2. What will we do?
• Intro
• What is refactoring?
• Why refactoring?
• It saves time?
• Some examples
The Power of
Refactoring
3. Introduction
• Professional Services Consultant at
Ibuildings
• Secretary of Dutch PHP Usergroup
• symfony advocate
• husband and father (2 times)
• 7 cats and a bunch of fish
The Power of
Refactoring
5. Refactoring is a disciplined technique for
restructuring an existing body of code, altering its
internal structure without changing its external
behavior. Its heart is a series of small behavior
preserving transformations. Each transformation
(called a 'refactoring') does little, but a sequence
of transformations can produce a significant
restructuring. Since each refactoring is small, it's
less likely to go wrong. The system is also kept
fully working after each small refactoring, reducing
the chances that a system can get seriously
broken during the restructuring.
(Martin Fowler - Refactoring.com)
The Power of
Refactoring
6. Code refactoring is the process of
changing a computer program's code to
make it amenable to change, improve its
readability, or simplify its structure, while
preserving its existing functionality.
(wikipedia)
The Power of
Refactoring
7. So basically...
• Improve small parts of the code for...
• Readability
• Performance improvement
• Implementation or change of logic
The Power of
Refactoring
8. But watch out!
• It should not break existing functionality
• Remain a consistent API/interface
The Power of
Refactoring
9. Refactoring v Rewriting
• Refactoring
• Consistent API
• Internal logic changes
• No need to alter unit tests or API docs
The Power of
Refactoring
10. Refactoring v Rewriting
• Rewriting
• Refactoring won’t help you anymore
• More complex: alter unit tests, alter
calling code, alter documentation
The Power of
Refactoring
11. Why refactoring?
• Prototyping
• Unclear specs
• Project overview
• Improve bad code
The Power of
Refactoring
12. Why refactoring?
• Prototyping
• Quickly have a clickable interface
• No need for full functionality yet
• As long as structure is OK, refactoring
into final product is easy
The Power of
Refactoring
13. Why refactoring?
• Unclear specs
• Something needs to be implemented
• but you don’t know how!
• Create a basic API and call it
• Implement it later
The Power of
Refactoring
14. Why refactoring?
• Project overview
• Similar to unclear specs
• Create your project API skeleton with
dummy responses
• Bit by bit, work on actually adding
functionality
The Power of
Refactoring
15. Why refactoring?
• Improve bad code (PHP4 code, anyone?)
• Security
• Performance
• Best Practices
The Power of
Refactoring
16. by-nc/2.0 - gilest - http://www.flickr.com/photos/gilest/
The Power of
Refactoring
17. by-nc-sa/2.0 - evymoon - http://www.flickr.com/photos/evymoon_quatrain_quotidien/
The Power of
Refactoring
18. Does it save time?
• Yes! Yes it does!
• Readability of your code
• Maintainability of your code
• Higher quality of your code
• Unit testing to ensure stability
The Power of
Refactoring
19. Does it save time?
• Prototyping
• Don’t start from scratch, use your proto
• Only rewrite those things that really
need it
The Power of
Refactoring
20. Does it save time?
• Unclear specs
• Don’t write things fully until you need to
• Think of a good API saves changing all
calls
The Power of
Refactoring
21. Does it save time?
• Project overview
• Know the big picture
• Keep focus on the small part you work
on
The Power of
Refactoring
22. Does it save time?
• Improve bad code
• Better readability means faster coding
• More stable code reduces bug fixing
The Power of
Refactoring
23. Some requirements
• Unit/functional tests need to be in place
• API needs to remain exactly the same
• API needs to be good enough
• if not, then rewrite instead of refactor
The Power of
Refactoring
25. Project A: Unclear
specs
• authentication system is still unknown
• project or iteration deadline is nearing
• let’s first simulate the authentication
The Power of
Refactoring
26. Project A: Unclear
specs
• Same could also apply for writing a
prototype
• Not all details are known
• Short deadline
• Doesn’t need to fully work yet
The Power of
Refactoring
29. Project A: Unclear
specs
• Halfway the project, client finally decides
• Easy to implement: just refactor the
authenticate method
• Rest of the code does not care, as long as
you keep the API the same
The Power of
Refactoring
31. Nothing changes
• This still works!
The Power of
Refactoring
32. Documentation helps
• Good rule of thumb
• If you need to change
the method
documentation,
reconsider
The Power of
Refactoring
33. Project B: Code
improvement
• You took over management of another
developer’s code
• You wrote some crappy code yourself
• Advancements in technology made better
things possible (much more likely! ;-)
The Power of
Refactoring
36. Nothing changes
• This still works!
The Power of
Refactoring
37. Ensuring your API
• Documentation
• Changing your @param values?
• Changing your @return value?
• Adding/changing/removing @throws?
The Power of
Refactoring
38. Ensuring your API
• Unit Tests
• PHPUnit/SimpleTest/lime
• Test for all situations (also exceptions)
• Test for the unexpected!
The Power of
Refactoring
39. Ensuring your API
• Continuous Integration
• CruiseControl/phpUnderControl/Xinc
• Continuously test your code
• Alert through e-mail, SMS, Nabaztag
The Power of
Refactoring
40. Further reading
• http://www.refactoring.com/
• http://phpimpact.wordpress.com/
2008/09/14/code-refactoring-guidelines/
• http://chrissterling.gettingagile.com/
2008/10/13/refactoring-how-far-should-i-go/
The Power of
Refactoring
41. Commercial break
• http://www.leftontheweb.com/ - my
personal blog
• http://www.symfony-framework.nl/ - my
dutch symfony advocacy site
• http://www.ibuildings.com/ - my employer
(we’re hiring! contact me!)
The Power of
Refactoring