r/programminghorror

compiler

https://preview.redd.it/bsya0s1nyxjh1.png?width=768&format=png&auto=webp&s=cf7440e9d0369978c5518080e34eebcf44a0f3f2

i know it's not code but this is just as scary
helper/drivers/filesystem/sfs.c:247:5: error: conflicting types for 'find_inode_by_name'

247 | int find_inode_by_name(const char *name, uint64_t *out_lba, uint64_t *out_offset, struct sfs_inode *out_inode) {

| ^

headers/boot/kernel.h:45:5: note: previous declaration is here

45 | int find_inode_by_name(const char *name, uint64_t *out_lba, uint64_t *out_offset, struct sfs_inode *out_inode);

| ^

reddit.com
u/letmehaveanameyoudum — 3 days ago
▲ 108 r/programminghorror+1 crossposts

Java - always scared to learn -> completing Java OOP concepts

Well, it always was a nightmare to learn Java right from beginning days. I used to start studying and somehow I lost interest always just because I had to write so many lines when compared to python or Js.

Somehow I was interested in front end and of course there was no heavy logic involved in it. So I used to get happy just by watching the UI changes with my code.

Recently, I started learning Java for getting into backend. I was like “kya hi ho jaega? Wapas fail ho jaunga.. isse zyada toh kuch hone wala ni hai”.
I’ll be very honest, though ppl say that once you learn a programming language, it’s easy to learn other languages too. But Java was somehow a nightmare for me and it still is. But I learnt to face it no matter how boring it was to understand those concepts.

Now I’ve completed the oops concepts. Nevertheless it was all about consistency that even if I wasn’t interested at all some days , I gave at least 5 minutes to learn.

Same was the problem with DSA for me. I think consistency is really a key.

Now main focus will be on learning the interfaces, enums, collections, etc.

Onwards & upwards.🤗

u/vamsy_g21 — 12 days ago
▲ 49 r/programminghorror+1 crossposts

Java- Day 11 - Interfaces

Could not learn much since I am travelling to my base location from home for work.
Had a basic idea on interfaces and multiple interfaces. Pushed the notes and code to git.

Need for interfaces is still confusing. I’ll re watch the video tomorrow and proceed from there to enums.

u/vamsy_g21 — 11 days ago
▲ 4 r/programminghorror+1 crossposts

One screenshot is almost larger than the whole project: a 103.5 KiB Win32 editor in MASM x64

I built FeatherPad ASM, a small family of native Windows editors written entirely in MASM x64.

The flagship build is FamilyCodePad, a 103.5 KiB Win32 code editor with tabs, syntax coloring, line numbers, bookmarks, recent files, find-in-files, simple code runners, terminal launch, word completion, printing, Unicode handling, session restore, and atomic saves.

The stack is intentionally tiny:

- direct Win32

- MASM x64

- no C layer

- no C++ layer

- no CRT

- no framework

- no Electron

- no bundled runtime

- `/nodefaultlib`

- `WinMainCRTStartup`

The funnier numbers:

- FamilyCodePad.exe is 103.5 KiB

- all five editor executables together are 255.5 KiB

- the largest screenshot in this post is about 251 KiB

- PE SizeOfImage is 168 KiB

- four extra restored tabs added only about 92 KiB of Private Memory

- the source is 20,498 lines of MASM and 198 functions

So yes, one screenshot is roughly 2.4x larger than the editor it is showing, and almost the same size as the whole editor family.

The small tab footprint is not magic. FamilyCodePad keeps one visible editor control and stores inactive documents as heap snapshots instead of creating a full editor control per tab.

This is not meant to replace VS Code or Notepad++. Those tools do much more. I built this as a compact native Windows tool and a PE64/Win32 case study that became useful enough to dogfood.

Repo:

https://github.com/EntropyRoot/Patriarch-Notepad

Feedback welcome, especially from people who like tiny native tools, weird systems projects, or software where the screenshot has a larger appetite than the executable.

u/Responsible_Chip440 — 13 days ago