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.
-3
votes
0answers
15 views
Raw_Input help in python. Not defined? [on hold]
I'm making a character customization feature to my unmade "game" and I'm running into some error when I run this:
...
2
votes
0answers
7 views
Clean up duplicate string references and centralize properties/error handling
I don't like the idea of sprinkling process.env all over the place and wanted to abstract it out a bit. I'm new to Node and know there must be a better way to do a few things.
Not repeat the name 4 ...
7
votes
2answers
427 views
Making a deck of cards in Python
I want to have a deck of cards that looks like this:
['H1', 'H2', 'H3', 'H4', 'H5', 'H6'...]
For that I wrote the following code:
...
4
votes
1answer
43 views
Connect Four Game (Java)
I wrote this program as an assignment for an introductory programming course in Java, which I then decided to improve past the minimum assignment requirements.
It allows two human players to play ...
3
votes
3answers
92 views
3
votes
1answer
18 views
Email redirection script in python
I am new to python and wrote a email redirect script. It extracts mails from a server and than resend them. I would like to get some feedback:
...
5
votes
0answers
39 views
Generating RPG Characters (Objects)
I am a beginner Java programmer. I have just finished up an assignment and would appreciate some advice and/or constructive criticism on my program. I am trying to ensure I do not advance my knowledge ...
0
votes
0answers
16 views
Implementation of dynamical forms for JSON ActiveRecord using JavaScript
I have some data in my database I store as JSON (PostgreSQL supports it). The data can be pretty flexible, something like work-experience, with names of previous companies and positions or education ...
0
votes
0answers
11 views
Swift 3: Thread 1 Sigabrt and EXC_BAD_INSTRUCTION (Please Help) [on hold]
iOS 10 came out and I updated my app and it runs on iOS 10 but there's still one problem. Every time I run the app and move to the Artwork View it crashes and gives me Error Sigabrt. The link should ...
0
votes
0answers
31 views
Generate random URL and download HTML from website [on hold]
I'm very new to Python and I wrote the following program as my first program. My code works as intended but it's really really slow and sometimes it gets stuck for multiple minutes. I don't really ...
2
votes
3answers
74 views
Computing the name of the month
I created the following program that transforms a numerical month into the corresponding textual month. I initially calculated the starPoint and ...
0
votes
1answer
55 views
6
votes
0answers
42 views
Downloading HTML from random websites
I've never written a single line of Python before this program was made and all my "knowledge" of the syntax is from Enki ( an app ).
I just wanted to download the HTML code from random websites and ...
4
votes
4answers
84 views
Check for Palindrome string in Java
I was wondering if you can give me advice on this solution to assess if an user input string is a palindrome or not.
How can I optimize this solution?
...
6
votes
2answers
66 views
Generating matrix/image kernel from List
I have another question from same program where is full code, but this question focus only single process/function of that program.
My problem is performance when creating dynamic Image kernel from ...
2
votes
0answers
34 views
Expression validator service
I'm working on a project (in C++98) that uses a grammar validation service to validate mapping expressions for a small DSL. To simplify the project code, I've written a small interface for using the ...
1
vote
0answers
17 views
Outputting closest free index
It's a coding challenge you have to output the closest free index. It has to run sub 1 second.
Input looks like this:
The first line is 2 numbers. The first of them is the number of indexes that is. ...
2
votes
1answer
65 views
Defusing a bomb using a state machine
This code is a solution for /r/daily_programmer #293.
The idea of this challenge is, you are given input in the form of colored wires:
...
1
vote
0answers
32 views
File manager project (creates and prints file)
I just finished my very simple and beginner-friendly C project and wanted to hear your thoughts and opinions about ways to improve it or something.
...
4
votes
1answer
79 views
Grid of Rectangles
I am posting my first project in C++ (and also my first in object-oriented programming), can someone review it and cross check that everything I have coded is alright? If you have any tips to improve ...
0
votes
0answers
38 views
Connecting to a database with ADO.NET [on hold]
We are using ADO.NET to connect to a database in all the web applications we are developing. Normally there are few people using the systems and in a new web application there are more users than ...
4
votes
2answers
73 views
Justify Text using LaTeX method
I wrote a bit of code that takes a file, justifies the text and writes to another file.
It uses a DP approach to minimise a badness metric, which is the amount of under or overshoot of the line ...
4
votes
3answers
100 views
Console-based calculator in C++
I've recently started studying C++ (from internet) Made my very first program, calculator. It works, but i'd like to know how could i make this more "advanced"?
...
-3
votes
0answers
26 views
Login ASP.NET MVC C# without Entity Framework [on hold]
I'm working a system in ASP.NET with MVC 5 and I'm new at this, so I need help with the login part in my system, the thing here is that I need to work the login without entity framework and using a ...
3
votes
1answer
39 views
Multiplication Exercise Generator
I'm new to programming in Python, and I am trying to create a multiplication exercise generator. I've got the following code for the solution, but I'm wondering if there is any more elegant solutions ...
9
votes
2answers
1k views
Rock, Paper, Scissors - Python game
This is my attempt at making a 'rock, paper, scissors' game in python. The game takes the user's input and the computer's random selection and calculates who has won. All feedback appreciated.
...
5
votes
1answer
63 views
Civil status database with Django
I'm beginning with Django and I have a Civil Status project.
I created my first models.py in order to get a Form, but I had some advices in order to normalize my database.
I made this process and I ...
2
votes
1answer
64 views
Refactored game of Snake
A week ago I requested a review of my code for a game of Snake.
First game of Snake
I made some changes based on your answers and now I want to show you present code. Something else to modify here?
...
0
votes
0answers
17 views
2
votes
1answer
113 views
Auto loading code
I'm new to PHP and I didn't know there is something called coding style standards. Now I'm trying to stick to PSR coding style standards and after reading PSR-4, which is about autoloading standards. ...
-3
votes
1answer
60 views
Refactoring code to adhere to DRY principle [on hold]
I'm relatively new to Javascript and jQuery. I have this code that has a ton of duplicated code and could use some refactoring. I've heard of Object Oriented Programming(OOP) and the Don't Repeat ...
4
votes
3answers
122 views
Adventure text game
I'm making a text based java game to help me learn java. I would like to know if I am doing things ok and if there is a better way to do the things I'm doing thanks. I have two separate files.
...
3
votes
1answer
94 views
Dual-language beginner math solver program in C++
I've written a program that solves questions of:
Addition
Finding the hypotenuse of a triangle
Checking if the triangle has a right-angle or not
I've also written it to be viewed in English or ...
-1
votes
2answers
55 views
Is there a more elegant way to catch a generic exception than using try-catch block?
Here are two sample blocks of my code:
...
2
votes
1answer
64 views
Simple Snake clone in Java
I made a Snake clone for a programming class. I wanted some feedback regarding coding style and will appreciate any other opinions concerning my code.
...
10
votes
4answers
1k views
C++ quiz game with 25 questions
I created a quiz game program with 25 questions, 4 answer choices, correct answer and 4 points awarded per question. I realize this code isn't the best; I am still a beginner and this is my first ...
2
votes
1answer
40 views
Beginning C BST implementation
I'd really appreciate if I could get some feedback on the following code with regard to security, efficiency and possible uncaught errors. Personally I feel the ...
7
votes
2answers
77 views
Recursive higher-order function
I have implemented a through function for myself in a project.
Since I am still quite new in python and want to learn it correctly, I would be happy about any ...
4
votes
1answer
64 views
Form that reveals more fields as each step has been completed
I'm new to JavaScript and jQuery and need input about how to optimize my script:
...
0
votes
0answers
22 views
Checking if a sub string is an anagram of another string using an array [closed]
I am trying to find time complexity of my code in c#. Please provide let me know if there is a better way to code it as well.
Edit: the problem here is actually this that er need to verify if a ...
3
votes
1answer
51 views
Countdown AppIndicator
I've decided to translate an old Unity AppIndicator I had written in C to Ruby, so I can practice coding with it (got a little bored with the completely beginner lessons I've been following, which I'...
1
vote
2answers
98 views
A simple pocket calculator
I was searching the internet for some Python exercises, and I've found a lab assignment from University of Toronto. Here's the major of it:
Question 1.
Welcome Message In the if ...
0
votes
1answer
28 views
Iterative “counting change” implementation in mit-scheme
Here is my iterative implementation of the Counting change example in SICP. Please note that I'm a beginner, which means I only know the basic syntax for the time being.
Requirement:
How many ...
4
votes
1answer
92 views
ISO 8601 dates & times format into a more human readable format
I wrote from the ground up this small piece of code which transforms dates and times formatted in ISO 8601 format into a more human readable format, client-side. The main goal is that you can create ...
3
votes
1answer
60 views
MarsRover in Scala
This is my first attempt at Scala programming. I tried to be functional but I'm not sure if I have achieved that.
DataTypes.scala
...
2
votes
1answer
40 views
Compute the probabilities of getting each of the possible sums when throwing 2 dice, n times
I'm struggling with some coding-inexperience. The code I've written below, is extremely inconvenient and ugly to look at.
My question to you is:
How can this be done more efficiently? The way I've ...
0
votes
0answers
11 views
Array Menu Switch Options, Black Executing Program [closed]
This is some code put together using an array to store numbers using a menu to let the user input, delete, and sort data. The compiler doesn't seem to have any issues, but executing the program ...
6
votes
3answers
98 views
Slot Machine Simulator with JAVA
I'm studying alone, so I don't know if I'm writing efficiently. Could this SLOT MACHINE SIMULATOR code be improved? How?
...
0
votes
0answers
17 views
Delete Matching Records in Fact Table [closed]
My question is, can this query be simplified so that I don't have to change the unique ID the tables join on each time I reuse this package? I would like to simply replace the table names with a ...
1
vote
1answer
57 views
Random number guessing game in python
I just started learning Python this week and put this together for my first program (outside of a Hello World one). Does anyone have any feedback/suggestions for improvement for this? I've tried to ...