(4)From Nurse to C#Developer-Nurses Learn Markdown

(4)From Nurse to C#Developer-Nurses Learn Markdown

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

最后更新 2/26/2025 1:24 PM
勇敢的天使
预计阅读 10 分钟
分类
share
专题
From Nurse to C#Developer
标签
.NET C# Markdown Change career development programming

Today is my fourth day of learning programming. As a nurse who is transitioning to a C#developer, I began to come into contact with a new tool-Markdown. This reminds me of when we worked in a hospital, we also needed to compile standardized nursing records. Now, I will learn how to use Markdown to record my programming learning journey.

1. Why learn Markdown?

In medical work, we are accustomed to using Word to write documents. But in the field of programming, Markdown has become a mainstream document writing tool because of its simplicity and efficiency. Its advantages include:

      • Writing is more focused **-Just like when we write nursing records, we focus on content rather than format
      • Easy to maintain **-Manage documents as easily as managing medical records
      • Unified format **-Ensure a unified document style, just like standardized hospital records
      • Fast and efficient **-Typesetting can be completed with simple symbols, saving a lot of time

As a beginner, it is important to choose an editor that is easy to use. Here are a few useful Markdown editors I have tried:

  1. Visual Studio Code
    • free open source
    • Support real-time preview
    • Functions can be extended through plug-ins
    • Particularly suitable for programmers because it is also a powerful code editor

下载链接:Visual Studio Code

  1. Typora
    • WYSIWYG editing
    • Simple and elegant interface
    • Support multiple themes
    • Especially suitable for new writers

下载链接:Typora

      • Online Editor **

我在这个网址学习了Markdown基础:Markdown基础

这个网址可以在线编辑Markdown:在线编辑器

3. Basic Markdown syntax

1. the use of headings

Just like hierarchical titles in nursing records, Markdown uses a #sign to mark different level titles:

# 一级标题(类似于主诊断)
## 二级标题(类似于次要诊断)
### 三级标题(类似于并发症)

Effect display:

Level 1 title (similar to main diagnosis)

Secondary Title (Similar to Secondary Diagnosis)

Level three titles (similar to complications)

2. text formatting

In nursing records, we often need to emphasize certain important information, which can be achieved in Markdown:

*斜体* 或 _斜体_(用于轻度强调)
**粗体** 或 __粗体__(用于重要信息)
***粗斜体*** (用于特别重要的信息)
~~删除线~~ (用于修正信息)

The effects are as follows:

  • Italic * or_Italic_(for light emphasis)

    • Bold ** or__Bold__(used for important information)
  • ** Bold italics ***(for particularly important information)

Strikeout(used to correct information)

3. list function

Just like the entry when we wrote our care plan:

* 测量生命体征
* 观察病情变化
  * 体温
  * 血压
  * 心率

1. 晨间护理
2. 用药护理
3. 健康宣教

The effects are as follows:

  • measurement of vital signs
  • observation of disease changes
    • body temperature
    • blood pressure
    • heart rate
  1. morning care
  2. medication nursing
  3. health education

4. code shows

As a nurse learning to program, code blocks are one of my most commonly used functions. Markdown supports multiple ways to display code:

  1. Inline code: Use single back quotes
这是一个`Console.WriteLine("Hello")`语句

The effects are as follows:

这是一个Console.WriteLine("Hello")语句

  1. Code block: Using three back quotes, you can specify the language for syntax highlighting
```csharp
//A simple body temperature monitoring program
double temperature = 37.2;
if (temperature > 37.3)
{
    Console. WriteLine ("requires close observation ");
}
else
{
    Console. WriteLine ("normal body temperature ");
}
```

The effects are as follows:

// 一个简单的体温监测程序
double temperature = 37.2;
if (temperature > 37.3)
{
    Console.WriteLine("需要密切观察");
}
else
{
    Console.WriteLine("体温正常");
}
  1. Indent code blocks: Indent using 4 spaces or 1 tab
```csharp
   //This is also a code block
    var name ="patient name";
    Console.WriteLine(name);
```

The effects are as follows:

   // 这也是一个代码块
    var name = "患者姓名";
    Console.WriteLine(name);

5. reference

In nursing records, we often need to quote medical orders or references. Use the> symbol in Markdown to implement references:

> 医嘱:每4小时测量一次生命体征
>> 护理要点:注意体温、血压、心率的变化
>>> 特别提醒:如有异常及时报告

The effects are as follows:

Doctor's advice: Take vital signs every 4 hours

Nursing points: Pay attention to changes in body temperature, blood pressure and heart rate

Special reminder: Report any abnormalities in time

In programming learning, it is often necessary to add links to reference materials:

[了解 .NET](https://dotnet.microsoft.com/zh-cn/learn)

[我的GitHub学习笔记](https://github.com/dotnet9/Assets.Dotnet9)

The effects are as follows:

C#官方文档

我的GitHub学习笔记

picture

Record the code execution results or interface screenshots during the learning process:

![公众号封面图](https://img1.dotnet9.com/2025/02/cover_02.png "公众号封面图")

The effects are as follows:

公众号封面图

7. dividing line

In nursing records, we use dividing lines to separate records for different time periods. You can use three or more dashes, asterisks, or underscores in Markdown:

早班护理记录
---
下班护理记录
***
夜班护理记录
___

The effects are as follows:

Morning shift nursing records

Off-duty nursing records


Night shift nursing records


8. form

Ideal for organizing patient data or learning notes:

| 患者ID | 姓名 | 体温 | 血压 | 备注 |
|--------|------|------|------|------|
| 001 | 张三 | 37.2 | 120/80 | 恢复良好 |
| 002 | 李四 | 38.5 | 135/85 | 需观察 |

The effects are as follows:

patient ID name body temperature blood pressure remarks
001 Zhang San 37.2 120/80 recovered well
002 Li si 38.5 135/85 needs to be observed

Alignment method:

| 左对齐 | 居中对齐 | 右对齐 |
|:-------|:--------:|-------:|
| 内容 | 内容 | 内容 |

The effects are as follows:

left-aligned center alignment right-aligned
content content content

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

  1. 链接:使用[文字](链接)的格式
[C#官方文档](https://docs.microsoft.com/zh-cn/dotnet/csharp/)
  1. 脚注:使用[文字](脚注解释 "脚注名字")的格式
[编程基础](这是一门计算机程序设计的入门课程 "什么是编程基础")

[护理信息系统](这是一个用于管理医院护理工作的软件系统 "HIS系统")

The effects are as follows:

编程基础

护理信息系统

10. HTML tags

Markdown supports direct use of HTML tags, which is useful when certain special format requirements are needed:

<details>
<summary>点击展开代码示例</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">注意:体温超过38.5度需立即报告!</span>
```

效果如下:

点击展开代码示例
public class Patient
{
    public int Id { get; set; }
    public string Name { get; set; }
    public double Temperature { get; set; }
    public string BloodPressure { get; set; }
}

注意:体温超过38.5度需立即报告!

四、常见陷阱和注意事项

在学习使用Markdown的过程中,我遇到了一些小陷阱,在此分享给大家:

1. 换行问题

  • 单个回车不会产生换行效果
  • 需要使用两个回车才能开始新段落
  • 或者在行末加两个空格实现软换行

2. 列表嵌套

  • 子列表必须用空格或制表符缩进
  • 错误示例:
* master project
* subproject    //This will not form nesting
  • 正确示例:
* master project
  * Subproject//Pay attention to the previous indentation

3. 代码块注意事项

  • 代码块内的Markdown语法不会被解析
  • 如果要显示反引号,可以使用更多数量的反引号包裹
```
这里是一个包含 ` 反引号的代码块
```

4. 特殊字符处理

  • Markdown中某些字符有特殊含义(如*、#、_等)
  • 如果要显示这些字符本身,需要在前面加反斜杠转义
  • 例如:\*这不是斜体\*

5. 图片和链接的区别

  • 图片链接前面要加感叹号:![描述](图片地址)
  • 普通链接不需要感叹号:[描述](链接地址)

6. 表格对齐

  • 表格的对齐方式容易被忽略
  • 使用:---左对齐,:---:居中,---:右对齐
  • 示例:
| left-aligned | centered | right-aligned |
|:---|:---:|---:|
| content | content | content |

7. HTML兼容性

  • 不是所有Markdown编辑器都支持HTML标签
  • 使用HTML标签时要注意编辑器的兼容性
  • 建议优先使用Markdown原生语法

这些经验都是我在实际使用过程中总结的,希望能帮助其他初学者少走一些弯路。记住:熟能生巧,多写多练才是提高的关键!

五、实际应用示例

1. 护理知识整理

# Key Points of Diabetes Care

## blood glucose monitoring
* Fasting blood sugar control at 4.4 - 7.0mmol/L
* Blood sugar was controlled at 4.4 - 10.0mmol/L 2 hours after meal

## insulin injection
1. Check insulin before injection
2. Choose the right injection site
3. The injection angle is 45 degrees

效果如下:

糖尿病护理要点

血糖监测

  • 空腹血糖控制在4.4-7.0mmol/L
  • 餐后2小时血糖控制在4.4-10.0mmol/L

胰岛素注射

  1. 注射前检查胰岛素
  2. 选择正确的注射部位
  3. 注射角度为45度

2. 编程学习笔记

# C#basics

## data type
* int-integer type
* double-floating point number type
* string-String type

## conditional statements
```csharp
if (condition)
{
    // 代码块
}
```

效果如下:

C#基础知识

数据类型

  • int - 整数类型
  • double - 浮点数类型
  • string - 字符串类型

条件语句

if (condition)
{
    // 代码块
}

六、学习心得

作为一名护士转行学习编程的新手,我发现Markdown特别适合记录学习笔记:

  1. 结构清晰 - 就像护理记录一样层次分明
  2. 重点突出 - 可以方便地标记重要内容
  3. 代码友好 - 完美支持代码展示和格式化
  4. 易于上手 - 语法简单,很快就能掌握

在护理工作中,我们强调"观察、记录、总结"的重要性。同样,在编程学习中,使用Markdown来记录学习过程,不仅帮助我更好地理解和记忆知识,也培养了我规范化文档的好习惯。

虽然刚开始可能需要查看语法参考,但经过反复练习,我相信很快就能熟练运用。就像我们在实习期要反复练习各种护理技能一样,熟能生巧!

明天我将继续学习更多C#的知识,让我们一起期待下一篇学习笔记!

Keep Exploring

延伸阅读

更多文章
同标签 1/17/2025

Markdown rendering in Avalonia UI

This article will introduce in detail how to use Markdown. AIRRender for Markdown rendering in the Avalonia UI, including installation, style references, example display and various features (such as support for black and white themes, theme colors, etc.). At the same time, it discussed in depth its improving international functions, aiming to help developers better integrate Markdown content into Avalonia applications, provide a better user experience, and enhance the global adaptability of applications. In addition, it also compares relevant Markdown rendering libraries to provide reference for users to choose appropriate tools.

继续阅读