Hacker News new | comments | show | ask | jobs | submit login
Exercism – Level up your programming skills (exercism.io)
795 points by moesart 10 months ago | hide | past | web | favorite | 94 comments



This looks useful for learning the basic syntax of a new language, but the exercises look to be somewhat generic. Most of the exercises seem to be duplicated across languages.

Once you've mastered the basic syntax and control constructs of a language, it probably isn't worth your time to try a dozen different string manipulation exercises.

Perhaps this is beyond the scope of what this site is aiming for, but, I would hope for some exercises that help me understand what each language is commonly used for.

Potential examples:

- Swift: Learn to display and manipulate a GUI

- Ruby: Learn to write a web application

- Python/Julia/R: Learn to fit some data to a model

- Javascript: Learn to use a web framework

- Go: Learn to handle some network connections, concurrently. (I see they have one exercise that emphasizes concurrency, which is a step in the right direction.)

- Perl/PHP/Bash: Learn to cry bitter, sorrowful tears.


>- Perl/PHP/Bash: Learn to cry bitter, sorrowful tears.

This is a common misconception. PHP tears are actually almost sweet and not bitter at all. The only saltiness comes from hearing the opinions of other programmers talk about your primary language.


I've written large, important things in C++, Kotlin, Scala, Java, Go, Javascript, PHP, etc... PHP in 2017 is great. PHP 7 is nice to use. Laravel is one of the best frameworks I've used. We have applications making millions of dollars a year running on a couple containers running Laravel 5 at my current job.

It's not a perfect language, but none are. I think some people are just jealous of how little setup/barrier to entry there is for PHP ;)


nobody is making fun of PHP out of jealousy


Genuinely interested - which app is making millions a year on Laravel?


It sounds like Pornhub is using PHP without a framework from this job posting or maybe they are just open minded.

https://www.reddit.com/r/forhire/comments/47fvmk/hiring_mont...


Publishing and ad management at a large publisher/adtech company


Yeah, no, not when your primary language still can't get lexical scope right, or distinguish between arrays and hashtables.


The lack of distinction between array vs hashtable isn't a big deal. Array as a map from integers to items works fine in practice. Even speaking of algorithm performance, it's fine for the uses you have on a web server. (Any other use of PHP is clearly insane. :) )

You speak like someone who hasn't worked much in PHP. When you do, a lot of quirks and flaws really bother you and slow down during everyday tasks, but the ones you mentioned aren't they.


> a lot of quirks and flaws really bother you and slow down during everyday tasks

Would you mind sharing a few that bother you? q


The fact that `false` isn't always false. Or that '0' or 0 or null are all 'false'.

There's a bunch more quirks in Zend Framework that I use every day that are much worse than all the rest of PHP though.


It occurred to me not long ago that hash tables are a general solution to indexing, and arrays are simply an optimization that you can apply when the proper constraints are in place. I'm happy to discover that it wasn't an original thought.


You can always use SPL for more strict datastructures (since 5.3): https://secure.php.net/manual/en/class.splfixedarray.php


PHP was my first bike, so to speak, so I can't knock it. Plus later I learned Slack was written in PHP, and I was like, whoa! I definitely think it gets a bad rap, mainly because it's almost too easy to use, correctly and incorrectly.


Cam someone explain why this comment was down-voted?


https://news.ycombinator.com/newsguidelines.html

Please don't comment about the voting on comments. It never does any good, and it makes boring reading.


I worked with a guy who uses PHP in 2017 and we never let him forget it.


It's probably so easy for him to forget because he is so busy shipping working apps...


I think what you're describing is cookbook territory, and perhaps there's a niche for that (though some languages like C or Python have a huge scope). I'd like to see a website that curated libraries with cool examples.

The problem with a cookbook, IMO, is that it doesn't really teach you anything about the language. You could write some really cool (short) image processing code using OpenCV, but would it really help you learn C++ or Python? I suppose you could pick the top 10 libraries/frameworks and go from there.

But.. on the exercise front, there are certainly nifty ways of solving problems in some languages that aren't available in others. Python, for instance, makes a lot of programming challenges very simple with the standard library. Similarly stuff gets a lot more readable if you use C++11 onwards.

I agree there isn't much point if you already know the language inside out (though it's useful to keep sharp), but if you're learning it can be a great way to discover useful constructs like Python's itertools.


I think the idea is that the best libraries for a language rely on the good parts of the language, so using those libraries will help you discover those.

For example, you have jQuery, which will expose you to DOM interactions, callback-style programming and even promises.


> - Javascript: Learn to use a web framework

ugh... How about "Learn about the DOM and web APIs"?


That is also a totally good suggestion but we don't have to be mean about other good suggestions.


I don't think it's a good suggestion for someone to learn a web app framework in a tutorial that teaches the basics of Javascript.


New web developers are really confused. Many of them don't see "programming" as a fundamental skill to be practiced and understood for its own value. Nor does it occur to to learn how, say, HTTP actually works. The resources that they tend to find on YouTube, Udemy etc are really not helping in this regard.


can you help with some proper resource links sir i am currently an aspiring UX/UI developer but i am thinking to go full stack front end dev....i want to make websites like these with some much response and wow factors ...btw in the below website links are these just templates parallaxed upon each other or these are coded to core?

EXAMPLES :

https://goo.gl/u1pzfK https://goo.gl/YpZuML https://goo.gl/xgP4T2

THESE PEOPLE JUST MADE WHATEVER THEY IMAGING AND BRING IT TO LIFE, I WANT TO MAKE SUCH THINGS CAN U HELP WITH SOME GUIDANCE SIR?


Honestly not sure if this is spam or an (excellent) sarcastic response to the GP. Leaning towards the former.


Doing the same beginner exercises in new language environments seems excellent practice to me. Yeah, you know (say) tokenizing or regexps backwards and forwards: what better topic to tinker with, to focus on learning how new-language works?

Not to say that exercises emphasizing the intentions or strengths of a language are bad; but precisely those boring repetitive exercises will be the common.. say "conversational mastery" of the language.


Yes, this is what I'm always looking for too, along with examples of idiomatic usage and guidance on commonly-used libraries.


I just signed up and while it looks like a great resource I really wish they would grade your submissions on pass/fail based on the test cases that are included with each module. I thought it was weird that I submitted something that was not passing but it didn't complain... because if that's the case, why even submit? As a commentator I would like to know if I'm commenting on solutions that are passing or failing first, before writing any comments. Just my thoughts.


I used exercism for a few days to brush up on python about a year ago. One of the big reasons to submit incomplete answers is to get feedback / help. I was getting feedback comments within an hour or so from other people working on the same activities within exercism, and the website itself encourages you to look at how other people did things and provide them feedback.


One reason to submit before it passes is so that you can see how others did it. If you're learning a new language and don't even know where to start, it can be useful to get help from others first then try to implement it yourself.


It would be nice if it could run tests in-browser to show whether a submission passes or not.


Isn't that cheating?


IIRC, exercism doesn't really encourage completing things for points, and didn't especially heavily gamify the learning process. Copying answers really just seemed like shortchanging yourself when I was using it.


It's not cheating if you're trying to learn, not compete


Doesn't that really depend upon the way that you treat the problem? If you're just looking to pass, what do you have to gain? This isn't a course in College.


You're the one deciding what you need out of the material so that's up to you ;-)


If you don't know how to even get started, what do you have to gain from just being stuck?

When I started on the assembly track, looking at others code to figure out how to get set up for the first challenge allowed me to do the rest on my own.


>> because if that's the case, why even submit?

Analytical data on which problems you're solving and how you're doing vs how you think you're doing? And who might be interested in purchasing that data...


Test cases change from time to time, which can cause issues and would require some kind of versioning. Would be a nice feature, maybe try to get it on the road map for Nexercism?


They have some exercises I would prefer to skip, so I'm not upset by the lack of grading. The bob exercise is extremely tedious.

I like the emphasis on sharing solutions.


Been using this for a few weeks to practice for interviews, it's a slick setup. Unit tests setup to test all input and output, plus since you download the exercises you can use your editor of choice.

While there isn't much reviewing going on, I've found it useful to poke through a few other submissions for exercises (especially the ones with comments). I've learned a few things from other users' code.


I love the site, but I have yet to have any of my submissions get reviewed by anyone else. Great concept, but maybe there is more they could do to encourage experienced developers to review the submissions.


I signed up last week and have been using it to learn Erlang. I have some experience with Elixir so Erlang isn't totally foreign to me. I'm experienced dev and have only commented on 1 submission. The problem with commenting on submissions is that I'm learning the language as well so there lacks the authority of knowing what would be the <INSERT LANGUAGE> way.


Thanks for the reminder; I used to do some Erlang commentary on the site, will go look again.


I had a lot of good feedback on some Ruby problems I worked on a few years ago. I'm guessing it's highly dependent on having a community for each specific language.


