-10

I want to share some programming tips based on my experience to everyone. But I don't know where to start since they relate to Opinion-based questions.

Example with javascript:

Normally, there are some ways to create a bootstrap dropdown manually using jquery:

var icon = $('<i class="fas fa-ellipsis-h">');

var button = $('<a href="#" data-toggle="dropdown">');

button.append(icon);

var item = $('<a class="dropdown-item" href="#">');

item.text('Option 1');

var menu = $('<div class="dropdown-menu">');

menu.append(item);

var dropdown = $('<div class="dropdown">');

dropdown.append(button).append(menu);

1000 years later, you may want to say it's hard to maintain or update when the template is getting changes.

What's happen with the names if:

  • There are more than 1 icon.

  • There is some nested menu inside the menu.

  • We want to replace the icon with a text link.

  • ...

And, how does it look like if we need a lot of <div> tags which contain float-left, float-right, d-table css styles?

var floatLeft = $('<div class="float-left">');
var floatRight = $('<div class="float-right">');
var dTable = $('<div class="d-table">');

It's awful.

To avoid that troubles, I recommend to use this:...

Question

So: Where or how would I post this on Stack Overflow? Or is the Q/A format the only way we can share knowledge?


Edit: My post is different from May I ask for tips? because I don't require any review for my code. Just share some ways to let everyone reviews their own code.

16
  • 3
    And this one? Documenting through self-answered questions
    – Wicket
    Commented Feb 5, 2020 at 4:28
  • @Rubén Why don't you mention about how my post becomes duplicate instead of just a link? Sharing tips as a specific question on the main site, really??? It's wasting my time a think about a question.
    – Tân
    Commented Feb 5, 2020 at 4:39
  • Still getting duplicate vote even if I've edited my question to explain how my post isn't duplicate. Since a lot of moderators resigned, there weren't many feedbacks which were really helpful on this site (even if ~100k rep user). Thanks to let me know. I will delete it later. Disappointed.
    – Tân
    Commented Feb 5, 2020 at 4:46
  • I'm voting to close this question as off-topic because this feature is too broad and there aren't so many users who want to share their experience on it.
    – Tân
    Commented Feb 5, 2020 at 5:07
  • 4
    You would have loved documentation ...
    – rene
    Commented Feb 5, 2020 at 7:50
  • 1
    @rene Love it! Sometimes, when I want to share something, I usually split out my code to parts that making it become answerable. It's complex while I just need a title within a content. Here is a proof: How to generate video thumbnails and preview them while hovering on the progress bar? That question is too broad on SO but there are a lot of people who want to find the solution(s). Many thanks!
    – Tân
    Commented Feb 5, 2020 at 8:23
  • 1
    Feels to me like you may find a personal blog more suited than Stack to do what you're trying to do
    – Patrice
    Commented Feb 5, 2020 at 11:59
  • related, maybe a dupe: meta.stackoverflow.com/questions/349161/… and meta.stackoverflow.com/questions/351166/…
    – rene
    Commented Feb 5, 2020 at 13:23
  • One way may be to post an self answer on code review. take a poor working code , specify the limitation and what part should be improved, provide the fix for those part. a working clear question will be welcom on CR. And ppl may find other tips an improvment to sugest. Commented Feb 5, 2020 at 14:38
  • @Patrice Sure. But my big trouble with blog is the editor. After trying many ways, I totally decide to bring SO editor style to my page. Everything works fine except I'm walking alone. I need a tree with multiple branches. Time to work and time to help mom kill them. That's why I want to post it here when I have free time.
    – Tân
    Commented Feb 5, 2020 at 14:52
  • @rene Not only this post, the way you explain what-is-what doesn't shut down contributor's attitude immediately. That's why you always get high respect from me. Thanks again!
    – Tân
    Commented Feb 5, 2020 at 14:59
  • @xdtTransform Good idea. But I still worry about the limitation. Because everything in the world can be mentioned to improve the code with just 10 lines. So if I put all of the requirements into that question, it should be too broad (I don't say almost beginners love too broad articles)
    – Tân
    Commented Feb 5, 2020 at 15:16
  • @xdtTransform As you can see above, I'd asked and answerd my own question 1 month ago. In the answer, I'd said there aren't many js lib to achieve that goal. So, it's just a temporaring working solution. Indeed, Google users don't care the question was closed or not for any reason, they need solution(s) based on the title. I'd given them. That's what I want, but some of SO users don't. Let they are. I don't care.
    – Tân
    Commented Feb 5, 2020 at 15:22
  • 2
    @Tân Well.... Stack is not made to be your personal blog. Stack is so popular cause of the rules that are maintained here. Rules that make it so your particular way of using Stack isn't really aligned with the vision. It sucks, but it is what it is. Stack does not have to be the be all and all of every programming thing under the sun. Stack is meant as a Q&A. It doesn't fit that? It doesn't fit Stack. There are other sites for the information you have to reside on. And that is okay. We have to stop trying to make stack be everything for programmers. It doesn't work :/
    – Patrice
    Commented Feb 5, 2020 at 17:07
  • 2
    @tân SO documentation was an experiment, that failed. Why? Cause it wasn't fitting with our Q&A. We had documentation cause the Q&A didn't fit the model that you want. Stack failed and decided not to do it anymore.
    – Patrice
    Commented Feb 5, 2020 at 17:46

1 Answer 1

2

Tl;Dr

Post your tips anywhere else then add a link to your profile. Also you could add the link to your answers as a reference when this be appropriate.


Stack Overflow has three places

  1. The main site
  2. Meta
  3. Chat

Actually there is a fourth place,

  1. Profile

If you don't want "to waste your time thinking in a question", the main site is discarded. Also it's very likely that you will not want to waste your time posting them using the Stack Snippet Sandbox in Meta.

So, the remaining places are

  1. Chat
  2. Profile

Related

1
  • Yes. It's discarded since I cannot post programming tips as documentation instead of a question on a programming site (although I've specified the problem - Not unclear, not too broad). And the most importand thing is: It can be applied to improve the code. We avoid to change the content of the post on the main site, but using this way, we can. If there are more than 50 answers for the question, do you really want to read all of the answers and compare which is good? If yes, that's not including me. Thanks for reply.
    – Tân
    Commented Feb 5, 2020 at 5:05

You must log in to answer this question.

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