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

5
votes
0answers
55 views

The rusty Sieve of Eratosthenes

To get familiar with the Rust language I've decided to implement the method of Sieve of Eratosthenes to find primes up to a number N. I have created the following code that both prints the prime ...
5
votes
1answer
97 views

Palindrome evaluator in C++

I started learning C++ a few days ago, and this is my first full program. It takes in words until an end-of-file character prompt is given, and then outputs which of those words are palindromes and ...
3
votes
2answers
54 views

Beginner code for a Rock, Paper, Scissors game in Python

I am a beginner in Python and I wanted to see if I could get some feedback on my simple Rock, Paper, Scissors game. I do have previous experience in programming, as I started learning a few years ago ...
2
votes
1answer
69 views

Convert an Integer number to readable format in Java

The number is ranging from 1 to 999999999. ...
4
votes
1answer
26 views

Count words in string and tally up the repetitive words

I'm an elixir beginner. I'm doing the word count exercise of exercism website. The word count exercise returns a map with the word as the key and the number of instances as value. The exercise ...
-3
votes
0answers
21 views
1
vote
1answer
54 views

CUDA brute force 48 bit key

I have a cryptographic function with two 24 bit keys. I have two blocks of input and two blocks of output, and want to brute force the keys using CUDA. Overview: The function is composed to two ...
1
vote
0answers
32 views

Mongoose schema for products and social media posts

Here is my current Schema Brand: ...
5
votes
0answers
22 views

Pomodoro timer in Go

My goal is to implement a simple pomodoro timer using Go: channels, goroutines. I'm newbie in Go world and have some misunderstanding about naming convention. I read a lot of Docker's code on GitHub ...
1
vote
1answer
31 views

Simple four-operation calculator in Lua

I'm a beginner at Lua and programming in general and I just made a simple calculator and I was wondering where I could make improvements. ...
8
votes
1answer
49 views

Small Python class for Lindenmayer Systems

L-systems are basically rules for recursively rewriting a string, which can be used to characterize e.g. some fractal and plant growth. I wrote a small class to represent deterministic L-systems and ...
3
votes
2answers
49 views

Exercise 1-22 from K and R: line folding

I'm currently learning C with K&R, i'm right now in the exercise 1-22, but it's a little... hard to understand (at least for me). It says: Write a program to "fold" long input lines into two ...
1
vote
0answers
18 views

Practicing rogue-wave I/O

What I'm doing: Searching in current directory for a set of files. Filtering the set. Searching through the filtered set of files for a specific line sequence. Write to an output file that line ...
3
votes
2answers
183 views

Printing all prime factors of a number input by the user

I just started teaching myself to code a few days ago using the Euler problems. I finished a variant of problem 3: print the prime factors of a number input by the user. I just want feedback and code ...
5
votes
1answer
82 views

Koch snowflake in Python with numpy and pygame

I've drawn a Koch snowflake with Python 3. I'm new to the Python world and would appreciate all feedback on how to make the code more Pythonic as I'm not used to these idioms, styles and modules. All ...
3
votes
1answer
34 views

Aggregate cost for a directed graph in Prolog

I've come up with a simple graph traversal algorithm to calculate the aggregated cost of a directed graph or its subgraphs. Given a directed graph, the code visits all reachable nodes and sums up the ...
1
vote
2answers
87 views

Argument parser for a PostgreSQL backup utility

