Tell better stories

Category: Uncategorized

Writing a Useful, re-usable application in Microsoft Access

Access seems very convenient. You have visual editors for forms, for data tables, for data relationships, and those things are pretty easy to learn and use. But they also mean that access doesn’t really lend itself to complex, scalable, adaptable applications and especially, to database and office automation applications that might one day need to be moved to a long-term multi-user system.

But it’s very tempting to prototype a solution in Access, for a number of reasons:

  • It can all be local (no online storage, no shared resources)
  • All the parts are in one platform (the Access interface)
  • It saves your work to a single file

But these advantages can and will lead to later problems. This post is a guide to everything I have learned about making an application in Access, mostly for me, so I don’t forget important stuff. But you’re welcome to it. If you have some admin/management tasks that are too complex for Microsoft Power Automate or don’t require, or don’t want, an online solution, this is how to do it.

Application Needs

Any application needs global variables so you can store business rules and business data. You can (and should) store some of that information in a table in the database. Network paths, local paths and URLs should be stored in a Globals TABLE.

Anything else that needs to be stored globally, that will not be modified by a user, can be stored in a class.

Global Class

I usually just call it “Globals,” and it will look something like the following. Inserted directly via the VBA editor, a new Class Module named “Globals”

Option Compare Database
Option Explicit
Public LogPath as String 'path to a debug log file
Public Tokens as new clsTokens 'a class where I store usernames and 
'passwords for network locations and websites

Private Sub Class_Initialize()
     LogPath = "C:\Logs\MyAccessApp"
     Tokens.add "mywebsite", "http://www.mywebsite.com/login", "hwd", "askjh3*(ns"
End sub

The class clsTokens is pretty simple. It contains a collection based on another custom object I use in VBA only, called “stringlist.” It’s a wrapper for a key/value collection stored as a delimited string.

ALL my VBA modules begin with the lines

Option Compare Database
Option Explicit

This is just good practice.

COMBO BOXES

The options in Combo boxes should always come from a TABLE or QUERY.

You might have a standard list of options but in some places you might also want to include custom values entered manually. That’s why you use a QUERY as the source. NEVER use a value list.

Database

Access is a database tool, but even if you don’t need a database for the purposes of your application, it’s very useful to have one available. However, Access files can bloat very fast, record locking is needlessly complex, and a prototype application can get very messy very quickly, especially if you need to update, improve or change it without having to stop using it for your work.

The solution to all of this is twofold:

#1 SPLIT the database

Splitting your application means you have one Access file that contains the FORMS and QUERIES and all your VBA, and another that contains JUST THE TABLES.

There are some big performance gains to be had this way, but also, you can create multiple versions of the front end and connect them all to the database. I use this mostly so I can have a dev version and a version I’m using for work, but connect them both to real, live data. I know that sounds a bit mad, and it would be for a massive enterprise solution. But I’m talking about single person or small team apps where the usual risks are minimal.

#2 NEVER use a TABLE as a form record source

Don’t use a dynaset RECORDSET either.

Always work with data from a query. This means the data displayed on screen in a form is just a copy of what’s in the database. If you need record locking (a single user application doesn’t. A multi-user database does) I’ve found it’s best to build a semi-manual locking system which functions according to the needs of the users. (Typically this requires adding three fields to every TABLE: “timeStamp”, “locked”, “user”.)

Using a “bound” form (a form dynamically linked to a table (the “row source” property contains the name of a TABLE)) greatly increases record access times.

Form Manager

As soon as you start working this way, you will realize that every form is going to need certain functions – but you might also need different “views” of the same dataset, based on such divergent reasons as being at different stages in a business process or SOP, or because different users have different amounts of screen real-estate. This is where the form manager class becomes really valuable.

Code at the top of the form’s code module:

Option Compare Database
Option Explicit

Private FormMngr As clsFormManager
Private Sub Form_Load()
    Set FormMngr = New clsFormManager
    Set FormMngr.frm = Me
    FormMngr.HNDLForm_Load
End Sub

Form Manager Class Module

Option Compare Database
Option Explicit

