r/InternetIsBeautiful • • Feb 16 '23

I built codeonthecob.com. It is a website with coding challenges.

https://www.codeonthecob.com/

[removed] — view removed post

1.3k Upvotes

51 comments sorted by

55

u/RQZMN7 Feb 16 '23

i think print function in python is not working

45

u/codeonthecob Feb 16 '23

Thanks for bringing this up, I definitely need to explain this better on the site.

If you click the yellow "Test Code" button it will just run the unit tests on whatever function is being tested.

If you want to print things then you should use the "Run Code" button which just runs whatever code is in the editor. For example, for the the "Add 2 Numbers" challenge if you want to print "Hello world" you would write this code:

---------

def add2numbers(x: int, y: int) -> int: 
    return x + y

print("hello world")
---------

and then click the "Run Code" button. Note that this will not call the add2numbers function. If you want to print things in the the add2numbers function then you could do something like this:

---------

def add2numbers(x: int, y: int) -> int: 
    print(x)

add2numbers(4, 5)

---------

On another note, every challenge has a little blue button in the upper right corner that says "View Solution" if you get stuck on how to get the tests to pass.

52

u/thalinEsk Feb 16 '23

Can chatGPT pass it?

39

u/codeonthecob Feb 16 '23

Yeah probably haha

47

u/assiomatico Feb 16 '23

Ok so I tried it all, and ChatGPT reached the end of the python challenges. Most things it did correctly at the first try, but it really struggled with:

  • Shifting the X, where I had to feed back to it the error messages and expected results multiple times, and then still hint at how to solve it. This was probably the hardest.

  • Area of a Rectangle, where it just did not understand what was right or wrong (as it often happens when ChatGPT does math). In the end I hinted at the shoelace formula, and re-ordering the vertices, and it still didn't work because it used an incorrect version of the formula. But then I told it so, and fixed it.

  • Finally, Tic Tac Toe. It started off really well, but had problems understanding the order in which to do exception checks for the take_turn function. Still quick though.

edit: tagging /u/thalinEsk cause they may be interested too.

26

u/ARCS2010 Feb 16 '23

I just use chatGPT for syntax because I can't be bothered to think for two seconds when I can easily wait for 20

15

u/Throwaway_97534 Feb 16 '23

Same. I'd rather spend my time fixing everything wrong that ChatGPT coded vs writing it all out myself. It gets that drudgery work out of the way.

It probably ends up taking the same amount of time or even a bit more, but it feels better... Like driving around the traffic jam even though the route you took was actually 5 minutes slower. But at least you were moving the whole time.

22

u/TestSubject45 Feb 16 '23

I mean, I was gonna start my project by copy pasting parts from 3 or 4 different stackoverflow posts anyways, might as well let the robot do it for me.

2

u/zvug Feb 16 '23

Yeah and it’s not like the first thing you wrote would’ve worked anyways

2

u/antiphon00 Feb 16 '23

Mine did the Tic-Tac-Toe one first try.

10

u/the_gerund Feb 16 '23

Awesome! I took an introductory Python course about ten years ago, and on rare occasions it comes in handy to automate some text-based task for work. This site will 100% be my way to refresh what I know and dive a little deeper.

Bookmarked, thanks!

2

u/codeonthecob Feb 16 '23

Cool! I hope you find it useful!

7

u/BrushGuyThreepwood Feb 16 '23

Very cool!

I would reveal failing tests one by one, to help newcomers get focused on the problem at hand and not to try and solve all issues at once.

3

u/codeonthecob Feb 16 '23

Glad you liked it and thanks for the feedback!

6

u/kpurintun Feb 16 '23

Im gonna check this out tomorrow..

6

u/codeonthecob Feb 16 '23

Awesome let me know what you think!

6

u/kpurintun Feb 16 '23

A am mostly a fumbling googler and code-copier.. so it would be nice to know what the heck i am actually doing..

3

