Sunday, 29 October 2017

Evolution of technology - a perspective

Those of us who have tried world-building, be it for a story or for some other purpose, have run into this problem at some point or the other. How would the environment affect the evolution of technology?

For this discussion, I will focus on aircraft, mostly because it is one of my favourite areas. Also, what makes it ideal for discussing this topic is that aviation as we know it developed a little over a century ago, and most of its progress is recorded.
What is discussed here is the hypothetical scenario where someone or a group is approaching the development of aircraft. How will they approach it, realistically?

Where do you begin?

Imagine a civilization is developing aircraft for the first time. Where would they start? One of the first things most people would look to is birds - provided birds exist in this hypothetical scenario, of course. They're everywhere, and they're obviously flying, and they make it look easy. This is why we have stories of this sort - Deadalus and Icarus, as well as various fairy tales.
Assuming this doesn't work, what would you look to? The most obvious answer would be gliding - like eagles, for example. Remember, it is entirely possible to glide for hours if you can launch yourself off from a height.
Lighter than air craft is another possible option. These are hot air balloons, blimps, and airships. This requires some understanding that air is a fluid, and that things can float in it. This is probably not exactly obvious to someone who hasn't encountered this before, but at least you can expect scientists to be aware of this.
Lastly, there are fixed wing aircraft. This is the type we use most commonly - with fixed wings providing lift, with thrust provided by engines. The speed of the air moving over the wings creates a pressure differential, which creates the lift necessary, in the simplest terms. The concept is easy enough to discover - try moving a plate of some sort through the air at a slight upwards angle through the air. However, identifying the accurate relationship between speed and lift, and the drag generated in the process, may take time and a lot of experimentation.

What limits it?

Material

A major problem that most early attempts at flight encountered was the lack of suitable material. In general, you want the material in question to be light and strong. Modern aircraft are mostly made of alloys (mostly aluminium based, or titanium based) and composites which meet this requirement. Most models are made of Styrofoam, or balsa wood and spruce wood, and plywood and carbon fibre may be used for specific components. Birds have 'hollow bones' - actually, it doesn't have any marrow inside, but is supported by bone struts to help it take the stresses of flight. Unless you can find material that will do the job, flight would be impossible.
In general, you will need high strength for the wings and wing attachments, engine attachments (if there are any), control surfaces, and joints in ornithopters (bird-like aircraft). You'll also need high strength for internal components of engines (depends on the type of engine).

Power

Another main limiter is power. Early attempts at powered flight were made with steam engines. These tended to be on the heavy side, which was a problem, since the engine had to produce enough power to lift its own weight and the weight of the air-frame off the ground. Lifting a higher weight needs more power, which needs a heavier engine - you get the idea. So, you're going to need a power source with a reasonable power to weight ratio.
There are more ways to produce the power necessary than just engines. You can use some form of jets (again, depends on material and someone actual getting the idea), rockets (Me 163 Komet, for example), or even an electromagnetic catapult to launch it into the air. Of course there is nothing stopping you doing the same with a catapult or a crossbow, but I am not sure the pilot will appreciate it.
In a fantasy setting, you can always manipulate the airflow around the aircraft in question directly, which will likely reduce the power requirement drastically (airbending, in Avatar the last airbender, and Legend of Korra, for example).

Controllability

Figuring out how to control a plane with no prior knowledge about it can be tough. The Wright flyer used wing warping - that is, using cables to warp the wings and control surfaces to make it turn or otherwise respond to commands. Most modern aircraft use a variation of the same - instead of warping the entire wing, they move dedicated control surfaces, like the rudder, elevator, or ailerons. An ornithopter can differential flapping and moving the tail to control itself.

Other Challenges

Size scaling

A bee does not fly the same way an eagle does. Directly scaling up things does not always work when trying to develop an aircraft. For one, if you scale length up by two in all three dimensions, the area quadruples while the volume is multiplied by eight. This is a problem because lift depends on area, while weight depends on volume. You can be in major trouble if you don't realise this (running off the end of the runway without lifting off, for example). This can happen if you're developing the entire field as you go along - people have made incredible obvious-in-hindsight mistakes in similar situations. Another is that the characteristics of airflow change completely based on the size of the object flying - but the exact mechanics are enough material for an entire article on its own.

