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
6 views

Leap year calculator

I'm creating a program to determine whether or not a given year is a leap year. I just wanted to get anyone's feedback on it. I am aware of the calendar module in Python. I just wanted to try it from ...
4
votes
0answers
13 views

Snippets Manager

This basically manages a set of snippets, saving and loading it. snippets.cpp ...
2
votes
1answer
45 views

Multifunctional Monty Hall Simulator

Based on this question on math.SE regarding probabilities in variations on the Monty Hall problem, I cobbled up a simulator in Ruby to give myself an introduction to the language. Since this is my ...
6
votes
4answers
629 views

Entering two integers and returning a decimal fraction

After a couple of small programs in Python we are now asked to do some basic stuff in Java. I don't really know where to start to improve this and whether it's even necessary. This is an exercise, so ...
1
vote
1answer
52 views

Displaying data from JSON in a table

What do you think of my code? I know it is a little rough around the edges but as of two days ago I had no idea how to use jQuery or JavaScript. ...
0
votes
1answer
42 views

Nearest point using 2D tree, static variable for the closest point so far

This is a problem from a Coursera class: Write a data type to represent a set of points in the unit square (all points have x- and y-coordinates between 0 and 1) using a 2D tree to support ...
5
votes
1answer
93 views

Brainfuck interpreter in Haskell

Okay, so I just started learning Haskell around a week ago and this is my first real program that I worked on all of yesterday with a lot of help from IRC. I know that using indicies and arrays is not ...
-1
votes
0answers
21 views

Creating a fixed calculator in Python 3 [on hold]

I am new to Python and I am trying to create a calculator to do a complex calculation. I need it to take input from a user and do deductions and multiplication based on that input. The scenario ...
1
vote
1answer
67 views

Save parameters in a “key: value” format

I have been playing with Java for around a year and I started writing this API for storing data in files. I wrote this method which will save the parameters in a "key: value" format in a file. The ...
2
votes
1answer
42 views

Implementation of a singly linked list

I wonder if the code below is a good (quality and correctness) implementation of a single linked list in C++, in regard of data structure (not the exposed interface). ...
-3
votes
0answers
16 views

Error at JOptionPane row and outFile.println row (61 and 63) [closed]

I have this project and I'm stuck at the end...row 61, 63 have errors. Can somebody help me? Thank you Create a Java Project to be named PayRollProject using NetBeans IDE that allows the end user ...
-3
votes
0answers
10 views

Array Won't Print All of The Elements When Compiled [closed]

When I compile my program in Visual Studio 2012 it will print the first element to the screen, but then will wait for the user to press enter before printing the next element. I want the program to ...
2
votes
0answers
26 views

Simple spec testing DSL

I wrote a very small little DSL for spec testing: ...
5
votes
3answers
230 views

Close Scanner if no input

I'm in very early stages of learning some Java coding. I'm asking for this review because, although the code below works, I'd like to know if it's an ugly way of achieving it. What I want the code to ...
11
votes
2answers
103 views

Allowing the user to alphabetize or randomize the contents of a text file

As a newbie programmer, I decided to try my hand at making a program whose function actually might be useful to someone, somewhere. This utility takes a text file, reads it out to the user, displays ...
2
votes
2answers
195 views

Gather first letter from each string in a list of strings

