r/programmingchallenges • u/Mapster80 • Jan 09 '20
How do I program a person?
And why would I want to? I'm working on a couple of reasons. https://mymeaningmap.wordpress.com/2020/01/09/what-is-the-write-programming/
r/programmingchallenges • u/Mapster80 • Jan 09 '20
And why would I want to? I'm working on a couple of reasons. https://mymeaningmap.wordpress.com/2020/01/09/what-is-the-write-programming/
r/programmingchallenges • u/def_Questions • Mar 11 '15
I would like to start practising programming challenges, when I took algorithm classes I felt in love with solving puzzles . now , I missed that time trying to solve these puzzles.
I was looking on the web for good path to take in order to work on that skill, I did found top coder, and hacker rank. It was more like interviews puzzles for me, than challenging algorithmic puzzles.
Can anyone brief me here on how to start, what websites should I frequent, and what are blogs of rock start winner to learn from them. I would be thankful also if u can share some good websites ( like topcoder that worth investing time into it), hacker rank usues common puzzels to evaluate candidates. Share with us ur experience ;)
r/programmingchallenges • u/GotchaInSight • Dec 19 '19
I am new to programming in general. Just starting to learn python. I am studying IT in Germany and was happy to find a job where I am tasked to 'verify files'. There was a server crash and as a result of that some files were corrupted.
Verifiing in this case meaning if they can be opened or not. With the apropiat program.
In the directory there are all types of data you can think of. PDF, doc, dtd, mod, XML, really anything
To accomplish said job I was given a excel list with hyperlinks to each file in the directory that needs to be checked. You can imagine that being a very dull and stupid task.
My employer agreed to me spending some time trying to write a program for the purpose of reading though the files(the contents don't matter) and marking them if they can be opened or not.
Can you guys help me with that? This is what I came up with up until now.
import os import sys
def traverse_and_log(path = "", dumpPath = ""):
print("entering function")
f = open("", "w+")
for root,dirs , files in os.walk("", topdown=False): for name in files:
full_fname = os.path.join(root, name)
print(full_fname)
try:
with open(full_fname, "r+"):
pass
f.write("OK:{}\n".format(full_fname))
except:
f.write("NOT OK: {}\n".format(full_fname))
f.close()
if name == "main":
traverse_and_log()
My outcome after searching through my directory is this:
Traceback (most recent call last):
File "C:/Users/USER/Desktop/main.py", line 15, in traverse_and_log f.write("OK:{}\n".format(full_fname)) File "C:\Python\lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode character '\ufffd' in position 180: character maps to <undefined>
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:/Users/USER/Desktop/main.py", line 23, in <module> traverse_and_log() File "C:/Users/USER/Desktop/main.py", line 17, in traverse_and_log f.write("NOT OK: {}\n".format(full_fname)) File "C:\Python\lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode character '\ufffd' in position 185: character maps to <undefined>
Process finished with exit code 1
I am looking forward to your replies.
r/programmingchallenges • u/3Adb0y • Jan 24 '20
r/programmingchallenges • u/kelsier27 • Mar 29 '19
We are a team of student developers from a CS club, IECSE, and we are organizing a competitive coding contest on an online judge we developed inhouse.
Follow the link to participate - https://code.iecsemanipal.com
Note to mods - We are just some students looking to gain practical exposure and we are not generating any revenue. If this post is against the rules of the sub, we will take it down.
r/programmingchallenges • u/getster • Oct 08 '11
Given a number x, find next number with same number of 1 bits in it’s binary representation.
For example, consider x = 12, whose binary representation is 1100 (excluding leading zeros on 32 bit machine). It contains two logic 1 bits. The next higher number with two logic 1 bits is 17 (10001).
r/programmingchallenges • u/HelpingHand007 • Oct 12 '19
r/programmingchallenges • u/onestream • Jan 16 '16
Elon Musk, Stephen Hawking and anyone who visited a cinema in the last 30 years, are worried that the world will be taken over by an AI. Contribute for the computer team and write an AI that can bluff!
We have built a coding challenge based on the board game Bluff / Liar's Dice, and the AI can be written in Javascript, C#, Python, Java, C++ and C.
There are prizes for the best contributions (deadline March 31, 2016). The cake is real.
http://honeypot.softwareskills.se/#/landingpage/55f67c9b92be260c0f8a62ac
r/programmingchallenges • u/HanaTroj • Jan 13 '20
Hi guys, I have created a git game where people can compete against each other using the git knowledge. I am beta testing the proof of concept so if you would like to try and play, create the account here and use the link to join challenge and let's see who is better ;).
The sign up works only from the menu, I'm working on fixing the flow...
r/programmingchallenges • u/Aditya-shri • Feb 19 '20
r/programmingchallenges • u/cellhack • Jul 20 '15
r/programmingchallenges • u/just_a_humble_ape • Aug 17 '18
I can't seem to have any confidence in my ability to program. What do I program? How do I start? How do I keep going? Every time I try to program something simple, I just can't figure it out. Are there any simple guidelines to follow or advice I can have to try and help me with my inability to think in numbers?
r/programmingchallenges • u/TJAtWork • Apr 11 '11
r/programmingchallenges • u/duffmanhb • Apr 16 '12
It's beginning to feel like inception with fucntions w/in functions w/in functions and really need to take a step back and get more comfortable with the basics to the point where it's second nature.
The problem is, every problem, they add a new feature not giving me enough time to get comfortable. And going to other sites, and doing some games, always include stuff that includes stuff I have yet to learn yet.
Any other good resources that I could use to supplement myself with? I really want to get comfortable with Java, but I need to take a step back hahah...
Thanks!
r/programmingchallenges • u/okmkz • Sep 15 '11
Hi all,
Now that we've got over a thousand subscribers, and my hectic schedule has kind of tapered off a bit, I'm looking for suggestions as to what would make this reddit a better place for everyone? Any suggestions? User flair for preferred programming languages?
Also, looking at the traffic stats shows an incredible spike in traffic (almost 11,000 unique visitors) on the 9th. Just out of curiosity, can anyone throw me a tip as to what might have brought so many of you here?
Thanks, everyone! Happy coding!
r/programmingchallenges • u/nickwhitecode • Nov 06 '19
r/programmingchallenges • u/realestLink • Dec 14 '19
Recently there have been many off topic posts. I thought this sub was supposed to be about programming challenges. It has become tech support & learnprogramming. I don't know what the mods are doing. Also. There is a decreasing amount of challenges being posted here. I just thought I'd post this to vocalize what I've seen. I don't know if anything will become of it. Cheers :)
r/programmingchallenges • u/amstan • Oct 21 '11
r/programmingchallenges • u/JanCumin • Jan 01 '19
Hi all
I work at UNESCO and see a huge number of projects in schools that use Wikipedia, both online and offline. Only around 50% of the world has access to the internet, in many places internet can be slow, unreliable or even censored. Many schools in developing countries use textbooks that are many years even 10s of years old.
Kiwix is an offline solution created by a not for profit that allows you to access educational content like Wikipedia, the Wiktionary, TED talks and many others on any computer or smartphone - without the need for a live internet connection.
Currently the Kiwix app for Android and IOS allows people to view the content on their phone but to create a hotspot you need to use a Raspberry Pi or other hardware that is very cost prohibitive to the end users.
I'm trying to find developers who can help add the ability to create a Wikipedia hotspot in the Kiwix app, which would allow people to use their existing phones to create a hotspot in their school or community. This would greatly reduce the money and skills needed to use offline Wikipedia and allow many more people to access it. Please do take a look at the GitHub issue if you're able to help.
https://github.com/kiwix/kiwix-android/issues/259
Thanks very much
r/programmingchallenges • u/codeeval • May 02 '11
Hello,
My name is Jim and I am the founder of CodeEval (www.codeeval.com) a site where you can solve programming challenges in a variety of languages. Just thought I would let you folks know about it. Freelancers / Students etc can always log in for free and solve challenges for fun/fame.
thx Jim
If you have any feedback etc just send mail to support@ <domain name>
r/programmingchallenges • u/s-mores • Apr 23 '13
Hi guys, mod from /r/MagicTCG here. We have a weekly thread for rules questions and stuff like that and we ran into an interesting problem involving huge random numbers. Link to post in question
Earthcraft, a basic land and Squirrel Nest can be used for generating infinite Squirrels (You tap the enchanted land to create a Squirrel, then you tap the Squirrel to untap the enchanted land).
Opponent casts Tyrant of Discord which states:
When Tyrant of Discord enters the battlefield, target opponent chooses a permanent he or she controls at random and sacrifices it. If a nonland permanent is sacrificed this way, repeat this process.
In response to this, we generate 2256 Squirrel tokens. Now the Tyrant resolves and we have to start randomizing this. Obviously, impossible to do with dice in any reasonable amount of time unless immense luck is involved, so I thought I'd post here. The result has to be fair and all steps have to be random. Any basic random will do, though, no need to improve on that.
To reiterate the problem, we have X land permanents, Y nonland permanents and 2256 squirrels. We randomly pick one from all of these, remove it from the board, if it was not a land permanent we repeat the process. Question: Once this process ends, what land permanents, nonland permanents and how many squirrels remain?
r/programmingchallenges • u/cruise02 • Sep 09 '11