Same, on Ruby and Lua I've gotten good feedback, but not other languages. I think it helps to comment on your own stuff and ask questions if you're unsure about your solution and if there's a better way.


I've written ~15 of the higher-level reference exercises for Elixir on Exercism, and do try to comment when I can, but my day job keeps me from it a lot of the time. Some sort of reminder system would definitely be great, especially as more people use the site.


I've had better luck with getting reviews when I form or join teams.


This looks pretty cool. And since it hasn't been mentioned here yet, Advent of Code 2017[0] is ongoing right now and there's still enough time to catch up. But you can always go back to years 2015 and 2016 to sharpen a new language on.

I've been learning Elixir for this year's challenges and it's just the right amount of challenge required for understanding the idiomatics and idiosyncrasies of a language.

[0] http://adventofcode.com/


I attended a talk recently given by Exercism's creator (Katrina Owen) about the trials and tribulations of being an open source maintainer, and how success can turn a technical problem-solving delight into a thorny people-management tarpit. A process that programmers may not initially possess the skills to handle.

One big takeaway was how thankless and un(financially)compensated the task often is. If you find Exercism useful, I strongly recommended clicking the "Donate" button at the top.


Can someone tell me what this has over, say, Codewars and Leetcode? It seems like there are not too many practice problems yet.


The biggest upside compared to other code challenges I tried (HackerRank, CodinGame) is that the code is ran on your machine, and the pass/fails are from unit tests. So you code using your editors in a real development environment rather than in a web based sandbox.

Also, as the checks are from tests, there are no single right answer. I've seen some code challenge services (can't remember the name) that would mark fail if you didn't write it exactly as they were expecting, to the line break.


that indeed could be an advantage. on codewars it sometimes takes a while for tests to run.


For learning a language, I like and have used exercism but personally I prefer Codewars (and am a subscriber) because while exercises alone are a great way to get experience, perhaps the most valuable part of Codewars is being able to see what better coders did to solve the very same challenge.

I have learned so much about what was capable in my favorite from those other answers.


I believe when exercism came out it's primary goal was to help you get ramped up in a new language, however I'm uncertain if that's still the case.


I didn't think I would enjoy this, but I do: http://exercism.io/submissions/4778291c472d4c60b79360e02dd75...


Wonderful, well played sir!


I really enjoy this site. I signed up last week to help me learn Erlang and am using it to brush up on my Elixir. One thing that stinks is the inconsistencies between the languages. For instance, Erlang uses rebar3 to run the tests "rebar3 eunit" whereas Elixir makes you use the "elixir xx.exs" command, meaning you have to point to the test file. It isn't that bad except a lot of the test files have really long names. That being said, it is a minor gripe I have with the site and I have otherwise enjoyed it.


Try `mix test`, assuming you have a mix project.


That's what I'm used to but it doesn't come with a mix project, which is frustrating. It is just the ex file with the code and the exs with the test. If I have time, maybe I'll do others a solid and try changing the tests to use mix (if that's even possible as an outsider)


> if that's even possible as an outsider

It's all open source. Check out https://github.com/exercism/elixir. I've made some minor contributions in the Rust track and found the maintainers very pleasant to work with.


Awesome, thanks! I'll start trying to help.


Similar to this, I'd recommend people check out Codewars, which has challenges that you then submit and get compared/graded against others' solutions. It's a real neat way to learn other ways of achieving some solution than the one you came up with.

https://www.codewars.com/


Thank you. Been looking to dive further into rust but needed some challenges. Unfortunately leetcode doesn't support it. :(


Awesome, I was just teaching someone to code and a lot of the coding challenges are super lame. I really like these.


I run a business on wordpress, but can't code. I want to learn some php and javascript to be able to better work with my programmer, and make some small modifications myself.

How suitable would this be?

Note: I have learned in the past, for about six months, went through K and R's C book, Udacity's intro course, and made some python scripts which are still in use on my site. But, that was five years ago, so I've forgotten everything.

So, I'm not exactly a total beginner, but I currently am unable to do anything through neglect.


If you have a local wordpress meetup it would probably be worth it to go down there and check it out. Its useful to find someone to ask questions of and maybe they offer some training.

The bostonphp group (Now almost defunct, excepting training) ran a class on setting up and running a drupal site, which was good. They had people that run drupal sites helping with the class so if you had questions there was someone knowledgeable). That being said, I've never run a production drupal site, but I feel like I have some idea whats involved.

Many years ago I took a redhat kernel extension programming class. Again with someone knowledgable teaching the class, it was quite helpful. Since it was all people from my workplace in the class we were able to ask the relevant questions about the scheduler and other information we needed.


