r/learnprogramming • • 1d ago

Advice on developing my first Java POS application for a small grocery store

7 Upvotes

Hi everyone,

I'm a web and mobile development student. I have some programming knowledge, but this is my first time developing a complete application from start to finish.

I've received my first request to build a POS system for a small grocery store, and I'd like to do a good job while also learning from the experience.

The store has only one cashier, so the application should be simple and practical.

The main requirements are:

- Register products by scanning their barcodes and entering their names, prices, and quantities.

- Scan products during checkout and automatically display their names and prices.

- Calculate the total and save each sale.

- Automatically update stock quantities after each sale.

- Review previous sales and check current inventory.

I'd prefer a desktop application that works offline on a single computer.

I'd like to use Java and a database, including SQL if needed, since these are among the technologies I've studied and want to apply in a real project.

I'd appreciate your advice on the following:

  1. Is there an existing free and open-source Java POS application that would be suitable for a small grocery store? I'd like to study its code, understand how it works, and modify it to meet the requirements.

  2. If such a project exists, which ones would you recommend, preferably projects that are reasonably well-organized, functional, and easy to modify?

  3. If modifying an existing project isn't a good option, would building the application from scratch be better?

  4. If I build it from scratch, what technologies would you recommend for the user interface and database?

  5. Could you suggest a step-by-step development roadmap suitable for someone who knows programming basics but hasn't built a complete application before?

Since this is my first client project, I want to choose a sensible approach rather than waste time on an unsuitable codebase. My goal is to deliver a working application while understanding the code and learning how to develop a complete software project.

I'd appreciate any practical advice, project recommendations, or lessons from your experience. Thank you!


r/learnprogramming • • 13h ago

Topic Python vs Java in 2026: Which should a beginner learn first?

0 Upvotes

If you're starting programming from scratch, choosing between Python and Java can feel confusing. Both are useful languages, but a lot depends on what you want to build and how you prefer to learn.

Here's how I would approach the decision.

1. Python: easier to get started

Python has relatively simple, readable syntax, so beginners can focus more on programming logic instead of writing lots of setup code.

For example:

for i in range(5):
    print(i)

Python is a reasonable first choice if you're interested in:

  • Data analysis and data science
  • AI and machine learning
  • Automation and scripting
  • General programming fundamentals

One thing to remember: Python's simple syntax doesn't mean the advanced topics are easy. Data science and machine learning still require practice, statistics, and a good understanding of the underlying concepts.

2. Java: more structure from the beginning

Java requires more explicit structure, even for a small program. That can feel a little overwhelming initially, but it also introduces concepts such as classes, types and object-oriented programming early in the learning process.

Java is worth considering if you're interested in:

  • Backend development
  • Enterprise applications
  • Object-oriented software development
  • Working with Java-based frameworks such as Spring Boot

Java isn't necessarily a bad first language. If you already know that you want to build Java applications, starting directly with Java can make sense.

3. Which one should you choose?

My practical suggestion would be:

  • Completely new to coding and unsure about your direction? Try Python first.
  • Already interested in Java-based backend development? Start with Java.
  • Want to learn both eventually? Pick one, learn the fundamentals, build a few small projects, and then move to the second.

Whichever language you choose, spend time on variables, conditions, loops, functions, data structures, debugging, and problem-solving. Being able to build and explain a small program is more valuable than simply finishing a long tutorial.

Also, don't choose a language based only on claims that it guarantees better jobs or salaries. The relevant skills, projects, role requirements, and your ability to solve problems matter a great deal.

A question for people who have already learned one or both:

If you could advise someone learning programming from scratch in 2026, would you recommend Python or Java first—and what made the biggest difference in your learning experience?

I'd especially like to hear from people who started with one language and later learned the other. What became easier, and what was harder than you expected?


r/learnprogramming • • 1d ago

Looking for a Database Study Partner

3 Upvotes

