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 into consideration by reviewers when assessing your code.
0
votes
0answers
11 views
Binary reader and writer
I recently implemented a binary reader/writer for my multiplayer game.
Now reading bytes looks like this:
...
0
votes
1answer
15 views
DailyProgrammer 280 Easy: Counting on Fingers
We are trying to count to 100 on two hands!
Input is given like so: LP LR LM LI LT RT RI RM RR RP (i.e. 0111011100)
Where:
...
-1
votes
0answers
12 views
Function that returns largest/smallest number from string [on hold]
The exercise I'm doing asks for a function that can take a string of numbers (separated by spaces) and return the highest and lowest numbers. My code is working great except it thinks that 542 < 6.....
-2
votes
2answers
40 views
How do I reduce the use of if else in this display function?
I have a method which uses the same code over and over again. I would like to optimize my code in such a way that there is no repetition in my code. I am sure there is a better way to do things ...
0
votes
0answers
11 views
Download of files in Async task for Android
I am using AsyncTask in Android to download files from the server. Is there a way by which I can improve the process? Can the download happen any faster? Is there a ...
-3
votes
0answers
18 views
Passing and changing an argument name in C [on hold]
I'm totally new to computer science so please people be kind for me even though I sound ignorant.
I'm struggling with accepting an argument name and passing it along to the program I have made. I ...
3
votes
2answers
54 views
GPA Calculator that takes letters or numbers as input
The program is complicated. I didn't call any class because it was hard for me using classes.
Did I do something redundant or did I miss something?
...
15
votes
4answers
1k views
Easy game - Capitals and countries
Recently I started learning Java. This is my simple game. It gives you a country and you need to enter the corresponding capital. What do you think? (Before running it you need to do score.txt)
...
6
votes
2answers
59 views
Input, display and search company data
I am a programming newbie, I have just learned classes and was practicing some examples from the textbook when I came to a screeching halt.
Here's the program I have written, it is complete but not ...
4
votes
2answers
81 views
Calculates the number of hours and days left, where the total number of hours is 486
I'm new here and this is my first simple console application that calculates the number of hours left. There's a lot to improve and if you have any suggestions on what things to add or refactor that ...
1
vote
0answers
24 views
Exporting a table with header and subheader
I have an array matrix, for example A(3,3), I want to make a table with header names like, ['force','mass','acceleration'], the second row contains the units (subheader), ['N','Kg','m/s^2'], and the ...
2
votes
2answers
94 views
Finding the item with the minimal value in a sequence
This is an algorithm to find the item with the minimal value in a sequence. I've written a function called minimal to implement this algorithm.
Here is my script:
...
5
votes
1answer
77 views
Replacing characters in a Java string using iteration and recursion
I am new to the whole Data Structures thing and I want to get better at writing efficient code. So, I have been practicing some problem sets. The questions is - Replace characters in a string using ...
4
votes
1answer
66 views
Javascript equalise heights of groups of elements
This is a small function I have written to equalise the height of groups of elements. Useful for when titles or content will end up being odd length and throw out the visual flow.
To use it you just ...
3
votes
1answer
60 views
Iterative Fibonacci sequence
I implemented a function that prints all the numbers from the Fibonacci sequence until max_num. The minimum value allowed is 0 (so, fib(0) prints 1). It works until ...
2
votes
2answers
194 views
CarTalk's Homophones Puzzler: A Programmatic Solution
The puzzler:
This was sent in by a fellow named Dan O'Leary. He came upon a common
one-syllable, five-letter word recently that has the following unique
property. When you remove the first ...
3
votes
1answer
48 views
Very basic “sleep calculator” algorithm in C using cs50 library
I've been following along with CS50 online and tried my first shot at making a program from scratch and without guidelines. I hope you may be able to rip it to shreds for me.
...
5
votes
0answers
59 views
Multithreaded webcrawler
I've been trying to learn Java for the last day or two. This is the first project I am working on, so please bear with me. I worked on a multithreaded web crawler. It is fairly simple but I'd like to ...
6
votes
1answer
54 views
Java Workout Log
I want to get back into Java programming and so I began to teach myself the language by reading books as well as studying for the OCAJP 8 exam which I plan on taking this coming Monday. I feel as ...
4
votes
1answer
88 views
Pong in Python and Pygame
I'm new to programming. This is my first project where I tried to use object-oriented programming. I'm looking for all kinds of comments.
...
7
votes
1answer
77 views
+200
Batch file to backup and update SQL Server DBs
This is my first windows batch file. The script basically goes through this basic flow of tasks, in order to update some specific SQL Server DBs to a new DB version:
Backup all SQL server DBs that ...
4
votes
1answer
38 views
WAKE UP! CodingBat alarm clock
I'm brand new at Python, but I've been working in general at granulating my functions and being as self-readable as possible without suffering readability. This CodingBat question is a little ...
-2
votes
0answers
30 views
C# Random unique numbers from a list and count number of occasions [closed]
this is my first post here and I'm new to coding so please be gentle with me :) I am currently writing a prototype for my work but I got stock. We are currently broadcasting programs that run in ...
2
votes
2answers
48 views
My implementation of item objects in a text adventure
I'm looking for feedback on my implementation of Item() objects in my beginner project (work in progress) or indeed any other feedback you feel is appropriate. I'm sure what I've managed is very ...
7
votes
1answer
27 views
print(fizz..buzz)
I couldn't help but notice we didn't have a FizzBuzz in lua yet.
I've always wanted to take a shot at Lua, so here goes nothing.
Code:
...
0
votes
1answer
56 views
Displaying quiz questions in a web app
I built this web app to present a random group of questions for quizzes and tests. The page opens with random questions. Clicking anywhere shows (only) the spinner div. Clicking anywhere again brings ...
-1
votes
1answer
26 views
Java Scanner String input [closed]
I am doing Java exercises from HackerRank.com and bit confused about this problem.
Here is my code that pass the test case.
...
3
votes
1answer
55 views
Naughts and Crosses: Human vs Computer in Python
So I am very new to programming and I am trying to pick up Python as a first language. I have programmed a simple game of naughts and crosses, but it is very wordy and there must be a simpler/quicker ...
3
votes
1answer
52 views
jQuery menus, click handlers, and scroll effects for a website
So far, I've been using codes based on solutions other people wrote, and I'm trying to learn by modifying those codes. My problem now is that my code ended up too messy (a lot of script tags, jquery ...
5
votes
2answers
88 views
3
votes
2answers
89 views
Change-making problem with specific constraints
I am a new Pythoner. I have solved a OJ project with Python. Can you tell me how can I solve it more Pythonically?
Problem Description: There are n coin denominations, each with an unlimited ...
3
votes
1answer
89 views
Beginner attempt at a text adventure v2
Based upon feedback received in this post I've amended my game and would very much appreciate further feedback on it's current state(work in progress) and any suggestions on what I could implement in ...
3
votes
3answers
143 views
Binary search of an integer array
I'm a beginner. This is my implementation of binary search algorithm in Python. Please review my code and give your valuable inputs for further improvements on overall coding style, rare cases etc.
<...
8
votes
9answers
1k views
Simple temperature converter in C
I have just begun to learn the C language and wanted to start off small with a temperature conversion calculator. The program works, and I'm looking for feedback on do's and don'ts as I am sure there ...
2
votes
3answers
35 views
CodeAbbey #21 Array Counters
I'm trying to learn some Haskell by working my way through the CodeAbbey problems. I really struggled to find a nice functional (but still efficient) way to solve problem #21: Array Counters.
The ...
1
vote
1answer
68 views
Little copy tool
I made a little copy tool, but my progress bar seems to be too slow. I would also be very interested in any tips and improvements or code smells.
MainForm (code ...
3
votes
2answers
150 views
My beginner attempt at a text adventure
I'm a beginner working on a text adventure. It's quite bare-bones at this point but I would appreciate feedback before I continue and the flaws in my code become further ingrained.
I plan to add an ...
1
vote
2answers
67 views
Displaying random elements for a quiz app
I'm a teacher and I built a one-page web app to display random question sets for quizzes and tests. The script I wrote selects one question from a set (array) of questions.
The script works fine, ...
1
vote
1answer
62 views
Responsive jQuery menu
I have completed writing a responsive menu (it uses the HoverIntent plugin) for my WordPress theme and it looks like it is working fine on desktop/tablets/phones.
You can test the code here. Just ...
2
votes
2answers
91 views
Find prime numbers from 1 to 100
Create a program to find all the prime numbers between 1 and 100.
One way to do this is to write a function that will check if a number is prime (i.e., see if the number can be divided by a prime ...
4
votes
1answer
133 views
Start an EventHandler in different Thread
I just stumbeled accross some code and I would do it in a different way. Since I am quite new to programming, I just wanted to know if I understand it right.
Original Code:
...
6
votes
3answers
413 views
Simple MAC converter
I'm new to Python and experimenting with some simple scripts. I would appreciate if you could give me some suggestions on how the following code can be improved or made simpler or anything in general.
...
1
vote
1answer
15 views
Rails query for all questions in tournaments that a user participates in
I'm new to rails and this is the situation I'm in: I have a User model that has many tournaments, a Tournament has many users ...
1
vote
1answer
84 views
Program to calculate a student's test average
I made a very simple program where you input a students grades (edit the code with the set method?) and the program will output the average. Each test has a different weight associated with it.
The ...
2
votes
2answers
59 views
Opening programs from a simple spot
This is a simple program that opens programs from a simple spot:
...
3
votes
2answers
46 views
Search for string in many WBs and post results into another WB
I want to search for a string inserted in TextBox1 on Mainwb within a range of data located in Workbook ...
1
vote
0answers
34 views
One-page quiz web app for teachers
I'm an EFL teacher, and I built this web app to present a random group of questions for quizzes and tests. The page opens with random questions. Clicking anywhere brings up the spinner. Clicking ...
0
votes
1answer
46 views
sportsRunning and sportsWalking
There are two functions, sportsRunning and sportsWalking, that will render different text. For this, I am using an ...
5
votes
1answer
46 views
Properly create and customise a web app using visual studio 2015 C# MVC template
I'm new to C# web, I want to know how to properly create a web app using
visual studio 2015 MVC templates, and being able to customise some of its code. I want to both practice C# web and clean code.....
3
votes
3answers
82 views
BMI calculator in Python
This is my first attempt at writing a programme: a BMI calculator written in Python. Please give me feedback on the programme overall, as well as how easy the code is to interpret and adapt.
...