Raz's Journal

Occasional musings and things


A busy start to the year

Sorry I know it's been ages since I wrote anything here; between working, spending time with Tom and general procrastination this thing is a pretty low priority. I'll keep this fairly concise as I'm not feeling very waffly this evening!

2014 was kicked off up here in Yorkshire with Tom which was fab, it's shame the weather was awful though as it kept us fairly housebound. Tom got me some awesome Xmas pressies including Bioshock Infinite which was fab, best game I've played in ages.

Gareth and Penny stayed over one weekend in mid-January giving us a chance to catch up and for Tom to get properly introduced to Gareth who he'd only briefly seen before. Miss those guys, wish they weren't so far south!

I won two trophies (highest score in prints and highest score in projected images) and came joint photographer of the year with two other members at the camera club which was nice. So a bit of silverware on display in the living room at the moment :) I'm now the competition secretary for projected images for the coming year, so taking on a bit more responsibility in the club. We've just ordered a very expensive new 1080p LCD projector so I'm looking forward to modernising things a bit.

Valentines the other week was nice, we had a quiet night in and I cooked us up a tasty steak and ale pie.

The big news is, owing to a sudden change in circumstances, Tom will be moving in at the end of Feb! We'd originally talked about moving in together after 12 months (so sometime after July) but then it turned out Tom's unemployed flatmate had run out of money and would be moving out within a month and the landlord had decided to sell their house and wanted them out anyway. It came as a bit of a surprise but I'm looking forward to it.

Finally as our birthdays are just a couple of days apart in April, we've decided to have a little long-weekend holiday to celebrate together. After looking at a few options we settled on Copenhagen which looks awesome and wasn't too expensive.


An eventful month

Well it's a little less than two months since I last posted anything and a few things have happened in the mean time so here goes. I mentioned last time that I was starting to put some more effort into finding myself a partner. To my surprise that happened almost immediately, I met Tom in Leeds at the start of July and we've been going out ever since. We've been spending most weekends together with either him showing me cool places around Leeds (we've done Harewood House, the Yorkshire Sculpture Park and Armley Mills so far) or me taking him on walks around Calderdale. With July being predominantly hot and sunny it was nice to be able to spend lots of time outdoors. He's a couple of years younger than me (2 years and 2 days to be exact), shares quite a few of my interests and is just a really nice person ^_^

July also saw the departure of Gareth and Penny from Mytholmroyd down to Kent. After spending so much time with them over the last year it makes me a bit sad I won't be able to see them nearly as often going forward. Still at least they're not on the other side of the Atlantic. I'm off to their house warming this coming weekend and it will be nice to catch up, say hello to Holly and Button and play a few boardgames again.

I've been keeping myself fairly busy work wise too, I'm hoping to turn my photography hobby into more of a side business so at the very least it can pay for itself in terms of equipment and things. To that end I've setup a new photo blog called Light Priority, please take a look :)


1 year later

So it's just about a year since I completed my move from Aberystwyth to Mytholmroyd. It's been a busy one at that, filled with new experiences, places and people.

Highlights included a wonderful group holiday to Alderney, getting to fly around the country courtesy of Bowker Airlines, meeting some great new friends at the Hebden Bridge Camera Club and being able to explore such a picturesque part of the country through the changing seasons.

Waist deep floodwaters last June, warm lazy evenings, days where the hilltops vanish into the clouds, spectacular autumn colours, frozen waterfalls and towering snow drifts. It's not hard to see how this place helped inspire Ted Hughes' poetry.

It's not quite all been poetic though, there was that misadventure on the tops in March and business was a bit crap last year which has meant not having a ton of disposable income. On the personal side of things also a bit of a mixed bag. I feel like I've drifted apart from some old friends who seem disinclined to stay in touch, which is a bit saddening. On the other hand I've made new friends too, so I suppose that's just the way of it. I'm still hoping to meet a nice guy to spend my life with and actually putting a bit more effort into it of late as relying on serendipity hasn't gotten me very far in recent years and my tendency to chase rainbows has also lead to more than one dead end. On the upside living in England again and nearby to some large population centres ought to improve my odds significantly.

Roll on year 2, lets see what you bring!


Misadventure on the tops

At 17:34 on Monday I called 999 for the first time in my life. I badly misjudged the severity of the snow up on the tops and after what had been an amazing walk across the moors to Stoodley Pike, found myself stuck on a track in deep snow with my route ahead completely blocked by towering drifts. I'd already walked far further than I'd planned and I'd neglected to bring a torch out with me. Realising I didn't have enough daylight left to find my way back safely, I started to feel panic rising.

For much of the walk I'd been following others' footsteps in the snow. I have a very good GPS O/S map on my iPhone so I could tell the trail I was following was a proper footpath and the fresh tracks let me avoid the many hidden bogs and streams that dot the landscape up here, as well as judge the stability and depth of the snow. A combination of powdery snow and strong winds had resulted in enormous drifts forming, particularly in all the little lanes and against all the old dry stone walls alongside which the paths run. I've never seen snow like it in my life, in some places meters high, over topping walls, blocking gateways and burying stiles. The snow density varied so much that one step might only sink a few inches and another might sink a few feet. Unfortunately following these footsteps helped lull me into a false sense of security. As I would go on to feel out of my depth when confronted with untrodden snow of untold depth and stability with fading light and bitter wind blowing me in the face.

The first alarm bell rang in my head when I nearly lost both snow boots in an unexpectedly boggy patch which the previous walker had apparently breezed straight through. The mud ripped both boots clean off my feet as I tried to step through leaving me in my socks against the freezing ground. It took quite an effort to free both boots but at least neither had been topped by the muddy water. Still that was little consolation given my socks were now wet from the snow. But panic over, the sun was shining and I felt otherwise snug enough so I decided to press on to Stoodley as it was now very close. I've had wet feet out walking so many times now I'm used to it.

Brief blue skies

Stoodley Pike still in the distance but already looming large surrounded by bleak landscape

After reaching the monument and grabbing some photos I got out my phone to start to plan the easiest way home. To my horror the phone suddenly flashed me the "You have zero battery charge" red bar icon and promptly powered off. This was crazy as the thing had a full charge when I set off and should have been fine. Thankfully I got it to restart and the phone decided it had around 70-80% of a charge left. Disconcerted after that incident already, I realised it was already nearly 17:00, which was an hour past what I'd earlier decided would be my turn around and head home time. I guess a combination of being slowed down by the snow and distracted by the awe inspiring scenery, had distorted my sense of time passing. Looking at the map I found I had relatively few options for a quick way home, but the most promising seemed to be back towards Cragg Vale, which at the least would put me on familiar ground and it would be easy enough to walk back along the road in the dark as I've done it before.

Being careful to avoid the area where I'd nearly lost my boots earlier I started on the route I'd initially picked to head back via which would have taken me along the side of Sunderland Pasture (a pine forest) down to Withens Clough Reservoir. Familiar territory. Thankfully at first it seemed like someone else had taken this route and I was once again able to follow their footsteps. Then abruptly their trail turned into the trees. I started to feel a bit scared, the path ahead was a maze of tall tufty snow laden grass and reeds. I made several sinky steps forward before stopping realising this route wasn't going to work. What should have been the simplest route was closed to me. Trying to calm myself I back tracked to the intersection where the Pennine Way and several other footpaths cross. Looking at the map on my phone again I re-plot my route - there's another path down towards the reservoir but it's much less direct and runs through the pine forest. Still that's a better alternative than trying to find my way back over the moor or taking an even longer route down towards Hebden or Charlestown.

Not going this way

A drift far worse than the one pictured here blocked my way

I climb over another wall and find the path through the wood is actually a wide open track and is pretty deep with snow. Thankfully there's some footsteps to follow. I head down it for about 20 minutes, still feeling distinctly uneasy. At 17:25 I decided I really should let someone know where I am so I left a quick Facebook update stating "On my way back from Stoodley Pike via Cragg Vale. If I don't checkin on FB by 8ish send search parties!". Once again the footsteps veer off the track into the trees. Cursing I find myself next to a permissive path sign which after checking on my map points toward Cragg Road. At this point the idea of being on a road of any kind is extremely appealing so I head off towards it as hastily as the 1 to 2 foot of snow on the ground allows.

Around 10 minutes later I reach the boundary of the forest area, a towering snow drift blocks the gateway ahead of me. I'm scared now, I've used up another half hour of day light and every easy route is blocked. I could try and go back up the permissive path and continue down through the deep untrodden snow on the woodland track or… I realise I'm out of options. Every course I could take from here was going to leave me in the dark, snowy, cold with bitter wind on treacherous terrain. So I call for mountain rescue.

It was good to speak to someone, immensely reassuring to hear a voice. The call dragged on for what felt like an eternity where I kept reiterating my position as clearly as I could while the guy reeled off unfamiliar place names based no doubt on some distant phone mast's coordinates. Eventually I was told I'd be called back by the local mountain rescue. I had to hang up. Once again I was on my own. Over 20 minutes had passed, it was nearly 6 now. Starting to feel scared again, I wondered how long this rescue would take. I left a quick Facebook update at 18:02.

"Right that was a balls up of epic proportions. Had to call mountain rescue - please don't call me. Warm and safe for now."

It was around 10 agonising minutes before finally I got a call from Calderdale Mountain Rescue at 18:05. A friendly sounding man confirmed my position and asked me to backtrack towards Stoodley Pike while checking on my condition. I was warm, I'd dressed sensibly enough, although my feet were starting to feel rather sorry for themselves. I was able to walk out, I just needed light and someone who knew the land.

So I walked back, called the mountain rescue guy to confirm I'd reached where he'd said and I waited. My phone's battery which had been around 60% when I'd first called for help now read only 35%. The cold was taking it's toll. I turned off as much as I could in the settings and dimmed the screen down to its lowest level. The wind had picked up and there was little shelter to be had from it where I'd been told to wait. Every time I found somewhere out of the wind, the phone would lose service. So I had to keep moving around, sometimes sitting in a broken section of the wall, sometimes jumping about to warm up, trying to avoid standing in the snow.

I got a worried call from my sister at 18:47 asking if I was alright. I said I was, but still waiting for help to arrive. A few more minutes passed and I decided to call the mountain rescue guy again to see if they were getting near. My phone flashed the 'no power' icon at me again and shutdown for the second time. After some coaxing I managed to start it again, now hovering around 20% charge. After a couple of attempts I managed to get through and was told help was very close now, that they'd parked up their Land Rovers and were heading towards me on foot.
I'm not sure how much more time passed, I tried yelling out a few times but only silence met me. Finally though I heard my name being called in the distance and the bobbing of bright LED torches caught my eye. I clambered up on a wall and waved and yelled back. Help had come.


I learned a lot of lessons from this experience as you can imagine. Some of it was stupidity, some of it was bad luck, some of it inexperience. But realising now that if my phone had packed up back at Stoodley and I'd not been able to restart it, I could potentially have died from exposure up there is pretty sobering. I certainly won't be heading anywhere so hostile again without some proper survival gear, torches, emergency chargers and the like. The Calderdale Mountain Rescue guys were absolutely wonderful, please support them.


Settled in

I've now lived up north in wonderful West Yorkshire for half a year. How time flies. The valley which looked beautiful in its summer clothes, put on a spectacular autumn show. Really it's quite breathtakingly beautiful up here. I'm very excited at seeing what new visual delights the winter will bring.

Burlees' Colours

I've been attending the Hebden Bridge Camera Club (HBCC) since September and generally finding it enjoyable. Although many of the members are what you might describe as 'elderly', there are a few young'uns like myself and we've been taking to the various local pubs after the weekly meetings as a bit of extracurricular amusement. After all the mediocre pubs in Aber the warmth and non-studentiness of the ones here is a real breath of fresh air. Another blessing is all the wonderful local breweries. I've taken quite a liking to Slightly Foxed which is made just up the road in Sowerby Bridge (sore-bee not sour-bee!).

This past weekend I attended a Japanese conversation evening in Manchester at Izakaya Samsi. It's held periodically by the Japan Society North West, of which I'm now also a member. I've been sorely lacking an outlet for something Japanesey since coming up here so hopefully this will fill the void. It's too bad there are no remotely local classes to attend. Aber had me spoiled there.

I suppose it's worth mentioning Alderney before signing off here. A truly wonderful experience which I'm very glad to have been apart of. Props to Gareth and anyone else involved in the organisation. I'd love to return sometime, still so much to explore. Brilliant to see so much history laid bare and just there to explore.


Walls, ducks and the moors

So I've been living in Yorkshire full time now for about a month and a half. After a bit of a wet start (to put it mildly), things have settled a bit and we've even been blessed with a little sunshine by the weather gods. The flat is now fully painted and has all the essential furniture, although it's still missing quite a few bits and pieces that I will be slowly acquiring as funds allow. As I write this I'm waiting on the imminent delivery of my new sit-stand desk which will finally bring a bit of order to the office where I've been roughing it with the kitchen table until now. Overall though I'm very happy with the new place, it's been a revelation to finally have separate rooms again. I've written previously how tired I was getting of studio living, with everything crammed into one space. Now with everything nicely segregated; I can go to the office to work, or the living room to chill, or to the bedroom to rest. It's no longer just about hopping from one piece of furniture or corner of the room to another. Each room has it's own purpose and feeling, which to all of you living in nice big houses and apartments likely take for granted already. But to me it's something new, well relatively new, as I had multiple rooms in Gwen-y-don during my brief 6 month stint there before the landlord decided they'd rather sell the place. That was 6 years ago now though, so you'll have to forgive me if I indulge a little in my new surroundings.