I’m a junior backend developer working with PHP and Laravel, and I want to strengthen my database fundamentals.

I’m planning to study SQL, database design, indexes, query optimization, transactions, and concurrency.

Looking for someone interested in studying these topics together, sharing resources, solving exercises, and keeping each other accountable.

Let me know if you’re interested.


r/learnprogramming • • 1d ago

How to make an object move in one direction without stopping

6 Upvotes

I have this code here and it almost works perfectly. The issue is the object then bounces back and forth from where the mouse was and where the player is.

void Bullets::Update(sf::Vector2f mousePos, float dt)
{
sf::Vector2f center = bulletpos + sf::Vector2f(radius, radius);
sf::Vector2f toPointer = SetDir(sf::Vector2f(mousePos.x, mousePos.y) - center);

bulletpos += toPointer.normalized() * speed * dt;
}

if more code is needed lmk.


r/learnprogramming • • 2d ago

How do you guys handle keeping up with your skills and agentic programming

76 Upvotes

Hey guys so I've been learning programming since 2015-2016 when I was around 14.

My workflow lately is mostly just prompting/agentic programming and the reason is clear for me. I am just more productive that way.

On one hand, I don't find a reason nowadays to waste a week writing code when I could prompt what i want and see the result in 30 minutes.

On the other hand, progressing through a big codebase is a little bit harder now(even tho with how ai is being developed lately, I see improvements consistently in that segment).

The biggest issue, tho is I feel like my programming skills are getting very rusty, which I honestly dont really love. And with the ways things are heading as a guy who is for the lookout for a job (just finishing my uni degree at the moment) am wondering what being a good programmer will even mean/does mean when it comes to finding a job

I'm curious how other developers are dealing with this. If you noticed the same issues and if you are actively trying to keep your coding skills sharp or you are just shifting towards fully ai assisted development.


r/learnprogramming • • 1d ago

26 y/o Male Looking To Find a Coding Buddy

34 Upvotes

Just as the title states, I'm looking for a coding buddy. Recently decided to do a career switch. I left the Navy last April as an IT guy. Got a job in June as an Operations Analyst and got a taste for coding/programming. Is anybody interested in mentoring and/or learning alongside me? Really just need an accountability partner. I'm essentially going to be teaching myself to become a software developer. Cheers!


r/learnprogramming • • 1d ago

Beginning C++ through game programming, fourth edition.

6 Upvotes

I purchased this book a few years ago. And I was wondering how viable it is for learning, and if anyone has used this book, what are your thoughts on it. I'm turning forty in november, and i'm ready to pick up a new skill i hope this book can put me on the path to that.


r/learnprogramming • • 2d ago

How thoroughly should I check arguments to a function

15 Upvotes

Below is a function that takes in an array of objects and averages their `count` properties:

function computeAverageCount (group) {
  let n = 0
  let sum = 0
  group.forEach(curr => {
    const count = curr.count
    sum = sum + count
    n++
  })
  return n > 0 ? sum / n : 0
}

Let's say that these objects containing count properties were retrieved from a server, which documents that the `counts` are a number greater than or equal to zero. Also, this function is used as an internal helper in an application.

To what extent should I check the data coming in to the function? I could add checks in the function to ensure that the `count` is an integer that is greater than or equal to zero. But if I expect the server to only send those kinds of values, are these checks overkill? I suppose it's possible for something to go wrong server-side that would cause unexpected counts to be sent.

I appreciate the feedback.

UPDATE: Thank you for your responses! It means a lot being able to learn from this community. To summarize the main takeaways:

  • It's definitely a good idea to validate the `count` data. The server may promise that counts are always a number >= 0, but the application should still double check that the data is as expected. In general, validating all server data where it enters the application is the cleanest approach. That way, the validated data can be used anywhere inside of the application and avoids the "shotgun parsing" anti-pattern.
  • As far as unit testing the function goes, it's important to establish the function's contract. How it should behave when given various inputs, including ones that we don't expect to pass in. Writing unit tests for all of these cases helps to reinforce the contract. The function might not include logic to specially handle negative counts because we validated the data beforehand. But it's still good to test these edge cases to confirm the function's behavior. I think that's the general recommendation. There were a couple posts that leaned toward less defensive testing: if we really don't expect negative counts and the function doesn't specifically handle them, then it's not necessary to test this case.

