Thursday, January 29, 2015

The mechanics of writing


Actually, now that I've written that title I'm pretty sure it doesn't convey what I wanted.
After all, considering the creative and communicative act of writing as "mechanical", as having "mechanics", is for me, too mechanistic.
The rest of this post is really my response to and notes from, enrolling in the MOOC "A Beginner's Guide to Writing in English for University Study" hosted by the University of Reading.
I've started it because I thought I could benefit, by improving and developing my English writing skills, style, vocabulary and grammar.

Link as follows: https://www.futurelearn.com/courses/english-for-study

Notes for myself:

A simple way of constructing individual paragraphs is to use the focus/response pattern.
A reader would ask: can I identify focus and supporting evidence in the essay? This pattern also helps readers to quickly scan the whole essay by focusing on the first sentence of each paragraph. Could also call this the claim/evidence or statement/argument pattern.

How do we assess a whole essay? One way, at the simplest level, is to look at the content, structure/organisation, language/grammar. Or, expressed as three questions: What have you got to say? How do you say it? Are you in line with rules and norms of English expression?

Exercise:
What essay title would you choose and why?
The pattern should conform to "Discuss the reasons why..."
- I'm going for an essay on subject matter I can use for another project; it helps justify the time I'll spend completing the course.
"Discuss the reasons why design discussions exhibit distinctive modes of conversational turn-taking."

Exercise:
Write facts and states of affairs or activities in present simple tense.
Look out for infinitives, plural agreement of verbs and auxiliary verbs between the subject(s) and object(s).
Look for correct form of the verb (or auxiliary verb) "to be", i.e. is, are, do, does,...
Look for subject-verb agreement, singular and plural forms.

Exercise:
Presenting new facts; begin with "there is" "there are".
Again, look for subject-verb agreement, singular and plural forms.

Exercise:
Look for nouns that can be used in plural form in order to generalise.

Exercise:
Looking out for temporary or permanent statements.  The "present continuous" form (versus "present simple") for changing or temporary situations; focus on a time expression. For example, "now" or "at the moment", etc. Look at how the sentence is handling time, is it now or permanent?

Exercise:
Mixing up the sentence types. Using long and short clauses. A simple clause combines subject and verb, the subject will have a matching verb.
Simple clause = subject + verb.
A compound sentence uses two simple clauses, joined by comma, linking word, followed by a second clause.
Compound sentence = simple clause (comma) linking word + simple clause
A more complex sentence might contain a simple clause, then a subordinator plus another simple clause. This the "main clause - subordinate clause" pattern.
Complex sentence 1 = main clause + subordinate clause (subordinator + simple clause)
Complex sentence 2 = subordinator + subordinate clause (comma) main clause

Writing Steps
Posit a title > brainstorm ideas > initial organisation with diagram or post-its > plan the essay > first draft > edit > give and receive feedback > write the final draft.

Ideal structures like this are useful for beginning, but as you become more proficient you can adapt and improvise more.

Also, once you become involved in the project, you will find the need to revert to different activities (not phases) possibly in no particular order. For example, if you are writing for on a project you have defined yourself then the formulation of your title will most likely change, often right to the very end as you conduct and write up research or the essay grows.

Exercise:
Identify the hidden question (or not so hidden) in the title.
"Discuss the reasons why design discussions exhibit distinctive conversational turn-taking."
In this case...
"Why do design discussions employ distinctive conversational turn-taking?"
or...
"What kinds of conversational turn-taking are used in design discussions, how and why do they work?"

Brainstorming the ideas. Statements, declarations, (even other questions?)

  • Design is a process involving 1, 2, and many people.
  • People need to explain ideas in order to act on them.
  • The easiest way to explain ideas or play with ideas is in direct conversation, using drawings, using tools, writing messages, in discussions with others to get feedback.
  • Software designs are so big that they need many people to be involved.
  • Software designs are so big the people need to specialise on areas.
  • Software designs are so complex that people need a broad understanding of the high-level design idea (architecture) in order to make a low level coded section work correctly.
  • Software designs are so complex that people need to share their knowledge of a specialist area in order that knowledge won't be lost if one or two people aren't available for whatever reason.
  • Design ideas need to be tested by discussing them with other people.
  • Problems in design can be better solved with the involvement of someone else e.g. "two heads are better than one" or sometimes you need a foil to bounce ideas off, or sometimes you simply need to voice the problem to hear it out-loud or have someone restate it (slightly differently perhaps) for you. 
  • A different design perspective or idea is often productive, taking an idea from one are and considering it in a different application or context.
