Skip to main content
29 votes
Accepted

Python - Tkinter - periodic table of chemical elements

I hope you enjoy this bit of code. I did! Your symbols, keywords and values should have capitalised variable names since they're global constants. However, life would be easier if your symbols were ...
Reinderien's user avatar
  • 63.1k
27 votes

Python - Tkinter - periodic table of chemical elements

Don't optimize the wrong thing You have an excellent review already, so I'll comment on a narrow topic: cramped code layout. For example: ...
FMc's user avatar
  • 12.8k
24 votes
Accepted

2048 with GUI in C

Well done. This is not a complete review, but instead a (short) list of possible improvements I found when I skimmed your code. Documentation First of all: thank you! It's great to have ...
Zeta's user avatar
  • 19.3k
10 votes

A GUI Youtube Player (2)

Thanks for bravely offering up your code. I'm sure it will emerge in better shape. Each development project has its own standards. If they aren't written down in the ReadMe, then we tend to assume ...
J_H's user avatar
  • 32.4k
9 votes
Accepted

C++ "Dear ImGui" file browser

One of the things I'm specifically wondering, is it ok/proper to have static helper functions in the .cpp file if they are not member functions? (should they be member functions and should they even ...
JDługosz's user avatar
  • 11.4k
7 votes
Accepted

Handling dialog closure in a VBA user form

I like how your form is no longer concerned with anything other than being a form. One More Abstraction Level I'd go one step further, and encapsulate the controls, so that the presenter class doesn'...
Mathieu Guindon's user avatar
6 votes
Accepted

AppJar number pad and keyboard

Python has an official style guide, PEP8. It won't hurt getting familiar with it, since it helps keeping your code readable, consistent and ready for others to mess with. Combining Italian and ...
Mast's user avatar
  • 13.4k
5 votes
Accepted

Displaying an arbitrary number of buttons and automatically arranging the buttons

Don't import tkinter twice You're doing this: import tkinter as tk from tkinter import * Remove the second import since you are already importing tkinter. That ...
Bryan Oakley's user avatar
  • 2,089
5 votes
Accepted

Populate Comboboxes with Hashtables using PowerShell

The first thing to observe is that the five pieces of code are identical except for two parameters that are varying. We can capture the common the code in a function (let's call it ...
Dangph's user avatar
  • 1,683
5 votes

GUI Number Generator in QT C++

I see a number of things that may help you improve your program. Use proper case for file names We all know that Windows is not case sensitive with respect to file names, but pretty much every other ...
Edward's user avatar
  • 66.5k
5 votes
Accepted

Qt Number Generator v2

Seems like you've made a lot of improvements since your previous post! Let's get into the review! 1. General Overview a. Use the ...
TrebledJ's user avatar
  • 437
5 votes
Accepted

GUI to organize images, chapter titles, animation steps, and instructions

If there's a list, make it a list Do not represent RxCx variables as separate variables. Represent them as nested lists and it will greatly simplify your code. ...
Reinderien's user avatar
  • 63.1k
5 votes
Accepted

College Billing System - Java

Absolute positioning This: l1.setBounds(550, 100, 250, 20); and lines like it are non-ideal. Absolute positioning will fail to scale the controls and their ...
Reinderien's user avatar
  • 63.1k
5 votes
Accepted

Python PyQt6 populate QTreeWidget with a list of named tuples

You have a pile of unstructured, global code; this needs to be organized into functions and maybe classes Close your cursor once you're done with it, ideally via context management Order your query ...
Reinderien's user avatar
  • 63.1k
5 votes

ConnectFourFX.java - A Java FX GUI app for playing Connect Four against AI

The functions has*Strike() are basically the same function, but with different starting points and different strides through the ...
Toby Speight's user avatar
  • 78.8k
4 votes

Minimal spreadsheet program

The code looks okayish so my point are mostly about code style and preferences, you might easily ignore any if you prefer a different coding style. Apart form things that @janos mentioned: 1....
Alex's user avatar
  • 1,622
4 votes

Minimal spreadsheet program

is_reference The possibility of an IndexError can be mostly eliminated by reordering the conditions: ...
janos's user avatar
  • 111k
4 votes
Accepted

My first Qt application - a multiple-state window with a menu

That's a good first Qt program. Most of my comments are preferences rather than rules, but I'll try to provide justifications. In main(), no need to ...
Toby Speight's user avatar
  • 78.8k
4 votes
Accepted

GUI Application for counting visitors

Personally, when building GUI applications I like to wrap my code into a class, and handle each action into each own method. I'll start from top to bottom. I don't use wildcard ...
Grajdeanu Alex's user avatar
4 votes

Autocomplete for tkinter Entry widgets

Very, very, very nice code! It's very difficult to find something for an improvement. So only some not very important things: In your list comprehension ...
MarianD's user avatar
  • 1,876
4 votes
Accepted

Buttons labelled with the number of times they have been clicked

Here are a few things I'd recommend changing: There's no need to store the sum of a and b. You can always compute it in the ...
Dogbert's user avatar
  • 291
4 votes
Accepted

Basic Countdown Timer

Very clean code indeed, there's not much to be said here. PEP8 I'm sure you've been lectured on this before, but there's an official style guide for Python called PEP8. It states that module-level ...
Daniel's user avatar
  • 4,500
4 votes
Accepted

Enhancing a Conversion calculator

One of the smartest programmer's I've ever known once told me that code is read way more often than it is written, so optimize for the reader1 While it's true that code should be efficient, it also ...
Bryan Oakley's user avatar
  • 2,089
4 votes
Accepted

Platform-agnostic windowing library

I wouldn't use #define macros. They expose the internal naming convention of your OS dependent functions to the world. Once you send out your library to others [as ...
Craig Estey's user avatar
4 votes

2048 with GUI in C

Since the other reviews have already hit most points, I'll just mention a few not already covered. Avoid relative paths in #includes Generally it's better to ...
Edward's user avatar
  • 66.5k
4 votes
Accepted

C++ Qt simple GUI game

When dealing with Qt 5+ prefer the new connect syntax: QObject::connect(ui->tiles01, &QPushButton::clicked, this, &MainWindow::tileCliked); Instead of ...
ratchet freak's user avatar
4 votes
Accepted

C++ Snake game using Qt-framework

Here are some things that may help you improve your program. Use consistent formatting It appears that your code uses tabs in some places and spaces in others, making the code appear badly formatted ...
Edward's user avatar
  • 66.5k

Only top scored, non community-wiki answers of a minimum length are eligible