Header image

Crawl Website Đơn Giản Với Postman

20/12/2022

2.52k

Mở đầu

Trong kiểm thử API, chúng ta không xa lạ gì với Postman, một tool kiểm thử API rất phổ biến và được sử dụng trong nhiều trường hợp khác nhau. Nếu như bạn chưa rõ API là gì, có thể tham khảo lại bài viết giới thiệu về API cơ bản của mình tại ĐÂY.

Trong bài viết này, mình sẽ hướng dẫn các bạn cách crawl đơn giản một website bằng Postman nhằm kiểm tra xem các link hay hình ảnh có trong website đó có bị die hay lỗi gì không? 

Crawl Website là việc lấy thông tin từ website , trích xuất ra những thông tin người sử dụng cần, đồng thời cũng tìm những link có trong trang web đó và tự động truy cập vào những link đó. Quá trình đó sẽ lặp đi lặp lại đến khi thu thập đủ thông tin người dùng cần. 

Ví dụ dự án của bạn có một website như Landing Page hoặc trang chủ chẳng hạn, và trong trang lại có các hình ảnh, các hyperlink dẫn tới các trang con hoặc các website khác. Sau một thời gian bạn cần kiểm tra lại xem những hyperlink đó có còn hoạt động hay không. Thay vì phải click thủ công từng link một thì Postman có thể giúp bạn đơn giản hoá và tiết kiệm thời gian hơn cho việc này rất nhiều. Trước khi đi sâu vào bài viết, bạn cần có một số kiến thức về các khái niệm dưới đây:

  • Script trong Postman
  • Runner trong Postman
  • Có một ít kiến thức cơ bản về Javascript

Khâu chuẩn bị

Để bắt đầu, máy tính của bạn cần cài đặt Postman, tất nhiên rồi. Sau đó chúng ta sẽ tạo một Collection chứa hai Request với tên bất kỳ và hai biến collection. Trong ví dụ dưới đây, mình sẽ tạo Collection tên Crawl Website cùng 2 request:

  • Input check: Request này dùng để kiểm tra đầu vào trước khi crawl.
  • URL check: Request chính dùng để crawl website.
  • 2 biến collection gồm có: 
    • rootUrl: URL gốc của trang cần check
    • startUrl: URL bắt đầu khi chạy test, ở đây mình sẽ để rootUrl và startUrl chung 1 URL

Input check

Input check

Giờ chúng ta cùng thiết lập cho request đầu tiên. Ở request này, mình sẽ code tại phần Pre-request nhằm kiểm tra các đầu vào trong quá trình crawl website. Dưới đây là danh sách các function mình cần tạo trong request này

  • Kiểm tra danh sách biến có trong collection
  • Kiểm tra giá trị URL gán vào biến có định dạng hợp lệ
  • Tạo biến Global để sử dụng cho request tiếp theo

Như mình đã nói ở phần mở đầu, các bạn cần có kiến thức cơ bản về javascript để có thể hiểu hơn và tuỳ biến lại code phù hợp với nhu cầu của dự án. Mình sẽ có gắng giải thích đơn giản để những bạn ít biết về code vẫn có thể sử dụng được.

Ở request này, URL của request chúng ta sẽ để biến {{startUrl}} với phương thức là GET.

Input check

Kiểm tra danh sách biến có trong collection

Trước khi kiểm tra được danh sách các biến có trong collection, ta sẽ chuyển các biến đó thành object và gán vào biến postmanVariables

<strong>const</strong> postmanVariables = pm.collectionVariables.toObject();

Sau đó ta kiểm tra các biến cần sử dụng đã có trong collection hay chưa

pm.expect(postmanVariables).to.have.all.keys("startUrl", "rootUrl");

Kiểm tra giá trị URL gán vào biến có định dạng hợp lệ

Để kiểm tra giá trị URL gán vào biến có định dạng hợp lệ, ta sẽ sử dụng Regex. Đầu tiên ta sẽ gán định dạng URL viết dưới dạng regex vào biến urlRegex và so sánh các giá trị URL trong 2 biến collection là startURL và rootURL có giống với urlRegex hay không.

