/r/ProgrammingPrompts
This is a subreddit for programmers to share simple project ideas to help those who are beginning to gain experience and those who are experienced to stay sharp.
This is a subreddit for programmers to share simple project ideas to help those who are beginning to gain experience and those who are experienced to stay sharp.
NO HOMEWORK ASSIGNMENTS! Such posts will be caught, deleted and submitters will be banned without further warning.
Please keep submissions on-topic. For programming help on personal projects or homework, head to /r/learnprogramming. For questions about careers or prospects, /r/cscareerquestions is helpful.
Although we ask that you refrain from linking to long lists of pre-prepared potential projects (unless the list is very truly acutually bomb), linking to others' project ideas is a great way to spread good ideas! Please do so through in-text links like this!
Please be descriptive enough and include citations like they're a dime a dozen (in other words, don't expect others to know what is obvious to you)! If your prompt must be completed in a specific language, such as javascript, please include the name of the language it must be completed in in brackets at the end of your prompt's title. Posting solutions is very encouraged and please, always make sure to post what language was used in comments!
Remember four or more leading spaces will mark your text as code as will the backtick key inline.
Let's see if we can find every solution to every prompt!
example: Write me a Hello, World program in python!
def main():
print(Hello, World!)
main()
/r/ProgrammingPrompts
I thought of this back when walking my dogs at my parents' mini-ranch.
Suppose we have a human walking two dogs. One is a slower bigger dog. The other is a faster smaller dog. The human is obviously the biggest and slowest. The human wants to walk the dogs in a wide circle (or whatever path you like) but the dogs keep tugging in all different directions.
Pick weights for all three. Maybe 60kg (for the human), 10kg (little dog), 25kg (bigger dog).
Pick lengths for the dog leashes. Maybe 2 meters each.
Plot or animate the three (circles or dots are fine) attempting to walk a circular path.
Or just plot the human getting dragged in whatever path the two dogs choose.
Some things to consider:
Extra points: It should look like it does something sensible, and not random bit managing, at first glance you would expect something, but something else happens. The ideia is not to make the code unreadable, but "easily-wrongly-readeable". I don't want to do anything shady - it's to teach a few friends about code readability. Thanks for any effort"
I had an idea of database where you can store data about boxes in tree format. The structure of box object looks like this:
Box structure:
Attribute name | Value Type | Description |
---|---|---|
id | number (unique, counted globally) | This number will be used for operations on that container. |
attributives | key-value | In this object attributes like name, size, location will be stored. Attributes will be used for searching and filtering. |
boxes | array of boxes objects | This allows the boxes to form a tree structure. |
Actions on that data will be preformed in javascript. The actions needed are add, delete, edit, filter and search. The data would be saved in JSON. Easy integration to other applications is needed.
Create a program which requests a Quizlet flashcard set URL and scrape it for the term and definition of every card in the set.
Save the term and definition in a json, csv, or any other big data file type.
I had this idea a while ago but don't have very little programming knowledge, so I figured I'd come here!
It's a custom color-by-number, so instead of using paint, it uses Crayola colored pencils. Depending on how detailed you would like the picture, it can use either 12, 24, 36, 50, etc. count boxes.
Is this something that would be possible and the picture actually ends up looking good? Essentially you would be able to upload a picture, then a pdf would be created with all the numbers and colors to use. Finally, just print and color using standard store-bought Crayola colored pencils.
Would love some insight on this idea and if you know how to make it please reach out!
MVP would be a simple two-round runoff model.
A stretch goal would be to be able to select from different types of runoff voting models.
This would also be an ideal next-step after finishing the Django tutorial which includes a basic poll app.
References:
https://en.wikipedia.org/wiki/Runoff_voting
https://docs.djangoproject.com/en/4.1/intro/tutorial01/
I originally wanted something like this for urban exploration (post) because Google Maps has a built-in feature to identify a place as "Permanently closed," but doesn't allow you to filter for that. Simply searching "Permanently closed" shows some results but not others, and sometimes those addresses don't even display on the map (They only appear once you specifically search for it). I'm not a programmer by any means, but I was thinking that if you have a bot or script check every address in a range (either through whatever database or API Google Maps provides, or by entering addresses from an external database if it has more than Google does) it may be possible to get more results.
While that is the main draw for something like this to me, it seems like it could be useful in general as well. Searching for other keywords like "Restaurants" or "Barber" sometimes seem to do a pretty bad job at finding stuff, either not displaying things until you get really zoomed in or just straight up missing something that has those key words somewhere in the name or description. A bot that looks through all the addresses and shows a map that truly shows all the locations that satisfy that search, whether the keyword is directly in the name or hidden somewhere Google apparently doesn't check that well like a description or review, could be really useful.
With modern technology we should be able to change the way we achieve democracy.
Rather than voting on “politicians” we should be voting on “policies”
Bio-verification in smart phones is widespread now. It’s a good time to implement a verifiable voting system via these devices so that we, the people, can choose what is best for our country. It would be a truer more direct democracy. We would no longer need to elect other people to represent us because we would be able to represent ourselves directly.
Maybe utilize a form of blockchain so that votes can’t be altered by any outside party
I just don’t know how to code. I took some codecadamy courses a while back but never got that far into it.
The hardest part would be the red tape, getting this kind of thing actually voted into the system by the very representatives it would set to dismantle.
Soooooooo, what do ya’ll think?
Build a simpler version of reddit search system that will take a query as input and return the matching post results.
Some instructions and examples are given below to get started (You can use any language you want. Instructions use javascript style just for representation)
// 1. Create some dummy data similar to reddit text posts
post1 = { title: 'Build a reddit search system', description: "Build a simpler version of reddit.....", id: 1 }
// 2. Store all the data in one data structures e.g. array
postArray = [post1, post2, ....]
// 3. Index postArray data for fast search (any changes you want to make for quick and better search. Google about "search indexing" or watch the video I shared.
function indexData(postArray){...}
// 4. Create search function that will print the returning posts
function search(query){...}
// 5. Bonus: highlight the matching lines
You can learn about key terms used in search systems using this video on how google search works. I will also build it and share my work at the end of this week.
The Gameboard. We have Africa divided into assorted zones along with three possible start points.
So the game is for 2-3 players.
Each player gets a language development card deck.
Game play: each player rolls 1d6. This is the number of starting cards you can draw from your language development deck.
The name of your tribe is made from this initial alphabet.
Your first game piece is on the start point.
What happens during a turn?
step 1: Turn Option
A. Move an existing piece to an adjacent location.
or
B. Attack a rival on an adjacent location. This is a massacre and you take the location from your rival.
Or
C. Spawn a new piece from your start location-only if you have an existing piece on start location. The new piece is moved into an empty adjacent location.
Or
D. develop language. Roll 1d6. Draw new alphabet cards from your language deck equal in number.
Step 2: Check language Development. If you can spell a word from your drawn alphabet- words like farming, pyramid, canoe, boat, then your tribe has developed these. If you can spell canoe and have secured a location next to madagascar, you can move a game piece to the island next turn. If you can spell boat you can sail from any coastal location to madagascar next turn.
As your tribe occupies the map, in conflict with your opponent(s) the game continues until you gain all 26 letters of the alphabet before your rival, or wipe out your rival.
Its just a little educational game I created for public domain as an outflow of my linguistic archaeology research. So feel free to turn it into a billion dollar online franchise.
Hi yall. So as title say's I have created a game website. So I need to add some thing to it to look more realistic. So I have a question Can I do like fake credits system which grants like 500 like 'we happy your are signed in so here is your 500' and than I would create mini-games which costs like 50 to enter and play on website. Depending of score it would grant some more credits to persons account. So I need help or guidance from where to start. Any tips would be apprecianted. I can write codes in C++, mySQL, ,PHP , HTML, CSS, JAVASCRIPT. Keep in mind I know these language's in begginer level and I can read more on subject or something to learn much more to my requested topic . But main project is done throught PYTHON with FLASK and I can use any code language's I want to add in some thing to it. So if anyone have any tutorial links or experience in that or plan how to realise it. I would highly appreciate it. If anyone require's info on code or something from me feel free to ask and critise. Thank you in advance !
This is a somewhat simple one inspired by my working at a grocery store. Write a program capable of telling you the smallest number of coins you can make change with for a given amount. Examples, 25¢ should return 1, 35¢ should return 2, and 58¢ should return 6. I’m working off of American currency here but whatever you use should work just fine too as long as you adjust for it.
Bonus features for a extra work:
Hi, I'm quite into science and space and something related to that might be encouraging to keep on learning!
I've been trying to think of a way to do this on python,
It works as there are 5 columns with letters in it The columns can me mixed and see how many possible words you can make for example
Column 1: L O B F A K N E R I Column 2: L I N A Z U F O M E Column 3: E W T N V A L S G P
You can make the word BEN From the B in column 1, E in column 2 and N in column 3
Hi all!
I feel like this is a good prompt but also might help people think outside-the-box for a problem I have!
I'm in the military and we have a scheduling problem at my job that I believe can be solved via a relatively simple tool, but the concept could be difficult to implement and I'm looking for some ideas.
We have difficulty scheduling 100+ people with shifts, training, business trips, etc. Most people tend to use excel for this sort of thing but it's a massive amount of work and just not an ideal solution.
I'm looking to create a visual schedule of all personnel, laid out horizontally, that will block off dates with activities/etc. and allow for the input of new events, changing dates, colors for different type of activities, etc. I'd really like this to be able to create a "draft" schedule and also drag/drop items around on the schedule... i.e. much more dynamic than it is in a static excel sheet.
Here's the problem: being on a military network I can't just (1) run my own web server, (2) I have access to a limited set of tools (Microsoft Access/Excel/etc.), and (3) I don't believe going to a pre-built, paid solution that's hosted by a third-party will be approved.
(I know PHP/CSS/MySQL, Java, and have dabbled in some frameworks like CakePHP.)
Any thoughts?
Appreciate any feedback!
Hey everyone!
Under the hackathon of the german Bundesregierung we crated a BLE Tracking app.
We wanted to do this open source and as a community driven project, but until now this was not really succesfull. Iam a first grad student and dont have the time nor the knowledge to realize this alone.
https://github.com/MoritzGan/TrackCovidClusterAndroid
Iam know looking for People that maybe want to join forces and create a really open source and privacy preserving tracking App.
If you are interested and know android dev/ java/kotlin/ swift or ionic/ angular please pm me :)
Everyone is welcome!
private float roundTarget(float target) {
if (target > 0) {
if (target <= .5f) {//greater than zero but less than .5
return target = .5f;
}
return target = 1;//greater than .5
} else if (target < 0) {//less than 0
if (target >= -.5f) {//less than 0 but greater than -.5
return target = -.5f;
}
return target = -1;//less than -.5
}
return target = 0;
}
Hi Guys! I’m a freshman and I’m looking to take part in my school’s optional self directed development project during the summer. I will have to create a web application with a database backend as part of the project. Can I have ideas on what I can develop that would meet the requirements?
I created the sub r/GoProjectIdeas/ today specifically for golang enthusiasts who cannot find an idea for a project to work on or need others to contribute to their existing go projects. Hoping to see many contributors.
Here is my submission using the R programming language
code:
replace(replace(replace(1:100,grepl(0,1:100%%3),"FIZZ"),grepl(0,1:100%%5),"BUZZ"),grepl(0,1:100%%3)&grepl(0,1:100%%5),"FIZZBUZZ")
output:
[1] "1" "2" "FIZZ" "4" "BUZZ" "FIZZ" "7" "8" "FIZZ" "BUZZ" "11"
[12] "FIZZ" "13" "14" "FIZZBUZZ" "16" "17" "FIZZ" "19" "BUZZ" "FIZZ" "22"
[23] "23" "FIZZ" "BUZZ" "26" "FIZZ" "28" "29" "FIZZBUZZ" "31" "32" "FIZZ"
[34] "34" "BUZZ" "FIZZ" "37" "38" "FIZZ" "BUZZ" "41" "FIZZ" "43" "44"
[45] "FIZZBUZZ" "46" "47" "FIZZ" "49" "BUZZ" "FIZZ" "52" "53" "FIZZ" "BUZZ"
[56] "56" "FIZZ" "58" "59" "FIZZBUZZ" "61" "62" "FIZZ" "64" "BUZZ" "FIZZ"
[67] "67" "68" "FIZZ" "BUZZ" "71" "FIZZ" "73" "74" "FIZZBUZZ" "76" "77"
[78] "FIZZ" "79" "BUZZ" "FIZZ" "82" "83" "FIZZ" "BUZZ" "86" "FIZZ" "88"
[89] "89" "FIZZBUZZ" "91" "92" "FIZZ" "94" "BUZZ" "FIZZ" "97" "98" "FIZZ"
[100] "BUZZ"
Hi there!
As you probably saw this is my very first post on Reddit :)
But let's back to the main topic here which is my idea for an application - "Smart Fridge" (this is only idea for a name). So, everything here is only an idea, but I really would like to get a feedback from you guys - what you think about this idea, etc.
----------------------------------------------------------------------------------------------------------------------------------------------------
For who?
Application is dedicated for all people who have a fridge at home.
Problem to solve?
This situation very often happens - you are in a shop but you cannot remember if you still have a milk (or some other product) in your fridge.
Why this application would be useful?
Application for user would be available via smartfon/web (firstly web application and android app later in the future). Application would show all scanned products which are available in your fridge in real time. So when you would be in a shop you can just open application/web and see what you have in a fridge available.
How would it work?
I thought about a Raspberry Pi + some mini barcode scanner module. This computer would be installed inside the fridge. When you will be put a new product into a fridge you will have to scan the barcode of this product before put into. When barcode is scanned the Raspberry Pi would communicate with the API that product with this barcode has been put into a fridge and The API would do the necessary logic. The same thing would happen if "user" is going to get some product from the fridge, he would has to scan the barcode again (maybe some switch somewhere to inform that product is getting from the fridge and not put into - this is a problem to discuss).
Pros?
Cons?
----------------------------------------------------------------------------------------------------------------------------------------------------
What do you think guys about this idea? I would be very grateful for you opinion and feedback :)
I’m looking around the web for an animated gif of the maps of LGBTQ rights around the world, found here:
Disappointed that such a thing doesn’t seem to exist, I thought it would be great to have a software tool to automatically create this. And if one were making such a tool, it might as well work for any Wikimedia image with a change history.
(And I guarantee that this particular LGBTQ rights map animated gif would be front page material on /r/dataisbeautiful or /r/MapPorn.)
If anyone does decide to make this tool, please let me know by tagging my username when you release it!
As I haven't been successful, I'm asking if anyone has any ideas. I have to write a Javascript application which returns a list of actors that have been in both a movie with Keanu Reeves and Nicolas Cage. Sort of like a six degrees of separation. I have an API that I'm making a request to and I'm getting some data in return but I'm not exactly sure where to go from there?
Hi reddit. So I have a programming question that I need help with. I'm writing an application in Javascript where I have to come up with a list of actors that starred in movies with both Keanu Reeves and Nicolas Cage but not necessarily at the same time but I'm not exactly sure where to start?
Basically have to get a duplicate of everything i print for a lot of documents I have to print for uni. It is of course possible to click a button to raise the amount of copies printed but having it automated would help me a lot! Please let me know if this goes way beyond what is acceptable in this subreddit. I just want to give it a try.
Back in the Mode 13h days, the fire routine used to be one of the fun "first projects" for people playing with graphics. A line of random data would be generated and then smoothed upward. The numbers would correspond to a palette of available colors. An extra vertical bump would give the flame a smoother, less smoky look.
But that's too easy. Let's do it in Text mode.
In text you have to set the Foreground color, the Background color, the Attribute (blinking, hi-intensity/bright) and then actual character.
You can either use a portable library like NCurses or the OS console API (for example: https://docs.microsoft.com/en-us/windows/console/console-reference ). Escape codes will maybe work if you're using Linux, but not Windows.
If you post your code, make sure to list which OS you're using.
Happy programming!
Hello guys, i am a Brazilian cinema student and i had an idea for a small project, Glauber Rocha is a brazilian director from the last century that experimented greatly on the cinematic language, he did a movie called “The age of the Earth” that is composed of 8 reels. Glauber separated the movie in 8 so that they could be played in any order, thus creating a movie with many different meanings; the possible permutations of 8 reels is 8! (40,320) so this movie could be played in many different orders. I wanted to create a program that would play the movie at a random order every time without giving the user the ability to select the order. Sadly, i don't know any programming. If any of you are interested in doing something like this as a small creative project let me know! This doesn't have any commercial interest, it is just “something to have”.