Add this tag to your question to indicate that you are new to the language of your code. This will often be taken in to consideration by reviewers when assessing your code.

learn more… | top users | synonyms

2
votes
1answer
23 views

Article start exercise

I've used encountered this exercise from a tutorial: Create a function that takes a string as a parameter and returns True if the initial word of the string ...
1
vote
1answer
20 views

Print a square graph and dot based on co-ordinates

I've written a simple script, that takes a 0, 0 style co-ordinate input, following the pattern of: $$-1 \le n \le 9$$ Tacked ...
1
vote
0answers
18 views

Sieve of Eratosthenes Optimization in Rust

When I want to try a new language, I first try to write a fairly basic sieve of Eratosthenes project in said language. This is a very simple algorithm, with predictable results, and can even be ...
5
votes
0answers
25 views

Just another Graham scan implementation in Haskell

It looks like this is a really classical question, but I'd like to ask it one more time as all those solutions look quite long and complicated for me (maybe because I am dumb :) ) So this is a Graham ...
3
votes
1answer
35 views

Input data from file, calculating average by a function

I want to thank you guys firstly for your previous comments and feedback. Really appreciate it. I am learning C with school at the moment, but I plan to be "fluent" in C at the end of august of this ...
15
votes
5answers
1k views

Simple calculator in C

I made a very simple calculator in C that allows the user to perform calculations like addition, subtraction, multiplication and division. This is my first C program that I've made outside of my ...
7
votes
1answer
44 views

Conversion calculator using polymorphism and Swing

This is my first attempt at a program (outside of school) and I was trying to implement and learn polymorphism on a conversion calculator for volumes and weights. I found myself using long ...
6
votes
2answers
44 views

Renaming PDF files based on given rules in a text file

I'm learing Python by writing a program to solve some housekeeping I do weekly, namely renaming PDF files according to rules given in a text file. My end goal is to have idiomatic Python, with full ...
4
votes
1answer
54 views

HND Java module (vending machine simulator)

As part of the distinction requirement, I am required to ask for testing/review of my code. There was no time allotted for this in class, and as such I am turning to the folks of StackExchange for ...
3
votes
1answer
38 views

Safe cracker string with all combinations

Imagine a safe with a 4-digit code, and accepting a continuous stream of code entries, such that when the 4 digits are seen in the right sequence, the safe opens. Generate a short string that ...
3
votes
3answers
97 views

Build a dictionary based on split string

I've written a simple script that takes a string filled with brackets and strings and builds them to a dictionary. Example Input: ...
2
votes
0answers
12 views

Forecast displaying app within a User Profile

I'm a fresh newbie to web development. I'm building a web application which will display the forecast of the user's location. Yet, I'm not quite sure how to transfer the data from the National ...
6
votes
0answers
24 views

Go Fish game written in Go

A couple months back I made a go fish game in Go, just for the sake of that pun. It was pretty poorly done and made experienced Go-ers cry when they looked at it. I rewrote some of it to be more ...
7
votes
2answers
145 views

Script for a Civil War game

I'm new to Python, and pretty much programming/scripting. I'm just looking for someone to critique my methods and tell me if there are more efficient ways to do things. ...
1
vote
0answers
24 views

Find minimum number of coins (count and list of coins too)

For a given set of denominations, you are asked to find the minimum number of coins with which a given amount of money can be paid. Assume that you can use as many coins of a particular ...
2
votes
2answers
61 views

Store open days and times

Currently I'm developing my business entities. I feel that the structure is a tad cumbersome. What I mean is that a store on a particular day can have different open and closing times. So it's not ...
-2
votes
0answers
9 views

Reading a sentence with Scanner class and printing out single words [on hold]

I am very new to java and I cant seem to get this right. I am trying to read a string with the Scanner class and print out single words from that string in a line. For example: if i write "How are ...
1
vote
1answer
67 views

Project Euler Problem 11 (“Largest product in a grid”) in Python

Can this code in any way be improved or optimized? I'd appreciate any clever tricks or Pythonic expressions that may remove some more brute force elements from my solution. Also, is there possibly a ...
3
votes
2answers
37 views

Diceware Passphrase Generator

I've written a simple Diceware passphrase generator based on this Stack Overflow question and the top answer. Briefly, in the Diceware method, a die is rolled 5 times for each word in the passphrase ...
4
votes
2answers
50 views

Solver for Jumble puzzle

Here is my first attempt to solve Jumble puzzle: ...
7
votes
2answers
74 views

Animating a block of HTML on scroll

I'm pretty new to client side scripting and I'm still learning. I've written this JS plugin which animates blocks of HTML (fade-in from left/top/right/bottom) as you scroll down the page. Everything ...
1
vote
1answer
42 views

Inserting row into named range code