r/learnprogramming • • 2d ago

Topic Python beginner

11 Upvotes

I’m a 1st year computer science student. I have no coding experience and my classmates can finished it like under 20 mins.

How do you code a word problem? I’m stuck of what I should code. I can somehow visualize it but I can’t put it code and I have upcoming midterm. Most of my midterm is word problem then create a function and return statement.


r/learnprogramming • • 1d ago

Topic Jetpack Compose vs XML for a beginner in 2026: what would you pick and why?

2 Upvotes

I just started learning Kotlin for Android and I’m confused about where to begin with UI. Half the tutorials I find use XML but everyone online says Compose is the future. If you were starting from zero today which would you learn first? Is XML still worth the time or is it mostly just old projects at this point?


r/learnprogramming • • 1d ago

Tutorial Fsd

1 Upvotes

I have started my journey with my own to learn full stack without playlist, but if i want to learn fast , I have to watch sm tutorials/ playlists, can smone can suggest the best worth playlist on YouTube

Note! Don't suggest apna clg/ code with Harry/..etc, no offence but II don't like personally!

Plsss suggest me sm worth playlist over thr


r/learnprogramming • • 2d ago

Confused on what to learn next !

2 Upvotes

Am a Pega Lead system with 19 years exp .. almost all in Pega. But off late Pega is being seen as a legacy app and not getting enough large scale projects. Just confused on what to learn next .. Salesforce or service now or something else .. to make a career in this AI era .. any suggestions..


r/learnprogramming • • 2d ago

Topic Looking for programming courses with independent projects to explore different fields

5 Upvotes

Hi everyone!

I'm a CS student, or rather, I recently dropped out of university because I realized that I didn't really enjoy the amount of theory involved in the Italian university system. I'd prefer a more hands-on approach to learning programming.

Thanks to my previous education, I already have some experience with programming languages such as Go (Golang), Java, C, and SQL.

A while ago, I found freeCodeCamp and completed its Responsive Web Design certification. I learned HTML and some CSS, but I never finished the CSS section because, to be honest, freeCodeCamp's learning method started getting on my nerves a bit. I found it too guided and repetitive.

I'd rather learn the basics of a technology and then work on projects independently, with minimal guidance, instead of following step-by-step instructions.

I'm not particularly attached to any specific area of programming, so I'd like to explore as many fields as possible, including web development, app development, backend development, game development, machine learning, and anything else that might be interesting.

I'm mainly looking for free courses or learning resources, preferably with plenty of projects that I can work on independently. Certificates would be a nice bonus, but they're not a requirement.

What courses or resources would you recommend based on your own experience? I'd especially appreciate suggestions that helped you learn by actually building things and solving problems on your own.

Thanks in advance!


r/learnprogramming • • 2d ago

What to make as a beginner web dev?

20 Upvotes

I currently know HTML, CSS and basic Javascript.

I want to expand my knowledge, but not learn other stacks, like react.js etc, right now.

I'm a beginner, so don't give me big projects. I worked to some projects, but couldn't contribute much.

I have also made a small portfolio website for a client (my first and last T-T, till now)


r/learnprogramming • • 3d ago

Is it okay to learn Php in 2026, I find it easier than node.js

68 Upvotes

I have build some projects with the help of AI in MERN Stack, but a senior once told me they made new programming languages/libraries/ frameworks to make building Projects difficult so that less people know how to build apps. I feel sometimes he was right. Php's approach seems easier than node.js


