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.

learn more… | top users | synonyms

-1
votes
0answers
26 views

A Rule of Divisibility by 13

A Rule of Divisibility by 13 When you divide the successive powers of 10 by 13 you get the following remainders of the integer divisions: 1, 10, 9, 12, 3, 4. Then the whole pattern ...
2
votes
0answers
23 views

Recursively traverse directory tree and print all files

I want to build a small console program, that for given directory, will print (for now) all files inside that tree. Here is an F# script that I came up with: ...
1
vote
0answers
10 views

Parsing latitude and longitude, using Try[T] to ignore errors

I wrote this question asking about how to implement my error handling while still maintaining functional code and based on 200_success's very interesting note on the spaces, I decided to ...
-3
votes
0answers
15 views

Python indentation issues [on hold]

I am an absolute newbie to Python and humbly apologize if this is too trivial an issue. I have developed the below code to generate Fibonacci numbers by reading input from a file :- ...
1
vote
0answers
22 views

Greedy solution to minimize the max-min spread

I wrote this solution to contest challenge and I am new to D and was hoping for some tips to make it faster or more Dish. The challenge is to select K integers from a list of N integers (2 ≤ N ≤ 105, ...
5
votes
1answer
26 views

Conway's Game of Life in Scala

To learn Scala, coming from Java and Python, I'm attempting to program an implementation of Conway's Game of Life. I've implemented two different approaches so far, with the first being so bad I'm ...
-1
votes
0answers
13 views

Hours and minutes clock [on hold]

Using JavaScript, I can create an hours and minutes clock: ...
2
votes
1answer
29 views

Convert a String with comma separated latitudes and longitudes to a Seq[Coordinate]

I have a function that receives a String like the following: "-10.0 -10.0,10.0 10.0,0.0 0.0" And needs to translate that into ...
5
votes
2answers
470 views

C++ thread safe log file writer

I made this class (MFC lib) to write a log files. Eventually I want to implement this code in a thread safe way. Log.h ...
4
votes
1answer
70 views

Rock-Paper-Scissors with the revealing module pattern

In my ongoing effort in learning advanced JavaScript I tried to develop the traditional rock paper scissors game by using the famous revealing module pattern. I'm not comfortable yet with what has to ...
10
votes
3answers
2k views

Stone, Paper, Scissors in Python

Recently I started programming with python. Today I was trying to make a stone, paper, scissor game. After so scratching my head long time, finally I got a working code. ...
10
votes
7answers
1k views

Generate random binary arrays

I am fairly new to C++ programming and I, so far, love it. I just have been trying to make sure what I am doing is fast, unique, readable, and efficient. Is there anyway I can improve this code, or is ...
5
votes
4answers
189 views

Creating a grid to the specified size using lists

My code creates a "grid" of empty places, where 0 is used as the place holder, in a size specified by the user. I was wondering if there were more efficient ways of doing this,or perhaps ways that ...
2
votes
1answer
52 views

Beginning of a tower defense game, using pygame

I'm currently working on my first project and I have been programming in python for 4 days now. I currently have a dilemma where my code is running too slowly. I don't want you to make a full review, ...
6
votes
1answer
52 views

Python Connect-Four

I am currently using Python 3.5.2 to create a connect four basic game. My game should work for two players and tell you when you have won, be it horizontal vertical or diagonal. However I do not know ...
6
votes
3answers
378 views

Designing a binary tree structure from scratch in C

I'm a beginner and self learning programming students. While learning binary tree data types, for the sake of understanding graph theory and other interesting programming problems, I've writen the ...
4
votes
1answer
34 views

Simplifying manual data entry with a UserForm Excel 2010

I am an absolute beginner. This is the first thing I've ever coded in VBA. I don't know if I'm allowed to ask for just criticism in general without a question. But just in case I can't, this file is ...
4
votes
1answer
30 views

Word VBA Code to Automate Table Captioning

I have a Word VBA script that auto-generates a table caption based on user input & a previous heading. Its purpose is to speed up editing & formatting of massive software documents (like the ...
3
votes
0answers
30 views

Calculate where the patient results reside within the normal distribution

My background is medical, but I required a program that calculated whether my patients are "normal" or 1-2 SD values away from the mean. The program works just fine, but I'm interested how I can do ...
4
votes
2answers
73 views

Determine the ratio of the contents of a pot to the (metal) volume of of the pot

This is my first Python project, so: create a pot with dimensions (radius, thickness of wall, thickness of base, height), fill it with food (to a specific height). Determine the ratio between the ...
5
votes
1answer
50 views

Simple Go TCP server and client

I'm a Go (and programming in general) newbie and the task was to program a Go server that would accept incoming messages, take each line, reverse its order and case and send it back. Besides doing ...
1
vote
0answers
51 views

Simple password verification before proceeding to a game [on hold]

I wrote this code a little while ago and ran it a bunch of times trying all possible combinations just to make sure it all works and it worked fine and no errors came up but now when I bring it up in ...
4
votes
1answer
38 views

Simple React and Flux application to heal a player

I'm just trying to learn the basics of React and Flux, and the above code works and I can see it works nicely. index.js ...
3
votes
1answer
87 views

Finding the output of sequence (a + 2^(i*b))

I just started programming and have taken too much time to code the solution for this problem: In this problem you will test your knowledge of Java loops. Given three integers, \$a\$, \$b\$, ...
2
votes
1answer
39 views

Calling TWITCH API and displaying online/offline users of a channel

I've got this working almost to where I want it. The part I can't get right may be due to the programming so I'd like to get a review. I'm making JSON calls to ...
20
votes
6answers
2k views

Check if a Sudoku board is filled out correctly

The code below takes a filled out Sudoku board of size NxN, with sub-blocks of nxn, and checks if the solution is correct. main_function takes a board as input. ...
3
votes
1answer
47 views

Count character replacements needed to make string a palindrome

Problem Count the number of character replacements necessary to convert an input String to a palindrome. Each character replacement must replace the given ...
8
votes
1answer
70 views

Simple Lotto Game

I have developed a Lotto Game in C for my Assignment, it allows a user to enter one of the 6 menu options. From the menu the user would be able to view the numbers they have chosen, another option ...
4
votes
2answers
52 views

F# function to concatenate some DSL scripts with indentation

I'm rather new to F# and functional programming. I wrote the following method to concatenate some custom dsl scripts. The function works are expected without errors. I wanted to know if there was a ...
6
votes
1answer
141 views

Decimal to binary algorithm

Is there a better way to code this specific algorithm using successively division through 2 which converts decimal numbers into binary numbers without calling a built-in function? ...
0
votes
0answers
15 views

Sass-Mixin for to attach a text-shadow animation upon HTML-elements

I've make these mixins by using SCSS-Sass. Any hints and tipps concerning improvements are welcomed. ...
3
votes
1answer
77 views

Simple jQuery photo slider

I'm fairly new to front end web development, but finally felt confident enough to create my own jQuery slider. I wish to receive constructive criticism about my code, how I can optimize any line of ...
0
votes
1answer
36 views

Vote-switching optimization

I have 2 <label>s being used for displaying the votes, which is up votes and down votes. There is no problem for the adding or removing votes, but the ...
6
votes
1answer
720 views

Very small JonTron quoter

This is one of my first projects, just a quick hobby thing for fun. ...
13
votes
1answer
79 views

#TODO Remove duplication in XML parsing

I have to modify the number of points in this XML in order to test the performance of another program of mine. Here is an example of the XML I have to modify. performance.xml: ...
6
votes
2answers
94 views

Guess a number game with mines version 3

I'm still new to Java and learning programming, so my main goal is to learn to making good code, so I don't want to do anything complex until I fix all of my bad coding habits on smaller programs. So,...
2
votes
1answer
40 views

Insertion Sort Implementation Using For And While Loop

Introduction I'm fairly new to programming (and Java) and I've actually never implemented Insertion Sort. I know that there's pseudo-code defined in the wikipedia article (linked above), but the ...
5
votes
1answer
75 views

Random forest and machine learning

I am quite new to using python for machine learning. I come from a background of programming in Fortran, so as you may imagine, python is quite a leap. I work in chemistry and have become involved in ...
5
votes
1answer
54 views

Image Stenography using LSB technique

The program can be used to hide an image within another image and later extract the hidden image. This is done by concealing the secret image within the lowest bits of the apparent image. Example of a ...
4
votes
2answers
68 views

A c++ program to solve a Rubik's Cube

I wanted to write a c++ program to solve a 3x3 rubik's cube, but failed at it. So I picked up a 2x2 rubik's cube and wrote a program using Blindfold cubing algorithm. Can anyone help me write a more ...
5
votes
2answers
78 views

Finding product palindromes

I am new to perl and want some help in tuning this script if possible cause it takes time if I increased my array. also if I use warnings I get a lot of warnings ...
8
votes
2answers
638 views

Creating a questionnaire

Im making a Python program. It is basically a questionnaire and I was just wondering if there is a shorter way of doing this as at the moment I'm writing out all of the questions in separate functions....
4
votes
1answer
64 views

Very basic PHP session handling

I’ve got my first real PHP web application up and running. It is working as expected, but being my first time, I’m sure there is plenty of room for improvement. Right now, there is one particular ...
3
votes
0answers
28 views

xkcd comics data provider

Please help me improving this code(golang), thanks! Why I need built a API for xkcd Can't get the data provided by xkcd directly in front-end(CORS). So we can package the data to 10 comics per ...
5
votes
4answers
115 views

Beginner Rock, Paper, Scissors in Java

I was curious on what, if anything, I could be doing better. I have been spending the last few days working with Java and learning some basics and wanted to try this challenge and making it two ...
3
votes
1answer
75 views

An app that uses the quadratic formula to solve ax^2+bx+c=0 so long that the answers aren't imaginary

I'm a beginner to Java and Android programming, and I wrote this app in order to get some practice. It works, but it's most likely not as good or efficient as it could be, since I'm new. I'm hoping to ...
9
votes
1answer
654 views

Cheapest hotel finder

Please help me make this code more object oriented. I also want to use a few more classes and separate the input processing code to another class. Question: A hotel chain operating in Goa wishes ...
2
votes
1answer
22 views

Find common factor of numbers in a list

This program calculates common factor for given numbers. The original use case is to find a possible resolution for pixel games that scale well with new screen resolutions (that's why I don't have any ...
3
votes
2answers
36 views

Optimized Int Reader

I am new in Golang, and decided to create a function that could cater to my needs of reading an integer from stdin. I need the function to be as efficient and fast ...
1
vote
2answers
47 views

Finding a word with the most occurrences of a character

I am new to PHP development. So Kindly, review my code and guide me make it better/optimize. Currently, it works well with inputs that I have tried. ...