Live data from Hacker News

Practice coding with fun programming challenges

codingame.com

31–40 of 47 posts

Re: Practice coding with fun programming challenges

#31

Personally, I think the best way to learn to code for someone who has talent for it is project Euler (projecteuler.net). No dependencies, no IDEs, no graphics and no gimmicks. Very short, clear, discrete problems that can be solved using any language. If you really need shooting, explosions and fancy graphics to keep you motivated then I don't think programming as a career is for you. Most programming jobs aren't goi…

The problem with Euler is it is very heavy on math. Math and programming aren't the same things. (although certain programming paths do rely heavily on math) Its better to do something. ANYTHING. Euler? Hackerrank.com (or other similar websites? exercism.io? "Crack the Coding Interview" (or any other similar book)? codereview.stackexchange.com? codegolf.se? Or any of the other dozens of ideas here http://programmers.…

I like how Project Euler is perceived very differently by people of varying backgrounds: programmers always say it's heavy on math, math folks tend to say it's mostly about programming!

Re: Practice coding with fun programming challenges

#32

I've always advised against being introduced to programming through game development. As much as game development is appealing and fun, the process is complicated and requires advanced knowledge of some fairly complicated algorithms even for fairly trivial games. Also you can find yourself spending hours shuffling sprites and designing levels which is time spent not learning programming. Also engines like Unity provi…

I think learning to code by writing a game is perhaps not the greatest method to learn to code, and definitely not a great way to learn computer science, but it does have its advantages. A visual feedback loop can be useful to those unfamiliar with computer concepts. Being able to think about complex algorithms with concrete examples (think graphics, physics, game state machines, dialogue scripting) can help reign in…

Another engine aimed at beginners is GameMaker[0]. It's been on the rise as some successful indie 2d games were made with it. The latest offering, Hyper Light Drifter, also seems to be getting some traction.[1]

[0] http://www.yoyogames.com/gamemaker

[1] https://www.youtube.com/watch?v=nWufEJ1Ava0

Re: Practice coding with fun programming challenges

#33

I've always advised against being introduced to programming through game development. As much as game development is appealing and fun, the process is complicated and requires advanced knowledge of some fairly complicated algorithms even for fairly trivial games. Also you can find yourself spending hours shuffling sprites and designing levels which is time spent not learning programming. Also engines like Unity provi…