The risk

If an automobile loses control, especially at low test speeds, you can expect the driver to walk away with relatively minor injuries. Not so with aviation. It's one thing if it doesn't take off, but if the beginning of your flight involves a jump off a tower or a cliff, things can get nasty if the aircraft doesn't actually fly. The same situation can happen if the fragile test aircraft breaks up in midair for some reason. In this case, unless the person inside can fly independently of the aircraft, or is damage resistant, he's likely to suffer some form of grievous injury if not death on contact with the ground. How the characters handle this risk - whether they test it themselves, investigate the possibility of unmanned tests, or delegate the task to others can give some insight into their character.

In conclusion, the development of a new technology is a long and involved process. The presence or absence of an element can drive things in a completely different path. If they had strong, light materials and powerful engines in the renaissance, who knows, we may have started aviation with ornithopters. If it was just the material, gliding may have become quite popular a long time ago. This availability, on the other hand, could have caused other problems that we could never have anticipated. Who knows?

I haven't even begun to cover this immense topic here. If you would like to read it, I can do a much more in-depth, technical article on the basics of flight, with a better explanations of the many things I have mentioned in this article.

I hope that helps!
Not actually an avian,
Falcon-15-X-C

Monday, 16 October 2017

Designing a character

Disclaimer: All this is based on my own experience in writing.

To write any story, you will need to design some characters. For some, you may get away with under ten characters for the whole novel, but some hit the hundreds pretty quickly (*cough* fantasy *cough*).
There are many things that you have to decided about a character when designing them. I personally store all the information in a database for reference (due to the aforementioned problem of characters going into the hundreds). So, without further ado, I will get to some of the questions you have to ask and the things you have to decide.

Basic: 

Basic information about the character.
  1. Full name: This may sound stupid, but knowing your character's full name will also tell you a lot about them. How many given names do they have? Which one do they use? What about surnames?
  2. Preferred form of address: first name, middle name, nickname, or the surname? Or do they prefer to go by full-name basis? What about titles? Do they insist on it?
  3. Age and/or DoB: Date of Birth is important only if you have the dates fixed.
  4. General appearance: You may think you can get away with not defining it in a book but you'll be dead wrong (at least in most cases).
  5. Right of left handed: This is important especially if a lot of action is involved, or if it fits into crime or a related genre. It'll determine how you reach for something, how you wear a bag or something of the sort, how you instinctively react to an attack, and so much more. By the way, very few people are truly ambidextrous - they may be capable of writing comfortably with both hands but may instinctively reach for something with their left hand, for example. If your characters are non-human, you can go ahead and ignore this.
  6. Brief character history: It doesn't have to be long, but their general backstory of a character can shape their behavior. The bearing it has on the story depends on the type of story, of course.

Personality:

  1. General temperament: Describing it may be tough, and the character may evolve away from your initial definition as you write, but putting in the effort to define it might be worth it.
  2. Character quirks: Not everyone has them, but it could e a useful way to distinguish a character.
  3. Communication style: Again, this is difficult to define but can go a long way in developing a character's identity.
  4. Likes and dislikes: This can define a character quite well, too. For example, if one defines their dislikes as 'messy rooms' and another says 'chaos', it's quite reasonable to assume their personalities aren't too similar.
  5. Dress style: Again, this can tell you a lot about them. Do they stick to a single colour? Do they prefer one particular type of fashion? Is there some article of clothing they always have (say, a scarf)?
  6. Relationship with fellow sentient creatures: Some people can make friends easily, some can't. Some aren't particularly invested in their relationships with people, some are. Some only genuinely care for a small group - be it their family or their closest friends. Others will go out of the way to help anyone. Where does your character fall?
  7. Relationship with machines and non sentiments: This depends on your work, but can be very important.
  8. Level of intelligence: This is hard to quantify, but noting how well a character does on various criteria that measure intelligence may help.