const urlRegex = /^https?:\/\//;
pm.expect(postmanVariables.startUrl, 'startUrl does not match URL pattern').to.match(urlRegex);
pm.expect(postmanVariables.rootUrl, 'rootUrl does not match URL pattern').to.match(urlRegex);

Tạo biến Global để sử dụng cho request tiếp theo

Kết thúc script mình sẽ tạo biến 3 biến là link, url, index cho request tiếp theo. Ở đây mình sử dụng biến Global để cho dễ truy cập và lấy giá trị giữa các request, tuỳ thuộc vào tính chất dự án, bạn có thể sửa lại thành biến cho 1 environment cũng không có vấn đề gì nhé. 

  • links: Mảng các link ta lấy được khi crawl một trang
pm.globals.set("links", "[]");
  • url: URL đang test
pm.globals.set("url", postmanVariables.startUrl);
  • index: Số thứ tự của URL cần test trong mảng links ta crawl được
pm.globals.set("index", -1);

URL check

URL check

Sau khi thiết lập xong request Pre-check, ta chuyển sang request URL check, đây sẽ là request chạy chính của mình. 

Ở request này, URL của request chúng ta sẽ để biến {{url}} với phương thức là GET.

URL check

Dưới đây là danh sách các function sẽ sử dụng trong request này:

  • Kiểm tra link lỗi
  • Lấy các hyperlink có trong website
  • Lọc các link không liên và lặp crawl
  • Kết thúc vòng lặp

Trước khi bắt đầu thì ta sẽ gán giá trị URL của 2 biến collection và 3 biến Global thành các biến Local cho dễ sử dụng

const startUrl = pm.collectionVariables.get("startUrl");
const rootUrl = pm.collectionVariables.get("rootUrl");
const links = JSON.parse(pm.globals.get("links"));
const currentUrl = pm.globals.get("url");
const currentIndex = parseInt(pm.globals.get("index"));

Kiểm tra link lỗi

Giờ ta sẽ tạo 1 hàm để kiểm tra xem link mình lấy về có bị lỗi hay không. Hiện tại thì link chúng ta test ban đầu chính là URL bạn gán vào biến startUrl.

pm.test(`Link to "${currentUrl}" works`, function () {
    try {
        pm.response.to.not.be.error;
    }
    catch (error) {
        console.log(`FAILED :: ${currentUrl}`);
        console.log(`FAILED :: status code is ${pm.response.code}`);
        
        throw error;
    }
});

Trong đó hàm try để kiểm tra xem link đó có trả về response lỗi hay không và hàm catch dùng để log lại thông tin lỗi. Tuỳ vào nhu cầu bạn có thể log thêm những thông tin khác bạn muốn kiểm tra nhé.

Lấy các hyperlink có trong webiste

Sau khi ta đã kiểm tra link ban đầu không bị lỗi, ta sẽ chạy hàm lấy các hyperlink có trong URL đó như sau:

if (currentUrl.includes(startUrl)) {
    const $ = cheerio.load(pm.response.text());
    
    $("a").each(function () {
        const newLink = $(this).attr("href");
        
        if (!links.includes(newLink)) {
            links.push(newLink);
        }
    });

    $("img").each(function () {
        const newLink = $(this).attr("src");
        
        if (!links.includes(newLink)) {
            links.push(newLink);
        }
    });
}

Để lấy dữ liệu từ trang web, ta sẽ crawl HTML của web đó và tìm kiếm thông tin ta cần từ các tag có trong HTML lấy về. Trong bài viết này mình sẽ thư viện Cheerio để lấy HTML của website cần test và gán nó vào biến $. Sau khi có được HTML rồi, ta sẽ tạo vòng lặp each để tìm các tag <a> và tag <img>, sau đó  lấy các URL trong attribute “href” ở trong <a> và “src” ở trong <img>. Tiếp đến ta sẽ gán nó vào biến newLink. Ngoài ra tuỳ thuộc vào nhu cầu và tính chất của trang web, các bạn có thể bổ sung thêm các thẻ và attribute có chứa URL cần test như <link> chẳng hạn.

