Comparison "pastorg" ala hosting code fragments

    I'll start a little from afar. I’ll tell you what will be discussed.

    What is a pastorga?


    For some time now (when I do not remember exactly) I started using certain services, the essence of which is temporary (or not so) hosting of pieces of code. In practice, it looks like this: I want to show my procedure to Vasya Pupkin (advice to ask, or something else), this can be done in ICQ, but it will be unreadable, and editing this code in ICQ is inconvenient. For that, and services - went in, inserted the code, received a link, gave a link to Vasya. The link will be the code highlighted with. Conveniently. They are called unknown, but there is a tendency (like jeeps and SUVs, or pampers and diapers :) to call them "pastorgs" (paste.org) or "pastes" (paste.bin). I will call pastorgs for I’m used to it.
    So, not so long ago I decided to make my own such service. There were several reasons - this was the presence of a free hosting with a lot of space, and the desire to “pump” your skills, and an attempt to do something more convenient than analogues.

    It began with the fact that I began to ask my friends what disadvantages they see in the services they use.

    Brief review


    • paste.org.ru
      I will quote:
      “Inconvenience: the“ inserted ”field should have a monospace font.
      The choice of highlighting method is terrible - the layout of languages ​​is nightmare, it is unrealistic to find the desired language in that drop-down list. ”
      So of the minuses I can highlight the choice of language. Monospaced font seems to me not a very critical minus.
      Of the pluses, there is nothing special to note - a fairly ordinary resource, I did not see anything special in it.
    • everfall.com/paste
      This is a resource that I used for a while. Firstly, there is version history. Those. by opening someone’s code, I can insert a new version of this code. A good backlight (GeSHi) is attached to this, and several options, such as “prohibit editing” (read the insertion of a new version), code retention period. Of the minuses, I noted the still inconvenient choice of languages ​​in the combo box, the stupidly made version history (i.e. when viewing the code and having a large number of versions of it - it will be scary - try it yourself :).
    • codepad.org Everything
      is quite simple here. Of the pluses, I liked the choice of languages ​​(but due to the fact that the list of languages ​​in the form of radio buttons is not enough), the built-in code interpreter. The rest is not very, even the author can not be specified.

    The rest of the services that I saw - do not differ much - the same eggs, only in profile.
    From all this, we can highlight in the end several points that should be taken into account when developing such a service to increase its usability.

    What should be convenient?

    • Convenient choice of languages.
      The results of the discussions resulted in a solution in the form of a rating of languages. I created a table in the database - a list of languages ​​and made a language rating field there. The more code inserts in the language X, the higher the rating of this language. As a result, 10 languages ​​with the highest rating fall into the radio buttons, there is also the item “Other”, when choosing which you can choose the language from the combobox. The plans include recording an individual rating of languages ​​in the cookies of each user. This will make it possible to make the pastorg more convenient for each individual user. The idea was also expressed to display a list of languages ​​in the form of a cloud - quite interesting, but for now we are discussing it.
    • Version history, well implemented.
      There was less discussion here. The inconvenience that was in pastorg # 2 is with a large number of versions, they occupy the entire screen, and the code turns out you won’t understand where. Although the code is the main and priority element of the page. So we just turned the default version history blog. When you click on it - it unfolds. In addition, two such blocks were made - above and below the field with the code, this can be convenient, with a large size of the latter. By the way, plans to analyze this size, and if it fits on the page, remove the block from the bottom.
    • The ability to "customize" the storage of your code.
      It can be said whistle farts. Indicate the author, prohibit editing, code retention period - all this was implemented. Also, the idea was expressed to make it possible to "password" the code, which we also implemented.

    You can "try" the service: code.shareservices.net
    And not only try, but already use it (naturally, they did everything for free, and without any advertising).

    And finally ...


    We are currently developing plugins for popular IDEs. For Visual Studio is almost ready. In fact, the number of actions when using such plugins is significantly reduced.
    The plans are still many interesting and useful features for the service. So, if anyone is interested, and if anyone wants to participate in the project, we are all for it.
    Moral: “Programmer - give a normal interface!” (c) some kind of anonymus)

    PS Although it is clear that the programmer should not do the interfaces, but in practice, for some reason, everything is different.

    Also popular now: