Questions tagged [beginner]

Add this tag to your question to indicate that you are new to the language of your code. This will often be taken into consideration by reviewers when assessing your code.

Filter by
Sorted by
Tagged with
6
votes
3answers
4k views

First Project: JFrame Class

This is my second "first" attempt at starting Java. My first was cut short when I had to go back to a PHP project that required my immediate attention. But perhaps that was a good thing. I learned ...
1
vote
1answer
243 views

Converting Bash commands into Windows cmd commands

I have the following code that converts a couple of bash commands into Windows cmd commands, as well as adding some commands. This is only my second day programming ...
7
votes
3answers
8k views

Console calculator

I am a newbie programmer learning some C++. One of the exercises in my book asked me to write a basic console calculator that takes 2 numbers and an operation as input. I have done so and the program ...
3
votes
3answers
811 views

Simple randomization program

I'm a few months into learning C++ programming and I want to know if I'm moving generally in the right direction or not with the following code. This is the most advanced thing I've created so far, ...
0
votes
1answer
12k views

Connect and login to MySQL database

I am new to PHP so this is largely compiled from examples around the web. It seems to work fine. Are there any ways in which it can be improved upon? Is it secure? ...
10
votes
2answers
344 views

Artifact collision in plane module

Here's something I tried putting together as I'm learning. Critiques on anything are welcome. There's also a logic bug in the Plane module I can't identify. The long and the short are that it takes ...
5
votes
2answers
11k views

Using multiple methods with Blackjack

I am very new to Java and programming theory and am desperately trying to improve my knowledge. This is the first program I've made without help and really would appreciate some feedback. I know there ...
3
votes
2answers
255 views

Joomla PHP Template Logic

I'm in the process of building some templates for Joomla, and although it all works as desired, I can't help thinking that there has to be a more elegant way to do this in PHP than my current approach....
13
votes
3answers
7k views

Basic user registration code

My first attempt at a user registration code. Login.php defines database log in variables (e.g. Database name, Table name, etc) ...
4
votes
5answers
7k views

Taking the first few items of a list until a target sum is exceeded

I'm a rank beginner in Python, and I am working my way through various relevant OpenCourseware modules. In response to the prompt Write a procedure that takes a list of numbers, nums, and a limit, ...
1
vote
1answer
869 views

Add/subtract questions game

I am new to Java, and I would like some tips from the 'pros'. I know of the Pascal naming system, and things like that, but how can I improve this code? Menu.java ...
2
votes
2answers
550 views

Module to support autocomplete for movie tags

I've just completed a JavaScript module and I've got a strong feeling that this is borderline spaghetti code. My task was to build a tagging form which adds selected tags to hidden outputs to be sent ...
1
vote
2answers
3k views

Time converter in Java

Can this time converter be written more efficiently? I'm new to Java, and I would like to know. main ...
21
votes
5answers
4k views

Parse webpage and save fetched images to a directory

I had a task for a programmer position which I failed. I am a newbie programmer and I accept that. The only problem is that employer never told me what the actual problem with the code is. So maybe ...
3
votes
2answers
5k views

Sliding block puzzle, A*

I'm a beginner programmer and I'm hoping someone would be willing to take a look at my code and tell me how to improve my coding style and development approach. Sorry about not commenting, I will try ...
4
votes
2answers
4k views

Ruby Fibonacci(n) recursive computation optimized with reflection

The idea is to take the common-known (and awfully bad performing) Fibonacci(n) recursive method: ...
5
votes
2answers
7k views

BMI calculation

I'm very new to C++ and would like you all to review the source code I wrote for a program that calculates the user's BMI and loops the program back to the start if the user needs to do additional ...
2
votes
1answer
233 views

Backup utility for local git repositories

After reading this Stack Overflow question I decided to write a backup utility for local git repositories. The result is on GitHub. I would like this application to be well-behaved with an installer,...
1
vote
2answers
2k views

Markers on Google Maps

I am using PHP to get data from a MySQL database, and use the data to drop multiple markers into Google Maps. Please give me some suggestions for my code. ...
6
votes
2answers
10k views

Reversing a linked list by iteration and recursion

From my original question on Stack Overflow: Is my implementation of reversing a linked list correct? I'm a beginner at C and I'd like to know about style, and correctness of the reverse algorithms. ...
2
votes
2answers
403 views

CR Stack Exchange crawler

I am writing a program which automatically crawls codes from this site! Would you please review my code? The required .jars: jsoup, org.apache.commons.io. Main.java: ...
4
votes
1answer
6k views

Many-to-many hibernate mapping if link table is having extra columns mappings

I have many-to-many mapping with extra columns in the join table. The table structure looks like this: ...
5
votes
2answers
9k views

Sorting a list of numbers in increasing order

Here's a program I wrote to sort a list of numbers in increasing order (without using inbuilt sort function). ...
2
votes
2answers
508 views

Uploading a file from the browser

This allows users to upload an file from the browser into my Rails app using the paperclip gem. Once the file is uploaded it gets saved into the filesystem. When the user then goes in and the "show" ...
2
votes
1answer
216 views

Stylistic exception and bang usage

I'm not sure whether I should be throwing exceptions in the below model code (and rescuing in the controller - rescues not implemented below) or returning nil (in ...
12
votes
1answer
1k views

Responsive/adaptive website code

I have all these functions that work together to create functionality on a page. Is the structure of these functions OK? Can I do anything to speed this up or make my code better? I'm not exactly ...
5
votes
3answers
358 views

Alphabetical navigation

This is an alphabetical navigation which shows only the letter that have posts in both that letter and the currently filtered "genero" taxonomy term. I use multiple taxonomy queries to find "artistas"...
5
votes
1answer
4k views

Implementation of Dijkstra's shortest path algorithm

This is my code that implements Dijkstra's single source shortest path algorithm, which is called multiple times to recalculate after graph changes. the graph is a road system of a city and shortest ...
3
votes
2answers
236 views

A game called “Twerk”

This my first Python program and game. Can you please point how I can improve and what code should be changed? ...
2
votes
3answers
119 views

Inserting buttons inside a div

I'm trying to put lots of buttons inside a div with a bunch of little windows that make content change in a neighbor div, but I’m quite new to jQuery and I'm sure that this code can be much simpler. ...
4
votes
2answers
2k views

Chess engine in Ruby

I've decided to write a Chess engine in Ruby. The first step (before any move generation, AI, search trees, etc.) is to get a solid board representation so the computer and I can effectively ...
5
votes
4answers
699 views

Rational class to handle fractions

I am very new to Objective-C as well as objected oriented programming, and in a book I am studying from there is an exercise in which I was supposed to create a class called ...
4
votes
1answer
159 views

Saving images from a web page

I'm just getting my feet on the ground with Python (maybe 3 days now). The only issue with teaching my self is that I have no one to critique my work. Correct me if I'm wrong but I think my algorithm/...
7
votes
1answer
921 views

F# Djikstras shortest path implementation

I'm just getting my feet wet with F#, by implementing some simple algorithms. First up: Djikstras shortest path. There is one piece I've written in this code which confuses me as to why it works: the ...
7
votes
1answer
7k views

Review of Tic Tac Toe game in Objective-C

I am completely new to Objective-C. I have written a simple SingleView Tic Tac Toe Application application for learning purposes. While writing the app, I've tried to be as much sound as I could. ...
6
votes
2answers
379 views

Array data-handling with NPC class

I am wondering about the best way to save on RAM/memory when there are many required arrays (I plan to have many more NPCs and various other arrays with text and items). And I am wondering what I can ...
3
votes
3answers
695 views

Simple hashing code with excessive conditional statements

Any thoughts on my code? It's a simple hashing code that runs from the command line. There just appears to be a lot of condition if / ...
4
votes
1answer
597 views

String calculator in F#

This is some of my first real F# code ever. I have done a bit of reading and watched a few videos however. I chose to do a code kata for string calculator to try it out. The kata I was working on is ...
4
votes
2answers
3k views

Context menu with click handlers

I'm trying to learn how to structure my jQuery code better. I'm only about a week into jQuery so if something looks way off please tell me. I'm attempting to use object literals and it appears to work ...
2
votes
3answers
9k views

Basic slot machine game

I have been learning PHP and wanted to see if I could make a very simple slot machine game. Everything works, but I'm sure this is not the best way to do this. Please let me know how you would do ...
5
votes
1answer
2k views

Survey program using JSF and Ajax

I'm new to AJAX and am trying to learn by myself with a small test: It's a survey with 3 questions. I would like to know if I'm using AJAX the correct way, before starting bigger projects. Here is ...
6
votes
1answer
261 views

“Best before” puzzle

I'm new To C++ and decided to have a go at the Spotify challenges on their website. I have now finished but I get the feeling my code is just terrible. I'm guessing it would be very hard for someone ...
11
votes
4answers
22k views

Python Solution for Project Euler #2 (Fibonacci Sums)

I'm a fairly new programmer (just started yesterday!). I decided to tackle Project Euler #2 today, as I did #1 yesterday without many problems. I came up with what seems to me to be a working solution,...
2
votes
2answers
637 views

Query, populate, show, hide data

I have created code to show/hide data from a DB. It works, but as I am new to jQuery, I would like to know if this is a good way. HTML: ...
1
vote
6answers
2k views

The Next Palindrome - reducing total execution time

I tried to solve one SPOJ problem. I wrote one program in Python, however, it got accepted by the SPOJ judges, but its total execution time is 2.88s. The same algorithm used in C language having ...
21
votes
2answers
55k views

Ultra-Beginner Python FizzBuzz … Am I missing something?

I just started programming in Python this morning, and it is (more or less) my first programming language. I've done a bit of programming before, but never really did much except for "Hello World" in ...
3
votes
2answers
3k views

Card class for card games

I'm attempting to improve my coding style by concentrating on simple and focused OOP client-server interfaces and error handling - atm in the context of designing a Blackjack game. I'm starting with ...
3
votes
2answers
707 views

Symlinking git-managed dotfiles into a home directory

As a learning exercise, I decided to write a script for helping me maintain my Unix configuration/dot-files under a git repository. I check out a copy of the repository in my home directory called ....
4
votes
2answers
10k views

Rock-Paper-Scissors game

This is the first piece of code I wrote on my own. I tried to use everything I know, like functions, loops and variables. Is it good or could it be simpler? Please be hard as you can be with me ...
4
votes
5answers
5k views

How does this quadratic formula program look?

I'm new to Java and this is my first program. I'm trying to verify that my thought processes are good. Let me know of any improvements infor the code, whether it's too few/too many comments, poorly ...