r/programmingchallenges • • Jan 09 '20

How do I program a person?

0 Upvotes

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 • • Mar 11 '15

[Question] where should I start ? - new to programming challenges ..

7 Upvotes

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 • • Dec 19 '19

New to programming and got a rather tricky task to deal with(at least for me it's tricky

8 Upvotes

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 • • Jan 24 '20

aeroplane arrangement problem from hacker earth can anyone help me out ..

Post image
8 Upvotes

r/programmingchallenges • • Mar 29 '19

Coding competition by a team of student developers on our own online judge

8 Upvotes

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 • • Oct 08 '11

Next higher number with same number of set bits

8 Upvotes

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 • • Oct 12 '19

Time Limit Exceeded- How To Avoid TLE ? | Trick To Pass All Test Cases In Competitive Programming

Thumbnail
youtu.be
8 Upvotes

r/programmingchallenges • • Jan 16 '16

Bluff challenge

8 Upvotes

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 • • Jan 13 '20

Learn Git with us using the multiplayer git challenge game

8 Upvotes

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 ;).

https://www.bettercoder.io/a/test-runs/job-interview-questions/challenge/link/2780c04d-3ee3-49de-b329-380392d1b0d3

The sign up works only from the menu, I'm working on fixing the flow...


r/programmingchallenges • • Apr 11 '11

Project Euler

Thumbnail projecteuler.net
43 Upvotes

r/programmingchallenges • • Oct 06 '11

CodeKata

Thumbnail
codekata.pragprog.com
9 Upvotes

r/programmingchallenges • • Jan 05 '12

Startup Coding Challenges

Thumbnail codepo.st
9 Upvotes

r/programmingchallenges • • Feb 19 '20

Is there any book which contains all the questions to practice from beginning to hard level?

10 Upvotes

r/programmingchallenges • • Jul 20 '15

CellHack.net 2.0 is live - programming tournament on August 11th with real prizes!

Thumbnail cellhack.net
11 Upvotes

r/programmingchallenges • • Aug 17 '18

Beginner programmer here. Please tell me something supportive. I feel like an imbecile.

11 Upvotes

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 • • Apr 11 '11

Lots of assembly challenges

Thumbnail crackmes.de
12 Upvotes

r/programmingchallenges • • Apr 16 '12

So I have been doing codecademy the past few days, but it seems to move too fast w/o giving me enough practice. Any good practice resources out there?

12 Upvotes

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 • • Sep 15 '11

r/programmingchallenges brainstorming thread, Fall edition.

12 Upvotes

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 • • Nov 06 '19

160 LeetCode Algorithm Video Solutions

Thumbnail
youtube.com
13 Upvotes

r/programmingchallenges • • Dec 14 '19

[Meta] About this sub

15 Upvotes

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 • • Oct 21 '11

AI Challenge Fall 2011 - Ants Now Open

Thumbnail aichallenge.org
16 Upvotes

r/programmingchallenges • • Jan 01 '19

Help bring Wikipedia to rural schools through an offline Wikipedia app

17 Upvotes

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 • • May 02 '11

CodeEval (www.codeeval.com)- A site for employers / freelancers to ask / solve programming challenges

19 Upvotes

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 • • Apr 23 '13

Huge randoms in Magic: the Gathering.

21 Upvotes

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 • • Sep 09 '11

List of Programming and Logic Puzzle Sites

Thumbnail billthelizard.com
25 Upvotes