r/learnprogramming • • 1d ago

Topic What is the definition of a self-taught programmer and is it true that most skilled programmers are self-taught?

0 Upvotes

title says it


r/learnprogramming • • 2d ago

Any suggestions on sites like exercism.io to learn coding?

2 Upvotes

I'm working on learning (mainly for now) C#, and i came across the website exercism. I really loved their approach and how they structured the learning process, however, the exercises are really REALLY poorly explained and confusing. Most of the time i'm just trying to understand whats expected from the exercise.

Because of that, the experience became really frustrating after a certain point. Thats why i'm looking for another platform, and if it have an approach simillar to exercism, but better explained, it would be great. Any other suggestions like books or courses are very welcomed too.

As a sidenote, what i'm looking for is to learn C# for multiplatform projects, PostgreSQL, JS (accepting suggestions on frameworks that works well for C# projects) and overall proggraming logic. I began learning proggraming quite a while ago but the courses i used cut a lot of the basics, so I ended up confused and lost after a while, like knowing enough to make a few projects, but lacking on the fundaments (I began with PHP and SQL), so i want to focus on that as well. Recently i began the CS50x course and i'm really liking it.


r/learnprogramming • • 2d ago

Debugging Raycaster points at the wrong direction at angle 0.

2 Upvotes

I have been coding a raycaster following 3DSage's tutorial. The code works generally but there is one specific issue I cannot fix. When the code starts, and I angle the player to slightly right and then left, the horizontal check line points at PI instead of 2PI. When I do I full circle, the issue dissappears, I have been trying to fix this the whole week, but I cannot. I can just make the start angle PI, but that feels like cheating.

#include <iostream>
#include <GL/glut.h>
#include <stdio.h>
#include <math.h>
#define PI 3.1415926535
#define P2 PI/2
#define P3 3*PI/2

//glut <3

float px, py, pdx, pdy, pa; //player positions

void drawPlayer()
{
    glColor3f(1,1,0);
    glPointSize(8);

    glBegin(GL_POINTS); //begin drawing and draw dots at everything after that
    glVertex2i(px, py); //draw a dot here
    glEnd(); //ok stop no  more dots, draw em now, no more dot coordinates

    glLineWidth(3);
    glBegin(GL_LINES);
    glVertex2i(px, py);
    glVertex2i(px + pdx * 5, py + pdy * 5);
    glEnd();
}

int mapX = 8, mapY = 8, mapS = 64;
int map[] =
{
    1,1,1,1,1,1,1,1,
    1,0,1,0,0,0,0,1,
    1,0,1,0,0,0,0,1,
    1,0,1,0,0,0,0,1,
    1,0,0,0,0,0,0,1,
    1,0,0,0,0,1,0,1,
    1,0,0,0,0,0,0,1,
    1,1,1,1,1,1,1,1,

};

void drawMap2D()
{
    int x, y, xo, yo; //o is offset

    for (y = 0; y < mapY; y++)
    {
        for (x=0; x < mapX; x++)
        {
            if (map[y * mapX + x] == 1)
            {
                glColor3f(1,1,1);
            }
            else
            {
                glColor3f(0, 0, 0);
            }

            xo = x * mapS; yo = y * mapS; //top left coordinate of the block that has a size of 64, mapS
            glBegin(GL_QUADS);
            glVertex2i(xo +1, yo + 1);
            glVertex2i(xo + 1, yo+mapS - 1);
            glVertex2i(xo + mapS - 1, yo + mapS - 1);
            glVertex2i(xo+mapS - 1, yo + 1);
            glEnd();
        }
    }

}

