Search Results (24 posts found):
After a few months of not looking at it, I've recently been working on making a few old-school improvements to Barkout, namely a continue code-style save game mechanism, and a new power up in the form of a multi-ball bonus, common in most other Arkanoid clones.
Above, the multi-ball powerup in action.
Below, using the Continue screen to enter a code.
The purpose of Barkout all along has simply been to get some practice in C programming. Initially, it was so I could help a family member who had started a C programming course at university, but it then evolved into doing it just because I enjoyed it. C is a great language to program in. It's also just a nostalgia trip for me; trying to program the sorts of games that I played on my first computer in the 80s: an Amstrad CPC6128.
Anyway, the fruit of my effort is that Barkout version 1.2.0 has now been released and can be found by following the "Free Games!" icon in the top menu.
I've just started a little C programming project in order to improve my C programming and, indeed, to see if I'm actually clever enough to write something in C. The project I've chosen is a little ID3 tag editor for MP3 files.
I've chosen this because it might be useful and because it involves something I quite enjoy, which is parsing files. It's also the sort of project that doesn't need a GUI but can later be extended to have one.
I chose C because, as stated earlier, I wanted to prove to myself that I can do it and because it's a great language for byte level manipulation of the sort required to parse a binary file like an MP3.
MP3 files support two types of ID3 tag, these being version 1 and version 2 (of which there are 4 types). ID3v1 tags reside at the end of the mp3 file and are limited in length to 128 total bytes: 3 for the keyword "TAG", 30 each for the title, artist and album, 4 for the year, and then either 28 or 30 for a comment, and, if using a 28 byte comment, 2 for the track number, and finally 1 byte for the genre.
ID3v1 tags are therefore trivial to manipulate.
ID3v2 moved the tags to the start of the file and introduced the concept of separate frames of data, each to store one tag and its value.
The ID3v2 header starts with the values "ID3" (0x49 0x44 0x43 in hex) followed by the minor version number (0x03 for ID3v2.3, 0x04 for ID3v2.4, etc) and then the build number (usually 0), a byte for flags related to the ID3 tagss, and finally four bytes for the overall ID3 header size. Thus an ID3v2 header can be identified by looking like this:
49 44 33 vv vv ff xx xx xx xx
Where vv are the version bytes, ff is the flags, and xx xx xx xx is the big-endian header size.
When I first started writing the decoding function for the ID3 header I was reading the number of bytes as dictated by the xx xx xx xx in the header, but found I was reading well beyond the end of the header itself, causing all sorts of problems. This led me to a google search where I discovered the concept of "Sync-Safe Integers".
These sync-safe integers are not a universal computing concept, but rather one created purely for MP3 encoding, it seems. And this is where sychronisation safe integers come in.
In order for those four bytes indicating header size to not be confused for later bytes that are used to synchronise data frames they cannot contain the values "FF 00" and the way to do this is to ensure that no bytes not intended for syncronisation contain the value FF unless always guaranteed to be followed by a non-zero value, such as the byte order marker FF FE.
To do this, we insert a zero at bit 8 (the left-most bit, and most-significant bit) of each byte, working from least to most significant, and shift the rest of the bytes accordingly:
Thus the value:
00000001 00000110 00010100 11000001
becomes
00001000 00011000 00101000 01000001
This has the side-effect of reducing the capacity of our integer from being 32 bits to being 28 bits, but in the context of ID3 tags that limitation is irrelevant.
For my own program, I achieved this shift by using a bit mask to take each group of bits I want to operate on in turn, applying the mask as a bitwise AND to the integer, and then shifting the requisite number of positions to the right.
I then bitwise ORed the results together:
return ((in & 0x0000007F) |bit mask %00000000 00000000 00000000 01111111
((in & 0x00003F80) << 1) |bit mask %00000000 00000000 00111111 10000000
((in & 0x001FC000) << 2) |bit mask %00000000 00011111 11000000 00000000
((in & 0x0FE00000) << 3));bit mask %00001111 11100000 00000000 00000000
g a sync-safe integer from a regular integer.
The decoding sequence is just the reverse:
return ((in & 0x0000007F) | // bit mask %00000000 00000000 00000000 01111111
((in & 0x00007F00) >> 1) |bit mask %00000000 00000000 01111111 00000000
((in & 0x007F0000) >> 2) |bit mask %00000000 01111111 00000000 00000000
((in & 0x7F000000) >> 3)); // bit mask %01111111 00000000 00000000 00000000
In both cases, the ORed instructions are independent of each other in the sense that each has its bitmask applied and is shifted BEFORE all four results are ORed together.
And using this approach I was able to now correctly identify the length of the ID3 tags. Note, this value includes any padding at the end of the tags and before the audio data.
So that's sync safe integers - something you'll never encounter outside the realms of writing a decoder for ID3 tags.
I've recently had the misfortune of having to integrate web-based payment software with Visa's Cybersource REST API using their Microforms integration. Unfortunately, the documentation is somewhat lacking and support is virtually non-existent.
Fortunately I'm a tenacious thing and with much trial and error managed to get it working. I'm posting this information here in the hope it saves someone else the hair-tearing it cost me.
First, let me explain what Microforms are: they are iframes hosted at Cybersource themselves but embedded on your site to collect the sensitive credit card data without you having to worry about PCI compliance. You request a "Server Side Capture Context" from the API and use this to initialise a javascript object which creates the fields on your page. When the data has been entered, a token is requested that contains the encrypted card data and then when all user processing has been completed, this can be sent on to Cybersource to confirm the payment.
The first step was to get an account on their Sandbox at
https://developer.cybersource.com/hello-world/sandbox.html
Even this step was painful, as my first five attempts at registration failed to send me a confirmation email with my account credentials, so I was unable to log in. And yes, I did check spam. Eventually, though, I did get an email and was able to log in and create a Shared Key.
The next problem I had was that the instructions for how to create the authentication header for messages to the API were vague, contradictory and incomplete. The documentation says that the message data need only contains a targetOrigins property, thus:
{ "targetOrigins": &["http://localhost"&] }
Only this isn't the case. If you only send this you get an error back from the API. It turns out you also need to request the fields you want to display in the microform too:
{
"fields\": {
"paymentInformation": {
"card": {
"number": { },
"securityCode": {
"required": false
}
}
}
},
"targetOrigins": &["https://localhost"&]
}
So that's the payload sorted out, now for the hard part: the Authentication header.
Cybersource gives you the choice of a JWT certificate or an HTTP signature. I'm using the latter because it seemed easier to set up. The signature is a hashed copy of all the headers being included in the message and a few additional bits. Deciding exactly what to include took me ages as when it didn't work there was no indication of what part I'd got wrong: the header, the signature, the payload, or something else? For brevity, I'm going to just post the PHP code that got this working (with my login credentials replaced, of course):
<?php
$url = 'https://apitest.cybersource.com/microform/v2/sessions';
$merchantId = 'testres';
$keyId = '08c94330-f618-42a3-b09d-e1e43be5efda';
$sharedKey = 'yBJxy6LjM2TmcPGu+GaJrHtkke25fPpUX+UY6/L/1tE=';
$host = 'apitest.cybersource.com';
$data =
"{
\"fields\": {
\"paymentInformation\": {
\"card\": {
\"number\": { },
\"securityCode\": {
\"required\": false
}
}
}
},
\"targetOrigins\": &[\"https://localhost\"&]
}
";
$hash = hash("sha256", $data, true);
$digest = base64_encode($hash);
$date = date("D, d M Y G:i:s")." GMT";
$sigstring = "host: apitest.cybersource.com\ndate: $date\n(request-target): post /microform/v2/sessions\ndigest: SHA-256=$digest\nv-c-merchant-id: $merchantId";
$sigstringbytes = utf8_encode($sigstring);
echo "$sigstring\n";
$rawkey = base64_decode($sharedKey);
$hashval = hash_hmac("sha256", $sigstringbytes, $rawkey, true);
$sighash = base64_encode($hashval);
$headers = array(
"Accept-Language: en-GB,en;q=0.5",
"Accept-Encoding: gzip, deflate, br",
"digest: SHA-256=".$digest,
"v-c-merchant-id: ".$merchantId,
"v-c-date: ".$date,
"date: ".$date,
"signature: keyid=\"".$keyId."\", algorithm=\"HmacSHA256\", headers=\"host date (request-target) digest v-c-merchant-id\", signature=\"".$sighash."\"",
"host: apitest.cybersource.com",
"Content-Type: application/json"
);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
//curl_setopt($curl, CURLOPT_PROXY, "127.0.0.1:8888"); // Uncomment to see traffic in a traffic analyser like Fiddler
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$resp = curl_exec($curl);
curl_close($curl);
echo $resp."\n";
?>
The tricky part was working out which headers to include and in what order. The headers here are all necessary (in my experience) to get anything other than a 401 error back from the API.
The digest is easy: it's just a base64 encoded version of a SHA256 hash of the packet data (the JSON request).
The order of the headers in the signature is also crucial, it would seem. Once all of this is set up correctly, a call to the endpoint should return a capture context in the form of a public key:
header.payload.signature
The whole thing should be passed to the javascript side of things to initialise the Flex() object and create the microform. From there, the card number and CVV (and expiry month and year) can be collected and then either the normal, non-3D Secure, endpoint can be contacted or the Payer Authentication endpoint can be used to perform proper security checks on the card. I'll cover that in the next post.
I'm sure many adult learners have done it: started learning a new language and bought children's books in order to aid with their learning. I've done it. One of the first Welsh books I bought, besides a dictionary, was "Ydw i'n fach?" by Philipp Winterberg.
It's a beautifully illustrated book designed to teach children new adjectives of size, and to teach them that although we may be different, we are all perfect. It's a lovely book.
But it's not suitable for adults. Once you've learned a handful of adjectives for big things, and a handful of adjectives for small things... that's it. It's a trap I'm sure many learners have fallen into: aiming too low. We think our limited vocabulary as learners mean we should buy books aimed at children, but ultimately there's no benefit in this. The vocabularly we need as adults is very different to the vocabulary we need as children, and we need to learn to structure sentences the way adults do. You can't get this from simple, children's picture books.
The next mistake is to realise the first mistake and over-correct by buying books aimed at older children. The problem here is that native-speaking older children, for whom the *subject matter* may be closer to that of an adult, have a vocabulary and comprehension of the target language far better than that of an adult learner.
Where Welsh excels is with its glut of excellent books aimed directly at second-language adult learners of all abilities. There's an excellent range of novels written by a pool of talented authors that address exactly the issues faced by adult learners of a language: that the range of vocabulary is appropriate, the pace of learning is appropriate and the subject matter is appropriate. And generally these books, unlike books aimed at native speakers, include a glossary of new terms at the bottom of each page as well as, often, a complete glossary at the end of the book. Publishers like Gwasg Gomer and Atebol produce books aimed specifically at different levels of learner, with each book marked to show at which level learner it is aimed: mynediad, sylfaen, canolradd, or uwch, so that a learner of any ability can find something to enjoy. Some books, like
Ffenestri by Lois Arnold, contain a collection of short stories and poems broken down into sections with each section aimed at a different target level, so you can stick with the same book as your ability improves!
As one would expect, YouTube has myriad resources for the Welsh learner, ranging from brief clickbait like "An American tries to speak Welsh" to full episodes of educational programmes and everything in between.
The first port of call, really before going any further, is to watch the Welsh Plus series which go into great detail about how to pronounce the letters of the Welsh alphabet, both individually and in common combinations. They also touch on the mutations. Welsh Plus's playlist can be found
here.
When I started learning Welsh, and before I'd discovered the Say Something in Welsh website, I discovered a series of videos called "Learn Welsh with Will" in which Will Huw, an Englishman living in Wales, disseminates his own Welsh knowledge as he goes about learning it. I liked Will's videos as he comes across as non-judgemental and very amiable. You can see Will's playlists, which include more than just Learn Welsh With Will,
here.
Another series of videos I happened upon are aimed at adult learners from the 1990s, Now You're Talking (conveniently mis-spelled as "Now Your Talking" by whomever uploaded them!). These are presented by the likeable Elin Rhys in a variety of very early 90s outfits! There are 36 full half-hour episodes covering a variety of topics and gradually building vocabulary. I enjoy these videos as they present a chance to hear simple conversations in Welsh and learn everyday vocabulary. My only criticisms are that the programmes are now quite dates, the language is in some places a little too old-fashioned, and the pace of the lessons is a little slow for my liking. There's also not a great focus on grammar, so you'll need other resources to accompany these. You can find all 36 videos
here.
Much more recent, are Margaret Hall's wonderful videos. Margaret is a Welsh learner and as part of her learning process she's created a series of videos in which she explores various places in Wales. Margaret speaks very clearly and uses a great vocabulary for the upper-beginner or intermediate Welsh learner. I find I can understand a lot of what she says, but not everything. That's due to limitations in my Welsh, though, not any problems with her speaking. Margaret's channel is
here.
Finally, the Easy Languages series have several videos in Welsh. These are largely conversations with Welsh speakers in towns and establishments around Wales, conducted entirely in Welsh. The videos are subtitled in both English and Welsh, which is both a blessing and a curse, as you can find yourself reading the English subtitles rather than understanding the spoken Welsh. The ease of understanding the spoken Welsh depends largely on the speaker. Some interviewees are fluent speakers, some only beginners, but the most encouraging thing I took from these videos is that, actually, Welsh is very fluid, Welsh speakers are very forgiving of mistakes and, in reality, things like mutations are not nearly as stuck-to as online guides may lead you to believe. You can find those videos
here.
There are plenty more besides, but these are the video series that I've found most useful and most enjoyable while learning Welsh. Feel free to comment if you feel I've missed anything important!
Da bo am y tro!
Ffenestri (Windows), by Lois Arnold, herself a Welsh learner and now an author, is a wonderful collection of stories and poems aimed at adult learners. Arnold cleverly divides the book into graded sections aimed at different levels of learner from mynediad (entry level) to canolradd (intermediate). Each section contains stories and poems on a variety of themes, meaning there's something for everyone here.
There's a real satisfaction the first time you finish reading a piece in a new language, and Lois Arnold makes it easy to be satisfied as everyone should find at least something that's within their ability. The stories and poems start using only the present tense, making them accessible even to those who are quite new to Welsh, and the reader is aided by a glossary of new terms at the bottom of every page. The difficulty level then gradually increases as new words and tenses are introduced. The stories and poems cover myriad subjects from cases of mistaken identity, to muddy festivals, space exploration and quiz nights. And they're not just filler material; each story and poem is a good piece in its own right.
I got great enjoyment from Ffenestri and it's a book I would recommend to anyone just starting out in Welsh. The short nature of the pieces means you don't get bogged down in a long story, and if you happen to pick something a little too difficult you're not stuck with it for the long run. The glossary means you're not constantly referring to a dictionary and thus interrupting your flow and enjoyment of the material.
Sir Lucien (Geoffrey Whitehead) made his name in the 60s as the most brutal of the brutalists. Unfortunately, times have changed and his love of all things concrete means his practice of misfits now only get commissioned to build car parks. Lucien is joined by his loyal-ish employees Matt (Dominic Coleman), Sarah (Ingrid Oliver (series 1), Anna Crilly (series 2)), Tim (Alex Carter) and Hayley (Aisling Bea) as they struggle to stay relevant in the 21st century.
The Architects is a new one for me. I must have missed it during its runs on the radio, and I came to it quite by chance while browing The Internet Archive. There are two series of four episodes plus one pilot. I won't discuss the pilot here as the cast was almost entirely different.
Sir Lucien is a typically Whiteheadian character: pompous, brusk, and verbose and is as enjoyable as any Geoffrey Whitehead incarnation.
Matt is, again, a typical Dominic Coleman character. A fairly likeable everyman, although occasionally prone to showing off his apparent knowledge of the world of architecture, only to have it corrected by someone else. He considers himself something of an architectural genius, but is somewhat deluded.
Sarah, sadly, falls into the trap of being the typical radio comedy token woman. Single, frustrated, and neurotic but clever, usually getting the better of her male counterparts. There's nothing wrong with this per se, but we've seen this character before in Sophie from Think the Unthinkable and Dr Ruth from Rigor Mortis, to name but two.
Tim is a strange one. Half sycophant, half dimwit. There's an undercurrent of dislike between him, Matt and Sarah, and yet there never seems to be any real acrimony towards them. In fact, in later episodes there's a degree of cameraderie between all three, as if the writers forgot what sort of character Tim was supposed to be. Tim starts as an unlikeable brown noser who keeps his distance from Sarah and Matt in order to suck up to Sir Lucien, but later in the show becomes more part of the team. At various times he's shown to be both a socially awkward, stamp collecting, battle re-enacting geek who makes poor attempts to come on to women and at the same time a bit of a ladies' man who has some success with them. He is sometimes shown to be so dim that you wonder how he passed the many years of education needed to become an architect.
For the first couple of episodes I found very little to laugh at, but as it progressed and the characters grew to become more of a team, the jokes also improved and I did find myself chuckling out loud on a number of occasions. The initial problems were that some of the characters didn't know quite who they wanted to be. Hayley, the receptionist, starts off a a bit of a ditz who, apparently, doesn't know that Deutschland and Germany are the same thing, nor that Deutsch and German are the same language, yet later in the series she's shown to be quite smart and easily holds her own in arguments with the architects, particularly Tim. She also seems to have little purpose other than as a foil for the other characters and plays little part in most of the plots, which might explain why she's quietly dropped in series 2, her absence explained as her being in prison.
I think the other problem with the program is the limited story lines you can do around an architectural firm. The setting of an architectural practice limits the potential situations in a way that the superficially similar Think The Unthinkable managed to avoid. Most of the plots revolve around the firm trying and failing to secure commissions for various architectural projects, from airports to renovating houses and restaurants. A lot of what that they do seems to border on interior design, rather than architecture, but I suppose purely architectural themed storylines were more limiting still.
And I suppose that's a good summary. It's a decent comedy that grows on you, but is never quite sure what it's trying to be.
I'll probably find myself listening to it all over again at some point, but I won't be hurrying to do so.
Rating: * * *
I admit, I've been a bit remiss in both updating this site and in learning Welsh.
The problem is finding the time.
A while ago, back in July, I lost my DuoLingo streak of more than two years and with it any incentive to keep up with my DuoLingo practice.
I suppose that's the problem with DuoLingo: once the addiction of keeping your streak going wears off, and if you've already completed the language tree, there's not much to keep you going back, as it's all just more of the same.
I could have carried on with Say Something In Welsh, but again it's finding the time. I used to do it while driving, but I generally prefer to listen to radio comedy these days, so my Welsh gets neglected.
And I know my Welsh is suffering for it, as I keep encountering words that I know I know, but of which I can suddenly no longer remember the meaning.
I need to make more of an effort. I'll keep you posted!
I've realised that this blog has strayed somewhat from my original aim of it being about my journey of learning Welsh, and more just my opinion on various language-related things.
So, in a return to its true purpose, this post is a review of the book "Yn Ei Gwsg" (In His Sleep) by Bethan Gwanas.
Dafydd walks in his sleep. It's part of the reason, he suspects, for the breakup of his marriage and it gets him into all sorts of odd situations with his neighbours. One morning, however, it takes a more sinister turn when he wakes up covered in blood - not his own - and sets off with his faithful dog Wmffra to follow the bloody footprints to find out to whom the blood belongs.
The book is not nearly as dark as that synopsis makes it sound. It's actually very light-hearted, humorous and a touch sad in places. Bethan Gwanas writes novels for native Welsh speakers as well as learners, and I think that helps her keep this novel simple yet clearly aimed at adults. The language used has clearly been thought about so that the level remains suitable for the target audience, yet also shows a progression from start to finish and introduces new words and phrases.
I really enjoyed reading it. Unusually for me, I found I could hardly put it down. I think this was partly because it was genuinely an enjoyable story, and partly because the level was pretty much spot-on for my ability (this is set as Lefel Sylfaen) so I found I was able to read straight through most pages without having to resort to a dictionary (the glossary of new terms at the bottom of each page, as is common for Welsh-for-adults books, helps enormously). The language used is more northern in style, but I didn't find this a hindrance at all - in fact it helped to cement some knowledge of northern dialect that I'm bound to encounter in the wild anyway.
The last book I read before this was "Ffenestri" by Lois Arnold. If you've read up to the end of the Sylfaen level in that, you shouldn't have any problems with this and I'd recommend it as not only a good book for learners, but a good read in its own right.
If you're spending more time at home at the moment than perhaps you'd like, one of the ways to avoid going mad and to use the time productively is to learn a skill. Learn to paint, learn photography, learn an instrument, or... learn a language!
With so many resources for so many languages available online for free, now is a great time to start learning whatever language takes your fancy.
Obviously I would suggest Welsh, but learning any language is fun and often helps improve your understanding and appreciation of your own, native language.
So... if you're bored being at home and need something to do, that's my suggestion.
DuoLingo have just added Scottish Gaelic to their list of languages and, as someone who has lived on the Isle of Lewis where you can still hear the language spoken, I'm quite tempted to learn it.
But I won't. Not because I don't want to; I'd be fascinated to start understanding some of what I saw and heard while I was in the Outer Hebrides, but because I think I have my hands full with Welsh. Plus if I learnt every language that appealed to me I'd be learning almost every language available (with the exception of silly made-for-TV languages like High Valyrian and Klingon).
Still, it's great news to see a growing interest in another of the UK's indigenous language. It's important we keep our native languages alive for future generations. It's a part of our history, after all, and brings with it a rich cultural history.
Mae'n amser eisteddfod ar lein eto!
It's online eisteddfod time again!
Every year, alternating between locations in the North and South of Wales, is the National Eisteddfod (Eisteddfod Gynedlaethol), a celebration of Welsh language, music and culture with bands, singers, poets authors and more besides.
And every year, SaySomethingInWelsh.com runs an "Online Eisteddfod" for members and non-members to practice their Welsh by speaking, writing or singing reviews, poems, songs and prose that they've written. The entries are judged and a winner chosen for each category.
I really enjoy the online Eisteddfod. It gives me a chance to practice my Welsh and enjoy what others have created with theirs.
Last year I was the only entrant for the Beginner Prose category, so of course I won by default. This year I have entered the Englyn Milwr (a short, three line poem on a given theme) and the Post-Beginner Prose. I'm not sure my Welsh is really good enough for post beginner, but I didn't want to run the risk of being the only entrant for the beginner category again!
Entries close on 2019-11-14 and voting takes place the following week. Let's see how I do. Fingers crossed...!
Alongside Welsh, I have also been brushing up on my GCSE French and hoping to improve my German (although I've already given up on this).
These languages have highlighted two more things I like about Welsh and that I think make it an easier language for the beginner:
1. The present continuous (I am going; I am doing; We are sailing (across the sea...))
In English, we have this periphrastic construction for the continuous tense that involves using "to be" as an auxilliary verb. This construction is alien to other European languages who simply use the present tense form of whatever verb, for example "to go", to indicate all three of the following ideas:
I go
I am going
I do go
In French, all three are "je vais". On the DuoLingo forum you see beginners in non-Welsh languages ask "Where is "am" in this sentence?" or asking "Why is it not 'Je suis vais'?".
Welsh, similarly to English, also forms the present tense periphrastically with "bod" (to be), almost in the opposite way to French by including the auxilliary where in English it *wouldn't* be needed:
Dw i'n mynd (literally "Am I going")
is
I am going
I go
I do go
and I think that inclusion of "am" (dw, in this case) is a more familiar construct to the English speaker, despite the reverse word order.
2. The same pronouns are used for both the nominative and accusative case.
What I mean by this is that "he" and "him" are both the same word, as are "She" and "her" (although not "her" the possessive pronoun), and "We" and "us".
For example:
Maen nhw'n mwynhau'r ddrama (they enjoy the play) - Nominative
Uses the same pronoun as:
Paid ag anghofio nhw! (don't forget them!) - Accusative
In French, "them" can be "ils" or "elles" or even "eux" in the nominative and "les" in the accusative.
The more Welsh I learn, the more I think it's a lot easier than people give it credit for. That said, it's not without its own strange constructs!
Last month, I completed the Welsh tree on DuoLingo. By "completed" I mean that I got all of the units up to at least level 2. That means I've covered material up to and including Canolradd level. I should be practically fluent by now, right?
Errr, no. I'm doing OK reading through my Welsh short stories book ("Ffenestri", by Lois Arnold - I highly recommend it) and I'm understanding more on Radio Cymru each time, but I just don't get enough chances to speak for my brain to engage quickly enough when I need to put a sentence together.
That said, DuoLingo has definitely helped broaden my vocabulary, and I'm often surprised by the sorts of sentences I can put together, but I don't think DuoLingo alone can get you fluency. For that, much more exposure to the spoken language and the way people speak it is needed.
I've started making it part of my morning routine to listen to the BBC's Welsh language offering, Radio Cymru, on the way to work. I don't listen for very long, only the 20 minute drive to work, but the idea is that it gets me used to hearing the language and its rhythms and tempo.
And I don't really understand very much of it. I can pick out quite a few words, but not enough to understand whole sentences, although I do have one complete sentence under my belt from the breakfast show one morning: "Mae'r plant yn hoffi y ceffyl, a'r ceffyl yn hoffi'r plant" (the children like the horse, and the horse likes the children). I can just about follow the weather, and if I know some of the topics already, I can understand a little of the news.
Hopefully as time goes on, and in conjunction with my other practices, I'll start to understand more. What's important to remember, and what another learner pointed out, is that Radio Cymru is aimed at *native* speakers; not learners, so being able to understand any of it is a bonus.
Following my first tuning-in, I tweeted that I'd started listening and got a reply and some likes from Radio Cymru presenters, which was encouraging. The reply simply said "Dal ati!" (keep at it). I intend to.
Ok, so it's been about seven months since I started learning Welsh in earnest, and he's what I think is hard and what I think is fairly easy about Welsh:
1. Mutations. Letters change at the start of one word depending on what word they follow. However I'm finding that this starts to feel more natural in most circumstances after a while.
2. Versions of "about" and "of/from" for each pronoun. If you're talking about a thing, they're "am" and "o" respectively. But if you're talking about/from me, you, her, him, us or them you're looking at "amdana, amdanat, amdani, amdano, amdanon and amdanyn" and "ohono, ohonot, ohoni, ohono, ohonon and ohonyn"!
3. The letter "Ll". Yes, it counts as one letter. The pronunciation is somewhere between ell and hissing like an angry goose with a headache. For some reason I find it easier to pronounce at the start of a word, like Llawr, than in the middle or end of a word, like Arall or Galla.
4. Conjugations. Well, this is the same for any language, really. Remembering the conjugations of short-form verbs is just one of those things you have to get used to.
5. Yes and no. There are no words for Yes and No in Welsh, you just repeat back (or negate) the appropriate conjugation of the verb in the question. "Do you like cheese?", "I do". "Are you tired?" "I am". "Are you reading?" "I am not". But that's only in the present tense. In the past tense it's usually "Do" for yes and "Naddo" for no. But then for emphatic questions it's "Ie" for yes and "Nage" for no. If the question was asking if there is something with you (see below) you reply with Oes or Nag Oes. Remembering which to use is the hard part.
6. There aren't many words that are similar to other European languages. There are some, mostly more modern words borrowed from English: tacsi, parcio, ffatri, ffôn, beic, etc; and some ecclesiastical words like eglwys (church) and capel (chapel) but not to the extent that you find with Romance or Germanic languages.
Things that are easier than I expected:
1. Mutations. Yes, they're difficult, but actually you get used to them, and in many cases the rules are quite consistent. You just get used to dropping the G in words like gweithio and gweld when they follow a sentence subject. You get used to changing D to Dd in adjectives after "yn", and you get very used to nasal mutations after "fy".
2. Conjugations. Although remembering them is difficult, many of the conjugations are quite consistent and actually fit in quite well with the pronoun they go with.
3. Possession. I've said before about there being no form of "I have a (something)" in Welsh, they instead say something is "with them": Mae ci gyda fi - "There is a dog with me". I got the hang of this much quicker than I thought. I think you just change your way of thinking and everything slots together.
4. The language as a whole. I'm only a beginner. Very much so. But I've been surprised at how much I've covered in such a short space of time. I'm not proficient by any stretch of the imagination, and I can only string together fairly simple sentences, but on the other hand I can make many more types of sentences in Welsh than my partner's daughter can in Spanish; a language she's been learning at school for two years now. I can use the present tense, the past perfect, a sort of imperfect, the future in several forms and some conditional tenses and even a kind of limited subjunctive mood.
On the whole, Welsh has (so far) been easier than I expected. It's not the incomprehensible jumble of letters it always looked like on road signs when we used to visit my Grandma in Rhossili when I was a child. In fact, in many ways it's a lot easier than the languages I'd been taught at school.
This is something I've started feeling quite strongly about lately, although I admit I'm partial to a bit of bias given my current enthusiasm for Cymraeg, but...
...why don't we teach Welsh as a second language in England? I say England because in Scotland and Northern Ireland they already have native languages that should be taught, but England does not.
I know some people will think, "Are you mad?!" but hear me out; my reasoning is sound:
1. Many children are more likely to visit Wales than Germany. German is taught in many British schools, yet British tourists to Germany number around 2 million per year compared to 10 million in Wales (2015 figure). This means more chance to practice a language learnt in school.
2. Welsh is the language of these islands. English people may not appreciate this, but our ancestors spoke something similar to Welsh. Before the Romans, Saxons and then Normans invaded, the native languages of these islands were the Brythonic languages, of these Welsh is the one currently in the healthiest state. Learning Welsh is a link to our past, even as Englishmen.
3. Learning any language has benefits beyond just that language. Learning one language helps a child understand other languages and their own language much better. There is nothing to be lost by learning Welsh and much to be gained.
4. Welsh is different. Welsh is not like French, German or Spanish; the languages children usually learn in school. The structure is different and it borrows little from Romance or Germanic languages. Learning Welsh gives children a different perspective on language learning yet remains relevant as it's spoken as a living language by 700,000 people and is an official language of the UK, unlike Cantonese, Mandarin or Satsuma ;)
5. Welsh is easy. Well, sort of. As I've covered previously, simple Welsh sentences in the past, present and future tenses can involve very little conjugation beyond the verb "bod" (to be). This makes progress fast and enthuses children to learn. Why spend two years mastering present tense conjugations in French when you can learn the same sentences in Welsh in a fraction of the time?
Not everyone will agree with me. I know the counter argument will be "but more people speak language X than speak Welsh!" or the usual "Welsh is a dead language! What's the point?!". But Welsh is growing. By teaching it as a second language it will grow more and these questions will answer themselves.
On Saturday I was crossing the Second Severn Crossing into Wales and, of course, I stopped at the toll booth to pay the crossing toll. The man operating the booth greeted me with a fairly cheery, "Hello" and I replied likewise, paid, thanked him and drove off. As we left, Lulu said, "Why didn't you say thank you in Welsh?" and I replied "Because I didn't know if he spoke Welsh".
I know I've mentioned this previously, but it still strikes me as odd. I'm entering Wales, but I can't guarantee that the (presumably) Welshman I'm talking to can speak the language of his nation. Later in the supermarket, the same thing. The (very clearly) Welsh lady greeted me, we had a chat about the weather and Cardiff in general, I thanked her and I left. Again, it would have been great to practice a bit of Welsh with her, even a "S'mae!" or "Prynhawn da", but again I couldn't be sure that she'd be able to speak Welsh.
Funnily enough I'd have been more confident that younger people spoke the language than older people, due to the push that's been made in recent years with teaching it in schools and some schools being entirely Welsh medium. This is in contrast to other indiginous languages of the UK, such as Scottish Gaelic, where the vast majority of speakers are older people and the languages are, quite literally, dying out.
The Welsh government is pushing for 1,000,000 Welsh speakers by 2050, and DuoLingo reports more users than that learning Welsh now, although I don't know how many live in the UK, so hopefully it won't be too long before I can know beforehand that it's safe to speak Welsh to a Welshman in Wales!
Sometimes I see people on the DuoLingo forums say that they ultimately want to become fluent in the language they're studying. That strikes me as a lofty ambition.
For someone living in the country of the language they're learning, fluency as a goal makes sense, and in my opinion is probably achievable. Most language learners and teachers agree that the best way to become fluent is to immerse oneself in the language, and the best way to do that is by living in a country where it's spoken.
For someone not living in a country where their language is spoken, fluency must surely be much harder to achieve. Independent study, including reading and watching television programmes in the target language, can increase proficiency (I can't imagine there's such a thing as bad exposure to a language) but ultimately the way to fluency is to hear native speakers. Language, after all, is defined by its use as much as its rules. Language learning with no exposure to its actual use can, however, lead to the sort of hilarity found in the classic
English As She Is Spoke.
I think goals need to be achievable and realistic in order to avoid discouragement. It's better to set a low bar, reach it, and then move on to the next target with a sense of acheivement than to reach too high and become discouraged at an apparent lack of success.
My goal with Welsh is definitely not to become fluent. Not at the moment, anyway. I don't think I'd stand a chance without being surrounded by Welsh speakers and using it every day. My aim is simply to be good enough to understand all the Welsh signs when I'm visiting Wales, to be able to conduct a simple transaction in a shop (actually I'm not that far off, if all I want is a coffee!) and to be able to read novels aimed at learners.
If you're learning a language, one of the best ways to gain exposure to that language and increase fluency is to visit a country where that language is spoken.
Herein lies the problem with Welsh: not all Welsh people speak it. They all speak English, but only around 20% of the population speaks Welsh. This means that if I'm in Wales, I can't initiate a conversation in Welsh because I can't guarantee that the other person will be a Welsh speaker.
Such a situation, where a native does not speak the native language, would be inconceivable in most other countries.
The fact that there are no monoglot Welsh speakers remaining also doesn't help. Because everyone speaks English fluently there's less incentive to make the effort to learn and speak Welsh.
Then there's the problem with signage. In France, other than at some touristy areas, all signs are in French. Signs alerting me to the "dèrniere sortie avant péage" will do so only in French. Translating and understanding the signs becomes part of the learning experience. Unfortunately, in Wales most signs are bilingual. The order of the languages is left to the discretion of the local authority, but an English translation will be on the sign somewhere. On the one hand, this allows you to quickly confirm that your translation of the Welsh was correct. On the other, it takes a lot of the fun and the necessity out of translating in the first place. It's very hard not to notice the English accidentally before you've had chance to attempt the Welsh.
What I have discovered, to my surprise and delight, is that several of my colleagues speak varying levels of Welsh. Remember, this is Somerset, England, not the north of Wales, so it's not entirely expected. One even speaks fluent Welsh, having attended a Welsh medium school. And he's said he's always happy to help with my Welsh learning.
So things are looking up.
One of the more daunting things about Welsh which is common to all the Celtic languages is the concept of mutations: consonants that change to a different letter, or even group of letters, depending on context.
As an English speaker and someone who has learnt German and French in the past, this is a truly alien concept. German may have given us some pretty monstrous words, but at least they're always spelt the same way whenever you encounter them. The French may be sloppy when pronouncing the ends of their words, but at least the beginnings don't go changing.
In Welsh, however, certain initial consonants of words change to other consonants. This is a mutation, and exists in all the Celtic languages of the British Isles in various forms. Welsh has three types of mutation: soft, nasal and aspirate (which I won't go into here). The most common of these is the soft mutation. What this means, in practical terms, is that in certain circumstances the following letter changes occur at the start of a word:
c becomes g
p becomes b
t becomes d
d becomes dd
b and m become f
ll becomes l
rh becomes r
and g vanishes entirely!
One of the occasions these mutations occur is when a singular feminine noun follows the definite article "Y". So "cath" (a cat) becomes "y gath" (the cat). "Mam" (Mother) becomes "y fam" (the Mother). And so on. This change also occurs when we are going "from" or "to" somewhere. If we go "to Wales", for example, it's "i Gymru" with the usual C replaced by a G. I'm still getting accustomed to the various reasons for the soft mutation, and there are lots of them.
Then we have the nasal mutation. This is much less common, and comprises the following consonant changes, which I had to look up because they're not all yet very natural to me:
p -> mh
t -> nh
c -> ngh
b -> m
d -> n
g -> ng
I've principally encountered this mutation when saying I am "in" somewhere. As with the Cymru -> Gymru change above when we go to Wales, we change C to Ngh when we are in Wales. So one can like Cymru, go to Gymru, but be in Nghymru... argh! Still, all languages have their quirks, and the world would be a very boring place without these differences.
The purpose of mutations, so I've been led to believe, is to improve the flow of the language. I kind of buy that. Kind of. I can see that the words trip off the tongue a little better in the case of the nasal mutation ("my car" would be "fy car" ("vuh car") without the change but becomes "fy nghar" ("vunghar") with it), but I can't really see how abitrary changes to feminine singular nouns help the flow.
Still, it is what it is, and it's all part of language's rich tapestry!
The first tense I'm learning in Welsh is the present tense. When I started learning Welsh I held the opinion that it was a difficult language full of complicated constructs that I'd struggle to learn compared to French, Spanish or German.
Turns out I was wrong. Forming the present tense in modern colloquial Welsh (literary Welsh is quite different) is probably the easiest of any language I've learnt. The reason is thus: all simple present tense sentences involve conjugation of the same verb, "bod" (to be) followed by your action verb in its infinitive form (called a verb-noun, in Welsh).
So, where in French you'd need to know the first person singular and plural, second person singular and plural, and third person singular and plural forms of every verb you want to use, in Welsh you need only know the various conjugations of bod and the infinitive form of the other verb.
"I am swimming" is "Dw i'n nofio", where "dw" is the form of bod and nofio is to swim.
"He is swimming" is "Mae e'n nofio". "She is swimming" is "Mae hi'n nofio".
"I am eating" is "Dw i'n bwyta". "He is eating" is "Mae e'n bwyta".
And I really love this about Welsh. Forming a whole range of new sentences only involves learning one form of each new verb. It's so wonderfully consistent, and it lets you feel you're making progress almost instantly.
Five months or so ago, I embarked on a language learning adventure. I decided to learn Welsh. I'm not Welsh, I don't live in Wales, and I'm not planning on moving to Wales any time soon. Not that Wales isn't a lovely place, but it's not currently part of my plans.
It started as a bit of a joke. My partner's daughter, Lulu, started at Cardiff University last autumn and has the option of taking free Welsh lessons as part of her course. She scoffed at the idea, "Everyone speaks English! Why would I need to learn Welsh?". I explained that it might not be necessary, but why not take advantage of a free route to learning another language, but to no avail.
I can't say I blame her; I'd always been dismissive of the minority languages of the United Kingdom: Welsh, Gaelic, Cornish. They're dying out, aren't they?
Well, yes and no. Cornish is down to just a few scores of speakers and Gaelic has only around 50,000. But Welsh is a bit different. Welsh is still used. And it's still used by young people, for some of whom it's both a native and a first language. In fact, following a decline in the first half of the 20th century, Welsh is actually thriving somewhat, with the aim set by the Welsh Assembly to get one million speakers by 2050.
So back to Lulu. Every time we spoke following her enrollment at university I would ask her "Learning Welsh yet?" and every time she'd say "no", getting increasingly fed up with me asking, until one day she snapped, "If you love Welsh so much, why don't you bloody learn it?!". I saw that as a challenge and tentatively started looking for resources online.
My first port of call was Babbel, which I'd used in an aborted attempt to learn Spanish before, but alas they offer no Welsh course. I then found some excellent YouTube videos from WelshPlus, but they focussed entirely on familiarisation with the Welsh alphabet and pronunciation. Then someone suggested DuoLingo. DuoLingo courses are run by volunteers, who use the DuoLingo platform tools to create content to teach others. And DuoLingo has a Welsh course. And it's free. I signed up and dived into Cymraeg!
So, I'm now a Welsh learner, or Dysgwr Cymraeg, and I intend to chart my Welsh odyssey here.
Welsh, like most European languages, assigns nouns a gender. Some of these are obvious: a man (dyn) is masculine. A woman (menyw or dynes) is feminine. A cat (cath) is feminine. A dog (ci) is masculine. Well, that makes sense to me, at least.
But what's a table? Or a bed? Or love?
And how do we differentiate between them? And how do we learn the gender of a new object?
Well, in other European languages you can tell whether a noun is masculine or feminine by the article in front of it. In French, we have the indefinite articles "un" and "une" and the definite articles "le" and "la". When you learn a new word you also learn the gender. While on holiday in Paris in 2003 I asked "Qu'est-ce que c'est?" while holder up a token to use the toilet in a bar, and I got the answer "un jeton". Un. Masculine. And I've never forgotten that a token, in French, is masculine: "un jeton".
So what about Welsh? Welsh doesn't have an indefinite article at all. There is no way of saying "a table" or "an apple", it's just "bwrdd" and "afal". There IS a definite article ("the table" or "the apple") and it has three forms:
Y for words following and preceding a consonant
Yr for words preceding a vowel, but following a consonant
'r for words following a vowel (regardless of what follows it)
Sadly, none of these differentiate by gender, so it's almost impossible when learning a new word as part of conversation or when reading to tell whether it's masculine or feminine. And it's this that is, so far, the most frustrating thing about learning Welsh. I find myself looking up words that I already know just to determine their gender. While writing this I had to check to see if "coffi" (coffee) is feminine (it isn't).
So, does that matter? Well, yes! Welsh also has no gender-neutral word for "it". When talking about an object you refer to it as either he or she depending on its gender. When talking about the weather, for example, you refer to "she". "Mae hi'n oer" is "it's cold", only it's really "she's cold". And not only that, but certain words mutate in certain ways depending on context and gender. Would a Welsh person understand you if you were to get a gender wrong? Yes, of course. But it would grate. It wouldn't sound right. And if I'm going to learn a language, I'm going to do it right.