Code Review Weekly Newsletter
Code Review Weekly Newsletter

Top new questions this week:

"Have a safe trip"… or not, depending on four conditions

I have 4 booleans and all must be met to determine the value of a String: String message = (!isNameBlank && !isDestinationBlank && isDestinationValid && isAmountValid) ...

java conditions  
asked by silver 15 votes
answered by Legato 27 votes

Rock-Paper-Scissors game for learning purposes

I just want your opinions about my code. How could I improve it? Is there a better method to do it? from sys import exit from random import randint print "Welcome to the PIN Game 1!" print "Tell me ...

python beginner rock-paper-scissors  
asked by mschlindwein 11 votes
answered by David Morris 30 votes

Next number with the same sum of digits

I recently came across a email bot that would give you random problems to solve. Here is the problem. Please write a function in python which receives a natural decimal N-digit number (1 to 15 ...

python algorithm programming-challenge unit-testing  
asked by BryanDunkley 8 votes
answered by o_o 3 votes

CodeWars mathematical expresion evaluator

I recently wrote the following code for a codewars.com kata for evaluating mathematical expressions. I've been writing ruby for years, but almost everything I do is for personal use and isn't ...

ruby programming-challenge math-expression-eval  
asked by Zack 8 votes
answered by Caridorc 5 votes

A Text-Based Fighter - Like Pokemon

Okay, I'm a newb to programming/Python. To get a better understanding of objects/methods, I wrote a text-based, turn-based fighting game. I want to expand by adding new characters with new moves (one ...

python beginner oop game battle-simulation  
asked by Dmitri Valentine 8 votes
answered by vnp 2 votes

Implementing Multi-File Programs in Vitsy

I'm the proud owner of the Vitsy programming language, which I've been working on for some time (except recently, because high school). It's only been used in PPCG so far, but I hope to expand it to ...

java performance stack interpreter dynamic-loading  
asked by VoteToClose 8 votes
answered by janos 2 votes

Linq-to-Sage Implementation

Following-up on my last question where I wrapped the Sage API with a familiar IRepository interface, I decided to push the abstraction a step further, and... implement an actual LINQ provider. So my ...

c# linq api reflection expression-trees  
asked by Mat's Mug 8 votes
answered by Mat's Mug 2 votes

Greatest hits from previous weeks:

Class for reducing development time

There are many PHP PDO classes out there, agreed. However I find they do not allow for flexibility. So I created one that helps reduce development time as little as it may be but it does the job ...

php oop mysql pdo  
asked by Yusaf Khaliq 29 votes
answered by Elias Van Ootegem 47 votes

Sorting an HTML table with JavaScript

The following code sorts an HTML table with JavaScript (without using any external libraries like jQuery). Are there any shortcomings or possible improvements I could make? <html> ...

javascript html sorting  
asked by Sharanya Dutta 8 votes
answered by ProGM 6 votes

Can you answer these?

Project Euler #14 in Clojure (finding long Collatz sequence chain)

I'm working on a Clojure implementation for Project Euler #14, which asks for the initial element, under 106, that produces the longest collatz-sequence chain. I'm trying to make use of every ...

performance programming-challenge clojure collatz-sequence lua-table  
asked by WolfeFan 2 votes

Auto-click the sequence

The following pascal script needs a bit of context for it's purpose to be understood. For those who don't give about purpose, feel free to skip ahead. Background A game I'm terribly fond of has a ...

performance pascal  
asked by Mast 5 votes

Extending the functionality of lxml.etree

I wrote a class to slightly customize the behavior of lxml.etree.ElementTree and I use it quite extensively. It works great, but there are a few methods that I'm not sure how I wrote, and there are a ...

python python-2.7 xml inheritance  
asked by o_o 3 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