void drawRays3D()
{
    int r, mx, my, mp, dof; 
    float rx, ry, ra, xo, yo;
    ra = pa;
    for (r = 0; r < 1; r++)
    {
        //---Check Horizontal Lines---
        dof = 0;
        float aTan = -1 / tan(ra);

        if (ra > PI) //looking up
        {
            ry = (((int)py >> 6) << 6) - 0.0001; /*the top grid of the block
            that the player is standing*/
            rx = ((py - ry) * aTan + px);
            /*130 - 128 = 2, lets say tan gives 3, but it is negative so -3, if
            players x value is 33, then the rayx is 30, so it finds how much the 
            x changed when ry touched a horizontal line*/
            yo = -64;
            xo = -yo * aTan; /*when tan is this and y is 64 what is the offset of
            x to hit the next wall*/
        }

        if (ra < PI) //looking down
        {
            ry = (((int)py >> 6) << 6) +64; //64 moves it to the bottom part of the grid
            rx = ((py - ry) * aTan + px);
            yo = 64;
            xo = -yo * aTan; // dy/tan(ra) = dx, aTan = -1/tan(ra), aTan * -yo = dx
        }

        if (ra == 0 || ra == PI) //looking straight left or right
        {
            rx = px; //so it basically stays there without moving
            ry = py;
            dof = 8; //don't go more than 8
        }

        while (dof < 8)
        {
            mx = (int)(rx) >> 6; // where is rx in the grid
            /*I needed to translate it into pixels to find the actual
            distance, but now I have gotta find which block are we at*/
            my =(int)(ry) >> 6;
            mp = my * mapX + mx;

            if (mp >= 0 && mp < mapX * mapY && map[mp] == 1) //hit wall
            {
                dof = 8; /*althought there aint a wall, do not move more
                artificially set the value to 8*/
            }

            else
            {
                rx += xo;
                ry += yo;
                dof++;

                /*So the line moves according to the ratio of while y = 64
                how much did x change*/
            }
        }

        glColor3f(0, 1, 0);
        glLineWidth(10);
        glBegin(GL_LINES);
        glVertex2i(px, py);
        glVertex2i(rx, ry);
        glEnd();

        //---Check Vertical Lines---
        dof = 0;
        float nTan = -tan(ra);

        if (ra > P2 && ra < P3) //looking left
        {
            rx = (((int)px >> 6) << 6) - 0.0001; /*the top grid of the block
            that the player is standing*/
            ry = ((px - rx) * nTan + py);
            /*130 - 128 = 2, lets say tan gives 3, but it is negative so -3, if
            players x value is 33, then the rayx is 30, so it finds how much the
            x changed when ry touched a horizontal line*/
            xo = -64;
            yo = -xo * nTan; /*when tan is this and y is 64 what is the offset of
            x to hit the next wall*/
        }

        if (ra > P3 || ra < P2) //looking right
        {
            rx = (((int)px >> 6) << 6) + 64; //64 moves it to the bottom part of the grid
            ry = ((px - rx) * nTan + py);
            xo = 64;
            yo = -xo * nTan; // dy/tan(ra) = dx, aTan = -1/tan(ra), aTan * -yo = dx
        }

        if (ra == 0 || ra == PI) //looking straight up or down
        {
            rx = px; //so it basically stays there without moving
            ry = py;
            dof = 8; //don't go more than 8
        }

        while (dof < 8)
        {
            mx = (int)(rx) >> 6; // where is rx in the grid
            /*I needed to translate it into pixels to find the actual
            distance, but now I have gotta find which block are we at*/
            my = (int)(ry) >> 6;
            mp = my * mapX + mx;

            if (mp >= 0 && mp < mapX * mapY && map[mp] == 1) //hit wall
            {
                dof = 8; /*althought there aint a wall, do not move more
                artificially set the value to 8*/
            }

            else
            {
                rx += xo;
                ry += yo;
                dof++;

                /*So the line moves according to the ratio of while y = 64
                how much did x change*/
            }
        }

        glColor3f(1, 0, 0);
        glLineWidth(1);
        glBegin(GL_LINES);
        glVertex2i(px, py);
        glVertex2i(rx,ry);
        glEnd();

    }
}


