-36

I'm new to programming and have been using stackOverflow and github only for the last 5 days.

I have a couple of observations.

  1. Would it be worthwhile if, SO/gitHub adminstrators enforce strict code language and version tags on posted questions and repos or moderators / bot to auto tag submissions.

    This will help greatly filter and find answers only to those in relevant OS/language/version and limited to the specific issue the person is searching for, in the specific OS/language/version of interest. or is there some script/utility/browser extension that does this, that I should be aware of?

  2. Why do so many responder's co-mingle model-view-controllers in their answers or repos? This is enormously frustrating for n00bs like me. Wouldn't it make more sense if everyone would always seperate out re-usable 'extensions/classes/methods/function/package/library using parameters' from the 'view', 'handler' and the calling ('use') part. That way, it'd easier to see/read/learn/use;

    a) the calling function(arguments) and use
    b) the handler (or intrepretter, if required)
    c) the library with classes/methods/functions(and how the arguments are used)

    This will promote reuse and quicker development focussing on the business problem rather than wading thorugh the weeds and woods to pick up nuggets. github stack-overflow

  3. Is there a snap-in/extension or some method to open SO inside coding IDEs; this would be possible if all questions and answers are structured manually or automagically into re-usable / callable packages or libraries; after all how many variants of say, the 'date-diff' function does the world really need?

13
  • 10
    GitHub and Stack Overflow are not the same. The only real similarity they have between each other is that people who write code leverage them in some capacity.
    – Makoto
    Apr 29, 2020 at 22:21
  • I know that. My suggestion was that these 2 useful sites for develoers both don't seem to allow for structured tags to filter for only for OS, language, version that is of intrest
    – Harvey
    Apr 29, 2020 at 22:38
  • 2
    Votes on meta, especially on feature-requests, are used to signal disagreement. It's not hate. People are allowed to think it's not a good suggestion.
    – ivarni
    Apr 30, 2020 at 6:07
  • 2
    I also think it's completely unnecessarily conflating SO and GitHub. Also misunderstanding what each does and why. Apr 30, 2020 at 6:24
  • @VLAZ - my point is these 2 resources are typically first ports of call for developers while coding, to check out how something was implemented by others, when they are stuck. All I was wondering, was if it would make sense for structured formatting of requests and responses such that, where a solution is directly usable or extendable, it'd be faster to integrate into dev projects. Also, this would help with attributions, licences, etc. should we explore that route along with "free and open" submissions.
    – Harvey
    Apr 30, 2020 at 8:51
  • 2
    But GitHub is not at all related to SO. The fact that they are both used by developers is irrelevant. Many people here have Facebook accounts but that doesn't mean feature requests for Facebook should come here. Apr 30, 2020 at 8:55
  • @VLAZ - I am making a bigger point here, its not so much about what source or which sink. It's that at various places on the internet, developers find information they are seeking, in the form of code snippets or examples, tutorials, blog posts of completed projects or short answers, with accompanying code or helpful pointers/nudges to get the developer unstuck. My suggestion is that by agreeing stylesheets for how OP posts queries and RESPONDERS submit answers (or projects of git), standarisation of formats would make it easier to inspect-test-modify/integrate. No?
    – Harvey
    Apr 30, 2020 at 9:07
  • 9
    And I don't agree. We aren't a code writing service. People shouldn't be outsourcing work to us. If we give out code, it's usually for demonstration purposes and it's often cutting out some cases for clarity and ease of explaining things. A lot of code would be !!!VERY DANGEROUS!!! (I really cannot emphasise this enough) to use as-is. So, your expectation here is completely off. It's also doubly wrong because you expect even more free work from contributors. We already volunteer but now you want us to write libraries? I have a response but it isn't very polite... Apr 30, 2020 at 9:11
  • @VLAZ - not at all! You have completely the wrong end of this! People willingly generate code to explain, illuminate, share with others. This unstructured data, is valuable nuggets for people trying to solve business / real-world problems. Developers (and non-Tech entrepruners) are glueing avaliable code/libraries/methods to applications. All I am suggesting is that these components, that are anyway being given out for free (albeit in response to OP questions in SO or as full projects on git or as blog post articles as tutorials), could be harnessed for greater good.
    – Harvey
    Apr 30, 2020 at 9:30
  • Your comment about outsourcing coding of specific problems, already exisit in the form of bounties, private contracts for snippets, and commercial libraries. I also mentioned automatic attributions, earlier using structured exchange / integration of code.
    – Harvey
    Apr 30, 2020 at 9:32
  • I agree blind use of someone elses code is dangerous, that is why rakng and reputation comes in...you would not have a problem integrating a well documeted, highly rated 'date time' package would you? If this (or similar packages) were standardised, then every subsequent method would extend this core library and not necesiarly have to create a new one - such that the calling functions become simpler and easier to understand and use.
    – Harvey
    Apr 30, 2020 at 9:36
  • For example, any one can integrate speech, vision, AI modules with relative ease to solve real-world problems, and not have to spend years mastering coding. Anyway, I'll stop now, its clear, most of you think my idea sucks. I get it.
    – Harvey
    Apr 30, 2020 at 9:36
  • 1
    "you would not have a problem integrating a well documeted, highly rated 'date time' package would you?" Yes, I absolutely would! You are again talking about us having to produce libraries. I am absolutely against that. Apr 30, 2020 at 10:03

1 Answer 1

12

I'm going to leave your first suggestion alone; search is enough of a mess that any further pontification on how to make your idea work with it might hurt heads.

Your second point isn't...our problem. How people structure code is how they structure code, and you can either love it or hate it. More importantly, you get exposed to how others structure their answers such that it makes sense in the context of them explaining it.

Your third point is the most concerning to me, but it does come with a straightforward solution - copy and paste. You should not have an expectation to be able to run code you get from the site in any environment, because the code doesn't come with that kind of guarantee, but at a minimum, you can import the code into your IDE, even if you have to do it yourself.

6
  • Frighteningly, thanks to our newly minted GitHub integration, we can now support feature #3. Create a repo for your "date-diff" function, share its code and explanation as an SO answer, and now everyone can automatically include it in their code base without need for copy-paste. It'll even handle versioning and updating seamlessly (YMMV, depending on how you feel about Git). I'm afraid that my "never paste in any code to your project that you do not understand how it works" mantra is beginning to become unsustainable... Apr 29, 2020 at 22:26
  • 2
    @CodyGray: Oh, that's not good. Or it could be fantastic for all of those cryptocurrency miners. Depends on how you want to look at it. :|
    – Makoto
    Apr 29, 2020 at 22:29
  • I was thinking of juypter notebook or xcode playgroud or playcod/JSFiddle type of interface to SO that makes the process of submitting questions and responses more standardised.
    – Harvey
    Apr 29, 2020 at 22:41
  • Like Stack Snippets? (Note: only web programmers need apply.) Apr 30, 2020 at 0:06
  • Thanks @CodyGray, similar yes; different in that SO snap-in or add-on or extension would sit inside common IDEs - Eclipse, Xcode, pyCharm etc. and filter by version, language of the users current open project and sorts by rank and other filters, responses it finds in SO (data).
    – Harvey
    Apr 30, 2020 at 8:57
  • The calling progam, should allow sandbox running (testing) of SO submissions so that user can test, inspect, edit, and integrate easily. Also, this would force developers confom to standardised best practices of how to call - handle - process methods. Alternatively, developers can use their house-rules or stylesheets to transform OP submissions into their required coding-rules, if needed.
    – Harvey
    Apr 30, 2020 at 9:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .