📜 ⬆️ ⬇️

Pintask - programmable task tracker

Salute, Habr!

According to statistics, the new task tracker appears every 2 weeks. “But mine can make cappuccino!” The developer will tell you. “And other trackers make tea of ​​the same quality as the conductor of the Moscow-Gelendzhik train, or they brew only Kopi Lyuvak.” So, if you could cut the tap so that a cappuccino would flow from it, would you not write a new task tracker? "Well, of course! Just cappuccino is my favorite drink ... ”

About what is common between coffee makers and Optimus Prime, why do we need a programmable task tracker and how to tap the tap - read under the cut.

')
image Back in 1969, the situation with microcircuits looked about the same as the current situation with trackers. Want to release a calculator? Type your chip. Do you want to release the calculator with the multiplication function by 1000 (for Brazilian accountants)? Print another chip. It was this logic that guided the Japanese, who ordered Intel as many as 12 chips for their calculators. Established rock star of the company, Ted Hoff, took an expert look at the drawings and suggested refactoring. Then, as befits a rock star, he skipped the process itself, commissioning the realization of Federico Faggin’s idea. Management successfully scored on the project, because at that moment a very different direction was fiercely developing, and it was possible to make money on Bentley. This greatly accelerated the development, and already in 1971, the programmers of electrical engineering finished the tests and rolled out the production and launched it into the series. Intel with fanfare fulfilled the order of the Japanese and on the sly opened up a new line of business. After a few years, the microprocessor market suddenly became so profitable that they earned money on Bentley there.

Fast forward to our time, where the world is ruled by a passion for coffee and every day there are new task trackers. The situation itself is asking for refactoring . It seems logical to write such a tracker, in which you can “cut through any tap”, unscrew or, conversely, tighten each nut more firmly, replace the thermostat and put the steam regulator in order to finally cook your favorite drink. Such a programmable tracker is Pintask .

Some plumbing


IF it is fair, the appearance of the microprocessor was theoretically possible in the early 1960s, when integrated circuits began to be mass produced. However, any young electrical engineer on this path was trapped by technological obstacles of the 80th level. Federico Faggin knew about them firsthand. But he also received his doctoral degree in physics not in the Moscow metro station, but at Padua University. Therefore, in 1968, Federico created the first silicon-based field-effect transistor, which worked faster than others, bipolar, but also took up less space, cost less, saved electricity. Now it was possible not to turn off the light in the toilet, not to worry about the optimality of microcircuits: calculators on microprocessors were added and multiplied faster than their predecessors simply because they worked on field-effect transistors. Well, the price tag on them was lower, which is very, very noticeable when purchasing devices for all Brazilian accounting.

For an assessment of the situation, we turn to the global expert on innovation:
- Mr. Ford, how do you think, will the microprocessor technology develop further, or will the manufacturers of bipolar transistors find a way to turn back the clock?
“I am convinced that innovations at a lower level can change the existing industry. In my opinion, we are talking about this.
- Thank you very much for the comment. And now to the news from the world of science. Astronomers report an unusual cosmic background ...

Pintask is written in Meteor . This framework is already among the most popular repositories on Github in the JavaScript weight category - and this is before the official release (current version: 0.8). Only one announcement on Hacker News gathered 1362 votes. Excerpts from the comments: “It's like the industrial revolution”, “I can't upvote this enough” - well, you understand. Even having eaten half a pack of skepticin, we can safely say that Meteor is opening a new page in web development. Moreover, the HTML code on this page is “live”: receiving new data from the server leads to automatic updating of the template, you do not need to monitor this. Oh yeah, and forget about Ajax requests: changing data is done through the full MongoDB API in JavaScript, available directly in the browser. As a result, 90% of the calculations are performed on the client. The code on Meteor takes up less space, has less space, costs less to write faster, saves energy, and reduces the amount of data transferred. Marty, did you play with plutonium again?

Let's see what happens. Access to the database is right in the browser, this time. Templates are also in the browser, these are two. Everything works on JS + HTML, that's three. And what if you give the user the opportunity to connect their scripts ? After all, with their help, you can hang the listeners, and redefine the templates, and write the data ... and tap the tap. And tighten the nuts. And put the thermostat.

All cappuccino


