metaclass: (Default)
metaclass ([personal profile] metaclass) wrote2012-01-31 12:31 pm

Special Enterprise Programming Olympics

[livejournal.com profile] theiced и [livejournal.com profile] skif_by и [livejournal.com profile] artureg решили устроить соревнование на тему "какой язык программирования более адекватен в руках профессионала" и попросили придумать им задание. Поскольку синтетические задания с результатом в виде консольных утилит это скучно, а они все умеют веб хорошо, я им придумал задачку с не сильно сложным веб-приложением. Условие под катом:

Special Enterprise Programming Olympics

Problem 1:

You need to implement universal web-based application for report generation.

Application consists of:
* Database. You can use any relational DBMS you like, but you should have in mind ease of linux deployment.
* Web application deployed to your favorite web-server, app-server, whatever.
* Client-side JavaScript application working in modern browsers (>=IE7,Firefox>=5,Chrome)

* Web application must have report configuration file which contains:
** Unique system report id. Any string
** User-friendly name of report. For report titles and page headers.
** SQL query for report generation. SQL query is arbitrary and should contain parameters. SQL query will be in native format of used RDBMS.
** Query parameter description list.
Each parameter description contains parameter name, user-friendly caption,type,
output format and default value.
If you can infer parameter list from SQL query then this information is optional and
parameter list can be generated automatically.

** Query result field list. Field description should contain name, user-friendly name,
visibility flag(visible/not visible) and output format.
Field descriptions are optional - without description report should contain field
with default(returned from query) name and default output format.

* Types allowed for query parameters: integer,double,date,datetime,string,bool,decimal (money)

* Default values allowed for date or datetime parameters:
** Culture-invariant (!) string representation of any date or datetime
** If default value is prefixed with “@” then default parameter value is calculated as follows:
** @now - today (date) or current time(datetime)
** @prevmonthbeg - beginning of previous month
** @prevmonthend - end of previous month. Beware of difference in date and datetime (last day of month is 30/31, but last datetime of month is <00:00:00 01-of-nextmonth)
** @currmonthbeg - beginning of current month
** @currmonthend - end of current month
** @prevyearbeg - beginning of previous year
** @prevyearend - end of previous year
** @curryearbeg - beginning of current year
** @curryearend - end of current year

* Report configuration file will be edited once in a while based on
customers (report end-user) requirements.

Errors in configuration file format or in queries should be processed with
displaying of user-friendly error messages in client application and
error logging on server.


* Client application must show report list in any usable way(list of links, menu, tree, etc)
* Click on report must open report page which consists of:
** Report header (user-friendly report name)
** Report parameters table with user-friendly labels and editable parameters.
** "Refresh Report" button
** Report result table which is populated after click on "Refresh Report" button
or after Enter key press in any of parameter's edit controls.

* Paging or lazy result loading is not usually needed - most reports contains no more than 5 pages of data.

* When printing, report should follow the same structure as page, except for "Refresh" button.

* Report data is desirable to return in json or xml format, so it will be possible to
use wget/curl/any http client application to connect to server and get report data.


* Problem solution must contain:
** Deployment package for linux (any distro you like, but Ubuntu 10.04 LTS is preferred ). Also any deployment/configuration management system can be used.
** Deployment instructions.

Configuration file example: http://www.cacodaemon.org/content/so/ReportConfig.xml

Времени им - вообще до понедельника, но я бы добавил еще несколько дней на доработки по результатам.

[identity profile] bydl0coder.livejournal.com 2012-01-31 09:06 pm (UTC)(link)
Айсед победит, даже не интересно. На жабе - дикий ад говна, на похапэ - просто ад говна, на руби - православный код, по максимуму использующий стандартные средства. Я б на хаскельную или эфшарп версию посмотрел.
Edited 2012-01-31 21:11 (UTC)