I'm loving having a bit of outdoor space for the first time too, although I'm yet to make full use of it. It's truly enjoyable to be able to throw the doors open and tear down the barrier between out and in for a little while. On a warm dry day the balcony makes a great second office or space to sit and chat over a beer. I've counted as many as 30 ducks on the canal below, which spend much of the day bobbing around sedately and quacking at each other. At least until some bread is thrown their way, then it all becomes a bit frenzied. A growing number of pigeons roost on the building across the canal, a gaggle of canada geese periodically come and visit (although they've been spending much of their time in Hebden Bridge of late) and some crows often swoop down to nab any bits of bread that miss the canal. It makes a very pleasant change from the endless cries of seagulls.

The other thing that's new to me is what's beyond these walls - namely Yorkshire. A place I'd never really been to until around a year ago when I came up for Gareth's birthday last August. What a discovery it's been. Nestled in this valley with the Pennines towering 400 metres above me on either side, ancient ruins of past industrial glory around every corner, desolate moors, prehistoric remnants - this place feels ripe for exploration and adventure. I feel like I walked every path around Aberystwyth twice or more, such a feat would be a far more daunting task here. My OS map indicates endless footpaths winding around the valley sides, across the moors and beyond. One thing I am having to come to grips with is the sheer wildness of it all here. I got overly used to the well trodden routes around Aber. Here it's often more of a battle. You can see where you want to go but the path will be overgrown, or flooded, or half washed away. It makes it more challenging, messy (a true test of any claimed waterproofness on your shoes is to walk on Erringden Moor) and tiring. Still what delights await, what strange novelty it is to find cobbled footpaths high in the hills, ruined buildings, bronze age remnants, twisting streams and mossy woods. Then there are the views, you look up from what ever tangle is perilously hiding your feet and are presented with a stunning vista that seems to go on forever.

Mytholmroyd between the trees

The view down to Mytholmroyd from Daisy Bank.


The great of flood 2012

As you may have seen on the national news, on Friday evening my new hometown Mytholmroyd suffered quite serious flooding after a month's worth of rain was poured into the Calder Valley in just 24 hours. The river Calder had been running pretty high all day but it seemed to be coping with the volume of water. Just before 8pm I heard the faint sound of the flood warning sirens echoing down the valley, presumably from Hebden Bridge or Todmorden. About 10 minutes later the Mytholmroyd siren sounded. By 8:30pm it was clear a significant amount of water was starting to gush down the Burnley road (A646), the main road through the town. I braved the heavy rain for a bit to go investigate, already quite a few bystanders had gathered to watch the unfolding event.

The traffic was soon reduced to one lane as the waters on the lower side of the road rose. The police were rapidly on the scene and they started redirecting traffic up Caldene Avenue which is on higher ground.

Before long though the road was becoming impassable and was closed around 9:45pm. By 10pm the water was flowing so fast it carried most of the traffic cones that had been placed across the road away and even pulled away the sandbagged down metal diversion sign. By this point the water was well above the curb and presumably starting to flood all the road side shops and houses. By 10:20pm I could see from my flat that the post office was flooded with water reaching about a third of the way up the pillar box outside the entrance. People still trying to make their way down the road on foot had muddy, fast flowing water almost to their waists at this point.

By 11pm the water was well over half way up the pillar box and must have been near a metre deep from the road level. Worryingly it had also reached the bottom of the steps up to my building's car park which was a bit close for comfort.

I finally went to bed around midnight after the strange experience of watching a live BBC news report coming from literally just down the road. I woke around 5am and went to check on things and found the flood waters had receded, leaving muddy residue on the road and pavements outside along with various debris. The canal was significantly fuller than I've seen it before, with the water level only a few inches from the top, but the stretch of it outside my building hadn't flooded thankfully. The power, which had stayed on through the flooding, went out in the morning and proceeded to go on and off until the early afternoon.

Later I was able to see the full extent of the flood damage - all the shops and houses along the lower parts of the Burnley road through Mytholmroyd were flooded. Up the road in Hebden Bridge things were a horrible mess too. Many of the lovely little shops and cafes had been inundated with filthy water. We saw the fire brigade pumping flood water from the basements of some of the buildings and the sad mess of ruined carpets and stock sat out on the pavements as shop owners did their best to scrape the sludge from their floors.

Happily though as soon as Sunday afternoon things were starting to get back to normal. One or two flood hit shops had already reopened and power was properly restored. It's certainly going to be awhile before the worst effected areas recover fully, but hopefully with the support of the local community Hebden Bridge and Mytholmroyd can get back on their feet.


On moving

It's such a relief to be moving. I've been stressing about my post-Aber life for going on two years now so it's wonderful to have a new home lined up. I picked up the keys to my new apartment on the 21st of May and have spent the last two weeks doing the most cleaning and decorating I've ever done in my life. The flat wasn't left in an awful condition by the previous tenant, but nothing was cleaned, beyond the carpets which were given a quick hoover. This has led to a near endless series of cleaning tasks to remove years of neglected grime from things like the shower, fridge, freezer, washing machine, extractor, air vents and so on. The good news is I've nearly finished cleaning. Nearly. Decorating is also taking a long, long time. The living room was the toughest, as the previous tenant was a filthy smoker. Which resulted in the ceiling and walls needing to be washed down multiple times, the carpet thoroughly deodorised, the curtains washed (oops they shrank a bit!) and a total repaint. So far the only other room I've repainted is the hallway, the master bedroom is part painted as I write this and I hope to finish this off next week. I'm already sick of painting and buying expensive cans of paint and cleaning rollers and brushes. But on the upside it's great to be able to put my own stamp on the place and have a choice over the colours rather than being stuck with just magnolia on everything.

Aside from cleaning and decorating which has been wearing me down, I really love the flat. It's huge, the living room and kitchen alone are about the size of my Aber flat, with a very generously sized master bedroom with en-suite and smaller second bedroom that will serve as my office. As this is my first unfurnished place I've had to buy a ton of furniture, which even with some help from my dad has cost me rather a bit and I'm not even done yet! But it's wonderful having my own bed and mattress and sofa at last. It makes this feel like my first proper grown up home with all my own stuff in it and my own paint on the walls.

View from my balcony over the Rochdale canal

The views from both the front and back of the apartment are fabulous, particularly on the canal side where I can watch ducks and canada geese quaking and honking away merrily from the balcony. I'm also afforded wonderful views of the Pennine hills climbing far, far above the valley floor on both sides. The location is great for a number of reasons beyond the sheer scenic beauty of the area however. I'm within a minutes walk of a Sainsburys Local and post office, 5 minutes from a small Co-op, train station with regular services to Manchester and Leeds and a couple of minutes from the bus stop with services running every 10 minutes to the wonderful nearby towns of Hebden Bridge and Halifax. To top it off; Gareth and Penny are but a short walk away, Matt P is a little over an hour away in Macclesfield and Dan B (an old friend from uni) is 30 minutes away near Rochdale. Did I mention this place is £50 cheaper a month than my studio in Aber?

I will certainly miss the friends I'll be leaving behind in Aber, and the town itself, it's been home to me for much of the last decade and is full of memories. But I'm really happy to be moving on a bit with my life, it will be great to make new friends and discover new places. Best of all I feel like I've found a place a bit like Aber, but without the isolation.



So I'm leaving Aber this summer, at last, although the exact date of departure is still being worked out. I need to be out of my old flat by the end of June when the tenancy agreement finishes so that sets the upper time limit.

After I failed to find anywhere nice down Oxford way I decide to try casting my gaze further north and have settled on the lovely village of Mytholmroyd which lies roughly half way between Manchester and Leeds with excellent transport links to both. I had originally hoped to find somewhere in Hebden Bridge which is a mile up the road on the Manchester side, but a lack of nice properties within my price range caused me to widen my net a bit. As a result I've found a really lovely, spacious and modern 2 bedroom apartment with a huge balcony overlooking the Rochdale canal and green, leafy hills beyond for an extremely reasonable £450 a month. Throw in that it's only five minutes from the train station and local supermarket and it's very hard to find fault. It also has the benefit of having the lovely Gareth and Penny very nearby, if only for another year or so.

The apartment has a nice large living room with aforementioned balcony, leading to a modern kitchen, two bedrooms - one with an en suit shower room, bathroom, storage cupboard with hot water tank and entrance hall. Once again I've managed to find somewhere on the top floor (my 3rd consecutive flat with this feature) so there's a fair few steps up to it. On the upside this improves security and reduces heating bills a bit. It also means I don't have to worry about anyone clonking around above me.

The apartment will need a bit of a repaint before I move in but as I fully expect to have at least a month to start transitioning things over that should work out alright and be fresh and sparkly by the time I'm done with it. Hopefully I'll be able to do a bit of a house warming at some point!

I'll post some pictures and things once I've moved in as the ones I snapped for my own reference aren't that super.

PS - it's pronounced My-th'm-roid


Vintage code retrospective

Backing up your data is important. Early trials and tribulations experimenting with Linux (Redhat 2, Slackware and Caldera) and OS/2 Warp when I was a teenager quickly taught me that. I screwed up my PC on more than one occasion which got me into the habit of making sure I had copies of my important stuff stashed away on floppies, then removable Syquest cartridges, then Zip disks and finally on to CDs and DVDs. Handily as a result I now have an archive of my work dating back a little over 14 years. It's some of that really old stuff I'd like to talk a bit about today.

I've never liked Windows. But I was a PC user for about 5 years from 1995 through 2000. As I've already alluded to, I've experimented with many alternative operating systems (some kids did drugs, I did operating systems - I wonder which caused the most longterm mental damage). Unfortunately they were all pretty universally shit in one respect or another. This combined with a strong interest in programming often had me pottering away building my own GUIs (graphical user interfaces) on top of DOS. If you're too young (or old) to remember DOS, it was a command line driven operating system that sat beneath Windows until they switched to using the Windows NT kernel from Windows 2000 onward. You typed a command and it either did something or gave you an unhelpful error message. Abort, Retry, Fail?

At first I wrote software with DOS's bundled QBasic, where I cut my programming teeth, then on to a dodgy copy of the commercial version of QBasic (QuickBASIC) which could actually compile executables (which was a big deal as the speed difference between interpreted and compiled code was very noticeable back then). Then finally I bought a copy of PowerBASIC which was much more powerful and faster than QBasic.

Building a GUI is actually rather involved, especially when you're starting from scratch, which on DOS I was. It took a lot of trial and error but over several years I built up a set of libraries which I termed "Widgets". It grew from version to version adding features and functionality. I went from the very basic act of drawing a grey box on the screen with a 3D bevel around it to make it look like a button, to making that button clickable with the mouse, then to creating the fonts and text layout functions needed to write a title on it. Building a GUI in DOS was like building a chair out of a tree and some iron ore. Each element required a number of steps of increasing complexity to refine the raw materials into the components needed to make the end product.

This is an early font demo I made to show a friend, circa 1996.

Each letter was encoded in a bitmap format, for example this is how the letter 'A' was stored:
"A 000 n0 0 n0 0 n0 0 n00000 n0 0 n0 0 n0 0 n0 0 n n n "
Which if you break it up onto multiple lines after each 'n' you'd see a recognisable representation of the letter "A". The bold and italic variants were made by simply changing the way the bitmaps were drawn at runtime.

As an aside, back then I used to publish my work under the brand name of New Technologies which I usually abbreviated to "Nt" which you'll see in a few of the screenshots.

Getting a bit more interesting, this is a screenshot of an early icon designer I wrote (I've always liked drawing icons and they're essential when you want to make your own shiny GUI). When I got this code running again at first I thought there was a problem with the mouse driver in my DOS emulator but then I realised at this point I didn't have the mouse working in QBasic so it was all keyboard driven.

This is my first stab at a full on GUI environment called AdvanceOS. This particular GUI drew inspiration in particular from early builds of BeOS which at the time looked like it would form the foundation of the next Mac operating system and was of major interest to me even though I lacked the hardware to run it. This was a late QBasic app and still lacked mouse support so it was all keyboard driven. Widgets at this point was still quite basic. In brief AdvanceOS comprised of a note viewer which supported limited rich text, a picture viewer that only supported my own proprietary bitmap format and a file browser. To my amusement I discovered that I'd also built in quite a decent graphical error logger which I got to see in action as the file browser choked on some metadata files MacOS had dumped on the disk at some point prior to it being imaged.

This is a graphical font designer I wrote. Note the mouse cursor! Things are much more sophisticated now with pull down menus, a draggable window and more control types. The font format too has evolved a lot, in particular I did a lot of work to make it as fast as possible. You could watch each line of text being drawn with my earlier attempts, my later font system which I dubbed the "Advanced Font System", could fill the screen with text in an instant. Rather than simply storing a bitmap for each letter, it instead used a vertical run length encoding (RLE) algorithm. Here is how the letter A was encoded in a similar font to the one shown above:

"065 05 07 .000. 1612131213121316"

The first three digits are the ASCII code of the character, then the width and height. Then there is a line that sets the initial state of each column of pixels in the character. For whatever reason I used a period to represent transparent, "don't draw anything", and 0 to represent a solid colour. Each number then corresponds to alternating lengths of transparent or filled pixels. It knows when to get to draw the next column when the number of pixels drawn (or not drawn) equals the height of the character. This would have been a nightmare to type out by hand, but was made possible by the graphical font designer. If you're wondering how it handled lines larger than 9 pixels have a look in the code listing below.

The code I wrote looks totally unintelligible to me now it's been so long since I did any work in BASIC. This is the algorithm to decode an AFS character:

Sub Decoder(x,y,char$,col) Public     '-- Converts AFS to screen
  Dim InitCodes(1 to 40) as Byte

  w = FontW(asc(char$))
  h = FontH(asc(char$))
  dat$ = FontData(asc(char$))

  l = 0: a = 0: oldl = 0

  For i = 1 to w  '-- Generate init codes
    If Mid$(dat$,i,1) = "." then InitCodes(i) = 0
    If Mid$(dat$,i,1) = "0" then InitCodes(i) = 1
  Next i

  If InitCodes(1) = 1 then d = 1 else d = 0
  i = -1

    i = i + 1: a$ = mid$(dat$,i+w+2,1)
    oldl = l

    If a$ >= chr$(97) then '-- Allows very long fonts (up to 39 pixels)
      i = i + 1
      If a$ = "a" then l = l + 10 + val(mid$(dat$,i+w+2,1))
      If a$ = "b" then l = l + 20 + val(mid$(dat$,i+w+2,1))
      If a$ = "c" then l = l + 30 + val(mid$(dat$,i+w+2,1))
      l = l + val(mid$(dat$,i+w+2,1))
    End If

    If d = 1 then
      If FShadow = 1 then Line (x+a+1,y+oldl+1)-(x+a+1,y+l),ShadowColor
      If FShadow = 1 and bold = 1 then Line (x+a+2,y+oldl+1)-(x+a+2,y+l),ShadowColor
      Line (x+a,y+oldl)-(x+a,y+l-1),col: d = 0
      If Bold = 1 then  d = 0 : Line (x+a+1,y+oldl)-(x+a+1,y+l-1),col
      Goto ContFont
    End If
    If d = 0 then d = 1

    ContFont: '-- Another *great* line label
    If l = h then
      If InitCodes(a+2) = 1 then d = 1 else d = 0
      a = a + 1: l = 0
    End If
  Loop until a$ = ""
  Erase InitCodes
End Sub

You wouldn't call this function directly, there was a nice friendly string drawing routine.

This is IconWORKS which I completed in 1998, an icon editor and animator which was built on top of my final Widgets library, by then up to version 8. It supported a rich variety of controls including text entry (which can be very complex), multiple windows and even bits of animated UI eye candy. The mouse graphic which showed the colours assigned to each mouse button moved to track the relative position of your cursor on the screen.

You may think by this point I've strayed from my original goal of building a GUI environment to focusing on developing a GUI API (application programming interface). This is some what true, but I did write one last project that I finished around the end of the 6th form that went back to my original desire to build my own self contained GUI environment. It was called Zenith. It was built using Widgets 8 and used SVGA graphics. You'll note up until now all my work has been done at VGA (640x480) resolution with 16 colours. Believe me I would have loved to work with more but this was the highest standardised resolution you could use in DOS, anything more needed specific graphics drivers and a library to interface with them). However eventually I managed to get hold of a VESA graphics library for PowerBASIC that supported SVGA (800x600) with up to 256 colours on any system with a VESA compliant graphics card. Zenith was an environment for running programs written in Ze script. A simple scripting language I devised to build graphical apps using my Widgets library. Frustratingly I'm missing a couple of important files that prevent me from showing any shiny screenshots of it running. It relied on a palette file to define the colours used without which everything looks horrible as its using arbitrary colours, most of which seem to be shades of black. I'm also missing the final version of the demo script I wrote to fully show off it's capabilities which is annoying.

