📜 ⬆️ ⬇️

Random Tips

Hello, almost half a year has passed, as I published my small service of notes / tips for a programmer on Habrahabr . To my great surprise, there were a lot of people who liked the idea.



Honestly, I still receive e-mail from many people with questions about the status of the service and just wishes. Unfortunately, I am now very busy (on a permanent job), but I decided to finish off at least the basic functionality and I will slowly twist it, if the community again appreciates my efforts.
')

The essence of the service


To begin with, I will quote from the site:
The database stores a list of tips with attached tags. You can filter the topics of interest. The service is not an online tutorial / collection of articles / cataloged FAQs. The main idea: random tips, notes, tasks “with a trick” during interviews.

I really like the idea of ​​learning foreign words and rules using cards: you constantly look at them until you learn. The idea of ​​the service is the same: no breakdown by topic (except tagging), you just need to limit the range of “cards” and view them.

I know from my own experience that in order to remember something special in any field, you need to come across this several times in practice, only after this comes awareness and the ability to use knowledge in the future, but for this you need at least an approximate idea of ​​what we have. ” in the arsenal. For this service is intended.

I don’t count on people with great experience, all the notes were taken from books, invented by me and my friend, for which many thanks to him. There are plans to gradually translate the C ++ FAQ with examples and, if possible, references to the C ++ standard.

How it looked before:

image

Changes





Naturally, I could not refuse any list of existing cards, so I entered the start page , where you can filter by: tags and context any entry.



Initially, the idea was to add comments to notes, but this complicates the perception and destroys the general idea of ​​the service, so I decided to do something else: to introduce some kind of version control system, in the form of additions. Any user can send a request in the form of comments to any note and, if the moderator confirms, its change will be added to the general list, which is displayed at the bottom of each note.

In order to somehow attract users not only to read, but also to create notes (which, frankly, I don’t hope), you can hook any address of the site to each addition of information (comment / advice).

How do I imagine working with the service? On the page of any advice you enter the tags of interest and click "Random advice", or "I'm feeling lucky" (if you only need entries with a high rating).

Technical side


This part hardly differs in something special from a lot of projects, but we are in Habré, we can’t keep silent about it :)

I took a long time proven combination of php + mysql (this allowed us to take a quick start and quickly develop everything you need). No ready cms. All logic is divided into 2 files: index.php and Logic.php.

To speed up the work, data caching is used (currently disabled, so I hope that Habr will put the domain for ages):
We take alias-pages, check in the cache folder, if a file with that name is created - we take the generated html-content from it, otherwise - request to the database. In fact, the simplest scheme possible.

Conclusion


I will be glad to any criticism. Unfortunately, in the near future I will not be able to refine the functionality, only to replenish the list of tips. All ratings of notes had to be cleaned, because they were not protected from markups. I hope that if someone finds the vulnerability / non-filterable data, I will not use it to clog the base.

And yes, a lot of people asked for the same interface, but for other programming languages. For the test, I created an entry with the java tag, but I'm not sure how convenient it will be to separate categories by programming languages ​​in tags.

Service Address

Thanks for attention.

Source: https://habr.com/ru/post/173349/


All Articles