A coding style is a set of conventions and practices used in software, such as naming classes, variables, and files.
4
votes
1answer
51 views
Ignore exceptions when changing column formula in Excel table
The new table feature on Excel is excellent and you can specify a column formula as well as exceptions on the column. However, if you want to change the column formula, Excel will rewrite the whole ...
10
votes
3answers
688 views
Does everyone still love Fibonacci?
I'm following up on this question. I made a few decisions about my model and implemented recommendations accordingly.
TL;DR the link
Uses a loop algorithm to return a Fibonacci number \$Fn\$ of ...
1
vote
1answer
72 views
1
vote
1answer
33 views
Search a file system for files that match a given pattern
My concerns with this code:
Is there a more efficient way to find files by pattern in Python?
Does os.walk() work in Windows?
Is this code pythonic?
Should ...
5
votes
1answer
58 views
Pure JS Image Slider
I was just wanting a code review on this image slider I made. I don't have anyone else to give me their opinion on the code I write outside of work.
Is this sloppy? Is it wrong? Is it ineffective? ...
9
votes
2answers
73 views
Extending database factory class to use auditing class
I'm the the process of adding change auditing to my existing DB class which encapsulates database calls.
Previously I would just pass in a ...
3
votes
1answer
35 views
Personal Project for managing my Bookmarks - v2
I had asked earlier for review of parts of my JS file earlier and review of the complete JS file of my project. Now I have made changes as per the suggestions. Here are the files. I would like to get ...
8
votes
4answers
470 views
Is this an efficient use of a boolean method?
This is sort of a follow up to a previous question (Do I have any SQL leaks?).
I have changed some things around and am working on a solution where I use Active Directory to gather information about ...
1
vote
0answers
29 views
A notification / interception implementation for AngularJS
I was in need of a thing that is able to inform my users about recent activities as well as intercept any action with a modal (e.g for undo purposes)
I decided that I will go for an independent ...
2
votes
1answer
127 views
Enabling/Disabling button on a certain condition
I am using a Telerik Datetime control. On onBlur event of input box I am checking if the date is valid/in-valid, based upon that ...
4
votes
1answer
71 views
Personal project for managing my bookmarks
I am working on a personal project for managing my bookmarks, which is basically a web page to manage my bookmarks by categories. Managing here means everything - adding, viewing, updating, searching ...
9
votes
2answers
189 views
Decoration Freak, or OCP in action?
I'm writing C# code to read and eventually parse VB6/VBA code modules. I have an interface like this:
...
3
votes
1answer
69 views
HTTP routing framework
I am new to JavaScript programming and would like to get your comments/input or corrections on this chunk of code. I have tried to emulate patterns from recognized GitHub projects but I still don't ...
2
votes
1answer
96 views
Determine whether a list contains a particular sequence
Allowing wraparound, the sequence [2, 3, 5, 7, 11] contains the sequence [7, 11, 2].
I'm looking for compact/pythonic way to ...
6
votes
1answer
64 views
File reader/writer (text)
Following-up on this post, I wanted to be able to use my FileWriter with a syntax reminiscent of .net's using blocks, which ...
6
votes
3answers
254 views
Simple Caesar shifter in C#
I use these in a windows form with fun buttons, I wanted to see what the world thinks of my coding.
This is something that I coded about 2-3 years ago, I did change some of the coding when I looked ...
9
votes
3answers
170 views
Calculating infix expression with no parenthesis
This is my Java implementation (\$O(n)\$) about how to calculate infix expression with no parenthesis.
For example, when we input "3 + 4 * 4 / 8", we will get a double type answer is 5.0. Here to ...
8
votes
1answer
57 views
Show Details of an Object while allowing interactions with it and dependent objects
Description
To make it simple, this code is the Controller Packet corresponding to a View with multiple tabs. All but one of these tabs are showing a list of dependent entries. This Construction was ...
6
votes
2answers
50 views
Clean and tidy Python code for dictionary look up and API interactions
I am new to programming and entirely self-taught. Below is a program I wrote to retrieve text content via an API and scan the text for important words. If the word is found URI is returned. The API ...
5
votes
3answers
274 views
Small notepad editor
I decided on making a small notepad editor in Java using Swing and I think it functions pretty well. Unfortunately, my skills in making my project tidy and organized has abandoned me; it looks like ...
9
votes
1answer
121 views
Responsive Foundation Orbit Image Gallery
I decided to refactor the code for a responsive image gallery, that I setup not too long ago. Following the suggestions @joseph-the-dreamer made, and some other best practices, I cut down on the ...
1
vote
2answers
24 views
How can I simplify 4 similar jQuery click functions?
I have a navigation bar that when the list elements are clicked their respective body container appears and the other body containers disappear.
navigation
...
1
vote
2answers
100 views
C# to Access SQL query based on UI controls
I have a WPF application (using MVVM pattern) that allows users to perform a search for a record/records based on their ...
10
votes
2answers
160 views
Hangman game with hard-coded word or phrase
I feel that this implementation can still be simplified. I've tried to keep variable scopes low and have used as much of the standard library as I could.
It currently works with a hard-coded word or ...
3
votes
2answers
195 views
Refactoring a very long method for better maintability
I am currently working on a piece of legacy code that I inherited.
Current java version is 6, but this will change in the next few weeks to java 7. (edit)
I think i might have been working on it for ...
3
votes
4answers
81 views
Helper function to return a string based on passed object and some defined rules
In my application, a notification should be displayed when a chat message arrives. There are some rules which decide what notification message is to be displayed.
I have created a helper method ...
6
votes
2answers
147 views
Simple text editor class
I have recently undertaken a project for programming practice based on a simple text editor. Normally this kind of thing wouldn't bother me, but ever since I completed a software architectures module ...
3
votes
1answer
90 views
Model to handle all the data/networking from Foursquare API in IOS
I posted not too long ago, asking for tips/improvements I could use on my models. I have changed quite a lot, so I thought I'll give it another go.
My model is supposed to handle all the data I get ...
2
votes
1answer
84 views
Does my controller code look good?
I read many times about controller code mustn't be too complicated and so on. I was developing new features in my simple project. I added a function, which allow users to get access to news only in ...
2
votes
1answer
79 views
10
votes
3answers
204 views
Solve the game “Flux”
The Program
I wrote this program as an answer to a question I thought of for Programming Puzzles and Code Golf. To avoid cross-posting, I will only summarize the requirements:
Solve a game in a 3x4 ...
4
votes
2answers
158 views
Still pulling information from XML to insert into Word Document inside 3rd party application
Follow up to This Question
I took some very good advice and changed my code around a little bit and eliminated some If statements.
I am not retrieving very much ...
6
votes
1answer
43 views
Pulling information from XML to insert into Word Document inside 3rd party application
This is code written for use inside a 3rd party application to pull information from an XML and insert into a word document, I don't know all the mechanics of the fun process of inserting the ...
6
votes
4answers
140 views
What is a good way to check errors from a series of function calls?
I have to work with C style functions which return ERROR_SUCCESS when successful, otherwise return an error code. I want my code to be nice and neat and easy to ...
5
votes
2answers
199 views
Thrice nested “OS” in Python
This Python main is what greets the user to a thrice nested super duper barebones OS. The entire rest of my code isn't bug free but this section is, and it feels dirty anyway. I'd like to know how ...
1
vote
1answer
40 views
Putting in order my two packages and possibly merging them
I am making an application which fetches tweets for a specified amount of time, then inserts those tweets in a database and when the user presses another button the top ...
3
votes
2answers
100 views
Rosalind's 3rd problem in Scheme
I have an imperative programming background and I've decided to study functional programming by applying it to problems found on sites such as Project Euler and Rosalind. My language of choice is ...
1
vote
1answer
31 views
Seeding a PRNG - Custom Setter
I have a PRNG-Class called Generator. Now, after creating a new instance of it:
var g:Generator = new Generator();
Custom ...
0
votes
0answers
36 views
Improvements on this template container simulating SQL “select” and “where”?
I want to simulate in c++ the fact that in a form with drop down (or combo boxes) you can filter by selecting items and then projecting on a given set of properties for these item.
In a sql-like ...
4
votes
2answers
70 views
1
vote
1answer
39 views
Avoiding use of .encode() in rss2html
My concern with this code is the excessive use of .encode('utf-8'). Any advice on refining these functions would be very helpful.
rss2html GitHub repo
...
2
votes
2answers
162 views
Program simulating dictionary using file handling
I have made a program in C++ simulating a dictionary with very basic functionality. I do not have much experience in file handling with C++. Also, I want it to run on Linux and Windows.
It would be ...
3
votes
3answers
343 views
Bresenham's line algorithm implementation
May there be any performance and/or code standard improvements on the following LineOfSight code?
...
20
votes
2answers
2k views
Pacman game implementation in Java
I assume you've all played Pacman, I mean, most people have.
I am a 10th grader, and I am working on building Pacman for my intro to Java class in school.
However, the project I'm working on ...
5
votes
3answers
119 views
Removing duplicate code from basic collision detection implementation
The code is part of a very basic 2D platformer based on code from the book Killer Game Programming in Java.
The methods are part of a TileMapManager class which is ...
1
vote
1answer
64 views
RequestHandler: Is my code clean?
I've built a simple class RequestHandler that does exactly what I want without any extras I won't be utilizing. When needed I will expand. I'm passing this object ...
10
votes
1answer
79 views
Trading Card Game's Hand and HandView implementation and unit tests
This question continues on my previous implementations of the Hand class of a Trading Card Game, earlier questions can be found here:
Earlier model: Trading Card ...
7
votes
4answers
475 views
Calculate final test score from a list of test results
Recently I have given an interview to a widely well-known technology firm. The first interview was general and it went well but they rejected based on some technical things. They did not mention it so ...
5
votes
1answer
72 views
Field class used by my trading card game
As many may know, I am developing a Trading Card Game for the Coding Challenge.
I have just completed the Field class and have not used it in practice yet, so all ...
1
vote
1answer
40 views
Improving a Haskell FizzBuzz Solution
I wrote a solution to the popularized FizzBuzz problem in Haskell to see how a functional solution looks. I'm more or less happy with my solution, except for the definition of ...