[identity profile] veter-r-r.livejournal.com 2012-01-31 10:37 pm (UTC)(link)
На жабе оно даже не соберется, потому что захочет стянуть стопиццот библиотек с сервера, лицензию которого как раз на день раньше отберет оракл.

[identity profile] wildman.livejournal.com 2012-02-01 01:02 pm (UTC)(link)
инфраструктура проекта на gradle/maven делается за полчаса-час.
а потом взлетает платформонезависимо. при желании вообще не используя ресурсы операционки
у мя сча на работе какое. правда осложнено тем что в проекте есть j2me, iphone, android и blackberry клиенты + 2 веб прилаги. пришлось сильно поковыряться чтобы заставить это работать без привязки к платформе

[identity profile] bydl0coder.livejournal.com 2012-02-01 06:38 pm (UTC)(link)
>инфраструктура проекта на gradle/maven делается за полчаса-час.
"Вот за это нас и не любят". Приложение на рельсах деплоится в один клик из коробки.

[identity profile] wildman.livejournal.com 2012-02-01 06:48 pm (UTC)(link)
а что для этого надо впереть в систему? и сколько времени займёт установка рельсов?

у меня проект собирается на ГОЛОЙ СИСТЕМЕ:
0. скачиваю android-sdk, wtk, jdk в любую локальную директорию
1. git pull
2. правлю руками в custom.properties пути к android-sdk, wtk, jdk
3. gradle dist-package startServer
всё.
при этом получаю *.apk для андройда, *.jar|jad для j2me, собранные клиенты для blackbery и ios + *.war для всех веб приложений в директории dist и запущенный tomcat с приложениями
для запуска на боевом сервере надо только подкинуть war в нужное место.
linux или windows вносят изменения только в пункт 0. берутся другие архивы.

а теперь раскажите мне минимальные телодвижения для запуска рельсовой апликухи?

[identity profile] wildman.livejournal.com 2012-02-01 08:41 pm (UTC)(link)
~ $ cap deploy
bash: cap: команда не найдена

с удовольствием погляжу на тот мануал который вы отсылаете заказчику

(no subject)

[identity profile] bydl0coder.livejournal.com - 2012-02-01 20:53 (UTC) - Expand

(no subject)

[identity profile] wildman.livejournal.com - 2012-02-01 21:12 (UTC) - Expand

(no subject)

[personal profile] develop7 - 2012-02-01 21:23 (UTC) - Expand

(no subject)

[identity profile] wildman.livejournal.com - 2012-02-01 21:31 (UTC) - Expand

(no subject)

[identity profile] permea-kra.livejournal.com - 2012-02-01 21:41 (UTC) - Expand

(no subject)

[identity profile] wildman.livejournal.com - 2012-02-01 21:46 (UTC) - Expand

(no subject)

[identity profile] bydl0coder.livejournal.com - 2012-02-01 22:08 (UTC) - Expand

(no subject)

[identity profile] wildman.livejournal.com - 2012-02-01 22:17 (UTC) - Expand

(no subject)

[identity profile] nealar.livejournal.com - 2012-02-02 05:52 (UTC) - Expand

(no subject)

[identity profile] metaclass.livejournal.com - 2012-02-02 06:33 (UTC) - Expand

(no subject)

[identity profile] bydl0coder.livejournal.com - 2012-02-01 21:50 (UTC) - Expand

(no subject)

[identity profile] wildman.livejournal.com - 2012-02-01 21:58 (UTC) - Expand

(no subject)

[identity profile] bydl0coder.livejournal.com - 2012-02-01 22:05 (UTC) - Expand

(no subject)

[identity profile] metaclass.livejournal.com - 2012-02-02 06:32 (UTC) - Expand

(no subject)

[identity profile] metaclass.livejournal.com - 2012-02-02 06:32 (UTC) - Expand

[identity profile] metaclass.livejournal.com 2012-02-02 06:30 am (UTC)(link)
0. Установить все, что нужно для запуска cap (что это за НЕХ кстати, потому как айсед активно rvm некий форсит?)

