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 12 votes
answered by Renzo 12 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

Classifying the user into an age bracket

In this program, I have to check the range of a given age and then print a message as per the age. I want to optimize the if else logic. /* Sample code to read in test cases:*/ import java.io.*; ...

java  
asked by Prabhat Yadav 11 votes
answered by Pimgd 19 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

Automated Collage Tool

I've been working on refactoring a project of mine and need some help. I'm looking to apply some design principles and patterns to make the code cleaner and easier to maintain. It looks like I'm ...

c# oop design-patterns  
asked by BenN 9 votes
answered by RobH 2 votes

Poor man's f-strings in Python 2.6

f-strings is a new feature in the upcoming python release which basically lets you do this: >>> s = 'qwerty' >>> f'{s} {1+2}' 'qwerty 3' Not pleased at having to wait until ...

python performance formatting python-2.6  
asked by Georgios Bitzes 9 votes
answered by Dannnno 6 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

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

Implement a Shape abstract class

To learn more about OOP, @nhgrif challenged me to implement a Shape abstract class (more details in code remarks below. Here is how I did it. Any and all advice appreciated! Shape.java /* nhgrif ...

java beginner inheritance  
asked by Phrancis 20 votes
answered by rolfl 17 votes

Can you answer these?

Project Euler #54 in Java: Comparing poker hands of two players

I was bored the other day and decided to have a crack at Project Euler Problem 54 for some fun. Given a file containing one thousand poker hands dealt to two players, the task is to count the number ...

java programming-challenge playing-cards  
asked by user1453545 4 votes

Using Identity to create user administration page

I'm developing an ASP.Net web application, using MVC 5. This application authenticates via LDAP and will assign an Identity Role of "Admin" to a designated user. The Admin user will be able to go to ...

c# mvc asp.net asp.net-mvc-3 asp.net-mvc-5  
asked by Joe Cuevas 3 votes

Function to conect to Firebase Rest API via Access VBA

This is the application for small school, which will store students' info in Firebase and also retrieve data from Firebase. I am using JSON Parser to parse the data and save the same in Access tables. ...

parsing vba rest ms-access firebase  
asked by Adarsh 5 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