I did find a couple of Ze scripts I wrote including this calculator. I think it works but its hard to use as it appears as a largely black box. I thought I'd include the code listing for those technically minded to have a look over.

# ZeCalc

# Example program in the Ze programming language.


# Main

  #-- Display
  #-- Function Buttons
  #-- Number Buttons



  sub add

  sub min

  sub div

  sub mul

  sub screen

  sub update
    if(%number,=<,10) then concat($screen,$button)

  sub calc
    if(%opp,=,1) then +(%total,%a,%b)
    if(%opp,=,2) then -(%total,%a,%b) 
    if(%opp,=,3) then /(%total,%a,%b) 
    if(%opp,=,4) then *(%total,%a,%b) 

  sub reset


It's a fairly basic scripting language but I'm still quite proud that I came up with this when I was 18 ^_^. A Ze script is split into three parts, initialisation where variables are declared, window declarations that define the GUI and subroutines that can be called to perform specific actions and update the GUI. You could have multiple simple apps running together as long as they were written in the same file.

So there we are, a brief history of my BASIC coding days and how I tried to build my own GUI enviroments. I hope you enjoyed looking over this old stuff as much as I did, if you're not a programmer and got this far then congrats, and remember it's never too late to learn ;) By the way, the story also has a happy ending because I finally found an OS that I liked when I got my first Mac!

You are viewing razinaber