Private mfrm As Form 		'set a reference to the form object
Private FSO As FSOWRAPPER	'another custom class for accessing the FileSystemObject's
							'functions without having to Dim FSO as FileSystemObject
							'in every Method.

This class is divided into sections which I label UNDER the sections (it makes them easier to find, and I find I am less likely to put code in the wrong sections).

'// Variables above this line belong to the form.

Private Sub Class_Initialize()
    Set mGlobals = New Globals
    Set FSO = New FSOWRAPPER
End Sub

Public Property Get Globals() As Globals
    Set Globals = mGlobals
End Property

Public Property Set frm(forForm As Form)
    Set mfrm = forForm
End Property
Private Property Get frm() As Form
    Set frm = mfrm
End Property
'// properties above this line stay at the top

'// add no methods above this line; properties of the Class only

'// methods above this line belong to the properties of the Class only

This top section is pretty much identical for every form.

Public Sub HNDLForm_Load()
 	setDataSource 'the source may be a "search" form, or a listbox
  	'so the setDataSource function will be customized to the needs of the form.
End Sub
Public Sub HNDLForm_Close()
  	'on close events
  	releaseLocks
End Sub
'// Above this line, Targets for event handlers for the parent Form object Only

Every form will have LOAD and CLOSE event handlers, if nothing else to handle record locking.

'// methods above this line are targets for FORM CONTROL BUTTONS event handlers
'// methods above this line are for the targets of FORM OBJECT VARIABLES DECLARED WITHEVENTS
'// methods above this line are targets for OTHER FORM CONTROL event handlers

The three different types are really just my own preference, but it does make them easier to find on big, complex forms. Objects with events are going to include anything with asynchronous callback, which generally needs a lot of debugging, so it’s good to have a dedicated section. MOST of these methods are going to be triggered by COMMAND BUTTON controls, so I group them all. This just keeps them out of the way when looking for the handlers for other control types, which are more likely to need debugging.

So how exactly does FORM EVENT handling work?

Let’s take a text field where an email address is displayed. I want to be able to left-click the field and email the address in the field via GMAIL, but right-click it to get the usual context-menu.

The email is displayed in an unbound text box, with an “event procedure” for the On Mouse Down event that looks like this:

Private Sub txtEmailDynamic_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
  	DoCmd.CancelEvent 'prevents any further events from triggering
  	If Button = acRightButton Then Exit Sub 'polite
    If Button = acLeftButton Then
        FormMngr.HNDLtxtEmailDynamic_MouseDown
    End If
End Sub

txtEmailDynamic_MouseDown is the true event handler, so code that manages event propagation MUST be here. But all other code is kept in the Form Manager Class, so HNDLtxtEmailDynamic_MouseDown looks like this:

Public Sub HNDLtxtEmailDynamic_MouseDown()
    Dim subj As String
    Dim urlGmail As String
  	subj = "An email from my application"
  	urlGmail = makeEmailToGmail(frm.email, subj) 'A function that generates a 
  	'URL to pre-fills an GMAIL message. You have to be connected to a 
  	'GMAIL session in your default browser
  	sendGmail urlGmail 'a sub that opens the default browser and navigates to 
  	'a correctly formatted gmail URL
End Sub

This structure enables me to organize the code in my application around the function of individual forms and their views of the data. For example, I can have two identical forms, but one of them suits a smaller screen size or form factor. Or, alternatively, I can have one form, but it loads a different Form Manager class depending on whether it was opened read-only (no record locking, no updates) or edit-mode (changes to the main record) or my personal fave, the main record is read-only, but subforms like an activity lock or checklist can be updated.

Diagram time.

Form Manager model

Note: data is queried using SQL in a set of functions for getting data, OR by dynamically building an SQL statement that is pasted into the form’s Row Source property, and then requeried.
I don’t use stored “queries” unless I need a nested query with some sort of Domain Aggregate Function. Access tends to fall over if you try to do those with just a single ACCESSQL statement and with functions.
Also the “query builder” is just as useless as it was in Microsoft Query, nearly 30 years ago.

Complex versions

