Code Review Weekly Newsletter
Code Review Weekly Newsletter

Top new questions this week:

A LISP version of the Schwartzian Transform

Randal Schwartz stole LISP's decorate-sort-undecorate idiom when he came up with what we'd later call the Schwartzian Transform. With all of my LISP knowledge disappeared through nine half lives, but ...

sorting lisp common-lisp  
asked by brian d foy 13 votes
answered by Renzo 14 votes

Human-like mouse movement

The code will move the mouse from a start point (xs, ys) to finish point (xe, ye) like a human would. I'd like some help possibly shortening the code (by optimizing it) and making it more readable. ...

c# performance animation pascal  
asked by Owen 11 votes
answered by Dannnno 8 votes

Program to find the largest odd number among three variables

def greatest(a,b): if a>b: return a return b def odd_check(a): return not(a%2 == 0) def go(x,y,z): a = odd_check(x) b = odd_check(y) c = odd_check(z) if a and b ...

python python-2.7  
asked by piepi 10 votes
answered by enedil 26 votes

Simulate a printer

I'm trying to recreate a printer in java,I'm fairly new to programming so I'm using huge if else blocks inside a single function to dictate the logic of the program, I'm noticing this is creating a ...

java  
asked by PacketSniffer 8 votes
answered by yitzih 12 votes

Functional Framework

First Class Functions So, VBA doesn't support functions as first class objects - no passing functions as arguments or storing them in variables. I eventually found a way to implement function ...

vba functional-programming  
asked by Blackhawk 8 votes
answered by ThunderFrame 2 votes

Flipbook type animation with Tkinter

I am writing a program in Python that takes a folder of images and animates them. For example, going through a list of pictures like this and animating them one by one: Relevant features include: ...

python animation tkinter  
asked by Joe 8 votes
answered by Caridorc 2 votes

Scale the ingredients of a recipe up/down

I wrote a React app to adjust the serving size of a recipe. For example, if the recipe serves 4 people and requires 4 eggs, scaling it down to serve only 1 person should only require 1 egg. I try to ...

javascript react.js  
asked by Rick Viscomi 7 votes
answered by Phil 0 votes

Greatest hits from previous weeks:

Pong game in Java

I have recently written the following Pong game in Java: Pong class: import java.awt.Color; import javax.swing.JFrame; public class Pong extends JFrame { private final static int WIDTH = 700, ...

java game swing  
asked by LazySloth13 13 votes
answered by ZeroOne 13 votes

A* search algorithm

NodeData stores all information of the node needed by the AStar algorithm. This information includes the value of g, h, and f. However, the value of all 3 variables are dependent on source ...

java algorithm search graph pathfinding  
asked by JavaDeveloper 18 votes
answered by amon 15 votes

Can you answer these?

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 ...

javascript performance beginner jquery  
asked by Felipe Felix de Luca 3 votes

Unit test for allowable checkers moves

Is pattern matching within a unit test a code smell? Do I really need to throw an exception just for my test to fail if the function under test receives invalid arguments (i.e. not Succeeded case ...

game unit-testing f#  
asked by Scott Nimrod 4 votes

setup.py with data_files and __author__ parsing

All my projects have a fairly similar package layout: package_name/ package_name/setup.py package_name/package_name/__init__.py package_name/package_name/data/foo.txt ...

python python-3.x python-2.7  
asked by A T 4 votes
Subscribe to more Stack Exchange newsletters


Unsubscribe from this newsletter or change your email preferences by visiting your subscriptions page on stackexchange.com.

Questions? Comments? Let us know on our feedback site. If you no longer want to receive mail from Stack Exchange, unsubscribe from all stackexchange.com emails.

Stack Exchange, Inc. 110 William St, 28th Floor, NY NY 10038 <3