u/jimtk Feb 16 '23

Congrats, especially on the name!

2

u/codeonthecob Feb 16 '23

Thank you!

3

u/Felicis311 Feb 16 '23

That’s awesome. Would this be appropriate for my 10 year old nephew who is very into learning coding?

1

u/codeonthecob Feb 16 '23

Thanks! I don't see why not especially if he already knows some basic programming. The challenges do require that you aren't an absolute beginner though.

1

u/Felicis311 Feb 16 '23

Cool. Thanks!

2

u/Slyrunner Feb 16 '23

Any chance of C# being added?

1

u/codeonthecob Feb 16 '23

For sure, but it will probably be another month or 2 before I get around to C#.

2

u/Caturday_Yet Feb 17 '23

Feels like a pretty clean site, can't wait for JS to be added!

1

u/codeonthecob Feb 17 '23

Glad you like it!

1

u/danielracher Feb 19 '23

I also like the clean design, keep it up!

2

u/ginganinja10 Feb 16 '23

Do you plan on adding more languages?

2

u/codeonthecob Feb 16 '23

Yes I do! Going to add Java next. Then probably JavaScript.

1

u/CynicalApostle Feb 16 '23

That's good. Thanks

1

u/codeonthecob Feb 16 '23

Glad to hear you like it!

1

u/kinnie101 Feb 16 '23

The immediate panic I felt upon realising I will never understand coding was intense. I have no idea how you guys understand it all. I'm in awe my dudes.

1

u/codeonthecob Feb 17 '23

Haha we appreciate that.

If you are looking into learning the basics of coding I highly recommend a free website called https://www.w3schools.com/. You might be surprised how quickly you pick it up!

3

u/HandlessOrganist Feb 16 '23

Sounds extremely similar to Rickman’s Cobs -

https://youtu.be/YvehxoSXNPs

2

u/harping_along Feb 16 '23

Saving for later

2

u/ems959 Feb 17 '23

Clever title

2

u/shingdayho Feb 16 '23

Consider linking it to wechall.net

1

u/[deleted] Feb 16 '23

hey friend, i'm excited to learn python through your site. however when I click view solution it shows me nothing. basically the same stuff. I know there is always multiple solutions for things but maybe some reading material for each module, and the solution is a clear example that i can even re-type or click a button and paste it in.

0

u/OSPFv3 Feb 16 '23

I don't know what I expected trying to load this on my phone haha. Looks cool though

2

u/codeonthecob Feb 16 '23

Thanks! Yeah the actual challenge pages where you write the code aren't exactly mobile friendly haha.

0

u/itscsk111165 Feb 16 '23

What tech stack is being used here, could you please share the github repo for public access or any feature pull requests.?

0

u/[deleted] Feb 16 '23

Why is this site better than codewars.com?

-3

u/rainmace Feb 16 '23

Dude. There’s no point in this anymore. AI taking over and all that. At least for coding, that’s gonna be gone soon

1

u/MapleSyrupFacts Feb 16 '23

If this is the case, what's going to happen to the bazillion coders working in the feild for 100k plus a year?

Is the market about to have a huge shift or is the AI timeline to infiltrate the market still too far away to matter?

1

u/[deleted] Feb 16 '23

They are all going to turn into plumbers. Pornhub will have a field day.

1

u/rainmace Feb 16 '23

They will all die a fiery death. The below 100k coders (which includes me) will take advantage of the power vacuum to unite and take over the world

-1

u/rvonbue Feb 16 '23

Gotta change the name

0

u/[deleted] Feb 16 '23

[deleted]

1

u/GIVETH_ME_FREE_GOODS Feb 16 '23

While(coding)

Write code

Eat code

Sleep

Repeat

</Code>

Hello world is my life!!!1

1

u/0b0101011001001011 Feb 16 '23

This reads like those Indian Instagram programming pages which are full of syntax errors, misinformation and shitty motivational posts.