Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Behind the Scenes
  3. Qt.io webservices
  4. Code snippet sharing

Code snippet sharing

Scheduled Pinned Locked Moved Qt.io webservices
15 Posts 7 Posters 8.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    milot.shala
    wrote on 6 May 2010, 23:39 last edited by
    #1

    Hello :D

    Great work here guys!

    I was thinking, would it be good if you include any code snippet sharing system here?

    Someone can write a plugin for Qt Creator that users can manage (download / upload) their code snippets from within the Qt Creator and be able to see and manage their code snippets from the web as well.

    Lots and lots of code is rewritten in the industry today and why let developers reinvent the wheel, instead of using code (a cool widget, an algorithm etc.) that someone has written once and shared in the code snippet sharing system?

    The typical scenario can be for example:

    I am writing a Luhn algorithm using Qt for the use of it within my Qt project(s), but I want to share such algorithm with the rest here, I just select the code that I want to share, hit a shortcut or select a menu that brings a dialog for more information such as name, Qt modules that were used etc. and share the snippet within my snippet "space" where someone else that is having similar task (writing the Luhn algorithm) can search, find my snippet, from Qt Creator select the snippet name and have the snippet inserted in his focused area...

    There is an independent project that is known among .NET developers called CodeKeep (http://www.codekeep.net/) it has a Visual Studio add-in as well.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      black_coder
      wrote on 6 May 2010, 23:49 last edited by
      #2

      Yes, I am in support of this. Some code snippets that demonstrate some advanced usage of Qt
      components. It doesn't have to be a complete working code, it can be algorithmic snippet or an illustration of a certain feature. And preferably it shouldn't be part of the Qt demos/examples.

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kamalakshantv
        wrote on 7 May 2010, 06:29 last edited by
        #3

        May be one can post these source code snippets in to the wiki.

        1 Reply Last reply
        0
        • H Offline
          H Offline
          hhartz
          wrote on 7 May 2010, 07:00 last edited by
          #4

          Why not use http://qt.pastebin.com/ ?

          --

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kamalakshantv
            wrote on 7 May 2010, 07:13 last edited by
            #5

            I think we should prefer one hosted by Qt only and avoid third party sharing sites. If providing a new interface is not on the roadmap, then posting the code snippets in the wiki like Forum Nokia will be a better option.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              milot.shala
              wrote on 7 May 2010, 07:50 last edited by
              #6

              [quote author="Henrik Hartz" date="1273215603"]Why not use http://qt.pastebin.com/ ?[/quote]

              That's a good idea, but users cannot register and maintain their own code snippets and users are not able to see/use other users' code, it's not that convenient, it would be better to have something built-in right here in the developer network and as well have a Qt Creator plugin for sharing a snippet from Qt Creator itself, it can be also a wiki with a special category called "snippets" or something similar where users can post such code, and I am willing to have such support on Qt Creator.

              Maybe I will write a plugin once I have a web service API exposed :D

              1 Reply Last reply
              0
              • K Offline
                K Offline
                kamalakshantv
                wrote on 7 May 2010, 07:54 last edited by
                #7

                [quote author="Milot Shala" date="1273218610"][quote author="Henrik Hartz" date="1273215603"]Why not use http://qt.pastebin.com/ ?[/quote]

                That's a good idea, but users cannot register and maintain their own code snippets and users are not able to see/use other users' code, it's not that convenient, it would be better to have something built-in right here in the developer network and as well have a Qt Creator plugin for sharing a snippet from Qt Creator itself, it can be also a wiki with a special category called "snippets" or something similar where users can post such code, and I am willing to have such support on Qt Creator.

                Maybe I will write a plugin once I have a web service API exposed :D[/quote]

                An plugin to view code snippets will be really great.

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  troubalex
                  wrote on 7 May 2010, 12:37 last edited by
                  #8

                  [quote author="Milot Shala" date="1273218610"][quote author="Henrik Hartz" date="1273215603"]Why not use http://qt.pastebin.com/ ?[/quote]

                  That's a good idea, but users cannot register and maintain their own code snippets and users are not able to see/use other users' code, it's not that convenient, it would be better to have something built-in right here in the developer network and as well have a Qt Creator plugin for sharing a snippet from Qt Creator itself, it can be also a wiki with a special category called "snippets" or something similar where users can post such code, and I am willing to have such support on Qt Creator.

                  Maybe I will write a plugin once I have a web service API exposed :D[/quote]

                  I really like the idea, particularly the integration into Qt Creator. I have made it a feature request for future versions since it will need both coding and legal work.

                  Maybe we can use the pastebin for now and link to the snippets on a wiki page so they don't get lost?

                  THE CAKE IS A LIE
                  Web Community Manager - Qt Development Frameworks

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    milot.shala
                    wrote on 7 May 2010, 14:48 last edited by
                    #9

                    [quote author="Alexandra Leisse" date="1273235820"][quote author="Milot Shala" date="1273218610"][quote author="Henrik Hartz" date="1273215603"]Why not use http://qt.pastebin.com/ ?[/quote]

                    That's a good idea, but users cannot register and maintain their own code snippets and users are not able to see/use other users' code, it's not that convenient, it would be better to have something built-in right here in the developer network and as well have a Qt Creator plugin for sharing a snippet from Qt Creator itself, it can be also a wiki with a special category called "snippets" or something similar where users can post such code, and I am willing to have such support on Qt Creator.

                    Maybe I will write a plugin once I have a web service API exposed :D[/quote]

                    I really like the idea, particularly the integration into Qt Creator. I have made it a feature request for future versions since it will need both coding and legal work.

                    Maybe we can use the pastebin for now and link to the snippets on a wiki page so they don't get lost?[/quote]

                    Good to hear! Thanks Alexandra.

                    As per pastebin we can do that, or it can be better if everyone can share such snippets directly on the wiki and then filter wiki contents by user, if this can be done on this system?

                    IMO I think it is better to maintain such sharing on QtDN and not using third-party services such as pastebin because on pastebin every user should enter its information (some may leave the fields blank), here every user must be logged in to edit wiki, I think tracking of the changes and filtering can be easier here.

                    1 Reply Last reply
                    0
                    • cybercatalystC Offline
                      cybercatalystC Offline
                      cybercatalyst
                      wrote on 29 Jan 2015, 13:09 last edited by
                      #10

                      I know this is very old, but actually I started a project that accomplishes that:
                      https://github.com/cybercatalyst/qt-pods

                      1 Reply Last reply
                      0
                      • cybercatalystC Offline
                        cybercatalystC Offline
                        cybercatalyst
                        wrote on 29 Jan 2015, 13:09 last edited by
                        #11

                        I know this is very old, but actually I started a project that accomplishes that:
                        https://github.com/cybercatalyst/qt-pods

                        1 Reply Last reply
                        0
                        • T Offline
                          T Offline
                          tarod.net
                          wrote on 29 Jan 2015, 13:21 last edited by
                          #12

                          Great idea, but I think it is necessary some support from Qt Project to organize the code and get an easy access to these snippets.

                          "Individually, we are one drop. Together, we are an ocean."

                          1 Reply Last reply
                          0
                          • T Offline
                            T Offline
                            tarod.net
                            wrote on 29 Jan 2015, 13:21 last edited by
                            #13

                            Great idea, but I think it is necessary some support from Qt Project to organize the code and get an easy access to these snippets.

                            "Individually, we are one drop. Together, we are an ocean."

                            1 Reply Last reply
                            0
                            • cybercatalystC Offline
                              cybercatalystC Offline
                              cybercatalyst
                              wrote on 29 Jan 2015, 13:26 last edited by
                              #14

                              The idea is to have it organized in repositories. The graphical tool qt-pods (there will be a command line version in the future) loads a list from your defined sources, then offers packages for install. You just click on them and they install to your projects. The same way you remove them.

                              What happens is that they get added as git submodules and are woven together via a single .pri that is the single thing you need to include to you project. Then you can start using them! It's very easy, but it needs more people to come together, reformat the code and spread the word.

                              1 Reply Last reply
                              0
                              • cybercatalystC Offline
                                cybercatalystC Offline
                                cybercatalyst
                                wrote on 29 Jan 2015, 13:26 last edited by
                                #15

                                The idea is to have it organized in repositories. The graphical tool qt-pods (there will be a command line version in the future) loads a list from your defined sources, then offers packages for install. You just click on them and they install to your projects. The same way you remove them.

                                What happens is that they get added as git submodules and are woven together via a single .pri that is the single thing you need to include to you project. Then you can start using them! It's very easy, but it needs more people to come together, reformat the code and spread the word.

                                1 Reply Last reply
                                0

                                • Login

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • Users
                                • Groups
                                • Search
                                • Get Qt Extensions
                                • Unsolved