I am writing a macro for an inventory management document. The point of the User Form is to allow the user to add a new item to each of 5 sheets (Daily Sales, Total Inventory, Deliveries, Income ...
8
votes
3answers
226 views

Sums of some array elements

I'm doing an archived MOOC at the moment which introduces Ruby programming. There are some assingments, yet no solutions and since the MOOC is over no one will correct those (+ the forum is down) I'm ...
2
votes
1answer
38 views

Parse a string as a list of words and parse characters

I'm trying to create a list from a string with items alternating between words and parse characters like ['Hello', ' ', 'World'] Is there a built in function, ...
2
votes
2answers
46 views

Python Command Line Rock Paper Scissors

I'm looking for tips on how to clean up this code and/or make it more efficient. Keep in mind I am a seriously new programmer and if it is too advanced it's likely to go over my head. ...
1
vote
0answers
56 views

Recreating pong

Github is a link to all my code and the working JAR file. I have been learning LibGDX and attempted to make a working Pong game, I am new to this and would like some pointers on where I could improve ...
9
votes
5answers
1k views

Finding the smallest number whose digits sum to N

I tried my hand at a grade XII Board exam program: Given two positive numbers M and N, such that M is between 100 and 10000 and N is less than 100, find the smallest integer that is greater than M ...
1
vote
1answer
27 views

Manager for customer billing and subscriptions in Rails

I'm looking to get rid of a couple dependencies that I have a sneaking suspicion are present in the code that I'm writing. Right now I have a service class that manages my subscriptions for part of ...
4
votes
1answer
95 views

Input/output for a simple Brainfuck interpreter

The following code comes from a simple Brainfuck interpreter I'm working on to learn the Rust language. Error handling is omitted for simplicity. It is tested on ...
4
votes
2answers
95 views

Object-oriented Rock, Paper, Scissors game in C++

This is my code for a simple Rock, Paper, Scissors game. Users have the choice of playing against a computer, or watching a "computer player" play another "computer player". The code for the computer ...
3
votes
2answers
88 views

Tic Tac Toe game in C++

I'd like to get an opinion on the code I've made for a Tic Tac Toe game in C++. I'm pretty new to C++ but I'd like to improve. I haven't been able to think of any improvements. One bug I'd like to ...
3
votes
2answers
52 views

From New Worksheet, AutoFill Dates, Delete Extra Columns, Save As Month and Year

I have created an inventory management sheet for a Lodge in Africa. The general conditions of the document are that it has to be easy to use, because the people who are using it are not very computer ...
5
votes
2answers
174 views

Finding weight on various different planets

I'm hoping I could get some help in understanding as well as optimizing code! I've been working on a few exercises on some online resources, and I decided to try and take it to the next level and ...
3
votes
0answers
35 views

Equivalent binary trees (A Tour of Go)

Any suggestions on how to improve the code shown below for the Go-tour exercise? Exercise description: There can be many different binary trees with the same sequence of values stored at the ...
0
votes
0answers
33 views

HTTP handlers exercise (tour of go)

Any suggestions on how to improve the code shown below for the go-tour exercise http://tour.golang.org/methods/14? Exercise description: Implement the following types and define ServeHTTP methods on ...
-3
votes
0answers
48 views

A Tour of Go: rot13reader

Any suggestions on how to improve the code shown below for the Go-tour exercise? Exercise description: A common pattern is an io.Reader that wraps another io.Reader, modifying the stream in ...
5
votes
1answer
47 views

NQueens Puzzle in Java

Place N amount of queens in such a way that none of them can attack each other. ...
4
votes
2answers
72 views

Fast comparison of molecular structures and deleting duplicates

I have a program that reads in two xyz-files (molecular structures) and compares them by an intramolecular distance measure (dRMSD, Fig. 22). A friend told me that my program structure is bad, and as ...
6
votes
3answers
270 views

For each line in a file, read two integers and output the minimum

I am going through some CodingAbbey problems to learn basic programming tasks, with a focus on taking input from a file, and saving to another. I have just completed this task: Of two numbers, ...
8
votes
0answers
86 views

First assignment for Stanford iOS8 Course: enhancing a calculator

I recently started learning Swift through Stanford iOS8 Course. The first assignment is to add some features to simple Calculator which was presented during lectures. List of tasks: add button for ...
0
votes
0answers
62 views

Thy Dungeonman 3 using batch

I just started learning commands for batch files. I figured a project is a good way to learn the language better, so I'm attempting to recreate the text-based RPG, Thy Dungeonman 3. So far, I've ...
5
votes
4answers
314 views

Word Guessing Game

I'm trying to learn Java (albeit rather slowly). I'm in a computer science class at my highschool and I've written this little bit of code for a project. Basically it is a word guessing game where if ...
6
votes
2answers
92 views

Convert a string into a dictionary

I have a string like "food | dairy | milk". The string may consist of more or less words. How do I turn it into a dictionary ...
12
votes
1answer
67 views

m,n,k-game (i.e. generalized tic-tac-toe)

I'm back after Tic-Tac-Toe in Haskell with a new version. I added Haddock documentation and wrote a generalized version known as the m,n,k-game. By doing so, I had to redefine ...
7
votes
1answer
83 views

Calculator implementation

With some background and experience in PHP & Python, I'm trying to learn Swift by myself (web, videos, Ray Wenderlich books). I've read that a good first project for beginners is to try and write ...
1
vote
1answer
18 views

Overriding scrolling behavior for navigation elements

I am new to JavaScript, and trying to ensure the i write the best possible code instead of "copy & paste". I hope i am asking correctly, want to know if my code I have written is done correctly ...
6
votes
2answers
46 views

First dice roller

The part I'm really wondering about is in the "if, elif, else" part. I set the variable to bring up the raw input thing so it would stay there long enough to read instead of just printing a response ...
9
votes
3answers
461 views

Solving quadratic equation using quadratic formula

I've just started learning C# + MVC. Here's my attempt with MVC: ...
3
votes
2answers
57 views

Phone keypad implementation

I was wondering, beyond the standard improvements that this needs, is there a more "clever" way of solving this problem? The problem is to translate letters into digits without changing the format of ...
7
votes
1answer
63 views

Snake in Haskell

I wrote a partial implementation of Snake in Haskell. As of now, it only supports the movement of the snake. However, since the code is getting complex, I'm requesting for a review of the code before ...