I can program (mainly C++, Java, Perl, Ada, SQL) and I had difficulties to improve my weak level in Python because I had (still have) few opportunities to practice. I have followed an easy MOOC (https://www.coursera.org/learn/interactive-python-1) that uses game development. It was very motivating and a good reminder that game programming can remain simple.

Re: Practice coding with fun programming challenges

#34

Personally, I think the best way to learn to code for someone who has talent for it is project Euler (projecteuler.net). No dependencies, no IDEs, no graphics and no gimmicks. Very short, clear, discrete problems that can be solved using any language. If you really need shooting, explosions and fancy graphics to keep you motivated then I don't think programming as a career is for you. Most programming jobs aren't goi…

For me it was PythonChallenge.com

It's not as math heavy and quite engaging.

> If you really need shooting, explosions and fancy graphics to keep you motivated then I don't think programming as a career is for you.

It can come later. For example when I started out programming, I first build websites and then found out that Javascript exists and without having the slightest idea what I was doing, I built things based on examples, like animations etc. It gave me a foundation and interest in programming other stuff, like generating things for modding games in Python, deciphering the format where games store strings and writing a program to translate them to my native language and similar hobby projects.

If you have your own goal and interest in it, it's much much easier to reach an advanced level than by learning in a linear fashion with boring artificial tasks.

Later on I took proper university courses as well, but I think it helped me a lot in staying motivated that I already associated programming with fun because of the prior experience of playing around (without too much understanding).

Re: Practice coding with fun programming challenges

#35

Personally, I think the best way to learn to code for someone who has talent for it is project Euler (projecteuler.net). No dependencies, no IDEs, no graphics and no gimmicks. Very short, clear, discrete problems that can be solved using any language. If you really need shooting, explosions and fancy graphics to keep you motivated then I don't think programming as a career is for you. Most programming jobs aren't goi…

The problem with Euler is it is very heavy on math. Math and programming aren't the same things. (although certain programming paths do rely heavily on math) Its better to do something. ANYTHING. Euler? Hackerrank.com (or other similar websites? exercism.io? "Crack the Coding Interview" (or any other similar book)? codereview.stackexchange.com? codegolf.se? Or any of the other dozens of ideas here http://programmers.…

> The key is DOING.

Yes, especially doing things that are useful to you. This can be something very small. Many years ago, I needed to list filenames in a folder. (I had no idea of the command line). I knew some basic Python and I figured out how to do this.

Or I wrote a flashcard quiz test game to prepare for my history test in school (Javascript and HTML).

Or I wrote a small program to find rar or zip files on my computer that have also been extracted and now take up approx. double the space on the disk (the extracted version and the archive are both there).

Or some animations in Javascript to understand things we learned in physics class (harmonic oscillation and similar things). Small projects like that.

Or a program with GUI where I plotted some function we learned in math class about, with sliders to control some parameters of the function and see how the plot changes instantly.

I liked it so much that I enrolled in university to study computer science and I really liked the uni courses too, because I already understood how programming things is helpful in everyday life, it wasn't a dry abstract thing that you build for its own sake.

Re: Practice coding with fun programming challenges

#36

I've always advised against being introduced to programming through game development. As much as game development is appealing and fun, the process is complicated and requires advanced knowledge of some fairly complicated algorithms even for fairly trivial games. Also you can find yourself spending hours shuffling sprites and designing levels which is time spent not learning programming. Also engines like Unity provi…

I agree. Game dev is a very different way to learn to code, and one that's more accessible when you don't have specific guidance.

If you just want to do indie game dev, it's great, but it doesn't transfer and it teaches bad habits without the basis you mention in bits & bytes, data structures & algorithms.

While programming in general is highly abstract & often requires you to form a roughly analogous model of the situation in your head, game-dev programming usually involves you working directly on that model. It's very physical. Move this to that location, shrink those, animate the other, fade that out of existence. It's much easier to see the effect of your code in a game engine than through programming a sorting algorithm and logging the results to console.

For that reason, it's a great way to see if programming might be something you enjoy. It's not a great way to learn programming.

edit: apologies, I didn't see xyzzy_plugh's comment before making my own.

Re: Practice coding with fun programming challenges

#37
I play on Codingame on and off for some years now, and the fact is: it is a game. And this game is played by programming.

Thus, it is really good to try out a new language, because it is fun immediately.

Doing the contests is also really fun, since you are compelled to improve your program more and more. And if you're still new to programming, you experience very soon the problems coming with "poorly written code" (as poorly maintanable code).

Re: Practice coding with fun programming challenges

#39

Earlier quoted context omitted.

The problem with Euler is it is very heavy on math. Math and programming aren't the same things. (although certain programming paths do rely heavily on math) Its better to do something. ANYTHING. Euler? Hackerrank.com (or other similar websites? exercism.io? "Crack the Coding Interview" (or any other similar book)? codereview.stackexchange.com? codegolf.se? Or any of the other dozens of ideas here http://programmers.…

I like how Project Euler is perceived very differently by people of varying backgrounds: programmers always say it's heavy on math, math folks tend to say it's mostly about programming!

Well, I see a lot of problems that are made trivial when you understand certain parts of math.

You can definitely "brute force" a portion of the problems... but some problems just get simple when you can see certain math parts.

I honestly wouldn't say its more math or programming - it's deeply both. More as you get past the first few problems.

My point was more that there are, these days, a good collection of more directed practice tools that don't rely on knowing or learning math.

HackerRank for example is one that has many languages and many problems that don't rely on "math". I like it and it's ilk because you can learn/practice basics without having to know the Pythagoras theorem or Fibonacci's sequence.

I think Euler has a special place in these kinds of conversations because it's one of the leading sites that did this kind of thing. That's why people are always like "Oh, you want Euler". It's what programmers immediately think of with these kinds of questions.

Re: Practice coding with fun programming challenges

#40

Earlier quoted context omitted.

The problem with Euler is it is very heavy on math. Math and programming aren't the same things. (although certain programming paths do rely heavily on math) Its better to do something. ANYTHING. Euler? Hackerrank.com (or other similar websites? exercism.io? "Crack the Coding Interview" (or any other similar book)? codereview.stackexchange.com? codegolf.se? Or any of the other dozens of ideas here http://programmers.…

> The key is DOING. Yes, especially doing things that are useful to you. This can be something very small. Many years ago, I needed to list filenames in a folder. (I had no idea of the command line). I knew some basic Python and I figured out how to do this. Or I wrote a flashcard quiz test game to prepare for my history test in school (Javascript and HTML). Or I wrote a small program to find rar or zip files on my c…

"Yes, especially doing things that are useful to you."

I'd also expand that to say things that lead you in the direction you want to go.

Game development? Healthcare software? Big business? Small business? Big Data and report writing? Database management?

Once you get past the basics there is a plethora of tools and sites... its important to try and veer towards something that meets those goals.

Euler and Math is good - math crosses all boundaries. But Fibonacci isn't as important to UI or Game programming (depending on the game types, of course)

Post reply on HN