Live data from Hacker News

Why do we need modules at all? (2011)

groups.google.com

81–90 of 94 posts

Re: Why do we need modules at all? (2011)

#81
post #65
post #41

I miss Joe, he left us too early. He always had wild ideas like that. For a while he had this idea of a git + bittorrent he called it gittorrent, only to find out someone had already used the name. I think it was a bit of an extension of this universal functions idea. If you expand some of the comments below, he and other members of the community at the time have a nice discussion about hierarchical namespace. I part…

Software development is continually emotionally stunted by a lack of people with expertise in multiple other fields. English absolutely has namespaces. Every in-group has shibboleths and/or jargon, words that mark membership in the group that have connotations beyond the many dictionary definitions of that word (in fact I wonder how many words with more than three definitions started out as jargon/slang words that ac…

I'm reminded of a Final Jeopardy! clue from a few years back --

> As of 2013, this 3-letter verb common in sports, theater & politics has the largest entry in the online OED.

The correct response? What is "run"?

Re: Why do we need modules at all? (2011)

#83
post #41

I miss Joe, he left us too early. He always had wild ideas like that. For a while he had this idea of a git + bittorrent he called it gittorrent, only to find out someone had already used the name. I think it was a bit of an extension of this universal functions idea. If you expand some of the comments below, he and other members of the community at the time have a nice discussion about hierarchical namespace. I part…

[deleted]

Re: Why do we need modules at all? (2011)

#85
post #69
post #66

Earlier quoted context omitted.

> Software development is continually emotionally stunted by a lack of people with expertise in multiple other fields. I think Joe's point is about the perennial discussion whether hierarchy is better than tags. It's as old as software or as old as people started categorizing things. Some early databases were hierarchical KV stores. Email clients and services go through that too, is it better to group messages by tag…

"whether hierarchy is better than tags" sounds like whether hammer is better than a screwdriver. Use a tool appropriate for the job. Hierarchy seems more rigid less general than tags but when it works--it works.

It’s very hard to do tags in the physical world. You need to stick different colored post-its to things and do a full table scan (with your eyes) any time you want to process all docs of one tag. Or you cluster things together depending on similar colors.

Hierarchy is easy in the physical world.

But what is crazy is since the dawn of computing we can store data however we want and project it however we want…and yet we still use hierarchy for file storage…like we still just have a filing cabinet of manilla folders.

Re: Why do we need modules at all? (2011)

#86
Modules are often about a single function. But the function has helper functions that are not part of the API. Then maybe some functions that are part of the API which help use that function. Sometimes functions beget families.

If a function is built on several helper functions, it may be that those same helper functions can also be used to make other, related things which round out the functionality area. Perhaps they provide an API that's easier to use for different scenarios or whatever.

Re: Why do we need modules at all? (2011)

#87
Code reuse used to be thought of as the ultimate destiny for computer code. Eventually you would never have to write new code, it would all exist in some form and you would just reuse it. We may actually be getting something like that through the use of AI for coding now. The problems with code reuse are many though. A function written in C for a microcontroller often won't work in a python program, especially not without all the include files, libraries, and a wrapper. How do you find the function that matches your needs? Coding language and function parameters offer some clues but are not sufficient. For example one function may do rounding on return values while another does not. Do you need a function optimized for speed, for object size, for time latency? Will the function work in your computing space? For example one function might use a loop, another might use recursion so running on an MCU one might work and the other might crash your stack. This might be a set of problems a LLM could sort out, but it would need some most excellant training data, not random stuff off the web. Even existing, working, industrial code bases would not be sufficient since there are huge sections of code in them that are legacy and mostly no longer used or relevant. It would probably have to be a constantly curated training database. And there is an inherent ambiguity in code, who is to say one implentation is better than another if they both work? This could make debugging challenging if the coding style is different in all the code snippets.

Re: Why do we need modules at all? (2011)

#88
I sometimes want to save a useful python script, or a function in github, but don't want to create a whole repository with README, name, description and so on. This model would be nice for that. But then, the access control system (e.g. private/public repos) would be completely different. Perhaps you could have groups of users, and give group access to individual objects (classes/functions) in your repo. But giving access to each object one by one would probably be tedious, so you need some kind of modules, or other way of grouping objects (maybe tags?). I also thought of tags on one of my jobs as DevOps. We had a lot of types of repos, that we needed to organize, and enforce access control: - code repos like backend and frontend - infrastructure repos with k8s manifests, helm charts etc. - also a lot of microservice/microfrontend repos The team lead was trying to come up with a hierarchy for all this, but struggled. If github allowed for a flat namespace of repos, and tags-based access control, we could create tags like 'frontend', 'devops', 'backend', give the tags to people and repos.

Re: Why do we need modules at all? (2011)

#89
post #69
post #66

Earlier quoted context omitted.

> Software development is continually emotionally stunted by a lack of people with expertise in multiple other fields. I think Joe's point is about the perennial discussion whether hierarchy is better than tags. It's as old as software or as old as people started categorizing things. Some early databases were hierarchical KV stores. Email clients and services go through that too, is it better to group messages by tag…

"whether hierarchy is better than tags" sounds like whether hammer is better than a screwdriver. Use a tool appropriate for the job. Hierarchy seems more rigid less general than tags but when it works--it works.

When someone asks "what is the best tool for this?", the answer "the best tool is the right tool for the job" is a non answer.

Re: Why do we need modules at all? (2011)

#90
post #89
post #69

Earlier quoted context omitted.

"whether hierarchy is better than tags" sounds like whether hammer is better than a screwdriver. Use a tool appropriate for the job. Hierarchy seems more rigid less general than tags but when it works--it works.

When someone asks "what is the best tool for this?", the answer "the best tool is the right tool for the job" is a non answer.

Ok. Do tell. If the job doesn’t matter here, what is better hammer or screwdriver?
Post reply on HN