I'm sure it's still not yet perfect and tips will be greatly appreciated! I just re-read the script and I realised I'm not handling exceptions! The script is unfinished but I'm looking for WIP (work ...
2
votes
1answer
75 views

Checking for vowels rewrite

A few days ago I posted a little program that would check for vowels within a given word. I have rewritten this program, it can only find vowels in the English language still but, it will now tell you ...
0
votes
2answers
45 views

Getting and posting data use PHP OOP and mysqli

I am not very experienced in php oop. Moreover, when mysqli comes with php oop, it make me more confused about using it in best efficient way. Anyway, first look at my connection class: ...
-1
votes
0answers
14 views

Linq to Xml - Update existing xml document [closed]

Hie everyone. Im tring to update an existing xml document that is part and parcel of the application. The xml document contains instructions for the application. I have been searching how to save and ...
8
votes
1answer
116 views

Calculating word-wise CRC

This is a small program to calculate the CRC for an STM32 program image, compatible with the CRC on the STM32 hardware. It's a word-wise CRC, and the bin file is encoded as a series of 32 bit little ...
1
vote
1answer
33 views

Support multi functionality in server.js

i've node app that having the main function server.js(entry point) Following is the server.js file code ...
1
vote
0answers
39 views

Dynamically call a function in a given module

I use the following code that is working as expected and I want to get some feedback from the community how I can Improve it... The code does the following: Get Some request with specific ...
-2
votes
3answers
103 views

Generating a very long random string of letters

I was trying to fill a file with about ten million random characters (a-z,A-Z,' '). To my surprise the code is extremely slow. I inserted this print ...
7
votes
2answers
250 views

Card-fighting game Part 2

Information: This is part 2 of the game I am building. After some good feedback on my first post I decided it was time to post my updated code. The differences in this part are: Updated code after ...
5
votes
2answers
77 views

Movement around a large map

I'm trying to make a small shooter game, where you can only see a small portion of the map around you. The map will also be much larger then the actual JPanel (The panel is 1000 by 1000, the map ...
0
votes
1answer
55 views

Probability Chance

I'm creating a game and I need some properties to work as percent chance to hit/dodge. I implemented a small testing program that takes percent chance and the amount of hitting attempts as input and ...
5
votes
2answers
99 views

Guess a number, any number, between 1 and 10

I am learning Ruby and would like to know how I am doing as far as writing the actual code. Please keep in mind that this is my first Ruby script program, but I am trying to learn ruby in a very ...
3
votes
1answer
55 views

Building blocks of Life

I'm learning Clojure, and decided to write a Conway's Game of Life clone as my starting project. I ended up dicking around for a bit before diving in, and came up with a few functions that I'd like ...
24
votes
1answer
2k views

Charmander Brainfuck interpreter in Haskell

I just started learning Haskell and this is my first big project (ie not factorials, fibonacci or graphers). This is kind of a gift for somebody so the language is a bit different. The program works, ...
7
votes
1answer
111 views

Basic C# calculator code

I have not had any experience with coding before, and after beginning to learn I stated working on this calculator which runs different functions on the console. I'd like to hopefully be taught what I ...
-1
votes
1answer
33 views

SQL query to include one column value for one condition and exclude other columns

I am learning writing T-SQL queries. The ITEMS table has a column named mfg possible values (R, K, I, Z). The ...
4
votes
1answer
36 views

LEB128 in Haskell

I have implemented the LEB128 encoding for unsigned integers. I'm fairly new to Haskell so I have some doubt about the coding style I'm using, particularly the definition of ...
10
votes
1answer
151 views

Card-fighting game

I am currently building my first game/app in javascript. It is a very simple script that has about 130~ lines of code. I feel like what I did so far is not optimized, can anyone please help me ...
8
votes
5answers
1k views

Checking if a string contains vowels

I'm just learning C# and wrote a little program to check if a word contains vowels, it's fairly simple and not to exciting but I would like to know if there's ...
4
votes
3answers
115 views

Pythagorean triplet adding up to 1000

Project Euler problem 9 says: A Pythagorean triplet is a set of three natural numbers, \$a < b < c\$, for which, $$a^2 + b^2 = c^2$$ For example, \$3^2 + 4^2 = 9 + 16 = 25 = 5^2\$. ...
2
votes
2answers
99 views

Simple TicTacToe game in C++

I just started learning C++, and this is one of my projects. It's just a simple 2-player (No AI) TicTacToe game that runs from the console. The project was to familiarize myself with arrays, so review ...
3
votes
4answers
48 views

Beginning guessing game in Python

I've just finished work on my guessing game. I'm still fairly new to Python, so I'm looking for feedback and criticism on the code. ...
1
vote
1answer
25 views

Speed-Distance-Time Calculator in Rust 1.8

Whenever I try a new language I always try to write a speed-distance-time calculator as well as possible. I did this with C++ a while ago now. This is a similar question but this time in Rust. The ...
3
votes
3answers
434 views

Finding the tree height in Python

I'm trying to get an efficient algorithm to calculate the height of a tree in Python for large datasets. The code I have works for small datasets, but takes a long time for really large ones (100,000 ...
1
vote
0answers
81 views

Snake game in C++ for Windows console

To give you a simple background, I've been programming in C++ for about a week and decided I wanted to build a simple snake game. I made one over the course of a day and this is the end result. What ...
5
votes
1answer
58 views

Random playlists program

This is the first program I've created without help from a tutorial. Written in Python 3.4, it gathers a specified number of media files and opens them in the default player (I use VLC on Windows ...
3
votes
2answers
81 views

Obstacle-spawning and movement scripts

I have these scripts I made that work absolutely perfectly as I need them to. Is there any improvements that can be done to these scripts and make them more efficient for Mobile Platforms? Or even ...
4
votes
2answers
31 views

Adding dynamic column names to a table

I'm using Microsoft SQL Server 2014 Express. I found myself wanting to add the Columns CompanyNameChangeDate (1 through 10) and ...
15
votes
3answers
608 views

C# Program that checks on the status of the Capslock with each character insert

The following is my first successful running C# program. The lessons that I personally learnt through this include: The value of asking for help after having tried several times The advantages of ...
2
votes
1answer
80 views

Finding the two largest three digit numbers missing from a text file

Hear this problem: Write a C/C++ program that reads all the values from the "BAC.TXT" file and determines which are the two largest three digit numbers that are missing from the file using a ...
3
votes
4answers
95 views

A simple command-line calculator

I created a simple command line calculator, and then after some reading I made a few tweaks and then remade it with a friends idea to make it more simpler. I'm wondering if this can be more optimized ...
1
vote
1answer
78 views

Reading from text files in C/C++ [closed]

I'm writing a program that has to check which are the two largest three digit numbers that are missing from a text file. I'm writing this in C++ and I'm trying to solve the mystery in a ...
4
votes
1answer
52 views

How can I enhance my linkedlist implementation in java?

I recently implemented Linked List on my own. I did not use generics as I am still learning. How can I improve it: ...
4
votes
2answers
129 views

Python 3 NetScanner Daemon

I’m pretty new to programming and python in particular. This is a simple ICMP/TCP scanner that dumps output to a terminal and/or csv file. My goal was to make a daemon that could do simple scanning ...