Vì ta chỉ cần check mỗi link 1 lần nên mình sẽ viết thêm 1 hàm if để kiểm tra xem URL lấy được đã được lấy trước đó hay chưa, nếu chưa thì sẽ bỏ link đó vào mảng links. Ở bước này bạn cũng có thể bổ sung thêm các điều kiện khác để check link lấy được tuỳ thuộc vào nhu cầu của bạn như không lấy link ads hay action link,…

Lọc các link không liên quan và lặp crawl

Chúng ta đã đi được hơn nữa quãng đường rồi. Sau khi lấy được các link có trong web và bỏ vào mảng links, giờ ta sẽ viết 1 function để trích xuất các link đó và chạy tiếp cũng như lọc những link không liên quan.

const [nextUrl, nextIndex] = getNextUrlAndIndex(links, currentIndex);
function getNextUrlAndIndex (links = [], index = 0) {
    const nextIndex = index + 1;
    
    if (links.length - 1 === nextIndex) {
        return [];
    }
    
    const linkUrl = links[nextIndex];
    
    if (!linkUrl) {
        // Skip null links
        console.log('Encountered a null link.');
        
        // Try to get the next link
        return getNextUrlAndIndex(links, nextIndex);
    }
    
    if (/^https?:\/\//.test(linkUrl)) {
        // Return if not a relative link
        return [linkUrl, nextIndex];
    }
    
    // If the link is relative, prepend with rootUrl
    const cleanedRoot = rootUrl.replace(/\/$/, '');
    const cleanedPath = linkUrl.replace(/^[\.\/]+/, '');
    
    return [[cleanedRoot, cleanedPath].join('/'), nextIndex];
}

Function này ta sẽ sử dụng biến links chứa mảng link đã lấy và biến index nhằm trích xuất vị trí link ta muốn chạy tiếp.

Hàm if đầu tiên sẽ check nếu như ta chạy xong hết mảng link thì sẽ trả về mảng rỗng.

Hàm if thứ 2 sẽ kiểm tra loại trừ các loại link mà bạn không muốn test, ở đây mình sẽ loại trừ null link, ngoài ra bạn có thể bổ sung thêm các loại link khác như link download chẳng hạn.

Hàm if tiếp theo sẽ dùng regex để kiểm tra xem link đó có nằm trong các trang con của mình hay không. Mình sẽ check bằng logic nếu như đầu URL đó giống với biến rootUrl thì sẽ truy cập tiếp vào trang đó và lấy tiếp các URL có trong trang con và lặp lại đến khi nào không còn tìm thấy nữa thì thôi.

Kết thúc vòng lặp

Cuối cùng chúng ta sẽ chạy 1 hàm if để kết thúc vòng lặp crawl này

if (nextUrl) {
    // Update global variables
    pm.globals.set("links", JSON.stringify(links));
    pm.globals.set("url", nextUrl);
    pm.globals.set("index", nextIndex);

    postman.setNextRequest("Check URL");
}
else {
    console.log("No more links to check!");
    
    // Clear global variables
    pm.globals.clear("links");
    pm.globals.clear("url");
    pm.globals.clear("index");
    
    // End the loop
    postman.setNextRequest(null);
}

Trong hàm if này nếu như vẫn còn get được link từ website thì sẽ tiếp tục gán vào biến Local để chạy tiếp bằng hàm postman.setNextRequest(“Check URL”);. Nếu như hết link thì mình sẽ đặt lệnh clear biến global để cho gọn phần biến tránh ảnh hưởng cho những lần chạy sau và set Next Request về null để kết thúc vòng lặp.

Kết

Vậy là chúng ta đã hoàn thành một collection crawl website đơn giản bằng Postman. Hi vọng các bạn có thể áp dụng được vào trong dự án của mình và hẹn gặp các bạn ở những bài viết tiếp theo.