In more complex versions, I have a separate class that queries data, which itself uses functions from a standard module I call “data_utilities.” This way I can wrap the range of Recordset, Recordset2, DoCmd and other SQL functions that are needed for efficient work with Access data, inside a range of simple-looking function calls.

Main Benefits

This structure has a range of big advantages, in particular for code maintenance.

  • Minimal clutter and maximum readability in FORM modules
  • no Method duplication between forms that work with the same data
  • no duplication of forms for different datasets
  • the structure lends itself to readable code that’s more easily refactored
  • restructuring the database itself has much less impact

Other Benefits

The simplification of subform management is HUGE. At some point I’ll do a whole post on how I apply the same principle to subforms.

On the Feast of Stephen – one from the archives

Some of my own writing…

Originally written on St Stephen’s day, 1995.

I updated it a little for a recording a few years ago.

“Good King Wenceslas”

A Christmas Fairy Tale

GOOD King Wenceslas looked outOn the feast of StephenWhere the snow lay all aboutDeep, and crisp, and even.Brightly shone the Moon that nightThough the frost was cruel.

* * *

LANKIN trod lightly. It was the only way he knew. Though the snow was deep, crisp and even, the footprints his felt slippers left in the surface would lead you to think that it was no more than an inch or so deep. Or that Lankin had very little material substance, which was rather nearer the truth.

Behind him, at the treeline, it wouldn’t have been diffcult to imagine small, sharp narrow eyes, watching from the darkness, but Lankin didn’t need to look back to know that the Queen was watching from the woods, and he didn’t have to look up at the moonlit hills to know that somewhere, the King, also, was watching.

Lankin, if his thoughts could run that far, was thinking of where he was going, and, if he could manage a thought so far from his instinctive nature, of what he would do, when he got there.

* * *

IT would have been called, in a more traditional tale, a cottage. It was more of a croft, long and low, shaped like a tumulus or small barrow, covered (if you could see under the snow) with layers of interwoven bracken fronds, but now, under the deep, crisp, even snow, the only features that disinguished it from the other humps, tumps, hummocks, hillocks and lumps around and about, was the thin column of smoke rising, from a chimney little more than a hole in the roof, in a straight line like a rope to the vivid stars.

With a certain amount of cursing, the Old Man, whose name was Felix Godbolt, shoved open the much repaired door, cursing the snow, the cold, the poor workmanship of the door and its hinges, and cursing most of all his age, that made the snow, the cold, and anything that required good workmanship his enemy.

His snow shoes were woven from twigs and willow-bark, and he pulled behind him a flat sled, on which he had loaded a couple of bundles, and axe, and some blankets. A casual observer, especially one that knew the song, might well have wondered where he was going to load the winter fuel, which he must have been going out over the deep, crisp, even snow to gather.

But the old man was not an idiot. If he had thought that he could survive the winter by going out into the snow to gather firewood, he would already have been many years dead. The croft was itself more than half filled from floor to ceiling with firewood, and there was a pile behind the croft fully the length and height of the croft itself.

He pushed the door hard closed with his shoulder, cursing again, and made sure that the horseshoe was hung straight above the doorframe, before setting out across the snow.

* * *

WENCESLAS, both King and Good, stood in Christian Bliss, watching the final preparations for the celebration of the birth of Christ that would, that night, take place within the Great Keep of his mighty feudal domain.

Every year, year after year, the same great feast, the same glorious mass, the same distribution of winter essentials to his guests. For this night, Wenceslas’ guests were the poorest of the poor of his kingdom – the serfs and bondmen, the dispossessed tenants and cursed sick, the lame, the deformed, those touched by the hand of God, and those abused by the hand of man.

For the moment, Good King Wenceslas looked in.

He looked into the mews where the austringers were preparing the birds for the Great Fly Past at midnight – most of the hawks would not take part – this was a job for the two Little Owls, and the Merlins, who could be trained to fly at night. The austringers would have spent much of the last two months rounding up the doves that would circle the keep in a great humming cloud.

He looked into the stables where for once there was quiet – none of his visitors had horses, and Wenceslas felt that on this Day it was better for the horses to be unseen, and he could feel that he was among his visitors.

