• 05May
    Categories: Uncategorized Comments Off on How to Structure Your Programming Code

    I remember my first fumble with basic on my ZX Spectrum computer back in the 1980s, ploughing through pages of basic commands and example code without any real idea of how I could write programs myself. It was like reading a dictionary where I could learn certain words and their meanings with limited information on how I could construct them into entire sentences to write a document. Every programmer who has dabbled in basic has probably come across the famous “Hello Word” routine which consists of a two-line program that prints this phrase unlimited times on the screen.

    Your program code needs to be written as step-by-step instructions using the commands that your choice of programming language understands. It means reading your programming manual to learn which commands you need to use for what you want your program to do. In the “Hello World” example you would first need a command that prints “Hello World” onto the screen, and then you would need a second command to print it again multiple times, without writing multiple print statements.

    Check out this example. To make things simple I am using old-school basic with line numbers – probably because I’m a retro-freak.

    10 print “Hello World”
    20 goto 10

    The best structure for writing any program code is to make it clear and easy to follow. Some programmers put multiple commands on one line which can make your code difficult to follow if you are trying to iron out bugs. Spreading your code over multiple lines actually makes the program work better and becomes more readable.

    Another recommended practice is to separate each part of your program code using REM Statements. REM (short for Remark) allows you to put comments before each section of code to remind you what each part does. This is especially useful if you wish to edit your code at a later date.

    10 rem Set Up Variables
    20 let A=1: let B=2
    30 rem *******
    40 rem Print Variables to Screen
    50 rem *******
    60 print A,B

    Anything after the REM command is ignored by the computer and you can use as many REM statements as you want to make bigger gaps in your code for easy reading. Other programming languages allow you to use blank lines or indent the first line of the routine.

    Now I will show you how to structure the entire program code. Remember that the computer needs to follow step-by-step instructions so you need to write each instruction in the order you want it to run.

    CONSTRUCTION OF CODE

    Set up screen resolution and variables: The first section of your program would set the screen resolution and the variables.

    Read information into arrays: If you have information you want to put into an array using the DIM command then you can use a For/Next loop and the READ command. It is best to place the data statements for the array to read from at the end of your program.

    Set up main screen: This is the section where you would use a subroutine (GOSUB Command) to set up the main screen. In a shoot-em-up type game you would have a routine that draws the sprites and game screen and then returns to the next line of the code it came from.

    Main Program Loop: Once the program is up and running the main program loop jumps to various routines using subroutines and then returns to the next line in the loop.

    Program Routines: It is good structure to place all the programming routines after the main loop. You would have separate routines that update the screen, check for joystick input, check for collision detection and so on. After each check you return to the main loop.

    Data Statements: Finally you can list all the data statements at the end of the program which makes it easier to find and correct if need be.

    CONCLUSION

    Creating your code with plenty of REM Statements and short lines makes your code look cleaner and easier to follow. There may be a time you want to improve the program or use a routine for another program.

  • 05Apr
    Categories: Uncategorized Comments Off on Use Caution With Do Not Resuscitate (DNR) in Living Wills

    All people including lawyers need to use caution with Living Wills and the Do Not Resuscitate (DNR) clause. Our relative who was an Emergency Medical Technician (EMT) for 17 years said he would not sign a DNR because he thought if he did that it would allow physicians to cause his death. We respected his decision but could not believe that physicians who mainly preserve life would be anxious to end life. However, it turns out he was correct, a Do Not Resuscitate (DNR) document does give a nursing home or a physician a green light to determine when or if a person can get medical care to preserve life.

    When you are signing paper work to place your loved one in a nursing home they will tell you how humane a Do Not Resuscitate (DNR) clause is, not requiring Cardiopulmonary Resuscitation (CPR) and/or a defibrillator which can break your loves one’s ribs. However, they do not inform you how bad it is for your loved one if they lose their mental or physical faculties unable to communicate their wishes for medical care and uncaring people determine the DNR means that they do not want medical care to extend their lives. Although my wife had a power of attorney requesting medical care for her Father, the Nursing Home staff just ignored us and our attempt to preserve the life of our family member.

    It turns out they had our relative sign a DNR while in a mental fog of an infection. The physician made a misdiagnosis claiming this patient’s daughter (my wife) was mentally ill for trying to honor her Father’s last wishes. She could not adequately communicate with her Father so she had reservations about sanctioning an amputation of his leg without his consent which I thought was prudent. This physician had never even met or talked to my wife and had no psychiatric credentials we are aware of. But when a physician makes a notation in a medical file it has powerful weight with a Court even if the information is false. So the nursing home staff took the physicians view declaring my wife crazy for trying to preserve the life of her Father thus over ruling her rights as a power of attorney and were going to legally expunge the life of her Father who wanted to live.

    Thus, a DNR in some circumstances can be more powerful than a power of attorney. I do not believe we are the only victims of this abuse of a DNR clause that some misguided people use to prematurely extinguish the value of human life. The common practice with the fervent sales pitch to get family members to sign a DNR out of humanity may be valid to a certain extent, but it can also be abused by people who believe they have the right to determine when a person dies.

    Including a clause or adding a hand written notation that the DNR does not give any party the right to deny medical care to your loved one is advisable. A DNR has the ability to convert a physician or nursing home staff into a psychopath and you should have reservations about signing such a document.

  • 07Mar
    Categories: Uncategorized Comments Off on How People Used To Pirate Retro Software

    You will be forgiven for thinking that I am teaching you how to make illegal pirate copies of your software after reading the title above. Well rest assured I won’t be walking the plank as this article is for information purposes only. As a programmer I understand how software piracy can hurt companies so I do not recommend it. There is plenty of good software that can be downloaded for free, especially if you don’t need all the fancy features of expensive software. This article explains how people used to pirate software from retro computers such as the Spectrum and the Atari ST.

    SPECTRUM AND COMMODORE 64

    Spectrum and C64 software came on cassette tapes which were inserted into data recorders (or tape recorders) and could be loaded into memory by typing a command such as load””. These computers relied on a series of sound signals which were never pleasant to listen to as they were horrible screeching sounds. Quite often you would have to wait up to ten minutes (for a Spectrum 128k game especially) to load when it could crash, meaning you had to re-adjust the volume and start again. In case of a low recording, the game cassette would usually have a separate copy on the other side.
    Most people could copy these games by using a hi-fi system with twin cassette decks. By inserting the original game cassette in the first deck and pressing “play”, and inserting a blank cassette in the second deck and pressing “play and record” you could get a perfect copy. You could buy cassette tapes for saving data such as a C15 which allows you to record up to fifteen minutes. Some people would use a C90 which would allow them to store many games at once.

    If you didn’t have access to twin cassette decks then you could use software. On the Spectrum you could use something like “007Spy” which would allow you to load the entire game into memory and then back up onto a blank cassette. Some games had different ways of loading such as the pulsing (or clicking) loaders, a method used by many Ocean Software games. This led to the release of other software capable of tackling these loaders. The average Spectrum game would consist of a short piece of code (the header), a loading screen and the main code. This is the standard loader, easy to copy.

    When the Spectrum 128k +3 was released it came with a built in floppy disk drive. As there were only so many games released on +3 disks, methods were used to transfer them from tape to disk. The standard loader was easy. All you had to do was type merge”” to get into the editor code and save that to a +3 disk (save”a:program-name”). Next you would load the loading screen higher into memory (load “screen-name” code 30000) and save that to a +3 disk. Finally you would do the same thing with the main code and add the load commands to the main header code.

    For the more complicated loaders a suite of programs called “007 Trans-Master” was used to convert the files into the standard format so they could be saved to +3 disks.

    ATARI ST AND AMIGA

    The great thing about the Atari ST and Amiga computers was that you could lay your hands on hundreds of pieces of free software, no need to pirate commercial software. There were many PDLs (Public Domain Libraries) who would distribute free software for the price of a disk and postage, and for their distribution work. The actual software is free and covers anything from demos to games and pictures to music files. There was also the shareware method where you pay a small subscription fee to receive extras for full versions of the software and licenceware where the PDL would offer a small commission to the original contributor.

    Atari ST software was normally copied using dedicated disk copiers such as “Fast Copy” while the Amiga used the popular “X-Copy”. However some disks were protected and therefore other more powerful copying software had to be used.

    PROTECTION METHODS

    Software publishers have used many forms of production to deter copying such as the more complicated loaders on the Spectrum. Other methods would require the user entering a word or letter from the manual before they could get into the game, or choosing a series of colors or symbols from their book to match the ones on screen. Some games allow you to think you have copied them until you have played them for so long and notice some nasty surprise. The game “Shadow of the Beast” turns the screen upside down on certain levels for example.

    This lead to the rise of Cracking Groups such as the famous “Pompey Pirates” on the Atari ST who would hack into the game and remove the copy protection. They would then release a number of games (hacked and packed) onto a single floppy disk which were passed around to various users.

    CONCLUSION

    The battle between software publishers and pirates is an on-going one and people will always want free software if they can get it. Old retro software is freely available for download on various websites for people who want to re-live the old days so there is little need to copy them from originals. I am not going to tell you how to copy the latest PC software. I only wrote this article to explain how people used to back up their software for the older systems. I stated that there is a lot of free and in-expensive software available for the PC and I urge you to use that rather than resort to piracy.

  • 03Feb
    Categories: Uncategorized Comments Off on Cancelled Trip: Can Travel Insurance Help?

    Imagine yourself flying to South Korea to finally watch a K-pop girl group for the first time, in person. The concert ticket was bought and you’re ready to catch the fever and enjoy this unique and exquisite musical experience. Unfortunately, upon arriving to Seoul, you were informed that for a certain reason, the concert won’t push through.

    What if you are attending a Digital Start-up Conference in Berlin, but before you board the plane, you were informed that for a number of reasons, the organizers were prevented to set up and it cannot push through.

    In cases of events cancellation, travel insurance can definitely help as it offers coverage for cancelled events.

    For a claim to be valid, the following conditions should be met:

    The event cancellation should be beyond the control of the insured.
    The event cannot take place before your flight back to your home country.
    The organizer should provide a written confirmation that the event was cancelled.

    There are two (2) circumstances that can occur when availing this insurance coverage. These are:

    Event was cancelled before departure – If you were informed before travelling to the venue, the maximum sum insured per person shall amount to £400 for Unused Event Tickets and specific limits as indicated in the insurance policy that covers unutilized travel arrangements such as flights, accommodations, and excursions, as well as other additional travel expenses associated with the trip.
    Event was cancelled after arrival at the country/city of destination – For this case, up to 50% of the travel costs and seven (7) days of accommodation will be covered by the insurance policy.

    Since this is an additional cover, do check if your standard or comprehensive policy has this feature. If it doesn’t, you can always contact the insurer to include this feature.

    It’s noteworthy that your claim cannot be considered if the event is re-scheduled before your flight back home. Also, the insurance should only indemnify those that are not reimbursed by the organizers. The claim also doesn’t include costs of food and drink, as these are regular, recurring, everyday expenses.

    To experience an event cancellation, specially one you have financially and emotionally (significantly) invested in it can be heart-breaking. That’s why it’s worthwhile to ensure that we are able to recover our pre-payments upon the occurrence of this cancellation and one can do that through the purchase of the right travel insurance policy with event cancellation cover.

  • 04Jan
    Categories: Uncategorized Comments Off on Business Insurance 101: What You Need to Know

    So you started your own business. You’ve seen a hole in the market or come up with a brilliant new idea. You’ve got things underway and maybe even started to make a bit of money. Well, before you take one step further, it’s time to think about insurance for your business. After all, you took a big risk starting your own company and that means you need to mitigate those risks as best you can.

    The hardline fact about coverage and businesses is that you need it. Everything you have for your business, from vehicles to basic liability, requires insurance. Without it, you could put everything you’ve built in jeopardy, open yourself up to crippling financial issues, or even be in violation of the law. But not to worry, here are some basics about coverage of your business that can help you get the protection you need to succeed.

    Types of Business Insurance

    The first thing you need to understand about coverage and your business is the different types that exist. Depending on your business, you may need specific kinds of insurance. In general, business coverage can be broken down into three broad categories: insurance for owners or partners and key employees, coverage of business earnings and property, and liability insurance. Here is a breakdown of each different kind.

    Insurance for Business Owners, Partners and Key Employees

    If you own a business, you need specific types of coverage depending on how your business is set up. These can include, but are not limited to:

    • Life insurance – This coverage protects your family if something happens to you. If you are the sole proprietor of your business, this insurance is key because business owners are personally liable for all the debts of the business.

    • Disability insurance – In the event that you are injured or fall ill, disability insurance will provide you with an income for a specified amount of time.

    • Partnership insurance or buy-sell coverage – If you have a partner in your business, this insurance will help you purchase your partner’s shares and continue running the business in the event of their death.

    • Critical illness insurance – If you become critically ill, this coverage will give you a lump sum of money to help you through the situation.

    • Key person insurance – This coverage protects you in the event of the death or loss of those employees who are most important to your business.

    Insurance for Business and Property Earnings

    On top of coverage that protects individuals, your business may also require the following types of insurance to protect its assets and earnings. Bear in mind that businesses run out of your home may require coverage beyond your home insurance. It is always a good idea to contact your coverage company to discuss running a business out of your home.

    • Property insurance – This coverage covers any buildings or property owned by your business if it suffers damage or destruction from fire, earthquakes, avalanches and other such disasters.

    • Contents insurance – If you have a property or building that stores things for your business, such as a warehouse or storefront, this policy covers the loss of those contents. Note that even if you are leasing space, you may still require contents insurance as your lease will likely make you responsible for what you put inside the leased space. Home business owners will need to contact their insurance companies to discuss what needs to be included in their home policy.

    • Business interruption insurance – When disaster strikes, this policy will cover you for the time that your business cannot run at its proper efficiency.

    • Vehicle insurance – If your company owns vehicles, you are legally required to have coverage. If you use your personal vehicle for your business, make sure that you contact your insurance company.

    Liability Insurance

    Liability covers you in the event of a mistake or accident for which you can be held responsible. There are three kinds to consider when you own a business: personal liability, product liability, and professional. These cover you from personal responsibility, something going wrong with your products, and from lawsuits filed by your clients, respectively.

    Starting your own business is a big risk, but that doesn’t mean you should take unnecessary chances. If you own a business, you need the right coverage. Be sure to shop around and find the insurance package that’s right for your business. If you have any additional questions, we can help you make sense of your policies to ensure you have the right kinds of coverage from the right kinds of insurance companies.