(no subject)

[identity profile] bydl0coder.livejournal.com - 2012-02-02 07:16 (UTC) - Expand

(no subject)

[identity profile] metaclass.livejournal.com - 2012-02-02 07:25 (UTC) - Expand

(no subject)

[personal profile] develop7 - 2012-02-02 07:32 (UTC) - Expand

[identity profile] vp.livejournal.com 2012-02-01 07:58 pm (UTC)(link)
Класс!!!
develop7: (Default)

[personal profile] develop7 2012-02-01 09:31 pm (UTC)(link)
на голой системе поднять проект можно так:

5 (+поставить из репозиториев компилятор и хедеры) команд из https://rvm.beginrescueend.com/rvm/install/
вытащить исходники проекта из VCS
сказать bundle install
запустить сервер: rails server

делается не приходя в сознание. и это ещё не прибегая к vagrant.

(no subject)

[identity profile] wildman.livejournal.com - 2012-02-01 21:56 (UTC) - Expand

(no subject)

[personal profile] develop7 - 2012-02-02 07:22 (UTC) - Expand

[identity profile] sergiej.livejournal.com 2012-02-01 08:22 am (UTC)(link)
+100 задача на 80% под руби, с мелкими вкраплениями подлянок

[identity profile] artureg.livejournal.com 2012-02-01 02:14 pm (UTC)(link)
Андрюша, перелогинься.

[identity profile] bydl0coder.livejournal.com 2012-02-01 06:40 pm (UTC)(link)
Да очевидно, что создание формочек в рантайме гораздо удобней делать на динамическом языке с удобным метапрограммированием. Ява точно на последнем месте окажется.

[identity profile] artureg.livejournal.com 2012-02-01 06:41 pm (UTC)(link)
я не знаю что такое ява

[identity profile] artureg.livejournal.com 2012-02-01 06:59 pm (UTC)(link)
не понимаю о чём речь

[identity profile] berezovsky.livejournal.com 2012-01-31 09:49 pm (UTC)(link)
взялись бы все вместе сделали полезное что-нибудь
столько удобного софта не хватает

[identity profile] veter-r-r.livejournal.com 2012-01-31 10:36 pm (UTC)(link)
Прекрасно! С нетерпением ждем результатов!

[identity profile] maholet.livejournal.com 2012-02-01 12:20 am (UTC)(link)
Ой блять, куда я попал... Трагедия в фа-диез-минор...
Edited 2012-02-01 00:21 (UTC)

[identity profile] kometa-zxc.livejournal.com 2012-02-01 06:48 am (UTC)(link)
В добавок к заданию, ну или вторым этапом я бы попросила сделать то же но на незнакомом языке :) Например заставить [livejournal.com profile] theiced реализовать все то же на жабе, ну или [livejournal.com profile] artureg на рельсах. Забавно было бы :) Тут бы и выснилось какая технология более вменяема.

[identity profile] go-bender.livejournal.com 2012-02-01 02:55 pm (UTC)(link)
Да-да! А потом всем вместе хором и на brainfuck-е!

[identity profile] nealar.livejournal.com 2012-02-01 04:51 pm (UTC)(link)
Если это ынтырпрайс, то где же участник на САПе?

[identity profile] go-bender.livejournal.com 2012-02-01 08:48 pm (UTC)(link)
Ты наш ABAP не трож! Он наше ффсе!

[identity profile] bydl0coder.livejournal.com 2012-02-01 10:12 pm (UTC)(link)
Его даже на специальную олимпиаду не взяли.

(Anonymous) 2012-02-02 04:27 pm (UTC)(link)
А зачем раздувать тупые и бессмысленные холиворы в стиле школота и ее убеждения? Каждый язык и технология проявляются по разному в зависимости от задачи и конкретного специалиста. Хотя фанатиков шизоидов определенного языка обычно не вразумить ничем, так зачем же поощрять...

Page 2 of 2