He looked into the cellars where the butlar was teaching the underbutlar the art of judicious wine selection. He was at the point of saying that the secret was not to serve the best wine, but the one most likely to please the palate for which it was intended.

He looked into the mighty kitchens, where a fireplace large enough to accommodate four oxen was, indeed, accomodating four oxen. The heat in the kitchen was almost unbearable after the crisp sharp cold of the courtyard and the quiet still cold of the cellar. The fire was being charged with logs that took two grown men to lift, and the kitchenboys turning the spithandles and ladling wine and fat onto the carcases were having to work short shifts as even their iron screens were not enough to prevent them from being slightly roasted themselves.

(A cook offered Wenceslas a cup of hot wine, but he refused, preferring to await the beginnings of the feast.)

He looked into the dressing rooms where platters were being built up on dishes the size of cartwheels, and tunnys, flagons, kegs, barrels and bottles were being carefully pre-stacked for their speedy delivery to the hall in the proper order.

He looked into his daughter’s suite, where serving girls and pages were lined up, each one to be finally dressed by the Princess (who spent the rest of the year being dressed by them).

He looked in one by one on his sons, each of whom was preparing his party piece, beit a speech on the virtues of man (the eldest), a demonstration of the fine art of fencing (his second and third) or a selection of reels on the fiddle (his youngest).

Finally, he looked into the great hall, whose four fireplaces already blazed, where narrow tables had been laid out, narrow benches crammed in, and boards and knives set at each place. Wenceslas knew that it was a matter of pride for those that attended the feast every year to bring back the same knife that they would have found at their place at the table one the first year they attended, though each year a few knifes were taken home, by those who were there for the first time, or those whose knife had been lost, or worn out, during the current year – and of course those who had no need for a new knife, but who took one home anyway, through prudence or absent-mindedness.

The finishing touches were being added to the decorations. In other parts of the castle, seasonal decorations were of cloth or even paper, in addition to all the winter greenery that would be brought in to show that inspite of the cold and the deep, crisp, even snow, there was still evident green life outside in Nature, as much as inside, here in the abode of man. Here in the great hall, all the decorations were of polished brass, as the heat with all four fires ablaze, and the tremendous draft and noise (and occasional bouts of food throwing) would all to rapidly leave the more conventional seasonal adornments looking rather sad and delapidated.

Wenceslas cast about him for a page:

“Young fellow,” said he (for spake him always thus), “Methinks ’tis time about for looking out. Come follow me to the top of this our warm and homely tower, to see that none hath straid from the rightly path that lead him hence this night.”

“Sire.” replied the page (for no more word was needful).

* * *

THERE was a little but very light wind at the top of the topmost tower of the keep, and though the moon shone bright and full, yet the stars were bright, sharp, and faintly blue.

With foreknowledge of Wenceslas’ tradition, the snow had been swept from the top of the tower, and a small fire had been lit in the room below to warm the flags on the parapet. Wenceslas would not have noticed, as though he lived in comparative luxury, he was quite impervious to physical deprivations. The page, on the other hand, was extremely glad of the fire, and the warmth of the stones under his feet. A kindly guardsman handed the page a cloak as he stepped outside.

Wenceslas cast his eyes all about, and saw, to his considerable satisfaction, that all the tracks in the snow led like the spokes of a cartwheel in across the plains and hills to the castle. He saw many people moving along the tracks, with jolly lanthorns, singing cheery seasonal songs, some pious, others less so. Wenceslas appreciated both, as expressions of joy.

He raised his eyes to the horizon, and paused a moment:

“Methinks I do espy, upon the brow of yonder lowly hill, a man who pulls a sled across the deep crisp even snow. Surely knows he of the festival this night? It needs him not to seek his winter fuel, for he may have his fill of heat and light and food and joyous company this night would he just turn his path to the right, and join the host to which I am the host. Know you, page, who he be?”

“Sire, he lives a good league hence, underneath the mountain. He has a cottage under the eaves of the forest, at a place the call the fount of Saint Agnes. Every year he goes to the coppice at the place called the Mound of the Other King, but none knows what mote he there.”

