Записки программиста, обо всем и ни о чем. Но, наверное, больше профессионального.


First-ever IIHS headlight ratings

IIHS – Insurance Institute for Highway Safety
провел тесты фар автомобилей.
Автомобили новые, фары – муха не еблась.
По результатам тестов выяснилось – все плохо.
Даже на нулевой тачке ночью нельзя ехать быстрее 70 кмч.

The ability to see the road ahead, along with any pedestrians, bicyclists or obstacles, is an obvious essential for drivers. However, government standards for headlights, based on laboratory tests, allow huge variation in the amount of illumination that headlights provide in actual on-road driving. With about half of traffic deaths occurring either in the dark or in dawn or dusk conditions, improved headlights have the potential to bring about substantial reductions in fatalities.

Recent advances in headlight technology make it a good time to focus on the issue. In many vehicles, high-intensity discharge (HID) or LED lamps have replaced halogen ones. Curve-adaptive headlights, which swivel according to steering input, are also becoming more widespread.

Research has shown advantages for the new headlight types, but they don't guarantee good performance. The Institute's headlight rating system doesn't favor one lighting technology over the other, but simply rewards systems that produce ample illumination without excessive glare for drivers of oncoming vehicles.

Обычная оптика Honda Accord, наоборот, получила приемлемый рейтинг, а ее светодиодные фары показали худший результат. Худший галогеновый свет, по мнению испытателей из IIHS, у BMW 3-Series, он не позволяет ехать ночью быстрее 60 километров в час

original post http://vasnake.blogspot.com/2016/03/first-ever-iihs-headlight-ratings.html


FPP in Scala, assignments

Вот тут
я начал выкладывать материал про Scala.

Задачки к курсу
Functional Programming Principles in Scala
Мартин Одерски (Martin Odersky), автор Scala.


Functional Programming Principles in Scala

Вот тут
я начал выкладывать материал про Scala.

Functional Programming Principles in Scala
Мартин Одерски (Martin Odersky), автор Scala.


Structure and Interpretation of Computer Programs

From MIT Electrical Engineering and Computer Science
Structure and Interpretation of Computer Programs, Second Edition
By Harold Abelson and Gerald Jay Sussman
With Julie Sussman

Lisp itself can be assigned a semantics (another model, by the way),
and if a program's function can be specified, say, in the predicate calculus,
the proof methods of logic can be used to make an acceptable correctness argument.
Unfortunately, as programs get large and complicated, as they almost always do,
the adequacy, consistency, and correctness of the specifications themselves become
open to doubt, so that complete formal arguments of correctness seldom accompany large programs.
Since large programs grow from small ones, it is crucial that we develop an
arsenal of standard program structures of whose correctness we have become sure --
we call them idioms -- and learn to combine them into larger structures
using organizational techniques of proven value.
These techniques are treated at length in this book, and understanding them is essential
to participation in the Promethean enterprise called programming.
More than anything else, the uncovering and mastery of powerful organizational techniques
accelerates our ability to create large, significant programs.
Conversely, since writing large programs is very taxing,
we are stimulated to invent new methods of reducing the mass of function and detail
to be fitted into large programs.

Бунша (шепчет дьяку). Послушайте, товарищ! Товарищ, можно Вас на минуточку? Хотелось бы, так сказать, в общих чертах понять ... 

Да понять его немудрено: большие программы строятся из маленьких, поэтому надо оттачивать умение компоновать большое из малого, рассчитывая на то, что строительные блоки стандартны и проверены.
Хороший инженер обязан владеть всем арсеналом строительных блоков.

original post http://vasnake.blogspot.com/2016/03/structure-and-interpretation-of.html


Why “Agile” and especially Scrum are terrible, by Michael O. Church

In general, people tend to create two types of jobs, whether inside a company or as clients when off-loading work. At the high end, they hire for expertise that they don’t have. At the low end, they dump all the stuff they don’t want to do. It’s probably obvious that one class of consultant gets respect and the other doesn’t. Mismanaged consulting firms often end up becoming garbage disposals for the low end work. Scrum seems to be tailored toward the body shops, where client relationships are so mismanaged that the engineers have to be watched on a daily basis, because they’ve become a dumping ground for career-incoherent work that no one wants to do (and that probably isn’t very important, hence the low rate and respect).

Хорошо написано, легко читается. Особых откровений не содержит, но толково разъясняет, почему оружие в руках идиота – зло.

