+++*

Symbolic Forest

A homage to loading screens.

Blog : Posts tagged with ‘Welsh’

Milestones

Or, how and how not to learn languages

I passed a very minor milestone yesterday. Duolingo, the language-learning app, informed me that I had a “streak” of 1,000 days. In other words, for the past not-quite-three-years, most days, I have fired up the Duolingo app or website and done some sort of language lesson. I say “most days”: in theory the “streak” is supposed to mean I did it every single day, but in practice you can skip days here and there if you know what you’re doing. I’ve mostly been learning Welsh, with a smattering of Dutch, and occasionally revising my tourist-level German.

My Welsh isn’t, I have to admit, at any sort of level where I can actually hold a conversation. I barely dare say “Ga i psygod a sglodion bach, plîs,” in the chip shop when visiting I’m Welsh-speaking Wales, because although I can say that I am wary I wouldn’t be any use at comprehending the response, if they need to ask, for example, exactly what type of fish I want. To be honest, I see this as a big drawback to the whole Duolingo-style learning experience, which seems essentially focused around rote learning of a small number of set phrases in the hope that a broader understanding of grammar and vocabulary will follow. I’ve been using Duolingo much longer than three years—I first used it to start revising my knowledge of German back in 2015. When I last visited Germany, though, I was slightly confused to find that after over a year of Duolingo, if anything, I felt less secure in my command of German, less confident in my ability to use it day-to-day. Exactly why I don’t now, but it helped me realise that I can’t just delegate that sort of learning to a question-and-answer app. If I want to progress with my Welsh, I know I’m going to have to find some sort of conversational class.

Passing the 1,000 days milestone made me start wondering if anyone has produced something along the same lines as Duolingo but for computer languages. In some ways it should be a less difficult problem than for natural language learning, because, after all, any nuances of meaning are less ambiguous. I lose track of the number of times Duolingo marks me down because I enter an English answer which means the same as the accepted answer but uses some other synonym or has a slightly different word order. With a coding language, if you have your requirements and the output meets them, your answer is definitely right. In theory it shouldn’t be too hard to create a Duolingo-alike thing but with this sort of question:

Given a List<Uri> called uris, return a list of the Uris whose hostnames end in .com in alphabetical order.

  1. uris.Select(u => u.Host).Where(h => h.EndsWith(".com")).OrderBy();
  2. uris.Where(u => u != null && u.Host.EndsWith(".com")).OrderBy(u => u.AboluteUri).ToList();
  3. uris.SelectMany(u => u.Where(Host.EndsWith(".com"))).ToList().Sort();

The answer, by the way, is 2. Please do write in if I’ve made any mistakes by being brave enough to write this off the top of my head; writing wrong-but-plausible-looking code is harder than you think. Moreover, I know the other two answers contain a host of errors and wouldn’t even compile, just as the wrong answers in Duolingo often contain major errors in grammar and vocabulary.

Clearly, you could do something like this, and you could memorise a whole set of “cheat sheets” of different coding fragments that fit various different circumstances. Would you, though, be able to write decent, efficient, and most importantly well-understood code this way? Would you understand exactly the difference between the OrderBy() call in the correct answer, and the Sort() call in answer three?* I suspect the answer to these questions is probably no.

Is that necessarily a bad thing, though? It’s possibly the level that junior developers often work at, and we accept that that’s just a necessary phrase of their career. Most developers start their careers knowing a small range of things, and they start out by plugging those things together and then sorting the bugs out. As they learn and grow they learn more, they fit things together better, they start writing more original code and slowly they become fluent in writing efficient, clean and idiomatic code from scratch. It’s a good parallel to the learner of a natural language, learning how to put phrases together, learning the grammar for doing so and the idioms of casual conversation, until finally they are fluent.

I realise Duolingo is only an early low-level step in my language-learning. It’s never going to be the whole thing; I doubt it would even get you to GCSE level on its own. As a foundational step, though, it might be a very helpful one. One day maybe I’ll be fluent in Welsh or German just as it’s taken me a few years to become fully fluent in C#. I know, though, it’s going to take much more than Duolingo to get me there.

* The call in answer 2 is a LINQ method which does not modify its source but instead returns a new enumeration containing the sorted data. The call in answer 3 modifies the list in-place.

Pretentiousness?

Or, the etiquette of language

It’s been quiet on here over the past week. Other things have been keeping me busy: work, trying to sort things out for The Mother, and various other aspects of life. With all of those things to deal with, I didn’t really have time to write any well-written and properly-researched blog posts. Or, indeed, any regular ones.

I started to draft a “Readers Letters” blogpost, but was slightly wary the answers would go out of date before the post was written. When I restarted this blog last year, I went spent a few weeks of evenings going through posts from 2006 and 2007 editing out some of the things that were just a bit too in-joke and just a bit too personal and painful.* I don’t want to have to write something one week and then edit it the following week because things have changed once more.

Something has been on my mind, though, when writing the recent posts about Welsh railway history. What’s the best way to refer to Welsh place-names?

Back when I was a student, I had to write essays about the Outer Hebrides, and standard practice even then was that you would refer to place names with the current official native-language form, even if that caused confusion with the earlier literature. So, in archaeological texts,** the Callanish stone circle is now Calanais; Dun Carloway is Dun Charlabhaigh. In North West Wales, too, things are nice and straightforward. You don’t see people nowadays referring to Portmadoc or Dolgelly when they are talking about Porthmadog and Dolgellau. The main exception, to be frank, is where railway histories take the line of “we’re going to use the HISTORICALLY APPROPRIATE NAME because that’s what the railways did,” as a thin cover for being unhappy about the idea of historical change.

With South Wales, though, it’s a different matter. There are really two issues here. Firstly, in the north-west we’re mostly talking about differences in spelling. In the south, there’s a much bigger number of radical differences in name: Casnewydd/Newport, Abertawe/Swansea, Casgwent/Chepstow to give just a handful of examples. Secondly, although the proportion of Welsh-speakers in the area is slowly increasing, the majority language of the south-east is still definitely English.

Because of this, it feels a little bit, well, pretentious to use phrases like “Casnewydd/Newport” as I have been trying to do in the recent history posts. Moreover it can be difficult to find Welsh names to use for some locations: Rogerstone is known in Welsh as Tŷ Du, but Pye Corner doesn’t seem to have a Welsh name that I’ve been able to discover.*** It’s easily for me to accidentally omit things, too: strictly speaking “Bassaleg” should be “Basaleg” but I tend to forget the latter and it’s hardly used locally other than at the sign as you enter the village. “Risca” should be “Rhisga”.

Switching solely to Welsh would make my posts harder to understand, if you’re not already aware of the Welsh names of places, given that they’re virtually completely in English. However, although combined forms like “Caerffili/Caerphilly” might be clunky to write and clunky to read, they do act as a constant reminder that Wales does have its own language and that English is a relatively modern incomer to most of the country. Would it be best, in the long run, to stick to them? Should I use them only the first time I mention a place? Or how about one in brackets after the other, like “Casnewydd (Newport)” or vice-versa?

In short, I’m not really sure the best way to go on this, editorially. Does anyone have any opinions or suggestions to add? If nothing else, I can include it in my Readers’ Letters.

* Although for some reason I kept some of the most personal and painful ones.

** It’s been so long since I graduated I don’t think I need to specify “modern archaeological texts” any more.

*** I did however find some 19th century journalism calling it “Pie Corner”.