“Never has he come to my feast?”

“Never has he Sire.”

“Well we can’t have him stay out all night, especially when there’s food and drink to be had. Hie you to the kitchens, get me a good bundle of food, wine and stuff to make a fire. If he cannot or will not come to my feast, I shall bring it to him. Meet me at the gate.”

* * *

THE Old Man, with much trouble, finally reached his destination. Lankin was already there, waiting for him, but the steel of the Old Man’s axe was too much to bear, and he couldn’t hide himself, even against the pallor of the deep crisp even snow.

“So this year ye comes in person, milord?” the Old Man mocked.

“Mock me if you will. I come because I have no choice. An if happen you forget I was hear in person last year, and before that, and before that, back as far as memory.”

“My memory is longer. Them,” the Old Man streatched out his arm and pointed to the castle, “they’s forgot that yous’ve ever been. An now this, your yearly death at my hand, that your Queen sends you to and your King watches (I sees him, no matter what), is just a story. Do you not know what they say, in the village? They say I fights a battle that has long been won.”

“But you always come.”

“You too.”

“I come because one year, getting nearer every year, you’ll die, and that year, noone will be here to kill me, and I will be able to reunite the Queen and the King, and we will be more than memories and shadows.”

The Old Man smiled.

“I shall tell you what defeated you, as I know it will do not good, but let you know that you lost because you have no imagination; you don’t even realise that you’re changing even as you change. When I die, you’ll not come here any more; it will be as if you’ve never been.”

Lankin appeared to be distracted. Certainly he hadn’t heard the last part of the Old Man’s words, or he made as if not to have heard.

“We seem to have visitors.”

The Old Man looked in the direction of Lankin’s stare, and saw Wenceslas and the page.

“Let them come.”

Lankin and the Old man stood watching as Wenceslas and his page approached.

* * *

WHEN they were near enough, Wenceslas called out:

“I say! I bring you Christmastide goodwishes and the comfort and joy of good victuals and the wherewithall to make fire.”

“I have both those, in sufficient store, but I thank thee for thy thoughts going out to an Old Man who is of an older world that yours, and not long for it, either,” the old man called back, smiling quietly.

“You I know, from my page here, who says you are one Godbolt, of Saint Agnes Well, but this gentleman beside you I know not.”

“Nor should you, my lord King. He is a member of a certain gentlefolk, who visits this place apon this night every year, and I meet him, and we act out a sort of ancient rite.”

“How fascinating,” remarked Wenceslas in a tone becoming of the most modern of monarchs.

“Once upon a time,” the Old Man went on, “there was another King, though his name was spoken with trepidation and many a sidewards glance. Now, gladly, he is all but forgotten. I, and milord Lankin here, we remember, so we have to come, but I’m the last, and when I die, the memory will be gone, and even Lankin will not know any more.”

“You are mistaken,” Lankin cut in, “Look up to the top of the mountain, for there the King stands waiting.”

The others looked up, and though the Old Man did indeed see the tall figure of the Mighty King of the Elves, with his shaggy goat’s legs and his great head crowned with the antlers of a giant stag, this image struck no awe, fear or wonder in him, for he knew what Wenceslas and his page would see.

“A mighty stag,” said Wenceslas, “and a handsome fellow at that. I suppose he might seem like a king in this place, if there were no good Christian men. It is good to remind ourselves,” Wenceslas went on, “that we are not quite so far from the wilds as we like to think, but it is in the gesture that I make with these three nights of feasting that I affirm how men stand apart from beasts; we help each other because we can, not because we have to.”

Lankin wore a look of ill-disguised horror, for as he himself looked at his King, that glorious symbol of barbarism, he saw the silhoutted figure fade from view, replaced by a stupid stag, a mindless rutting beast.

“Then it is over,” said Lankin, “This year you will not even need your axe.”

Lankin turned and walked away, and it seemed to all three that as he walked he shrank, and dwindled, to a tiny, shiny winged mannikin, and finally to a little point of light that twinkled, spun, twirled, and vanished.

The page began, “but that was…?”