void display()
{
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    drawMap2D();
    drawRays3D();
    drawPlayer();
    glutSwapBuffers();
}

void buttons (unsigned char key, int x, int y)
{
    if (key == 'a')
    {
        pa -= 0.1;
        if (pa < 0)
        {
            pa += 2 * PI;
        }

        pdx = cos(pa) * 5; //these are vectors with magnitude
        pdy = sin(pa) * 5;
    }

    if (key == 'd')
    {
        pa += 0.1;
        if (pa > 2*PI)
        {
            pa -= 2 * PI;
        }

        pdx = cos(pa) * 5;
        pdy = sin(pa) * 5;
    }

    if (key == 's')
    {
        py -= pdy; //if you add this amount of x and that amount of y, you do to the vector in the middle
        px -= pdx;
    }

    if (key == 'w')
    {
        py += pdy;
        px += pdx;
    }

    glutPostRedisplay(); /*glut pleaseee re-draw the screen, glut 
    does not know it has gotta re-draw
    the screen with the current variables
    something has changed, so please look back at glutdisplayfunc and re-draw it
    */
}

void init()
{
    glClearColor(0.3f, 0.3f, 0.3f, 0.0f); // red, green, blue, alpha
    gluOrtho2D(0, 1024, 512, 0); //top left edge, top right edge[x], bottom edge, top edge [y]

    px = 300; 
    py = 300;

    /*
    questions:
    this,
    why is anything drawn when looking directly left or right*/

    pdx = cos(pa) * 5;
    pdy = sin(pa) * 5;

}

int main(int argc, char* argv[]) 
{
    glutInit(&argc, argv);
    glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA);
    glutInitWindowSize(1024, 512);
    glutCreateWindow("Don't make lemonade!");
    init();
    glutDisplayFunc(display); //if the display is fiddled with do this
    glutKeyboardFunc(buttons); //if a button is pressed do this
    glutMainLoop(); //always listening for stuff like window re-sizing
}

r/learnprogramming • • 2d ago

Resource Why kind of thing would I need to learn to create a GUI app with my current skills?

1 Upvotes

*What kind of thing.

Being unable to edit titles on Reddit is annoying.

I'm looking to create a GUI app for my Linux machine. It's not going to go into production, I just want to be able to create something. Looking all over the place, there are a hundred different things I can do, and almost all of the tutorials require me to learn another language or something.

Now, I'm sure this may be necessary, but if there's one thing I've learnt over my years of studying computing, if you ask "what is the best x for y?" you'll get as many different responses as there are responders. Learning a new language always leaves me as a perpetual beginner, and I'd rather build on what I already know, than start again.

Currently, I am very familiar with Bash, PHP, MySQL, and to a certain extent C++. I also know HTML and CSS.

