[ home / board list / faq / random / create / bans / search / manage / irc ] [ ]

/prog/ - Programming

Programming board

Catalog

See 8chan's new software in development (discuss) (help out)
Infinity Next update (Jan 4 2016)
Name
Email
Subject
Comment *
File
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Embed
(replaces files and can be used instead)
Options
Password (For file and post deletion.)

Allowed file types:jpg, jpeg, gif, png, webm, mp4, pdf
Max filesize is 8 MB.
Max image dimensions are 10000 x 10000.
You may upload 1 per post.


da244b No.3860

Hi guys I'm new to this board.

I know a bit of C++ and Java, but I don't know how to expand my knowledge/get some practice.

So I thought that once a week an "exercise" can be posted and those who want post their code in that thread, with more experienced programmers giving pointers and advice.

First exercise:

Program a fridge with the following properties:

-Is the cooling process working, if not where did the error occur.

-It needs to know if the compressor should work or not based on the internal temperature of the fridge.

-A list of the Items inside and their expiration date.

-The amount of space left inside in cm³, because metric system.

-Anything else you can think of.

9e456f No.3864

> Program a fridge

> Is the cooling process working, if not where did the error occur.

What the fuck does this mean? If you want to program something, make code that will actually do something. Unless you are actually building a controller with sensors for a real refrigerator, this is useless for anything other than trying to make an analogy for the absolute beginner to try to grasp concepts of object orientated programming in the first place. What you have given isn't so much expanding knowledge or practicing programming, but rather practicing building a class model. It's pretty much just UML practice.

Project Euler is good if you want to do math-based practice.

Good simple practice projects:

* Make a program that takes a number as input and outputs an isosceles triangle of the height of the number

* Make a program that will take a number as input, and outputs a calculator LCD style representation of the same number (as a bonus, you can try to include uppercase letters as well)

* Program a tagging system for files (where you can give a filename to the program, and the program will get the file attributes automatically, and you can also assign it tags, and search through this file database based on tags, similar to a booru system, if you're unfamiliar with tagging)

* Make a program that lets you play Tic Tac Toe

* Make a program that lets you play battleship, and will play with you (try to make good AI, which will attempt to intelligently cluster shots around hits and give up when the ship determined to be destroyed).

* Make a simple roguelike, including pathfinding, dungeon generation, and saving (this practices a lot of concepts, including serialization)

* Make a simple OS shell with a custom syntax, which will allow you to execute commands, redirect input and output, and store and use variables

* Make a simple custom scripting language

* Make a simple lisp interpreter

* If you have a cracked embedded device (like a softmodded Wii, DS, or 3DS) or a SOC (like Arduino or something of the sort), play around with some simple programming for it, to get a feel for some different toolchains.

The very best thing you can do to practice, though, is to take a program that exists, and without looking at its code, try to replicate its functionality. POSIX coreutils are ripe for this. Trying to implement those can be a lot of fun, especially in a non-standard language like Java.


d94f75 No.3865

>>3864

Thank you very much. I had absolutely (as my post shows) no idea where to start. Thank you. I'll go and get get to it now.


44ae50 No.3866

>>3865

other projects for noobs like us

Sudoku puzzle solver

calculator

2024

hangman

these are all simple enough to be completed in about a week.




[Return][Go to top][Catalog][Post a Reply]
Delete Post [ ]
[]
[ home / board list / faq / random / create / bans / search / manage / irc ] [ ]