The Old Man continued, “a little story, in your head; you might know what you think you saw, but who can say what really happens. The best we can do is tell the story of the world as it writes itself, as that is how we see it. Now, shall we go to this feast of yours? My rheumatism is killing me.”

FIN.

Moatcast Q&A March 2018: Genre Fiction Writing

“chock full of advice how to be a good writer”

I might have brought some writing talent to the table initially, but what made me the writer I am now? Listening to this man.

Timandra Whitecastle  //  Author, The Living Blade series

Scroll down for the replay…

March 29th, Themed Q & A

00Days00Hours00Minutes00SecondsRegister here: Moatcast March 2018: Writing Genre Fiction

Genre isn’t a dirty word

I mentioned in the last Moatcast that genre is often seen as a way of segregating fiction. Many authors dread the question “what sort of books do you write?” because they know how close behind a judgement is likely to be.

In this month’s podcast we’re going to be talking about, and taking questions on, the advantages of genre fiction and how to exploit them, and the disadvantages of genre fiction and how to turn them to your advantage.

Your magnum opus

Many authors are driven by an artistic animus, the need to get something that’s in here out there. But in the mean time, you have to pay the bills. Genre fiction sells.

I’ll say that again:

Genre Fiction Sells

…with guest co-host Craig Gordon!

Following the success of last month’s Live Lesson, and the results of the poll conducted during the session, I have decided to institute regular themed Q&A webinars, and have a guest co-host every time.

You will also notice there’s a title and a logo. The title was coined by March 2018 guest co-host Craig Gordon – so it seemed only fair to invite him along.

“Moatcast” – n. a broadcast from the battlements of Castle Dewulf

Craig Gordon, SF author and man pretending he knows how to look serious

Theme: Writing Genre Fiction

At the start of the webinar, I will give a short introduction to the topic, and Craig will introduce himself.

We’ll then proceed to answer some of the questions we’ve already received, before taking questions live from anyone who attends.

If you want to ask a question in advance, ask via twitter using the box below, or email me via harrydewulf@densewords.com

#Moatcast032018 Question:

Click here and type your question after the colon

Registration is closed…

… but you can view the replay right here:

Click here for information on upcoming Moatcasts

Your General SF Culture – story influences

Author’s Culture and Story Influences

As an editor, I’m sometimes more conscious of where stories come from than many of the writers whose work crosses my desk. This isn’t a surprise. Story influences are sometimes less important than the stories they inspire.

Nonetheless I was a little shocked to discover that one of my authors, who writes serious and innovative cyberpunky/Dys/U/topian SF, had never heard of The Marching Morons.

I suppose I shouldn’t be shocked. Every generation is shocked at how uncultured the next generation is, and reports of this go back at least to ancient Greece.

However, if you write Science Fiction, Tech Thrillers or Cyberpunk, there is some culture you need to make sure that you have. I could go into all sorts of detail on the crossover between pulp Sci-Fi and sociology studies, and professors experimenting with LSD or trawling paranormal literature. Of the Red Menace and it’s relationship with the Alien Menace. Of Sen. McCarthy and Flash Gordon.

But I hope you’ll go do some of that research yourself. Even if you don’t, I’ve selected three short stories that were among the most influential of that mid-twentieth century explosion of creativity and social awareness, that gave rise to modern SF, from space opera to cyberspace.

I won’t give you any analysis of the stories here. I’d prefer you read them, and let them speak for themselves.

The Marching Morons, by Cyril M Kornbluth

Wikipedia will tell you that:

“The Marching Morons” is a science fiction story written by Cyril M. Kornbluth, originally published in Galaxy in April 1951. It was included in The Science Fiction Hall of Fame, Volume Two after being voted one of the best novellas up to 1965.

This is true. You can read the story in various places online. Here’s one I found today:

http://mysite.du.edu/~treddell/3780/Kornbluth_The-Marching-Morons.pdf

And Then There Were None, by Eric Frank Russell

Originally a short story, it became the third part of his book, The Great Explosion, about which Wikipedia has this to say:

The Great Explosion is a satirical science fiction novel by Eric Frank Russell, first published in 1962. The story is divided into three sections. The final section is based on Russell’s famous 1951 short story “…And Then There Were None.” Twenty-three years after the novel was published, it won a Prometheus Hall of Fame Award.

This also is true. You can read the story in various places online. Here’s one I found today:

http://www.abelard.org/e-f-russell.php

Who Goes There, by John J Campbell Jnr

Wikipedia tells us:

Who Goes There? is a science fiction novella by John W. Campbell, Jr., written under the pen name Don A. Stuart. It was first published in the August 1938 Astounding Science-Fiction.

In 1973 the story was voted by the Science Fiction Writers of America as one of the finest science fiction novellas ever written. It was published with the other top vote-getters in The Science Fiction Hall of Fame, Volume Two.

The novella has been adapted four times as a motion picture: the first in 1951 as The Thing from Another World; the second in 1972 as Horror Express; the third in 1982 as The Thing directed by John Carpenter; and most recently as a prequel to the Carpenter version, also titled The Thing, released in 2011.

In my opinion, none of the movie adaptations captures the atmosphere, nor the fundamental message, of the short story.

A quick search of the internets found a .pdf of it here:

http://www.pulpmags.org/PDFs/AS_1938_08.pdf

3 Kinds of Smarts

An Unfinished Definition

A while ago – a fair while ago, I wrote a series of blog posts detailing the major difference between types of mental competence. I talk about intelligence, cleverness, cunning and wisdom.

That post is all about what the words mean, where they come from, and how those types of intelligence are applied, as a means of making sense for a reader when describing your characters actions and behaviors.

Earlier this week I saw a Quora question (for which I had no adequate answer), and it set me thinking about my original posts, in particular, about what was missing from them.

I eventually concluded that there are, culturally speaking, 3 kinds of “smarts,” and the differences between how and when they are applied arise largely from the differences in how, when and where they are learned.

So I came up with a new set of definitions for this trichotomy, but before I tell you all about them, a quick warning: certain cultures, including, until recently, Western culture, see education or personal development as a combination of all three. I’ll tell you all about that at the end.

  • street smarts
  • book smarts
  • age smarts

Street Smarts

Generally most associated with words like “clever” and “cunning,” street smarts are the ones you have to learn fast in order to survive. So the nature of street smarts varies very widely. The Street Smarts of an African Bushman and a member of a Nairobi street gang probably both include information about finding food and avoiding danger, but in strikingly different ways. The similarity is that they both had to learn these things as fast as they could, in order to protect themselves and their friends and family, and in order to subsist in the short term. Street Smarts are essential in every lifestyle, everywhere on the planet. A university professor who wants, one day, to get tenure, will have to use his street smarts to learn and negotiate faculty politics. A steel mill or oil rig worker will get all sorts of safety training, but won’t be completely safe until she’s used her street smarts to learn to negotiate and balance all the risks and dangers in those complex and difficult environments.

Street Smarts is excellent for solving urgent, simple and short term problems. Sometimes a street smart solution creates a new problem.

Everyone has street smarts.

It’s a common and frankly harmful stereotype that the hero, being noble in spirit, lacks street smarts, and has to acquire Artful Dodgers to help him through certain environments. This trope is common in every kind of story. But a better story has the hero dropped into an unfamiliar environment, and shows the process of his learning the necessary street smarts to make it out again.

There’s a pervasive Hollywood myth that computer hacking is a kind of highly creative street smarts. This is bollocks. The best hackers are passionate, dedicated, sometimes a little obsessive, and profoundly BOOK SMART.

Most people understand street smarts instinctively.

Book Smarts

Generally associated with words like “intelligent” and “educated,” book smarts are learned through formal education. Teachers who are trained to teach pass on their knowledge and skills in a structured process and an institutional environment; academics who are trained in study conduct research and write textbooks that you can learn from. Book smart people have information at their fingertips on their specific field, but they also become very good at spotting connexions and thereby making insights and paradigm shifts. Book smarts is excellent at finding solutions to complex problems.

Book smarts solutions are often restricted to the specific problem they were devised to solve.

