Thinking Of A Website That List Artist By Past Age (Not Year Born)

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

Muse

Lifer
Jul 11, 2001
39,671
9,510
136
Just ask ChatGPT, it should create the website for you in 5 minutes or less, I'm guessing.
 

Gizmo j

Golden Member
Nov 9, 2013
1,273
344
136
I would also like to do Music and TV series.

Like Tupac was 20 when he released "Pacalypse Now"
 

lxskllr

No Lifer
Nov 30, 2004
58,909
9,245
126
For jul, I want a war chariot pulled by a team of ostrich. I think that would be pretty cool.
 

Gizmo j

Golden Member
Nov 9, 2013
1,273
344
136


Here is a website that showcases the top 1000 best selling movies.

I think this would be very useful for data for my website.

There's a membership that cost $8 that lets you see the cast of the movies, I could of course Google the cast for the movies but I think the membership would be more convenient.
 

nakedfrog

No Lifer
Apr 3, 2001
60,808
16,066
136
Maybe you can work on this website after you finish your dictionary randomizer project.
 

Gizmo j

Golden Member
Nov 9, 2013
1,273
344
136
I was looking at the app "Crow" which is supposed to be the C++ version of "Flask" which is considered the easiest web framework written in python.






 

nakedfrog

No Lifer
Apr 3, 2001
60,808
16,066
136
You should still start with writing your dictionary randomizer project to help get you used to programming in general. Stop searching for other ways to do other projects and start actually working on literally any one single programming project.
 

pete6032

Diamond Member
Dec 3, 2010
7,921
3,412
136
You should still start with writing your dictionary randomizer project to help get you used to programming in general. Stop searching for other ways to do other projects and start actually working on literally any one single programming project.
We are all going to be dead and he's still going to be asking ChatGPT about how to start the project and then posting screenshots of random shit on this forum, which will consist of him and 30 other chatbots.
 
Last edited:
Reactions: stargazr

Red Squirrel

No Lifer
May 24, 2003
69,572
13,239
126
www.anyf.ca
Have you actually coded C++? I would start with something basic and move your way up before trying to code a site in C++. I would start with a text based game, like battleship. Add a fun twist to it, so that every time the AI hits your ship, it deletes a random file in system32. When you loose a game it reboots your computer. You lose the tournament when your computer can't boot up anymore.
 
Reactions: lxskllr

Gizmo j

Golden Member
Nov 9, 2013
1,273
344
136
Have you actually coded C++? I would start with something basic and move your way up before trying to code a site in C++. I would start with a text based game, like battleship. Add a fun twist to it, so that every time the AI hits your ship, it deletes a random file in system32. When you loose a game it reboots your computer. You lose the tournament when your computer can't boot up anymore.

I wanted to make a clone of 'Advance Wars' which is the first turned based mobile game with air land and sea vehicles, it's like a 21st century version of chess.



 
Last edited:

nakedfrog

No Lifer
Apr 3, 2001
60,808
16,066
136
The question was "have you actually coded C++?", not "what other projects did you want to make?"
The first step in making your Advance Wars clone would be writing literally any kind of project that successfully compiles in C++. Or, you know, some other language. The key is to actually write code, as you've been told repeatedly but seem to keep avoiding.
Or, I'll tell you what, make it even easier, start with GameMaker, it's free, and you don't need in-depth programming skills to make it do stuff.
 

lxskllr

No Lifer
Nov 30, 2004
58,909
9,245
126
I feel like you should know how to do something before getting ai to do it for you. Stuff needs to be checked and adjusted before calling it good. If a magic box spits stuff out that's wrong, you're exactly where you were before you started if you can't check it.
 
Reactions: Red Squirrel

Kaido

Elite Member & Kitchen Overlord
Feb 14, 2004
49,834
6,176
136
In order for that to work, wouldn't someone have had to build the silly website he wants in the first place, so he could copy it?

Doesn't matter, he'll just spend all his time asking AIs which AI he should use to write the website for him anyway

There are a lot of websites similar to what he wants to do. Modern AI tools do coding & customization:


You can also chat to create & refine a website:


You no longer have to be a designer AND an artist AND a programmer AND a database person to bring a website idea to life!
 

Red Squirrel

No Lifer
May 24, 2003
69,572
13,239
126
www.anyf.ca
Yeah it's fine to use AI but should understand what's going on. I would pickup a C++ book and read through it and code the examples and understand the concepts first. Then use AI to spit out code snippets to speed up writing basic boilerplate code. I've done that myself a few times. Basically if you want a function that does XYZ you can get AI to code it, then you can adapt it to a larger program. Or if you need a program that does one simple thing sure you can just have it code the whole thing. But should still understand what it's doing.

Here's a basic C++ based web server that will output a list of parameters, it would be a good starting point to writing a website in C++. You're welcome.

Note that this is super crude, if I were to do this for real I'd end up practically rewriting all of that from scratch using more OOP measures. Like the sockets stuff should be it's own class, then you can have a bunch of classes for generating html and such. You also need to be aware of memory management, not just freeing up memory but ensuring you are not fragmenting memory. Lot of things to consider that you might not learn from just copy and pasting AI code.

Code:
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <map>
#include <cstring>
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/socket.h>

const int PORT = 8080;

// Function to parse query string into key-value pairs
std::map<std::string, std::string> parseQueryString(const std::string& query) {
    std::map<std::string, std::string> params;
    std::stringstream ss(query);
    std::string param;

    while (std::getline(ss, param, '&')) {
        size_t pos = param.find('=');
        if (pos != std::string::npos) {
            std::string key = param.substr(0, pos);
            std::string value = param.substr(pos + 1);
            params[key] = value;
        }
    }
    return params;
}

// Function to generate HTML response
std::string generateHtmlResponse(const std::map<std::string, std::string>& params) {
    std::stringstream html;
    html << "HTTP/1.1 200 OK\r\n";
    html << "Content-Type: text/html\r\n";
    html << "Connection: close\r\n";
    html << "\r\n";
    html << "<!DOCTYPE html>\n";
    html << "<html>\n";
    html << "<head><title>Query String Info</title></head>\n";
    html << "<body>\n";
    html << "<h1>Query String Parameters</h1>\n";

    if (params.empty()) {
        html << "<p>No query parameters found.</p>\n";
    } else {
        html << "<table border='1'>\n";
        html << "<tr><th>Parameter</th><th>Value</th></tr>\n";
        for (const auto& param : params) {
            html << "<tr><td>" << param.first << "</td><td>" << param.second << "</td></tr>\n";
        }
        html << "</table>\n";
    }

    html << "</body>\n";
    html << "</html>\n";
    return html.str();
}

int main() {
    // Create socket
    int server_fd = socket(AF_INET, SOCK_STREAM, 0);
    if (server_fd == -1) {
        std::cerr << "Socket creation failed" << std::endl;
        return 1;
    }

    // Set socket options
    int opt = 1;
    setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt));

    // Configure server address
    struct sockaddr_in address;
    address.sin_family = AF_INET;
    address.sin_addr.s_addr = INADDR_ANY;
    address.sin_port = htons(PORT);

    // Bind socket
    if (bind(server_fd, (struct sockaddr*)&address, sizeof(address)) < 0) {
        std::cerr << "Bind failed" << std::endl;
        return 1;
    }

    // Listen for connections
    if (listen(server_fd, 3) < 0) {
        std::cerr << "Listen failed" << std::endl;
        return 1;
    }

    std::cout << "Server running on port " << PORT << std::endl;
    std::cout << "Access via: http://localhost:" << PORT << std::endl;

    while (true) {
        // Accept incoming connection
        int addrlen = sizeof(address);
        int client_socket = accept(server_fd, (struct sockaddr*)&address, (socklen_t*)&addrlen);
        if (client_socket < 0) {
            std::cerr << "Accept failed" << std::endl;
            continue;
        }

        // Read request
        char buffer[1024] = {0};
        read(client_socket, buffer, 1024);

        // Parse the request line
        std::string request(buffer);
        size_t getPos = request.find("GET ");
        if (getPos != std::string::npos) {
            size_t pathEnd = request.find(" ", getPos + 4);
            std::string path = request.substr(getPos + 4, pathEnd - (getPos + 4));

            // Extract query string
            std::string query;
            size_t queryPos = path.find('?');
            if (queryPos != std::string::npos) {
                query = path.substr(queryPos + 1);
            }

            // Parse query parameters
            auto params = parseQueryString(query);

            // Generate and send response
            std::string response = generateHtmlResponse(params);
            write(client_socket, response.c_str(), response.length());
        }

        // Close client connection
        close(client_socket);
    }

    // Close server socket (unreachable in this example)
    close(server_fd);
    return 0;
}


Ex output:

 

Kaido

Elite Member & Kitchen Overlord
Feb 14, 2004
49,834
6,176
136
Yeah it's fine to use AI but should understand what's going on. I would pickup a C++ book and read through it and code the examples and understand the concepts first. Then use AI to spit out code snippets to speed up writing basic boilerplate code. I've done that myself a few times. Basically if you want a function that does XYZ you can get AI to code it, then you can adapt it to a larger program. Or if you need a program that does one simple thing sure you can just have it code the whole thing. But should still understand what it's doing.

I got all the way to Advanced C++ in college before learning that I have math dyslexia lol. Plus I have Inattentive ADHD, so my working memory is pretty poor haha. I haven't done serious programming in 15+ years. Thanks to AI, I can speak my math problems verbally, as well as cobble together basic websites, GUI's, and apps without hitting those functional walls that usually shut me down!
 
Reactions: Red Squirrel

nakedfrog

No Lifer
Apr 3, 2001
60,808
16,066
136
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |