Thursday, January 23, 2025

Setting automatic gVIM textwidth for Windows

I've recently challenged myself to learn VIM, a text editor popular with computer programmers. One of the biggest obstacles was a feature that automatically truncates the length of lines in text files. You're typing, then the new line is magically (so it seems) started when the typing nears the right margin. This default behavior was quite different from other text editors that I've used. It introduced line breaks that were unwanted. This post was written for new users explains how to turn this feature on or off. The next level of setting default behavior is also explained.  

The command that controls this length is textwidth or tw when abbreviated. To see your current textwidth, use this command. The question at the end provides the current status of a variety of commands. 

:set tw?

The installed value of gVim (9.1.744) is textwidth=78. This will wrap any text beyond 78 characters by starting a new line. Sometimes this is desirable. However, it can also introduce problems if these line breaks are unwanted. It's important to know how to turn this feature on and off to get the behavior you want.  

Let's say your current value is the default of 78. To turn it completely off, use this command:

:set tw=0

Conversely, the automatic breaks can be set back to 78 or whatever the desired length is by specifying a value. 

:set tw=78

Turning this feature on and off was a big step forward. The default though was always 78. This caused problems because it would start breaking at unexpected times when I didn't remember to reset the value to zero. It was annoying to unexpectedly have a line break, then time was wasted fixing the break. 

The next step to address this problem is change the default configuration. Tracking this down took some significant detective work. Here's how to track it down and change it to off or change it your desired break length. 

This command will reveal the location of the VIM configuration file, _vimrc on Windows. 

:echo $MYVIMRC

Here's an example response. On my Windows PC, the default location is:

C:\Program Files\Vim\_vimrc

Setting textwidth in this configuration file is not enough though, contrary to what some online discussions might suggest. The plot runs deeper. The top of the _vimrc file contains a reference to another file. Here's the relevant part of _vimrc.

" Vim with all enhancements

source $VIMRUNTIME/vimrc_example.vim

On my PC, this file is located in C:\Program Files\Vim\vim91\vimrc_example.vim. This second configuration file contains some enhancements that beginners might find useful or attractive. Here's the critical command from this example configuration file. 

" For all text files set 'textwidth' to 78 characters.

 autocmd FileType text setlocal textwidth=78

This understanding - two configuration files - can lead to a couple of options for changing the default behavior. One possibility is to comment out the reference to vimrc_example.vim in the _vimrc file and add tw=0. This works, but it also causes some possibly desirable default behaviors from the example file to be lost. Another solution is to change the textwidth=78 command in the vimrc_example.vim file to zero or the desired value. This is what I opted to do. Another possibility would be to copy the desired parts of the example file to _vimrc and then remove the reference to the example file. This might be the most elegant solution. 

I hope this detective work will be useful for some VIM beginner who is stumped, like I was. 



Wednesday, July 17, 2024

Web-based statistics calculators - updated

During the pandemic I was confronted with the challenge of providing statistics software to students who had a wide range of hardware and software. Using statistics software installed on computers in the lab just wasn't an option for everyone. My solution was to code some web-based statistics calculators for basic introductory statistics needs: Descriptive statistics, t-tests, etc. These will work well even for extreme situations: on smartphones and for people who have weak internet connections.  

 My web-based statistics tools for introductory statistics classes have just been updated. Z-tests, t-tests, ANOVA, and chi-squared can now provide exact p values. 

These aren't really intended to replace SPSS, R, JASP, and other professional-grade statistics software. Possible uses are classroom demonstrations or online instruction. There are also some practice pages that will give students data to work with, then provide an answer when students are ready. 

These resources are educator friendly. There are no ads, unlike some horrible online calculators. CC licensing allows for free sharing and use, making these an open education resource (OER).  

https://garyfisk.com/stats/index.html


Monday, May 13, 2024

The declining value of writing in college courses

Asking students to write in college courses has been a long-time educational strategy. Writing a summary shows that the assigned work has been read. Paraphrasing is to express information and ideas in our own voice, thereby putting a personal stamp on what has been read. Higher order thinking is (hopefully) accomplished via applications, analysis, and similar cognitive operations. Altogether, written assignments can be described as a write-to-learn strategy. 

New advances in generative artificial intelligence (AI) have raised questions about the value of these traditional approaches. 

Summarizing written work can now easily be done by AI systems. Student submissions are increasingly well-done, but bland AI summaries. These are often just vague overviews. A request to summarize no longer demonstrates that the student read anything. Maybe this isn't entirely new, but it seems to be an increasing problem in the last year and a half. 

Paraphrasing is also losing value as an educational tool. Here's two new tools that recently surpised me. Microsoft Copilot (through the Edge browser) offers "rewrite with copilot" for text pasted into a learning management system. Likewise, Google has a "help me write" option. Two screenshots are shown below. 


This will be a mixed bag. The feedback may be helpful. The downside though is that this may be the beginning of a deskilling of writing. 

Friday, October 20, 2023

Animations to step through multiple stages of a complex figure

Complex figures can be overwhelming to an audience. The issue: where should one begin? A similar problem is describing processes that have multiple steps. A numbered list of the stages could be made, but lists tend to be boring.  

A solution is to use basic "appear" animations to make the steps of the process appear in a sequence. This helps the audience to digest the complexity. The presentation of stages one-by-one feels more intuitive. 

The following link has an example that shows both a complex image and a step relationship. This is the Wernicke-Geschwind Model of language processing. The graphic is an open-license illustration of the brain with key brain areas highlighted. The animation steps the audience through the key stages of processing language. 

WernickeGeschwindLanguageModel.pptx 

License: Creative Commons 4.0 attribution

Wednesday, October 20, 2021

Explaining the difference between duplicate vs. extended screen settings

PowerPoint has a special screen for presenters that shows the slides plus a variety of control buttons and a clock. Accessing this feature requires an extended screen setting. Unfortunately, the concept of an extended screen is difficult to understand and explain. This confusion is understandable because the extended screen is invisible! 

The following is an explanation of the difference between duplicate vs. extended screens. 

The duplicate setting shows the same presentation on the presenter’s computer and the audience’s screen. Duplicate could be understood as the standard mode of operation. 

Duplicate screen illustration. The computer and audience views are the same.
Think of the extended screen as being an imaginary monitor positioned just to the right of the computer display. Presenters can move windows (see video in green) to the extended view by dragging them to the right, from the computer desktop to the invisible extended display. Extended screens can be understood as an enhanced display space just for the audience. 
The extended screen is an imaginary screen located to the right of the computer display.


This explainer is also available as a handout that can be freely shared (CC 4.0 license). 


Monday, March 22, 2021

Using Annotation Tools to Increase Interest During Online Presentations

Like many educators, my pandemic classroom presentations have been split between in-person, classroom students and students who are watching online through video technology. The challenge is that interacting with the online audience is much harder than the classroom. My technology shares the screen (a PowerPoint presentation), but does not provide a live video during the presentation when the screen is shared. Unfortunately, watching a PowerPoint presentation with just a voice is a bit dull. 

An easy way to make the online presentations a bit more interesting is to use the annotation tools during the presentation. The tools are used to add or mark-up the existing presentation. The online students get to watch the presentation growing in a more dynamic way. It's like turning the presentation into a basic chalkboard, a time-tested teaching tool.  

The annotation tools are available by hovering the mouse over the lower left corner of the presentation. These features can also be accessed by keystrokes: control-p for pen and control-l for laser pointer. Here's the pop-up menu:  


Marking up the slides has been fun and dynamic when done live. On this slide, I added that a stage-based theory of human growth has step-like qualities by drawing the following on the screen with the mouse while I'm talking. 

The annotated slides can be saved, exported to a pdf file, and shared with students. 

A related issue is that the people watching a shared computer screen at home can't see a laser pointer on the classroom screen. So, I've stopped using the laser pointer in my wireless presentation remote. Instead, the PowerPoint laser pointer is used so everyone - home and classroom - can see it. 

These built-in features are an easy way to bring at least a tiny bit of extra life to a static, shared screen presentation. They are very useful, yet underappreciated. Give it a try in your next online presentation. 


 

Friday, March 5, 2021

Transparency in Higher Ed PowerPoint Presentations

Transparency is a hot idea in higher education. The idea has multiple dimensions, but here we will focus on the essential "transparent" component: The need to clearly communicate the purpose of course activities to students. Why are we doing this assignment? What is the motivation? How does the current assignment connect to ideas that have already been covered? What skills will students gain by performing this task? Unfortunately, these important motivation-related questions are often not addressed. These critical ideas may be assumed by the professor rather than being explicitly stated. 

The transparency movement has focused largely on assignments, with tilthighered.com having numerous examples. My contribution is that the transparent idea could be easily extended to PowerPoint presentations. The typical classroom PowerPoint presentation has excellent facts and information. The problem is a missing 'why?' explanation. The importance or purpose might be obvious to faculty experts, but novice learners may be largely unaware of why they should care about a particular topic. 

The introduction is an ideal time to address 'why' questions. The motivational questions - why should we care? - should be addressed before launching into the facts and key terms to properly prepare students. The possibilities include ... 

  • The question: Have you ever wondered why people do/think ______? Let's explore why this occurs.
  • Establishing context: How does today's topic relate to the ideas from the last course meeting? This is how today's topic fits into important course goals. 
  • Personal relevance: Today's topic will be essential for your life or career in this way. This presentation will help you gain an expert understanding that is useful for _____. 
  • History: A long-standing concern in our field/society is ______. Today, we will investigate three different attempts to address this issue. 
The 'why' possibilities may be nearly infinite. The general aim is to address why anyone should care or find this topic interesting. A second important goal is helping students form connections between today's topic and previous topics or upcoming topics. 

Like transparent assignments, taking just a few minutes at the beginning of a presentation to address these 'why?' questions can have a big impact. It is not necessary to overhaul everything in a PowerPoint presentation to gain the benefits of transparency. One or two slides at the beginning to promote motivation and establish context can be helpful to novices. 

The transparent opening can even be a part of the slide design. Norman Eng has suggested a one sentence takeaway or mission statement. Here's an example from an opening slide in my Introductory Psychology course. 
  



I hope this idea has been helpful. Please consider sharing good ideas for transparent openings in PowerPoint presentations. 

Image credit
https://commons.wikimedia.org/wiki/File:Neuron.svg
User: Dhp1080, CC BY-SA 3.0 <http://creativecommons.org/licenses/by-sa/3.0/>, via Wikimedia Commons