(4)From Nurse to C# Developer -- Nurse Learns Markdown

(4)From Nurse to C# Developer -- Nurse Learns Markdown

On the fourth day of learning C# programming, I began learning Markdown. As a nurse turned developer, I record my learning insights on this lightweight markup language.

Last updated 2/26/2025 1:24 PM
勇敢的天使
10 min read
Category
Sharing
Topic
From Nurse to C# Developer
Tags
.NET C# Markdown Career Change to Development Programming

Today is my fourth day learning programming. As a nurse transitioning to a C# developer, I've started exploring a new tool — Markdown. It reminds me of how we had to write standardized nursing records at the hospital. Now, I'm learning how to use Markdown to document my programming journey.

1. Why Learn Markdown?

In healthcare, we're used to writing documents in Word. But in the programming world, Markdown has become the mainstream documentation tool because of its simplicity and efficiency. Its advantages include:

  1. More focused writing – Just like when writing nursing records, we focus on content rather than formatting.
  2. Easy to maintain – Manage documents as conveniently as managing medical records.
  3. Unified formatting – Ensures consistent document style, like standardized hospital records.
  4. Fast and efficient – Simple symbols handle layout, saving a lot of time.

As a beginner, choosing a good editor is important. Here are a few Markdown editors I've tried and found useful:

  1. Visual Studio Code
    • Free and open source
    • Supports live preview
    • Extensible via plugins
    • Especially suitable for programmers, as it's also a powerful code editor

Download link: Visual Studio Code

  1. Typora
    • WYSIWYG editing
    • Clean and elegant interface
    • Supports multiple themes
    • Especially suitable for writing beginners

Download link: Typora

  1. Online Editors

I learned Markdown basics at this website: Markdown Basics

This website allows online editing: Online Editor

3. Markdown Basic Syntax

3.1 Using Headings

Just like the hierarchical headings in nursing records, Markdown uses # symbols to mark different heading levels:

# Level 1 Heading (similar to primary diagnosis)
## Level 2 Heading (similar to secondary diagnosis)
### Level 3 Heading (similar to complications)

Display effect:

Level 1 Heading (similar to primary diagnosis)

Level 2 Heading (similar to secondary diagnosis)

Level 3 Heading (similar to complications)

3.2 Text Formatting

In nursing records, we often need to emphasize important information. In Markdown, we can achieve this as follows:

*Italic* or _Italic_ (for mild emphasis)
**Bold** or __Bold__ (for important information)
***Bold Italic*** (for particularly important information)
~~Strikethrough~~ (for corrections)

Result:

Italic or Italic (for mild emphasis)

Bold or Bold (for important information)

Bold Italic (for particularly important information)

Strikethrough (for corrections)

3.3 Lists

Just like the items in a nursing care plan:

* Measure vital signs
* Observe changes in condition
  * Temperature
  * Blood pressure
  * Heart rate

1. Morning care
2. Medication administration
3. Health education

Result:

  • Measure vital signs
  • Observe changes in condition
    • Temperature
    • Blood pressure
    • Heart rate
  1. Morning care
  2. Medication administration
  3. Health education

3.4 Code Display

As a nurse learning programming, code blocks are one of the features I use most. Markdown supports multiple ways to display code:

  1. Inline code: using single backticks
This is a `Console.WriteLine("Hello")` statement

Result:

This is a Console.WriteLine("Hello") statement

  1. Code blocks: using triple backticks. You can specify a language for syntax highlighting.
```csharp
// A simple temperature monitoring program
double temperature = 37.2;
if (temperature > 37.3)
{
    Console.WriteLine("Requires close observation");
}
else
{
    Console.WriteLine("Temperature is normal");
}
```

Result:

// A simple temperature monitoring program
double temperature = 37.2;
if (temperature > 37.3)
{
    Console.WriteLine("Requires close observation");
}
else
{
    Console.WriteLine("Temperature is normal");
}
  1. Indented code block: using 4 spaces or 1 tab
```csharp
   // This is also a code block
    var name = "Patient Name";
    Console.WriteLine(name);
```

Result:

   // This is also a code block
    var name = "Patient Name";
    Console.WriteLine(name);

3.5 Blockquotes

In nursing records, we often need to quote doctor's orders or references. In Markdown, use the > symbol for blockquotes:

> Doctor's order: Measure vital signs every 4 hours
>> Nursing points: Monitor temperature, blood pressure, heart rate changes
>>> Special reminder: Report immediately if any abnormalities

Result:

Doctor's order: Measure vital signs every 4 hours

Nursing points: Monitor temperature, blood pressure, heart rate changes

Special reminder: Report immediately if any abnormalities

In programming studies, you often need to add links to reference materials:

[Learn .NET](https://dotnet.microsoft.com/en-us/learn)

[My GitHub Study Notes](https://github.com/dotnet9/Assets.Dotnet9)

Result:

C# Official Documentation

My GitHub Study Notes

Images

Record screenshots or code execution results during learning:

![WeChat Official Account Cover](https://img1.dotnet9.com/2025/02/cover_02.png "WeChat Official Account Cover")

Result:

WeChat Official Account Cover

3.7 Horizontal Rules

In nursing records, we use horizontal rules to separate records from different time periods. In Markdown, use three or more hyphens, asterisks, or underscores:

Morning shift nursing record
---
Evening shift nursing record
***
Night shift nursing record
___

Result:

Morning shift nursing record

Evening shift nursing record


Night shift nursing record


3.8 Tables

Great for organizing patient data or study notes:

| Patient ID | Name | Temperature | Blood Pressure | Notes |
|------------|------|-------------|----------------|-------|
| 001 | Zhang San | 37.2 | 120/80 | Recovering well |
| 002 | Li Si | 38.5 | 135/85 | Needs observation |

Result:

Patient ID Name Temperature Blood Pressure Notes
001 Zhang San 37.2 120/80 Recovering well
002 Li Si 38.5 135/85 Needs observation

Alignment:

| Left-aligned | Center-aligned | Right-aligned |
|:-------------|:--------------:|--------------:|
| Content | Content | Content |

Result:

Left-aligned Center-aligned Right-aligned
Content Content Content

In study notes, we often need to add links and footnotes:

  1. Links: using [text](link) format
[C# Official Documentation](https://docs.microsoft.com/en-us/dotnet/csharp/)
  1. Footnotes: using [text](footnote explanation "footnote name") format
[Programming Basics](This is an introductory course in computer programming "What is Programming Basics")

[Nursing Information System](This is a software system for managing hospital nursing work "HIS System")

Result:

[Programming Basics](This is an introductory course in computer programming "What is Programming Basics")

[Nursing Information System](This is a software system for managing hospital nursing work "HIS System")

3.10 HTML Tags

Markdown supports direct use of HTML tags, which is useful for certain special formatting needs:

<details>
<summary>Click to expand code example</summary>

```csharp
public class Patient
{
    public int Id { get; set; }
    public string Name { get; set; }
    public double Temperature { get; set; }
    public string BloodPressure { get; set; }
}
```
</details>

<span style="color:red">Note: If temperature exceeds 38.5°C, report immediately!</span>
```

Result:

Click to expand code example
public class Patient
{
    public int Id { get; set; }
    public string Name { get; set; }
    public double Temperature { get; set; }
    public string BloodPressure { get; set; }
}

Note: If temperature exceeds 38.5°C, report immediately!

4. Common Pitfalls and Cautions

During my study of Markdown, I encountered a few small pitfalls, which I'd like to share:

4.1 Line Breaks

  • A single carriage return does not create a new line.
  • You need two carriage returns to start a new paragraph.
  • Or add two spaces at the end of a line for a soft line break.

4.2 List Nesting

  • Sub-lists must be indented with spaces or tabs.
  • Incorrect example:
* Main item
* Sub-item    // This does not create nesting
  • Correct example:
* Main item
  * Sub-item  // Note the indent

4.3 Code Block Cautions

  • Markdown syntax inside code blocks is not parsed.
  • To display backticks, wrap with more backticks.
```
Here is a code block containing ` backticks
```

4.4 Handling Special Characters

  • Certain characters have special meaning in Markdown (e.g., *, #, _).
  • To display these characters themselves, add a backslash before them to escape.
  • Example: \*This is not italic\*
  • Image links require an exclamation mark: ![description](image URL)
  • Normal links do not need an exclamation mark: [description](link URL)

4.6 Table Alignment

  • Table alignment is often overlooked.
  • Use :--- for left-aligned, :---: for centered, ---: for right-aligned.
  • Example:
| Left | Center | Right |
|:-----|:------:|------:|
| Content | Content | Content |

4.7 HTML Compatibility

  • Not all Markdown editors support HTML tags.
  • Check editor compatibility when using HTML tags.
  • It's recommended to prioritize native Markdown syntax.

These insights are based on my own experience, and I hope they help other beginners avoid some detours. Remember: practice makes perfect; writing and practicing more is the key to improvement!

5. Practical Application Examples

5.1 Nursing Knowledge Compilation

# Diabetes Nursing Points

## Blood Glucose Monitoring
* Fasting blood glucose controlled between 4.4-7.0 mmol/L
* 2-hour postprandial blood glucose controlled between 4.4-10.0 mmol/L

## Insulin Injection
1. Check insulin before injection
2. Select the correct injection site
3. Injection angle of 45 degrees

Result:

Diabetes Nursing Points

Blood Glucose Monitoring

  • Fasting blood glucose controlled between 4.4-7.0 mmol/L
  • 2-hour postprandial blood glucose controlled between 4.4-10.0 mmol/L

Insulin Injection

  1. Check insulin before injection
  2. Select the correct injection site
  3. Injection angle of 45 degrees

5.2 Programming Study Notes

# C# Basics

## Data Types
* int - integer type
* double - floating-point type
* string - string type

## Conditional Statements
```csharp
if (condition)
{
    // Code block
}
```

Result:

C# Basics

Data Types

  • int - integer type
  • double - floating-point type
  • string - string type

Conditional Statements

if (condition)
{
    // Code block
}

6. Learning Reflections

As a nurse turned programming beginner, I find Markdown especially suitable for taking study notes:

  1. Clear structure – Just like nursing records, clearly layered.
  2. Highlight key points – Conveniently mark important content.
  3. Code-friendly – Perfectly supports code display and formatting.
  4. Easy to learn – Simple syntax, quick to master.

In nursing, we emphasize the importance of "observation, recording, and summarization." Similarly, in programming study, using Markdown to document the learning process not only helps me better understand and memorize knowledge but also cultivates good habits of standardized documentation.

Although I may need to refer to syntax references at the beginning, with repeated practice, I believe I will soon become proficient. Just like repeatedly practicing various nursing skills during our internship, practice makes perfect!

Tomorrow I will continue learning more C# knowledge. Let's look forward to the next study note together!

Keep Exploring

Related Reading

More Articles
Same tag 1/17/2025

Markdown Rendering in Avalonia UI

This article will detail how to use Markdown.AIRender for Markdown rendering in Avalonia UI, including installation, style referencing, example demonstrations, and various features (such as support for black/white themes, accent colors, etc.). It also delves into its ongoing internationalization features, aiming to help developers better integrate Markdown content into Avalonia applications, provide a better user experience, and enhance the application's global adaptation capabilities. Additionally, it compares related Markdown rendering libraries to provide users with a reference for choosing the right tool.

Continue Reading