What I'd like to do is build a GUI for a media player. I've already created a rudimentary CLI for one, and it works, though it's far from pretty. I've tried to create a web based one, and I got fairly far into it, using PHP on the backend, and MySQL for the database, but the limits of HTML mean I cannot harness the power of my preferred Matroska format for videos (something I've been able to do in my terminal based app).

I write almost exclusively in plain text files, and don't use an IDE. Foolish? Probably. But I find it far more portable and easier to understand.

The idea I have, is for me to have a GUI to display the contents of the database, and to organise it in a pretty way to be user friendly, and then when you click on something to play it, it launches MPV player with all the relevant commands I give it. I'm not sure I want to build something with the player built in, as that would probably be far too much work for what I want. And besides, my current CLI app does exactly this, so it would, again, be building on my current knowledge.

What I would like, is for something that would allow me to programme the GUI in an XML like structure, similar to HTML, and style with CSS, use PHP as a backend script to connect to MySQL, and be able to execute terminal based commands so I can launch MPV. Pretty much a website kind of thing that can launch other apps. I have no idea if this is possible, but it would work with what I already know. If it's not possible, is there any kind of thing that would work without requiring me to go right back to the beginning too much?

Edit:

After some tinkering, I think the best thing for me to do is to use C++ with GTK. I have built a minimal working example that prints out the tables of a database, or plays a video. I'm going to build on this, but with the following example I can see how I can achieve what I want.

```

include <gtk/gtk.h>

include <stdio.h>

include <stdlib.h>

include <string.h>

include <mysql/mysql.h>

static void print_hello (GtkWidget widget, gpointer data) { MYSQL *conn; MYSQL_RES *res; MYSQL_ROW row; const char server = "localhost"; const char* user = "root"; const char* password = "password"; /* set me first / const char database = "testdb"; conn = mysql_init(NULL); /* Connect to database */ if (!mysql_real_connect(conn, server, user, password, database, 0, NULL, 0)) { fprintf(stderr, "%s\n", mysql_error(conn)); exit(1); }

/* send SQL query */
if (mysql_query(conn, "show tables")) {
    fprintf(stderr, "%s\n", mysql_error(conn));
    exit(1);
}
res = mysql_use_result(conn);

/* output table name */
printf("MySQL Tables in mysql database:\n");
while ((row = mysql_fetch_row(res)) != NULL)
    printf("%s \n", row[0]);

/* close connection */
mysql_free_result(res);
mysql_close(conn);
g_print ("Hello World\n");

}

static void print_hello2 (GtkWidget *widget, gpointer data) { g_print ("Hello World! You clicked button 2!\n"); system("mpv /path/to/video.mkv"); }

static void activate (GtkApplication *app, gpointer user_data) { GtkWidget *window; GtkWidget *grid; GtkWidget *button;

/* create a new window, and set its title */ window = gtk_application_window_new (app); gtk_window_set_title (GTK_WINDOW (window), "Window");

/* Here we construct the container that is going pack our buttons */ grid = gtk_grid_new ();

/* Pack the container in the window */ gtk_window_set_child (GTK_WINDOW (window), grid);

button = gtk_button_new_with_label ("Button 1"); g_signal_connect (button, "clicked", G_CALLBACK (print_hello), NULL);

/* Place the first button in the grid cell (0, 0), and make it fill * just 1 cell horizontally and vertically (ie no spanning) */ gtk_grid_attach (GTK_GRID (grid), button, 0, 0, 1, 1);

button = gtk_button_new_with_label ("Button 2"); g_signal_connect (button, "clicked", G_CALLBACK (print_hello2), NULL);

/* Place the second button in the grid cell (1, 0), and make it fill * just 1 cell horizontally and vertically (ie no spanning) */ gtk_grid_attach (GTK_GRID (grid), button, 1, 0, 1, 1);

button = gtk_button_new_with_label ("Quit"); g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_window_destroy), window);

/* Place the Quit button in the grid cell (0, 1), and make it * span 2 columns. */ gtk_grid_attach (GTK_GRID (grid), button, 0, 1, 2, 1);

gtk_window_present (GTK_WINDOW (window)); }

int main (int argc, char **argv) { GtkApplication *app; int status;

app = gtk_application_new ("org.gtk.example", G_APPLICATION_FLAGS_NONE); g_signal_connect (app, "activate", G_CALLBACK (activate), NULL); status = g_application_run (G_APPLICATION (app), argc, argv); g_object_unref (app);

return status; } ```


r/learnprogramming • • 3d ago

how to learn "software engineering"

17 Upvotes

Hi guys, I'm a senior in high school, and I'm really confused on where to go

for the record I do know a decent amount of C++ / python (for comp coding and classes) but since then I've started to move to personal projects....

The purpose of these projects is to improve my knowledge tenfold and learn how real software is made. But online, EVERYONE says "coding is dead, and to learn architecture".

But how do you learn that?

Do I delegate sections to AI and then have it explain? Do I create what goes where and then tell the Ai to make it? Or Do I just code it all myself with AI to debug (taking an absurd time).

I feel like only the third one will have me actually learning completely, but at the same time, it'll take 20x the time, and with 20 projects I could probably reach the same level (or more) of learning by having it make + I explain? AHHH i'm just not sure how to make myself super smart and knowledgeable for swe

thanks in advance :)


