The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
5
votes
1answer
409 views

Reading a list of file paths and adding them to a map

I have many thousands of image files spread around various places and would like to copy them into one directory. However, may of the files are duplicates with the same names (often thumbnails or ...
6
votes
3answers
4k views

Converting Arabic numerals to Roman numerals

These classes are part of a program I am working on to convert Arabic numerals to Roman numerals and vice-versa. Do these classes look correct for representing objects in Java? ...
12
votes
1answer
12k views

Time and temperature displaying program for Raspberry Pi

This program displays either the time, current temperature, 12hr graph of temps, 24 hr graph of temp or a week's graph of temps. Selection is based on user input of one of the GPIO pins. Please ...
3
votes
2answers
6k views

RPG character creation implementation

This is a little yet unfinished RPG I made with C#. It runs well but I'm wondering if there are things I could improve to make it more clear or optimal. I'm basically asking for some feedback and ...
4
votes
1answer
471 views

Finding the end of file (EOF)

I wrote this code about finding the end of file (EOF). Please review this. ...
22
votes
4answers
10k views

Simple Turing machine simulator

Yesterday I got a sudden urge to go from writing Python to something, well, more UNIX core-ish. I read some examples on here and decided I might as well put some of that stuff to use to test something ...
1
vote
1answer
567 views

Errors with binary search in Haskell

I just learned about Maybe in Haskell, so I decided to try to use it with a binary search. Here's the function: ...
6
votes
4answers
1k views

Generating DNA sequences and looking for correlations

I've written a script to generate DNA sequences and then count the appearance of each step to see if there is any long range correlation. My program runs really slow for a length 100000 sequence 100 ...
9
votes
1answer
346 views

Structure JavaScript code

I am new to JavaScript development, so I'm seeking help in guidelines on how I can better organize my code in a better way. This is what I have for a small app I am working on: ...
3
votes
1answer
92 views

Complex spreadsheet script optimization

Can someone have a look at my script and maybe find something which can be optimized, as there shall be later 100 of it running. First of all this script shall be triggered once per day to receive ...
3
votes
1answer
243 views

Calculating Pi in Clojure

Obviously there are better ways of obtaining Pi, but for educational purposes, how is the code below? ...
5
votes
2answers
168 views

Checking site uptime with Google Docs

I modified Amit Agarwal's script which checks the uptime of one website so that it now checks several sites. The script runs every 5 minutes, however, I kept receiving mails that a site was down and ...
2
votes
1answer
593 views

Which of these two paren-matching functions is better?

I am currently trying to learn Haskell (after taking a Scala course on Coursera); but while I can write functions that do what I want, I worry that I am not learning to write idomatic/clean/performant ...
3
votes
2answers
223 views

Checking host status for clients on server

I run a small server, and to check whether clients are being hosted on my server, I wrote this. I'm new to object oriented programming. How stratified should my programs really be? Do I want to have ...
3
votes
3answers
519 views

Listing a number's prime factors

I wrote a little code to list a number's prime factors: ...
2
votes
2answers
285 views

Arithmetic progression to 7561

I'm new to Erlang and this is my first code in that. As Erlang has no loop statements, the only way I could think of doing this is as follows: ...
10
votes
8answers
9k views

Replace strings in a file

I had to create an executable to search and replace strings in a file. This is to be used in my installer for text file manipulation. I have various placeholders in configuration files that I need to ...
8
votes
1answer
418 views

Cleaning up/optimizing numerical guessing game

I'm a Python newbie and I'd like to know how I could clean this up/optimize it (but nothing too advanced, please). As far as I know, it's working as it should, but if you see any errors then please ...
2
votes
2answers
189 views

Echoing table contents

I'm working on an exercise where I"m supposed to display all data contained in a table. Here's the solution I can up with: ...
1
vote
1answer
171 views

Linear algebra architecture

I'm using linear algebra as my basis. One very specific change I'd like to make is to allow for equality tests between points and vectors with an unequal number of components by assuming that all ...
4
votes
2answers
2k views

Parsing s-expression structure into tree and summing the paths

I'm new to Python, just attempted the task here. The part I found hardest was parsing the expression into the tree structure. I was originally trying to build a regular tree structure (i.e. a Node ...
14
votes
2answers
48k views

Using a WCF service client and handling its exceptions

I am new to WCF and need to work with another programmer's code. I am unsure of the way the WCF service client is used here: ...
11
votes
4answers
15k views

Reverse each word of a string in C

I had this interview question like a year ago and was asked to code, on a piece of paper, how to reverse each word of a string. Since I am used to Java, I proposed the obvious answer of using split + ...
6
votes
1answer
856 views

My first Go program: Caesar Cipher

I'm learning Go at this moment and it is my first program in Go, so I will be thankfull for any suggestion, remarks and observations. ...
3
votes
2answers
342 views

PHP breadcrumb class

I am fresh at OOP and I am curious if the code below is object oriented and can be improved: ...
3
votes
1answer
172 views

Efficient (Virtual) Home Security

Can you help me optimize the speed and security of my homepage? (Link now dead - 2014/04/10 - http://www.pixel-klicker.de) ...
2
votes
2answers
337 views

Wiki API getter

I know there are other Python wiki API classes out there. I'm writing this one because I don't need all the bells and whistles, no edits, no talks, etc. I just need to be able to search for titles and ...
3
votes
1answer
1k views

Decoding binary string message

I am trying to learn some Java on my own, and I am tackling some "programming challenge" problems to practice the little I have learnt so far. Could anybody constructively critique this beginner's ...
4
votes
2answers
427 views

Script for automating regression testing

I am writing a simple script to automate my regression testing. I am new to bash scripting and my goal is achieve the most efficient and clean code. I have written a simple function to allow me to ...
4
votes
2answers
3k views

Determine number of even, odd, and zero digits of a given integer

I have been programming in C++ for around a month now, just long enough, I figure, to develop bad habits. Can anyone point out where I'm making mistakes and offer topics I should investigate to ...
5
votes
1answer
6k views

Registration form with validation and avatar-uploading

I'm a complete PHP beginner and would like some feedback on this registration page I've created. Now, the one thing I know right off that bat that's wrong with it is that there's WAY too much ...
10
votes
2answers
68k views

Bank ATM program

I'm new to Java and have been reading Java for Dummies and other ones as well. I've started building this program like a week ago. I'm sure it's very messy. Just seeing if someone can clean it up and ...
4
votes
1answer
6k views

findViewById - in separate class

I'm new to Android and I wanted to create a class that would load an ad inside the current layout. All the layouts have a RelativeLayout id=adLayout From my main, ...
7
votes
2answers
4k views

Character generator

I'm a total newbie teaching myself via Zed Shaw's Learn Python The Hard Way and I've gotten bored over a week long memorization lesson, so I thought I would make a character generator for a pen and ...
19
votes
3answers
13k views

TicTacToe logic in Java

I'm currently studying Java by myself. The book I'm using (while very good) lacks feedback (obviously). While trying to write this program, I found myself solving most of the problems I've ...
5
votes
1answer
5k views

Javascript PriorityQueue based on object property

I wrote this class which is a priority queue based on a numeric property of any object. As far as I can tell, the following code is working as intended. Are there any stylistic tendencies that I am ...
6
votes
1answer
5k views

RPG Dice Roller

This is sort of a follow up to my post yesterday. I'm a relative newbie to Python and before I made a d20 dice roller for RPGs. Now I've made a dice roller for any type of dice, and I would love ...
3
votes
3answers
245 views

Drawing colored circles using Ruby and Tk

I am a high-school freshman who is kinda new to Ruby, and I am doing a small project on Ruby. One of the big things that I want to get out of this project is how to follow the "Ruby standards" that ...
12
votes
2answers
2k views

Random D20 number generator

I'm teaching myself code using Zed Shaw's Learn Python The Hard Way, and I got bored during one of the memorization lessons so I thought I would make a random D20 number generator for when I play RPGS....
3
votes
1answer
572 views

Assigning defaults for Smarty using object-oriented style

I have a custom class for Smarty that was partially borrowed. This is how the only example reflects the basic idea of using it across my current project: ...
14
votes
1answer
15k views

Command-line noughts and crosses

I've just got a Raspberry Pi, so I thought I'd try my hand at some Python. This is my first ever Python program (hurrah!). It's a very simple command-line implementation of noughts and crosses. The ...
3
votes
2answers
203 views

Appendix answer key template

Goal: Extract all Appendix Titles If Appendix Title is Answer Key call custom solutions template If Not Answer Key call default appendix template XML: ...
5
votes
3answers
3k views

Calculating the area of various 2D shapes

I've made a simple program that can calculate the area of various 2D shapes. I'd like your expereanced eyes to asses my code. Be as harsh as you want but please be specific and offer me ways in which ...
7
votes
1answer
337 views

Fetching emails from various clients to store in a database

I have written code which does the following: The main goal is to fetch emails from inbox and spam folders and store them in a database. It fetches emails from Gmail, GMX, web.de, Yahoo and Hotmail. ...
5
votes
1answer
629 views

Adding trusted timestamps to Git commits

I don't write too many bash scripts and I can usually struggle my way through getting the odd thing I need working, but my scripts always seem to feel a bit brittle. Below is a script I wrote for ...
8
votes
2answers
839 views

Generating a tabula recta

I want an experienced Haskeller to critique my code and offer changes/suggestions (so I can learn the idioms of the language and culture around Haskell). I've been using a Tabula Recta for my ...
11
votes
4answers
4k views

Rot13 Reader in Go

For this exercise I have done this: ...
5
votes
1answer
171 views

Processing random matrices

I am doing my research about scheduling by using Matlab. I am a new Matlab user and I have a problem with time execution of my following code: ...
6
votes
3answers
2k views

TCP socket server for UNIX

I'm very new to C++, but I really want to write good code and increase my development skill, so I ask you for some review. Scheme of socket server This is the scheme of how my socket server works. ...
2
votes
1answer
226 views

First steps in Scala: does this look idiomatic?

I an a newcomer in the Scala world, and I would like some advice from more experienced people to find out whether what I am writing goes in the direction of idiomatic code. In particular, I have to ...