Reference

Crawl Website

Regex

Postman Collection

Related Blog

recap Hackathon AI-driven event of SupremeTech

Our culture

+0

    SupremeTech’s AI Hackathon 2025: A blend of Product-Focused Spirit and AI-assisted Development

    On September 6–7 of 2025, we hosted our very first AI-Driven Development Hackathon. Ten teams, all made up of SupremeTech members, stepped out of their daily routines to take on real business challenges. Within just 22 hours, they brainstormed, coded, and pitched solutions showcasing their creative application of AI-powered tools. This Hackathon was more than a competition. It was an opportunity for SupremeTech’s members to experiment with AI in practical ways, strengthen their teamwork, and grow into product builders in the AI era. And, of course, they get themselves a chance to win VND 100,000,000 in prize money. Real business challenges from retail & tourism industries Before jumping into the final pitches of 10 teams, let’s take a look at the challenges that will later inspire their creativity. Some of them are quite familiar topics, while others might be a bit more challenging and out-of-the-box.  As CEO Mr. Bình explained: “When shaping the problem statement, I wanted to balance three things. First, it had to be close enough to our real business so that outcomes could have practical value. Second, it needed to challenge teams to apply AI meaningfully not just add AI as a decoration, but use it to create efficiency or new capability. And third, it should be simple and open enough so that everyone, regardless of role, could participate and learn something from the process.” Though this Hackathon centers the theme of “AI-Driven Development”, each challenge was designed to be: Close to real business needs so that outcomes could have practical applicationsAI-driven, but in a practical and meaningful way, to create efficiency or new capabilitiesOpen enough for all roles to participate, learn, and contribute Now, let’s dive into the details of each challenge.  Omnichannel E-Commerce & Loyalty App for Retail Brands This is one of SupremeTech’s current areas of expertise and key services. By including it as a challenge topic, teams worked on solutions that are highly applicable to existing clients, directly supporting our clients’ business growth.  For participants who face this challenge, it could be both a blessing and a curse. We’ve been building and managing a variety of EC and loyalty systems for clients. But when it comes to building a new one using AI, replicating the past experience may not be a smart choice. Judges, for sure, would want to see some real enhancements in the development process empowered by AI, not to mention the creativity in the strategic approach to this very familiar topic.  The original statement requires teams to develop an application that solves the problem of disconnected retail experiences. The solution should unify online and offline shopping while deeply integrating loyalty programs and personalization.  There could be a huge number of variations coming up from this statement. Stay tuned for the highlight performance!  Destination and Experience Management System for Tourism Managing group travel is a complex task often disturbed by miscommunication and inefficiencies. In a tourism hub like Da Nang, where businesses host frequent tours and events for a very large group of travelers, the ability to streamline logistics and improve participant engagement directly impacts customer satisfaction.  For companies, such apps not only reduce operational headaches but also enhance the overall brand experience they deliver. It can even drive sales if well structured and managed. In this statement, teams are required to develop a platform that streamlines group trip management. The solution should enable organizers to coordinate transportation, schedules, and interactions in one place, instead of relying on scattered tools like messenger apps.  The topic reflects SupremeTech’s own company trip pain points and has strong application potential for Da Nang’s tourism and hospitality businesses. Talent & Performance Management System for HR Apart from two industries above, in the third problem statement, we aimed to tackle the challenges of every human-driven company like ourselves.   When it comes to an integrated platform that not only tracks performance but also supports continuous growth and recognition, there’s very few choices.  This statement requires teams to develop an application that solves the problem of fragmented performance management. The solution should integrate goal setting, performance tracking, continuous feedback, and talent development into a single platform, helping organizations build a transparent culture where employees are recognized and aligned with business goals. How teams build the product is as important as the product itself Just as important as what teams built was how they built it. The Hackathon wasn’t only about coming up with clever ideas, it was about proving that execution, process, and teamwork are just as critical as the final product.  Many teams leaned on AI not just as a tool but as a true co-pilot: using AI-assisted frameworks to prototype faster, automating repetitive tasks, automating testing, and finding smarter ways to accelerate Agile development. What stood out was how teams adapted their workflows to make the most of AI. Some rethought their sprint planning with AI-driven insights. Others applied AI models to cut down on development cycles. And many discovered new ways to collaborate more effectively by letting AI handle the heavy lifting.  The Hackathon turned into a live experiment in how AI can reshape the way we build software. Creativity isn’t just in the idea itself, but in the entire journey of bringing it to life. Perspectives from the leaders and the participants From leadership: The Hackathon aligned employees with real client challenges, ensuring that innovation can directly contribute to business value. It proved that AI can be embedded into everyday problem-solving, not just theoretical projects. As Vice President Mr. Vĩ shared: “AI has already been selectively applied in SupremeTech’s real projects, depending on client expectations and suitability. In many cases, it helps optimize software production costs and shorten time-to-market. Through this Hackathon, I hope to spread the AI-assist mindset to a larger part of the company, so that AI gradually becomes embedded across all projects: enhancing efficiency, improving quality, and ultimately bringing benefits to both clients and the company. This year’s Hackathon focuses more on unlocking internal strength and setting a direction for the future. If everything goes according to plan, we will publish AI-assisted development as a new service offering. It is a clear statement that AI is being strategically applied at SupremeTech to deliver tangible value to our clients.” From participants: The challenge statements sparked two different but equally positive reactions.  Some teams loved how practical and relevant they were by mirroring the real projects we handle at SupremeTech. This gave them the perfect chance to not only test AI-assisted development but also to build solutions that might one day become our next official product. On the other hand, many appreciated how broad the challenges were. It leaves space for bold ideas and limitless creativity. With that freedom, participants could push boundaries, think like product owners, and imagine possibilities beyond the usual project scope. Conclusion The SupremeTech AI Hackathon 2025 proved to be more than an internal competition. From a business perspective: Participants gained experience and insights that sharpened their ability to think with a business mindset, ensuring their solutions were tied to real market needs. From a technical perspective: The event introduced an AI-assisted development process and innovative frameworks that can be applied immediately in client projects. By turning challenges into opportunities, the Hackathon reinforced SupremeTech’s positioning as a future-ready partner, capable of combining innovation, culture, and technical excellence to deliver AI-driven value to clients.

    10/09/2025

    92

    Quy Huynh

    Our culture

    +0

      SupremeTech’s AI Hackathon 2025: A blend of Product-Focused Spirit and AI-assisted Development

      10/09/2025

      92

      Quy Huynh

      Hackathon AI SupremeTech 2025

      Our culture

      +0

        A to Z about SupremeTech’s AI Hackathon 2025: Why We Do It and What to Expect

        This September 6–7, SupremeTech will host its first AI-Driven Development Hackathon, a landmark event designed to inspire teams to embrace artificial intelligence as a core part of how we work, innovate, and grow. The Hackathon is not just a competition. It is a statement of SupremeTech’s belief that learning and innovation are the backbone of both personal and organizational growth. Through this event, our engineers and product teams will have the opportunity to experiment, challenge themselves, and use AI to reimagine the way they work. By fostering creativity and adaptability, the Hackathon aims to enhance work efficiency today while leading the way for AI-assisted development as a core strength of our future. Why Hackathon Matters Now There are several ways companies may choose to approach and apply AI in their working process: training, workshop,… For SupremeTech we want to inspire our developers with a fun blend of innovative and competitive experiences. Hackathon is exactly the format we’re looking for. They compress ideation, experimentation, and execution into an intensive timeframe, creating an environment where bold ideas can quickly turn into actionable solutions. Furthermore, the high pressure of time would foster teamwork, collaboration and bonding to the next level. At SupremeTech, the AI Hackathon 2025 will serve as: A safe space to test AI ideas from concept to execution.A platform to help employees step out of their comfort zones and practice product-building skills.An accelerator of cross-functional teamwork, where developers, designers, and product leaders work together with AI as a co-pilot.A signal to clients and partners that SupremeTech is forward-looking, innovation-driven, and committed to AI adoption. SupremeTech AI Hackathon 2025 Overview Message & Objective:To raise awareness of the importance of continuous learning, growth, and self-breakthrough, enabling each individual to move forward together in collective progress. Format:The main theme of this Hackathon is “AI-Driven Development” focusing on how teams can utilize AI tools to build solutions and solve real-world problems.  Teams will have 22 hours to complete their challenge, followed by a 30-minute demo and pitching session to the judges. Results will be announced after the competition. Evaluation Criteria:Projects will be assessed across four dimensions: Business Value: Market fit, feasibility, economic efficiency, and contribution to SupremeTech’s brand.Engineering Quality: Coding standards, scalability, maintainability, security, and UI/UX design.Technical Execution: Completion of core features, testing outcomes, innovative use of AI tools, and potential for future expansion.Presentation & Pitching: Clarity of communication, demo quality, time management, team passion, and user experience. Main Business Domains Covered: The Hackathon challenges will center on the Retail sector, with a strong emphasis on Omnichannel and Luxury Retail Businesses. Within this domain, teams will explore AI-driven solutions in three key areas: Customer ExperienceMobile OrderingCustomer Data What Leaders Think About This AI Hackathon To provide insight into the vision behind the Hackathon, we spoke with its three leaders of SupremeTech, who directly run this initiative: Mr. Bình (CEO), Mr. Vĩ (Vice President), and Mr. Đào (CTO). Mr. Bình, CEO of SupremeTech “2025 is a turning point for us, a second-time startup for SupremeTech. The industry is moving very fast with AI, and I want our people to be at the front line of this change, not just following behind.” For Mr. Bình, the Hackathon is about more than prototypes. It is about building a culture where innovation and continuous learning are second nature. He hopes the event will give SupremeTech members the awareness that AI is not some distant future, but a tool they can apply today to enhance their work. To clients and partners, the Hackathon demonstrates that SupremeTech is serious about innovation and ready to bring AI-driven value into real projects. Mr. Vĩ, Vice President of SupremeTech From his perspective, the Hackathon plays a strategic role in long-term talent development. “Hopefully, through this AI hackathon, we will contribute to spreading the AI-assist mindset to a large number of company members, thereby popularizing AI in all projects at SupremeTech. In order to improve efficiency and quality, optimize costs to bring benefits to customers and the company.” He expects to see teams not only moving fast but also integrating AI across the entire development process. Beyond internal growth, the Hackathon sends a message to clients: SupremeTech is building a strategic roadmap for AI-assisted development that will optimize costs, shorten delivery time, and raise product quality. Mr. Đào, CTO of SupremeTech When judging, Mr. Đào will look for a balance between creativity and practical application. Both, he believes, are equally important. “The role of developers will not change much, but their skills will. Engineers will need to level up, becoming more capable as they learn to work alongside AI.” For him, the Hackathon represents a chance for teams to explore while ensuring their ideas can translate into real-world impact. >>> Read more related articles: How a Hackathon Changed My Life – A Personal Story from the CEO of SupremeTechHow Could You Join a Hackathon Without Knowing This? Our Developers Are Preparing for D-Day As the countdown to September 6 approaches, excitement is building across SupremeTech. Teams are forming, ideas are being exchanged, and strategies are taking shape. For our developers, this Hackathon is more than just a challenge, it is a chance to step outside their comfort zones, test their skills under pressure. Stay Tuned for Our Upcoming Updates The SupremeTech AI Hackathon 2025 is the beginning of a larger journey. It is about preparing people to work smarter with AI, strengthening a culture of innovation, and ultimately shaping the future of AI-assisted development in SupremeTech and beyond. By creating this space for learning and experimentation, SupremeTech is reaffirming its commitment to being both a reliable partner today and a forward-looking innovator tomorrow. 📩 Read more articles about us here: https://www.supremetech.vn/blog/

        05/09/2025

        109

        Quy Huynh

        Our culture

        +0

          A to Z about SupremeTech’s AI Hackathon 2025: Why We Do It and What to Expect

          05/09/2025

          109

          Quy Huynh

          When Technology Meets a Pioneering Spirit

          Our culture

          +0

            When Technology Meets a Pioneering Spirit

            SupremeTech’s Hackathon 2025 is not just a coding competition, it’s a place where bold ideas are tested, limits are broken, and new connections are formed. Every team carries its own story – about why they joined, their role in the group, or what they expect to gain after this intense yet inspiring journey. Among them, we had the chance to chat with Quang Dũng, a Technical Leader at SupremeTech, who is participating in a Hackathon for the very first time – while also taking on the role of team leader. Usually busy with deadlines and lines of code, this Hackathon is his opportunity to step away from routine work and challenge himself in a completely different way. We listened to his thoughts on challenges, pioneering spirit, and what he hopes to take away from this event. Let’s join SupremeTech and Quang Dũng in this conversation about the Hackathon! Q&A with Quang Dũng 1. Is this your first time joining a Hackathon?Yes, this is my first Hackathon. Everything feels new: the intensity, the pressure, and how teamwork changes under strict time limits. I wanted to experience this firsthand and compare it with the usual way of running projects. 2. What made you decide to sign up for the event?I wanted to challenge myself – to see how far I can go applying AI in real-world work. This is an opportunity for me and my team to pioneer ways of leveraging AI Copilot in a small group project of 3–5 people, while learning new workflows and testing practical applications. And of course, the prizes are also very attractive – hard to resist! Who knows, maybe I can go home and tell my wife that just two days of Hackathon brought back 50 million VND! (laughs). 3. What is your role in the team? If given the choice, what field would you like your project to be applied to?I’m the team leader – responsible for planning, setting the initial direction, and building a sample demo so everyone has a clear vision. In other words, I set the rhythm so the whole team can work smoothly together. If I had the chance to choose a project topic, I’d want it applied to practical areas like booking/reservation systems or internal management tools such as resource and project management. These fields are highly relevant to business needs and can create immediate value. 4. If you had to describe SupremeTech’s AI Hackathon in three words, what would they be? Challenge – Pioneer – Connection. Challenge: because everyone here must push beyond their own limits.Pioneer: because we are applying the latest AI technologies to real-world problems.Connection: connecting people, ideas, and the future of technology. 5. What do you expect to gain from this Hackathon? In my daily work, I’m often involved in project estimation. I expect this event will help me learn how to integrate AI Copilot into product development workflows. That could make estimations more accurate, save time, and improve overall efficiency at the company. In other words, what I look forward to most is not just the prize, but the knowledge and experience that can truly be applied to work. >> Read related articles: How a Hackathon Changed My Life – A Personal Story from the CEO of SupremeTech Closing SupremeTech’s Hackathon is more than a tech playground, it’s an opportunity for each individual to test themselves, learn, and break past their own limits. Stay tuned for the next tech journeys at SupremeTech, where even the smallest ideas can spark big changes!

            22/08/2025

            227

            Our culture

            +0

              When Technology Meets a Pioneering Spirit

              22/08/2025

              227

              tips when joining AI Hackathon

              Knowledge

              +0

                How Could You Join a Hackathon Without Knowing This?

                In the ever-evolving world of programming, the emergence of intelligent support tools is changing the way we write code. Copilot, often described as “AI-powered Pair Programming”, promises to revolutionize the workflow of software developers. In this article, I’ll focus on GitHub Copilot, the AI tool I personally use every day when coding. What is GitHub Copilot? GitHub Copilot is an AI assistant integrated into IDEs (VS Code, IntelliJ IDEA/PyCharm, Neovim) developed by GitHub and OpenAI. It provides context-aware code suggestions as you type, and includes Copilot Chat for Q&A directly inside the IDE. Key Advantages of GitHub Copilot Faster coding: Reduce time spent on repetitive tasks with context-aware suggestions (functions, code blocks, basic tests).Learn new technologies quickly: Get API/syntax examples directly in your IDE; ask further via Copilot Chat.Automate boring work: Scaffold endpoints, write boilerplate, create sample tests, suggest snippets, and ensure consistent formatting.Seamless IDE integration: Works in VS Code, JetBrains, Neovim; suggestions appear as ghost text/inline as you type. Limitations to Keep in Mind Not always accurate: May generate syntax, logic, or performance errors.Solution: Always review, run lint/tests, and benchmark when needed.Security & copyright risks: Could resemble public code or leak if sensitive data is pasted.Solution: Enable “block suggestions matching public code,” avoid entering secrets, follow organizational policies.Risk of dependency: Over-reliance may weaken fundamental coding skills.Solution: Use Copilot for speed, but keep code reviews and tests.Limited domain knowledge: Suggestions may not fit specific business contexts.Solution: Break down requests, add examples/constraints, manually refine critical parts. Quick Start (VS Code) Install extensions: GitHub Copilot and (optional) GitHub Copilot Chat.Log in to GitHub and enable suggestions in Settings.Create a new file, describe requirements in Vietnamese/English within comments or docstrings.Press Tab to accept, Esc to skip. Check IDE shortcuts for more. Simple Examples Just comment your request, and GitHub Copilot will write code for you. Example 1: Utility function to validate email (JavaScript) // Write function isValidEmail(email: string): boolean function isValidEmail(email) { return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email); } Note: The regex above is basic — adjust according to project needs. Example 2: Quick API skeleton (Node.js/Express) // Create route GET /health that returns { status: 'ok' } app.get('/health', (req, res) => { res.json({ status: 'ok' }); }); Example 3: Basic unit test (Jest) // Write test for sum(a,b): 1+2=3, -1+1=0 test('sum basics', () => { expect(sum(1, 2)).toBe(3); expect(sum(-1, 1)).toBe(0); }); Tips for Using GitHub Copilot Effectively Write clear descriptions/comments: specify input, output, constraints, and examples.Always check & optimize code: run lint/tests, review performance, security.Break down complex requests: guide step by step for more accurate suggestions.Use Copilot Chat to research/explain, but always verify with original docs. Key Notes Enable “block suggestions matching public code” in organizational projects.Avoid pasting secrets (keys, credentials, sensitive data) into prompts. Conclusion GitHub Copilot is an AI assistant that helps you code faster, learn new tech quickly, and automate repetitive tasks — but you still need to review, test, and follow security policies. My Personal Experience Coding with GitHub Copilot Before using GitHub Copilot: Spent lots of time on repetitive, structured code.Slowed down by switching between coding and researching online. When first trying Copilot: Felt efficiency in simple features/functions.Struggled with complex features — Copilot often generated unnecessary code.Spent extra time reviewing Copilot’s output. After long-term use: Significantly reduced time on repetitive tasks (boilerplate, data mapping, simple CRUD, …).More consistent code (naming, structure), better documentation (docs, README) thanks to quick suggestions.Changed workflow: “comment-first” or “test-first” to guide Copilot, using Chat to refine and explain.Formed a risky habit: accepting Copilot’s suggestions too quickly without reviewing. Start Small & Measure Effectiveness Enable Copilot in your IDE, try with a utility function or basic test, turn on the “block public code” filter, and avoid pasting secrets. After one week, measure effectiveness (task completion time, amount of boilerplate written manually, number of minor bugs), then decide how much to apply in projects. Good luck using GitHub Copilot effectively — and may you achieve great success at the Hackathon!

                22/08/2025

                196

                Anh Nguyen T.

                Knowledge

                +0

                  How Could You Join a Hackathon Without Knowing This?

                  22/08/2025

                  196

                  Anh Nguyen T.

                  Customize software background

                  Want to customize a software for your business?

                  Meet with us! Schedule a meeting with us!