instruction
stringlengths
71
71.9k
I've got the following code that I use to output a list of all (public) fields in an object in an easy(ish) to read way. The issue with it is that the code is not easy to look at, and I'm not sure what I could do to improve it. I'm not too fond of all of the StringBuilders, the append calls are ugly and chaining them d...
The proper title of this question should be "Summations and products, and factorials oh my!". After getting quite a bit of useful feedback on this question from @mjolka, and a comment, I decided that there were many things to be improved. These are the following things that I've added/changed: A factorial function wh...
I have a few thousand json files containing order histories sitting in a directory from one of our systems. Since customers can opt in to receive marketing I'm opening each json file and then processing the data to scrape our active subscribers. At a later date I plan to expand this to bring this data into our CRM. As ...
Two strings are said to be anagrams of each other if the letters of one string may be rearranged to make the other string. For example, the words 'elvis' and 'lives' are anagrams. In this problem you’ll be given two strings. Your job is to find if the two strings are anagrams of each other or not. If they are no...
I would like you to review the locking mechanism I implement in C# class. Will it be working correctly with many threads? Please don't mind rest of the code because I just try to repair the class quickly to have a thread safe logging class for my project. Any other suggestions are welcome. public static class Debug { ...
In my last post, I wrote a long, non-general tail-merging† facility for insertion sort. I thought I should instead write a general-purpose tail-merging function, that works even when the two lists are of different lengths. So here it is (requires SRFI 1): ;;; Returns a list that has the same content as `lst`, sharing t...
In Python it is really easy to get sliding window functionality using a deque with maxlen: from collections import deque deck = deque(maxlen=4) deck.append(0x01) deck.append(0x02) deck.append(0x03) deck.append(0x04) deck.append(0x05) for item in deck: print(item) # outputs 2, 3, 4, 5 This does two things - it gro...
MOTIVATION I have this small software package that allow users to maintain a simple text file that looks like tag1 path1 tag2 path2 . . . For example, it may look like home ~ root / funk ~/funky/funk Now, suppose the user is in the root directory /. When the user types dt funk, his current working directory changes t...
I have built a Twitter clone in Golang, using object orientation principles. I wish to know the design mistakes I have made. package blade import ( "database/sql" "fmt" ) type User struct { Name string Password string *sql.Tx } //User is a normal user who can login, register, tweet, retweet, ...
This is my first OOP PHP library and wanted to get advice on how I can improve what I wrote. This is what I needed to do: I'm also not sure on what it meant by "proportionally resize the shape up or down, given a floating-point scale factor" I think what I did what it meant but I could be wrong. Build a simple PHP lib...
I did a sample on Codility and finished the test task. The problem description is very short: The equilibrium index of a sequence is an index such that the sum of elements at lower indexes is equal to the sum of elements at higher indexes. For example, in a sequence A: $$A[0]=-7, A[1]=1, A[2]=5 ,A[3]=2, A[4]=-4, A[5]=...
This is a python implementation of the Alternating Direction Method of Multipliers - a method of constrained optimisation that is used widely in statistics (http://stanford.edu/~boyd/admm.html). This is simplified version, specifically for the LASSO: Given a sparse vector $$x \in R^n$$and matrix $$A \in R^{m \times n}...
I have written a basic ini file parser in C. It won't support big ini files, and isn't very fast when fetching configuration values, but should be enough for small ones. I couldn't find "proper" definition of ini file standard, so there is no handling screening symbols, and all and any error encountered during parsing ...
This code written by @Rahul Singh in this post: var result = _dbContext.ExtensionsCategories.ToList().GroupBy(x => x.Category) .Select(x => { var files = _dbContext.FileLists.Count(f => x.Select(z => z.Extension).Contains(f.Extension)); ...
I have a function that counts how many "assists" a team performs during the course of their day. The way I've written it feels bulky and inefficient using GregorianCalendar. Basically, the function counts specific types of assistance then returns the information in an object. Does anyone know of a cleaner way to do ...
I have finally assembled an attempt to create a thread safe logging class and also ensured by file flags that file should not be accessed by different processes at same time. This classed will be inside DLL. Below is the implementation, static class GMLogger { private static List<string> _buffer = new Li...
I wrote a function that finds the difference between two strings. This only works given that the difference is continuous. Beyond doubt this already exists, I am recreating this for educational purposes. I would like feedback about my performance and efficiency. Examples of this method: String difference = Difference("...
The code is self-explanatory. It has \$O(n)\$ complexity, and it tells whether a given string is the substring of the source string. Are there any cases where this algorithm fails? Is there anything that can be improved? public static boolean isSubStringOf(char src[], char target[]) { int pointTarget=0; for...
I'm fairly new to Java and was trying to make a program that's generates the primes from 2 - 100. I originally had a design of my own making but it was fairly inefficient so I did some research and come across the Sieve of Eratosthenes, which is supposedly the the efficient way to find primes from 2 - n. public class S...
This upvoted SO answer and this upvoted SO answer both check for null in a similar way: they call a function in the if or assert statement and "throw away" the result and then call the same method again in the success clause and operate on the result. I am new to Android development and have limited knowledge of Java, ...
I am trying to work on a WPF application and decided to go for Unit of Work and Repository pattern, along with MVVM. I am using Entity Framework as my ORM. Could you please do a code review? IGenericRepository.cs public interface IGenericRepository<T> { T GetById(int id); IQueryable<T> GetAll(); void Edit(T...
This code takes a integer x of range [0,127] as input, returns an array of four 32-bit integers, with x bits set. I'm trying to maximize switching to make it easier to filter out the ripple in the output. Another consideration is to make it fast because this code runs on an MCU (XMOS to be exact). Although this code wo...
I have a private container registry behind a firewall that will need some Google registry images. To make sure things are updated sanely, I'm writing a mirror script in Bash. I have one line that lists the images without their registry URIs, but it's overly complicated and I am piping through 3 awk statements. docker i...
Problem: A non-contiguous substring of string \$s\$ is a sequence of \$k \geq 0\$ characters in \$s\$, in the order in which they occur in \$s\$. For instance, the set of all non-contiguous substring of "abcd" are \$\{a,cd\}, \{ab,d\}, \{a,c\}, \{a,d\}, \{b,d\}\$. I want to mention this is from an assignment (which I...
I am about to post a question to Stack Overflow about how to do a better job adding a number to the list inside the User class. But I feel if I refactored this I might solve my problem with coupling my data like this. So I am open to suggestions. Ideone public static void addOrUpdate(Dictionary<int, User> dic, int key,...
I wanted to implement a bubble sort in Scala following the steps described in: http://www.bbc.co.uk/education/guides/z22wwmn/revision/3 import scala.collection.mutable.MutableList val result = bubbleSort(List(3,2,4,1,5)) def bubbleSort(list: List[Int]): (List[Int]) = { def doIteration(list: List[Int]): (List[Int], ...
I'm currently writing unit tests in Selenium (C#). I need to do two things in this particular test: Check if 2 errors (with html container) are displayed and check if another (given) error is not displayed. The test looks like this: bool errorWindowVisible = tmethods.IsElementVisible(driver, By.XPath("//div[@class='m...
I have users uploading files sometimes as large as 100+ GB to a local web server. The upload process works well and chunks come in at 50MB. The problem seems to be after the file is uploaded, when the web server assembles the files and the server (24GB RAM), despite not showing any graphical signs of memory pressure,...
I was looking through the JavaFX library, and I spotted that JavaFX DOES NOT HAVE A JOptionPane EQUIVALENT. (Or at least not in my version - as @Legato has said in comments, as of 8u40, there is a Dialog class. I use 8u25.) I decided the next step was to write a OptionPane class. Since JOptionPane has three types of op...
After reading about large files and memory problems, I'm suspecting that my code below may be inefficient because it reads the entire files into memory before applying the hash algorithm. Is there a better way? chunk_size = 1024 hasher = hashlib.md5() while True: try: data = f.read(chunk_size) except IO...
I have apparently correct code that still runs for weeks on my data (tens of millions of rows). I show the entire code for reference (and maybe other gains to be made), but the key operation is in the loop between lines 66 and 79. Basically, if a spell (spent in hospital) extended over a single calendar month, I wanted...
I am trying to make a ferry simulator with one ferry that works like a stack and another like a queue. I have a working class for stacks and queues with pop/push; I am trying to figure out how to simply this code for the ferry class. import java.util.Scanner; public class Ferry { static Stack ferry1 = new Stack...
I have a program which works but it is a bit too slow with big numbers. nbBlocs contains the size of the array, it can be up to 20000 and I enter the value inside on each position. nbQ is the number of queries (at most 20000 queries). For each query, it looks inside the array and tells me which is the closest value to...
This piece of code calculates the sum of all prime numbers below 1 million. It stood out to me that the Ruby script is around 20% faster. I know that Go should be faster just for being a compiled language. So how can I make the Go code run faster than it already does? I'm interested in solutions involving goroutines, p...
This is just a simple app. All it's suppose to do is move the dice around the screen when the user swipes up or down. It will move 2 dice (image drawables) to a position on the screen depending whether they swiped up or down. How can I make my code so it's more object-oriented? At the moment it isn't. Main.java public ...
This code aims to replace labels used to explain a text box's container. This is done by adding a default string when the text box is considered empty to explain the purpose of the text box. However, when the text box is not considered empty, the text box will behave normally. This is what I have written to solve my is...
For my computer science class I am tasked with writing a rock/paper/scissors game. I understand how to write the game, but I was wondering if someone more experienced than I could give me some pointers on how to become a better programmer. Is there anything I could do to reduce the size of the code, but without dimini...
I have been trying to implement parallel merge sort in Scala. My current implementation is about as fast as .sorted, but I have no idea what would be the right aproach to parallelize it. Input file with 1.2M integers: 1.333580 seconds (my implementation) 1.439293 seconds (.sorted) How should I parallelize this? objec...
The div and add functions are located randomly in my package structure. I have a function with this signature: def calc(x, y, func_name='add') How do I implement this function? My idea is to import all the modules, then use the dir function, like so: def import_submodules(package, recursive=True): """ Import all s...
I'm trying to learn how to write more readable code without introducing easily avoidable performance killers. This is part of a BitInputStream Java class I'm experimenting with. There are code parts before and after this provided segment to read less than 8 bits from iBuffer if data is not aligned to bytes - that's why...
I am trying to do some translation of text files. I have a translation .csv file and a file I need to translate (tab delimited). The translation is creating a file with an extra column of the translation. I'd like to hear any suggestions on this. import com.google.common.base.Joiner; import com.google.common.base.Split...
I am working on an MVC solution. My DAL layer I could solve with Repository classes, everything is working great. But in my BLL layer I have repetitive code: My CRUD is the same, my fields and consructor are different. I can also have some extra methods. Is there a way to solve this properly? Class 1 public class JobT...
I need to have some thread-safe event handler (like C#'s EventHandler), so I made one. Here is my event handler class and sample code (compiled with VS2013). Is this code OK to be operated in multithreaded environment? #include <functional> #include <memory> #include <atomic> #include <list> #include <conio.h> ///////...
I'm trying to find a way to make my code easeier to read, so i found that major part of the code is validation trough if, ifelse: if (!$this -> is_valid_username($username)) { $this -> Session -> setFlash('Enter valid client username, Error 1.', 'default', array(), 'errorlogaddclient'); $this -> red...
I'm learning PHP and I know too many ways to configure the application. I use this method: Folder: app config app.php db.php src class.php index.php File: // app.php return [ 'environment' => 'development', 'meta' => [ 'description' => 'Description', 'title' => 'Title'...
I need to create a sparse Markov chain. It is supposed to receive text, so the number of rows or columns can easily go up to 20000. Besides, if I want to consider higher orders of the Markov chain (creating pairs of consecutive words) the dimension can become much bigger. Hence the need to have something sparse. I adde...
class Class1 { private bool _noise = false; private bool _cmbGrammageSelected = false; private bool _cmbSize1Selected = false; private bool _cmbSize2Selected = false; private static refine() The Section below was my trying to refactor, but I did not want to convert the ot...
This code processes a basic contact form with a name, email and message. It also asks for a code to be typed in. The data is then transformed to avoid malicious placing of HTML script on the server, and if the name and email are valid, sent to my email. Is this code really secure against the attempt to place malicious ...
The GetDropdownList() function is being called on a couple of controllers based on this example and it may be called in many other controllers, so this code is being repeated. I was thinking of encapsulating this portion of code to the base class and call that base class in these controllers, but I got stuck and don't ...
In a Java/JPA project I usually define a base class (on which I put the id). The goal is to implement an generic toString() on this base class (named BaseEntity) from which all other entities inherit. We played around with apache commons ReflectionToStringBuilder, but we ran into problems because of cyclic references a...
I'm making some changes to a page on a WebBrowser Control. There is some indications in the code. I just want to make sure that I don't have any unnecessary lines of code. namespace AL4 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } ...
I'm trying to solve a problem that asks for a shortest path between two cities with at most k nodes. The first line of input has the number of test cases. On the second line 3 integers are given, which are respectively, the number of nodes, the number of edges and the maximum number of nodes in the shortest path. After...
Explanation is in the function. Please point out any egregious errors: create function api.ConstantTimeCompare ( @x varbinary(8000) = 0x00 , @y varbinary(8000) = 0x00 ) /* What? Compares two variable length binary strings byte by byte in constant time. When? Cryptography. Why? Given the strings 0...
I'm wondering if there is a way to make my code more efficient? Perhaps by using loops or something similar? I have posted the code below. Please tell me how I can make it more efficient. P.S.: I'm new to Java programming so no hate please :) final TextView textview = (TextView) findViewById(R.id.textView); final Text...
I'm learning Python & practising from this site and here is the particular problem at hand: Return the "centered" average of an array of ints, which we'll say is the mean average of the values, except ignoring the largest and smallest values in the array. If there are multiple copies of the smallest value, ignore jus...
I posted a question a while back asking for some feedback on the code of a game I made (it was limited to typing the input and drawing the output in ASCII). Now I've got it linked up with pygamef. Does anything look out of place? Do you notice any bugs? Do the colours work? Is there anything particularly annoying? Use ...
I have a requirement to put a comma between each digit of a number in a Java string. Example input: the number is 12345 and the number is 45678 The output should be: the number is 1,2,3,4,5 and the number is 4,5,6,7,8 I wrote the following and I am not sure if it is optimized. If someone reviews it and help me fi...
I have a directive called meetingList with its own isolated scope that receives a list of meetings and displays the filtered items based on some criteria. The controller for this directive holds two variables the meetingList and the filteredMeetingList. The scope where this directive is created needs to know how many i...
I created a basic background thread class in swift to replace the ugliness of: dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) { () -> Void in // background thread code dispatch_async(dispatch_get_main_queue()) { () -> Void in // done, back to main thread } } with the expressi...
Is there anything I should add or change? Is it easy to follow? How could I shorten it? How can I improve the overall program to make it a program you would use on a regular basis? #Programmer: DeliriousMistakes #Date: 10-17-15 #File: password.py #This program lets you store and create passwords import random import...
I need some help condensing my Caesar Cipher (encryption and decryption). Encryption key = 8 f = open('unencrypted.txt','r+') lower = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz" upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ" g = open('encryptedmessge','w') for line in f: s = list(line) ...
I have been writing some code (see component parts here and here) that: Takes a very large JSON (15GB gzipped, ~10million records) Extracts the relevant parts of the JSON into a list of lists Creates a list of all contiguous n-gram sub-lists found in the array Creates a counter to count the frequency of each n-gram Ou...
I decided to try make a version of the Game Of Life that'd be infinitely big. The idea was to store a dictionary of each Y value, which contain a set of X values (for fast lookup), as opposed to creating a 2D grid, and searching for the coordinate. I've no way if this idea would scale well or not since I've not done an...
I am new to coding and am working through Learn Python The Hard Way. I wrote a simple text game as instructed. The logic appears to be sound. I played through it and didn't run into any dead ends. I am simply looking for some pointers on how to make my code more neat, more readable, more efficient etc. I would lik...
Just getting up to speed in Ramda, I have implemented this: var R = require('ramda'); var divisibleBy = (b) => R.compose(R.equals(0), R.flip(R.modulo)(b)) var fizzbuzz = R.map(R.cond([ [R.both(divisibleBy(3), divisibleBy(5)), R.always('FizzBuzz')], [divisibleBy(3), R.always('Fizz')], [divisibleBy(5), R.always('B...
I have a fully working "Guess my number" game, in which the batch file will generate a random number between 0-whatever you choose. I got the idea from this thread, in which I had a rather hilarious conversation with a certain member. So I got bored tonight, and reworked the code a little, to show that member how this ...
This Question now has a follow-up here I don't think that there is any new technique in my code but in my opinion it's ok all in all (with a bit of magic). Maybe you can find something to improve or provide some hints on what's good and what's bad about this wrapper class. XoursWindow.h #ifndef __XOURSWINDOW_H #define ...
I'm fairly new to real world Java so I tried to rewrite an old app I wrote in vanilla java. I've made this one a lot more OO and used a dependency/build manager (Gradle). Now I just want to see what more experienced devs have to say about the project. This is the main code snippet that does most of the work. Any com...
I am learning about the binary tree data structure and implemented some basic functionality. It was working great with module level functions until I realized that I need to keep track of the root for operations like checking height. The simplest solution that I could possibly think was of creating a container class to...
I develop an application which installs updates. These updates have a version id (this version id is created as a part of the application and the format is a fixed requirement) and I use a regex to parse/validate their id. Each group must be separated by a dot. The id must have 2 digits in the first group, one or two d...
My fundamental problem is how to check whether byte[] is full of zeroes. I posted a range of implementations (with timings) and one clearly beats others. In fact, it is so fast that I am having trouble believing it even works. I suggest taking a look at SO question page first. This is the winner code: static unsafe boo...
I am trying to optimize my vertex and pixel shader code. Do you have any suggestions what could I possibly do to improve performance? I am using it to draw textured cuboids, and if there are many objects in the screen my framerate drops. VERTEX SHADER float4x4 WorldViewProj : register(c0); ...
I have an ASP.NET MVC 5 app and I map properties between model and viewmodel and vice versa. I could use automapper to do this but since I don't need mapping rules to convince me to use it as I mostly do simple 1 to 1 mapping the performance overhead that automapper will add is not worthwhile.If I have mapping differ...
I have a java code that is supposed to format the content of a .css file so that I could use the result to make a enum class. import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; class CreateCssEnum { public static void main(String[] args) throws IOException { BufferedRea...
How can I shorten this code with a while loop? Is it possible? cboFrom and cboTo is a combobox. I only know how to do simple while loops and I feel like it's a waste of time to write all the indexes and values of the combox down public int pay; private void Calculate_Click(object sender, EventArgs e) { int Th...
The application I am developing with has many input fields that interact with one another via the onchange event. When developing started, the goal was to create a framework that makes it easy to define event actions for the input fields and keep the action functions together. The back then the following was implemente...
I have an ASP.NET MVC 5 app and I map properties between model and viewmodel and vice versa. I could use automapper to do this but since I don't need mapping rules to convince me to use it as I mostly do simple 1 to 1 mapping the performance overhead that automapper will add is not worthwhile. If I have mapping differ...
I have a DataGrid that I filter when the user inputs text into a search box. The column that is filtered is based upon which radio button the user selects (Name, Town or Post Code). Although initially nothing happens until the user has started typing into the searchbox, for some reason there is a noticeable delay in se...
I have written a small module for accessing data on isotope masses and relative abundances. My long term aim is to build tools in Haskell for working with mass spectrometry data. Any comments on how to improve this module will be greatly appreciated. I am considering uploading this to Hackage, though I want to be sure ...
Write a program that reads two integers start and end from the user and prints the number from start to end inclusive. However, If end was less than start than you should print them in descending order. public static void main(String[] args) { Scanner scan = new Scanner(System.in); int start = scan.next...
I am developing a huge form with a lot of elements in it. The purpose of this form is editing one domain entity. Now, I finished developing the whole form and it just shows the bunch of text boxes, text areas, radio buttons and so on, allowing user to change values of entities. When user submits the form, it goes to se...
I recently submitted a code sample for a web scraping project and was rejected without feedback as to what they didn't like. The prompt, while I cannot give it here verbatim, basically stated that I needed to write a spider to crawl a site for product items. They suggested using a generic spider to scrape the site in q...
Consider the following code. Are the multiple assignments to the loc variable a code smell? If so, how can I refactor this? def set_locale begin loc = user_signed_in? ? user_locale : browser_locale loc = browser_locale if loc.nil? loc = param_locale if loc.nil? loc = I18n.available_locales.include?(lo...
This is a code written is Pascal (Delphi). It asks the user to think of a number between min_ and max_ and then guesses the number using either a Binary or a Linear method. program BandLSearch; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils; var min_, max_: integer; // set the max and min to c...
I am developing a website, where people can buy services, also it has a notification system; I do this in views to show log in and sign up, on index.html. views.py from django.middleware.csrf import get_token from app.models import * from app.forms import * from django.shortcuts import render, render_to_response from d...
Since I while ago I've been addicted to a number-game that you can think of as a binary Sudoku. The game is called (in Italian) Alberi (trees) and I haven't found any equivalent when searching the internet. The purpose of the game is to find where the trees are placed. The rules (that may vary with the puzzle) are tha...
So I wrote this code for a contest going on over at Khan Academy known as "Pixar in a Program". The goal of the contest is to create an entry that uses one of the skills shown in the new "Pixar in a Box" course made by them in their partnership with Disney Pixar. In my entry I used De Casteljau's algorithm to make a to...
A small script to calculate total units of distance between two vector entities. Especially useful in games and grid snaps, inventory snaps etc.. typedef struct COORD { int X, Y; } coord; int get_dist (coord entity1, coord entity2) { int minuendX = max(entity1.X, entity2.X); int minuendY = max(entity...
Single-page web app from Applet I'm seeking feedback on my first single-page web app using RequireJS and a web worker. I converted it from a Java applet, and the code is up on GitHub. It's a combat simulator based on the old-school (1977) game of Melee. The RequireJS design is based on jrburke's single page app templat...
The below code is a simple TCP echo server. The folks using it claim "it is going down every now and again". Any thoughts on how this could be improved would be really appreciated, particularly if they would improve the reliability. import select, argparse, socket def server_socket(ip, port): serv = socket.socket(...
As the title explains, this is a series of extension methods that convert certain numeric types to and from byte-arrays, for certain actions which work better on byte-array types than numeric types. Any and all suggestions are welcome, I am also attaching the Unit Tests. /// <summary> /// Provides extension methods to ...
I wanted to copy the behavior of github's pagination. Here is what it turned out: http://jsbin.com/dihohiseca/5/edit?js,output It works fine, but I have a feeling that there is a lot of room for improvements. Please help me make my code more elegant / shorter. var page = 12; var numPages = 40; var res = []; var fro...
I started with a pure python implementation, and have been trying to get the performance as close to native C as possible using numpy, numexpr, and cython. Here is the the numpy version that I compile with cython: import numpy as np cimport cython cimport numpy as np from cython.parallel cimport prange, parallel from ...
I'm writing a wordpress plugin that makes changes to the admin menu. To add some context: The wordpress global $menu is a multidimensional array. Each array in $menu represents a menu item, with the title, url, css classes etc at specific indexes in the array. the oa_custom_menu option is a similarly structured multid...
I have inherited a legacy ColdFusion app with gobs of <input type="hidden"> fields, and a user finally may have used F12/Inspect Element to submit a system-valid value in a hidden input that by rights was not supposed to be available. I have coded a session struct to hold the values server-side that used to be hidden i...
I'd want to see if is possible to optimize performance even further of the following generate color method. package generacolorrgb; import java.util.Random; public class GeneracolorRGB { /** * @param args the command line arguments */ public static void main(String[] args) { Random r = new ...
I've been working through some puzzles from exercism.io. Current puzzle asks me to return a date() from input that essentially says "The 3rd Friday of December" or "The 1st Monday of October". I'd love to hear some feedback on how to clean this code up: def meetup_day(year, month, weekday, spec_weekday): import cal...
This is a class which stores a function pointer and arguments to that function, to call/invoke that function at a later point in time, or multiple times. Additionally, through polymorphism, it allows methods with the same return type (though potentially different arguments) to be grouped (in a container) and invoked be...
Last week, I posted this question in order to get some comments and critiques on a simple implementation of a multidimensional array class -- hyper_array::array which was inspired by orca_array. I managed to fix a few issues that were mentioned by the comments and added some improvements. Goals I still have the same go...
I created a 2-player number guessing game. Each player picks a number between 1 and 10 and closest one wins. I'm just looking for best practices suggestions and improvements. Console program.cs using ClassLibrary1; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Thread...