Add this tag to your question to indicate that you are new to the language of your code. This will often be taken into consideration by reviewers when assessing your code.
7
votes
0answers
32 views
Calculate amount of necessary ingredients
I have started to learn C and decided to recreate my bakery task in C.
As I am new to the language, I am unsure if I have approached the task in the right way using structs. Feedback on the style of ...
1
vote
0answers
18 views
Counting the number of letters in a .txt file in Pascal
I wrote this program that counts the number of letters in random.txt file in the Pascal programming language.
It doesn't matter if the letters are capitalized. Other characters are ignored. When it ...
4
votes
3answers
90 views
Calculation of the money to be paid back to the employer
I'm a beginner developer and I wrote a simple program. How could be the code improved to meet best practices of the development? I mean if the names of classes or variables are enough self-explaining ...
5
votes
1answer
72 views
Game of Hangman that uses classes for C++
I would like feedback on this code.
This is a game of hangman which uses classes but my knowledge of this category is very limited so I did the best I could.
I would like my code to become as ...
3
votes
1answer
55 views
Three variations on a Webpack build script
I am new to "modern" Javascript, and I am reviewing some code from a frontend contractor. I'd like to make the sequential code more descriptive/procedural.
The following code is a from a file called <...
1
vote
1answer
47 views
Prepared statements in PHP
I just heard of prepared statement in PHP and decided to prevent SQL injection with it and wrote a script testing it.
I would like to know what security threats this script can prevent, what security ...
6
votes
1answer
40 views
LLVM Pass that renames all functions
Below is an LLVM pass that I've written to rename all functions in an LLVM bitcode file. I would appreciate tips on what is well done and what is poorly done in the code below. In particular, is there ...
8
votes
3answers
97 views
Procedural style Rock Paper Scissors game using Python 3
I am a newbie to Python and am trying to do the Rock, Paper and Scissors game to revise my knowledge that I have earned so far.
Overview of the program:
This is a two-player game
Ask for player ...
3
votes
1answer
107 views
GUI Application for counting visitors
This code was to create how many people enter the "building" so there will be someone clicking the button "count". I am still improving. Please let me know your honest opinions!
...
6
votes
4answers
79 views
Get 10-day forecast script
I coded a script to print a 10-day forecast for any location to my terminal.
As I am just learning Python (coming from the PHP world - yes, I know...) and have no buddies coding in Python, I would ...
2
votes
1answer
67 views
Simple calculator about keybinding
This is code for a simple calculator. Can someone review it, so I can know if there is something wrong? I also want to know if I can link a keybinding to a JButton so I don't have to write an ...
3
votes
2answers
59 views
REST API for user access using ASP.NET Core
I have been coding in java for more than 3 years. Recently we had to develop REST Web Services for our customers in ASP.NET Core. I am a newbie to both C# and ASP.NET Core stack.
The expectation ...
5
votes
1answer
31 views
Creating ICS calendar events from JSON-like file
the purpose of this code is to take a Taskwarrior (it's a todo list application) server file that is mostly JSON and create unique ICS calendar events. The logic mostly works: I still see some ...
1
vote
0answers
44 views
VBA code that compares values and chooses the lowest [on hold]
I'm new to VBA and I tried to learn it in about a week or so, In these few lines of code I have to compare more prices, choose the lowest and write it to a defined cell, predefined, above the others.
...
3
votes
1answer
161 views
Sorting algorithm, possibly a new one [on hold]
I'm a beginner who has never seen a sorting algorithm's implementation and have decided to try make one on my own (can someone tell me if this has been already used?).
The fact is I have never used ...
2
votes
3answers
95 views
Number-guessing game in Java
I created a java number guessing game. I used some of the same code twice. I would like to know how to further simplify it if possible (I am a java beginner).
...
4
votes
1answer
85 views
Mathematician Game Reimplemented
I coded my first projects in Java but now I also wanted to try C. I've read something about pointers and the rest of my programming knowledge I've "imported" from Java. With this project I tried to ...
4
votes
2answers
96 views
BMI Calculator using Python 3
I am creating a simple BMI Calculator to check if the user is overweight or not. I am not sure how much improvement I need but I do appreciate any comments as to whether the coding is inconsistent.
<...
-2
votes
0answers
16 views
Error when inserting data into a database using Spring and Oracle [closed]
I am a coding newbie, I have been learning spring and I get this error every time. I have tried googling and checking Spring and Java forums, but, I have been unable to find a solution that fits. This ...
2
votes
1answer
36 views
Tic Tac Toe in Android
I made my first Tic Tac Toe game on Android and I'm looking for a way to simplify, make the code more flexible and remove the hardcoded code. I managed to do this game by looking at different ...
0
votes
0answers
22 views
Promises in loop [on hold]
I am new to Promises and ES6 and I am struggling with writing clean code for my problem to process uploaded files. Users can upload multiple files via ajax and if possible I want to process them (...
3
votes
2answers
139 views
Building a simple random equation of size
I'm trying to find a way to make this code more efficient than using a lot of if statements because there are a lot of combinations. The final result variable is an ...
1
vote
1answer
28 views
Time Card Web Application Offline
About & Purpose
Purpose: As said by the title this is just a simple web application for use of a SINGLE user. It has the features of calculating total hours, clocking in, and clocking out. It ...
2
votes
1answer
33 views
Convert decimal to binary and find the maximum number of consecutive 1's in the binary
Task: given a base- 10 integer, n, convert it to binary (base-2). Then find and print the base- 10 integer denoting the maximum number of consecutive 1's in n's binary representation.
What can you ...
-2
votes
0answers
24 views
Java Input form [closed]
I need help doing my assignment I was supposed to write a java program where a user inputs his name, age and gender.I tried this code but it did not output the way I wanted.
This is my code:
...
3
votes
1answer
41 views
Retrieve a number in a webpage and store in a SQLite3 db
I'm beggining Python. So I wrote a program which is supposed to get a number of connected people on a forum (like this one : http://www.jeuxvideo.com/forums/0-51-0-1-0-1-0-blabla-18-25-ans.htm) and ...
2
votes
0answers
33 views
Dungeons and Dragons Initiative Tracker
I just started learning JavaScript (and the Knockout framework), and decided to try and make an initiative tracker for Dungeons and Dragons 5th Edition. It is designed to take an arbitrary number of ...
5
votes
1answer
89 views
Calculate probability of word occurence
I am pretty new in Python and I am not sure if I did everything right in my program. May someone to check it, please. Thank you!
First of all, I have a text file, for example, ...
5
votes
2answers
598 views
Number guess game program in python 3
I started learning Python just yesterday, and so I am aware of my lack of knowledge regarding the language. Below is a program I wrote to simulate a guessing game. I ended up creating a lot of ad hoc ...
-5
votes
1answer
35 views
Strand Sort implementation [closed]
I kinda stumbled upon this new sorting algorithm a few weeks ago and I would appreciate some pointers on how to improve the code (Since I'm a a novice c++ programmer. Been only programming in c++ for ...
3
votes
1answer
65 views
Turn XML into Object
I've got a working program that turns XML into a XmlObject. The object can then be accessed using getName(), getValue(), and getChild(). The code works but I'm looking for recommendations. I couldn't ...
5
votes
1answer
74 views
Puzzle game solver via Backtracking
I'm relatively new to Haskell and I'd like to get feedback on the style of my program. Specifically:
Coding Style: Can any parts be written in a more concise or more readable way?
Misuse: Are there ...
0
votes
0answers
81 views
Sauna experiment
This is my program for a sauna. It is a Swedish sauna meant to only understand Celsius, but the user can only understand Fahrenheit, so when the user inputs Fahrenheit it is converted to celcius. ...
4
votes
1answer
37 views
Using NumPy to scale data in 2 out of 3 columns
The below code takes a csv containing age, weight, height and prints the betas determined through linear regression to an output csv. It runs for 10 iterations using a different alpha for each, and ...
4
votes
1answer
51 views
BingWallpapers: Fetches and applies the image of the day from Bing as the wallpaper
I have written a small desktop program nabeelomer/BingWallpapers in Haskell. This is my first time writing Haskell.
I was wondering how I can make the code use more functional programming features/...
7
votes
4answers
97 views
Doubly Linked List C implementation
I'm a C beginner. I'm studying and implementing some data structures. I'd like to get feedback about my style and decisions I made.
This is a Doubly Linked List. I decided to keep things as simple as ...
1
vote
2answers
23 views
Placement of jQuery function that toggles p tags
I have a page with lots of jquery. There are lots of functions inside:
$( document ).ready(function() {
//lots of functions
});
After that "document ready" ...
4
votes
1answer
86 views
Substitution Cipher in Python 3
I am fairly new to Python 3, and I was challenged to make a substitution cipher. I came up with a very bad way to do it, but I can't think of a better way to do it.
...
8
votes
1answer
104 views
Black Jack Game in Python (Jupyter)
I am working on Jupyter Notebook and I am new to Python. I have created this BlackJack Game (This is my 2nd Project as I am Learning Python. See my 1st - Tic Tac Toe
...
1
vote
0answers
18 views
Calculate the Time it takes to achieve your money goal in Kotlin
I am writing a very simple test application in Kotlin for Android, where I just want to calculate the time it takes for someone to reach a specific amount of money, taking into count his salary and ...
1
vote
1answer
80 views
Create all combinations of length N from a given alphabet
I have some (very limited) experience in Java 6 and decided to revisit the language. To do so I wrote a solution for the following challenge:
You are given a number N and a string S. Print all of ...
3
votes
1answer
37 views
MIPS assembly program to read integer byte by byte
I try to learn assembly by writing small programs. This MIPS program is supposed to read an integer from the terminal and print it byte by byte in hexadecimal. I think it works but I didn't check ...
2
votes
2answers
55 views
Finding the greatest common factor of a list of numbers in JavaScript
The goal of this code is to take an array of two or more positive integers and return their greatest common factor, or GCF. (This is the biggest number that can be divided into all the numbers in the ...
-3
votes
0answers
27 views
Extracting and modifying administrator accounts listed in a CSV file
I created an automated process for a report that I have to generate every month. The script imports a CSV then filters out the administrators and the operating systems. Then I add a Unique Account ...
5
votes
1answer
461 views
3
votes
1answer
67 views
Simple actor/task abstraction
I'm interested in creating a simple game but what I realized was that half-way through development I get lost in the details with the design. In particular, I find dependency injection, unit testing/...
1
vote
0answers
11 views
iOS - Populate TableView with JSON data
I basically want to display JSON -data in a TableView. The TableView always displays a List ...
5
votes
2answers
121 views
Textual mathematician game
I tried to make my first game with my little experience of programming and using much of the aspects that i learned from my little book. In this game you are a mathematician that has to solve ...
2
votes
2answers
28 views
Tag specific Git commits based on commit message contents
I am using GNU Bash 4.3, and Git 2.1.4, to tag certain git commits based on their commit messages. Specifically, I want to tag:
as v0.0.1 the commit with message "...
2
votes
1answer
88 views
Test/Quiz program to practice OOP
I wanted to practice OOP when writing a program so I decided to make a simple test/quiz. I would appreciate any corrections and improvements to make my code cleaner/shorter/more extensible/more ...