Organise the lists, consider which ideas are most useful or interesting? 
  • Design research: 
    • Typical design team sizes
    • Need for others (knowledge, specialisms/disciplines, scale issues, desire for overlaps)
    • Design dynamics research:
  • Design process
    • Design as a planned precursor activity
    • Design as a dynamic
    • Design as a continuous activity
  • Problem solving / learning
    • Testing ideas
    • Generating ideas/possibilities
    • Creative reaction
  • How is the experience of design captured in the preceding themes? 
    • Highlight how the performative dimension is supported e.g. conversation, discourse, narrative, drawings, boundary objects like sketches or prototypes or lists etc.
    • This question might be the angle that reveals the research gap!
      • For example, what is the practice of the previous analyses, how might individuals adopt those practices
      • What practices might be completely neglected or missing from the previous analyses?
      • Might need to bring in examples or literature from other fields to address some of those questions! Again, this should highlight gaps in the domain (software designing)
Ask which ideas might be addressed or answered by evidence or research?
Perhaps you can link or extend some of these ideas?
Can you link any of the ideas with expected results or evidence gathered by your own research?

The previous outline is now ready for filling out with paragraphs...
And once I've done that I can evaluate it (see the simple feedback sheet on organisation and ideas).


    Now my turn to give feedback on the following aspects of another author’s assignment:
    • Does the introduction include some general background to the title? Is there a thesis statement?
    • Is the topic focus of each paragraph clear? Are the ideas in each paragraph supported with details and examples?
    • Does the conclusion sum up the main ideas of the essay? Is there a suggestion for the future (a recommendation or prediction or solution)?
    Look at the paragraph leader (sentence) followed by supporting statements, facts, evidence.



    Some really good text sharing tool pointers given:
    https://www.futurelearn.com/courses/english-for-study-3/steps/21855/progress
    i.e. text sharing services like:
    Pastie or NoteHub (best for learners on a mobile device)
    Fayaa Code (best for learners in China)


    Thank you so much Ann, Seb and Steve.

    Diagnostic
    Writing/Language/Grammar: Avoid just writing numerous statements and assertions. To improve you will need to link the ideas to make an argument.

    Argumentation: An aargument builds from your analysis of what is offered by way of data and as you start drawing conclusions or make findings.

    Imagine the questions that a reader asks: what is the point or message of this essay/paragraph/sentence. Can I identify its focus and supporting evidence in the essay/paragraph/sentence?

    Wednesday, January 21, 2015

    R and Harvard's PH525.1x MOOC

    Having enrolled "Statistics and R for the Life Sciences" run on EdX by Harvard (MOOC module PH525.1x)...
    Some notes and pointers for R; introductory and tutorials for basic statistical treatment of quantitative data.
    As an aside comment, would you believe that running R commands and generating plots, makes data fun and surprising? Or is it just me? At least it's something different, perhaps more interactive than doing the same thing in a spreadsheet. Did I say it felt like fun already? Perhaps when generating those beautiful little graphs automatically?

    Definitions: p-value, confidence interval, random variables, null distributions, central limit theorem, inference tests like t-test, association test, permutation test.

    Getting started with R. The software first.
    Download and install R from CRAN http://cran.r-project.org/
    Download and install R Studio for the desktop (the same people also run/operate Shiny) http://www.rstudio.com/products/rstudio/download/ 

    Q: Am I on the latest version of R?
    Check you're on the latest version, if not download the latest package (on MacOS use Safari).
    Run md5 checker from the terminal and verify.
    md5 R-3.2.2.pkg MD5 (R-3.2.2.pkg) = dd8999f50c5d4e392832797d091642db
    Then check the installation works, run R.app, type version at the R console to verify the expected installed version is running.

    Q: Same: am I on the latest version of R?
    Check you're on the latest version, if not download the latest package (on MacOS use Safari).
    md5 RStudio-0.99.489.dmg MD5 (RStudio-0.99.489.dmg) = 05cf866b07df6552583f98314ed09d38
    Again, check the installation works, run RStudio and go to RStudio>About RStudio to see the version window.

    Links for learning.
    Pointers to external material (from the EdX course)
    The underlying concepts.
    • Vectors (single or multi-element row, single data type)
    • Matrix (multi-element array, single data type)
    • Lists (a vector of mixed data types, organised into named components $xxx)
    • Data Frames (an array-like form of R list,  a matrix of mixed data types in which each column of the matrix corresponds to a vector. Can be addressed different ways, by named component or index location)
    Matrix commands
    > m <- rbind(c(1,4),c(2,2))  # rbind( ) is a function for row bind. cbind( ) is the corresponding function for column bind.
    > m
        [,1] [,2]
    [1,]   1    4
    [2,]   2    2
    > m %*% c(1,1)  # matrix multiplication operator
        [,1] 
    [1,]   5
    [2,]   4
    > m[1,2] # return value at matrix index location 1,2
    [1] 4
    > m[2,2] # return value at matrix index location 2,2
    [1] 2
    > m[1,] # row 1, shows how to extract submatrices from a matrix
    [1] 1  4
    > m[,2] # column 2, shows how to extract submatrices from a matrix
    [1] 4  2

    A series of setup steps in R/RStudio (and using stuff at https://github.com/genomicsclass/dagdata):
    > install.packages("devtools")
    > library(devtools)
    > install_github("genomicsclass/dagdata")
    > install_github("ririzarr/rafalib")
    > 1:10
        [1]  1  2  3  4  5  6  7  8  9 10
    > x <- 1:10
    > y <- rnorm(10)
    > plot(x,y)
    > ? read.csv
    > dat <- read.csv("femaleMiceWeights.csv")
    You might need to set the working directory to get read.csv to find the right file


    > class(dat)
    > head(dat)
    > dim(dat)
    > dat$order
    > colnames(dat)
    > dat$sleep_total
    > c(dat$sleep_total, 1000)
    > plot(dat$brainwt, dat$sleep_total)
    > plot(dat$brainwt, dat$sleep_total, log="x")
    > summary(dat)
    > dat[c(1,2),]
    > dat[ dat$sleep_total > 18, ]
    > dat$sleep_total[ c(1,2)]
    > dat[dat$sleep_total > 18,6]
    > mean(dat[ dat$sleep_total > 18,6 ])
    > dat <- read.csv("msleep_ggplot2.csv")
    > which(dat$sleep_total>18)
    > dat$sleep_total[which(dat$sleep_total>18)]
    > dat$sleep_total[22]
    > which(dat$sleep_rem<3)
    > which(dat$sleep_rem<3 & dat$sleep_total>18)
    > sort(dat$sleep_total)
    > order(dat$sleep_total)
    > dat$sleep_total[order(dat$sleep_total)]
    > rank(dat$sleep_total)
    > rank(c(1,2,2,3))
    > match(c("Cow", "Owl monkey", "Cheetah"), dat$name)
    > idx=match(c("Cow", "Owl monkey", "Cheetah"), dat$name)
    > dat[idx]

    Q: Running a simple correlation analysis in R
    Useful videos (link) (link2)
    The presence and strength of a linear relationship or correlation between two quantitative variables can be tested by calculating the correlation coefficient (r) between the two variables.

    > argentina<-read.csv('countries.csv')
    > head(countries)
        country year gsli.total gsli.financial gsli.people u5_mortality_rate life_expectancy unemployment_rate
    1 Argentina 2004       5.07           3.25        0.74                       17.9                       74.5   12.2
    2 Argentina 2005       5.05           3.14        0.93                       17.1                       75.0   10.6
    etc.

    Run a correlation test between the two variables (vectors) we want to compare, i.e. countries$gsli.total and countries$unemployment_rate.

    Q: Making a pairs plot to highlight possible correlations between multiple variables
    Produce all possible pair-wise plots (link)
    > names(countries)
    [1] "country"                    "year"                    
    [3] "gsli.total"                 "gsli.financial"          
    [5] "gsli.people"                "u5mr_mortality_rate_median"
    [7] "life_expectancy_from_birth" "GET_UR"                  
    > pairs(countries[,3:8])
    pairs-plot for the countries dataset (for axes read x-y as illustrated gsli.total v gsli-fin)
    By inspection the only variable without obvious possible correlation is gsli.total.


    Sharing 360° video?

    So, you've got a 360 degree video file from your GoPro. What to do with it? Well, share it on YouTube. YouTube supports uploading and pl...