Presentation I held before my colleagues about the book Clean Code (http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882).
It contains the highlights of several chapters and hint/guidelines a developer should know.
This slide created for shared internal and for everyone interesting clean code. Why we needed? Why you should use it?
Ps. Sorry if my grammar is very bad :D
Do you know how to remain a programmer? To avoid being “promoted” into positions away from technology and code? Did they teach you at university that you need social skills to be a good developer? What other skills do you need that aren't technical? Did you know that all development roles are not created equal? Is it true that moving jobs a lot is a Bad Thing? In this session, Trisha Gee (Java Champion, 2015 MongoDB Master, 2016/2014/2012 JavaOne Rock Star & Technical Advocate for JetBrains) will share some lessons she learnt the hard way over nearly twenty years of managing her career as a Java developer. She'll talk about what's really important to developers when thinking about their careers, and give you tools for working out what your next steps are. If nothing else, you’ll get to laugh at the (many) mistakes I’ve made in my search for The Perfect Job.
Presentation I held before my colleagues about the book Clean Code (http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882).
It contains the highlights of several chapters and hint/guidelines a developer should know.
This slide created for shared internal and for everyone interesting clean code. Why we needed? Why you should use it?
Ps. Sorry if my grammar is very bad :D
Do you know how to remain a programmer? To avoid being “promoted” into positions away from technology and code? Did they teach you at university that you need social skills to be a good developer? What other skills do you need that aren't technical? Did you know that all development roles are not created equal? Is it true that moving jobs a lot is a Bad Thing? In this session, Trisha Gee (Java Champion, 2015 MongoDB Master, 2016/2014/2012 JavaOne Rock Star & Technical Advocate for JetBrains) will share some lessons she learnt the hard way over nearly twenty years of managing her career as a Java developer. She'll talk about what's really important to developers when thinking about their careers, and give you tools for working out what your next steps are. If nothing else, you’ll get to laugh at the (many) mistakes I’ve made in my search for The Perfect Job.
In this whitepaper, LearnItFirst founder Scott Whigham talks about how you can become a good (or better) C# programmer. This whitepaper is long - 15 pages - but it includes both a step-by-step system to follow as well as an in-depth discussion of each step.
If you follow this 13-step system (with a bonus 14th step), you can’t help but become a good C# developer!
Unit tests are great, they help a developer gain control over his code and catch bugs and regression issues.
Test Driven Development is a methodology that uses unit tests but it's not about writing unit tests - in fact the tests are only a design tool.
TDD is a methodology that solves problems in an iterative way, it's about emergent design that creates a maintainable solution.
In this session I'll talk about common mistakes and misconceptions, how to benefit from TDD and show how to design your code using unit tests.
The code for this talk can be found on GitHub: https://github.com/dhelper/DesignWIthTests
We want code that is easy to understand, re-usable, and flexible. But we are always up against deadlines, so we rush, and end up with code that is messy, buggy, hard to maintain, and makes us go slower even though we’re trying to go faster.
What is clean code? In this talk I’ll provide some answers to this question, and introduce you to 10 good habits that will help keep your code clean, such as the use of meaningful names for your variables and functions, and following the “Boy Scout Rule” (leave the code cleaner than you found it). I will even try to persuade you that using a lot of code comments is a sign that there are problems with your code.
This presentation introduces the principles of high-quality programming code construction during the software development process. The quality of the code is discussed in its most important characteristics – correctness, readability and maintainability. The principles of construction of high-quality class hierarchies, classes and methods are explained. Two fundamental concepts – “loose coupling” and “strong cohesion” are defined and their effect on the construction of classes and subroutines is discussed. Some advices for correctly dealing with the variables and data are given, as well as directions for correct naming of the variables and the rest elements of the program. Best practices for organization of the logical programming constructs are explained. Attention is given also to the “refactoring” as a technique for improving the quality of the existing code. The principles of good formatting of the code are defined and explained. The concept of “self-documenting code” as a programming style is introduced.
[DevDay2018] Let’s all get along. Clean Code please! - By: Christophe K. Ngo,...DevDay.org
People talk about ‘clean code’ and ‘best practices’ but what do they really mean? We are going to explore these topics and share with you the fundamentals of clean code and how to be a good teammate and a coder people will respect even after they read your code!
Every project has a development standard.
Sometimes the standard is “if it was hard to write, it should be hard to maintain.”
Developing, and following, a corporate Best Practices standard will lead to continuity, maintainability, robustness, and pride.
”It’s all about Containers, Serverless and Reactive Programming right now! ProgSCon London will explore these trends with leading industry experts. Several talks will also feature Blockchain, Microservices and Big Data.”
You’re here at ProgSCon to hear all about the latest trends in technology, to learn about them and decide which ones to apply and figure out how. But it’s a tall order, learning to be a fully buzzword compliant developer, architect or lead, especially when What’s Hot changes on practically a daily basis.
During this talk, Trisha will give an irreverent overview of the current technical landscape and present a survival guide for those who want to stay ahead in this turbulent industry.
See also: https://trishagee.github.io/presentation/becoming_buzzword_compliant/
Defensive programming
Organizing straight-line code
Using Conditionals
Controlling Loops
Unusual Control Structures
Table-Driven Methods
General Control Issues
Layout and Style
Code Tuning Strategies
In this whitepaper, LearnItFirst founder Scott Whigham talks about how you can become a good (or better) C# programmer. This whitepaper is long - 15 pages - but it includes both a step-by-step system to follow as well as an in-depth discussion of each step.
If you follow this 13-step system (with a bonus 14th step), you can’t help but become a good C# developer!
Unit tests are great, they help a developer gain control over his code and catch bugs and regression issues.
Test Driven Development is a methodology that uses unit tests but it's not about writing unit tests - in fact the tests are only a design tool.
TDD is a methodology that solves problems in an iterative way, it's about emergent design that creates a maintainable solution.
In this session I'll talk about common mistakes and misconceptions, how to benefit from TDD and show how to design your code using unit tests.
The code for this talk can be found on GitHub: https://github.com/dhelper/DesignWIthTests
We want code that is easy to understand, re-usable, and flexible. But we are always up against deadlines, so we rush, and end up with code that is messy, buggy, hard to maintain, and makes us go slower even though we’re trying to go faster.
What is clean code? In this talk I’ll provide some answers to this question, and introduce you to 10 good habits that will help keep your code clean, such as the use of meaningful names for your variables and functions, and following the “Boy Scout Rule” (leave the code cleaner than you found it). I will even try to persuade you that using a lot of code comments is a sign that there are problems with your code.
This presentation introduces the principles of high-quality programming code construction during the software development process. The quality of the code is discussed in its most important characteristics – correctness, readability and maintainability. The principles of construction of high-quality class hierarchies, classes and methods are explained. Two fundamental concepts – “loose coupling” and “strong cohesion” are defined and their effect on the construction of classes and subroutines is discussed. Some advices for correctly dealing with the variables and data are given, as well as directions for correct naming of the variables and the rest elements of the program. Best practices for organization of the logical programming constructs are explained. Attention is given also to the “refactoring” as a technique for improving the quality of the existing code. The principles of good formatting of the code are defined and explained. The concept of “self-documenting code” as a programming style is introduced.
[DevDay2018] Let’s all get along. Clean Code please! - By: Christophe K. Ngo,...DevDay.org
People talk about ‘clean code’ and ‘best practices’ but what do they really mean? We are going to explore these topics and share with you the fundamentals of clean code and how to be a good teammate and a coder people will respect even after they read your code!
Every project has a development standard.
Sometimes the standard is “if it was hard to write, it should be hard to maintain.”
Developing, and following, a corporate Best Practices standard will lead to continuity, maintainability, robustness, and pride.
”It’s all about Containers, Serverless and Reactive Programming right now! ProgSCon London will explore these trends with leading industry experts. Several talks will also feature Blockchain, Microservices and Big Data.”
You’re here at ProgSCon to hear all about the latest trends in technology, to learn about them and decide which ones to apply and figure out how. But it’s a tall order, learning to be a fully buzzword compliant developer, architect or lead, especially when What’s Hot changes on practically a daily basis.
During this talk, Trisha will give an irreverent overview of the current technical landscape and present a survival guide for those who want to stay ahead in this turbulent industry.
See also: https://trishagee.github.io/presentation/becoming_buzzword_compliant/
Defensive programming
Organizing straight-line code
Using Conditionals
Controlling Loops
Unusual Control Structures
Table-Driven Methods
General Control Issues
Layout and Style
Code Tuning Strategies
Pragmatic Programmer
Estimating (提升专业素养)
DRY rule - Repeat or Reuse (提炼经验)
Control Structures & Complexity (简洁就是美)
Table Driven (善于运用算法)
Design for CHANGE (完善设计、争取主动)
Refactoring (追求卓越,勇于改进)
Automation (一切都要自动化)
Resource
Who is working for you (找个巨人的肩膀)
Accessories for you
Process and Methods
Process enhances confidence
Thought Disorder(最容易欺骗的人是自己)
Conceptual Blockbusting
Career anchors
How to define the VALUE (价值不等式)
Professionalism
Tout comme on fait attention au style d'écriture utilisé lorsque l'on rédige un livre, en plus d'appliquer les règles d'orthographe et de grammaire, il faut également appliquer des règles stylistiques lorsqu'on rédige du code.
Cette conférence présente plusieurs aspects à prendre en compte pour rédiger du code de qualité, allant de la structure globale d'un programme à la mise en page de son code, en passant par les noms des variables.
It has been said that one should code as if the person maintaining the code is a violent psychopath who knows where you live. But why do we work with psychopaths? That question unfortunately cannot be answered in this presentation. However, we can shed some light on how to code for readability hopefully avoiding the problem altogether.
Readable code is about a lot more than producing beautiful code. In fact, it has nothing really to do with the beauty of the code and everything to do with the ability to quickly understand what the code does.
In this presentation we will discuss why readable code is so important. We will cover six commonly reoccurring patterns that made code hard to read, why they occur, and how they can easily be avoided:
* Deep Nesting
* Unnecessary Generalization
* Ambiguous Naming
* Hard to Follow Flow of Execution
* Code Style vs. Individualism
* Code Comments
These concepts may be applied to any programming language.
How I Learned to Stop Worrying and Love Legacy Code.....Mike Harris
Legacy Code. I never wrote it; everybody else did!
How many times have you waded through an ageing, decaying, tangled forrest of code and wished it would just die?
How many times have you heard someone say that what really needs to happen is a complete rewrite?
I have heard this many times, and, have uttered that fatal sentence myself.
But shouldn’t we love our legacy code?
Doesn’t it represent our investment and the hard work of ourselves and our predecessors?
Throwing it away is dangerous, because, before we do, we’ll need to work out exactly what it does, and we’ll need to tweeze out that critical business logic nestled in a deeply entangled knot of IF statements. It could take us years to do, and we’ll have to maintain two systems whilst we do it, inevitably adding new features to them both. Yes we get to reimplement using the latest, coolest programming language, instead of an old behemoth, but how long will our new cool language be around, and who will maintain that code, when it itself inevitably turns to legacy?
We can throw our arms in the air, complaining and grumbling about how we didn’t write the code, how we would never have written it the way it is, how those that wrote it were lesser programmers, possibly lesser humans themselves, but the code still remains, staring us in the face and hanging around for longer that we could possibly imagine. We can sort it out, we can improve it, we can make it testable, and we can learn to love our legacy code.
”In general programmers are pretty smart people. Smart people sometimes like to show off their smarts by demonstrating their mental juggling abilities. One difference between a smart programmer and a professional programmer is that the professional understands that clarity is king. Professionals use their powers for good and write code that others can understand.”
Writing Clean Code (Recommendations by Robert Martin)Shirish Bari
Writing clean code is every developers responsibility.
I have studied book " Clean Code: A Handbook of Agile Software Craftsmanship" by Robert C Martin. Based on my understanding about book I have listed down recommendations for writing down clean code.These can be good starting point while learning to write clean code
10 Tips for Configuring Your Builds with Bamboo SpecsAtlassian
Bamboo 6 lets every team manage their plans through code. But it's only the start of a journey. At Atlassian, we now configure the vast majority of our builds and deployments with code. Whether you're a new starter or already a user of Bamboo Specs, you're (or will be) facing questions such as "How do I test my Spec before update?", "Can I safely modify this reused Spec component?", or "How do I make Specs more accessible to non-Java teams?".
Join Przemek Bruski, the architect of Bamboo to hear how our teams solved these - and more - problems. Apart from practical tips, we'll also talk about jump-starting your Specs with our exporter, latest additions to the Specs feature, and support for Bitbucket Cloud Pipelines configuration files.
Code we've written once has to be kept readable, maintainable, understandable and extensible for many years. Good code is not self-serving but the foundation for working together.
Refactoring can help you to keep the quality of the relevant parts of our systems high.
The technique is really easy (almost too easy) - improve the naming, structure, and responsibility in small steps that don't change behavior and run your tests after each step.
18 years ago I got hooked on Refactoring when Martin Fowler's first book came out. I've been using it since then on a daily basis on many different projects. Since then a lot has changed, especially with the help of modern IDEs with their automated refactorings and intentions.
Now he asked me to help review the 2nd edition. Our discussions reminded me that each generation of developers should be taught this crucial skill. That's why I want to give an overview of core refactorings and code-smells but also demonstrate the tips and tricks of today's tools that make this task so much easier.
Plus a sneak preview of the upcoming book.
Python Certification course teach high level programming language, the python platform handle multiple programming paradigms including object oriented, numeric datatypes, string operations, control flow and syntax, for loop, sys, math, time modules, regular expression etc python is scripting such as language Ruby, PHP and this programming language are using for Business analytics, Artificial Intelligent, Machine learning and much more.
Writing code is easy but writing maintainable code is almost impossible. During this talk I will discuss some of the principles of coding that relates to WordPress but goes beyond that.
Welcome to WIPAC Monthly the magazine brought to you by the LinkedIn Group Water Industry Process Automation & Control.
In this month's edition, along with this month's industry news to celebrate the 13 years since the group was created we have articles including
A case study of the used of Advanced Process Control at the Wastewater Treatment works at Lleida in Spain
A look back on an article on smart wastewater networks in order to see how the industry has measured up in the interim around the adoption of Digital Transformation in the Water Industry.
Cosmetic shop management system project report.pdfKamal Acharya
Buying new cosmetic products is difficult. It can even be scary for those who have sensitive skin and are prone to skin trouble. The information needed to alleviate this problem is on the back of each product, but it's thought to interpret those ingredient lists unless you have a background in chemistry.
Instead of buying and hoping for the best, we can use data science to help us predict which products may be good fits for us. It includes various function programs to do the above mentioned tasks.
Data file handling has been effectively used in the program.
The automated cosmetic shop management system should deal with the automation of general workflow and administration process of the shop. The main processes of the system focus on customer's request where the system is able to search the most appropriate products and deliver it to the customers. It should help the employees to quickly identify the list of cosmetic product that have reached the minimum quantity and also keep a track of expired date for each cosmetic product. It should help the employees to find the rack number in which the product is placed.It is also Faster and more efficient way.
Hierarchical Digital Twin of a Naval Power SystemKerry Sado
A hierarchical digital twin of a Naval DC power system has been developed and experimentally verified. Similar to other state-of-the-art digital twins, this technology creates a digital replica of the physical system executed in real-time or faster, which can modify hardware controls. However, its advantage stems from distributing computational efforts by utilizing a hierarchical structure composed of lower-level digital twin blocks and a higher-level system digital twin. Each digital twin block is associated with a physical subsystem of the hardware and communicates with a singular system digital twin, which creates a system-level response. By extracting information from each level of the hierarchy, power system controls of the hardware were reconfigured autonomously. This hierarchical digital twin development offers several advantages over other digital twins, particularly in the field of naval power systems. The hierarchical structure allows for greater computational efficiency and scalability while the ability to autonomously reconfigure hardware controls offers increased flexibility and responsiveness. The hierarchical decomposition and models utilized were well aligned with the physical twin, as indicated by the maximum deviations between the developed digital twin hierarchy and the hardware.
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)MdTanvirMahtab2
This presentation is about the working procedure of Shahjalal Fertilizer Company Limited (SFCL). A Govt. owned Company of Bangladesh Chemical Industries Corporation under Ministry of Industries.
Immunizing Image Classifiers Against Localized Adversary Attacksgerogepatton
This paper addresses the vulnerability of deep learning models, particularly convolutional neural networks
(CNN)s, to adversarial attacks and presents a proactive training technique designed to counter them. We
introduce a novel volumization algorithm, which transforms 2D images into 3D volumetric representations.
When combined with 3D convolution and deep curriculum learning optimization (CLO), itsignificantly improves
the immunity of models against localized universal attacks by up to 40%. We evaluate our proposed approach
using contemporary CNN architectures and the modified Canadian Institute for Advanced Research (CIFAR-10
and CIFAR-100) and ImageNet Large Scale Visual Recognition Challenge (ILSVRC12) datasets, showcasing
accuracy improvements over previous techniques. The results indicate that the combination of the volumetric
input and curriculum learning holds significant promise for mitigating adversarial attacks without necessitating
adversary training.
Water scarcity is the lack of fresh water resources to meet the standard water demand. There are two type of water scarcity. One is physical. The other is economic water scarcity.
Explore the innovative world of trenchless pipe repair with our comprehensive guide, "The Benefits and Techniques of Trenchless Pipe Repair." This document delves into the modern methods of repairing underground pipes without the need for extensive excavation, highlighting the numerous advantages and the latest techniques used in the industry.
Learn about the cost savings, reduced environmental impact, and minimal disruption associated with trenchless technology. Discover detailed explanations of popular techniques such as pipe bursting, cured-in-place pipe (CIPP) lining, and directional drilling. Understand how these methods can be applied to various types of infrastructure, from residential plumbing to large-scale municipal systems.
Ideal for homeowners, contractors, engineers, and anyone interested in modern plumbing solutions, this guide provides valuable insights into why trenchless pipe repair is becoming the preferred choice for pipe rehabilitation. Stay informed about the latest advancements and best practices in the field.
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
高品質軟體的基本動作 101 for NTHU
1. 高品質軟體的基本動作 -如何寫"好的" 程式
Guidelines in How to Create High Quality Code
Johnson J. Su
自由軟體鑄造場蘇展
2014/11/20
Code Complete 101
2. Johnson J. Su
Linkedin:https://www.linkedin.com/in/jansu
E-mail:johnsonsu@iis.sinica.edu.tw
TEL:(02) 2788-3799 ext. 1478
3. In This Talk
•
We will discuss
•
How to use Code Complete
•
What is high codequality
•
How to create high quality code
•
We will not discuss
•
Part V -Code Improvement
•
Part VI -Software Craftsmanship
•
Detail of any programing language
•
Detail of how to deal with code
•
Any useful tools
4. Agenda
1.
What is High Quality Code?
2.
Variables (Good and Bad Examples)
3.
Statements (Good and Bad Examples)
4.
How to create High Quality Code?
6. Have you ever thought…?
•
What are others’ code doing?
•
Why others’ code looks like so dirty?
•
How to improve/create high quality and more readable code?
7. Have you ever thought…?
•
看不懂別人的Code在做什麼?
•
為什麼別人寫的Code 很凌亂?
•
如何寫出“品質好”,“可讀性高” 的Code?
•
Or more…?
11. Agenda
1.
What is High Quality Code?
2.
Variables (Good and Bad Examples)
3.
Statements (Good and Bad Examples)
4.
How to create High Quality Code?
22. Agenda
1.
What is High Quality Code?
2.
Variables (Good and Bad Examples)
3.
Statements (Good and Bad Examples)
4.
How to create High Quality Code?
40. Kinds of Names to Avoid
•
Avoid misleading names or abbreviations
•
e.g. FALSE, TRUE
•
Avoid names with similar meanings
•
e.g. Inputand inputValue; recordNumand numRecords; fileNumberand fileIndex
•
Avoid variables with different meanings but similar names
•
Bad: clientRecsand clientReps
•
Better: clientRecordsand clientReports
•
Avoid names that sound similar, such as wrap and rap
Chapter 11
41. Kinds of Names to Avoid
Chapter 11
•
Avoid numerals in names
•
Avoid file1and file2, or total1and total2
•
Avoid misspelled words in names
•
Avoid misspelling highlightas hilite
•
Was it highlite? hilite? hilight? hilit? jai-a-lai-t? Whoknows?
•
Avoid words that are commonly misspelled in English
•
e.g. Absense, acummulate, acsend, calender, concieve, defferred, definate, independance, occassionally
42. Kinds of Names to Avoid
Chapter 11
•
Don’t differentiate variable names solely by capitalization
•
Names are unique
•
Avoid to use frdfor fired, FRDfor finalreviewduty, and Frdfor full revenue disbursal.
•
Avoid multiple natural languages
•
Avoid “color” or “colour” and “check” or “cheque”
•
Avoid the names of standard types, variables, and routines
43. Kinds of Names to Avoid
Chapter 11
•
Don’t use names that are totally unrelated to what the variables represent
•
Bad: margaretand pookie. Who know?
•
Better: boyfriend, wife, and favoriteBeerare superior!
•
Avoid names containing hard-to-read characters
58. Agenda
1.
What is High Quality Code?
2.
Variables (Good and Bad Examples)
3.
Statements (Good and Bad Examples)
4.
How to create High Quality Code?
78. Agenda
1.
What is High Quality Code?
2.
Variables (Good and Bad Examples)
3.
Statements (Good and Bad Examples)
4.
How to create High Quality Code?
79. How to create High Quality Code?
Code Complete 2ndPart II –Creating High-Quality Code
84. Design is …
•
A Wicked Problem
•
A Sloppy Process (Even If it Produces a Tidy Result)
•
About Tradeoffs and Priorities
•
A Heuristic Process
•
And more…
Chapter 5
91. Value of Information Hiding
Chapter 5
•
Asking “What does this class need to hide?”
If you can put a Functionor Datainto the class’s public interfacewithout compromising its secrets, do. Otherwise, don’t.
93. Levels of Design
1.Software system
2.Subsystem/packages
3.Classes within packages
4.Data and routines within classes
5.Internal routine design
Chapter 5
94. Reasons to Create a Class
•
Model real-world objects
•
Model abstract objects
•
Reduce complexity
•
Isolate complexity
•
Hide implementation details
•
Limit effects of changes
•
Hide global data
•
Streamline parameter passing
•
Make central points of control
•
Facilitate reusable code
•
Plan for a family of programs
•
Package related operations
•
Accomplish a specific refactoring
Chapter 6
95. •
Avoid creating god classes
•
Eliminate irrelevant classes
•
Avoid classes named after verbs
Classes to Avoid
Chapter 6
113. Good Routine Names
•
Describe everything the routine does
•
Bad: ComputeReportTotals()
•
Silly Names: ComputeReportTotalsAndOpenOutputFile()
•
Avoid meaningless, vague, or wishy-washy verbs
•
Bad: HandleCalculation(), PerformServices(),OutputUser(), ProcessInput(), and DealWithOutput()…
•
HandleOutput() →FormatAndPrintOutput()
•
Make names of routines as long as necessary
Chapter 7
114. Good Routine Names
•
Don’t differentiate routine names solely by number
•
Bad: Part1, Part2, OutputUser0, OutputUser1, and OutputUser2
•
To name a function, use a description of the return value
•
e.g. cos(), customerId.Next(), printer.IsReady(), and pen.CurrentColor()
•
To name a procedure, use a strong verb followed by an object
•
e.g. PrintDocument(), CalcMonthlyRevenues(), CheckOrderlnfo(), and RepaginateDocument()
Chapter 7
115. Good Routine Names
•
Establish conventions for common operations
•
e.g. employee.id.Get(), dependent.GetId(), supervisor(), candidate.id()
•
Use opposites precisely
Chapter 7
116. How Long Can a Routine Be?
100
200
Less then 200 lines is better.
Chapter 7
124. Constructing Routines by Using the PPP
Chapter 5
Design the routine.
Code the routine.
Check the code.
Clean up loose ends.
Repeat as needed.
1
2
3
4
5
129. Chapter 5
The code for each comment has been filled in from here down.
3
130. Chapter 15
Example of a Complete Routines Overview
Routine Header
Routine Interface
The code for each comment has been filled in from here down.
The last paragraph of Routine