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.
1
vote
0answers
11 views
Return results from goroutines
I have two goroutines that each need to return their results to the main function. These results are of different types.
I have implemented a solution that uses a structure that holds these results. ...
3
votes
2answers
25 views
Check disk space against a threshold
The below script is one I made to check the disk space on mounted partitions under Debian Wheezy. I tried adding a -d switch to force printing out the used data, ...
1
vote
3answers
66 views
Project Euler #1 - JavaScript
I'm new to JavaScript, and decided to learn the language by running through as many of the Project Euler problems as I have time to do. I just finished the first one, and am looking for some feedback, ...
2
votes
0answers
30 views
Evaluating Fibonacci-sequence-based recurrence relation (SPOJ Flibonakki)
I have a function fib2 which returning two values as Tuple but I want to print the product of tuples returned by function fib2. I am new to Haskell so please ...
1
vote
1answer
24 views
Creates an Excel inventory from Cisco Show Version text files
This has been written for network engineers to be able to create an Excel inventory of switch/router device info from a folder of 'Show version' .txt files. I've put it here to help me learn about ...
2
votes
0answers
31 views
Fast power in Go
I just started learning Go. To start playing with it, I've implemented the fast power algorithm:
Any suggestions or criticisms regarding the coding style?
...
3
votes
2answers
415 views
Simple Java Game including Thread
I am a Java beginner and have made a simple Compare Game. It has done well but I am not sure about my solution, especially about my thread. Can you give some advice on making it better?
...
10
votes
4answers
836 views
FileScrambler, a command-line file encryption tool
I decided to try my hand at making an encryption utility, which I lovingly call "FileScrambler". FileScrambler allows the user to encrypt a file (a master-password list, personal diary, or whatever) ...
1
vote
0answers
19 views
Re-implementation of Caolan McMahon's parallel and map functions
I have wrote my first reasonably complete piece of ClojureScript code and would like feedback. It is basically a re-implementation of Caolan McMahon's parallel and
map functions from async in ...
3
votes
2answers
132 views
Brute force algorithm for printing all possible alphanumeric combinations
I'm still very much a beginner, so I don't really know much about best practices or the speed of any particular C functions.
You'll notice that I included a "cs50" library. This is from a MOOC I'm ...
2
votes
2answers
65 views
Using reduce twice in a row for Run Length Encoding
First of all, I'm new to Lisp (I currently use CLISP and SBCL). There probably are huge mistakes in this code so any guidelines are welcome :)
I'm very confused about how to do this. It's just about ...
1
vote
0answers
37 views
Beginner stopwatch app
I'm learning Swift and would appreciate any code review suggestions (the more nit-picky, the better). In particular, I'm wondering if there's a more efficient way to format the time in the ...
2
votes
1answer
33 views
Movie selection app
I'm new to Angular and I would like some advice on how I can improve my code. The main things that I want to focus on are decoupling and code correctness.
HTML:
...
1
vote
1answer
54 views
Challenge: Determining the existence of string Intersections
Problem: Given 2 strings, consider all the substrings within them
of length len. Len will be 1 or more.
Returns true if there are any such substrings which appear in both strings.
Compute this in ...
2
votes
1answer
46 views
Adding HTML DOM template
I'm new to JS and jQuery. I wrote this function which just does what I want, but it seems very unreadable, and because of my experience, I don't know a better way to handle it.
Could you please give ...
3
votes
1answer
59 views
Challenge: Finding the length of the largest run
Note: A run is a series of adjacent chars that are the same.
I just want to answer a few questions:
Is this readable?
Does it need commenting or is it self-descriptive enough?
Are there any ...
12
votes
1answer
350 views
Clone GitHub repository using Python
I want to backup my GitHub repositories since there is news about blocking GitHub in India. I wrote Python code to automate this and would like for it to be reviewed.
...
4
votes
2answers
64 views
Implementation of a quicksort function
I am an absolute beginner to programming and am learning it using C. I have just learned function pointers and tried to implement a quicksort function using function pointers to determine the nature ...
1
vote
0answers
18 views
Newsfeed app for allowing custom Reddit feeds
I'm currently working on a newsfeed app (see it live here or its files on GitHub) that lets a user create a custom Reddit feed. The user adds the subreddits they'd like to view, and then can view them ...
10
votes
3answers
423 views
Countdown program in x86 NASM
I am fairly new to Assembly language programming and, for practice, I gave myself a problem: count down from 10 and right after 1, say "Blast off!".
...
7
votes
0answers
35 views
Polymorphic animals speak their name and make a noise
I'm new to GNU Smalltalk. I'd like to port a script I've written in Ruby, Scala, CoffeeScript, and several others. It's the one I use to try to learn the classic OOP concepts of abstract classes, ...
14
votes
9answers
1k views
Sum of numbers separated with comma
I am very new to HTML and I've decided to attempt to put what I know into an HTML page that allows you to enter any amount of numbers, separated by commas, and would display the sum of all the numbers ...
3
votes
2answers
60 views
Programming MySQLi prepared statements
I'm programming code with MySQLi prepared statements. I'm a beginner and just want to ask to experts if my code is correct.
...
2
votes
1answer
60 views
Solution to the CodingBat Array-3 [fix34]
I was studying for arrays from coding-bat and encountered this:
The question is: (fix34)
Return an array that contains exactly the same numbers as the given
array, but rearranged so that every ...
2
votes
1answer
50 views
In-place quicksort algorithm in Python 2
I have tried to implement an in-place quicksort Algorithm in Python 2. Please suggest how I can
Make the code more efficient
Increase readability
Improve writing style
Make it more Pythonic
...
3
votes
0answers
89 views
Exception logger for servlets and JSPs
I hate using unnecessary catch blocks and I like to see my code look beautiful. In most of the cases in my project, which is a web application, I can't declare many ...
2
votes
1answer
41 views
A prime number sieve using recursion
Out of curiosity, I built a recursive Sieve of Eratosthenes in Python and I was wondering how it could be improved for efficiency and how it can improved to be aligned with python best practices.
...
2
votes
2answers
137 views
String 'expanding' code challenge - reinserting repeating characters
The challenge: Given a String, for each digit in that original string, replace that digit with that many occurrences of the character following it. So a3tx2z yields ...
1
vote
1answer
22 views
Autoclicker Tkinter Program
I made my first program that I might actually use and I was wondering if anyone had some tips on how I could improve it.
My code is an auto-clicker that uses Python3 ctypes for the clicking and ...
5
votes
1answer
66 views
Adding a compose key to Windows
I made a piece of software that basically adds the functionality of a compose key to Windows, after switching from one keyboard layout to another (for programming reasons), and being unable to find a ...
3
votes
3answers
263 views
isPalindrome in C++ using pointers [closed]
I am just beginning to learn C++. I have experience with other languages, mainly C# and Java, so pointers are repetitively new to me.
Below I have implemented a function which checks if the given ...
15
votes
2answers
1k views
Writing FizzBuzz like this makes me feel like a small child
For the sake of full disclosure, this was written with bananas, not apples. The doctor may not be kept away.
With AppleScript highlighting:
For Copy&Pasting:
...
4
votes
3answers
356 views
8
votes
3answers
195 views
Speed up Sudoku Solver
I made this Sudoku solver using depth first search, it takes less than 0.1 second to solve any simple solution(no guessing), but if the solution requires guessing (thus using the DFS) its time grows ...
2
votes
1answer
44 views
Condensing multiple conditionals into function
I feel like I'm repeating a ton of code here and there's got to be a better way to do this but am just completely spacing right now. I basically have an else if ...
6
votes
1answer
86 views
Simple Peg game
I'm new to coding and this code pretty much goes to the extent of my current knowledge I'm looking for ways to improve this code. This code compiles and runs fine in Visual Studio 2013. I'm also using ...
3
votes
2answers
83 views
Prime Number Sequence generator
I have just started using Python, and I am attempting to make a prime number sequence generator, where it will print the a specified amount prime numbers in terminal. I have other versions of this ...
-2
votes
1answer
42 views
Generating all permutations of a list [closed]
I'm looking for feedback on the following functions to generate permutations of a list. I'm new to programming and did this as an exercise after taking an on line algorithms course. I think it is ...
3
votes
2answers
30 views
Copies inventory data from multiple excel worksheets to individual excel delivery notes
I am new to Python and am looking for any feedback/criticism on scripts I have written for work. This script works as I intended, creating multiple .xls files from a workbook with multiple ...
2
votes
0answers
39 views
A File Upload Handeler (PHP,OO)
Sorry, I am a OO beginner. Don't really get a big picture like 'how to think in OO'.
I start with a bunch of function, make the code work, then I spent a day to rewrite it in OO way ---- as much as I ...
4
votes
2answers
75 views
Concisely adding values in a loop to a column
In my data frame I assign values to the column Register by checking another column (Source) for specific values. Based on those values, the output in Register changes.
I am relatively new to R, but I ...
2
votes
2answers
50 views
Function caller (to multiple receivers) interface
This class is designed to call a similar function of multiple objects of multiple classes using a single interface (it is not for calling functions that return a value).
A potential usage will be ...
5
votes
2answers
93 views
C++ game with splash screen and menus
As of now this game only consists of:
Splash Screen
MainMenu
SubMenus
Did I apply bad practices, or did I do something well? Is there a better way to do it?
...
12
votes
7answers
761 views
Beginning Blackjack program
I am fairly new to this, so please tell me whether this is a good way to write code or if I'm missing anything.
...
7
votes
4answers
188 views
Calculating a specific entry in a Pascal’s triangle recursively
Our task was to calculate the entry of a Pascal’s triangle with a given row and column recursively. The triangle was specified in a way that the tip of the triangle is ...
11
votes
3answers
128 views
Becoming the greatest tower builder
I am trying to learn how to write proper code in python, and stumbled upon the following problem.
Bob is given a set of building blocks b, and a number ...
3
votes
1answer
39 views
Makefile that places object files into an alternate directory (bin/)
I'm trying to learn how to use makefiles, and this is my attempt at making a makefile that compiles source files in a source directory (src/) into object files that are created in a bin directory.
...
2
votes
0answers
37 views
What's the best approach to achieve two-way communication with TIdTCPServer and TIdTCPClient?
I'm a newbie in Delphi and I'm trying to create a client/server application using INDY. I want to have a server that is capable not only of receiving messages and streaming, but also sending data to ...
-2
votes
1answer
71 views
Display multiple subtype objects in one page
I have a base class with 3 sub ones:
Item <-- Book, MusicCD, Software
They have some common and different properties but in the view I want to get a mixed list of them and show in one table:
...
7
votes
1answer
61 views
Fascinating, ma'am
Finding a famous question with high score I haven't voted on yet was proving to be a bit difficult for me. So I came up with this simple SEDE query to find good candidates:
...