Професия QA инженер - SoftUniConf June 2015Peter Sabev
QA инженерите се занимават с осигуряване на качеството на софтуера, тестване и цялостно управление на процеса на разработка. Освен да търсят бъгове, да ги описват и да ги проследяват до отстраняването им, QA инженерите се занимават и с програмиране на автоматизирани инструменти за тестване, които осигуряват повторяемост на тестовете и осигуряват качество в дългосрочен план. В лекцията ще поговорим за всичко това с много примери от реалния живот на един QA инженер.
Професия QA инженер - SoftUniConf June 2015Peter Sabev
QA инженерите се занимават с осигуряване на качеството на софтуера, тестване и цялостно управление на процеса на разработка. Освен да търсят бъгове, да ги описват и да ги проследяват до отстраняването им, QA инженерите се занимават и с програмиране на автоматизирани инструменти за тестване, които осигуряват повторяемост на тестовете и осигуряват качество в дългосрочен план. В лекцията ще поговорим за всичко това с много примери от реалния живот на един QA инженер.
Курс по уеб програмиране (2015), занятие №1 - HTMLDAVID Academy
Kурс по уеб програмиране (2015)
Занятие №1: HTML
--
Въведение в HTML
Елементи и тагове
Мета съдържание
Структуриране на текст
Хипервръзки
Изображения
Таблици
Списъци
Форматиране на таблици
Форми
Въведение в HTML 5
Структуриране на страница
Форми и валидиране
Аудио и видео
Курс по програмиране за напреднали (2012) - 4. Desktop приложения. Windows FormsDAVID Academy
Занятие №4 на курса по програмиране за напреднали (2012) провеждан от ДАВИД академия в гр.Казанлък. Включва темите:
- Desktop приложения
- Windows Forms
Курс по информационни технологии (2013) - 3. ADO.NET, LINQ to SQLDAVID Academy
Занятие №3 на курса по информационни технологии (2013) провеждан от ДАВИД академия в ПМГ "Никола Обрешков" - Казанлък. Включва темите:
- ADO.NET
- LINQ to SQL
Курс по програмиране на C# 2013 - 1. Въведение в компютърното програмиране и C#DAVID Academy
Занятие №1 на курса по програмиране на C# 2013 провеждан от ДАВИД академия в ПМГ "Никола Обрешков" - Казанлък. Включва темите:
- Въведение в компютърното програмиране и C#
Най-търсените направления в ИТ сферата за 2024Svetlin Nakov
Най-търсените направления в ИТ сферата?
д-р Светлин Наков, съосновател на СофтУни
София, май 2024 г.
Какво се случва на пазара на труда в ИТ сектора?
Какви са прогнозите за ИТ сектора за напред?
Защо има смисъл да учиш програмиране и ИТ през 2024?
Каква е ролята на AI в ИТ професиите?
Как да започна работа като junior?
Upskill програмите на СофтУни
BG-IT-Edu: отворено учебно съдържание за ИТ учителиSvetlin Nakov
Отворено учебно съдържание по програмиране и ИТ за учители
Безплатни учебни курсове и ресурси за ИТ учители
Разработени курсове към 03/2024 г. в BG-IT-Edu
https://github.com/BG-IT-Edu
Качествени учебни курсове (учебно съдържание) за ИТ учители: презентации + примери + упражнения + проекти + задачи за изпитване + judge система + насоки за учителите
Достъпни безплатно, под отворен лиценз CC-BY-NC-SA
Разработени от СофтУни Фондацията, по инициатива и под надзора на д-р Светлин Наков
Научете повече тук: https://nakov.com/blog/2024/03/27/bg-it-edu-open-education-content-for-it-teachers/
Курс по уеб програмиране (2015), занятие №1 - HTMLDAVID Academy
Kурс по уеб програмиране (2015)
Занятие №1: HTML
--
Въведение в HTML
Елементи и тагове
Мета съдържание
Структуриране на текст
Хипервръзки
Изображения
Таблици
Списъци
Форматиране на таблици
Форми
Въведение в HTML 5
Структуриране на страница
Форми и валидиране
Аудио и видео
Курс по програмиране за напреднали (2012) - 4. Desktop приложения. Windows FormsDAVID Academy
Занятие №4 на курса по програмиране за напреднали (2012) провеждан от ДАВИД академия в гр.Казанлък. Включва темите:
- Desktop приложения
- Windows Forms
Курс по информационни технологии (2013) - 3. ADO.NET, LINQ to SQLDAVID Academy
Занятие №3 на курса по информационни технологии (2013) провеждан от ДАВИД академия в ПМГ "Никола Обрешков" - Казанлък. Включва темите:
- ADO.NET
- LINQ to SQL
Курс по програмиране на C# 2013 - 1. Въведение в компютърното програмиране и C#DAVID Academy
Занятие №1 на курса по програмиране на C# 2013 провеждан от ДАВИД академия в ПМГ "Никола Обрешков" - Казанлък. Включва темите:
- Въведение в компютърното програмиране и C#
Най-търсените направления в ИТ сферата за 2024Svetlin Nakov
Най-търсените направления в ИТ сферата?
д-р Светлин Наков, съосновател на СофтУни
София, май 2024 г.
Какво се случва на пазара на труда в ИТ сектора?
Какви са прогнозите за ИТ сектора за напред?
Защо има смисъл да учиш програмиране и ИТ през 2024?
Каква е ролята на AI в ИТ професиите?
Как да започна работа като junior?
Upskill програмите на СофтУни
BG-IT-Edu: отворено учебно съдържание за ИТ учителиSvetlin Nakov
Отворено учебно съдържание по програмиране и ИТ за учители
Безплатни учебни курсове и ресурси за ИТ учители
Разработени курсове към 03/2024 г. в BG-IT-Edu
https://github.com/BG-IT-Edu
Качествени учебни курсове (учебно съдържание) за ИТ учители: презентации + примери + упражнения + проекти + задачи за изпитване + judge система + насоки за учителите
Достъпни безплатно, под отворен лиценз CC-BY-NC-SA
Разработени от СофтУни Фондацията, по инициатива и под надзора на д-р Светлин Наков
Научете повече тук: https://nakov.com/blog/2024/03/27/bg-it-edu-open-education-content-for-it-teachers/
Светът на програмирането през 2024 г.
Продължава ли бумът на технологичните професии? Кои професии ще се търсят? Как да започна?
Прогнозата на д-р Светлин Наков за бъдещето на софтуерните професии в България
Има ли смисъл да учиш програмиране през 2024?
Какво се търси на пазара на труда?
Ще продължи ли търсенето на програмисти и през 2024?
Все още ли е най-търсената професия в технологиите?
Ролята на AI в сферата на софтуерните разработчици
Какво се случва на пазара на труда?
Има ли спад в търсенето на програмисти?
Как да започна с програмирането?
Видео от събитието сме качили във FB: https://fb.com/events/346653434644683
AI Tools for Business and Startups
Svetlin Nakov @ Innowave Summit 2023
Artificial Intelligence is already here!
AI Tools for Business: Where is AI Used?
ChatGPT and Bard in Daily Tasks
ChatGPT and Bard for Creativity
ChatGPT and Bard for Marketing
ChatGPT for Data Analysis
DALL-E for Image Generation
Learn more at: https://nakov.com/blog/2023/11/25/ai-for-business-and-startups-my-talk-at-innowave-summit-2023/
AI Tools for Scientists - Nakov (Oct 2023)Svetlin Nakov
Инструменти с изкуствен интелект в помощ на изследователите
Д-р Светлин Наков @ Anniversary Scientific Session dedicated to the 120th anniversary of the birth of John Atanasoff
Изкуствен интелект при стартиране и управление на бизнес
Семинар във FinanceAcademy.bg
Д-р Светлин Наков
Изкуственият интелект (ИИ) е вече тук!
Къде се ползва ИИ?
ChatGPT – демо
Bard – демо
Claude – демо
Bing Chat – демо
Perplexity – демо
Bing Image Create – демо
Bulgarian Tech Industry - Nakov at Dev.BG All in One Conference 2023Svetlin Nakov
IT industry in Bulgaria: key factors for success and the future. Deep tech, science, innovation, and education and how we can achieve more as an industry?
Dr. Svetlin Nakov
Innovation and Inspiration Manager @ SoftUni
Contents:
How big is the IT industry in Bulgaria?
Number of software professionals in Bulgaria: according to historical data from BASSCOM
Share of the software industry in GDP
Why does Bulgaria have such a successful IT industry?
Education for the tech industry: school education in software professions and profiles (2022/2023)
Education for the tech industry: Students in university in IT specialties (2022/2023)
Education for the IT industry: Learners at SoftUni (2022/2023)
Evolution of the Bulgarian software industry
How much can the industry grow?
Trends in the IT industry: AI progress, the IT market in Bulgaria, deep tech, science, and innovation
AI in the software industry
How to achieve more as an industry? education, deep tech, science, and innovation, entrepreneurship
Introduction
The IT industry in Bulgaria is one of the most successful in the country. It has grown rapidly in recent years and is now a major contributor to the economy. In this talk, Dr. Nakov explores the key factors behind the success of the Bulgarian IT industry, as well as its future prospects.
AI Tools for Business and Personal LifeSvetlin Nakov
A talk at LeaderClass.BG, Sofia, August 2023
by Svetlin Nakov, PhD
The artificial intelligence (AI) is here!
Where is AI used?
ChatGPT - demo
Bing Chat - demo
Bard - demo
Claude - demo
Bing Image Create - demo
Playground AI - demo
In this talk the speaker explains and demonstrates some AI tools for the business and personal life:
ChatGPT: a large language model that can generate text, translate languages, write different kinds of creative content, and answer your questions in an informative way.
Bing Chat: an Internet-connected AI chatbot that can search Internet and answer questions.
Bard: a large language model from Google AI, trained on a massive dataset of text and code, similar to ChatGPT.
Claude: A large AI chatbot, similar to ChatGPT, powerful in document analysis.
Bing Image Create: a tool that can generate images based on text descriptions.
Playground AI: image generator and image editor, based on generative AI.
Дипломна работа: учебно съдържание по ООП - Светлин НаковSvetlin Nakov
Дипломна работа на тема
"Учебно съдържание по обектно-ориентирано програмиране в профилираната подготовка по информатика"
Дипломант: д-р Светлин Наков
Специалност: Педагогика на обучението по информатика и информационни технологии в училище (ПОИИТУ)
Степен: магистър
Пловдивски университет "Паисий Хилендарски"
Факултет по математика и информатика (ФМИ)
Катедра “Компютърни технологии”
Настоящата дипломна работа има за цел да подпомогне българските ИТ учители от системата на средното образование в профилираните гимназии и паралелки, като им предостави безплатно добре разработени учебни програми и качествено учебно съдържание за преподаване в първия и най-важен модул от профил “Софтуерни и хардуерни науки”, а именно “Модул 1. Обектно-ориентирано проектиране и програмиране”.
Чрез изграждането на качествени учебни програми и ресурси за преподаване и пренасяне на добре изпитани образователни практики от автора на настоящата дипломна работа (д-р Светлин Наков) към българските ИТ учители целим значително да подпомогнем учителите в тяхната образователна кауза и да повишим качеството на обучението по програмиране в профилираните гимназии с профил “Софтуерни и хардуерни науки”.
Резултатите от настоящата дипломна работа са вече внедрени в практиката и разработените учебни ресурси се използват реално от стотици ИТ учители в България в ежедневната им работа. Това е една от основните цели и тя вече е изпълнена, още преди защитата на настоящата дипломна работа.
Прочетете повече в блога на д-р Наков: https://nakov.com/blog/2023/07/08/free-learning-content-oop-nakov/
Дипломна работа: учебно съдържание по ООПSvetlin Nakov
Презентация за защита на
Дипломна работа на тема
"Учебно съдържание по обектно-ориентирано програмиране в профилираната подготовка по информатика"
Дипломант: д-р Светлин Наков
Пловдивски университет "Паисий Хилендарски"
Факултет по математика и информатика (ФМИ)
Катедра “Компютърни технологии”
Защитена на: 8 юли 2023 г.
Научете повече в блога на д-р Наков: https://nakov.com/blog/2023/07/08/free-learning-content-oop-nakov
Свободно ИТ учебно съдържание за учители по програмиране и ИТSvetlin Nakov
В тази сесия разказвам за училищното образование по програмиране и ИТ, за професионалните и профилираните гимназии, свързани с програмиране и ИТ, за STEM кабинетите, за българските ИТ учители и тяхната подготовка, за проблемите, с които те се сблъскват, и как можем да им помогнем чрез проекта „Свободно учебно съдържание по програмиране и ИТ“: https://github.com/BG-IT-Edu.
Open Fest 2021, 14 август, София
В света се засилва тенденцията за установяване на STEAM образованието като двигател на научно-техническия прогрес чрез развитие на интердисциплинарни умения в сферата на природните науки, математиката, информационните технологии, инженерните науки и изкуствата в училищна възраст. С масовото изграждане на STEAM лаборатории в българските училища се изостря недостига на добре подготвени STEAM и ИТ учители.
Вярвайки в идеята, че българската ИТ общност може да помогне за решаването на проблема, през 2020 г. по инициатива на СофтУни Фондацията стартира проект за създаване на безплатно учебно съдържание по програмиране и ИТ за учители в подкрепа на училищното технологично образование. Проектът е със свободен лиценз в GitHub: https://github.com/BG-IT-Edu. Учителите получават безплатно богат комплект от съвременни учебни материали с високо качество: презентации, постъпкови ръководства, задачи за упражнения и практически проекти, окомплектовани с насоки, подсказки и решения, безплатна система за автоматизирано тестване на решенията и други учебни ресурси, на български и английски език.
Създадени са голяма част от учебните курсове за професиите "Приложен програмист", "Системен програмист" и "Програмист" в професионалните гимназии. Амбицията на проекта е да се създадат свободни учебни материали и за обученията в профил "Софтуерни и хардуерни науки" в профилираните гимназии.
Целта на проекта “Свободно ИТ учебно съдържание за учители” е да подпомогне българския ИТ учител с качествени учебни материали, така че да преподава на добро ниво и със съвременни технологии и инструменти, за да положи основите на подготовката на бъдещите ИТ специалисти и дигитални лидери на България.
В лекцията разказвам за училищното образование по програмиране и ИТ, за професионалните и профилираните гимназии, свързани с програмиране и ИТ, за STEM кабинетите, за българските ИТ учители и тяхната подготовка, за проблемите с които те се срещат, за липсата на учебници и учебни материали по програмиране, ИТ и по техническите дисциплини и как можем да помогнем на ИТ учителите.
A public talk "AI and the Professions of the Future", held on 29 April 2023 in Veliko Tarnovo by Svetlin Nakov. Main topics:
AI is here today --> take attention to it!
- ChatGPT: revolution in language AI
- Playground AI – AI for image generation
AI and the future professions
- AI-replaceable professions
- AI-resistant professions
AI in Education
Ethics in AI
In this seminar Dr. Svetlin Nakov talks about the programming languages, their popularity, available jobs and trends for 2022-2023.
Modern software development uses dozens of programming languages, along with hundreds of technology frameworks, libraries, and software tools.
This talk will review the most popular programming languages on the labor market: JavaScript, Java, C#, Python, PHP, C++, Go, Swift. It will be briefly stated what each of them is, what it is used for and what is its demand in the IT industry.
Agenda:
The Most Used Programming Languages in 2022:
- Python, Java, JavaScript, C#, C++, PHP
Jobs by Programming Languages in 2022:
- Jobs Worldwide by Programming Language
- Jobs in Bulgaria by Programming Language
Programming Languages Trends for 2023
- Language Popularity Rankings from Stack Overflow, GitHub, PYPL, IEEE, TIOBE, Etc.
Become a Software Developer: How To Start?
IT Professions and How to Become a DeveloperSvetlin Nakov
IT Professions and Their Future
The landscape of IT professions in the tech industry: software developer, front-end, back-end, AI, cloud, DevOps, QA, Java, JavaScript, Python, C#, C++, digital marketing, SEO, SEM, SMM, project manager, business analyst, CRM / ERP consultant, design / UI / UX expert, Web designer, motion designer, etc.
Industry 4.0 and the future of manufacturing, smart cities and digitalization of everything.
What are the most in-demand professions on LinkedIn? Why the best jobs in the world are related to software development and IT?
How to learn coding and start a tech job?
Why anyone can be a software developer?
Dr. Svetlin Nakov
December 2022
GitHub Actions (Nakov at RuseConf, Sept 2022)Svetlin Nakov
Building a CI/CD System with GitHub Actions
Dr. Svetlin Nakov
September 2022
Intro to Continuous Integration (CI), Continuous Delivery (CD), Continuous Deployment (CD), and CI/CD Pipelines
Intro to GitHub Actions
Building CI workflow
Building CD workflow
Live Demo: Build CI System for JS and .NET Apps
How to Become a QA Engineer and Start a JobSvetlin Nakov
How to Become a QA Engineer and Start a Job
Svetlin Nakov, PhD
Sofia, Nov, 2022
1) Why Become а QA Engineer?
2) How to Become a Software Quality Assurance Engineer (QA)?
Learn the Fundamental QA Skills:
Manual QA skills – 30%
Software engineering skills – 20%
QA automation skills – 50%
3) Anyone Can Be a QA Engineer!
4) The QA Program @ SoftUni
https://softuni.bg/qa
Призвание и цели: моята рецепта
д-р Светлин Наков
Как да открия своето призвание в живота и да го направя своя професия?
Съдържание:
1) Светлин Наков - моята история
2) Дигиталните професии
3) Как да намеря своята професия?
Поход на вдъхновителите | Аз мога тук и сега @ Петрич (19 ноември 2022 г.)
What Mongolian IT Industry Can Learn from Bulgaria?Svetlin Nakov
In this talk the speaker Dr. Svetlin Nakov explains the growth of the Bulgarian software industry for the latest 25 years and the key events in its growth.
He gives rich statistical data about Bulgaria, its GDP, and its software industry, which generates nearly 5% of the GDP (in 2022), about the open developer positions (5K in Oct 2022) and the number of software developers in Bulgaria (54K in Oct 2022).
The growth of the number of software developers in Bulgaria, software industry's revenues and their share in the national GDP are traced back from 2022 to 2005.
Similar research about the Mongolian software industry is conducted and available data is compared to Bulgaria and USA.
An interesting parallel is given between Bulgaria and Mongolia in terms of their software engineering talent and industry growth potential.
Finally, Dr. Nakov gives his recommendations about how local Mongolian software companies can reach the global tech market and suggests to use the "outstaffing" business model, targeting the European tech industry and the Asian region.
The talk is given at the "The Future of IT" forum in Ulaanbaatar, Mongolia (October 2022).
How to Become a Software Developer - Nakov in Mongolia (Oct 2022)Svetlin Nakov
In this talk the speaker Svetlin Nakov explains the IT professions and their extremely high demand in the latest years, and gives a recipe how to become a software engineer.
He recommends to spend 1-2 years in studying and practicing software engineering, following a learning curriculum like this:
Basic Coding Course – calculations, data, conditions, loops, IDE
Fundamentals of Programming – arrays, lists, maps, nested structures, text processing, error handling, basic language APIs, problem solving
Object-Oriented Programming – classes, objects, inheritance, …
Databases and ORM – relational DB, SQL, ORM frameworks, XML, JSON
Back-End Development – HTTP, MVC, Web apps, REST
Front-End Development – HTML, CSS, JS, DOM, AJAX, JS Frameworks
Projects – Git, software engineering, teamwork
Example: https://softuni.org/learn
The talk is from the "The Future of IT" forum in Ulaanbaatar, Mongolia (October 2022).
15. Силата на диаграмите Извикване на уеб услуга Изпълнение на SQL заявка Резултат от SQL заявка XML DataSet Променени данни във вид на XML DataSet Заявки за нанасяне на промените Клиент Web-услуга База данни
The variable has never been assigned a value. Its value is whatever bits happened to be in its area of memory when the program started. The value in the variable is outdated. The variable was assigned a value at some point, but the value is no longer valid. Part of the variable has been assigned a value and part has not.
Here are guidelines for avoiding initialization problems.
The code between references to a variable is a “window of vulnerability.” In the window, new code might be added, inadvertently altering the variable, or someone reading the code might forget the value the variable is supposed to contain. It’s always a good idea to localize references to variables by keeping them close together.
Doing this improves the chance that when you modify the loop, you’ll remember to make corresponding modifications to the loop initialization. Later, when you modify the program and put another loop around the initial loop, the initialization will work on each pass through the new loop rather than on only the first pass. C++ Example of Good Variable Declarations and Initializations int receiptIndex = 0; float dailyReceipts = TodaysReceipts(); double totalReceipts = TotalReceipts( dailyReceipts ); C++ Example of Using Two Sets of Variables in a Confusing Way void SummarizeData (...) { ... GetOldData( oldData, &numOldData ); GetNewData( newData, &numNewData ); totalOldData = Sum( oldData, numOldData ); totalNewData = Sum( newData, numNewData ); PrintOldDataSummary( oldData, totalOldData, numOldData ); PrintNewDataSummary( newData, totalNewData, numNewData ); SaveOldDataSummary( totalOldData, numOldData ); SaveNewDataSummary( totalNewData, numNewData ); ... } C++ Example of Using Two Sets of Variables More Understandably void SummarizeDaily( ... ) { GetOldData( oldData, &numOldData ); totalOldData = Sum( oldData, numOldData ); PrintOldDataSummary( oldData, totalOldData, numOldData ); SaveOldDataSummary( totalOldData, numOldData ); ... GetNewData( newData, &numNewData ); totalNewData = Sum( newData, numNewData ); PrintNewDataSummary( newData, totalNewData, numNewData ); SaveNewDataSummary( totalNewData, numNewData ); ... } Part of minimizing the scope of a variable is keeping it as local as possible. It is much more difficult to reduce the scope of a variable that has had a large scope than to expand the scope of a variable that has had a small scope—in other words, it’s harder to turn a global variable into a class variable than it is to turn a class variable into a global variable. It’s harder to turn a protected data member into a private data member than vice versa. Use each variable for one purpose only It’s sometimes tempting to use one variable in two different places for two different activities. Usually, the variable is named inappropriately for one of its uses, or a “temporary” variable is used in both cases (with the usual unhelpful name x or temp ). Avoid variables with hidden meanings Another way in which a variable can be used for more than one purpose is to have different values for the variable mean different things. Make sure that all declared variables are used The opposite of using a variable for more than one purpose is not using it at all. A study by Card, Church, and Agresti found that unreferenced variables were correlated with higher fault rates (1986).
Considerations in Choosing Good Names You can’t give a variable a name the way you give a dog a name—because it’s cute or it has a good sound. Unlike the dog and its name, which are different entities, a variable and a variable’s name are essentially the same thing. The Most Important Naming Consideration The most important consideration in naming a variable is that the name fully and accurately describe the entity the variable represents. An effective technique for coming up with a good name is to state in words what the variable represents. Problem-Orientation A good mnemonic name generally speaks to the problem rather than the solution. A good name tends to express the what more than the how . In general, if a name refers to some aspect of computing rather than to the problem, it’s a how rather than a what . Avoid such a name in favor of a name that refers to the problem itself. Optimum Name Length Gorla, Benander, and Benander found that the effort required to debug a program was minimized when variables had names that averaged 10 to 16 characters (1990). Programs with names averaging 8 to 20 characters were almost as easy to debug. The guideline doesn’t mean that you should try to make all of your variable names 9 to 15 or 10 to 16 characters long. It does mean that if you look over your code and see many names that are shorter, you should check to be sure that the names are as clear as they need to be. The Effect of Scope on Variable Names Are short variable names always bad? No, not always. When you give a variable a short name like i , the length itself says something about the variable—namely, that the variable is a scratch value with a limited scope of operation. Use qualifiers on names that are in the global namespace Common Opposites in Variable Names
Considerations in Choosing Good Names You can’t give a variable a name the way you give a dog a name—because it’s cute or it has a good sound. Unlike the dog and its name, which are different entities, a variable and a variable’s name are essentially the same thing. The Most Important Naming Consideration The most important consideration in naming a variable is that the name fully and accurately describe the entity the variable represents. An effective technique for coming up with a good name is to state in words what the variable represents. Problem-Orientation A good mnemonic name generally speaks to the problem rather than the solution. A good name tends to express the what more than the how . In general, if a name refers to some aspect of computing rather than to the problem, it’s a how rather than a what . Avoid such a name in favor of a name that refers to the problem itself. Optimum Name Length Gorla, Benander, and Benander found that the effort required to debug a program was minimized when variables had names that averaged 10 to 16 characters (1990). Programs with names averaging 8 to 20 characters were almost as easy to debug. The guideline doesn’t mean that you should try to make all of your variable names 9 to 15 or 10 to 16 characters long. It does mean that if you look over your code and see many names that are shorter, you should check to be sure that the names are as clear as they need to be. The Effect of Scope on Variable Names Are short variable names always bad? No, not always. When you give a variable a short name like i , the length itself says something about the variable—namely, that the variable is a scratch value with a limited scope of operation. Use qualifiers on names that are in the global namespace Common Opposites in Variable Names
If the loop is longer than a few lines, it’s easy to forget what i is supposed to stand for, and you’re better off giving the loop index a more meaningful name. Because code is so often changed, expanded, and copied into other programs, many experienced programmers avoid names like i altogether. Java Example of Good Loop Names in a Nested Loop for ( teamIndex = 0; teamIndex < teamCount; teamIndex++ ) { for ( eventIndex = 0; eventIndex < eventCount[ teamIndex ]; eventIndex++ ) { score[ teamIndex ][ eventIndex ] = 0; } } C++ Examples of Cryptic Flags if ( flag ) ... if ( statusFlag & 0x0F ) ... if ( printFlag == 16 ) ... if ( computeFlag == 0 ) ... flag = 0x1; statusFlag = 0x80; printFlag = 16; computeFlag = 0; C++ Examples of Better Use of Status Variables if ( dataReady ) ... if ( characterType & PRINTABLE_CHAR ) ... if ( reportType == ReportType_Annual ) ... if ( recalcNeeded == True ) ... dataReady = True; characterType = CONTROL_CHARACTER; reportType = ReportType_Annual; recalcNeeded = False; Moreover, because the variables are officially given a “temporary” status, programmers tend to treat them more casually than other variables, increasing the chance of errors. Names like done and success are good boolean names because the state is either True or False ; something is done or it isn’t; it’s a success or it isn’t. Names like status and sourceFile , on the other hand, are poor boolean names because they’re not obviously True or False . Negative names like notFound , notdone , and notSuccessful are difficult to read when they are negated—for example, if not notFound When you use an enumerated type, you can ensure that it’s clear that members of the type all belong to the same group by using a group prefix, such as Color_ , Planet_ , or Month_ . When naming constants, name the abstract entity the constant represents rather than the number the constant refers to. FIVE is a bad name for a constant (regardless of whether the value it represents is 5.0 ). CYCLES_NEEDED is a good name.
If the loop is longer than a few lines, it’s easy to forget what i is supposed to stand for, and you’re better off giving the loop index a more meaningful name. Because code is so often changed, expanded, and copied into other programs, many experienced programmers avoid names like i altogether. Java Example of Good Loop Names in a Nested Loop for ( teamIndex = 0; teamIndex < teamCount; teamIndex++ ) { for ( eventIndex = 0; eventIndex < eventCount[ teamIndex ]; eventIndex++ ) { score[ teamIndex ][ eventIndex ] = 0; } } C++ Examples of Cryptic Flags if ( flag ) ... if ( statusFlag & 0x0F ) ... if ( printFlag == 16 ) ... if ( computeFlag == 0 ) ... flag = 0x1; statusFlag = 0x80; printFlag = 16; computeFlag = 0; C++ Examples of Better Use of Status Variables if ( dataReady ) ... if ( characterType & PRINTABLE_CHAR ) ... if ( reportType == ReportType_Annual ) ... if ( recalcNeeded == True ) ... dataReady = True; characterType = CONTROL_CHARACTER; reportType = ReportType_Annual; recalcNeeded = False; Moreover, because the variables are officially given a “temporary” status, programmers tend to treat them more casually than other variables, increasing the chance of errors. Names like done and success are good boolean names because the state is either True or False ; something is done or it isn’t; it’s a success or it isn’t. Names like status and sourceFile , on the other hand, are poor boolean names because they’re not obviously True or False . Negative names like notFound , notdone , and notSuccessful are difficult to read when they are negated—for example, if not notFound When you use an enumerated type, you can ensure that it’s clear that members of the type all belong to the same group by using a group prefix, such as Color_ , Planet_ , or Month_ . When naming constants, name the abstract entity the constant represents rather than the number the constant refers to. FIVE is a bad name for a constant (regardless of whether the value it represents is 5.0 ). CYCLES_NEEDED is a good name.
There are no hard-and-fast rules for when you should establish a naming convention, but here are a few cases in which conventions are worthwhile:
Standardizing prefixes for common meanings provides a terse but consistent and readable approach to naming data. The best known scheme for standardizing prefixes is the Hungarian naming convention, which is a set of detailed guidelines for naming variables and routines (not Hungarians!) that was widely used at one time in Microsoft Windows programming. Although the Hungarian naming convention is no longer in widespread use, the basic idea of standardizing on terse, precise abbreviations continues to have value. Standardized Prefixes are composed of two parts: the user-defined–data type (UDT) abbreviation and the semantic prefix. User-Defined–Type (UDT) Abbreviation The UDT abbreviation identifies the data type of the object or variable being named. UDT abbreviations might refer to entities such as windows, screen regions, and fonts. A UDT abbreviation generally doesn’t refer to any of the predefined data types offered by the programming language. UDT Abbreviation Meaning ch Character (a character not in the C++ sense, but in the sense of the data type a word-processing program would use to represent a character in a document) doc Document pa Paragraph scr Screen region sel Selection wn Window Semantic Prefix Semantic prefixes go a step beyond the UDT and describe how the variable or object is used. Unlike UDTs, which vary project to project, semantic prefixes are somewhat standard across projects. Table 11-7 shows a list of standard semantic prefixes. Semantic Meaning Prefix c Count (as in the number of records, characters, and so on) first The first element that needs to be dealt with in an array. first is similar to min but relative to the current operation rather than to the array itself. g Global variable i Index into an array last The last element that needs to be dealt with in an array. last is the counterpart of first . lim The upper limit of elements that need to be dealt with in an array. lim is not a valid index. Like last , lim is used as a counterpart of first . Unlike last , lim represents a noninclusive upper bound on the array; last represents a final, legal element. Generally, lim equals last + 1 . m Class-level variable max The absolute last element in an array or other kind of list. max refers to the array itself rather than to operations on the array. min The absolute first element in an array or other kind of list. p Pointer
Avoid misleading names or abbreviations Be sure that a name is unambiguous. For example, FALSE is usually the opposite of TRUE and would be a bad abbreviation for “Fig and Almond Season.” Avoid names with similar meanings If you can switch the names of two variables without hurting the program, you need to rename both variables. Avoid variables with different meanings but similar names If you have two variables with similar names and different meanings, try to rename one of them or change your abbreviations. Avoid names like clientRecs and clientReps . Avoid names that sound similar, such as wrap and rap Homonyms get in the way when you try to discuss your code with others. One of my pet peeves about Extreme Programming (Beck 2000) is its overly clever use of the terms Goal Donor and Gold Owner, Avoid numerals in names If the numerals in a name are really significant, use an array instead of separate variables. If an array is inappropriate, numerals are even more inappropriate. Avoid misspelled words in names It’s hard enough to remember how words are supposed to be spelled. To require people to remember “correct” misspellings is simply too much to ask. For example, misspelling highlight as hilite to save three characters makes it devilishly difficult for a reader to remember how highlight was misspelled. Avoid words that are commonly misspelled in English Absense, acummulate, acsend, calender, concieve, defferred, definate, independance, occassionally, prefered, reciept, superseed, and many others are common misspellings in English. Most English handbooks contain a list of commonly misspelled words. Avoid using such words in your variable names. Avoid multiple natural languages In multi-national projects, enforce use of a single natural language for all code including class names, variable names, and so on. Reading another programmer’s code can be a challenge; reading another programmer’s code in Southeast Martian is impossible. Avoid the names of standard types, variables, and routines For example, the following code fragment is legal in PL/I, but you would be a certifiable idiot to use it: if if = then then then = else; else else = if;
Myth : a well mange software project conducts methological requirements development and defines a stable list of the program’s responsibilities. Design follows requiremnets, and it is done carefully so that coding can proceed linearly , from start to finish, implying that most of the code can be writeen once, tested, and forgotten. Accoring to the myth, the only time that the code is significantly modified is during the software – maintenance phase, something that happens only after the initial version of a system has been delivered Reality : code eevolves substantially during its initial development. Many of the changes seen during initial coding are at least as dramatic as changes seen during maintenance. Coding, debugging and unit testing consume between 30 to 65 percent of the effort on a typycal project, depending on the project’s size. If coding and unit testing were straight-forward processes, they would consume no more than 20 – 30 percent of the total effort on a project. Even on well-managed project, however, requirements change by about one to four percent per month. Requirements changes invariably cause corresponding code changes – sometimes substantial code changes.
Myth : a well mange software project conducts methological requirements development and defines a stable list of the program’s responsibilities. Design follows requiremnets, and it is done carefully so that coding can proceed linearly , from start to finish, implying that most of the code can be writeen once, tested, and forgotten. Accoring to the myth, the only time that the code is significantly modified is during the software – maintenance phase, something that happens only after the initial version of a system has been delivered Reality : code eevolves substantially during its initial development. Many of the changes seen during initial coding are at least as dramatic as changes seen during maintenance. Coding, debugging and unit testing consume between 30 to 65 percent of the effort on a typycal project, depending on the project’s size. If coding and unit testing were straight-forward processes, they would consume no more than 20 – 30 percent of the total effort on a project. Even on well-managed project, however, requirements change by about one to four percent per month. Requirements changes invariably cause corresponding code changes – sometimes substantial code changes.
Повторение на код – при наличие на проблеми в такъв код се налага да се правят модификации на много места Даден метод е прекалено обемист – един метод не трябва да е по - дълъг от един екран; един начин да подобрим системата е да повишиме нейната модуларност чрез добре дефинирани методи, изпълняващи ясни и точни задачи. Даден цикъл е прекалено обемист – тялото на даден цикъл е добър кандидат за декларирането на отделен метод, като по този начин се намаля сложността на даден цикъл Даден клас има несвързани отговорности – ако намерите клас който реализира несвързани едни с други отговорности, вероятно този клас е по добре да се раздели на няколко различни класове, всеки от които има ясна група от взаимосвързани отговорности Даден клас не предоставя добро ниво на абстракция – интерфейсите на класовете имат склонност да еволюират в течение на времето (във време на бързи промени, които целят предимно бързото реализиране). По този начин интерфейсът на класа в даден момент става като чудовището Франкенщайн – грозен и труден за интелектуална поддръжка
Даден метод има дълъг списък с променливи – обикновено се счита че списъкът с параметри не бива да надвишава 7. Една промяна налага паралелна модификация на няколко класове – например ако имплементирането на един специален формат налага модификацията на 15 класове които ще го използват, това е добър момент в който ние можем да се замислим дали не можем да създадем нов клас който енкапсулира този нов формат Свързани една с друга данни се използват заедно, но не са обединени в клас – ако подаднете в ситуация в която променяте една обща група от променливи, вероятно е добре да помислите да обедините тези данни в отделен клас Даден метод използва повече функционалност от други класове отколкото от собствения си – това предполага че метода трябва да бъде преместен в друг клас Даден клас е прекалено обвързан с друг – encapsulation/ енкапсулацията ( information hiding ) е вероятно най-силното средство с което можете да направите вашите програми лесно поддържани и да намалите вероятността от каскадни промени в кода. Всеки път когато видите че даден клас знае прекалено много за даден друг клас, по добре се насочете към по силна енкапсулация отколкото към по – слаба Полета на даден клас са public – public data members винаги заличават разликата м/у интерфейс и имплементация и най-вече нарушават правилата за енкапсулация и ограничават гъвкавостта на кода.
Преработете даден условен израз в метод – обикновено това се прави в случаи в които този израз се среща на много други места; друга употреба е когато условния израз е много сложен и включва в себе си други изрази Използвайте междинни променливи – присвоете на променлива стойността на даден израз и и дайте подходящо име така че то да обяснява целта на този израз Преобразувайте обикновени данни ( data primitive ) в нов клас – ако обикновенните данни се нуждаят от обслужваща функционалност, преобразувайте данните в обект и добавете функционалността от която се нуждае; по този начин се постига и по добра типова сигурност и валидност ( stricter type checking ) Групирайте свързаните константи в изброими типове ( enumerations ) – спомага за по стриктна провека на типа, след като е обособен като клас, или ако е във вид на изброим тип – тогава кода е по-изразен
Извадете определен код от даден метод и го превърнете в нов метод – в случай че използвате даден кодов блок многократно, по добре създайте нов метод който съдържа тази функционалност и извиквайте директно новия метод Премахнете даден метод, ако кода който съдържа е прекалено елементарен и кратък – вземете кода от тялото на даден метод ако той е прост и самоописващ се Преработете дълъг метод в няколко по малки или в изцяло нов клас – ако един метод има прекалено голяма имплементация, помислете дали този метод не може да се раздели на отделни самостоятелни подчасти, който да бъдат по-нататък реализирани в нови методи или в отделен клас Ако има нужда от допълнителен параметър за даден метод добавете го към списъка с параметри – вместо да се използват глобални променливи, предпочита се добавянето на нов параметър към списъка с параметри на даден метод
Променете обекти подавани по стойност с такива подавани по указател – поддръжката на копия на един клас е трудно и непосилно; това оказва и влияние върху производителността на системата като цяло (особено в C++ ) Преобразувайте един клас в два – ако даден клас има 2 различни по типа си отгороности, по добре е да разделите класа на 2 отделни такива че всеки да има точно определени и взаимосвързани отговорности Премахнете даден клас – ако даден клас не върши много работа, просто го премахнете
Създайте абстракция на данните върху които нямате контрол – пример е данните които са въведени през GUI-to и които се подават по късно на дадени контроли – в такъв момент можем да създадем отделен клас CControlData който да представлява данните който искаме да получим ( CControlData ще предоставя интерфейс за заявка и достъп до данните, като евентуално ще бъде възможно не винаги да се връщат валидни данни) Използвайте factory метод – кагато е необходимо да създадем определена инстанция на клас, според дадена константа или флаг, тогава е по добре да създадем статичен factory метод който ще връща правилните инстанции според подадения параметър
Характеристики на добрия стил на програмиране: добра структура на програмата използване на ясни и лесни за разбиране похвати добри имена на променливи, методи и класове използване на именувани константи, вместо “магически” числа или стрингове добро структуриране на кода минимизация на сложността на реализация
Писането на коментари ви помага да осмислите по-добре това което искате да реализирате – ако не можете да напишете лесно коментари, това е ясен знак че вие не разбирате добре това което трябва да реализирате