Book smarts have to be deliberately acquired and are best acquired voluntarily.

How much book smarts you have will have an effect on your understanding of what book smarts is. If a character has very little education, they will tend to think that book learning is about remembering lots of facts (they may also think this if they are a politician, but that just means they didn’t understand what their own education was about). But true book learning is both information, understanding AND synthesis. Synthesis is the capacity to see the relationships between different information from different sources, to compare it, and to build new knowledge from it. It is the foundation of all the advancement in knowledge and culture, and the real reason why education is important.

Age Smarts

Age Smarts are most commonly associated with the word “wisdom.” Experience alone is not enough to create age smarts. If you’re young, you may become something called “street wise” but all this means is that you have a lot of experience of some specific street smarts, that makes you seem wise to the people around you of a similar age to you. Age smarts comes with age alone. But age alone is no guarantee of acquiring age smarts. The people who become wise seem to be those who either dedicate their lives to a specific cause, or spend their entire lives perfecting one skill, or just spend their entire lives in the same place, doing the same thing. This seems to be true in any context. It also seems to help if you cultivate and preserve an openness to new ideas.

This means that age smarts may make you very wise about some things, but ignorant or naive in others. A crucial element of wisdom, therefore, is recognising the limitations of your age smarts.

Age smarts provides long term, often very simple, solutions, to all kinds of problems. Age smarts solutions are often the most efficient solutions to problems. Partly this is because the best way to find a more efficient solution is trial and error, and trial and error requires time.

Most people recognize age smarts in others readily, but have difficulty seeing it in themselves. The young assume they have it long before they do; the old always assume they don’t have it yet. This is a horrible cliché, no matter how often it seems to be true. Feel free to subvert it.

The Path To Enlightnement

Medieval Apprenticeship was very similar to Wushu masters (in the Wuxia genre), in that it involved a combination of all three types of smarts, over a period of time. No one thought smarts of any kind was something you just have. But at the same time, no one thought you could only learn book smarts, or that the only learning of any value was book smarts (which seems to be the current obsession in Education). Medieval Craftsmen, much like kung fu masters, learned their mastery in three stages.

First the apprentice, who has to work hard and learn hard and learn fast. It’s a combination of street and book learning, both literally and figuratively. The kung fu novice has to perform all sorts of menial tasks as well as do his hours of training; only a combination of the agility of street smarts and the discipline of book smarts will enable him to get everything done.

The second stage is as a journeyman – a day worker, or casual laboror, but it’s anything but casual. The craftsman must find masters who will take him on to help them in their work, and he’s paid a day at a time, so he better be good at what he does. If he wants to be come a master craftsman, he must learn from as many masters as possible, so he must travel and work. Again, a combination of street and book smarts sees him through. In the wuxia story, the hero becomes a wanderer, seeking people in difficulty and offering help to them, as he tries to solve some personal problem. He must gain a rapid understanding of people and their problems, but will learn more from his failures than from his successes.

The final stage is to prove your mastery. It is accepted in both cultures that a key element in becoming a master is time. Only once you have been a practitioner for many years, can you aspire to mastery, because many years practice is what it takes to master a skill.

(Some stories – in fact, many modern stories, have characters who are ‘naturally gifted at a young age.’ You should be aware that those stories are fantasies, and fit into one of two categories; they are either parables for adolescent coming of age, or they are escapist, adolescent wish-fulfilment. Nothing wrong with either, but be aware that stories are rarely what they seem to be.)

The Medieval Craftsman must make his Masterpiece. It’s a typical peculiarity of language that we use the word ‘masterpiece’ to mean ‘the greatest work an artist has ever made,’ but to a master craftsman, it’s just proof of his skill, and in fact, everything he makes afterwards will be even better.

The wuxia hero must defeat his disgraced former master/defeat his murdered master’s killer/acquire the famous artefact/reach enlightenment to become a master himself. After he does, he can set up a school, and take students, and grow his beard long and white.

These two traditions both say that the path to mastery is to use all three forms of smarts; to learn in all three ways. To combine, Street, Book and Age to reach Mastery.