Tagged Questions

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

Finding the weight of the heaviest path in a binary tree

I'm fairly new to Java, arriving in the "future" from C and returning to type safety from Python. I've programmed an algorithm to return the weight of the heaviest path from the root of a binary tree ...
2
votes
4answers
217 views

Calculate employee wage

This is for a class assignment. The objective is to write a program that will take in user input for employee information and print the wage based on hours worked. Please review my code. ...
4
votes
1answer
36 views

Ruby script to create git repos

I wrote my first ruby script, by this tutorial. It creates a local and remote git repo. I have been working for about 3 years with PHP, and somehow I find that my ruby script looks incredibly ugly. ...
4
votes
0answers
30 views

A reversed-string Trie data structure

This is a simple Trie data structure for strings, except it puts the strings into the structure backwards. The insert method simply iterates over chars from the string-to-be-inserted backwards, and ...
2
votes
1answer
55 views

Node2D and Node3D classes implemented using a shared decorator

I have the following classes. validator is a decorator that receives a class which defines validation criteria for a decorated function. ...
15
votes
6answers
1k views

Beginner number guessing game in Java

I am a first year CS student. We are currently learning Java and my latest assignment was to create this random number game. I am hoping to get some feedback on code style etc so that I know what not ...
3
votes
0answers
27 views
1
vote
0answers
22 views

Extract logic applied in a sequence of integers

I've done it in C# before but thought that a functional language would be a good fit for this kind of thing. From this ascending list of integers: [100,103,106,112,118,121] I had to calculate ...
3
votes
2answers
54 views

Auction function for a game

This is an auction function for a game where you can bid on houses on the website. You set a limit, and if posts limit below current bet or below your limit, it will raise the bid from current plus ...
4
votes
3answers
86 views

Finding the mode of an array

I am a beginner in JavaScript and just wanted to get my code reviewed. Here I have created a function that takes in an array and returns the mode. If there is no more then I just want the function to ...
0
votes
2answers
41 views

Simple print function, passing in various arrays [on hold]

I wanted to create a print method that could take in a given array and print it. I can only seem to make the print function specific to my specific array. My print function only can print 1 array, but ...
4
votes
2answers
73 views

Inserting and displaying books

I'm trying to write a program where you can insert and display some books (without using a database). For doing this, I use three classes: Book - is the base ...
-1
votes
0answers
29 views

How to make random number generate new numbers each time? [on hold]

This program is supposed to replicate the game higher or lower. A number is chosen and the user must guess if the next is higher or lower. I cannot get this to work, the number always stays the same ...
8
votes
4answers
502 views

Text-based BlackJack game