Ah, great idea, thanks! I found a local wordpress meetup.


You went through K&R book and you can't code? How is that possible? Or did you completely skip the exercises?


I did all the exercises.

1. At the time, I could code the kinds of things K & R had me do. But, I couldn't, say, run a wordpress site, because that depends on knowing libraries, how to run php on my system, a bunch of php specific stuff, and other stuff I don't even know I didn't know 2. It's been five years. Without practice, I no longer can do the stuff I did while I was learning. I could pick it up again, I just mean the knowledge isn't currently available.

Basically, I had no project that required me to use the skills, so they didn't grow past what I picked up, and then they atrophied. Pressing business concerns became more important.

But, now I'm at a point where not being able to program has become more of a hindrance.


Seems like what you need is to learn how to do specific tasks for you site, not learn how to program.

When you need to fix a toilet you don't usually start with learning hydrodynamics.


Ah, yes, I just looked over the exercises more closely. They seem above the level I'd need. I should probably use something like Treehouse or Codeschool that's more focussed on practical management I'm guessing.


Actually, I think this highlights a problem with so much of the content out there about learning to code. Back to the toilet analogy:

> When you need to fix a toilet you don't usually start with learning hydrodynamics.

I think that's wrong. You weren't taught hydrodynamics. You were taught how a toilet works and then ran in to a plumbing problem. The issue is there isn't much out there on plumbing, so to speak. It reminds me of The Cliff of Confusion and The Desert of Despair.[0]

There's tons of hand-holding tutorials that will teach you the basic syntax of JavaScript or PHP, but once you're set loose in to the real world, where we're no longer just reversing strings and other trivial exercises, there's surprisingly few tutorials available (I suspect because it's way easier to write about simple facts than it is opinionated best practices, but that's a different topic...)

I don't really have any silver-bullet for you here. The "knowing libraries, how to run php on my system, a bunch of php specific stuff" part is mostly a matter of tenacity, Googling, and reading tons of dry technical documentation. It takes a while before the big picture starts to click.

[0] http://www.vikingcodeschool.com/posts/why-learning-to-code-i...


Good article. I'd say I indeed got to the cliff of confusion. Then, I simply stopped in the desert of despair, because business took off and I had a better alternative.

I'm guessing a school like viking would mean I basically do no business developmemt for the three months it takes, right?


Come on. This is a trivial situation, no need to lament the status quo. What the OP needs is to spend a couple of hours learning PHP syntax/infrastructure, then attempt to solve his specific problem. If he does not know how to start/gets an error, the solution is probably on SO somewhere.

60k questions: https://stackoverflow.com/questions/tagged/php+wordpress

Add the keyword specific to the problem, and if can't find it, just post a new question.


> the solution is probably on SO somewhere

SO (especially the PHP and JS parts) is full of terrible answers that basically instruct people to throw darts at the board until one hits, without explaining any of the underlying concepts behind what's happening.

This sounds like a great strategy if OP wants to become a mediocre programmer.


It does not look like OP wants to become a programmer. He wants to "better work with my programmer, and make some small modifications myself".

For that, there's no need to go deeper than what I suggested.


Well, eventually I'd like to. But, I know I probably can't fully get into it while working full time on my business.


Yesterday the page worked just fine, today all pages give me "Application Error", any news on if they are addressing this?


It includes detailed pages for Common Lisp, Julia, Racket, most ML languages and Haskell.

I'm satisfied. Very comprehensive language list.


I came here specifically to write some things that other people already said, so here is a TL;DR:

The idea is great: have a test suite and program your exercises against it. But in my opinion, exercism makes you write a lot of non-idiomatic code. There is value in that, but only so much.


Great concept promising potentially more in-depth experiences than the cpomtetition. I think that the single point of failure of the site would be failure to build a large enough community of reviewers.


The tasks are good, but I wish it was graded and you could list the top submissions by likes and speed etc. Something like codeforces where you can learn from the best by studying their code..


Exercism is great at building code review chops. Assuming if you are in an active language community and have finished a number of challenges.


This is basically Ruby Koans for every language?


No HTTPS enabled?


What I'd love to see is a series of case studies on software architecture with lessons learned.


That seems totally unrelated.


hmm. a lot of exercises but how hard will they be? I like codewars kyu levels.


They're working on Exercism v2 that includes the difficulty level on the exercises: https://v2.exercism.io/tracks/lua/exercises


so exercism v2 is served over https but v1 is not. strange.


Quite Interesting.


No thanks




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: