How to force Drupal users into answering a poll

Here, the poll is hardcoded at node/38566 and the patch applies to index.php in the root of Drupal installation.

Tested on Drupal 6.14, but shall work on many other versions as well.

--- index-original.php      2007-12-26 09:46:48.000000000 +0100
+++ index.php   2009-11-23 16:12:11.000000000 +0100
@@ -33,6 +33,12 @@
 }
 elseif (isset($return)) {
   // Print any value (including an empty string) except NULL or undefined:
+  global $user;
+  $result = db_fetch_object(db_query('SELECT nid FROM {poll_votes} WHERE nid = 38566 AND uid = %d', $user->uid));
+  if ($user->uid > 0 && !$result && $_GET['q'] != 'node/38566') {
+    drupal_goto('node/38566', NULL, NULL, 301);
+  }
+
   print theme('page', $return);
 }
Tags: 

The dual role of the middle management (do not underestimate the art of manipulating the boss)

There are three types of positions in an organizational hierarchy:

  • Top management, the decision makers;
  • middle management, those who detail and implement top management strategies, communicating execution plans to the people who do the real work that is,
  • employees and workers.

Note that only the middle managers communicate both with the top management and with the employees and workers. In a traditional enterprise, the communication is oriented top-down, with middle management only detailing and passing on the orders.

In IT, as probably in the other hi-tech industries, bottom-up communication is of a paramount importance as the problems arrive unexpected and are sometimes not only difficult to overcome, but even difficult to explain. However, managers are still evaluated mostly on their abilities to manage subordinates, not on the ability to channel information to the top management, guiding and orienting corporate decision-making.

My brief manager's career ended partly because my company could not avoid the usual problems of software development, the problems that I knew about, could forecast, but was unable to mitigate as they arrived, mostly because I could not guide the much less knowledgeable boss through the minefield of decision-making without hurting his ego.

A manager that can not influence the decisions of the boss is only a half-manager, I now see clearly which half I was. Being aware of this handicap in advance could have helped me. Reading this post and applying it to your situation will probably help you.

Осадочек остался ©

Был я сегодня на бизнес-тусовке в одной из брюссельских дискотек, взял бутылочку пива, послушал презентации бельгийских веб-стартапов. Все идеи вторичные. Сами посмотрите:

  • Getyoo производит очередную электронную USB/Bluetooth визитную карту за 27 евро штука
  • Spezzle кастомизирует Друпал
  • WonderGraphs хотять отъесть свой кусок пирога у Excel, рисуя торты и небоскрёбы в броузере
  • Babelway = Microsoft Biztalk as a Service
  • Symbioz — прога для мобилок с GPS для отслеживания перемещений в пространстве

Я не удержался, задал каверзный вопрос Babelway, получил удовольствие, хотя ответ был далёк от совершенства. Потом завязал серьёзный разговор с неким бизнесменом, который одновременно активист партии ProBruxsel. Миллиона на три разговор, между прочим, за мной средних размеров компания, готовая эти миллионы успешно освоить. И тут он мне заявляет, что у меня изо рта плохо пахнет. Я разговор быстро свернул, но задумался:

  • А как должно пахнуть изо рта после приёма бутылочки пива?
  • Как можно быть политиком и таким бесцеремонным человеком?
Tags: 

Business intelligence for dummies

Want to know what BI is but were always afraid to ask?

Here is a use case that covers 90% of Business Intelligence software use in the real world.

Imagine an Excel table containing banking transactions that you exported from your online banking system.

Once they are exported, you may be tempted to construct pivot tables, to view e.g.

  • The bank accounts you credited for the last 12 months;
  • the ratio between credit and debit by month;
  • the expenses from your banking cards compared to those of your wife.

All of these pivot tables will be constructed for you in a matter of seconds, or even milliseconds.

Unfortunately, the construction of pivot tables does not scale up. A bank manager trying to construct a pivot table to identify the most debiting accounts or to identify the accounts performing most of transactions over a month is likely to wait many hours until his pivot tables are calculated. This is because the amount of transactions he is analyzing is likely to be in the hundreds of thousands, and more. He will also try to lump together much more information by adding columns with addresses, information on insurance policies of account holders, etc, thus growing the table to tens, sometimes even hundreds of columns, aggravating the performance issue.

Tags: 

Почему я не люблю Микрософт?

Микрософт мне не нравится прежде всего тем, что популяризировала ненавистные многим методы работы.

Следуя примеру Микрософт, индустрия ПО, которая по сути является индустрией услуг, стала вдруг индустрией продуктов, а типичный цикл разработки ПО превратился из многолетней совместной работы специалистов над разработкой и поддержкой ПО для конкретных потребителей в годичный аттракцион «слабай-продай-свали».

Нежелание женщин заниматься этой профессией, массовый исход программистов в смежные специальности после 30-40 лет, дауншифтинг, развитие малого бизнеса в IT — это во многом отголоски негативного влияния Микрософт.

ЗЫ: Изначально этот пост был комментарием на Хабре.

An executive summary on the state of art in Coreference Resolution

It is done using machine learning lately and has been oriented for a few years towards two competions: MUC and ACE. The quality of the Coreference Resolution is still fairly poor in the general case, although some special cases, e.g. pronoun resolution have been resolved with good results. There's a number of tools available for Coreference Resolution, including an implementation inside OpenNLP

Executive summary on the state of the art in Semantic Role Labelling

This is a follow-up to the T3: Semantic Role Labeling: Past, Present and Future tutorial by Lluís Màrquez.

A lenient evaluation of the state-of-the-art F1 in Semantic Role Labelling is around 80%, but the quality degrades by ~10% when switching to a test set from a new knowledge domain.

The most promising approach is the construction of a joint system of syntactic and semantic labeling parsers that operate in parallel on the same stream of input tokens.

The field is plagues by the complexity and low performance of the tools.

Какой будет Беларусь лет через тридцать правления Лукашенко?

Не знаете? Съездите в Сингапур, полюбуйтесь.

Объясняю по порядку. Общего у обеих стран много. Формальная демократия, на деле — авторитарный режим. С 1959 по 1990 год страной правил Ли Куан Ю, теперь — его сын. Экономика цветёт на высокотехнологичных производствах. Повсюду понатыканы многоэтажные торговые центры, при том, что на улице не встретишь ни одного лоточника. По вечерам в центре гуляет много красиво одетого народа, подавляющее большинство — титульной нации. Покупают мало, но выглядят счастливо. Трезвость почти стопроцентная. Планировка улиц в общих чертах повторяет Минск, только дома повыше и покрасивше. Как и в Минске, пешеходные переходы устроены не там, где удобно переходить, а там, где запланировали, так что через дорогу местные бегают совсем как беларусы, несмотря на огромные штрафы.


Pages