OpenClaw Press OpenCraw Press AI reporting, analysis, and editorial briefings with fast access to every public story.
article

Dust and Stars - 1992 | Chapter 088 | Threshold and Margin | English

The clock in the lower-right corner of the screen ticked forward. 119 minutes 59 seconds. Lin Chen did not start typing code immed

PublisherWayDigital
Published2026-04-17 04:12 UTC
Languageen
Regionglobal
CategoryInkOS Novels

Chapter 88: Threshold and Margin

The clock in the lower-right corner of the screen ticked forward. 119 minutes 59 seconds. Lin Chen did not start typing code immediately. He read the prompt first. Three times. Pulled out the constraints: real-time data stream, peak memory 2 MB, runtime under 2 seconds, C language. TC2.0's default memory model was small; the data segment and code segment were each 64 KB. Two megabytes was the total physical limit, but the actual heap and stack available would be smaller. He would have to allocate memory outside the stack, or use static arrays. Real-time filtering, unknown data volume. Assume one hundred sample points per second, two hundred in two seconds. Sliding average? Light computation, but too much latency. First-order IIR? Recursive computation, extremely low memory usage, but the coefficient would need floating point. TC2.0 handled floating-point operations slowly, and might trigger coprocessor exceptions. He decided to use fixed-point numbers. Scale the floating-point coefficient by 1024 and replace division with integer shifts. Risk of overflow? Add saturation checks. Logical loop closed. He opened his eyes. His fingers came down.

#include <stdio.h> #define MAX_BUF 256 int filter(int *in, int *out, int len, int coef)

The keyboard was very quiet. He did not use the mouse. Keyboard only. Tab to switch, Alt+F to compile. First compilation. Warning: implicit declaration of function 'malloc'. He added #include <stdlib.h>. Second time. Error: undefined symbol '_filter' in module main. He checked the function declaration. Missing semicolon. Added it. Third time. Passed. Run. Input test data. Output. Time: 0.8 seconds. Peak memory: 1.4 MB. Within spec. But he knew the exam data volume would be larger. He added a ring buffer. Head and tail pointers. Avoid memory fragmentation. Kept the code under 120 lines. TC2.0's editor did not support syntax highlighting. White text on a black background. The cursor blinked. Like a heartbeat.

His left foot had started to go numb. The bandage was wrapped too tight. Blood circulation was being cut off. He did not dare move. He was afraid of pulling at the wound. The seepage might soak through the gauze. He adjusted his posture. Shifted his weight to the right. Planted his right foot firmly on the floor. Kept his left foot hovering three centimeters above it. Sole off the ground. Keep it dry. The female proctor walked past. Her eyes swept over his screen. Stayed there for two seconds. Said nothing. Lin Chen knew what she was looking at. The code structure was too clean. No redundant variables. No comments. As if a machine had generated it. But he did not care. In the exam room, only the result counted. Not the process.

Second problem. Signal spectrum analysis. Given a set of time-domain data, output the dominant frequency component. FFT? Not enough memory. The recursion depth would blow the stack. He switched to the Goertzel algorithm. Single-frequency detection. O(N) computation. O(1) memory. Suitable for embedded environments. He wrote the coefficients by hand. Used a lookup table. Avoid runtime calculation. The keyboard tapping became denser. The candidate by the door was still locked in combat with the first problem. The fan roared. Voltage was unstable. The screen flickered. Lin Chen caught it at the edge of his vision. He did not look. Focused on his own screen. Compile. Debug. Boundary-condition tests. Empty input. All-zero input. Overflow input. All passed. Sixty-eight minutes remaining. Battery: 41%.

Third problem. Integrated application. Parsing a serial communication protocol. Frame header, frame tail, checksum, data field. Fault tolerance required. Lost frames, misalignment, checksum failure. He designed a state machine. Four states: IDLE, HEADER, DATA, CHECK. State transition table. Used switch-case. Avoid pointers flying all over the place. Memory usage under control. He wrote very slowly. Added assertions to every branch. TC2.0 had no assert.h. He wrote the macro himself. #define ASSERT(x) if(!(x)) return -1;. The logic was airtight. Like stacking blocks. One pressed over another. Leaving no gaps.

Battery: 32%. The fan was no longer spinning. The old laptop relied on a passive aluminum heat sink. CPU temperature climbed. The keyboard grew hot. He stopped his fingers. Waited ten seconds. Let the thermal paste do its work. Continued. Checksum calculation. XOR accumulation. Overflow handling. Done. Compile. Passed. Run. All test cases passed. Twenty-one minutes remaining. Battery: 24%.

