Questions that deal with the organization and structure of the code should be given this tag.

learn more… | top users | synonyms

3
votes
1answer
26 views

Optimizing JavaScript functions

I've got a tab menu and functions that change the tabs color on click, giving the clicked tab a different color from the others. The thing is, when I click one, I give it another ...
3
votes
0answers
19 views

Personal Project for managing Bookmarks - View Part

The code is the view part of my bookmarker - project for managing bookmarks by categories. It uses Python 3.4/Django 1.6. I have also included models.py for reference. The code does the following ...
4
votes
0answers
41 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
71 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 ...
1
vote
0answers
27 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 ...
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 ...
2
votes
1answer
34 views

Finding given element in minimum steps from matrix [closed]

A N*N size matrix is entered. The condition is that each element of the matrix is greater than the elements above it and left to it. Or, it can be said that all the elements on the right side and ...
2
votes
1answer
29 views

Multiplying a numeric string with the “vedic method”

This is vedic method multiplication. This code takes time on a very long numeric string, and I want to optimize it. I also apply recursion on multIndices (this ...
4
votes
1answer
247 views

MouseListener Lag in Piano Tiles game

I was attempting to write my own simple version of the Piano Tiles game app in Java just as a fun exercise. GameLogic.java ...
1
vote
2answers
99 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 ...
2
votes
0answers
61 views

Web Crawler in Java

I've written a working web crawler in Java that finds the frequencies of words on web pages. I have two issues with it. The organization of my code in WebCrawler.java is terrible. Is there a way I ...
13
votes
2answers
244 views

First try at a Python game

I've started coding about 3 weeks ago, just for fun and maybe practical uses later. My GF dared me to make a PGM that would replace this dice game where you roll two dice, one with body parts and one ...
6
votes
2answers
145 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
89 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 ...
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
1answer
62 views

App for listing places close by - building up models

I'm fairly new to Objective-C. The app I'm trying to make, is using the foursquare API to list up places that is close by. I've re-written this app more times than I care to admit, because I feel the ...
1
vote
1answer
39 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
58 views

Optimizing a recursion code over lists

I'm writing three functions which iterate over lists, I want do this recursively, but I think this code is not as efficient as it could be. ...
5
votes
2answers
54 views

YAML Configuration file

I have recently started working on a server software in Java and wanted to add a configuration option to the program. I have gone through a few revisions of this class because I never liked what I ...
1
vote
1answer
58 views

Search a directory structure for tar files and report on their size

I have a complex directory structure on my web server that includes .tar files for download; I'm trying to create a report on the size distribution of these files (e.g. 10 are less than 1MB, two are ...
6
votes
2answers
219 views

Output day of the week from given date

I am posting this code up for review and debugging. This source code is for Java, and is meant to give you the exact day of the week from an entered date. Review This program seems to have 2 ...
20
votes
2answers
1k 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 ...
7
votes
4answers
469 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
2answers
89 views

Geometry table for use in regexes

I have been teaching myself Python 3. I watched a video on YouTube entitled "stop writing classes". The Gtable class doesn't even have an init function, so I can't help but wonder if I should have ...
4
votes
3answers
252 views

32-bit factorial calculator in x86 NASM assembly

This program calculates the factorial of a given positive number. This is how it handles input: if negative, terminate program if 0-2, display input without calculating if greater than or equal to ...
4
votes
3answers
142 views

Is my web site structured correctly?

I'm trying to get a better handle of code organization and how HTML5 (really HTML) stack works in general. I've worked mostly with ASP.NET Webforms and done some MVC as well. Let me say now, "I hate ...
5
votes
2answers
135 views

AutoComplete program using the n-gram model

For my Advanced Data Mining class (undergrad) we were to design a program that would predict the next word a user is likely to type via automatic text classification using the n-gram model. The ...
1
vote
1answer
104 views

Dynamically loading jQuery when it's not available or version isn't high enough

I'm writing a script for others to use on their websites. I'd like to use jQuery in this script. Because I don't have control over what frameworks people use on their sites, I need to make sure jQuery ...
12
votes
3answers
684 views

C Makefile boilerplate

This is the current Makefile that I use with my C projects. Here is what I would like to be reviewed: Reusability - is this Makefile easy to use for multiple separate projects with minimal ...
7
votes
2answers
230 views

VB.Net Database Access Class

I've recently been asked to make some emergency changes to a legacy application written in VB.Net. I come from a C# background so am not overly familiar with this language, though there are enough ...
1
vote
2answers
78 views

Capture and assign portions of char array to a struct

I am formally a PHP/C# developer and I am new to C. I need you to help to correct my coding with C. I have a kind of following pieces of HTTP user data string. ...
1
vote
1answer
78 views

A Ruby string analyser

I wrote this script for a code challenge on TreeHouse. I already submitted my code, but I am looking for an after the fact feedback. The challenge was to open a file of text, remove specific words ...
10
votes
1answer
327 views

Is this the right way to implement a hashmap?

Is this the right way? Any comments on the hash functions? If asked a question like this in an interview, do I need to follow all OOP concepts(because I am using Java)? Like encapsulating the ...
3
votes
1answer
232 views

My first controller rspec test

I'm just started learning TDD with Rails and RSpec. This is my first test for controller. Just plain RESTful UserController that responds with JSON, so it has no new and edit methods. Please review it ...
4
votes
1answer
67 views

Am I organising my PHP code effectively?

I'm very new to learning PHP & MySQL (I've got past experience with Java) and I'm doubting whether my code is organised well. I've got an index page which has two forms; the first is a form to ...
6
votes
1answer
58 views