Motivations:

  1. Goals: What is your character's goal in life? In real life, not everyone has a defined goal, all your characters may not need one. How important are these goals?
  2. Fears: What do they fear? Is it failure? Or the loss of something? Or is it death? Or do they claim that they fear nothing?
  3. Principles: What code do they live by? Are there any principles they're unwilling to compromise?
  4. Attachments: What are they absolutely unwilling to give up?
  5. Approach to achieving their goals: How much effort are they willing to put into it? How is this energy directed?

Further information:

  1. Phobias: Again, not everyone has those, but depending on your work, it may be useful.
  2. Level of religiousness / nationalism: If you aren't willing to touch these very messy topics, it should be fine (depends on the type of story). However, this can add another facet to your character. There are various levels of religiousness, too. Some may follow the religion to the letter, but to others it's just a part of their identity, and you find people everywhere in between these two extremes. The same scale applies to nationalism.On the other end, you will find who are ambivalent to the whole concept, and others who will reject it completely.
  3. Disabilities: If the entire character is built entirely around some sort of disability, mental or physical, then it is a caricature, not a character. That being said, having a disability can add a lot of depth to a character. Also note that not all disabilities, especially mental ones, are obvious at a glance (physical ones aren't exempt either - colour blindness for example).
  4. Allergies: Quite specific, true, but a lot of people have them, and they can complicate things considerably. It can apply to anything organic (or machines too - like the oddly specific inputs that make them go haywire).
  5. Language fluency: This may also be oddly specific, but since it determines who your character can communicate with, and how well that communication will go, so it's pretty important. Also, it's entirely possible for someone to understand a language but have trouble speaking it, or have trouble reading/ writing it.
  6. Familiarity with technology: Again, possibly oddly specific, but it will determine how much your character can gather, how well they can communicate, and how fast they'll adapt to any technology that becomes available. This doesn't refer to just computers - being able to forge a sword is also being familiar with technology.
  7. Skill levels: What sort of skills do they have, and how proficient are they at it? The specific skills in question depend on the story/setting. Being able to use a long sword will be useful in a medieval setting, but if your story involves a series of battles fought out of visual range or with robots - you get the idea. Incidentally, that example works the other way too.

A final note: Defining all this is a lot of work, but for me, personally, it always pays in the end. Details have a way of coming out in the narrative, and a little off-hand reference to some noodle incident, or a slight dissonant reaction can add a lot to a character.
To conclude, it's not necessary to define each and every aspect stated here for every character, and the attributes listed here may not fit every type of work. This is not an exhaustive list, either - depending on your work, you may need to consider many more criteria. The purpose of this article is to help you organize your thoughts, and hopefully, take a more organized approach to character creation.

Happy writing!

Wednesday, 4 October 2017

Simple Substitution Ciphers

To start with, I will not be discussing the history of ciphers, etc. in much depth here. The main focus of this article will be on the use of simple substitution in a fictional setting. I dabble with writing myself , and for me, personally, this is one of the most entertaining areas in detective fiction.

How does simple substitution work?

It's exactly what is says on the tin - you simply substitute a character in the plaintext with a different character. For example, if you use H=K, E=H, L=O, O=R, HELLO will be coded as KHOOR. To decode, you simply reverse the substitution (i.e., K=H, H=E, O=L, R=O).
The cipher used here is the Caesar Cipher, which involves shifting the alphabet by a fixed number of characters, in this case 3. You can read more about it on the Wikipedia article.

The possibilities

There are many ways you can play with this simple cipher. Rather than use a fixed shift like in this cipher, you can invert the alphabet, or randomly distribute the letters. It doesn't have to be limited to letters - you can use symbols just as easily (The dancing men from 'The adventure of the dancing men'). The resulting alphabets are given below.

Some possible cipher alphabets
To demonstrate, the text 'This is a sample text' is encoded using all 5 alphabets below. The spaces are left intact, but the text is entirely in upper case.

Caesar 3:                  WKLV LS D VDPSOH WHAW
Reverse alphabet:      GSRH RH Z HZNKOV GVCG
Random:                   LHPM PM C MADMWA LAXL
Symbols:                   &)<{ <{ - {-@_>; &;}&
Symbols 2:               




Further, you can be creative with the alphabets. you can make an uppercase-lowercase distinction and increase the number of characters that must be decoded. If you're feeling particularly evil (or masochistic, depending on your point of view) you can choose to include numbers and punctuation marks in your code.

Then there is the issue of handling spaces. Of course you can break the ciphertext into words, but that will make things a lot easier for anyone trying to break the code. A common tactic is to replace the space with a relatively uncommon letter ('Z', for example, if you're using English). You can also omit spaces altogether, though it can cause confusion. You can also include the space as one of the characters used in your code (resulting in random spaces throughout the text - which is good, but it can also result in double spaces, which, depending on the font, is bad). You also use different methods to mark the end of the word, like the flag in the dancing men code, or changing the font of the character at the end of the word.

A further layer of confusion can be added by foregoing a simple one-to-one mapping - for example by mapping a relatively common character ('E' or space) to two or more relatively uncommon characters ('Z' or the comma). It should be noted that this can confuse the decoder as well if these characters are not chosen carefully.

Decoding

The greatest Achilles heel of substitution ciphers is that it leaves the letter frequency intact. For example, in English, the most common characters will likely be the space and 'E'. After that, 'A', 'T', 'O', 'I', etc. are quite common. This can change from text to text, so that alone isn't completely reliable if the amount of cipher text you have is small.

In addition to this, the structure of the words can give you a lot of clues. For example, standalone letters are likely to be 'A', 'I', or even 'U'. If the same three letters keep reappearing, it's quite likely 'THE' (this is a bit of a stretch, but is a good working hypothesis).

If you're using a type of cipher which follows a regular pattern (inverting the alphabet or the aforementioned Caesar cipher), decoding a few letters could lead to the rest of the code unraveling like the fictional sweater (or not so fictional ribbon) once the person breaking the code realizes what's up.

An example

An example will be given here - I will decode it below, but first I will give you only the ciphertext to give you an opportunity to solve it by yourself. The text is in English. This is a simple example - I haven't replaced the spaces or removed all the punctuation, no numbers are used, and only uppercase is used.

Cipher text:
STY NSANXNGQJ GZY ZSSTYNHJI BFYXTS. DTZ INI STY PSTB BMJWJ YT QTTP XT DTZ RNXXJI FQQ YMFY BFX NRUTWYFSY. N HFS SJAJW GWNSL DTZ YT WJFQNEJ YMJ NRUTWYFSHJ TK XQJJAJX, YMJ XZLLJXYNAJSJXX TK YMZRG SFNQX, TW YMJ LWJFY NXXZJX YMFY RFD MFSL KWTR F GTTY QFHJ. STB BMFY IT DTZ LFYMJW KWTR YMFY BTRFSX FUUJFWFSHJ? IJXHWNGJ NY.



Decoding the example:

Even without a frequency analysis, it is immediately obvious that N and F stand for I or a, since these are the only single letters that appear in the text.
Counting the number of times a character appears in the text gives J as the most frequent letter appearing 27 times in the text, followed by Y and T which appears 26 times, and F which appears 22 times. J=E is a reasonable assumption, and substituting N=I and F=A (A tends to be more frequent than I. If it doesn't work, you can always try switching them), the following result is obtained. The decoded letters are boldface:

STY ISAIXIGQE GZY ZSSTYIHEI BAYXTS. DTZ III STY PSTB BMEWE YT QTTP XT DTZ RIXXEI AQQ YMAY BAX IRUTWYASY. I HAS SEAEW GWISL DTZ YT WEAQIEE YME IRUTWYASHE TK XQEEAEX, YME XZLLEXYIAESEXX TK YMZRG SAIQX, TW YME LWEAY IXXZEX YMAY RAD MASL KWTR A GTTY QAHE. STB BMAY IT DTZ LAYMEW KWTR YMAY BTRASX AUUEAWASHE? IEXHWIGE IY.

Something that immediately appears is the three letters YMJ, where the last letter is an E. This is most likely 'THE', which gives Y=T (which agrees with our frequency analysis) and M=H. Plugging this in gives:

STT ISAIXIGQE GZT ZSSTTIHEI BATXTS. DTZ III STT PSTB BHEWE TT QTTP XT DTZ RIXXEI AQQ THAT BAX IRUTWTAST. I HAS SEAEW GWISL DTZ TT WEAQIEE THE IRUTWTASHE TK XQEEAEX, THE XZLLEXTIAESEXX TK THZRG SAIQX, TW THE LWEAT IXXZEX THAT RAD HASL KWTR A GTTT QAHE. STB BHAT IT DTZ LATHEW KWTR THAT BTRAFSX AUUEAWASHE? IEXHWIGE IT.

'YT' appears twice in the text, and since we know that Y=T, T=O is a reasonable conclusion.  'BMFY' is _HAT, and for this, B=W is a reasonable guess. At this point, if you happen to notice that it is a Caesar cipher, that is, the cipher text is always 5 letters ahead of the plaintext, the rest of the message can be decoded immediately. However, if we ignore it, we get:

SOT ISAIXIGQE GZT ZSSOTIHEI WATXOS. DOZ III SOT PSOW WHEWE TO QOOP XO DOZ RIXXEI AQQ THAT WAX IRUOWTAST. I HAS SEAEW GWISL DOZ TO WEAQIEE THE IRUOWTASHE OK XQEEAEX, THE XZLLEXTIAESEXX OK THZRG SAIQX, OW THE LWEAT IXXZEX THAT RAD HASL KWOR A GOOT QAHE. SOW WHAT IO DOZ LATHEW KWOR THAT WORASX AUUEAWASHE? IEXHWIGE IT.

 Now we can guess X=S (WAX = WAS), Q=L (AQQ = ALL), S=N (SOT, SOW), W = R (WHEWE), which also gives K = F (OK, 2 occurrences), I = D (III, IO), D=Y and Z = U (DOU, 4 occurrences, possibly 'YOU').

NOT INAISIGLE GUT UNNOTIHED WATSON. YOU DID NOT PNOW WHERE TO LOOP SO YOU RISSED ALL THAT WAS IRUORTANT. I HAN NEAER GRINL YOU TO REALIEE THE IRUORTANHE OF SLEEAES, THE SULLESTIAENESS OF THURG NAILS, OR THE LREAT ISSUES THAT RAY HANL FROR A GOOT LAHE. NOW WHAT DO YOU LATHER FROR THAT WORANS AUUEARANHE? DESHRIGE IT.

Now the text is almost readable. Plugging in the obvious letters (A=V, G=B, H=C, P=K, R=M, U=P, L=G, E=Z) gives the decoded message:

NOT INVISIBLE BUT UNNOTICED WATSON. YOU DID NOT KNOW WHERE TO LOOK SO YOU MISSED ALL THAT WAS IMPORTANT. I CAN NEVER BRING YOU TO REALIZE THE IMPORTANCE OF SLEEVES, THE SUGGESTIVENESS OF THUMB NAILS, OR THE GREAT ISSUES THAT MAY HANG FROM A BOOT LACE. NOW WHAT DO YOU GATHER FROM THAT WOMANS APPEARANCE? DESCRIBE IT.

This is a random extract from 'A Case of Identity', from 'The adventures of Sherlock Holmes' by Sir Arthur Conan Doyle. This particular excerpt is taken from Wikisource.com.

You can try adding numbers, as well as upper/lower case differentiation, and punctuation into the mix. These can make the code surprisingly complex. I will try to add a few such examples later.

To conclude

Simple substitution ciphers are a wonderfully entertaining type of cipher, especially in a fictional setting. The reader can solve it themselves and it doesn't require specialized software to solve it. It can also be surprisingly secure if the amount of text you have is small - which is a good excuse to get your heroes to look for more ciphertext. 

Happy writing/reading/ciphering/deciphering!
Falcon-15-X-C

How to write a character who is smarter than you

We all have that one character (or few) who is significantly smarter than the writer. So, as a writer, how do you write such a character con...