Pintask is the first task tracker written on Meteor. And the first task tracker that can load your extensions right in the browser, giving them full access to the database API and templates.

Here is an example of one such extension:

if !Cards throw "Hey, where are my Cards?" if !Comments throw "Look, I need those Comments, too!" Comments.after.insert (userId, comment) -> cardId = comment.cardId card = Cards.findOne(cardId) if userId not in card.memberIds Cards.update(cardId, {$addToSet: {memberIds: userId}}) 


Recently, I have become addicted to CoffeeScript ... not the mainstream, of course, but development speeds up.

This uncomplicated automation can be assembled-disassembled blindfolded. At the beginning, a couple of checks in case of a nuclear war are noticeable (if our script is called to another site). Then there is the installation of a time mine that triggers when a comment is inserted. In case the comer is not a member of the card, he is thrown there by the shock wave.

Want to look at working with templates? I have them . Here jQuery is involved, at first glance, the code resembles an Italian dish. But if you begin to absorb it from the bottom, the taste will open more harmoniously, and then ... "Waiter, repeat!"

We should also mention the connection of external data sources. White Magic allows you to create tasks from the Google Spreadsheet rows. A black magic with the involvement of otherworldly API gives you the opportunity to call Github Issues directly in Pintask and arrange a bidirectional communication session between the comments of the internal and external tracker. All this happens through the MongoDB collections. In fact, such an extension is a separate application that loads data into Pintask using a special script.

Behind the bar


By the way, you can connect your own extension through the same Github. In the simplest case, it is enough to publish the repository on Github Pages, take a direct link to the js-file and paste into Pintask. It turns out dry and comfortable (and updated when a commit is received).
And if you need to connect the whole application with your blackjack, you can put it on a free hosting from the same Meteor, and insert a link to it.

For the user, everything looks even easier. Just go to the extension store , select the desired, press the magic button - and with a flick of your wrist the coffee maker turns into Optimus Prime.

Since programmers are generous people, it's safe to say that most applications will be free. But if the toad still suffocates, or more wood is needed (bulk file storage, SMS gateway), then an application can be made to the user, which he cannot refuse. We earn it ourselves.

Check your watch


ABOUT! Here it is, a paid application: Time tracking on autopilot . Everyone knows how difficult time-tracking is for programmers. After wandering through the convolutions of our mind, you can find a similar internal dialogue:

- Hey, consciousness! Let's think about integration with Yandex.Market.
- Wait, wait ... Did you remember to press the "start" button?
- Oh, right. Here, clicked.
- Well done. So what did you say about Bitcoin?
- What is bitcoin? I talked about Yandex.Market.
- Oh, yes ... wait, did you press the "start" button of the previous task?
- Seems to be yes. Or not. I'll check now.
- Let's check. And here I will decompose solitaire.

In order not to go to a psychoanalyst, we decided to change the usual mechanism for time tracking and abandoned the "Start" button. Instead, we put the icon "Enable time accounting" in the header of each list. Time-tracking starts automatically at the entrance to the system and starts tracking the first task in the marked list. When a task is archived or transferred to another list, time-tracking switches to the next task on the principle of the clip. As a result, the programmer does not even think about time tracking. He just does his job, and the system automatically fixes time intervals.

The technical implementation uses standard Meteor mechanisms and a user-status package for monitoring activity. Already familiar listeners on MongoDB collections allow you to define the task being tracked. The code does not use setTimeout (holy, holy), only events. As a result, even the server restart is not capable of disrupting the course of history.

Want to get accurate reports? Come in, don't be shy .

For dessert


How much is the base platform? Pintask is completely free. We have no functional restrictions, no ads, no subscription fees. But there is an open wiki , bona fide support and sheep in the background.

And finally: Pintask wants to become a complete replacement for Trello (drop-replacement). All the basic functions of the overseas service are already implemented. There is an instant import from Trello . We are also going to do bidirectional synchronization to provide access to Pintask through Trello mobile apps (before we make our own).

In the next articles, we plan to talk about the product development process and the nuances of using the internal API. Now there will be a curtain, and whether you should go for an encore is up to you.

Final link: Pintask , programmable task tracker.

The article was published by me at the request of Denis Gorbachev ( starfall ), the whole text is completely authorial.

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


All Articles