Populate errors for objects

I have a map of objects and errors associated with those objects. I have to do the following: populate the errors in the object populate errors for valid objects based on the following: check the ...
4
votes
2answers
111 views

Better PHP Ajax Request Processing Structure

I have a server side PHP file which processes Ajax requests from the client browser. Some requests are only valid if they originate from an Administrator in the application, others are only valid if ...
18
votes
6answers
679 views

Print out table with start/end temperatures and step size

I am trying to learn C++ by myself. I looked up a sample question after going through some text. Though I would like someone to review my code. I'm basically asking you to break it to show some flaws ...
2
votes
0answers
89 views

Domain modelling with Repository [closed]

I've been struggling with some architectural problems which I'm having a hard time figuring out myself. Im trying to construct a basic structure of a project with the domain model and repository ...
10
votes
2answers
116 views

How can this Ruby format analyser be improved?

I have a requirement to validate file names related to architecture after they are uploaded. Once they have been uploaded I must warn the user if the file name is not standards compliant. What's in a ...
6
votes
2answers
203 views

Android Thread and Runnable

This is my code for running a background thread. I believe it is very poor in naming and code structure. ...
4
votes
1answer
85 views

Resource manager implementation, with resources being organized in a scope-like hierarchy

The original question where the general concept of this implementation was discussed: Using ID's with a "scope" -like hierarchy I have designed a resource manager as part of a game ...
6
votes
5answers
1k views

Movement code from a game

Could you suggest ways of writing this code better? ...
5
votes
2answers
127 views

PHP framework building: Sessions Managment Class

I am building a PHP framework and would like to get some feedback on a few different sections of the project so far. I consider myself still a neophyte in PHP so I would like to ask if I'm going about ...
3
votes
1answer
54 views

Determine local maximum from given points

How could I make this code more effective? I'm just experimenting and learning the different ways of how Python runs. ...
5
votes
2answers
88 views

Is it advisable to integrate SQL statements in the JSP pages that are not displayed to the user but handled at the back?

I have a signup form in which the user has to enter the email address and after some quick asynchronous processing at the backend I have to tell the user that whether the email address is already ...
2
votes
1answer
65 views

Prototype OO-style of my THREE.JS application

For several months I'm working with JavaScript and THREE.JS library. Firstly I dislike the prototype-based programming because I have to work a lot of with ...