I finished Regular Chatbot about Regular Expressions recently.
during the tasks I had the following feelings:
this time the exercises seemed quit easy to me and I would like them to be a bit more challenging or at least have one more exercise which is indeed challenging (as in the syllabus so far).
AND the test for the function check_phone_number(number)
was not really in the way that I had to think about an exact RegEx very long.
So:
re = r"\W+\d+\W +\d+\S+"
(instead of at least re = r"^(+\d{2})[-. ]\d{3}[-. ]\d{3}[-. ]\d{3}$")
let me pass the test.
Is this the way it is meant to be?
What do you think about my considerations?
I would appreciate to make the test more specific and add another, more difficult task so Regex is really understood in a deeper way.
There are other practice exercises where regular expressions might make sense like Pig Latin, Phone Number, Word Count, or Wordy. Generally concept exercises aren’t intended to be difficult since that would distract from practicing the concept. Each person’s sense of difficulty and their own journey is different so a small bump in difficulty for you may discourage someone else from continuing with a syllabus. There’s a particular exercise in the C# syllabus that I always have trouble with so I avoid it when I have to refresh my C# knowledge.
in the Julia track there’s only one exercise,
so you suggest to do the other exercises…
but can I do them in Julia or do I have to start a different track in C# (I just saw that there the log files exercise is part of Regular expressions, which is different in the julia track) or whatever??
Is it difficult to change this and let it become part of that, too?
or let me put it the other way round: how difficult is it and how long will it take aproximately, to change this and let it become part of that, too?
I believe they’re already added to the Julia track but you’ll want to double check. There shouldn’t be a need to go to a different track. Then you’d be practicing regular expressions the C# way which might not be the same way in Julia.
Log Files is a concept exercise specific to C#, not Julia. Are you asking the maintainers to deprecate the current concept exercise and add that one instead? That’s a pretty big request, and I think you’ll get more buy-in perhaps by suggesting concrete improvements to the current one. What specifically does that exercise do that the maintainers may want to consider for their own exercise? That’s not to say there will or won’t be changes because that entirely depends on what the Julia maintainers want to do here.
having little time…
you are right, the Log Files exercise is different from Log Levels in Julia and, of course julia is different from C# (and I don’t want to learn it as it’s from MS).
Well I thought of porting over the exercise to Julia…
and wanted to know how much time this might take in advance…
And: I would like the existing exercise to be changed … as mentioned above.
We’ve also added some of them as practice exercises for the Regular Expressions Concept, so if you are following the “syllabus tree”, you will see them listed there.
I can’t say I’m terribly inclined to add more rigorous testing to Regular Chatbot in accordance with what @BNAndras has already said. Regex is almost like a language in itself, which is why the concept stresses that we are aiming to introduce Julia specific regex features and are not aiming to teach regex itself. This is also why there are many links in the about.md should you want more information on regular expressions.
Nobody has recommended you do a C# exercise. In fact, you have been warned against it because C# uses a different regex engine than Julia.
The exercises @BNAndras was initially referring to are the same as those in the links in my response, all of which are on the Julia track. The suggestion was to search for exercises by name on the Julia track. To do this, go to the Practice tab (next to the Learn tab) and there is a search bar there where you can enter the name.
Extra info:
This initial mention about C# was just relating a personal experience which helps explain why we usually make Concept exercises easier to pass (while Practice exercises can be more rigorous), and it had nothing to do with any suggested exercises.
This is the warning. Julia uses the PCRE2 regular expression engine, which is different from the .NET regular expression engine (although they are quite similar). If you look at the site I’ve provided the link for, you may better understand why we were avoiding teaching regex here, since it would need its own syllabus to give real depth, and it is really more like a package shared across multiple languages (e.g. R and PHP also use PCRE2).
Exercise structure:
It might be good to clear up that there should be quite a number of Practice exercises on the Julia track in which you can use regular expressions. They are not all explicitly linked to Concepts yet, so you will likely encounter more in the future.
The exercise/concept structure:
Each Concept has one (required) specialized Concept Exercise.
Each Concept can have any number (zero or more) of Practice Exercises linked to it.
The Practice Exercises are more general, and aren’t necessarily meant to be strictly associated with one Concept. Indeed, you may have noticed that some Practice Exercises practice multiple concepts. Also, there are still Practice Exercises which are not associated with any Concept (see Overview or Practice tabs on the website). Indeed, that was the case with the exercises that @BNAndras had originally suggested, until we linked a few of them to the Regular ExpressionsConcept. You see them in the syllabus now, but they had already existed on the Julia track as practice exercises for some time.
thanks for your answer and … pointing out that clearly.
It’s good to be reminded, that the Julia track provides search functionality.
I was looking on the concept side where I didn’t find them.
What I want to admit now:
I really appreciate exercism offers exercises to learn (so many !) languages
and getting so much support here.
I’ve already learned a lot and still do.
It’s only: I’m under pressure a lot of times and at some points in an exercise feel totally blocked (nothing moves then) and then I can’t find any solution.
This happens again and I again and I wonder, if it could work differently?
for example: I followed the learning mode and then found that on the syllabus (concept mode) the explanations are giving more information so I left the learning mode and forgot about being able to search for an exercise.
Is there an introduction for newbies which points out that difference and some other hinderences I encountered on my path to julia? If not, I’m offering to write one!
yes I got that one,
and saw the same problems
but didn’t want to be blunt.
I totally agree in that.
I learned RegEx for a while about 20 years back and used it every now and then and I really struggle again and again as it is so complex!
→ I did notice that!
→ that I did’nt notice!
thanks for that very much!
I started Pig Latin recently.
And this is really something!
to be precise: I would like not the whole existing exercise to be changed only the test
because:
where
re = r"^(+\d{2})[-. ]\d{3}[-. ]\d{3}[-. ]\d{3}$"
is needed
re = r"\W+\d+\W +\d+\S+"
fulfills the needs, which seems quite rough and unprecise.
There is this brief introduction to the different modes available. I’m not sure if there is a more detailed explanation elsewhere, but I usually end up learning by exploring, and I’m still discovering “new” things.
The best advice I have is to play with different options and explore different tabs to get a feeling for the structure of the site. After a bit it all starts to make sense. Otherwise, if you stay in one place, without looking at new things, everything starts to become rigid habit, which is hard to break.
That said, I don’t think it would be a bad idea to give more explicit information on the structure of things. For example, how the information appears on the syllabus was a bit mysterious to me, and once I thought I’d figured it out, I found out I was wrong.
for example
with this RegEx
the test of “(+34) 659771594” will also pass:
julia> check_phone_number(“(+34) 659771594”)
“Thanks! You can now download me to your phone.”
even this works:
julia> check_phone_number(“(-34) 659771594”)
“Thanks! You can now download me to your phone.”