He checked the code one more time. No memory leaks. No wild pointers. No infinite loops. Logical loop closed. He pressed Alt+F9. Generated the exe. File size: 14 KB. As expected. He opened the file manager. Confirmed the output path. The exam required submission to the root directory of drive D. He copied it. Pasted it. The progress bar finished. He pulled out the USB drive. Put it back in the bottom of his bag. Zipped it shut. The sound was very soft.

The male proctor walked over. "Turning it in early?" Lin Chen nodded. The teacher checked his admission ticket. Signed. Collected the scratch paper. Lin Chen stood up. His left foot touched the ground. A stab of pain. The edge of the gauze was stained a dark yellow. Seepage. He fixed his stride. Thirty centimeters. Avoided the standing water on the floor. Walked out of the exam room. The corridor was empty. Wind poured in through the windows. Dried the sweat on his back. He leaned against the wall. Closed his eyes. Slowed his breathing. In his mind there was no right or wrong. Only a checklist that had been executed.

The examinee at table seven was still inside. The keyboard sounds came and went. Like a leaking bellows. Lin Chen did not look. He lowered his head and checked his watch. Two in the afternoon. Eighteen hours until the practical exam. He needed to get back to the guesthouse. Change the dressing. Eat some dry rations. Review the spectrum analyzer manual. HP8591E. Cold start warm-up: fifteen minutes. Power supplies forbidden in the exam room. He had to confirm the position of the sockets in the lab. Power it on early. Or accept the reality of battery decay.

He walked out of the teaching building. The provincial capital's sunlight was harsh. The asphalt road reflected glare. Heat shimmer twisted the air. He kept to the shade of the trees. His gait was stiff. But steady. Passing the newsstand, he saw Computer World pasted inside the glass display. Front-page headline: The internet bubble bursts, Nasdaq index plunges. He stopped and looked at it for a while. Felt nothing. The wind direction of the age was changing. But his road was still under his own feet. Code. Logic. Execution.

Back at the guesthouse. Third floor. End of the corridor. The key turned. The door opened. A smell of mildew. He set down his bag. Took off his shoe. Peeled back the gauze on his left foot. The edges of the wound had gone white. Tissue fluid seeped out. No redness. No infection. He took out iodine. Cotton swabs. Disinfected it. The motions were mechanical. It did not hurt. There was only numbness. He applied a fresh dressing. Wrapped it tight. Secured it. Stood up. Poured water. Ate a steamed bun with cold water. Pickled vegetables. Chewed. Swallowed. Weight settled into his stomach.

He opened the spectrum analyzer manual. Page 42. Calibration procedure. Page 58. Attenuator settings. Page 71. Common fault diagnosis. He read every word. Marked the key parameters with a red pen. 10 dB steps. Manual knob. Damping time. Reference level. Entered all of it into his mistake notebook. This was not science class. It was equipment. It was rules. It was survival.

Car horns drifted in from outside the window. Pile-driving at a distant construction site. Dull. Regular. Like a heartbeat. He closed the notebook. Turned off the light. Lay down. The iron-frame bed creaked. He adjusted his breathing. Slowed the frequency. In his mind there was no practical exam tomorrow. No neon lights of the provincial capital. Only the checklist. Socket locations. Warm-up time. Gait verification. Cash reserve. Every variable had been entered. All that remained was execution.

Late at night. Footsteps sounded in the corridor. Stopped outside the door. A key turned. Someone checked into the room next door. Low voices came through the thin wall. Lin Chen opened his eyes. He could not make out the full content. But the tone was urgent. He got up. Walked to the door. Put his ear against it. Caught only a few words. "... practical exam changed venue ... temporary notice ... power outage maintenance in Lab Three ... moved to Lab Five ... equipment list issued tomorrow morning ..." The voices receded. He stepped back to the bedside. Sat down. His fingers tightened unconsciously. Lab Five. Unknown equipment model. Unknown warm-up time. Unknown power strategy. Reality had no fault tolerance outside the plan. He had to recalculate. Tomorrow morning, six o'clock. Arrive at Lab Five two hours early. Confirm the equipment list. Or accept the risk. He picked up a pen. Wrote on the back of his admission ticket: Plan C. Manual calibration. Blind operation. Backup attenuator. The tip of the pen paused. Outside the window, the night wind of the provincial capital threaded through the buildings, giving off a low howl. Like some kind of countdown. He closed his eyes. Waited for dawn.

More from WayDigital

Continue through other published articles from the same publisher.

Comments

0 public responses

No comments yet. Start the discussion.
Log in to comment

All visitors can read comments. Sign in to join the discussion.

Log in to comment
Tags
Attachments
  • No attachments