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.
3
votes
2answers
271 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
1answer
31 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 ...
7
votes
4answers
565 views
Guess the random number game
I have created the classic "guess the random number" game:
Generator Interface
...
-2
votes
0answers
26 views
How to reach end of text/file of URL? Swift [on hold]
I am desperately trying to rewrite code which reads files line by line, so to make it working with URLs and in swift.
...
4
votes
5answers
596 views
findLowest() and findHighest() functions in this simple program
My code does the job for the most part, but I don't think the two functions that look for the highest and lowest score are the best approach. The instructions tell me to use the ...
1
vote
2answers
61 views
School Library Management System
I require feedback on the plethora of bad practices that are definitely existing in the following code:
...
4
votes
1answer
25 views
4
votes
1answer
135 views
Caesar decipher
I have recently started learning Python and one of the assignments I have been working on is a Caesar decipher.
Can you tell me how I can make my code better?
...
-2
votes
0answers
23 views
How do I print a character multiple times on the same line in Java? [on hold]
I'm given a word and need to print the character 'a' for the length of the word given.
This is what I have so far:
...
1
vote
2answers
53 views
Backing up an entire website with PHP
I'm attempting to backup lots of website using this php code. The script basically goes through the whole public_html directory and adds all the folders and files recursively and zips them.
Here's ...
5
votes
2answers
84 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
1answer
65 views
Quicksort implementation in Python
I have written an implementation of Quicksort in Python. I am new to Python. Any suggestions for improvement or criticism on my use of Python?
...
2
votes
4answers
267 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
45 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.
...
5
votes
0answers
39 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. ...
17
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 ...
4
votes
0answers
63 views
+50
TicTacToe in Haskell
Are there any ways which I could improve and simplify this code? Is my code idiomatic Haskell?
Is the use of a lens library to change an element of a two-dimensional array unnecessary? If so, how ...
1
vote
0answers
25 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
58 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
87 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 [closed]
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
77 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
31 views
How to make random number generate new numbers each time? [closed]
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
510 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
74 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
51 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
24 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
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
47 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
118 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
...
4
votes
1answer
68 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
541 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 ...
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
75 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
148 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
89 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
57 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
427 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
359 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
338 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
62 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
78 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 ...