r/learnprogramming • • 3d ago

What are some actually interesting, and fun programming projects?

10 Upvotes

I am an intermediate programmer, and I just don't know what to make. All the projects people say to do like to do list or weather app seem so lame.

All replies are appreciated!


r/learnprogramming • • 2d ago

I really need help and gaudiness

1 Upvotes

hey. so it could be a little bit of a odd post but I really wish to know other people's opinions. I'm a third year statistic student and this major wasn't really my choice. in my country there is college entrance exam and you kinda have to choose your major according to how well you did in this exam so I couldn't get into a cs or ce program in one of the capital universities so I chose statistic because I've heard it's relevant to ML and data science and back then I didn't know much about programming and tech just that I hold a passion for it. and now I'm very confused about what path I should take. I don't really find myself interested in data related areas and with the new Job market and age of AI I don't know what path to take or if I have any chance in the tech world. every path I think of trying I ended up giving up because I don't think if I hold a chance against someone with years of experience and a cs degree. I really need gaudiness because it's heavily affecting my mental health and self esteem. the idea of open source developers, system engineers, security, robotics and hardware always interested me but these are very different and unrelated. please tell me what I should do just to get out of this loop and what should I learn and in which order to get hands on exprienced. if my plan b is getting a master in cs.


r/learnprogramming • • 2d ago

Hi Everyone! What branch of coding to be actual specialist in upcoming years

0 Upvotes

Hi, everyone!
I’m a computer science student trying to figure out my path. I’d love some advice from the more experienced folks here—you all know the market so much better. What kind of specialist do you think will be in demand over the next few years?


r/learnprogramming • • 2d ago

Topic Pros and Cons using AI while learning?

0 Upvotes

​

I've met a lot of people here who will just rain down hellfire on you for using AI when learning. I'm an ADHD kid, and AI really helped me. I had terrible experience with my teachers back home. So I used AI to create a learning plan. I started with Linux, booted up a Ubuntu USB, and then dug into different frameworks like React and Vue. This helped me build several web applications.

I'd say it depends on how you prompt your assistant and analyze its mistakes. When your skill grows over time, you'll also catch AI mistakes. AI doesn't generate bulletproof code. Is the assistant only as good as its owner?


r/learnprogramming • • 2d ago

Language selecting Need help picking a language, please!

0 Upvotes

Hello,

I am totally lost in this world of programming. I have succesfully coded a working webhook for discord and plan on getting some more stuff sent into it but only with the help of Claude.
I believe it was written in python. I day trade stocks and am tired of software and websites breaking, and/or not really being customizable to my liking so i figured i'd create my own!

I need to know a couple of things.

Time is critical and every second counts. I was looking at Python (of course) but also Rust, C#, C++, and Go. I plan on building more than just webhooks, so information that needs to be passed through in miliseconds and distributed to discord and written into database (SQlite). When I get around to it I would like to build a stand alone app to enable the information to be compiled in a place where I won't have to worry about discord blocking my messages(From to many being sent at one time). It'll be useful for research purposes but also building a self learning automated bot in the long run.

I have had great success so far, so I am just trying to improve my workflow, decrease the number of apps I use, and overall time spent looking through multiple websites to gather information.

-First, is one language faster than another for getting information processed and distributed?
-Seconds, Is there one language that would integrate better with SQlite?
-Last, When building the database for SQlite, Is their any recommended guidlines or tips that could help improve this project?

I am open to any and all suggestions, comments, concerns, you name it. I love to learn and you won't hurt my feelings.
Thank you so much!