Software Development in the Notebook FrontEnd

Ian Hojnicki, Wolfram Research

(RowDefault[, (Spacer1), , (Spacer1), ])  #WolframTechConf

Agenda

A quick run through of some maybe lesser known features that might be of interest to developers AND a sneak peek at some upcoming features.

Package Editor

Supports our plaintext formats with select style information preserved.

Recent Updates:

Line Numbering

Line [In/Out]dentation

Future Updates:

Goto Line #

New parser (better, stronger, faster)

UTF-8 support

Jump!

Menu: Insert > Typesetting > End Subexpression

Move the caret outside of the current expression.

Example:

Graphics[{Rectangle[{0,0},{1, 1}]}]

"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."

Code Analysis

Menu: Evaluation > Analyze Notebook/Cells

Utility for performing static analysis on your code, which can illustrate potential errors.

Example:

If[a,b,b]

img = Rasterize[Graphics[{Red, Disk[]}], Background->Transparent];Show[Graphics[{Blue, Rectangle[{0,0},{-1, -1}]}], img, ImageSize->ImageDimensions[img]]

Upcoming Talks: Code Tools

Overview of Code Tools : What' s New Analyzing and Developing Wolfram Language Code

Wednesday @ 15:55 CDT

Instrumenting the Wolfram Language : Profiling, Coverage and Debugging

Wednesday @ 16:20 CDT

LinkSnooper

Menu: Evaluation > Notebook' s Kernel > LinkSnooper

LinkSnooper provides a means to inspect the activity going on between the FrontEnd and Kernel.

Useful in diagnosing slow running interfaces.

Does it require a lot of wall clock time?

Too many individual evaluations?

Example:

nb=NotebookPut[];

Why the Beep?

Menu: Help > Why the Beep?

In 13.1, Beep[] was extended to accept a string, which is displayed in the Why the Beep dialog.

Example:

Button["Disable cooling system.",Beep["I'm sorry, I cannot do that " ~~$UserName~~"."]]

Future Development

NOTE:  All of this is subject to change.

Assets

Assets are a convenient way to include (a.k.a. “attach”) external data to a document.

Programmatic access

System managed metadata (content-type/creation date/last modified/etc...)

Future expansion plans to support localization, resolution/platform-awareness, etc...

Assets, Demo:

Adding an image

csvData = With[{filename = FileNameJoin[{$InstallationDirectory, "Documentation", "English","System","ExampleData", "financialtimeseries.csv"}]},AssetAdd[EvaluationNotebook[], "csv", File[filename]]]

List all of the supported properties

AssetProperty[csvData,"Properties"]

Retrieve the contents

DateListPlot@ImportByteArray[AssetProperty[csvData,"Bytes"], "CSV"]

Git Integration

Similar functionality you might see in other environments.

Index status (new/changed/removed)

Actions (add/diff/commit/push/merge/etc...)

Working with notebooks in revision control can be a challenge to traditional git tools.

Example:

Experimental`NotebookCompare["Tech Conference/2020/Working in HiDPI.nb","ian/InitialVersion","ian/FinalVersion"]

Argument/Option Completions

Simple, declarative format for package/paclet developers.

<|
MyFunction -> <|
   "Arguments" -> <|
       1 -> "FileName",
       2 -> {"value1", "value2", ...}, 
       ...
       |>
   |>
|>

Example:

ImportEx[fileName_,format_]:=System`Import[fileName,format];ImportEx2[fileName_,format_]:=System`Import[fileName,format]

Import[]

ImportEx[]

ImportEx2[]

AssetProperty[csvData, ]

Got a feature request or an annoying bug?

FrontEnd Office Hour

Thursday @ 11:00 CDT

Related Talks

Building Your Own UIs: Tips from the Trenches

Wednesday @ 14:00 CDT

Extending the FrontEnd with LibraryLink

Thursday @ 16:00 CDT

Cell Tray Widgets

Thursday @ 16:25 CDT

Questions & Comments

Initialization

AssetRemove[EvaluationNotebook[],"csv"];