I'm learning Haskell on my own, and I'm wondering if this is idiomatic Haskell. In particular: is it a common pattern to "wrap" the result in a list in order to make a function total? (that's what I ...
1
vote
1answer
27 views

insertBST exercise

I'm just learning Haskell on my own, and did an exercise to implement insertBST. Is this idiomatic Haskell? ...
2
votes
1answer
54 views

Advanced Air Calculator

I have expanded a lot on my last project and had a lot of fun doing it. It was great to build out all the code. I am new to JS so these types of projects are really helping me learn. Please be honest ...
7
votes
4answers
321 views

Kaprekar's constant

I'm new to Python and as a first exercise, I've written a function (module?) to calculate Kaprekar's constant using Python 3. I'd like some feedback on whether this is Pythonic enough, and if I can ...
9
votes
3answers
423 views

Implementation of an Stack without Linked Lists in C

I'm a beginning C programmer. As an exercise, I have attempted to implement a stack of strings in C. This is my first real exercise working with pointers. I looked at some other similar posts on here, ...
3
votes
3answers
762 views

Calculate highest prime factor very slow

Sometimes when I write a Python 3.x script with too many nested loops and some big values it just takes too long to give the answer. How can I optimize my code so that it runs faster, or where should ...
1
vote
1answer
29 views

Using composition or inheritance to enhance this linked list

Problem Statement: A method called insertEnd() exists, but it runs in linear time, because every time it is called, it walks down the list to find the end. Without changing the meaning of this ...
0
votes
0answers
27 views

Enhancement to Trezor library for Android

I'm only asking because I'm new and don't know enough to have a concrete question. Did I do this correctly? I worked on this until the code performed as expected, but I don't think I'm done. In ...
2
votes
1answer
66 views

Conway's Game of Life without objects

I was wondering if anyone could provide some feedback on my solution to Conway's game of life. I tried to solve it without using objects. It returns a dictionary of living points on a grid and points ...
5
votes
1answer
62 views

Callback functions to select the tab to the left in Google Chrome

I'm a JavaScript rookie, but I wrote a JavaScript function as part of a Chrome extension that will activate the tab to the left of the currently active tab. The function is pretty ugly, but I couldn't ...
1
vote
1answer
33 views

Authentication with JWT

Please review my code for 'JWT' authentication. Are there any security issues? Where should I store the secret's key, DB or InMemory? What's a good 'JWT' Lifetime? Should I send the 'JWT' in Header ...
3
votes
0answers
42 views

RubyWarrior beginner epic Solution

This is my RubyWarrior Solution. I think RubyWarrior is well known to Ruby coders. I am starting to learn Ruby and I would appreciate some help from you to improve the organization or the mistakes ...
2
votes
2answers
75 views

Extended Euclidean algorithm and modular multiplicative inverse element

After my first exercise here is another. Again, this is exactly that: Exercise, which means that the output doesn't necessarily need to be beautifully formatted, etc. I probably have some variable ...
1
vote
2answers
48 views

Inserting e-mail subscribers into MySQL

I'm new to Python and I am learning database connections from here. This is the code I am using to insert e-mail subscribers into a table: ...
3
votes
3answers
92 views

Summing over the values of a dict

I'm coming from the Java world and making my first steps on Python and see how good it is to express more with less code. I'd like to know if, via Python, the size of the following code could be ...
-3
votes
1answer
106 views

High - Low Number Guessing Game

I'm learning how to code in java and i decided to re-write a program made in c++ into java. All feedback is welcome. Here is the original prompt: This program generates a pseudo-random number ...
3
votes
2answers
74 views

Binary to decimal number converter

Here I am doing some exercises for my studies with Python. This is a binary to decimal number converter (currently restricted to that). These are the very first steps, so there is no error handling. ...
5
votes
2answers
90 views

Converting fractions to mixed numbers

I've been making a program for an assignment that converts fractions to mixed numbers, and I'm done, but I was wondering if I could simplify it in any way, since it seems quite complicated right now. ...
4
votes
1answer
62 views

Meal plan for the week

So I made this program, where you can add a recipe which is saved as a json and you can get a plan for your meals and a grocerylist back. ...
5
votes
1answer
38 views

Import and export of animation keys in Maya

I have programming this importing and exporting of animation keys. It is working, but I would like to gather any feedback/advice as I am still pretty much a noob in coding. ...
6
votes
3answers
153 views

Airflow calculator

I have started to learn JavaScript over the last few weeks. I have gone through most of the Head First JavaScript Programming book and it has been fantastic. I highly recommend it! Anyways, I found a ...
1
vote
1answer
78 views

Python CSV file import and object manipulation

I am trying to import a .csv file and save data in objects for later manipulation in Python. I am very new to coding so please do let me know my fundamental errors. ...
4
votes
2answers
902 views

“Computer guesses my number” game

In this exercise I have to do this: Modify the program so that no matter what number the user thinks of (1-100) the computer can guess it in 7 or less guesses. I'm just a beginner in Java and ...
0
votes
3answers
90 views

My take at ProjectEuler #17 - counting counting characters

I tried to tackle #17 problem on Project Euler: If the numbers 1 to 5 are written out in words: one, two, three, four, five, then there are \$3 + 3 + 5 + ...
3
votes
0answers
58 views

Encoding the problem domain of products and prices into the typesystem in F#

I'm trying to design a model for purchasing amounts of products in F#, following the ideas for designing for correctness (source). The idea is to use the type system to capture the different legal ...
4
votes
0answers
41 views

Simple, encapsulated C++ logger that can deal with fork/exec situations

Motivation: for whatever reason, some of the available 3rd party logging libraries don't really deal with programs that get fork'ed/exectuted well. For instance, ...
0
votes
2answers
46 views

Defining metaclass instance methods inside of the metaclass factory instead of the metaclass itself - flawed design?

I'm wondering if this is good design, or if the definition of the __init__, __call__, and ...
0
votes
1answer
62 views

First HTML5/CSS site

My girlfriend and a friend started a Kiwanis club around here, so I figured it would be a good opportunity to try coding my first web site. I'm pretty new to coding still and it's pretty basic, so I'm ...
3
votes
0answers
47 views

Novice implementation of TicTacToe in Haskell

I want to learn Haskell and figured the best way to do it is to write a simple TicTacToe implementation. However the result feels very inelegant and I think it might be the best playground for your ...
1
vote
1answer
46 views

Playing “craps” for the win v0.3

Continud from Playing “craps” for the win v0.2 You roll two dice. Each die has six faces, which contain one, two, three, four, five and six spots, respectively. After the dice have come to ...
2
votes
0answers
20 views

2D Convex hull exercise

I'm reading Real World Haskell, and this is my first try with the language. This is the result of the exercises of chapter 3: Consider three two-dimensional points a, b, and c. If we look at ...
1
vote
2answers
109 views

Playing “craps” for the win v0.2

Continued from Playing "craps" for the win You roll two dice. Each die has six faces, which contain one, two, three, four, five and six spots, respectively. After the dice have come ...
10
votes
2answers
355 views

Playing “craps” for the win

No specific question here. I am beginning with Java and here is an exercise. The rules of game: You roll two dice. Each die has six faces, which contain one, two, three, four, five and six ...
3
votes
2answers
373 views

Class design for a student class

Problem Statement: Design a STUDENT class to store roll, name, course, admission date and marks in 5 subjects taken from user. Create an array of STUDENT objects. Provide methods ...
5
votes
2answers
97 views

Realtime chat room

This is a really simple chat room that I've made using Firebase. Before I take it to the next level I want to know if there is anything I can improve right now. Since I'm new to Firebase I don't know ...