Programming

21924 readers
843 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
76
38
A new era of Stack Overflow. (stackoverflow.blog)
submitted 3 weeks ago* (last edited 3 weeks ago) by Pro@programming.dev to c/programming@programming.dev
 
 

Extra.

LOL in a lot of ways.

2025 is gonna be interesting.

77
 
 

Hey everyone — I'm a final-year student, and I’ve been wondering this a lot lately. We always hear that “you need a good project to land a job”, but most students I know either copy from GitHub, get stuck, or just... give up. We’re doing a small open survey to understand this from both sides — students and educators. If you've ever: Built or struggled with a final-year project

Helped someone else do it (educator/mentor)

Wanted to sell or learn from real-world projects

We’d love to hear your honest experience. 🙏 It’s just 2–3 mins, totally anonymous. 📄 Survey Link – for students & educators

We’ll be using the insights to create open resources and maybe a system that actually helps. Thanks in advance if you participate — or drop a comment about your experience.

78
79
80
 
 

The population (especially the younger generation, who never seen a different kind of technology at all) is being conditioned by the tech industry to accept that software should behave like an unreliable, manipulative human rather than a precise, predictable machine. They're learning that you can't simply tell a computer "I'm not interested" and expect it to respect that choice. Instead, you must engage in a perpetual dance of "not now, please" - only to face the same prompts again and again.

81
 
 

This article is divided into two chapters.

  • The first one, starting with section “Introduction to naming in programming” presents a review of scientific literature present on the topic. That section will deepen your understanding of the current body of knowledge on naming things.
  • The second chapter, starting with section “Guidelines for naming conventions in programming” presents actionable recommendations to improve your skills in choosing thoughtful class, function or variable names. If you’re looking for tips, go there.

There are only two hard things in Computer Science: cache invalidation and naming things.

82
 
 

I have seen Geany around and am pretty intrigued by the update. I primarily use Kate but would love to hear folks' thoughts on Geany and if anyone recommends it.

83
84
85
86
87
 
 

I have heard about Elninki's and Harvard's programs, can I join them now or is there a specific date?

88
 
 

Hey everyone, I’ve been working on something in my free time — a wrapper that lets you use open AI models (like Mistral, LLaMA, etc.) in a clean interface. The longer-term idea is to make it easier to run larger models — 70B+, fine-tuned variants, or your own — without needing your own GPU cluster. Still very much a side project — I’m building this for fun, learning as I go, and curious if it’s useful to anyone else. Link’s here if you want to try it: https://umbraai.xyz/

89
 
 

I wanted a dead-simple way to share text, links, or code without creating accounts or dealing with messy UIs. So I built Zync(https://zyncshare.vercel.app/) — paste, share, done.

  • Share plain text, links, or code instantly
  • Replies work without login
  • Everything auto-expires in minutes or hours
  • No tracking, no ads, no clutter.

Would love to hear what you think. Is it something you’d actually use?

90
91
92
23
Literate Programming (www.literateprogramming.com)
submitted 1 month ago* (last edited 1 month ago) by HaraldvonBlauzahn@feddit.org to c/programming@programming.dev
 
 

This is the name of a concept to combine source code and highly structured human-readable documentation, such that the main artefact is the documentation, and the secondary artefact the full source code extracted from it. Any change to the source means changing the explanatory documentation of the goals and reasoning at the same time. It was invented by no other than Don Knuth, and he, together with his collaborators, wrote the TeX program in it, to show how it is useful in practice.

I myself have used the technique in various occasions at work, for example when taking on an important but almost unreadable piece of code I inherited at work, to preparing sources for a complex algorithm for handover when I was leaving another larger project, and also in leisure coding.

The tool which is most widely used for this approach today is Emacs org-mode. It has the advantage that it works for every programming language, and you will likely find full examples for all languages you use, but many other tools (for example for vim) exist.

93
 
 

Andrew Zig Roadmap 2026.

It's a 2h talk with code / demo. A lot about the new Io interface.

94
95
 
 

Assembly language programmers:

Do you see any use at all for an instruction STORE register Y in the memory location pointed to by register Y ?

I am writing my own 8-bit computer emulator for a machine with an ISA I designed myself, and the quest for orthogonality has led to this.

96
 
 

I noticed that the developer of kitty terminal uses this style of comments I have rarely if ever seen elsewhere:

outside
#: section {{{
inside
#: }}}

Kate text editor recognize sections for purposes of highlighting, folding etc. It's really nice for me because I sometimes I have a difficult time navigating large text files. And it lets you nest them.

  • what is this called?
  • are there other ways to do it?
  • is it standard among text editors? I believe Kovid the dev for kitty is a vim guy so presumably there is support there also.
  • why don't more people use it? are there problems?

Screenshot that shows the code folding.

  • Cursor is at the end of line 7 so the whole section line 7-22 is highlighted
  • lines 12-16 are folded in a 3rd level comment
  • I also included tab indents just to make it easier to see what's going on (Kate treats it the same way regardless of indents)
  • Highlighting/Mode > Scripts > Bash

I also like his style of distinguishing between narrative comments (starting with #:) and commented-out code (starting with #). Although in my example, Kate doesn't treat them differently. Is there a term for this? Any conventions, support etc?

plain text used for screenshot


#: Comment level 1 {{{
	#: Comment level 2 {{{
		#: configure something
		key value
	#: }}}
	#: Another Comment level 2 {{{
		#: Comment level 3 {{{
			#: Helpful explanatory comment
			file location
		#: }}}
		#: Comment level 3 with hidden text {{{
			you_cant see_this
			hidden_emoji "👁️"
			hidden_emoji2 " 👁️"
			hidden_emoji3 "   👁️"
		#: }}}
		#: let's set some things up
		# setting yes
		# other_setting no
		different_setting maybe
	#: }}}
	# regular comment
#: }}}

# regular comment outside anything


For a real world example, see sample kitty.conf file provided on project website.

97
98
 
 

Thoughts? It does feel like there's a lot of things you can do in comments that would be impossible or impractical to do in names alone, even outside of using comments as documentation. There's certainly much more information that you can comfortably fit into a comment compared to a name.

One of the comments in the Lobste.rs post that I got this from stuck out to me in particular:

Funny story: the other day I found an old zip among my backups that contained the source code of game that I wrote 23 years ago. I was just learning to code at the time. For some reason that I forgot, I decided to comment almost every single line of that game. There are comments everywhere, even for the most obvious things. Later on, I learned that an excess of comments is actually not considered a good practice. I learned that comments might be a code smell indicating that the code is not very clear. Good code should be so clear, that it doesn’t need comments. So I started to do my best to write clear code and I mostly stopped writing comments. Doing so only for the very few parts that were cryptic or hacky or had a very weird reason for being there.

But then I found this old code full of comments. And I thought it was wonderful. It was so easy to read, so easy to understand. Then I contrasted this with my current hobby project, which I write on an off. I had abandoned it for quite some months and I was struggling to understand my own code. I’ve done my best to write clear code, but I wish I had written more comments.

And this is even worse at work, where I have to spend a ton of time reading code that others wrote. I’m sure the authors did their best to write clear code, but I often find myself scratching my head. I cherish the moment when I find some piece of code with comments explaining things. Why they did certain things, how their high level algorithm works, what does this variable do, why I’m not supposed to make that change that looks like it will simplify things but it will break a corner case.

So, I’m starting to think that this idea that comments are not such a good practice is actually quite bad. I don’t think I can remember ever reading some code and thinking “argh so many comments! so noisy” But, on the other hand, I do find myself often in the situation where I don’t understand things and I wish there were some more comments. Now I’m trying to write comments more liberally, and I think you should do the same.

I guess that’s a generalization of the op’s idea.

99
100
 
 

I noticed a repository's .gitattributes entry for *.csv used text eol=crlf so I investigated and found this.

view more: ‹ prev next ›