<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ray O&#39;Hagan on Medium]]></title>
        <description><![CDATA[Stories by Ray O&#39;Hagan on Medium]]></description>
        <link>https://medium.com/@raimy69?source=rss-62178e7a736d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*EzxkPuM4Pd9B5mV0M4ouvA.jpeg</url>
            <title>Stories by Ray O&amp;#39;Hagan on Medium</title>
            <link>https://medium.com/@raimy69?source=rss-62178e7a736d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 19:15:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@raimy69/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Silver & Gold]]></title>
            <link>https://medium.com/@raimy69/silver-gold-616f30ae3223?source=rss-62178e7a736d------2</link>
            <guid isPermaLink="false">https://medium.com/p/616f30ae3223</guid>
            <category><![CDATA[crime-fiction]]></category>
            <category><![CDATA[crime]]></category>
            <category><![CDATA[fiction]]></category>
            <category><![CDATA[short-story]]></category>
            <dc:creator><![CDATA[Ray O'Hagan]]></dc:creator>
            <pubDate>Fri, 10 May 2024 23:34:37 GMT</pubDate>
            <atom:updated>2024-05-10T23:34:37.059Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pKhRxapDQqvcKk5x" /><figcaption>Photo by <a href="https://unsplash.com/@joannakosinska?utm_source=medium&amp;utm_medium=referral">Joanna Kosinska</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>It all started with a spoon, a stupid fucking spoon.</p><p>George eyed his captor, wondering what he would do to him next. The sweat from his brow stung his eyes, he desperately wished he could wipe it off, but given how tightly his hands were bound behind his back it would have been a very difficult thing to do. When he’d bought the new kitchen chairs the previous week he never figured he’d end up tied to one.</p><p>His captor bore an uncanny resemblance to that big red bearded wildling from Game of Thrones, Thommen. George had no idea what his captors actual name was, he didn’t exactly stop to introduce himself before bashing Georges head in when he answered the door. He decided to call him Tom, it felt marginally less scary if he had a name.</p><p>Tom approached him.</p><p>“So, are you ready to tell me where it is?”</p><p>That fucking spoon. George remembered finding it, seeing it lying on the footpath. At the time it just seemed really random, how did a spoon end up in the middle of the path like this? Kneeling down to pick it up, George quickly realised this wasn’t the sort of spoon you have at home to eat your soup with, it was way too ornate for that. He studied it in detail. It was heavy for such a small spoon. The head looked to be gold plated, there was a raised silver pattern along the main handle, and the end part was rounded off with a very elegant pattern. This could be worth something he mused.</p><p>Normally he would have gone to the library to see if he could find a book that could give him some clues as to where this came from, but unfortunately due to his xylophagia he was now banned from the library. The librarian had caught him ripping out the pages from The Colour Purple and shoving them in his mouth. For as long as he can remember he’s always had an uncontrollable urge to eat a book with a colour in the title, he had no idea why. The previous week it had been The Green Mile. Apparently there was now a picture of him behind the counter with the words ‘Book Eater. Do not admit.’ in large letters around his image. He counted himself lucky every day that his children never went to that library.</p><p>Using the internet was a possibility he supposed, however, despite just being in his mid-50s he was a bit of a technophobe when it came to the internet. His son had set him up with an old laptop some years ago, showed him how to use it, and even setup a Facebook account for him. He’d used it only once, to look up the start time in the cinema for ‘Cloudy with a Chance of Meatballs’, so he could bring his grandson. He then noticed his Facebook page was suddenly plagued with adverts for dieting tips and weather equipment, which he found very unsettling and disturbing. The laptop was quickly moved to a cupboard where it’s resided ever since.</p><p>George was more afraid of what Tom would do to him if he found out where the spoon was now, than if he never found out.</p><p>“Where is what?”</p><p>“The fucking spoon, where is the fucking spoon? I know you know, now tell me before I fuck you up even more. I’ve searched your apartment and it’s not here, so where is it?”</p><p>“I’ve no idea what you’re talking about!”</p><p>Tom lifted up an old Stanley knife that was lying on the kitchen table and opened the blade up.</p><p>“Tell me where it is or I cut you. Your choice.”</p><p>Knowing full well that he would die if he ever told Tom where the spoon now was, George had little other choice but to continue to play dumb, and hope someone found him, or heard his screams, before Tom killed him out of frustration. Though the likelihood of being saved was growing slimmer by the minute.</p><p>“I’ve no idea what you’re on about.”</p><p>Tom went behind George, and digging the blade into his forearm he slowly cut along the length of his arm.</p><p>“Sweet fucking mother of fucking god! Why the fuck do you think I know where your fucking spoon is?”, George yelled, before briefly passing out with the pain.</p><p>George pocketed the spoon and continued on his journey home. He made himself some eggs on toast, all the while staring at the spoon while eating. It does seem valuable, he thought, maybe the antiques shop in town will be able to give me an idea of what it’s worth. But it’s not mine to sell, is it? Should I bring it to the police, maybe there’s a reward? Or would it seem stupid turning up to a police station to hand in a spoon? George made up his mind, he’d take it to the antique shop, and if they weren’t willing to buy it off him then he’d drop it at the police station. Tidying up after lunch it took all of George’s control not to eat some of the egg carton.</p><p>He walked into town with an edge to his step, hoping that the shop would simply buy it, with no questions asked. It was about time I had a bit of good luck he thought. He paced outside the shop for about ten minutes before plucking up the courage to go in.</p><p>He entered the shop, noting that the assistant had her back to him and seemed intent on delicately cleaning a very colourful teapot in her hands.</p><p>“Hello.” he said to get her attention.</p><p>She spun around.</p><p>“Oh, Hi George”.</p><p>Ah fuck, he thought.</p><p>George came to and scanned the room, Tom was nowhere to be seen. He felt lightheaded. He tried wriggling the ropes that bound his hands but there was so much blood from the cut that he quickly realised the futility of his efforts. He saw the Stanley knife on the corner of the kitchen workbench, quickly turned his chair around and pushed it backwards. He must have only gotten a couple of feet across the room when Tom came running in and kicked the chair forward. George felt the ground hit his head before he knew what was happening to him.</p><p>Tom stood the chair, and George, upright.</p><p>“Right, where is it? My patience is running out now.”</p><p>“What makes you think I know where it is?”</p><p>“Because you weren’t very clever George were you? I hadn’t noticed I dropped it while I was running away and I figured whoever found it would probably bring it to an antiques shop, and like a regular everyday idiot that’s exactly what you did. All I had to do was visit a few and ask if anyone had been in with a spoon. I could tell from your old friend’s reaction that she knew someone who had. It took a while to get the information I needed out of her, but we got there in the end.”</p><p>“Wait, what? Did Marcy tell you where I lived?”</p><p>“Eventually, her pain tolerance was higher than I expected, but she eventually gave me all your details.”</p><p>“And Marcy, how is she?”</p><p>“Dead.”</p><p>“Hi Marcy. Didn’t know you worked here.”, George said, wishing that he didn’t know her, anonymity would have been better.</p><p>“I’ve been here about 5 years now, guess you don’t have much call to come here.”</p><p>“No not really, but today I do, tell me, what do you think of this?” He produced the spoon and placed it in her hands.</p><p>“George, where did you get this?”</p><p>“I can’t tell you that!”</p><p>“Seriously George, you’re in a lot of trouble. This is part of a set stolen from the museum yesterday. Individually it’s worth very little, but as part of the set it’d be worth, well, close to a million. Whoever lost this will definitely be looking for it, and for you. Where did you get it?”</p><p>“I found it, on Herd Street, it was just lying there, honest!”</p><p>“I’d say put it back, if you go to the cops with it, they’ll probably suspect you. And whoever lost it will probably still come for you, you’d have basically taken a million dollars from them. The set is worthless without that piece. Just go, leave it where you found it and forget about it.”</p><p>George grabbed the spoon and ran home, he needed to think, figure out what to do next. He needed to hide it, but where? Then he knew what he had to do. He had just finished putting it in the one place that he knew no one would think of when there was a knock at the door.</p><p>“I can’t believe you killed Marcy.”</p><p>“I did what was needed.”</p><p>Tom once again picked up the Stanley knife and rushed over to the occupant of the chair who was beginning to sob uncontrollably. He held the knife up, a few inches away from George’s left eye.</p><p>“NOW. FUCKING. TELL. ME. WHERE. IT. IS. I’ve had enough of this bullshit!”</p><p>“I’ve no fucking idea Tom!”</p><p>“Tom? Who the fuck is Tom?”</p><p>“Leave me alone Tom, just leave me alone, please!”</p><p>“Why are you calling me Tom? What the fuck are you on about? Where is it?”</p><p>“I don’t know!”</p><p>“Where is it?”</p><p>The knife drew closer.</p><p>“I don’t know!”</p><p>“Where is it?”</p><p>“I don’t know!”</p><p>“Where is it?”</p><p>“I don’t know!”</p><p>“Where is it?”</p><p>He drew the knife even closer. George could take no more.</p><p>“Ok, I’ll tell you, just put the knife away!”</p><p>“After you tell me.”</p><p>It drew even closer.</p><p>“Ok, ok, ok, I fucking ate it! Ok!”</p><p>“Ha, you expect me to believe that. Where is it?”</p><p>“It’s true, I ate it, I did it just before you arrived. I have a disorder, something wrong with me.”</p><p>“You’re trying to tell me that right now it’s in your stomach.”</p><p>“Yes, but we can get it out, the hospital can get it out. They know me there.”</p><p>“We ain’t going to the hospital. There’s only one way to know if you’re telling the truth.”</p><p>The knife dug deep into George’s abdomen, blood started pumping instantly. Tom stabbed and stabbed, pulling out anything that was exposed. Tom remembered that intestines used to be called arseropes, he now understood why. He finally cut enough to dig his hand in and pull out a very bloody spoon.</p><p>“You’re an idiot George, a right fucking idiot.”</p><p>Washing the blood off the spoon he smiled to himself. This was the last thing he expected to be doing today, but it was good fun all the same. He examined the front of the spoon, no damage, that’s good he thought to himself. Flipping it over he noticed what looked like scratch marks. Holding it closer he saw they weren’t scratches, but two words etched with an old Stanley knife. The words were simply, “Yum Yum”.</p><p>He took one last look at George, who was now slumped over, dead, but with a slight smile on his face.</p><p>He wanted to kill him all over again.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=616f30ae3223" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Moments]]></title>
            <link>https://medium.com/about-me-stories/moments-dfd8b27dadd9?source=rss-62178e7a736d------2</link>
            <guid isPermaLink="false">https://medium.com/p/dfd8b27dadd9</guid>
            <category><![CDATA[childbirth]]></category>
            <category><![CDATA[short-story]]></category>
            <category><![CDATA[nonfiction]]></category>
            <category><![CDATA[about-me-stories]]></category>
            <category><![CDATA[self]]></category>
            <dc:creator><![CDATA[Ray O'Hagan]]></dc:creator>
            <pubDate>Tue, 12 Mar 2024 07:56:31 GMT</pubDate>
            <atom:updated>2024-03-12T07:56:31.076Z</atom:updated>
            <content:encoded><![CDATA[<h4>A father’s reflections on the traumatic birth of their child</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xpsFZs2D5wIHswBt" /><figcaption>Photo by <a href="https://unsplash.com/@chrishcush?utm_source=medium&amp;utm_medium=referral">Christian Bowen</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>“This baby is coming today, one way or the other.”</p><p>I wasn’t overly shocked when the midwife told us that. This was our second child so the signs of labour were familiar, plus the water breaking was a definite indication that the birth wouldn’t be too far away. We drove my carefully planned route along the back roads to the hospital, and within 30 minutes we were in the delivery suite. It was a different room to last time, but it felt the same nonetheless. A bed was in one corner, a birthing pool in another, and somewhere a machine was going ping. The walls were a warm brown colour, which matched the bed covers, but overall the room had a clinical feel.</p><p>As the evening went on it became clear that the birth wouldn’t go to plan. The baby was becoming quite stressed and a call was quickly made for an emergency c-section. We were soon in an operating theatre, and from there it all started going further downhill, rapidly. The anaesthetist was having a lot of trouble getting the epidural in and my wife was in more agony than I could ever have imagined a human being suffering. The midwife was doing her best to try to calm her down, nurses were standing around, waiting for the moment they could help. One of the doctor’s approached me and said in a calm voice,</p><p>“If this goes to general anaesthetic you cannot stay in the room, you will be asked to leave, do you understand?”</p><p>I understood what he was saying, and it terrified me.</p><p>I could see the frustration in the anaesthetist’s face, this was not going to end well. I was told to stand back, not to approach. A few minutes later the doctor came to me and asked me to quietly leave, that they now needed to operate to save the child. As I was being escorted out of the room I took one last look at my wife, she was now in such intense pain I don’t think she was aware of what was happening. The scene was completely chaotic. The anaesthetist was pleading with her to stay still, nurses were doing their best to help keep her calm, and doctors were busy sticking leads onto every available patch of skin. The midwife was kneeling on the ground pushing her head through the jumble of legs. She placed a stethoscope on my wife’s stomach, and as I left I heard her say,</p><p>“I can’t find the baby’s heartbeat.”</p><p>Two seconds later I was alone in a deserted corridor.</p><p>A moment is defined as a period of ninety seconds. I’ve no idea how many moments I spent alone in that corridor, but they were the scariest of my life.</p><p>I wanted to immediately bang on the doors and find out if they were ok, but I knew I couldn’t. The sheer silence of the corridor stunned me. I looked around. It was a long corridor with double doors on either end, and several small rooms branching off it. It was tiled with some horrible off white colour which reminded me of that room in Saw.</p><p><em>I can’t find the baby’s heartbeat. </em>What did that mean? Did it just mean that she was having trouble locating it? Did it mean the baby had moved and she just couldn’t find which way round it was? Or did it mean the one scenario I didn’t want to even think about. I could feel my throat contracting, tears forming as I thought of that possibility. I knew I needed to distract myself from the thoughts. I started to pace the corridor. I looked up at the ceiling and counted the lights. Seven. Why did hospitals have to be so bright?. All the rooms off the corridor had the lights turned off. I guessed they were mostly recovery rooms and wouldn’t need to be lit all the time.</p><p><em>I can’t find the baby’s heartbeat. </em>The words were echoing around my mind. I had no idea what was happening beyond those theatre doors. I sat on the floor, my back to the wall, staring into a largely empty room just in front of me. I guessed this is where they would wheel the bed with my wife in it afterwards. But would that happen now? Today we should be welcoming a new life into the world, now I didn’t know if either would survive. The thoughts were eating me away inside. I wanted to curl up into a ball, make them go away. My hands, resting on my knees, started shaking. By now I could make out a clock ticking faintly from another room.</p><p><em>I can’t find the baby’s heartbeat. </em>I thought of our first born, at home with the babysitter. They would be expecting my call about now. When I do get to call, what will I be telling them? Would I be telling them about a new child, or something much worse. I vowed at that moment that if it came to that, that I wouldn’t do it over a phone call. There would be no way I could find the words. I started to picture that scene, formulating the words, I couldn’t help it. I had to stop these thoughts, they were destroying me, I could feel it. I looked at the floor and tried to count the tiles. There were six across, that was easy. How many along the corridor? About fifty three that I could make out from my position. It was hard to be certain. That would make the corridor about four metres by thirty, seemed about right.</p><p><em>I can’t find the baby’s heartbeat. </em>I knew I’d drive myself insane if I kept repeating those words to myself, but I couldn’t get them out of my mind. I got up and paced again. The silence of the corridor once again overwhelmed me. I thought of my parents, 20,000km away in Ireland, and of my wife’s parents in England. I couldn’t call them, what could I say? What could they say? Nothing. Nothing could be said right now that could help in any way. All that call would do is cause them to worry. They had no idea that this was happening right now, labour had come on so fast that we didn’t have time to let them know. Nothing positive could come from that phone call.</p><p>“Are you alright?”</p><p>I looked up. A nurse had entered the corridor. How on earth had I not heard her come in?</p><p>I explained the situation, holding back as much emotion as I could. I didn’t want her to be involved, I knew there was nothing she could say, I didn’t want her to try.</p><p>“Well, they’re in good hands in there.”</p><p>With that she entered one of the rooms, grabbed something and exited the corridor as quietly as she had entered it.</p><p><em>I can’t find the baby’s heartbeat. </em>I paced again. Silence surrounded me once more. Had the clock stopped? Why couldn’t I hear it? I paused and listened for it. It was still ticking, I had been pacing in perfect harmony with it without realising. Now that I had stopped all the thoughts I’d been avoiding came flooding into my mind. I sat again, tears were flowing down my cheeks. All the worst case scenarios were flooding my brain, I couldn’t stop them. I rubbed my face dry, my eyes stung.</p><p>I got up, stopped by the door to the operating theatre, straining to hear anything coming from inside. I couldn’t hear a sound. I walked on, counting the tiles as I went. I caught sight of my reflection in the window between the corridor and one of the rooms and almost didn’t recognise myself. It scared me.</p><p>I turned around at the end of the corridor and stared again at the operating theatre doors. I had no idea how much time had elapsed. I walked back towards them, went past, turned around, walked past again. I repeated this many times, each time hoping the door would burst open as I passed it. It never happened.</p><p><em>I can’t find the baby’s heartbeat.</em></p><p><em>I can’t find the baby’s heartbeat.</em></p><p><em>I can’t find the baby’s heartbeat.</em></p><p>Then suddenly the silence was broken. Through the doors of the theatre came the unmistakable sounds of a baby crying.</p><p>I sat on the floor once more. This time I let the tears flow freely.</p><p>Five minutes later the midwife came through the doors and handed me our newborn baby.</p><p>“Both are fine, your wife will be brought out shortly. The baby took quite a few minutes to breath on their own but is absolutely fine now. Don’t worry, the baby always had oxygen during that time, and won’t be bad at maths or anything, all is good.”</p><p>It wasn’t long after when my wife was brought out and the three of us were together for the first time in that recovery room I’d spent so much time staring into. Holding the child in my arms, I looked towards the corridor and once again caught sight of my reflection in the window. The image smiling back at me felt like a very different person to the one who only a few moments ago had been anxiously pacing up and down that corridor.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dfd8b27dadd9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/about-me-stories/moments-dfd8b27dadd9">Moments</a> was originally published in <a href="https://medium.com/about-me-stories">About Me Stories</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[About Me — Ray O’Hagan]]></title>
            <link>https://medium.com/about-me-stories/about-me-ray-ohagan-88f24a8609a5?source=rss-62178e7a736d------2</link>
            <guid isPermaLink="false">https://medium.com/p/88f24a8609a5</guid>
            <category><![CDATA[about-me-stories]]></category>
            <category><![CDATA[self]]></category>
            <category><![CDATA[about-me]]></category>
            <dc:creator><![CDATA[Ray O'Hagan]]></dc:creator>
            <pubDate>Fri, 08 Mar 2024 08:50:49 GMT</pubDate>
            <atom:updated>2024-03-09T06:01:33.858Z</atom:updated>
            <content:encoded><![CDATA[<h3>About Me — Ray O’Hagan</h3><h4>Lives in NZ, originally from Ireland. Husband, father to 3, part time writer, full time programmer.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fKqkkA5lWvRIKP2FKMKk9Q.jpeg" /><figcaption>Image owned by author</figcaption></figure><h4>Whats your TLDR?</h4><p>I was born in Ireland in the 70&#39;s, growing up in a town called Dundalk, just south of the border. I moved to Dublin in the 80&#39;s and attended Dublin City University, studying computer applications, which has been my career ever since graduating.</p><p>In 2004, I decided to take a career break and booked a year long trip around the world trip. Half way through I met an English woman on an overnight train from Bangkok to Vientiane, and we continued to travel together throughout Asia, finally arriving in New Zealand in 2005. NZ quickly became our home, we are now married with 3 children and living in Wellington.</p><p>My one year trip has so far lasted over 19 years.</p><h4>Decades of living</h4><p><strong>70s</strong></p><p>I grew up on a council estate in Dundalk, Ireland and lived there for most of the 70s. There were a lot of children my age in the estate, we would play football in the street a lot (this was well before cars started dominating the landscape), as well as cycling round the estate and back. Being outside all day was not unusual for all of us.</p><p>Sometime in the 70s I picked up a guitar for the first time. My father was musical, he played guitar and sang in local pubs, and I guess that started rubbing off on me somehow. I doubt what I tried back then sounded anything remotely musical, but it certainly gave me my initial love for music.</p><p>By the end of the decade I had a brother and a sister, and my parents had managed to scrape together enough to buy our own house across town. I missed the football, my friends, but it felt special to be in our own home.</p><p><strong>80s</strong></p><p>In the early 80s I started becoming fascinated with these new computers that were becoming available. My parents bought me a Vic 20 computer, which came with 5k of memory and, once I started writing my own programs for it, I was hooked. By the age of 12 I knew that this is what I wanted to do for the rest of my life and by 1988 I was enrolled in the Computer Applications course in Dublin City University.</p><p>Around 14 years old, I picked up and old acoustic that had been lying around the house and, with a little help from my father, I learned the basic chords and from there I strived to figure the rest out for myself. It helped that my best friend at the time was an incredibly talented piano player. But once I heard the distinctive sounds of Z.Z. Top on the Eliminator album I made the switch to the electric guitar, and that’s where I found my true instrument.</p><p><strong>90s</strong></p><p>I graduated DCU in 1992, around that time not a lot of computer jobs were around in Dublin, so it wasn’t until mid 93 that I found full time work, but it was a pretty cool job to have found. I was working on the very first text messaging system (SMS) in the world — obviously at that time we had no idea how this would take off and literally change the way people around the world communicate.</p><p>In 91 I also joined a band, oddly named ‘Disband’, as a result of our Dundalk accents. We were never going to be hugely famous, but we became world famous in Dundalk, and I look back with pride with what we achieved. We played support to The 4 of Us, and The Stunning, big bands in Ireland at the time, were on TV a couple of times, wrote what I still think are some pretty cool songs, and I developed life long friendships with the band members.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*ealSYA-l3xzU_nIcpMLu8g.jpeg" /><figcaption>Me, 2nd from left playing The Baggot Inn in Dublin.</figcaption></figure><p>By the end of the 90s the band had disbanded and I’d moved jobs, I was now working on a one-use credit card payment system, the first of it’s kind, something so common today we don’t even realise we’re using it. Again, it was a pretty unique job to have found. The Java programming language had just been invented and I’ve pretty much been using it ever since.</p><p><strong>00s</strong></p><p>The new century started but nothing changed really. Life went on the same in the 00s as they had in the 90s. By 2004 I had become disillusioned with my career, Dublin, and my life in general. I felt I needed to get away for a while, so I resigned and booked a 1 year trip around the world. My route would take me though South East Asia, Australia, New Zealand, Fiji and the U.S.A, before finally arriving back in Ireland. I never made it to the last 2 countries on that list.</p><p>On an overnight train from Bangkok to Vientiane a woman came over towards my seat and simply asked ‘Do you speak English?’, I had no idea at the time that that was the turning point in my life. We continued to travel together, through S.E. Asia &amp; Australia, before finally arriving in NZ around March 2005. We fell in love with the country and the people very quickly. We decided to do what we could to stay here, and after securing working visas and jobs we settled in Auckland.</p><p>We married in 2007 and soon moved to Wellington, which has been our home since. Our first child was born in 2009 and the decade ended with my first family Christmas.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NDWGgFMD-wg1ZNLjI5FgJw.jpeg" /><figcaption>Awaiting the bride, 2007.</figcaption></figure><p><strong>10s</strong></p><p>Our first child was followed in quick succession by two more, one in 2011, and one at the end of 2012, so we had a very young family, and it was a lot of hard work I have to say. You can never underestimate how much effort is required to push a double buggy around the Wellington hills.</p><p>We made several trips back to Ireland &amp; England during this time, the trips becoming easier as the children grew older.</p><p>I was still in the same job in Wellington that I had been since we moved in 2007 and was promoted to development manger around the middle of the decade. It meant less programming, but at the time it seemed to be the logical move for me. The company was taken over by a US company, so I ended up running the development team across Wellington, San Francisco &amp; Chicago, with many a trip between them all.</p><p><strong>20s</strong></p><p>In the 20s I turned 50, and I’ll admit it was a difficult time for me. Realising that retirement was only 15 years away I re-assessed where I was and what I was doing. I didn’t want to spend the remainder of my career trying to climb further up the corporate ladders, it just wasn’t me. I loved programming and it’s all I’ve ever wanted to do. So, I gave up on my current path and became a self employed contractor, which allowed me to return to simply being a programmer. Will I do this until retirement? I hope so.</p><p>I also decided to grow a beard.</p><p>Realising that my life now spanned 6 decades, I started to write about my experiences, to remember those stories of what happened in my life to bring me to this point in time.</p><p>And that’s what brought me here.</p><h4>What do you write?</h4><p>Mostly memoirs, as over the years I’ve had encountered many people and situations which have been memorable. Some of these are good memories, some, well, not so good. However, all of them have brought me to where I am now.</p><p>I also dabble in the occasional fictional piece, and the odd technical article.</p><p>Thank you for reading my About Me story.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=88f24a8609a5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/about-me-stories/about-me-ray-ohagan-88f24a8609a5">About Me — Ray O’Hagan</a> was originally published in <a href="https://medium.com/about-me-stories">About Me Stories</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Judgement]]></title>
            <link>https://medium.com/@raimy69/the-judgement-454bc3da7222?source=rss-62178e7a736d------2</link>
            <guid isPermaLink="false">https://medium.com/p/454bc3da7222</guid>
            <category><![CDATA[short-fiction]]></category>
            <category><![CDATA[short-story]]></category>
            <category><![CDATA[short-stories-in-english]]></category>
            <dc:creator><![CDATA[Ray O'Hagan]]></dc:creator>
            <pubDate>Fri, 16 Jun 2023 07:43:46 GMT</pubDate>
            <atom:updated>2023-06-16T07:43:46.409Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*crBNZ4d5I_XTeY1S" /><figcaption>Photo by <a href="https://unsplash.com/@peter_forster?utm_source=medium&amp;utm_medium=referral">Peter Forster</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>When I look back I can pinpoint where it all started, the simple event that changed the course of my entire life. It was just a working bee for the kindergarten that two of our children attended, building a new playhouse. That was it, everything changed after that day. I was there because I had all the woodworking tools. I hadn’t a clue how to use most of them. I think I loved the idea of woodwork more than actually doing it. The other fathers knew what they were doing, I was just standing there like a useless knob. They were the fathers whose children looked up in awe of what they were doing. Mine were nowhere to be seen.</p><p>I often saw the other fathers around the town with their children and I admit I envied them. Simon and Nick spent their weekends bringing their children to all manner of sporting activities that myself and my wife were glad that our children weren’t interested in. We occasionally met John when we camped at the regional park, where he went to a lot more than we could. He would bring his children there so his wife could have some quiet time to study for her degree. Andrew would tell me how he weaves current events into his nighttime stories for his children as a way of teaching them what was happening in the world. I personally couldn’t wait for the day when I didn’t have to read any more nighttime stories. And Roger used every opportunity he could to teach his son new things. From the names of the train stations, to the reason why Wellington can also be called Pōneke, every chance he had he would use it to help his son understand the world better. I just didn’t see the point at that age.</p><p>When we were done with the playhouse all the children gave us presents they’d made for us, all mugs with ‘Worlds #1 Best Dad’ badly drawn onto them. Yeah, it was cheesy, but I liked it, I held it with pride.</p><p>“Your’s really should say ‘Worlds #1 Worst Dad’ shouldn’t it?”. My wife, Jasmine, whispered in my ear. “You really were embarrassingly bad out there, all the other husbands, especially Simon, were way better than you.” In that moment I wanted to rip her head off, with a spoon, so it would hurt more. She had always been blunt with me, but this was going too far.</p><p>After everyone had left, a few of us stayed around to tidy up, I was barely engaged as I was still raging about what Jasmine had said to me. Driving home afterwards I saw Andrew cycling just ahead of me, in his tree lined green cycle lane. Lycra covered twat, I thought, that fucking cycle lane is taking up half the road, just for him. I checked mirrors, no one around, sped up, drifted into the cycle lane as close as I could to him. I just intended a little punishment pass, to remind him that cyclists don’t belong on the roads. I went a bit too close and clipped him. I found out later that the tree I essentially shoved him into snapped his spine in two and he died instantly.</p><p>You’d expect that I’d be upset by what I did, but I wasn’t, it made me happy. Seeing how upset Jasmine was made me happy, no more would she be able to flaunt his perfect parenting in front of me. It went down as just another car accident, no one to blame. The police spent minimal effort trying to locate the hit and run driver, simply gave up and chalked it down to just another dead cyclist.</p><p>Days later, at Andrews wake, I saw his youngest daughter alone, crying. I felt I should say something.</p><p>“Hi Amber, how are you?” I really couldn’t think of anything better to open with.</p><p>“I miss Daddy, I wish he was here.”</p><p>“I can only imagine. It was such a terrible accident.”</p><p>“He made me laugh, he was funny.”</p><p>“Yes, he was a good father, I know that.”</p><p>“He was the best, except…”</p><p>“Except what?”</p><p>“Except I won’t miss his stories. Sometimes I just wanted the big bad wolf to be the big bad wolf and not Donald Trump, or Mike Hosking.”</p><p>At that she walked away leaving me completely speechless.</p><p>Needing a break from all the misery, we decided to go camping at the nearby reserve, where, as expected, we bumped into John with his children. The rest of the weekend was spent watching how great he was as a father, how much he interacted with his children. He would spend all day playing with them, most of the time we just sat and read, which is what we always did.</p><p>Soon after that we needed to do some maintenance on the kindergarten shed. Myself, John &amp; Simon returned, with me as usual simply handing tools around. Whenever Simon was out of earshot, John continuously made little digs at me. I could smell booze from him, I wasn’t sure if it was fresh or just from the previous night. Anyone who thinks vodka doesn’t smell is deluded. He’d noticed how quiet I was camping and kept suggesting ways that I could push myself beyond my comfort zone. I fucking hate when extroverts tell introverts how they should be living their lives. Every second article you read these days is ‘Introverts, how to talk to girls at parties’, or ‘The art of small talk for introverts’. I kept intending to write an article called ‘Extroverts, how to shut the fuck up at parties’, but never got round to it.</p><p>The more he pushed me, the more annoyed I got. I couldn’t take it anymore. Impulsively I grabbed the nail gun and shot him through the eye, he collapsed immediately and died pretty quickly. Placing the nail gun in his hand I called for Simon. In the proceeding moments I tried to convince him and the police that somehow the nail gun got stuck and as John looked into it it went off straight into his eye. I honestly didn’t think anyone would believe me, but as it turned out. John was a functioning alcoholic. At his post-mortem his blood alcohol level was 4 times the legal driving limit. Officially his cause of death went down as misadventure, due to the fact he was half pissed at the time. Apparently the reason he went on so many camping trips was so he could drink all day and have no one question him. It was the reason he was so playful with his children, he was drunk most of the time, but had developed ways to hide it. My image of him as a perfect parent took a bit of a hammering. I simply hadn’t realised.</p><p>One thing that had been bugging me since that kindergarten day though was the comment about ‘Simon’, and how great he was. Was she screwing him? In my mind, quite likely. I obsessed over it. I checked her phone, but she had her location tracking off. Her emails and texts gave no clue. Her mysterious ‘massage’ appointments seemed too frequent for my liking. No one needs that level of calmness, surely? So, I did the only thing a sane person would do in this circumstance, I kidnapped him to find out the truth.</p><p>In fairness, it must have been terrifying to wake up naked, bound to a chair, with barbed wire wrapped around your ball sack, seeing me standing there wearing a butcher’s apron and gloves, brandishing a hammer and a wood chisel. I have often thought, during all those Criminal Minds episodes I watched, why no one was ever tied up naked. It’s way more terrifying surely? Simon’s sweating and widened eyes indicated it was.</p><p>“What the fuck Warren?” he trembled.</p><p>“I believe you’ve been fucking my wife.”</p><p>“Your wife? Jesus, I wouldn’t touch her with a barge pole.”</p><p>“Fuck off. I hear the way she talks about you, about how perfect you are, about how great a father you are.”</p><p>“Seriously? Me, a great father? I’m pathetic. I use the kids as cover for my affairs. I drop them off at their sports, then go round and shag one of the mothers and come back in time to pick them up. I don’t think I’ve ever seen them play.”. He started to sweat more.</p><p>“Is that what you do with Jasmine?”<br>“I AM NOT FUCKING HER! I’m fucking her sister alright, but not HER.”</p><p>“I don’t believe you. And if the rest is true then you’re a sad sack of shit that doesn’t deserve to have children.”</p><p>“You’re right, I don’t. I’m not perfect, but I don’t deserve to die!”</p><p>“I can’t believe I idolised you and thought you were a perfect father.”</p><p>“Idolised me? Well, that’s fucking stupid.”</p><p>“Stupid? Are you calling me stupid?”</p><p>“Maybe not stupid, but a useless, crap, fuckwit of a father, definitely.”</p><p>I couldn’t take it any longer, I had to shut him up, and quickly. I pulled the barbed wire tight and in one swift move chopped off his cock with the wood chisel and shoved it down his throat. I sat and watched him die, trying to decide if he’d choke to death before he bled out. Turned out he choked to death first, which made sense as less blood than I expected was coming from where his penis used to be. But then equally, I didn’t think someone could choke on anything that small. The fact I’d stolen the wood chisel from a nearby known sex offender meant he got the blame for it all, a stroke of genius on my part.</p><p>At the funeral my wife did confirm his story was all true.</p><p>“My sister is very upset, she really liked him for some reason.”</p><p>“Yeah, they were fucking. To be honest I thought you were fucking him too.”</p><p>“Simon? He’s not my type. Muscles and hair. That’s what I want in a man. You used to have them, now look at you. At least Nick has looked after himself.”</p><p>“Nick?”</p><p>“He’s more of a man than you’ll ever be now.”</p><p>Again her bluntness fucked me right off. Muscles and hair, muscles and hair. Two things I’ll never have again. Bitch, bitch, bitch. I work with Nick, I see him every day. I vowed to fuck him up, and her too, completely.</p><p>I knew what I had to do. I built up my woodworking knowledge and it turns out making an extra large box doesn’t involve a lot of skill, which was handy. Digging a hole in the back garden and keeping the real reason for it from your wife took a lot of more effort.</p><p>“Why are you digging a hole?”</p><p>“Foundations.”</p><p>“For what?”</p><p>“A new deck.”</p><p>“In the middle of the garden?”</p><p>“Yeah, it gets a lot of sun here.”</p><p>“You’re a gobshite.”</p><p>“Takes one to know one.”</p><p>“Fuck off.”</p><p>“Right back at you.”</p><p>Once it was ready I invited Nick round for some drinks, just the three of us. Two of the drinks had rohypnol in them, one didn’t.</p><p>I’m now sitting on that deck. It’s perfect. Gets sun all day and 6 feet under me is a perfectly constructed wooden box, housing more muscles, hair and bitchiness than I could ever have imagined. I can only assume that when they woke up in that box, knowing they were buried alive, that they had one last fuck, I gave them enough room for it anyway.</p><p>I picked up a beer and poured it into my ‘Worlds #1 Best Dad’ mug, and toasted to the box under the garden.</p><p><em>Jasmine, may you rest in turmoil. Bitch.</em></p><p>“Daddy, daddy, come quick.”</p><p>“What is it?” I shouted back.</p><p>“There’s a spider in the bathroom, can you get it, I want to pee.”</p><p>“Go tell your mother.”</p><p>Ah fuck.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=454bc3da7222" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Man from Brunei]]></title>
            <link>https://medium.com/about-me-stories/the-man-from-brunei-57c8b82b2b3a?source=rss-62178e7a736d------2</link>
            <guid isPermaLink="false">https://medium.com/p/57c8b82b2b3a</guid>
            <category><![CDATA[self]]></category>
            <category><![CDATA[travel]]></category>
            <category><![CDATA[true-story]]></category>
            <category><![CDATA[scam]]></category>
            <category><![CDATA[short-story]]></category>
            <dc:creator><![CDATA[Ray O'Hagan]]></dc:creator>
            <pubDate>Fri, 09 Dec 2022 20:42:33 GMT</pubDate>
            <atom:updated>2024-03-18T19:36:33.862Z</atom:updated>
            <content:encoded><![CDATA[<h4>What could possibly go wrong being invited to a birthday party in another country?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CUxUJX6VhLhLHnw1" /><figcaption>Photo by <a href="https://unsplash.com/@introspectivedsgn?utm_source=medium&amp;utm_medium=referral">Erik Mclean</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>“Hey, Mr Man, you write in your journal?”</p><p>I looked up to see where the voice had come from. I was at a table outside Starbucks, Kuala Lumpur, there were quite a few people around, but I spotted him immediately. The big smile and waving hand was a bit of a giveaway.</p><p>“Mr Man, I come join you?”</p><p>“Yeah, sure.” He was pretty much sitting beside me by the time I’d finished that sentence.</p><p>“Mr Man, where you from?”</p><p>“Ireland.”</p><p>“Ah Ireland. You drink a lot there yes?”</p><p>“No, a bit, not always.”</p><p>“Yeah, yeah, I see you Irish, always drinking Guinness, and whiskey, you like whiskey yes?”</p><p>“Only on my cornflakes.”</p><p>“What?”</p><p>The conversation continued like this for some time, it got quite tedious in the end to be honest so I started to make excuses to be elsewhere, anywhere. As I got up to leave he stopped me and said, “Hey, tomorrow my sister having a birthday party for her little girl, she 3 tomorrow. Do you want to come along?”</p><p>A lot of thoughts went through my head in the next few seconds, “Would it be safe? Yeah, Malaysian people are pretty hospitable. Am I sure I want to do this? Yeah, it’ll be a unique experience and isn’t that what travelling is all about?”</p><p>“Sure, why not.” I replied, what could possibly go wrong?</p><p>So the next day I returned to Starbucks, and waited for my new friend. The previous evening I had a beer or 10 with an ex-pat friend of mine and my hangover made me think the man I had met yesterday wasn’t so wrong about the Irish drinking. A bit ironic I suppose.</p><p>Soon, we were in a taxi to his sister’s house. I didn’t really pay any attention to where we were going as I was mainly focusing on not being sick in the cab. On arrival I took one look around the house and immediately knew no child had ever lived in this house, books were arranged in cases in size order, nothing was childproofed and there was no Lego on the floor to agonisingly stab my feet on. Alarm bells should have gone off, but I dismissed them, assuming the child lived elsewhere and the party was simply here. It was a nice house and a woman, who I assumed to be his sister, was busy in the kitchen cooking.</p><p>“Mr Ray, you like fish, we eat first yes?”</p><p>“Ok.” I hated fish, I could never stand it, but I didn’t want to seem impolite.</p><p>“Cool. And soon my brother Patrick will arrive. He’s a blackjack dealer on a cruise ship. Maybe he can teach you some tricks.”</p><p>“That sounds good.” I was genuinely excited by the prospect.</p><p>Patrick soon arrived and the food was served. The meal consisted of fried fish and rice with a chilli sauce. If it wasn’t for the taste, texture and smell of the fish I probably might have enjoyed it, but it was taking all my concentration not to throw it back up, so I was only half engaged in the conversations. Patrick informed me that he’d been at sea on the cruise ship for several months and they had docked last night. After docking a secret game of blackjack had taken place on the ship and a very rich man from Brunei had lost some money and had to come to the house soon to settle up.</p><p>“Hey Ray, maybe I can teach some tricks, like how professional dealers can pass secret messages to players. If we do this we can play a game with the man from Brunei and maybe we can win lots of money. He’s very rich.”</p><p>“Yeah, I’m not sure, doesn’t seem right.”</p><p>“He’s got so much money he won’t miss any. Plus my wife needs a caesarean and we have no money, so maybe we can split any money and then my wife can have the baby.”</p><p>“But won’t it look a bit odd, me just being here?”</p><p>“Our sister can pretend to be your wife, then it will look ok.”</p><p>“But she doesn’t speak English and I don’t speak Malay, how can we be married?”</p><p>“Just don’t talk to her during the game.”</p><p>“I didn’t bring any cash with me.”</p><p>“I will give you 30 US dollars, you pay me back with the winnings.”</p><p>There was an answer for everything. “Eh, ok, I guess.”</p><p>Over the next 20 minutes or so I was given a crash course in how a dealer supposedly cheats. The cheats were so obvious I had no idea how anyone could actually fall for this, but for some reason I was willing to play along. At this point I think I needed to know where this afternoon was going. I knew I was likely in the middle of a scam, but couldn’t figure out how. Soon enough the man from Brunei arrived, clutching a brown briefcase, and large gold rings were visible on every finger.</p><p>“Hey, you want to play some more blackjack. My sister’s husband is here, and he wants to play too.”</p><p>“Yes, I would love to play.”</p><p>We played several hands, the sister sat beside me, holding my arm, often resting her head on my shoulder. It looked genuine I suppose. I won some, I lost some. I followed the dealer’s secret signals, all the time wondering how the hell the man from Brunei didn’t seem to notice what was going on. After about 6 hands I’d basically broken even, the $30 was still in my possession. During the next hand the man from Brunei stuck on two cards, I picked up a third. I had 21, I could not lose this hand. I bet the $30 I had left. The main from Brunei, with a big smile, lifted up his briefcase, opened it up, and upon showing me the bundles of American cash contained in the case shouted</p><p>“80,000 US DOLLARS!”</p><p>There was silence. It went on for what seemed like an age afterwards. Everyone was looking at each other with stunned faces. Upon seeing the cash my ‘wife’ had sat bolt upright and now looked confused.</p><p>“Are you sure?” Patrick questioned, “That’s a lot of money.”</p><p>“I am very confident in my cards.” He sat back with a smug grin and folded his arms.</p><p>Patrick looked over at me in shock, I guess he was expecting me to make the next move.</p><p>“I cannot match that bet, I don’t have that kind of money.”</p><p>Patrick beckoned me out of the room, I put my cards in my back pocket and followed him. Now I definitely knew it was all a setup, even if I hadn’t realised it before. Leaving the room with your cards is something the man from Brunei would definitely have objected to had he been genuine. I really had no clue what was happening.</p><p>“Patrick, I don’t have $80,000. I have no idea what’s going on here. You can’t expect me to match that.”</p><p>“I know you don’t have $80,000 but I dealt you 20, didn’t I, so maybe it’s a draw and he leaves.”</p><p>“You dealt me 21. He can only have 20.”</p><p>“Then we cannot lose, we can take his money and my wife can have the baby. ”</p><p>“This is stupid, I’m travelling, I don’t have that kind of money. Seriously, what is all this about?”</p><p>“I have a friend who might be able to help, he lives nearby. I have an idea, come back into the room.”</p><p>On returning to the room we collectively agreed to put our respective cards into envelopes and sign the seals. This would give us time to talk to Patricks friend to get the money and continue the game later.</p><p>“Before we leave,” the man from Brunei insisted, “Mr Ray, I would like you to prove you have some money behind you, maybe show us your credit card or something.”</p><p>“Yeah, you rich man, Mr Ray, just show your credit card and then we can talk to my friend.”</p><p>“I don’t have one.” Something in my head that morning had told me that coming here with credit cards or cash might be a bad idea. Thank god I had listened to myself.</p><p>“However, seeing as you don’t trust me, I’m not sure if I trust you now either. I need you to prove to me that there is indeed $80,000 in that suitcase.”</p><p>“What! I’ve never been so insulted! This is outrageous.”</p><p>“If there’s $80,000 in that suitcase then show me.”</p><p>“I am not staying here to be insulted further.”</p><p>At this, the man from Brunei got up and stormed out of the room. Patrick stood up quickly and kicked his chair across the room.</p><p>“Why did you do that!” He flipped the contents of the table onto the floor, my wife backed herself into a corner. “Now my wife cannot have the caesarian. Why did you do that!”. Cards, loose coins, 30 US dollars were all being kicked at me. “You ruined my life, this was our chance!”</p><p>I moved quickly out of the room, the brother jumped up from the sofa,</p><p>“Hey, what happened, you want ride back to city?”</p><p>“Fuck off!”</p><p>I left the house, not daring to look behind me. About 10km in the distance I could see the Petronas Towers, and for the next few hours I put one foot in front of the other until I was safely back in the city. I’ll think again before I accept any more invitations to children’s parties in the future.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=57c8b82b2b3a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/about-me-stories/the-man-from-brunei-57c8b82b2b3a">The Man from Brunei</a> was originally published in <a href="https://medium.com/about-me-stories">About Me Stories</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Writing readable JUnit tests]]></title>
            <link>https://medium.com/codex/writing-readable-junit-tests-9fbb31e28746?source=rss-62178e7a736d------2</link>
            <guid isPermaLink="false">https://medium.com/p/9fbb31e28746</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[junit]]></category>
            <category><![CDATA[better-programming]]></category>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[kotlin]]></category>
            <dc:creator><![CDATA[Ray O'Hagan]]></dc:creator>
            <pubDate>Tue, 07 Jun 2022 03:37:10 GMT</pubDate>
            <atom:updated>2022-06-23T13:13:57.986Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9DMEVPiAswX_UokM" /><figcaption>Photo by <a href="https://unsplash.com/@jstrippa?utm_source=medium&amp;utm_medium=referral">James Harrison</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>We’ve all been there before. You code your feature, write your tests, run the complete test suite and find a failure in a seemingly unrelated test. You go to look at it and are confronted with something that looks like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*sESM_OKc_p-YVJjxXrapwg.png" /></figure><p>Looking at the code you realise you’ve no idea what the test is trying to test in the first place which makes it inherently harder to understand why it might be failing. There are some simple changes that can be made to the test however to improve the readability.</p><p>The following examples are written in Kotlin, but the ideas also apply to Java.</p><h3>Writing clearer tests</h3><p>Lets assume that this is the method that is under test in the above example</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*-gB3FelzYnoUJ_ma0TnOjg.png" /></figure><p>It’s a pretty straightforward flow:</p><ul><li>If the PDF_GENERATION feature is enabled and the user is authorised to export PDF documents, then retrieve the patient data, check if patient details are private and anonymize if so, finally returning the PDF.</li></ul><p>However it’s unclear which part of this flow the test is trying to verify. Lets examine some ways that the test could be more self documenting.</p><h4>1. Describe the test</h4><p>JUnit provides a @DisplayName annotation that can be used to provide extra information about the test:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*CMewL0hoAIaLUcuEImZzLw.png" /></figure><p>Additionally (or alternatively) the test itself can be renamed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*z4jQGAsYX6-3kzWz33iOJQ.png" /></figure><p>Either of the above methods should be used to give more clarity about the tests purpose.</p><h4>2. Only test one thing</h4><p>If we look again at the test:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*sESM_OKc_p-YVJjxXrapwg.png" /></figure><p>We can see at line 55 that another condition is being tested within this test i.e. the patient details not being private. Any given test should be concerned with testing only one part of the flow. The second condition being tested here should be split off into a separate test. This leaves us with:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*JKxJQFoXdF6IcRP5zcCqoA.png" /></figure><h4>3. Rename the instance variable of the class being tested</h4><p>In this example the test is testing the PDFGeneratorService. However this service is just one of 4 or 5 other services that are being mocked out in this example and glancing at the code it should be clearer as to which of these services is actually the one being tested. A suggestion is to rename the instance variable of the class being tested to something more distinct such as <em>testClass</em>, or <em>classUnderTest</em> as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*mumdoLw-a_SzYMCBaAS2Cw.png" /></figure><p>This makes it clearer which part of the test is calling the class being tested as opposed to defining any mocking/stubbing behaviour.</p><h4>4. Separate into phases</h4><p>Unit tests have 3 distinct phases:</p><ul><li><strong>Setup</strong>: Setup any mocking/stubbing behaviour needed for the test.</li><li><strong>Execute</strong>: Execute the test. Ideally this should be a single line of code.</li><li><strong>Verify</strong>: Verify the test did what it was supposed to do.</li></ul><p>These phases can go by different names, <em>given/when/then</em>, or <em>arrange/act/assert</em>, but the principles are the same.</p><p>Declare each of these phases with a simple comment, ensure the correct code is in the correct phase and the code now looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*dApb_EqalbJXAu-VZm926Q.png" /></figure><p>Now each part of the test code has a place to go and each stage essentially tells you what it’s doing.</p><p>Occasionally some of these phases may be combined e.g. if the execute phase is expected to throw an exception then the execute &amp; verify are likely to executed and verified at the same time.</p><p>Splitting the test up like also allows you to focus on the individual parts of writing the test. So instead of “How do I write the test?” you’re asking “What do I need to setup to execute the test” and “What verification should the test perform”.</p><h3>Summary</h3><p>In this article we’ve looked at a few ways to make your JUnit tests more readable. So hopefully next time you need to update any tests you can understand what behaviour the test is trying to verify, and at what stage any failure is occurring as it should be clearer what might be causing any failure, or it may just make the test easier to maintain as the code changes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9fbb31e28746" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codex/writing-readable-junit-tests-9fbb31e28746">Writing readable JUnit tests</a> was originally published in <a href="https://medium.com/codex">CodeX</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Practical Spring Boot lazy initialisation]]></title>
            <link>https://medium.com/@raimy69/practical-spring-boot-lazy-initialisation-bc85063875d3?source=rss-62178e7a736d------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc85063875d3</guid>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[kotlin]]></category>
            <dc:creator><![CDATA[Ray O'Hagan]]></dc:creator>
            <pubDate>Fri, 03 Jun 2022 02:30:51 GMT</pubDate>
            <atom:updated>2022-06-03T02:30:51.935Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gXTVLZpEIGQG9o7d" /><figcaption>Photo by <a href="https://unsplash.com/@priscilladupreez?utm_source=medium&amp;utm_medium=referral">Priscilla Du Preez</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In Spring Boot by default all defined beans, and their dependencies, are created when the application starts and the context is initialised. Enabling lazy initialisation globally is a good way to speed up the start time of the application as beans are only created when they are required.</p><p>In a real life application it’s often not practical to simply enable lazy initialisation across the board, some beans you may want to create on application startup, and there are others that are still created regardless of this setting. This article looks at how to startup Spring boot</p><p><strong>Enabling global lazy initialisation</strong></p><p>To enable lazy initialisation globally, simply add the following line to your <em>application.properties:</em></p><pre>spring.main.lazy-initialization=true</pre><p>or if using an<em> application.yml</em> file:</p><pre>spring:<br>  main:<br>    lazy-initialization: true</pre><p>Either one of the above will instruct Spring to initialise all beans lazily as needed. To prevent Spring from doing this for a particular bean, the Lazy annotation can be used:</p><pre>@Component<br>@Lazy(false)<br>class HelpService {<br><br>    @PostConstruct<br>    fun init() {<br>        <em>println</em>(&quot;I was created eagerly&quot;)<br>    }<br>}</pre><p><strong>Database configuration</strong></p><p>If you have a manual database connection configuration class then this ideally should be eagerly loaded. If your application cannot connect to the database then you should know about this on startup and not have it deferred until you start servicing requests.</p><pre>@Configuration<br>@Lazy(false)<br>class DatabaseConfig {<br>    <br>    @Bean(name = &quot;dbHelpService&quot;)<br>    @ConfigurationProperties(prefix = &quot;spring.db.helpservice&quot;)<br>    fun createHelpServiceDataSource(): DataSource<br>    {<br>        return DataSourceBuilder.create().build();<br>    }<br>}</pre><p><strong>Swagger</strong></p><p>Most applications I’ve worked on have had Swagger installed. Unfortunately this will eagerly be instantiated regardless of the Spring lazy setting as it has it’s own setting. Springfox swagger will do it’s own classpath scan on startup which can also slow down application initialisation. To disable the auto startup add the following to the<em> application.yml </em>(or <em>application.properties</em> equivalent):</p><pre>springfox:<br>  documentation:<br>    auto-startup: false</pre><p>This basically disables Springfox completely, so to have it initialise when requested add a HandlerInterceptor to start it:</p><pre>class WebConfig : WebMvcConfigurer {<br><br>    override fun addInterceptors(registry: InterceptorRegistry) {<br>        swaggerInterceptor().<em>apply </em><strong>{<br>            </strong>registry.addInterceptor(this)<br>                .addPathPatterns(&quot;/swagger-ui/**&quot;)<br>            registry.addInterceptor(this)<br>                .addPathPatterns(&quot;/v2/api-docs&quot;)<br>        <strong>}<br>        </strong>super.addInterceptors(registry)<br>    }<br><br>    @Bean<br>    fun swaggerInterceptor() = SwaggerInterceptor()<br>}<br><br>class SwaggerInterceptor : HandlerInterceptor {<br><br>    @Autowired<br>    @org.springframework.context.annotation.Lazy(true)<br>    private lateinit var documentationPluginsBootstrapper: DocumentationPluginsBootstrapper<br><br>    override fun preHandle(<br>        request: HttpServletRequest, <br>        response: HttpServletResponse, handler: Any): Boolean {<br>        if (!documentationPluginsBootstrapper.<em>isRunning</em>) {<br>            documentationPluginsBootstrapper.start()<br>        }<br>        return super.preHandle(request, response, handler)<br>    }<br>}</pre><p>Note that the DocumentationPluginsBootstrapper is in itself lazily loaded</p><p><strong>Feature flags service</strong></p><p>There are many ways to implement feature flags in a Spring boot application, Togglz, Split.io, Unleash, etc, or even just using Spring profiles to manage feature availability. The feature flags service should be created eagerly. Again, if connecting to a remote provider (such as split.io) then you should know about any failures on startup. In addition, many of your beans will likely need to know the state of their relevant features when they are requested, so it’s more efficient to have this active on startup.</p><p><strong>Summary</strong></p><p>Hopefully this helps someone wanting to start Spring boot practically with lazy initialisation as the default.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc85063875d3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>