Blogs
We regularly introduce fresh blog content and updates every few weeks. During our work, we frequently encounter unexpected challenges, and now and then, we stumble upon exciting Eureka moments that we're eager to share.
Usage of DC automated testing with Python: A Step-by-Step Selenium Tutorial for 'Hello World'
Selenium is a powerful tool for web automation, and when combined with Python, it becomes an easy-to-use yet efficient framework for automating tasks on web applications. In this tutorial, we will walk you through automating a simple ‘Hello World’ task on Jira Data Center (DC) using Selenium in Python. We will cover how to detect web elements, execute JavaScript code, and even debug your automation script. Let’s dive in!
Prerequisites:
Python 3.x installed.
Selenium WebDriver for Python.
A WebDriver (like ChromeDriver) for the browser you want to automate.
Access to a Jira DC instance (either a local or cloud setup).
Why Website Speed Matters and How to Improve It
In today's digital World, website performance is directly linked to the success of your online business. Websites that load quickly retain users better than those with slower load times. For example, a case study on How The Economic Times passed Core Web Vitals thresholds and achieved an overall 43% better bounce rate ,demonstrates the real cost of website performance. In this blog, we'll explore the key factors that make a website faster and how you can improve your site's speed.
1. Reducing Time to First Byte(TTFB):
TTFB is a metric that measures the time between the request for a resource and when the first byte of a response begins to arrive.
The First Request for Web Page is for an Html resource. So Reducing TTFB for first resource loading will make website load quickly
To measure the Time to First Byte (TTFB) for a website, you can generate a Lighthouse report using your browser's developer tools. Start by right-clicking on the website and selecting "Inspect." Navigate to the "Lighthouse" tab within the developer tools. From there, click on "Analyze page load" to generate the report. Once the analysis is complete, you can find the TTFB details in the relevant section of the report, similar to the example shown in the attached image.
Streamlining Atlassian Plugin Development with Webpack: An Essential Guide for Developers
Understanding Webpack
Webpack serves as a crucial tool for bundling various pieces of code and resources required for a website or application to function seamlessly. It acts as a packing machine, efficiently organizing and optimizing assets like JavaScript files, CSS stylesheets, images, and fonts, thereby enhancing performance and usability.
Why Webpack in Atlassian Workflows
Atlassian's suite of products, including Jira, Confluence, and Bitbucket, often rely on plugins to extend their functionalities. Efficient plugin development, testing, and maintenance are crucial for seamless integration. Webpack plays a pivotal role in streamlining these workflows by automating tasks, optimizing assets, and promoting modular code structures.
Enhancing Jira with PocketKnife QueryDSL: Solving Complex SQL Queries Beyond ActiveObjects
Introduction
As Atlassian App developers, we are well-versed in using ActiveObjects, which is the go-to ORM for handling most database operations in Jira plugin development. ActiveObjects makes it easy to perform basic CRUD operations, create tables etc. However, when it comes to more advanced querying, such as aggregating data with groupBy or performing complex SQL operations like joining multiple tables, ActiveObjects falls short. For example, if you want to retrieve a specific count of grouped results, ActiveObjects doesn’t offer the flexibility needed, often returning only the count of the first row or limiting you to entity-specific operations.
To overcome these limitations, Atlassian provides a powerful library called PocketKnife QueryDSL. This library enables us to perform complex queries that ActiveObjects can't handle, such as joining multiple tables, aggregating data, and retrieving specific column counts with groupBy. PocketKnife QueryDSL offers type-safe queries and provides greater control and flexibility over how data is retrieved and manipulated in Jira, opening up possibilities for more sophisticated database operations. Below is step by step tutorial of how to integrate PocketKnife QueryDSL to your plugin -
Understanding Atlassian's Design System and Achieving Uniformity
A design system is like a blueprint for digital products. It's a set of rules and tools that teams use to keep the look and feel of products consistent. A design system streamlines your team's workflow by tackling repetitive tasks and addressing recurring issues, reclaiming valuable time. A design system aids in managing the complexity of product transitions between dark and light themes. A design system teaches new designers about the product and its rules, allowing them to get productive faster.
It has many advantages, but it does not come without some obstacles. One of the challenges is continuous maintenance. Like any other product, the design must be kept up to date to remain relevant.
Public design systems tackle the aforementioned problem in large part since they provide thorough documentation, pre-built components, and design principles. This can greatly minimize the time and effort necessary for the first setup when compared to creating your own system from scratch. Public design systems are often maintained by internal teams or even the open-source community. They frequently issue updates, upgrades, and bug fixes to keep the design system relevant and current with the newest design trends and best practices. This reduces the strain on your team to constantly monitor and update the design system. In this article, we will look at one of the public design systems, the Atlassian Design System.
Deep Dive in Integrating Atlassian Design System Integration
React Integration
@atlaskit Library
For React developers, the Atlaskit library is the foundation for integrating ADS. This library includes a comprehensive set of components written using TypeScript to provide type safety and better interoperability with current JavaScript codebases.
Component Props
Each component in Atlaskit has a well-defined set of props. These properties enable developers to fine-tune and regulate component behavior. For example, a button component may include properties such as appearance, isDisabled, and onClick, which allow developers to quickly alter its behavior and look:
Appearance: Determines the visual style of the button (e.g., primary, secondary).
isDisabled: A boolean flag that disables the button.
onClick: A callback function that is invoked when the button is clicked.
Hooks and Contexts
ADS leverages React hooks and context APIs extensively, promoting a functional programming approach. This methodology enhances code maintainability and state management.
Hooks: Custom hooks, like useTheme and useModal, encapsulate complicated logic and state management, resulting in clean, reusable solutions.
Context API: React's Context API is used to handle theming and global state, ensuring that state and theme propagate consistently throughout the application.
Continuous Integration and Deployment
ADS integration with CI/CD workflows is a simple approach. Because components are published on npm, ADS allows for automated updates and dependency management, ensuring that development teams can always take advantage of the most recent features and enhancements.
Versioning and Publishing
npm: Components are versioned and published on npm, allowing for simple installation and upgrades via package managers such as npm or yarn. This versioning technique utilizes semantic versioning (server), which ensures backward compatibility and unambiguous upgrade routes.
Cross-Browser and Cross-Platform Compatibility:
Atlaskit components are rigorously tested across a wide range of browsers and platforms to ensure consistent behavior and appearance.
Compatibility with popular browsers such as Chrome, Firefox, Safari, and Edge is verified, along with support for desktop, mobile, and tablet devices.
Polyfills and fallbacks are provided where necessary to ensure graceful degradation in older browsers and environments.
By following these guidelines, integrating the Atlassian Design System can significantly enhance the consistency and efficiency of your product development process. Whether you're tackling theming complexities or aiming to get new designers up to speed quickly, ADS provides the tools and principles needed for success.
The Role of ChatGPT in Software Development: A Tool, Not a Crutch
Artificial intelligence (AI) is rapidly transforming various industries, and software development is no exception. ChatGPT is helpful, but not an answer to every question. Developers should avoid too much reliance on ChatGPT. Developers should know how to use their skills and try to solve the complex problem first on their own to increase their knowledge and self-reliance, and also do research before using AI tools like ChatGPT.
Developers might become overly dependent on AI tools, leading to a decline in their problem-solving skills and deep understanding of programming concepts.
Developers should use their own logic instead to create their designs, avoiding ChatGPT, which may help in building and testing your analytical and logical skills.
The Promises of AI in Software Development
AI tools like ChatGPT are very powerful at solving complex problems and providing instant solutions, which leads to increased efficiency and productivity, allowing developers to focus on more creative and complex aspects of their work.
Code Generation: Quick conversion of human language to code without knowing the basics.
Debugging Assistance: Identifying bugs and suggesting fixes.
Learning Aid: Assists learning complex concepts with detailed explanation.
Documentation: Assist in writing comprehensive and clear documentation in different tones.
Risk of using ChatGPT:
Despite ChatGPT’s many benefits, it also comes with lots of risks.
Overly dependent developers: for developers who are overly dependent on
Skills erosion: constantly relying on chatGPT and AI tools can affect anyone’s critical thinking and problem-solving skills.
Using chatGPT without understanding code—using AI to solve problems without understanding the basic concepts—can make developers shallow and devoid in skills and experience.
They don’t do research. Using chatGPT without doing research on your own can prevent you from learning new technologies, exploring new things, understanding other concepts, and the actual reason behind any problem.
Balancing AI Use with Personal Development
To maximize the benefits of ChatGPT while minimizing its risks, developers should adopt a balanced approach. Here are some strategies to achieve this balance:
AI as friend, not substitute: Treat ChatGPT as a helpful assistant rather than the primary source of solutions. Use it to complement your problem-solving efforts, not replace them.
Learn and understand: When ChatGPT provides a solution, take the time to understand how and why it works. Research the concepts involved and try to implement similar solutions on your own.
Challenge Yourself: Tackle complex problems and try to solve them on your own; it boosts your confidence.
Stay Updated: Continuously learn new technologies and improve your knowledge of the latest trending technologies.
Conclusion
As AI advances in every industry, including software development, it's essential for developers to strike a balance between leveraging AI and using their own problem-solving skills. By using chatGPT as a tool rather than a crutch, developers can enhance their productivity while ensuring they continue to grow and excel in their craft. Ultimately, the goal is to use AI to augment human capabilities, not to replace them.
Navigating IDE and OS Compatibility: A Developer's Journey with IntelliJ IDEA
In the dynamic realm of software development, the choice of an Integrated Development Environment (IDE) is akin to selecting the perfect instrument for a craftsperson. It's a decision that profoundly influences productivity, workflow efficiency, and ultimately, the quality of the end product. Among the myriad of options available, IntelliJ IDEA
stands out as a beacon for Java developers, offering a robust platform tailored to their specific needs.
“An IDE is not just a tool; it's a sanctuary where ideas take shape and dreams become code.”
Unleashing the Power of Java Development
IntelliJ IDEA serves as a powerhouse for Java developers, providing a comprehensive suite of features and intelligent tools finely tuned for Java-centric projects. Its seamless integration with Java frameworks and libraries streamlines the development process, empowering developers to translate their logic into code with unparalleled ease.
Elevating Coding Experience
A hallmark of IntelliJ IDEA lies in its advanced code assistance capabilities. Through intelligent code analysis, real-time suggestions, and auto-completion, the IDE significantly enhances coding efficiency, enabling developers to write clean, error-free code swiftly.
Seamless Workflow Integration
Streamlining the development lifecycle, IntelliJ IDEA offers a plethora of integrated tools for testing, building, and deploying applications. From seamless version control integration to automated deployment pipelines, the IDE fosters a cohesive development environment, where developers can focus on innovation rather than administrative tasks.
Navigating Challenges: A Developer's Odyssey
Windows Subsystem for Linux (WSL)
Integrating IntelliJ IDEA within the Windows Subsystem for Linux (WSL) initially seemed promising for developers seeking the best of both worlds – the familiarity of Windows alongside the power of Linux. However, the nascent state of WSL presented unforeseen hurdles. Issues ranging from erratic performance to system slowdowns plagued development efforts, significantly hampering productivity. Despite exhaustive troubleshooting attempts and diligent exploration of potential remedies, the elusive solution to WSL's instability remained beyond grasp. This predicament compelled developers to pivot towards alternative avenues in search of a more conducive development environment.
Windows Woes
Transitioning to a native Windows environment was envisioned as a respite from the challenges encountered with WSL. Yet, as project complexity burgeoned, so did the strain on system resources. The emergence of system lags and exponential memory consumption proved to be a formidable obstacle, undermining the efficiency of development workflows. This unforeseen setback not only impeded project timelines but also served as a litmus test for the resilience of our development setup. Despite valiant efforts to optimize performance and mitigate resource constraints, the specter of system instability persisted, necessitating a paradigm shift in our approach to development.
Embracing Linux
In the quest for a sanctuary conducive to uninterrupted development, the journey ultimately led to the embrace of Linux. Renowned for its open-source ethos and unparalleled performance, Linux emerged as the quintessential platform for nurturing the symbiotic relationship between IntelliJ IDEA and the developer. The migration to Ubuntu 20.04, coupled with the utilization of IntelliJ Ultimate 2024, marked the dawn of a new era characterized by seamless development. Linux's inherent stability and robustness provided an ideal ecosystem for IntelliJ IDEA to thrive, enabling developers to channel their creative energies towards innovation without the encumbrance of technical constraints.
Charting the Course Forward
The odyssey with IntelliJ IDEA underscores two pivotal lessons:
Choose Your IDE Wisely: A developer's choice of IDE profoundly impacts productivity. Conduct thorough research and select an IDE that aligns with your workflow and project requirements.
Harmony of IDE and Operating System: The compatibility between IDEs and operating systems is crucial for seamless development. Invest time in finding the right OS-IDE synergy to optimize productivity and minimize disruptions.
By navigating through the trials and tribulations of different development environments, the odyssey underscores the importance of adaptability and resilience in the face of adversity. It serves as a poignant reminder of the symbiotic relationship between developers and their chosen tools, wherein compatibility and synergy are paramount for fostering productivity and innovation. As we continue to chart our course in the ever-evolving landscape of software development, may our experiences serve as beacons of guidance for fellow developers embarking on their own odysseys of exploration and discovery.
How to start Atlassian applications in standalone debug mode?
How to run atlas standalone command in debug mode?
It is very easy to run atlas standalone in debug mode. Follow the steps below
Atlas run standalone sample
Below is the example which you can use to run Jira version 9.4.11 in standalone mode
atlas-run-standalone --product jira --version 9.4.11
Provide jvmargs
You just need to provide jvmargs to atlas-run-standalone command. The jvmargs should look like as below :
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
Finally
To run Jira in debug mode, combine the above two by using --jvmargs flag
atlas-run-standalone --product jira --version 9.4.11 --jvmargs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005'
References :
Note: We have tried and tested this on Jira version 9.4.11 and 9.11.2. Please reach out to us if this no longer works using contact us, we may have a better way by then.