Railworks Work
Other Sims Work
Work In Progress Blog
Copyright statement
LinkedIn profile logo

Tag: computing

  • PPQG (for Trainz) – minor update

    PPQG (for Trainz) – minor update

    … Passenger Point Queue Generator, the program that took my site offline once.


    Its not often you hear a site taken offline for a program that well, does what its not supposed to. I spent quite a while developing PPQG (Passenger Point Queue Generator – for Trainz) and it’s suppose to help with randomising and creating queues for rolling stock for passenger trains. I might enhance this to include freight queues as well, as some of my projects also have freight queues (parcels) included. Not unusual for Railbuses.

    I wrote this about 8 years ago in Visual BASIC 6, yes, really, on the train to and from work and it took quite a while. Across several computers and never finished. The reason why I never considered it finished, is because I left a module unfinished and never went back to it. Yes, I use it a lot, I’ve offered it out with its source code on this site which was fine for a number of years, until suddenly, my site got shut down because of it – because it contained malware. Got it back online, hosted it on Google Drive and it looks like its been deleted again. I have scanned it and some sites saying its clean, some are saying it has malware.

    It looks like this, doesn’t actually do any file handling and its only 40KB long. I hope it’s bugless but it can probably be buggy accidently. (If you do find some, let me know please).



    So used VirusTotal and it says 3 out of 71 providers consider it to have a virus which isn’t bad news, it just means that there is a way and style of my code writing matches a pattern in a Trojan or Virus. After all, all virus scanners look for is patterns in the code, if it matches that pattern, its a false positive. This could also be related to the VB6 libraries and embedded code to identify it as a VB6 programs but without asking a question to why, I will probably never find an answer. Nor would they tell me how their virus scanners work, because of intellectual property and secrecies that could be used to beat the virus scanner. So with that in mind, I started thinking about completely re-writing from scratch, this time, I used Visual Studio Community edition and the skills I already learnt.

    The thing I find is that to understand the language as VB.net is vastly different than VB6 (the language structure is different and its more Object Orientated and its compiled rather than interpreted. I could develop it in C++ which isn’t beyond my capabilities, or C# or Java, just all 3 take a lot longer for me as I rarely program in those languages. When I go over to Linux, I might look at that, but then I may end up using GAMBAS anyway.

    ARRGHH - PPQG virus results.



    So, I started off like this on an old laptop that I was going to get rid of and ended up in use on my desk. (Dell Latitude E6430 ATG).

    PPQG in Visual Studio Community Edition

    To get the randomisation to work took…. ages! But I worked it out with little help from the internet, which shows that I understand the basic language structure. When I started programming, I had high expectations of myself, thinking an experience programmer would understand off by heart all the required libraries. C++ is a strictly typed language and my god, it can be hell to work with. (Actually, in the office, that is a point, I wonder if the other 2 capable programmers understand C++?) until one of my tutors at the time pointed out that there is 25,000 libraries from memory, approximately! Yeah, I can’t memorise 25,000 libraries and what they do, that would be nearly impossible. Its bad enough understanding union rules for train crew or understanding the limits what you can do on the infrastructure. I know the other 2 understand VB, but Visual BASIC for Applications (which I avoid due to its flexibility). One has a basic understanding of VBA and had to explain to them how the VBA IDE (integrated Development Environment) window, like debugging features – inserting break points and the intermediate window, which is VERY powerful and you can understand how the program is working. But the code? That’s something else. The other understands VBA to a deeper level than me. (Oh one understands I believe Python that I find it difficult to get on with and understands Blender, whereas I tried Blender and struggled.) I like structured rather than spaghetti code, so all my loops and decisions are always indented to which one I am applying my code to (good programming practise) and I was always taught “Do not use GOTO statements”, its not quite true, but yeah, avoid them. Your code is messy! I always use modules; they allow reuse and small code. Goto statements? Don’t. How to get into a mess quickly and have zero usability of code.

    On Err GoTo Hell.

    You may not understand that! Anyway, I think I topped out for PPQG VB6 at less than 500 lines of code. I’m waiting to find out how this one is doing, but you will need Windows 10/11 at least as I’m building it for .Net Version 8. I prefer 3.5 as it doesn’t need 8.0 or even 10. No doubt I’ll talk about more of its development over time.

    Russ the Roofer - does it leak? No it doesn't!
    Russ the roofer – does it leak? No it doesn’t!

    In other news

    You may of noticed I’ve done some changes to the site too, small ones on some pages. I finally found the problem with my templates, so I’ve locked the sidebar, footer and header which resolved most issues on most templates and there is a search bar now. I’ve also put some files up, I had a separate page that just directly linked to a Google Drive as I wanted a publicly accessible drive for all the stuff that I’ve not put onto a page, but that didn’t, so I went the manual way. I’ve got some sources to put up and yes, you can download them and do what you like with them. There will be more in the future. That came from my WIP server and if you are after something that isn’t on my site, just drop me an email, the contact me page should work now and I’ll send it over. I also plan to add some sort of feedback to the side bar, so I’ll see how that goes – more importantly, time. Considering I’m feeling like “Bob the builder” at the moment. “Can I fix it? No I f***ing can’t!”
    As well as – going around the country on the coldest week on record!


    Ticketless scroat

    Lets just say a Northern guard had a bit of a shock when I hid under a hood and a scarf covering my face, then presented them with my Southern ITSO card, my Staff ITSO card, my PRIV card and my PRIV rate ticket. – it was blowing a gale at -2°C. I had a good laugh, just the Class 150 I was on, (between Ribblehead and Salford Cresent) went from nice and toasty, to the time we got to Blackburn – (or was it Bolton?), it was bloody freezing.


    Yes, that is an Class 805 Evero, yes, that is Ribblehead, Yorkshrie. Unfortunately, I’m not friends with Class 800s now, one took me and a lot of passengers prisoner at Carlisle by refusing to release the doors on 5 out of 10 coaches, with loads of alarms going off in the cab as the train refuses to co-operate with the door release buttons. Considering I was a full fare paying passenger in that I actually brought an advance single on a Disabled Railcard.





    EDIT much later (next day in fact!):

    A partially wasted Sunday with little to do, I was able to get it working. Well, I say wasted, I did manage to rearrange my desk so it was more usable for my height. But, after a lot of head scratching and finding out why variables weren’t parsing, I managed to fix it:


    Only 4 or 5 hours to get back into it and produced something useful. VB6 skills are still relevant. (And I didn’t resort of Xojo – another BASIC IDE!) – hopefully, it’s easy to read. I can add a crap ton of comments if you REALLY want.

    (And yes, I’m that “old school” that I try to follow the Visual BASIC coding standards)

  • Mini PC’s are fun!

    Mini PC’s are fun!

    Even better in an environment that bans computers. Understablable for safety but sometimes?

    I came across this YouTube clip:

    Not mine I have to say, but, I looked at it and I thought “Hold my Pepsi one minute, there’s smaller still!”
    I don’t own a GPD Pocket PC sadly, I’ve always wanted one but never had the cash to buy one new or used. The Pocket 3 or 4 is on my wish list, but still.

    I owned a OQO Model 01 (which is 5.5″, that was tiny and slow!), I still own a OQO model 2 but not the much more rarer 02+ and the GPD Micro PC which is a 6″ screen. This is what it looks like with my Apple iPad 8″ 2021.

    Dinky isn’t it? Even my trackball is bigger than the laptop!



    Better, it has an upgradable SSD! I’ve done it, it takes a SATA 2242 SSD and it has a few interesting tricks. Did I tell you I brought 2 of them? One as a spare. You may wonder “but is it usable?” Actually, yes it is, 3 hour battery life, its silent, you can downclock the CPU to 6W or upto 10″, charges off a phone charger or even a computer USB port, the keyboard is teeny tiny, but it works and I’ve used this one a lot! You can also toss it anywhere you like. The big question is, why buy it? Pull up a chair, its going to be interesting.

    I brought this in November 2020 or so. My previous job, I had a big problem as I had to work during COVID and I was running out of tasks, so I stayed out the place and kept having issues with others, I can’t talk about it too much on here, but one was a bigger issue. So a manager asked “why don’t you take your laptop with you?”, “Ok then!” So opened the floodgates in between duties. No more spoken about it until the world started opening up after COVID and I was doing a lot on the computer, using my home one remotely, building models, interacting, setting them up. Hundreds of things, until one day, they tried to withdraw it. Yep, stop me taking the computer with me.

    Thats when the fun started. They wouldn’t let me, so I started having more fun, tried phones to begin with with a keyboard and mouse, wasn’t any fun over a remote connection, so I went one better, get a local computer, scoured the internet and then came across the GPD Miini PC for about £230 on eBay. PERFECT! Brought it, took it with me to work the day after I got it and was like:

    “They can’t stop me taking my laptop now! :)” with my GPD poking out of my jacket pocket. The best bit is, they didn’t even notice it!

    My colleague I was talking to was laughing his head off. Management didn’t find the funny side of it, but I persevered and kept going and occasionally, I still use it. (Oh, then they cut the Wi-Fi to the station by ending “the cloud” contract and I had to rethink things, so an 8″ tablet made a return with a SIM card).

    Interesting problem, so I go to work on my first day, don’t have my work laptop and I walk in with my Chromebook. Ask my new boss to send me the copy of the workbook and he didn’t mind me using my personal laptop. Think about that for a minute. Plus I’ve admitted using my personal laptop in the past at work and no one minded as long as it was work related, which at the time, was, to keep up to date as I didn’t have a work phone or IT login.

    Whats it like to use? Well, light, fits anywhere, if you lose it, you won’t notice, if you carry it, you won’t notice, it turns heads and it is pretty capable. Oh, and has more I/O than your equivalent MacBook. It is really capable and I mean capable. You can game on it, GTAV works on it at 800×600 resolution and the fan on and that gives you an idea.


    I/O wise, it has 3xUSB 3.0 ports, a serial port (who needs one of those these days? Oh I do), HDMI out, USB-C for charging and supports everything bar thunderbolt I think, my Dell WD-19 dock worked as shown below, TF card, a headphone jack, an Ethernet port, some screw holes to mount it on and I think thats it.
    It also has Wi-Fi and Bluetooth.
    Somehow, GPD also installed a blacklit keyboard. I mention the good bits, the bad bits, the keyboard? Think of a calculator keyboard, its not rubber, but its as small, with squished keys, so typos? Yep, you’ll make a lot. The trackpad is in an awkward position, but when you hold it up, you can use your thumbs quite easily, so its a trade off in one area and a usable item in another. The sceen is very good for a device this size and its VERY light. Also has a wrist strap to stop you from dropping it. At least you get plenty of feedback.

    It can be slow too, I mentioned I’ve run GTAV at 800×600, but sometimes, it gets slow as hell, I guess it is just my device, bit the fact it works at all is a miracle. Oh and unlike other devices, it runs a full copy of Windows 10 or 11, or even Linux. Thats worth the trade off. The number keys are also badly positioned, but then I understand why.
    Then the final problem, some have hinge issues and that has worried me when I saw the reports of that. My 2 haven’t cracked yet, but there are reports online where they have. I’ve dropped it though and it is rugged.

    Who is it for? Well, if you like quirky things that you can hide, perfect. If you got an unnecessarily strict work place? Perfect. Otherwise, if you don’t have a need for it, don’t bother. It’s fun to carry, don’t get me wrong, the novelty does wear off after some time.

    Especially when you can shove it places its not suppose to go, like your shirt pocket.

  • Bugs (Trainz work this time)

    Bugs (Trainz work this time)

    This is why I never consider anything finished.

    So latest thing is, I uploaded my EPB unit to my site which if you looked, you’d notice its a pretty old model. In preparing it for Trainz 2019+, which required a lot of changes (I mean a lot!) and plenty of dependency and bug fixing, I noticed a big problem with the cab that I completely forgot about, I took this screenshot in TS2010 as I didn’t think ahead… again! It was build for the JET engine anyway. It works in the E2 engine as well, which suprised me.

    The biggest glaringly obvious problem is the brake handle and the power handle, both rotate the wrong way. A few hours of tweaking and it works properly. 4 notch controller doing a 180 degree spin and the brake handle now rotates 90 degrees. At this point, it still has 4 notches and the real thing has between lap and apply, an infinitive amount of notches on the brakes, its EP self lapping. Driving it on “Auto-brake” in Trainz is honest to god – hell (at least to me)! Unpredictable and either you slam on the brakes too much or too little. So I added a ton of notches, the brake handle hated it, test, test, test. Still hates it until I realise I got a tag wrong. If I remove the word “lap”, it functions like a normal EP brake handle.

    Then clean up the rest of the controls, some work ok now, some don’t, the AWS button doesn’t work yet properly, but its on the list and I plan to make that a push button anyway.

    Then it was the turn of the DTS in the Class 416. The way I done it is that 415 DMBS does both units (in reality, there is little difference between the 2.). Getting them to function like Driving Trailers wasn’t hard, it was easy infact, one tag.

    Then the physics, I used TEE (Trainz Engine Editor) which I still have a copy somewhere, installed it, dumbed down the power as 500hp per DMBS and it STILL shoots off like a rocket. But its more playable. Its tempting to then mess with the body, I figured out how to show blanks and tail lamps in TS2019 plus, just model a red square and redo the headcode box. If you look at the flying brick, I’ve employed this method for the tail lamp which paves the way for mesh attachments.

    At least the Class 416 DTSO (Semi Compartment) has its passenger view back, but I really need to remove the Monkey Bars, which I don’t think they were fitted to BR Designed units, or at least not 3 of them as some may of been fitted for the Oxted Tunnel (that was 2 of them).

  • Past work..

    I probably should talk more about my past and present work, yet these days, I generally don’t tend to.

    PiggiesSWT

    Here is an item that took me around about a month and a half to draw using Microsoft Visio, way back in I think 2008, I vaguely remember being either at college or uni at the time and it was meant to be a avatar for the Trainz forum, it was! So was it’s off springs (livery).

    If you want to use it, you have all right to do so, I’m not looking for money for it, unless you want to give me a donation which will be appreciated and I would say “you don’t have to give me credit”, it should be, its nice if you could give me credit, but you don’t have to.

    Just Right Click or Apple Click and save as.. depending on your OS (I use a variety, so its upto you).

  • Small problem I have…

    I think I’ll talk about my first problem with autism or ASD with a little problem I have currently and it may explain how I work. Patterns, lots of patterns. My current issue is my daily commute and one lady (who I suspect I now have some name, could be wrong but I believe it’s a J), gets on further up the line. Nothing unusual.

    For me, the most difficult problem is understanding body language, she also knows I carry a particular type of laptop, a Panasonic Toughbook, at the moment it’s more like 2. A Mk1 and Mk2 (as one cannot run windows, the other can). It has a rear facing camera which I would think would put people off. It also has “incognito” mode, basically, you can press a hotkey and it shuts all noise, light and appear dead. Great for management, however – just doesn’t work on Linux. So, I’ve carried the Mk1 with me, had it on a plate stand, broke the plate stand, used a Bluetooth keyboard, done all sorts of weird things. Carried different type of laptops and if she is observant, probably recognises a lot of them.

    (more…)

Accessibility Toolbar