Search Results (28 posts found):
I recently had notice from my VPS provider that my site was using a compromised version of PHP that contained the php2shell vulnerability, so reported on by the media lately.
Being the responsible website owner that I am, I immediately set about to upgrade my server from Ubuntu 20.04 (Focal Fossa) to the next LTS version 22.04 (Jammy Jellyfish). Arguably I could have gone further, but as Jammy is still under long term support, and because the upgrade process is rarely smooth, I opted to only go up one version. The necessary patch for PHP 8.1 is provided by Canonical for this version, so it'll do.
And that's where the fun started. I did all the usual prep for a version upgrade, including bringing existing packages up to the latest available version within the installed Ubuntu release, and then I set the upgrade command going. It got most of the way before falling over on MySql server - the database that underpins my blog posts.
This stopped the upgrade process in its tracks, and was caused by a lack of available RAM. Sadly, my server is still surviving on just 512MB of RAM. The solution suggested by Claude (yuck...) was to use a ramdisk to overcome this shortfall. This worked. Sort of. It overcame the RAM problem, but the aborted installation from earlier left MySQL in an unupgradable position, from which I was likely to lose data.
The position I found myself in was that I still had access to the innodb files that contain the blog data but no means to access them. At this point I decided that if MySQL was going to be a resource hog on my overstretched (virtual) machine, then I'd have to do without it.
The solution I settled on was to migrate everything over to SQLite. Still a relational database and a syntax I'm familiar with, but much less resource hungry and perfect for a tiny blog with infrequent updates, only one contributor, and hardly any visitors. The question was how to extract the data from the MySQL database without running up an instance of MySQL server. The answer, not suggested by Claude, is an excellent little Python program called ibd2sql which can extract both the DDL (the code that creates the tables) and the data as a series of INSERT statements and output them as a file in MySQL syntax.
Thankfully the site only comprises a small handful of tables, as the website and database are hand-rolled rather than relying on third party software like WordPress, so a quick bash script to loop through the ibd files and create SQL output did the job, and ChatGPT (again, yuck...) converted them from MySQL syntax to SQLite syntax. The differences aren't important. This allowed me to import all my existing blog posts back into my new SQLite database. Hooray! The next step was to modify the PHP to use the new database instead of the old. There were a few data retrieval functions (mostly fetch_object()) not available, but it wasn't hard to convert these to fetchArray() to get everything up and running again.
The result is that I can now remove MySQL from the server entirely, and have a smaller resource footprint going forward.
I'm also no longer vulnerable to the php2shell bug. Imagine the damage an attacker could wreak if they access this server! :D
ibd2sql is available from
here and is an invaluable piece of software if you find yourself in the same situation as me.
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.
One of the things that's come up several times in my Delphi experience is the need to Base 64 encode and decode data. Sadly, there's no built-in function to do this, but as Base-64 is a very straightforward encoding, it's a pretty trivial task to write your own.
Base-64 is a means of encoding binary data using the 62 characters comprising the lowercase alphabet, the uppercase alphabet and the numbers 0-9, as well as the characters + and / for a total of 64 different characters, plus = used for padding.
Why 64? Because the number 63 is the highest number that can be represented in 6 bits. 63 allows for 64 positions in a zero-indexed array, and as we'll see in a minute, the use of 6 bits is crucial to how Base-64 works.
The basic principle is this: take three 8-bit values and turn them into four 6-bit values. These values are used to index an array of the character set mentioned above, and the characters then form the output string.
For example, take the string "Cat". Assuming an ASCII encoding, this comprises the values 67, 97, and 116, the values for uppercase C, lowercase A and lowercase T, respectively. These are represented in binary thus:
01000011 01100001 01110100
Divided into groups of 6:
010000 110110 000101 110100
These become the numbers
16, 54, 5, and 52
And if we use these to index into the following array (zero-indexed):
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/
We get the characters:
Q2F0
Decoding is just finding the index of the characters, converting those values to binary, grouping the bits in 8s and converting back to numerical values.
Earlier we said we were converting groups of three 8-bit bytes into groups of four 6-bit bytes, but what if the input data isn't divisible by four? Simple, we pad any partial groups with zeros and use the padding character = for any output characters that are missing entirely.
So, if our input was "Ca" instead of "Cat" we'd have input bytes of:
01000011 01100001
Grouped into sixes, we finish off the last group with zeros:
010000 110110 000100
Convert to the character sequence as before, and append the padding character:
Q2E=
Simple, right?
So why do we need the padding character? Even without it, we'd be able to unambiguously decode back to our original data. But what if we concatenated several base-64 values one after the other? If we couldn't guarantee that each one was a multiple of four we could find ourselves in the situation where the last bits of one string are concatenated to the first bits of another string and produce a string that is different to the input from that point on. The padding characters remove that possibility.
So how do we do this in Delphi?
Well, first it's important to remember that Base-64 can be used to encode **any** binary data, not just character strings, so it makes sense that the input for our encoding function is an array of bytes. If we do happend to want to encode a string, we can get the appropriately encoded byte values back from the string using the TEncoding class.
Then we loop through the string taking three characters at a time, keeping track of how many bits are left to read, and converting them to 6-bit bytes.
So far:
function Base64EncodeBytes(inputstring : TBytes) : string;
const base64set = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
// Our array index into the input string
// and the number of characters remaining
var i, rem: integer;
// The three characters of the input
// we're currently processing
i1, i2, i3 : byte;
// The four array indexes
// for our output characters
n1, n2, n3, n4 : byte;
begin
rem := Length(inputstring);
i := 0;
while rem > 0 do
begin
i1 := 0;
i2 := 0;
i3 := 0;
if rem > 0 then
begin
i1 := inputstring[i];
inc(i);
end;
if rem > 1 then
begin
i2 := inputstring[i];
inc(i);
end;
if rem > 2 then
begin
i3 := inputstring[i];
inc(i);
end;
So that's the 8-bit bytes gathered. Now we need to split these into groups of 6. The way I decided to do this was to make one long number by left shifting the byte values and then right shifting each group of 6 into the lowest 6-bit position to get the new byte values.
// Form a long number from which
// to take our groups of six
outputNo := (i1 shl 16) + (i2 shl 8) + i3;
// Shift the six left most bits
// over to the right by 18 places,
// so the occupy the six least-significant bits
n1 := outputNo shr 18;
n2 := (outputNo shr 12) and 63;
n3 := (outputNo shr 6) and 63;
n4 := (outputNo) and 63;
The fact our variables n1 - n4 are bytes means that the higher order bits we don't need are automatically truncated. All we do then is ensure that bits 7 and 8 are also both 0 by anding with 63 (binary 00111111) and we have our array indexes.
All that remains is to get the correct output characters, add any padding based on the number of remaining input characters and close off our loop.
if rem < 2 then
result := result + Base64Set[n1 + 1]
+ Base64Set[n2 + 1] + '=='
else if rem < 3 then
result := result + Base64Set[n1 + 1]
+ Base64Set[n2 + 1]
+ Base64Set[n3 + 1] + '='
else
result := result + Base64Set[n1 + 1]
+ Base64Set[n2 + 1]
+ Base64Set[n3 + 1]
+ Base64Set[n4 + 1];
rem := length(inputstring) - i;
end;
end;
Et voilá!
I recently needed to implement RSA cryptography in Delphi, sticking to a few requirements of my own choosing:
1. The library used should be free
2. The library license should be permissive enough that I can use the library in a commercial application
3. The library should have as few extra files to include as possible
I looked initially at LockBox, but it came with a multitude of files to either copy to my source folder or include in my library path. I don't want other developers in my team to have to add yet more third party libraries, so I gave this a miss. Additionally, the documentation wasn't great and finding example online was quite tricky.
I then tried PGPCrypt, but could only find a version of that for Lazarus, the free Delphi compiler.
Next was the TMS Cryptography pack, but this isn't free, so again a non-starter.
Then I thought about OpenSSL. We already use OpenSSL as a DLL for a different, but related, purpose so the file is already present in our source and program folder. What we don't have are function headers as we're calling the DLL functions by importing them directly (we only use three at present), but RSA is more complicated and uses a particular structure that would need replicating in Delphi. I thought this might mean OpenSSL was also a non-starter, but after much searching online I came across the Delphi-OpenSSL project at https://github.com/UniGe/delphiopenssl/ which consists really of only three .pas files, only one of which is necessary for what I'm trying to implement: RSA encryption and decryption. For this purpose I need use only the LibEAY32.pas file coupled with the LibEAY32.dll file. We're using version 1.0.2 of this, and the Delphi-OpenSSL project is compatible with that. Great!
I needed to make a few minor changes, as despite the programmers' best efforts it seemed confused about the difference between Char and AnsiChar in Delphi 2009, but the changes were minimal and consisted, almost entirely, of me replacing references to PChar or PCharacter with PAnsiChar.
The next challenge was to see if I could use an existing key to encrypt a file.
I added my modulus, public exponent and private exponent (not needed for encryption) as Base64 encoded string constants and used:
_rsa = RSA_New();
to create a new RSA structure to populate with the key information. This actually returns a pointer to an RSA object, so it needs both dereferencing and casting when used. The properties we're interested in are the modulus, n; the public exponent, e; and the private exponent, d (when decrypting, later).
These properties take the form of BigNum objects as they can be sometimes thousands of bits long. The BigNums need to be created before being used:
RSA(_rsa^).n := BN_New();
RSA(_rsa^).e := BN_New();
The Base64 values were then decoded and altered, one byte at a time, to hex using IntToHex (which returns a string) and then BN_HexToBN was used to set the RSA record's properties accordingly:
BN_HexToBN(RSA(_rsa^).n, ansistring(public_modulus));
BN_HexToBN(RSA(_rsa^).e, ansistring(public_exponent));
The input string can then be encrypted by calling:
enc_in := SysUtils.TEncoding.ASCII.GetBytes(string(input_text));
to get the string character values as a byte array, followed by:
RSA_Public_Encrypt(length(enc_in),PAnsiChar(enc_in), PAnsiChar(@textout),_rsa,RSA_PKCS1_PADDING);
to do the actual encryption. The output cypher text is held in textout. This will look like garbage but can be converted to a Base64 string for convenient storage.
And that's it.
Two caveats:
I had to add an extra property to the RSA record to match the version of OpenSSL we're using. This was:
engine: pointer;
below the meth property.
And I had to initialise the SSL library by calling:
SSLEay_version(_SSLEAY_VERSION);
before making any calls to encryption or decryption routines. There's probably a better way to do this, but this did the trick.
I put this information here in the hope that it helps someone else who struggled as much as I did to implement this!
Happy New Year!
A new year, a new start, and some New Year's Resolutions (Addunedau Blwydden Newydd) to think about.
Actually I have four. One is a carry-over from last year as I singularly failed to achieve it!
1. Cycle across the Severn Bridge. The first / original Pont Hafren allows pedestrian and cycle traffic in addition to motor vehicles. It's been my plan to cycle over it for about three years now but I've not yet found the time to do it.
2. Make more of an effort to improve my Welsh. I've done very little in the past twelve months to actually improve my Welsh, and in some respects my ability has gone backwards in that words I used to know don't spring to mind in the same way they used to.
3. Write a short story. Just to prove to myself that I can stick at a task like that long enough to finish it.
I think that's enough for now. Number 1 in particular is something I'm itching to do, if only to take photos of the Second Severn Crossing (I refuse to call it "The Prince of Wales Bridge") from the first.
As an extra bit, I also want to take some photos of the Newport transporter bridge all lit up at night, but that's not really a resolution.
Anyone using this website since November 2020 (that must be someone, surely!?) would have noticed that after the page initially loads, when you next click on something an ad loads, replacing the current page.
This was annoying.
But I did it because I was hoping to make some small amount of money from this blog. Things didn't work out that way for one principal reason: this site does not get enough traffic.
I didn't appreciate it when I first thought of monetising the site, but in order to get Google Ads (or indeed virtually any of the better networks) you have to have a certain number of visitors or be in the top however many sites. I get very few visitors, so was inelligible for Google Ads.
This led me to try Propeller Ads as they have no such requirements. However, having had them in place since November, I have made precisely zero money from them. I think this is because, if I understand correctly, they transfer any earned funds every two weeks, so if you've earned less than a penny, you get put back to zero each time.
As the ads were annoying and brought in literally no money, I've now disabled them again. Clearly I'll have to find another way to make money, but if you're a user who's been annoyed at the pop-up ad intrusion, fear not: it won't be returning.
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!
Ah, Milton Jones. King of the Wise Crack, Prince of the Pun.
Milton - ably assisted by his best friend, Anton (Tom Goodman-Hill) - takes on a variety of unusual and unlikely jobs ranging from a gardening expert, to lorry driver, chef and international diplomat. The recurring theme is that Milton is monumentally unsuited to every single job, although somehow things work out for him in the end. For the first series only, his adventures include his sister, Susan (Debbie Chazen).
As with other Milton Jones programmes, this one really serves as a vehicle for Milton's craft with puns and one-liners. That's not to say it's bad, though. There are a lot of jokes that made me laugh out loud and, if anything, the very tenuous storylines actually add re-listening value, as the plots are largely irrelevant and the stories can be enjoyed again.
Some of the jokes fall a little flat, but there are still plenty that work well as well as some running-gags that appear in many episodes. One that springs to mind is that something will crop up that makes Anton reminisce, some sentimental music will play, and Anton will tell an anecdote where something went wrong that caused embarrassment for him and can therefore either not visit a certain place or fulfil a certain role, like addressing the UN General Assembly and opening with "So where have you all come from?". Another, that always makes me laugh, is when Jones uses very small snippets from songs to create conversations involving various singers ("What flavour ice cream do you want, Prince?", "Raspberry beret"; "What's the forecast today, Bill Withers?", "Lovely day, lovely day, lovely day")
Of all the Milton Jones series, "Another Case of..." is probably my favourite. I found The House of Milton Jones to be too confined and contrived, the good witch idea in The Very World of Milton Jones to be just a little too irritating and the stories, which are just a series of flashbacks, to be too tenuous and disjointed. Another Case of Milton Jones, on the other hand, does at least have a coherent story for each episode to balance the constant flow of puns.
I've listened to Another Case of Milton Jones several times now, and I still find myself returning to it when I just want some honest, uncomplicated, good fun comedy.
Rating: * * * *
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!
(This has nothing to do with Welsh)
About
Around 12 years ago I wrote and released a small PC game called "Help Hannah's Horse". It was essentially a variation on Pacman - collect the coins scattered about the maze while avoiding the ghosts and gathering the moving carrots and the powerups that appear from time to time. A few people played it and it got included in the Debian Linux repositories.
Recently I got thinking about that game again and thought it would be nice to give it a bit more polish and change the music. The music particularly has always niggled me; not because it's bad (it's great!) but because I found it online and just used it. I never credited the composer and never checked if it was free for non-commercial use. I have no idea where I found it, so unfortunately I can't correct this now. I don't even know the name of the piece as I renamed the file to just "bgm1.ogg". I needed to either find royalty-free music that fit the mood of the game, or write a piece myself. I took the latter approach.
Anyway, after a couple of weeks of tidying code, fixing bugs, composing music and redrawing some graphics, I have released version 1.2 of the game!
Screenshot
Here's Hannah merrily running around level 1 collecting the gold coins and moving carrots and avoiding the ghosts. The green potion makes Hannah invulnerable for a short time if she collects it.
Download
It's available on my Sourceforge page (
http://hannah.sourceforge.net) for Windows and in source code form for other platforms, if you're so inclined. There's a Makefile for Linux included.

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.
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.
Regular visitors (just me then) will have noticed a change to the design of RetroJunkies.co.uk.
The right-hand panel containing the recent posts, search, blurb and links has been moved to the left-hand side, and the main content is now to the right.
I've also changed the title font to Hand Drawn Objects, a free web font I found online, and the main font to the brilliantly named "Aaargh". It just makes the whole place look a little more polished.
To that end, I've also taken the opportunity to learn a bit about responsive web design. That is, making pages fit the device on which they're being viewed. In this case, I've changed the site so that when viewed on a small screen (like a mobile phone) the left panel is reduced and, as with the main panel, appears the whole width of the screen.
I've also improved my own logging-in facility for when I make posts. It turns out I'd been forgetting to actually validate the username entered at login. It's a wonder I haven't been hacked yet.
There's method to my madness. I've been attending university open days for my partner's son, and I've realised that some of my skills are absent or falling by the wayside a little. Among them my web design (css, javascript) and PHP abilities, so I'm using this site as practice for those skills.
Any comments on the look are gratefully received.
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!
Christmas has been and gone and I've now got a small collection of Welsh books aimed at learners. I already had "Ffenestri" by Lois Arnold, and I now have two Bethan Gwanas books to add to my growing library: "Yn ei Gwsg" and "Bywyd Blodwen Jones".
I've started the Blodwen Jones one, but to my shame I have only made it about three pages in. It's not because it's too difficult (it's actually about right for me), it's because life, as it is wont to do, has taken over.
That's also why I haven't been updating this blog very often: I just don't find the time.
My Welsh learning is still continuing apace though. My DuoLingo tree is now almost entirely level five (nothing below a four) and I've moved onto level two on Say Something In Welsh. The range of things I can say in Welsh now far outstrips what I can say in French, and I started learning that when I was 11 at school!
What I lack is someone to speak Welsh with. No one else in the house is interested in learning, and I suspect wouldn't stick with it long if they did. It may be time to venture out and maybe go to a meet up in Bristol or Casnewydd.
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.
Actually I'm annoyed with myself.
And I'm annoyed with the people of Pembrokeshire! We went for a family holiday for a week to Pembrokeshire (beautiful, by the way) and I managed to speak almost no Welsh. The problem was mostly that I encountered virtually no one who spoke Welsh! Or at least no one who advertised the fact if they did.
I say "almost no Welsh" because I listed the items in my shopping basket in Welsh to my step-daughter, and I replied with "Dw i'n siarad tipyn bach Cymraeg, hefyd" when confronted with the reply of "tipyn bach" to my question of "Do you speak Welsh?" to a shopkeeper.
And that was it. I overheard someone at Castell Henllys speaking Welsh, but they'd gone by the time the demonstration I was watching had finished, otherwise I might have asked to practice a little with them (although God knows what I'd have said).
It's a shame, really. An opportunity missed. My Welsh comprehension is now getting beyond the Mynediad (entry) level, but my listening and speaking have had very little practice.
Still, I was at least surrounded by written Welsh: road signs, shop signs, leaflets, and I took the time to watch a little S4C, so all was not lost.
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.
My last post was about starting the Say Something In Welsh course. This is just an update on how that's going.
First, the main difference between this and DuoLingo is the sense of community. The DuoLingo forums (if you can call them that) are really only for people asking questions about the lessons themselves, or querying the correct answers to questions within the lessons. The Say Something In Welsh forums have much more spirit about them. People joke with each other, people ask questions, get replies and then go off topic about their experiences of learning Welsh. People share their real world experiences of *using* Welsh and receive encouragement from others for doing so. And, most importantly, the course creators and contributors also join in with all of this. And there's never a hint of condescension, just encouragement. This tone is maintained through the lessons themselves, with one of the later sentences on the very first lesson being "I'm not trying to speak Welsh, I am speaking Welsh" (Dw i ddim yn trio siarad Cymraeg, dw i'n siarad Cymraeg!)
Second, the course takes some getting used to for someone like me who has done a little Welsh before. The pronunciations are a little more colloquial, and words are omitted in the same way that a native speaker might: "Wyt ti'n bwyta" (you are eating) becomes simply "ti'n bwyta", in much the same way as an English speaker might ask simply "You eating?"
Then there's the manner of the course. Everything is very relaxed. You're told "don't worry about this now" when introduced to things like mutations and the long form of the past tense. You're told, "To form the past tense, you only need to know how to say "ness ee". This stumped me, until I realised it was just a colloquial pronunciation of what I know as "Mi wnes i". I'm not sure how well I cope with this casual approach. I **need** to know conjugations, I **need** to know why things are what they are. It's very hard for me to just let go and accept that things are as they are, and it will all become clear later.
But I'm trying. The course clearly works, as plenty of people on the forums are using it, and Iestyn is an excellent teacher. His lessons are well measured, his voice is clear, he's encouraging throughout, and he participates in the forums to answer questions and give advice.
He is clearly passionate about Welsh, and that enthusiasm is infectious.
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!
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.
Here's an odd one: the Welsh have no word for "to have", as in to possess something.
The Welsh, though, are a resourceful lot and get around this apparent limitation by saying that something is "with" something else.
I do not have a ball, a ball is with me. Likewise, a new house is with me; a girlfriend is with me; even a beard is with me.
The concept isn't complicated, but I find it tricky to get the word order right. During a conversation at work, I was asked if I knew how to say "The red dog has a ball" in Welsh. I had to think about this. Is the red ball with the dog, or is the dog with the red ball? I eventually settled on the former: mae pêl gyda'r ci coch. I think that's right.
It doesn't trip off my tongue quite as easily as it would in, say, French: Le chien rouge a un ballon. It's a little clumsy and awkward, but that's part of the charm.
This problem isn't limited to possessing an object (or a girlfriend) though. It rears its head when talking about health too. You don't have a sore throat, there is a sore throat with you. You do not have a cold, there is a cold "on you": Mae annwyd arna i.
Let's hope I don't get sick while in Wales; this might take some getting used to.
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!
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.