I am a new programmer (I've been doing Java for about 7 weeks) and I am of the type who wants to get it right straight away, so I wonder how this code: Compares to the common practice is structured. ...
1
vote
1answer
61 views

Utilization of Steam APIs and web-scraping

Some background info here: This is a small fun project I made utilizing Steam APIs and web-scraping This is the first time I've ever used Python, so I'm not very familiar with the language I used ...
3
votes
1answer
41 views

Gulpfile.js optimization and image caching

I'm trying to write gulpfile.js, which will follow modern best practices for optimization. This project includes jekyll, SASS and some image optimization tasks. I'm pretty new to JavaScript and Gulp, ...
2
votes
0answers
23 views

Command line flags & sorting algorithms

I've made my first-ever program in Go, which sorts a given input of integers. There are 2 options: The list of unsorted integers and the algorithm to use. Since it's my first go project I'm a bit ...
-2
votes
0answers
20 views

Sorting Singly Linked List by String Length [closed]

This is the only problem in my code, when I try to run it and I add more nodes in my list it says STATUS ACCESS VIOLATION. I know this is the only problem since when I comment out the code, my ...
2
votes
0answers
26 views

Python code to write simple VPK archive files

I'm new to Python, but have a lot of experience with C and C++. I would appreciate some feedback on my implementation of a packer for this archive format. Specifically, any feedback on how idiomatic ...
1
vote
2answers
46 views

Processing user input for a form

I'm still learning PHP OOP, so I'd like to seek for some expert advice or criticism regarding this code I created. In this script, I created the objects I need to process the user input from a form. ...
7
votes
3answers
111 views

Simple shell in C [closed]

I am just getting started with C and made this simple shell to test my understanding of some basic principles. The shell reads commands from standard input, forks itself and executes the command. How ...
20
votes
2answers
1k views

Calculate amount of mugs StackExchange should give away so I'll receive one

Description Calculate how many mugs StackExchange should give away(for graduation) to top reputed users on codereview.stackexchange.com so I'll also receive one. (output is divisible by 50). Code ...
3
votes
1answer
62 views

Using array values to create variables, if statements and highchart dataset

I am trying to make my script maintenance-free by replacing some "static" variables and labels with dynamic ones. The main function of my code is to extract data from a SharePoint-list which contains ...
10
votes
3answers
539 views

Beginnings of a base-conversion game in Python

I'm pretty very new to python, so I thought that I'd write a game to teach me python and better teach me how to think in hexadecimal and binary. I'm starting off by writing a few functions to convert ...
-1
votes
0answers
44 views

2d race game movement [closed]

I'm making a 2d race game for my school project. The idea is that we make a race track where 2 cars wil race vs eachother. I'm only struggling with the movements of my car. I made a squire for testing ...
14
votes
3answers
3k views

Is it Friday yet?

This is the first program that I have written in my C++ saga that I actually think is useful. The description for this assignment is kinda long and mundane though: Write a program that inputs a ...
6
votes
3answers
72 views

Singly Linked List Implementation in C

I'm preparing for an interview soon, and I've written the following linked list implementation from scratch. This is all self-taught, and I'm still working on my C. I feel that the implementation is ...
7
votes
2answers
147 views

Linked list implementation of a stack

I am working on a basic linked list implementation of a stack of ItemType (currently set to double but can be changed) values. The stack code will then be used in a ...
0
votes
0answers
4 views

Plugins and exporting an API between python scripts [migrated]

I've got a python script, which should read a subdirectory and make all the scripts within it callable like this: python mainscript.py subscript arguments I've ...
6
votes
2answers
88 views

Basic C# calculator (+,-,*,/) - V2

Original question: Basic C# calculator (+,-,*,/) My 'teacher' requested this problem be solved by parsing the input into a tree based on the order of operations. The class Calc variables are ...
0
votes
0answers
52 views

Sticky navigation using jQuery waypoints

I have built a one-page website with a sticky navigation using jQuery waypoints. Now I just added a highlight function for the menu buttons for when the user scrolls to that certain area. However, I ...
10
votes
3answers
423 views

Reverse Polish Notation Compiler

Description A reverse polish notation based compiler. Very small subset of forth This is a proof of concept level compiler, no optimizations or over/underflow checking see the embedded POD for more ...
10
votes
3answers
358 views

Print Student Names from CSV

Description Print all student names from a CSV file. CSV Format: CSV file does not contain string delimited by double quotes. None of the cells has "," ...
7
votes
3answers
515 views

Concatenate two strings

I am learning C and wrote a function to concatenate two strings in C. Please let help me improve it. ...
2
votes
4answers
276 views

Parsing a string to get the values of certain attributes

I have written a small method that extracts certain information from a string. An example of such a string is ...
2
votes
1answer
58 views

Creating objects from parsed file

I'm newbie in Python but I want to know some tricks to make my code look cute. I know that syntax of Python allows to do this, but I don't know how. Suppose I have file with lines of format "x y z" ...
11
votes
2answers
334 views

Introductory Currency Converter

This is my basic currency converter for my intro to Java class. I'm supposed to be able to convert between Yen, Dollars, Pounds and Euros using static rates. It works, but I was curious to know if I ...
0
votes
1answer
37 views

Parsing log files in Haskell

I am working through the online materials for CIS 194, a upenn haskell class (not taking the class). This exercise is to parse an error log, and it gives a few function signatures to implement, ending ...
3
votes
1answer
59 views

MySQL Java in JTable

This is an assignment posted here. (Part-B) The aim here is to create a GUI in which the user can search for and insert data into a particular table of a MySQL database. Is this an appropriate ...
1
vote
1answer
46 views

Writing a Pythonic prime sieve

I'm practicing writing code less by brute force. I'd like feedback for writing a prime sieve more Pythonic, simpler, or more creatively perhaps. ...
1
vote
2answers
72 views

Enhance a Caesar cipher

I have just written a simple program to implement the Caesar cipher using lists. The program assumes the input will be all capital letters. I'm quite new to Python and am just curious of some more ...
2
votes
2answers
44 views

Test Scores and Summary Statistics from a file

This program takes a file from a user, "example.txt". The file contains only positive integers, and the first interger in the file is stating how many intergers come after that integer (Ex. 3, 45, 98, ...
6
votes
2answers
135 views

Merge Sorting Lists

I'm fairly new to Java, arriving in the "future" from C and returning to type safety from Python. I'm looking for your suggestions to improve this code in the following areas: Correctness - are ...
3
votes
1answer
64 views

Applying scalar multiplication to matrix

This is one of my first programs in C. Please review and help me improve it. I create a matrix and apply scalar multiplication on it. Then I print the result. ...
2
votes
2answers
181 views

Comparing equivalent Scala and C# string-manipulation code - with Scala running much slower

I am very early in my journey of learning Scala, and I was doing challenges on hackerrank.com to get used to the syntax. As I finished one (very trivial) challenge, I noticed that the run times seem ...
1
vote
1answer
27 views

Self-made linked list implementing List<E>

I have to make a linked list as a quasi-homework task, about which I have already asked two questions about here and here. Since the whole code is really big (400 lines approx.), I will include only ...
5
votes
3answers
112 views

Custom linked list implementing Iterable used as stack

I have created a custom linked list that implements the Iterable interface. I am then using this linked list to implement my custom stack. I have also thrown a ...
6
votes
2answers
92 views

Mapping square objects to specific cells in a TableLayoutPanel in WindowsForms game

I have solved this problem but I am looking for a better way to do it, in fewer lines of code. The problem was from this previous question on Stack Overflow. My solution: ...
9
votes
3answers
216 views

Basic C# calculator (+,-,*,/)

My 'teacher' requested this problem be solved by parsing the input into a tree based on the order of operations. The class Calc variables are specific to his ...
2
votes
2answers
436 views

Simple TakeOut Menu

This is for my intro level C++ class. This is the assignment: Write a program that displays a takeout menu from which a user can place an order. The program begins by displaying the menu and ...