В принципе, разумным людям достаточно знать, что любая методология разработки это просто инструмент.
И как любой инструмент, применять его надо по месту и вовремя.
Если вы это понимаете, статью можно не читать.


Algorithms, Part I. Princeton University, Robert Sedgewick

Еще шесть недель обучения прошло.
Одолел один из обязательных курсов по программированию:
Algorithms, Part I. Princeton University, Robert Sedgewick

Как сказано в эпиграфе
essential information that
every serious programmer
needs to know about
algorithms and data structures

За 6 недель изучены материалы 3-х глав:

Chapter 1: Fundamentals introduces a scientific and engineering basis for comparing algorithms and making predictions. It also includes our programming model.
Chapter 2: Sorting considers several classic sorting algorithms, including insertion sort, mergesort, and quicksort. It also includes a binary heap implementation of a priority queue.
Chapter 3: Searching describes several classic symbol table implementations, including binary search trees, red-black trees, and hash tables.

А именно:

Week 1

Lecture: Union-Find.
We illustrate our basic approach to developing and analyzing algorithms by considering the dynamic connectivity problem.
We introduce the union-find data type and consider several implementations
(quick find, quick union, weighted quick union, and weighted quick union with path compression).
Finally, we apply the union-find data type to the percolation problem from physical chemistry.

Lecture: Analysis of Algorithms.
The basis of our approach for analyzing the performance of algorithms is the scientific method.
We begin by performing computational experiments to measure the running times of our programs.
We use these measurements to develop hypotheses about performance.
Next, we create mathematical models to explain their behavior. Prove model by experiment.
Finally, we consider analyzing the memory usage of our Java programs

Week 2

Lecture: Stacks and Queues.
We consider two fundamental data types for storing collections of objects: the stack and the queue.
We implement each using either a singly-linked list or a resizing array.
We introduce two advanced Java features—generics and iterators—that simplify client code.
Finally, we consider various applications of stacks and queues ranging from
parsing arithmetic expressions to simulating queueing systems.

Lecture: Elementary Sorts.
We introduce the sorting problem and Java's Comparable interface.
We study two elementary sorting methods (selection sort and insertion sort) and a variation of one of them (shellsort).
We also consider two algorithms for uniformly shuffling an array.
We conclude with an application of sorting to computing the convex hull via the Graham scan algorithm.

Week 3

Lecture: Mergesort.
We study the mergesort algorithm and show that it guarantees to sort any array of N items with at most NlgN compares.
We also consider a nonrecursive, bottom-up version.
We prove that any compare-based sorting algorithm must make at least ∼NlgN compares in the worst case.
We discuss using different orderings for the objects that we are sorting and the related concept of stability.

Lecture: Quicksort.
We introduce and implement the randomized quicksort algorithm and analyze its performance.
We also consider randomized quickselect, a quicksort variant which finds the kth smallest item in linear time.
Finally, consider 3-way quicksort, a variant of quicksort that works especially well in the presence of duplicate keys.

Week 4

Lecture: Priority Queues.
We introduce the priority queue data type and an efficient implementation using the binary heap data structure.
This implementation also leads to an efficient sorting algorithm known as heapsort.
We conclude with an applications of priority queues where we simulate
the motion of N particles subject to the laws of elastic collision.

Lecture: Elementary Symbol Tables.
We define an API for symbol tables (also known as associative arrays)
and describe two elementary implementations using a sorted array (binary search) and an
unordered list (sequential search).
When the keys are Comparable, we define an extended API that includes the additional methods
min, max, floor, ceiling, rank, and select.
To develop an efficient implementation of this API, we study the binary search tree data structure and analyze its performance.

Week 5

Lecture: Balanced Search Trees.
In this lecture, our goal is to develop a symbol table with guaranteed logarithmic performance
for search and insert (and many other operations).
We begin with 2-3 trees, which are easy to analyze but hard to implement.
Next, we consider red-black binary search trees, which we view as a novel way to implement 2-3 trees as binary search trees.
Finally, we introduce B-trees, a generalization of 2-3 trees that are widely used to implement file systems.

Lecture: Geometric Applications of BSTs.
We start with 1d and 2d range searching, where the goal is to find all points in a given 1d or 2d interval.
To accomplish this, we consider kd-trees, a natural generalization of BSTs when the keys are points in the plane (or higher dimensions).
We also consider intersection problems, where the goal is to find all intersections among a set of line segments or rectangles.

Week 6

Lecture: Hash Tables.
We begin by describing the desirable properties of hash function and how to implement them in Java,
including a fundamental tenet known as the uniform hashing assumption that underlies the potential success of a hashing application.
Then, we consider two strategies for implementing hash tables—separate chaining and linear probing.
Both strategies yield constant-time performance for search and insert under the uniform hashing assumption.
We conclude with applications of symbol tables including
sets, dictionary clients, indexing clients, and sparse vectors.



Go game and AI

Go is a two-player game of strategy said to have originated in China 3,000 years ago.
Players compete to win more territory by placing black and white “stones” on a grid measuring 19 squares by 19 squares.
The play is more complex than chess, with a far greater possible sequence of moves,
and requires superlative instincts and evaluation skills. Because of that, many researchers believed
that mastery of the game by a computer was still a decade away

Тем не менее, 9 марта 2016 года, самый могучий игрок в Го продул гуглевому изделию, названному AlphaGo.
Счет 1:0 в пользу роботов, всего собрались играть 5 партий.

A Google computer program stunned one of the world’s top players on Wednesday in a round of Go, which is believed to be the most complex board game ever created.
The match — between Google DeepMind’s AlphaGo and the South Korean Go master Lee Se-dol —was viewed as an important test of how far research into artificial intelligence has come in its quest to create machines smarter than humans.
I am very surprised because I have never thought I would lose,” Mr. Lee said at a news conference in Seoul, South Korea. “I didn’t know that AlphaGo would play such a perfect Go.”

Мне в целом понятно, как оно работает.
Только любопытно, сколько процессоров-оперативки-диска используется?

Датацентр? Кластер в комнате? Персоналка?  

original post http://vasnake.blogspot.com/2016/03/go-game-and-ai.html

Архив блога


linux (241) python (191) citation (186) web-develop (170) gov.ru (159) video (124) бытовуха (114) sysadm (100) GIS (97) Zope(Plone) (88) бурчалки (84) Book (82) programming (82) грабли (77) development (73) Fun (72) windsurfing (72) Microsoft (64) hiload (62) opensource (58) internet provider (57) security (57) опыт (55) movie (52) Wisdom (51) ML (47) hardware (45) language (45) money (42) JS (41) driving (41) curse (40) bigdata (39) DBMS (38) ArcGIS (34) history (31) PDA (30) howto (30) holyday (29) Google (27) Oracle (27) tourism (27) virtbox (27) health (26) vacation (24) AI (23) Autodesk (23) SQL (23) Java (22) humor (22) knowledge (22) translate (20) CSS (19) cheatsheet (19) hack (19) Apache (16) Manager (15) web-browser (15) Никонов (15) functional programming (14) happiness (14) music (14) todo (14) PHP (13) course (13) scala (13) weapon (13) HTTP. Apache (12) SSH (12) frameworks (12) hero (12) im (12) settings (12) HTML (11) SciTE (11) USA (11) crypto (11) game (11) map (11) HTTPD (9) ODF (9) купи/продай (9) Photo (8) benchmark (8) documentation (8) 3D (7) CS (7) DNS (7) NoSQL (7) cloud (7) django (7) gun (7) matroska (7) telephony (7) Microsoft Office (6) VCS (6) bluetooth (6) pidgin (6) proxy (6) Donald Knuth (5) ETL (5) NVIDIA (5) REST (5) bash (5) flash (5) keyboard (5) price (5) samba (5) CGI (4) LISP (4) RoR (4) cache (4) display (4) holywar (4) nginx (4) pistol (4) spark (4) xml (4) Лебедев (4) IDE (3) IE8 (3) J2EE (3) NTFS (3) RDP (3) holiday (3) mount (3) Гоблин (3) кухня (3) урюк (3) AMQP (2) ERP (2) IE7 (2) NAS (2) Naudoc (2) PDF (2) address (2) air (2) british (2) coffee (2) font (2) ftp (2) messaging (2) notify (2) sharepoint (2) ssl/tls (2) stardict (2) tests (2) tunnel (2) udev (2) APT (1) CRUD (1) Canyonlands (1) Cyprus (1) DVDShrink (1) Jabber (1) K9Copy (1) Matlab (1) Palanga (1) Portugal (1) VBA (1) WD My Book (1) autoit (1) bike (1) cannabis (1) chat (1) concurrent (1) dbf (1) ext4 (1) idioten (1) join (1) krusader (1) license (1) mindmap (1) navitel (1) pneumatic weapon (1) quiz (1) regexp (1) robot (1) science (1) serialization (1) spatial (1) tie (1) vim (1) Науру (1) крысы (1) налоги (1) пианино (1)