<?xml version="1.0" encoding="UTF-8" standalone="no"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:georss="http://www.georss.org/georss" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-7705869048643923027</atom:id><lastBuildDate>Fri, 30 Aug 2024 06:50:01 +0000</lastBuildDate><category>java</category><category>book review</category><category>websphere portal 7</category><category>web service</category><category>ant</category><category>centos</category><category>docker</category><category>spring web service 2.1.0</category><category>Apache CXF</category><category>DB2</category><category>javascript</category><category>Java 8</category><category>spring</category><category>tomcat</category><category>Linux Mint 13</category><category>NetBSD</category><category>programming general</category><category>spring ws</category><category>LinuxMint 12</category><category>aop</category><category>apache</category><category>book list</category><category>eclipse</category><category>java 7</category><category>java interview questions</category><category>java multithreading</category><category>jquery</category><category>linux</category><category>mongodb</category><category>mysql</category><category>prolog</category><category>xmlaccess</category><category>CDI</category><category>CryptoPro</category><category>GWT</category><category>J2EE 6</category><category>Tom DeMarco</category><category>Ubuntu 12.04</category><category>WS-specification</category><category>antipatterns</category><category>arquillian</category><category>date json serialize deserialize</category><category>enterprise java</category><category>freemarker</category><category>game theory</category><category>http components 4.2.1</category><category>integration test</category><category>ivy</category><category>jackson 1</category><category>java threads</category><category>javadoc</category><category>job</category><category>logging</category><category>maven</category><category>quotes</category><category>server side</category><category>spring portlet mvc 3</category><category>sql</category><category>swagger</category><category>trac</category><category>unit testing</category><category>webshere application server 7</category><category>webshere application server 8.5</category><category>webshere application server 8.5.5.1</category><category>xml</category><category>тонкая настройка</category><category>1Z0-803</category><category>1Z0-804</category><category>8 queens problem</category><category>ActiveMQ ajax</category><category>AntConc</category><category>Apache POI 3.9</category><category>C</category><category>C pointers</category><category>EJB</category><category>IBM</category><category>JAXB</category><category>JDBC DAO</category><category>JMM</category><category>JPA2</category><category>JUG</category><category>Kotlin</category><category>ML</category><category>Mozilla</category><category>NO_PUBKEY</category><category>Netbeans 7.2.1 user interface language change</category><category>OCAJP</category><category>OCPJP</category><category>Robert Martin</category><category>SquirrelSQL Hibernate plugin</category><category>TDD</category><category>Thinkpad R61</category><category>UML</category><category>VMM</category><category>Vagrant</category><category>Venkat Subramaniam</category><category>VirtualBox mount shared folder</category><category>Web service security</category><category>WebSphere Application Server 6</category><category>Xorg</category><category>access user information</category><category>achievement</category><category>ajax</category><category>algorithms</category><category>android</category><category>api</category><category>artifactory</category><category>axis2</category><category>backbone.js</category><category>basic authentication</category><category>bouncy castle</category><category>browser detection</category><category>bugs</category><category>cisco anyconnect</category><category>cluster</category><category>code complete</category><category>collections</category><category>community</category><category>compare</category><category>concurrency</category><category>corpus analisys</category><category>cross-cutting</category><category>custom threads</category><category>ddwrt</category><category>debug ajax from file</category><category>deploy ejb</category><category>design patterns</category><category>detach signature</category><category>disable autocommit</category><category>docx</category><category>download files</category><category>driver settings</category><category>ear</category><category>enum</category><category>export url mapping</category><category>external schema include</category><category>extract enclosed signature</category><category>generate js with java</category><category>git</category><category>github</category><category>government</category><category>hashcode</category><category>headless test</category><category>help</category><category>help wanted</category><category>howto</category><category>html5</category><category>http</category><category>inject spring bean into servlet</category><category>ipad mini detection</category><category>iptv</category><category>jQuery deferreds</category><category>jackson 2</category><category>jasmine</category><category>java 4-ever</category><category>java code generator</category><category>java what's new</category><category>java zip file creation</category><category>javacore</category><category>jax-rs</category><category>jdbc connection pool</category><category>jdk8</category><category>joelonsoftware</category><category>jqueryui</category><category>jre</category><category>jsTree lazy loading</category><category>json</category><category>jstree checkbox</category><category>jvm</category><category>linux http server</category><category>linux network managers</category><category>log rotation</category><category>ltpa token exception</category><category>lvmthin</category><category>maven-enforcer-plugin</category><category>microservices</category><category>move tables between database</category><category>mvc</category><category>my life</category><category>my reading list</category><category>office staff</category><category>openapi specification</category><category>openjdk</category><category>patterns</category><category>post</category><category>productivity</category><category>project organization</category><category>psychology</category><category>puma</category><category>qunit</category><category>quote</category><category>remote desktop</category><category>resource limit</category><category>rest</category><category>rhino</category><category>russian fedora</category><category>safari</category><category>scala</category><category>secured</category><category>sharing files on linux</category><category>singleton</category><category>smartgwt</category><category>spring 3 jms client</category><category>spring boot</category><category>spring ltw</category><category>spring rest json pretty print</category><category>spring-mongo-1.0.xsd</category><category>subversion</category><category>svn</category><category>table size statistics</category><category>theme</category><category>thoughts</category><category>thread hung</category><category>tomcat6-instance-create</category><category>tree plugin</category><category>tuning</category><category>turbo prolog</category><category>ubuntu</category><category>ubuntu 20.04</category><category>uninstall windows applications icons</category><category>updates</category><category>useful thoughts</category><category>username token profile</category><category>web</category><category>web service client</category><category>webdav</category><category>webshere application server 8.5.5</category><category>websocket</category><category>websphere mq 7.0</category><category>websphere portal</category><category>websphere portal 6.0</category><category>websphere portal 8.5</category><category>wildfly</category><category>windows</category><category>wine</category><category>work</category><category>wrox</category><category>wrt54gl</category><category>xalan</category><category>xml validation with xsd from classpath</category><category>xmlspy</category><category>xsd to sql</category><category>ztree</category><category>Криптопро</category><category>важное.</category><category>гостевая учётная запись</category><category>инъекция бинов с сервлет</category><category>классический Gnome.</category><category>кодировка utf8</category><category>медленный wi-fi</category><category>монитор ресурсов</category><category>обновление</category><category>обработка исключений</category><category>оптимизация</category><category>ошибка</category><category>размышления</category><category>русификация</category><category>русификация консоли</category><category>сравнение</category><category>тестирование</category><category>улучшения</category><category>установка приложений</category><title>ALEXANDER CHERNYKH</title><description>This blog is a collection of minds around linux, java, javascript, etc.

Looking for great opportunities.</description><link>http://tduglas.blogspot.com/</link><managingEditor>noreply@blogger.com (Alexander Chernykh)</managingEditor><generator>Blogger</generator><openSearch:totalResults>195</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><language>en-us</language><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7705869048643923027.post-4569841852863265675</guid><pubDate>Sun, 11 Oct 2020 16:43:00 +0000</pubDate><atom:updated>2020-10-11T19:43:29.181+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ubuntu 20.04</category><category domain="http://www.blogger.com/atom/ns#">uninstall windows applications icons</category><category domain="http://www.blogger.com/atom/ns#">wine</category><title>Remove icons in Ubuntu 20.04 menu after uninstalling wine applications</title><description>&lt;p&gt;&amp;nbsp;I've been searching for the solution every time and again I'm facing with this problem.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Imagine you have installed a program in wine and then decided to remove it.&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: courier;"&gt;wine uninstaller&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;then choose the program and that is it.&lt;/p&gt;&lt;p&gt;Unfortunately the icon of removed program still will be in the gnome menu.&lt;/p&gt;&lt;p&gt;To remove it go to&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family: courier;"&gt;~/.local/share/applications&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;and remove folder with your program. After that the icon will gone away.&amp;nbsp;&lt;/p&gt;</description><link>http://tduglas.blogspot.com/2020/10/remove-icons-in-ubuntu-2004-menu-after.html</link><author>noreply@blogger.com (Alexander Chernykh)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7705869048643923027.post-5389323914800897868</guid><pubDate>Fri, 17 Jul 2020 12:29:00 +0000</pubDate><atom:updated>2020-07-17T15:29:18.696+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">api</category><category domain="http://www.blogger.com/atom/ns#">java</category><category domain="http://www.blogger.com/atom/ns#">spring</category><category domain="http://www.blogger.com/atom/ns#">websocket</category><title>WebSocket API in Java</title><description>Hi!&lt;br /&gt;
&lt;br /&gt;
Ever wondered how many abstractions you have to learn in order to use the API?&lt;br /&gt;
&lt;br /&gt;
I just started to read about websocket api in java and it seems you need a lot to understand in order be on the same wave.&lt;br /&gt;
&lt;br /&gt;
Lets start with &lt;b&gt;RFC 6455&lt;/b&gt;, then you need to read &lt;b&gt;JSR-356&lt;/b&gt;.&lt;br /&gt;
You think this is enough? :-)&lt;br /&gt;
&lt;br /&gt;
If you use Spring then it provides you with &lt;b&gt;WebSocketConfigurer&lt;/b&gt; which mimicries the low level web socket api.&lt;br /&gt;
&lt;br /&gt;
If you do not like to play with low level api, then you can use &lt;b&gt;AbstractWebSocketMessageBrokerConfigurer&lt;/b&gt; which adds messaging model with queues and topics using STOMP over websocket api and fallback for the clients who do not have websocket at hand.&lt;br /&gt;
&lt;br /&gt;
You can also add external message broker which will serve your messages.&lt;br /&gt;
But what about security?&lt;br /&gt;
&lt;br /&gt;
You have to use &lt;b&gt;AbstractSecurityWebSocketMessageBrokerConfigurer&lt;/b&gt; in order to configure security.&lt;br /&gt;
&lt;br /&gt;
So, together with security this will be 5 apis\concepts you need to know just in order to play with web sockets.&lt;br /&gt;
&lt;br /&gt;
Is not that much?</description><link>http://tduglas.blogspot.com/2020/07/websocket-api-in-java.html</link><author>noreply@blogger.com (Alexander Chernykh)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7705869048643923027.post-5698771544210309398</guid><pubDate>Fri, 27 Dec 2019 10:37:00 +0000</pubDate><atom:updated>2019-12-27T13:37:19.786+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">openapi specification</category><category domain="http://www.blogger.com/atom/ns#">swagger</category><title>Documenting Web API</title><description>A long time ago when SOAP was ubiquitous, WSDL was the only way to document your API.&lt;br /&gt;&lt;br /&gt;There were two approaches - code first approach, and contract first approach. With code first approach you first develop your service and then with the help of library wsdl got generated. When you use contract first approach you develop WSDL description of your service and then code the service.&lt;br /&gt;&lt;br /&gt;Now everyone doing REST. To document the service one could use RAML or swagger annotations. I have not used RAML, but I have used swagger. With swagger one can also use one of two approaches. Using swagger annotations were like a breeze. Now a good news. Swagger has been bought by SmartBear and renamed to OpenAPI Specification. &lt;br /&gt;Now instead of swagger annotations we can use OpenAPI annotations. &lt;br /&gt;With maven swagger plugin one can generate the specification during compilation time. Also there are plugins so that specification can be generated and accessed at runtime. &lt;br /&gt;Apart from that new tools started to apper to work with OpenAPI specifications: editors, validators, report generators and so on. You can check https://openapi.tools for a list of tools.&lt;br /&gt;&lt;br /&gt;There is a good introductory book to OpenAPI specification: The Design of Web APIs by Arnaud Lauret.&lt;br /&gt;I specifically recommend reading chapters 4 and 12. Chapter 4 tells you how to create specification, chapter 12 tells about producing reports from the specification.&lt;br /&gt;</description><link>http://tduglas.blogspot.com/2019/12/documenting-web-api.html</link><author>noreply@blogger.com (Alexander Chernykh)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7705869048643923027.post-4770697756808087444</guid><pubDate>Tue, 02 Jul 2019 08:57:00 +0000</pubDate><atom:updated>2019-07-02T11:57:32.730+03:00</atom:updated><title>12-factor application methodology</title><description>1. There should be a one-to-one association between a versioned codebase (for example,&lt;br /&gt;
an IT repository) and a deployed service. The same codebase is used for many&lt;br /&gt;
deployments.&lt;br /&gt;
&lt;br /&gt;
2. Services should explicitly declare all dependencies, and should not rely on the presence&lt;br /&gt;
of system-level tools or libraries.&lt;br /&gt;
&lt;br /&gt;
3. Configuration that varies between deployment environments should be stored in the&lt;br /&gt;
environment (specifically in environment variables).&lt;br /&gt;
&lt;br /&gt;
4. All backing services are treated as attached resources, which are managed (attached and&lt;br /&gt;
detached) by the execution environment.&lt;br /&gt;
&lt;br /&gt;
5. The delivery pipeline should have strictly separate stages: Build, release, and run.&lt;br /&gt;
&lt;br /&gt;
6. Applications should be deployed as one or more stateless processes. Specifically,&lt;br /&gt;
transient processes must be stateless and share nothing. Persisted data should be stored&lt;br /&gt;
in an appropriate backing service.&lt;br /&gt;
&lt;br /&gt;
7. Self-contained services should make themselves available to other services by listening&lt;br /&gt;
on a specified port.&lt;br /&gt;
&lt;br /&gt;
8. Concurrency is achieved by scaling individual processes (horizontal scaling).&lt;br /&gt;
&lt;br /&gt;
9. Processes must be disposable: Fast startup and graceful shutdown behaviors lead to a&lt;br /&gt;
more robust and resilient system.&lt;br /&gt;
&lt;br /&gt;
10.All environments, from local development to production, should be as similar as possible.&lt;br /&gt;
&lt;br /&gt;
11.Applications should produce logs as event streams (for example, writing to stdout and&lt;br /&gt;
stderr), and trust the execution environment to aggregate streams.&lt;br /&gt;
&lt;br /&gt;
12.If admin tasks are needed, they should be kept in source control and packaged alongside&lt;br /&gt;
the application to ensure that it is run with the same environment as the application.&lt;br /&gt;
&lt;br /&gt;
More at&amp;nbsp;&lt;a href="https://12factor.net/ru/"&gt;https://12factor.net/ru/&lt;/a&gt;.</description><link>http://tduglas.blogspot.com/2019/07/12-factor-application-methodology.html</link><author>noreply@blogger.com (Alexander Chernykh)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7705869048643923027.post-5291111823673205195</guid><pubDate>Tue, 02 Jul 2019 08:50:00 +0000</pubDate><atom:updated>2019-07-02T11:50:42.362+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">microservices</category><title>The eight fallacies of distributed computing</title><description>Distributed computing is a concept with roots that stretch back decades. The eight fallacies of&lt;br /&gt;
distributed computing were drafted in 1994, and deserve a mention:&lt;br /&gt;
&lt;br /&gt;
1. The network is reliable.&lt;br /&gt;
2. Latency is zero.&lt;br /&gt;
3. Bandwidth is infinite.&lt;br /&gt;
4. The network is secure.&lt;br /&gt;
5. Topology doesn’t change.&lt;br /&gt;
6. There is one administrator.&lt;br /&gt;
7. Transport cost is zero.&lt;br /&gt;
8. The network is homogeneous.&lt;br /&gt;
&lt;br /&gt;
See Fallacies of Distributed Computing&lt;br /&gt;
Explained, available at: &lt;a href="http://www.rgoarchitects.com/Files/fallacies.pdf"&gt;http://www.rgoarchitects.com/Files/fallacies.pdf&lt;/a&gt;</description><link>http://tduglas.blogspot.com/2019/07/the-eight-fallacies-of-distributed.html</link><author>noreply@blogger.com (Alexander Chernykh)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7705869048643923027.post-1611423238332815703</guid><pubDate>Wed, 22 May 2019 08:49:00 +0000</pubDate><atom:updated>2019-05-22T11:49:58.667+03:00</atom:updated><title>Spring.  @Component and Further Stereotype Annotations</title><description>For reference:&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
1.10.1. @Component and Further Stereotype Annotations&lt;/h3&gt;
&lt;br /&gt;
The @Repository annotation is a marker for any class that fulfills the role or stereotype of a&lt;br /&gt;
repository (also known as Data Access Object or DAO). Among the uses of this marker is the&lt;br /&gt;
automatic translation of exceptions, as described in Exception Translation.&lt;br /&gt;
&lt;br /&gt;
Spring provides further stereotype annotations: @Component, @Service, and @Controller. @Component is a generic stereotype for any Spring-managed component. @Repository, @Service, and @Controller are specializations of @Component for more specific use cases (in the persistence, service, and presentation layers, respectively).&lt;br /&gt;
&lt;br /&gt;
Therefore, you can annotate your component classes with @Component, but, by annotating them with @Repository, @Service, or @Controller instead, your classes are more properly suited for processing by tools or associating with aspects. For example, these stereotype annotations make ideal targets for pointcuts.&lt;br /&gt;
&lt;br /&gt;
@Repository, @Service, and @Controller can also carry additional semantics in future releases of the Spring Framework. Thus,&lt;i&gt; if you are choosing between using @Component or @Service for your service layer, @Service is clearly the better choice&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
Similarly, as stated earlier, @Repository is already supported as a marker for automatic exception translation in your persistence layer.</description><link>http://tduglas.blogspot.com/2019/05/spring-component-and-further-stereotype.html</link><author>noreply@blogger.com (Alexander Chernykh)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7705869048643923027.post-5383004937625905667</guid><pubDate>Wed, 03 Apr 2019 09:42:00 +0000</pubDate><atom:updated>2019-04-03T12:42:53.888+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Robert Martin</category><category domain="http://www.blogger.com/atom/ns#">UML</category><title>UML diagrams for java programmers. Robert C Martin. [Extracts]</title><description>&lt;b&gt;UML diagrams for java programmers. Robert C Martin.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;When to draw diagrams, and when to stop.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;
Don’t make a rule that everything must be diagrammed. Such rules are worse than useless.&lt;br /&gt;
Enormous amounts of project time and energy can be wasted in pursuit of diagrams that&lt;br /&gt;
no one will ever read.&lt;br /&gt;
&lt;br /&gt;
When to draw diagrams:&lt;br /&gt;
• Draw diagrams when several people need to understand the structure of a partic-&lt;br /&gt;
ular part of the design because they are all going to be working on it simulta-&lt;br /&gt;
neously. Stop when everyone agrees that they understand.&lt;br /&gt;
• Draw diagrams when two or more people disagree on how a particular element&lt;br /&gt;
should be designed, and you want team consensus. Put the discussion into a time-&lt;br /&gt;
box choose a means for deciding, like a vote, or an impartial judge. Stop at the&lt;br /&gt;
end of the timebox, or when the decision can be made. Then erase the diagram.&lt;br /&gt;
• Draw diagrams when you just want to play with a design idea, and the diagrams&lt;br /&gt;
can help you think it through. Stop when you’ve gotten to the point that you can&lt;br /&gt;
finish your thinking in code. Discard the diagrams.&lt;br /&gt;
• Draw diagrams when you need to explain the structure of some part of the code&lt;br /&gt;
to someone else, or to yourself. Stop when the explanation would be better done&lt;br /&gt;
by looking at code.&lt;br /&gt;
• Draw diagrams when it’s close to the end of the project and your customer has&lt;br /&gt;
requested them as part of a documentation stream for others.&lt;br /&gt;
&lt;br /&gt;
When not to draw diagrams:&lt;br /&gt;
• Don’t draw diagrams because the process tells you to.&lt;br /&gt;
• Don’t draw diagrams because you feel guilty not drawing them or because you&lt;br /&gt;
think that’s what good designers do. Good designers write code and draw dia-&lt;br /&gt;
grams only when necessary.&lt;br /&gt;
• Don’t draw diagrams to create comprehensive documetation of the design phase&lt;br /&gt;
prior to coding. Such documents are almost never worth anything and consume&lt;br /&gt;
immense amounts of time.&lt;br /&gt;
• Don’t draw diagrams for other people to code. True software architects partici-&lt;br /&gt;
pate in the coding of their designs, so that they can lay in the bed they have made.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;CASE Tools.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;
UML CASE tools can be beneficial, but they can also be expensive dust collectors. Be&lt;br /&gt;
very careful about making a decision to purchase and deploy a UML CASE tool.&lt;br /&gt;
&lt;br /&gt;
• Don’t UML CASE tools make it easier to draw diagrams?&lt;br /&gt;
No, they make it significantly harder. There is a long learning curve to get profi-&lt;br /&gt;
cient; and even then the tools are more cumbersome than whiteboards. White-&lt;br /&gt;
boards are very easy to use. Developers are usually already familiar with them. If&lt;br /&gt;
not, there is virtually no learning curve.&lt;br /&gt;
• Don’t UML CASE tools make it easier for large teams to collaborate on dia-&lt;br /&gt;
grams?&lt;br /&gt;
In some cases. However, the vast majority of developer and development&lt;br /&gt;
projects do not need to be producing diagrams in such quantities and complexi-&lt;br /&gt;
ties that they require an automated collaborative system to coordinate their activ-&lt;br /&gt;
ities. In any case, the best time to purchase a system to coordinate the preparation&lt;br /&gt;
of UML diagrams is when a manual system has first been put in place, is starting&lt;br /&gt;
to show the strain, and there is no other choice but to automate.&lt;br /&gt;
• Don’t UML CASE tools make it easier to generate code?&lt;br /&gt;
The sum total effort involved in creating the diagrams, generating the code, and&lt;br /&gt;
then using the generated code is not likely to be less then the cost of just writing&lt;br /&gt;
the code in the first place. If there is a gain, it is not an order of magnitude, or&lt;br /&gt;
even a factor of two. Developers know how to edit text file and use IDEs. Gener-&lt;br /&gt;
ating code from diagrams may sound like a good idea; but I stronly urge you to&lt;br /&gt;
measure the productivity increase before you spend a lot of money.&lt;br /&gt;
• What about these CASE tools that are also IDEs and show the code and dia-&lt;br /&gt;
grams together?&lt;br /&gt;
These tools are definitely cool. However, I don’t think the constant presence of&lt;br /&gt;
UML is important. The fact that the diagram changes as I modify the code, or&lt;br /&gt;
that the code changes as I modify the diagram, does not really help me much.&lt;br /&gt;
Frankly, I’d rather buy an IDE that has put its effort on figuring out how to help&lt;br /&gt;
me manipulate my programs than my diagrams. Again, measure productivity&lt;br /&gt;
improvement before making a huge monetary committment.&lt;br /&gt;
In short, look before you leap, and look very hard. There may be a benefit to outfitting&lt;br /&gt;
your team with an expensive CASE tool; but verify that benefit with your own experi-&lt;br /&gt;
ments before buying something that could very well turn into shelfware.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;But what about documentation?&lt;/span&gt;&lt;br /&gt;
Good documentation is essential to any project. Without it the team will get lost is a sea of&lt;br /&gt;
code. On the other hand, too much documentation of the wrong kind is worse; because&lt;br /&gt;
then you have all this distracting and misleading paper, and you still have the sea of code.&lt;br /&gt;
&lt;br /&gt;
Documentation must be created, but it must be created prudently. Often the choice not&lt;br /&gt;
to document is just as important as the choice to document. A complex communication&lt;br /&gt;
protocol needs to be documented.&lt;br /&gt;
&lt;br /&gt;
A complex relatoinal schema needs to be documented.&lt;br /&gt;
A complex reusable framework needs to be documented.&lt;br /&gt;
&lt;br /&gt;
However, none of these things needs a hundred pages of UML. Software documenta-&lt;br /&gt;
tion should be short, and to the point. The value of a software document is inversely pro-&lt;br /&gt;
portional to its size.&lt;br /&gt;
For a project team of 12 people working on a project of a million lines of Java, I&lt;br /&gt;
would have a total of 25 to 200 pages of persistent documentation, with my preference&lt;br /&gt;
being for the smaller. These documents would include UML diagrams of the high level&lt;br /&gt;
structure of the important modules, ER diagrams of the relational schema, a page or two&lt;br /&gt;
about how to build the system, testing instructions, source code control instructions, etc.&lt;br /&gt;
I would put this documentation into a wiki, or some collaborative authoring tool so&lt;br /&gt;
that anyone on the team can have access to it on their screens and search it, and anyone&lt;br /&gt;
can change it as need be.&lt;br /&gt;
It takes a lot of work to make a document small, but that work is worth it. People will&lt;br /&gt;
read small documents. They won’t read 1,000 pages tomes.&lt;br /&gt;
&lt;br /&gt;
Can code really be used to describe part of a system? In fact, this should be a goal of&lt;br /&gt;
the developers and designers. The team should strive to create code that is expressive and&lt;br /&gt;
readable. The more the code can describe itself, the fewer diagrams you will need, and the&lt;br /&gt;
better of the whole project will be.&lt;br /&gt;
&lt;br /&gt;
In general, high level diagrams are more useful than low level ones.&lt;br /&gt;
&lt;br /&gt;
One of the great fallacies of software development in the 1990s was the notion that&lt;br /&gt;
developers should draw sequence diagrams for all methods before writing the code. This&lt;br /&gt;
always proves to be a very expensive waste of time. Don’t do it.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;Use Cases&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The real trick to doing use cases is to keep them simple. Don’t worry about use case&lt;br /&gt;
forms, just write them on blank paper, or on a blank page in a simple word processor, or on&lt;br /&gt;
blank index cards. Don’t worry about filling in all the details. Details aren’t important&lt;br /&gt;
until much latter. Don’t worry about capturing all the use cases, that’s an impossible task&lt;br /&gt;
anyway.&lt;br /&gt;
The one thing to remember about use cases is: &lt;b&gt;tomorrow they are going to change.&lt;/b&gt; No&lt;br /&gt;
matter how dilligently you capture them, no matter how fastidiously you record the&lt;br /&gt;
details, no matter how thoroughly you think them through, no matter how much effort you&lt;br /&gt;
apply to exploring and analyzing the requirements, tomorrow they are going to change.&lt;br /&gt;
If something is going to change tomorrow, you don’t really need to capture its details&lt;br /&gt;
today. Indeed, you want to postpone the capture of the details until the very last possible&lt;br /&gt;
moment.&lt;br /&gt;
Think of use cases as: Just In Time Requirements.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;Writing Use Cases&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;
Notice the title of this section. We write use cases, we don’t draw them. Use cases are not&lt;br /&gt;
diagrams. Use cases are textual descriptions of behavioral requirements; written from a&lt;br /&gt;
certain point of view.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What is a use case.&lt;/b&gt;&lt;br /&gt;
A use case is a description of the behavior of a system. That description is written from the&lt;br /&gt;
point of view of a user who has just told the system to do something particular. A use case&lt;br /&gt;
captures the visible sequence of events that a system goes through in response to a single&lt;br /&gt;
user stimulus.&lt;br /&gt;
A visible event is an event that the user can see. Use cases do not describe hidden&lt;br /&gt;
behavior at all. They don’t discuss the hidden mechanisms of the system. They only&lt;br /&gt;
describe those things that a user can see.&lt;br /&gt;
&lt;br /&gt;
How can you estimate a use case if you don’t record it’s detail? You talk to the stake-&lt;br /&gt;
holders about the detail, without necessarily recording it. This will give you the informa-&lt;br /&gt;
tion you need to give a rough estimate. Why not record the detail if we’re going to talk to&lt;br /&gt;
the stakeholders about it? Because tomorrow the details are going to change.&lt;br /&gt;
&amp;nbsp;Yes, but over many use cases those effects integrate out.&lt;br /&gt;
Recording the detail too early just isn’t cost effective.&lt;br /&gt;
&lt;br /&gt;
If we aren’t going to record the details of the use case just yet, then what do we&lt;br /&gt;
record? How do we know that the use case even exists if we don’t write something down?&lt;br /&gt;
Write the name of the use case. Keep a list of them in a spreadsheet, or a word processor&lt;br /&gt;
document. Better yet, write the name of the use case on an index card and maintain a stack&lt;br /&gt;
of use case cards. Fill in the details as they get closer to implementation.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What else?&lt;/b&gt;&lt;br /&gt;
What about actors, secondary actors, preconditions, postconditions, etc. etc. What about&lt;br /&gt;
all that stuff?&lt;br /&gt;
Don’t worry about it. For the vast majority of the systems you will work on, you&lt;br /&gt;
won’t need to know about all those other things. Should the time come that you need to&lt;br /&gt;
know more about use cases, then you can read Alistair Cockburn’s definitive work on the&lt;br /&gt;
topic: Writing Effective Use Cases, Addison Wesley, 2001. For now, learn to walk before&lt;br /&gt;
you learn to run. Get used to writing simple use cases as above. As you master them&lt;br /&gt;
(defined as having successfully used them in a project), you can ever so carefully and par-&lt;br /&gt;
simonously adopt some of the more sophisticated techniques. But remember, don’t sit and&lt;br /&gt;
spin.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Of all the diagrams in &lt;b&gt;UML, use case diagrams are the most confusing&lt;/b&gt;, and the least use-&lt;br /&gt;
ful. With the exception of the System Boundary Diagram, which I’ll describe in a minute,&lt;br /&gt;
I recommend that you avoid them entirely.&lt;br /&gt;
&lt;br /&gt;
This diagram is almost, but not quite, useless. It contains very little information of use&lt;br /&gt;
to the Java programmier, but it makes a good cover page for a presentation to stakehold-&lt;br /&gt;
ers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;Design Quality&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;
What does it mean to be well designed? A system that is well designed is easy to under-&lt;br /&gt;
stand, easy to change, and easy to reuse. It presents no particular development difficulties,&lt;br /&gt;
is simple, terse, and economical. It is a pleasure to work with. Conversely, a bad design&lt;br /&gt;
stinks like rotting meat.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Dependency Management&lt;/b&gt;&lt;br /&gt;
Many of these smells are a result of mismanaged dependencies. Mismanaged dependen-&lt;br /&gt;
cies conjure the view of code that is a tangled mass of couplings. Indeed, it is this view of&lt;br /&gt;
entanglement that was the origin of the term “spaghetti code”.&lt;br /&gt;
Object oriented languages provide tools that aid in managing dependencies. Interfaces&lt;br /&gt;
can be created that break or invert the direction of certain dependencies. Polymorphism&lt;br /&gt;
allows modules to invoke functions without depending upon the modules that contain&lt;br /&gt;
them. Indeed, an OOPL gives us lots of power to shape the dependencies the way we&lt;br /&gt;
want.&lt;br /&gt;
So, how do we want them shaped? That’s where the following principles come in. I&lt;br /&gt;
have written a great deal about these principles. The definitive (and most long-winded)&lt;br /&gt;
treatment is [Martin2002]. There are also quite a number of papers describing these princi-&lt;br /&gt;
ples on www.objectmentor.com . What follows is a very brief summary.&lt;br /&gt;
&lt;br /&gt;
So, five simple principles:&lt;br /&gt;
1. SRP -- A class should have one and only one reason to change.&lt;br /&gt;
2. OCP -- It should be possible to change the environment of a class without chang-&lt;br /&gt;
ing the class.&lt;br /&gt;
3. LSP -- Avoid making methods of derivatives illegal or degenerate. Users of base&lt;br /&gt;
classes should not need to know about the derivatives.&lt;br /&gt;
4. DIP -- Depend on interfaces and abstract classes instead of volatile concrete&lt;br /&gt;
classes.&lt;br /&gt;
5. ISP -- Give each user of an object an interface that has just the methods that user&lt;br /&gt;
needs.&lt;br /&gt;
When should these principles be applied? At the first hint of pain. It is not wise to try&lt;br /&gt;
to make all systems conform to all principles all the time, every time. You’ll spend an eter-&lt;br /&gt;
nity trying to imagine all the different environments to apply to the OCP, or all the differ-&lt;br /&gt;
ent sources of change to apply to the SRP. You’ll cook up dozens or hundreds of little&lt;br /&gt;
interfaces for the ISP, and create lots of worthless abstractions for the DIP.&lt;br /&gt;
The best way to apply these principle is reactively as opposed to proactively. When&lt;br /&gt;
you first detect that there is a structural problem with the code, or when you first realize&lt;br /&gt;
that a module is being impacted by changes in another, then you should see whether one or&lt;br /&gt;
more of these principles can be brought to bear to address the problem.&lt;br /&gt;
Of course if you take a reactive approach to applying the principles, then you also&lt;br /&gt;
need to take a proactive approach to putting the kinds of pressure on the system that will&lt;br /&gt;
create pain early. If you are going to react to pain, then you need to diligently find the sore&lt;br /&gt;
spots.&lt;br /&gt;
One of the best ways to hunt for sore spots is to write lots and lots of unit tests. It&lt;br /&gt;
works even better if you write the tests first, before you write the code that passes them.&lt;br /&gt;
But that’s a topic for the next chapter.&lt;br /&gt;
&lt;br /&gt;
Stories that are too long should be split. Stories that are too short should be merged. A&lt;br /&gt;
story should never be longer than three or four days worth of effort for the whole team.&lt;br /&gt;
They should never be shorter than about half a day’s effort. Stories that are too short tend&lt;br /&gt;
to be over-estimated. Stories that are too long tend to be under-estimated. So we merge&lt;br /&gt;
and join stories until they sit near the sweet spot of accurate estimation.&lt;br /&gt;
&lt;br /&gt;
When designers create diagrams without methods they may be partitioning the soft-&lt;br /&gt;
ware on something other than behavior. Partitionings that are not based upon behavior are&lt;br /&gt;
almost always significant errors. It is the behavior of a system that is the first clue to how&lt;br /&gt;
the software should be partitioned.&lt;br /&gt;
&lt;br /&gt;
One of the goals of OOD is the partitioning and distribution of behavior into many classes and&lt;br /&gt;
&amp;nbsp;many functions. It turns out, however, that many object models that appear to be distributed&lt;br /&gt;
&amp;nbsp;are really the abode of gods in disguise.&lt;br /&gt;
&lt;br /&gt;
The lesson here is simply this: Associations are the pathways through which mes-&lt;br /&gt;
sages are sent between objects.&lt;br /&gt;
&lt;br /&gt;
At no point did I need or want a UML diagram to help me with that design.&lt;br /&gt;
Nor do I think that the use of UML diagrams would have made the development more efficient or resulted in a superior design.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description><link>http://tduglas.blogspot.com/2019/04/uml-diagrams-for-java-programmers.html</link><author>noreply@blogger.com (Alexander Chernykh)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7705869048643923027.post-5259803961488721916</guid><pubDate>Sat, 02 Mar 2019 18:22:00 +0000</pubDate><atom:updated>2019-03-02T21:22:28.057+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">cisco anyconnect</category><category domain="http://www.blogger.com/atom/ns#">ubuntu</category><title>Ubuntu 18.04 and CiscoAnyconnect</title><description>After installing Cisco Anyconnect I couldn't start it. That is really really sad.&lt;br /&gt;
&lt;br /&gt;
In order to fix it I had to install:&lt;br /&gt;
sudo apt install libpangox-1.0-0&lt;br /&gt;
&lt;br /&gt;
Now I can run ./vpnui and connect safely to my work PC. </description><link>http://tduglas.blogspot.com/2019/03/ubuntu-1804-and-ciscoanyconnect.html</link><author>noreply@blogger.com (Alexander Chernykh)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7705869048643923027.post-4020045716507792129</guid><pubDate>Sun, 29 Jul 2018 13:05:00 +0000</pubDate><atom:updated>2018-07-29T16:05:29.700+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">java multithreading</category><category domain="http://www.blogger.com/atom/ns#">JMM</category><title>JMM - Java memory model</title><description>JMM&lt;br /&gt;An archtecture's memory model tells programs what guarantees they can expect from the memory system, and specifies the special instructions required (called memory barriers) to get the additional memory coordination guarantees required when sharing data.&lt;br /&gt;&lt;br /&gt;The JMM defines a partial ordering called happens-before on all actions within the program. To guarantee that the thread executing action B can see the results of action A, there must be a happens-before relationship between A and B. In the absence of a happens-before ordering between two operations, the JVM is free to reorder them as is pleases. &lt;br /&gt;&lt;br /&gt;The rules for happen-before are:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Program order rule.&lt;/b&gt; Each action in a thread happens-before every action in that thread that comes later in the program order.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Monitor lock rule.&lt;/b&gt; An unlock on a monitor lock happens-before every subsequent lock on that same monitor lock.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Volatile variable rule.&lt;/b&gt; A write to a volatile field happens-before every subsequent read of that same field.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Thread start rule.&lt;/b&gt; A call to Thread.start on a thread happens-before every action in the started thread.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Thread termination rule.&lt;/b&gt; Any action in a thread happens-before any other thread detects that thread has terminated, either by successfully return from Thread.join or by Thread.isAlive returning false.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Interruption rule.&lt;/b&gt; A thread calling interrupt on another thread happens-before the interrupted thread detects the interrupt.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Finalizer rule.&lt;/b&gt; The end of a constructor for an object happens-before the start of the finalizer for that object.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Transitivity.&lt;/b&gt; If A happens-before B, and B happens-before C, then A happens-before C.</description><link>http://tduglas.blogspot.com/2018/07/jmm-java-memory-model.html</link><author>noreply@blogger.com (Alexander Chernykh)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7705869048643923027.post-3428102915014542738</guid><pubDate>Sun, 22 Jul 2018 15:35:00 +0000</pubDate><atom:updated>2018-07-22T18:35:58.547+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">job</category><title>Failure at job interview</title><description>What to do if you got rejected after the interview or you've just failed it?&lt;br /&gt;
&lt;br /&gt;
Do not despair. Do not take rejection as your tragedy. Life is not only success. Often there are failures. This is not good or bad. This is just a norm of life.&lt;br /&gt;
&lt;br /&gt;
After the interview try to understand which questions you couldn't answer?&lt;br /&gt;
&lt;br /&gt;
Interview is a good opportunity to check your knowledge as well as to understand what the company is all about you are going to work on?&lt;br /&gt;
&lt;br /&gt;
After you could identify your gaps in knowledge you can learn and fix it. Every subsequent interview increase your chances for success.&lt;br /&gt;
&lt;br /&gt;
After every interview you increase the knowledge of market needs. In the end you'll land your job. </description><link>http://tduglas.blogspot.com/2018/07/failure-at-job-interview.html</link><author>noreply@blogger.com (Alexander Chernykh)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7705869048643923027.post-1898870173345984702</guid><pubDate>Sun, 08 Jul 2018 19:51:00 +0000</pubDate><atom:updated>2018-07-08T22:51:04.494+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">collections</category><category domain="http://www.blogger.com/atom/ns#">concurrency</category><category domain="http://www.blogger.com/atom/ns#">java multithreading</category><category domain="http://www.blogger.com/atom/ns#">java threads</category><title>Concurrent collections. Java 8</title><description>Concurrent collections.&lt;br /&gt;&lt;br /&gt;What are the reasons to use new concurrent collections when we can use old plain collections using wrappers like Collections.synchronized(List/Set/Map)? The problem in this case will be that all accesses to the collection will use &lt;b&gt;one lock&lt;/b&gt;. In its turn this will &lt;b&gt;slow down performance&lt;/b&gt;. &lt;br /&gt;&lt;br /&gt;We can ask what is the price in this case? For example take a look at HashTable and ConcurrentHashMap by the following link: &lt;a href="https://www.ibm.com/developerworks/java/library/j-jtp07233/index.html"&gt;https://www.ibm.com/developerworks/java/library/j-jtp07233/index.html&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;Here are the results:&lt;br /&gt;Threads&amp;nbsp;&amp;nbsp;&amp;nbsp; ConcurrentHashMap&amp;nbsp;&amp;nbsp;&amp;nbsp; Hashtable&lt;br /&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.00&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.03&lt;br /&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.59&amp;nbsp;&amp;nbsp;&amp;nbsp; 32.40&lt;br /&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.58&amp;nbsp;&amp;nbsp;&amp;nbsp; 78.23&lt;br /&gt;8&amp;nbsp;&amp;nbsp;&amp;nbsp; 13.21&amp;nbsp;&amp;nbsp;&amp;nbsp; 163.48&lt;br /&gt;16&amp;nbsp;&amp;nbsp;&amp;nbsp; 27.58&amp;nbsp;&amp;nbsp;&amp;nbsp; 341.21&lt;br /&gt;32&amp;nbsp;&amp;nbsp;&amp;nbsp; 57.27&amp;nbsp;&amp;nbsp;&amp;nbsp; 778.41&lt;br /&gt;&lt;br /&gt;Absolute numbers are&lt;b&gt; not important &lt;/b&gt;but it is more valid to compare relative numbers. &lt;br /&gt;&lt;br /&gt;What can we do about it? Maybe it will be better to write our own implementation of concurrent collection? It it possible but hard to achieve and more over there are already good implementations. Many &lt;b&gt;useful&lt;/b&gt; concurrent &lt;b&gt;collections &lt;/b&gt;are located at&amp;nbsp;&lt;b&gt; java.util.concurrent package.&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Concurrent &lt;/b&gt;collections make &lt;b&gt;synchronized &lt;/b&gt;collections largely &lt;b&gt;obsolete&lt;/b&gt;. &lt;br /&gt;&lt;br /&gt;That way instead of HashMap one can use ConcurrentHashMap.&lt;br /&gt;In case when a number of search iterations outnumbers the number of adding or removing operations one can use CopyOnWriteArrayList instead of ArrayList. &lt;br /&gt;&lt;br /&gt;As for the &lt;b&gt;Queue &lt;/b&gt;implementations there are a lot of &lt;b&gt;implementations&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1. &lt;b&gt;LinkedBlockingQueue &lt;/b&gt;— an optionally bounded FIFO blocking queue backed by linked nodes. An optionally-bounded blocking queue based on linked nodes.&amp;nbsp; Linked queues typically have higher throughput than array-based queues but less predictable performance in most concurrent applications. The optional capacity bound constructor argument serves as a way to prevent excessive queue expansion. The capacity, if unspecified, is equal to Integer.MAX_VALUE. Linked nodes are dynamically created upon each insertion unless this would bring the queue above capacity.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2. &lt;b&gt;ArrayBlockingQueue &lt;/b&gt;— a bounded FIFO blocking queue backed by an array. A bounded blocking queue backed by an array. &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3. &lt;b&gt;ConcurrentLinkedQueue &lt;/b&gt;- An unbounded thread-safe queue based on linked nodes. This queue orders elements FIFO (first-in-first-out). This implementation employs an efficient non-blocking algorithm based on one described in Simple, Fast, and Practical Non-Blocking and Blocking Concurrent Queue Algorithms by Maged M. Michael and Michael L. Scott. &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; It is&lt;b&gt; not obvious&lt;/b&gt; which implementation to use? It &lt;b&gt;depends&lt;/b&gt;. One should choose the implementation based on tests. &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4. &lt;b&gt;PriorityBlockingQueue &lt;/b&gt;— an unbounded blocking priority queue backed by a heap. An unbounded blocking queue that uses the same ordering rules as class PriorityQueue and supplies blocking retrieval operations.&lt;br /&gt;
&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5. &lt;b&gt;DelayQueue &lt;/b&gt;— a time-based scheduling queue backed by a heap. An unbounded blocking queue of Delayed elements, in which an element can only be taken when its delay has expired.&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6. &lt;b&gt;SynchronousQueue &lt;/b&gt;— a simple rendezvous mechanism that uses the BlockingQueue interface. Synchronous queues are similar to rendezvous channels used in CSP and Ada. They are well suited for handoff designs, in which an object running in one thread must sync up with an object running in another thread in order to hand it some information, event, or task. &lt;br /&gt;&lt;br /&gt;&amp;nbsp;7. In JDK 7, &lt;b&gt;TransferQueue &lt;/b&gt;is a specialized BlockingQueue in which code that adds an element to the queue has the option of waiting (blocking) for code in another thread to retrieve the element. TransferQueue has a single implementation:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;LinkedTransferQueue &lt;/b&gt;— an unbounded TransferQueue based on linked nodes. This implementation outperforms SynchronousQueue by factor of 3 to 14. See &lt;a href="http://cs.oswego.edu/pipermail/concurrency-interest/2009-February/005886.html"&gt;http://cs.oswego.edu/pipermail/concurrency-interest/2009-February/005886.html&lt;/a&gt;.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;Deques and work stealing.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Just as blocking queues lend themselves to the producer-consumer pattern, deques lend themselves to a related pattern called work stealing.&lt;br /&gt;</description><link>http://tduglas.blogspot.com/2018/07/concurrent-collections-java-8.html</link><author>noreply@blogger.com (Alexander Chernykh)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7705869048643923027.post-2895627282319467442</guid><pubDate>Thu, 05 Jul 2018 16:05:00 +0000</pubDate><atom:updated>2018-07-05T19:05:58.690+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">java threads</category><title>Java. How to start learning threads.</title><description>There are a lot of different ways to start learning Java threads.&lt;br /&gt;
Here is my approach to learn threads:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Read the Java language tutorials on concurrency at &lt;a href="https://docs.oracle.com/javase/tutorial/essential/concurrency/index.html"&gt;https://docs.oracle.com/javase/tutorial/essential/concurrency/index.html&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Learn basic constructs like synchronized and volatile.&lt;/li&gt;
&lt;li&gt;Learn about Dinning philosophers problem. &lt;/li&gt;
&lt;li&gt;Read Effective Java Programming Language guide 3rd edition section 11 Concurrency:&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;Item 78. Synchronize access to shared mutable data&lt;/li&gt;
&lt;li&gt;Item 79. Avoid excessive synchronization&lt;/li&gt;
&lt;li&gt;Item 80. Prefer executors, tasks and streams to threads&lt;/li&gt;
&lt;li&gt;Item 81. Prefer concurrency utilities to wait and notify&lt;/li&gt;
&lt;li&gt;Item 82. Document thread safety&lt;/li&gt;
&lt;li&gt;Item 83. Use lazy initialization judiciously&lt;/li&gt;
&lt;li&gt;Item 84. Don't depend on the thread scheduler&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;Try to read Java Concurrency in Practice.&lt;/li&gt;
&lt;/ol&gt;
I'm not sure I have covered everything, but it is a good ground to start with.&lt;br /&gt;
Regards.&lt;br /&gt;
&lt;ol&gt;
&lt;/ol&gt;
</description><link>http://tduglas.blogspot.com/2018/07/java-how-to-start-learning-threads.html</link><author>noreply@blogger.com (Alexander Chernykh)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7705869048643923027.post-2287384295093013344</guid><pubDate>Sun, 01 Jul 2018 15:16:00 +0000</pubDate><atom:updated>2018-07-01T18:16:59.073+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">java multithreading</category><title>Java synchronized keyword</title><description>Java multithreading has 2 key aspects - visibility and automicity.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;For synchronization in Java one can use synchronized keyword.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Keyword synchronized is not equivalent to atomic, but synchronization can be used to achieve atomicity.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;When subclassing a class overridden method should also define synchronized in its signature.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;A synchronized method can call another synchronized method on its own instance. &lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;</description><link>http://tduglas.blogspot.com/2018/07/java-synchronized-keyword.html</link><author>noreply@blogger.com (Alexander Chernykh)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7705869048643923027.post-5276061510245241214</guid><pubDate>Sat, 30 Jun 2018 14:46:00 +0000</pubDate><atom:updated>2018-07-01T18:48:06.921+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">java interview questions</category><title>Java volatile keyword</title><description>According to Java Language Specification 8 section 8.3.1.4:&lt;br /&gt;
"As a
                     rule, to ensure that shared variables are consistently and reliably
                     updated, a thread should ensure that it has exclusive use of such
                     variables by obtaining a lock that, conventionally, enforces mutual
                     exclusion for those shared variables.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="norm"&gt;
&lt;a href="https://www.blogger.com/null" name="jls-8.3.1.4-110"&gt;&lt;/a&gt;The Java programming language provides a
                     second mechanism, &lt;code class="literal"&gt;volatile&lt;/code&gt; fields, that is more convenient than
                     locking for some purposes.&amp;nbsp;&lt;/div&gt;
&lt;div class="norm"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;a href="https://www.blogger.com/null" name="jls-8.3.1.4-200"&gt;&lt;/a&gt;A field
                     may be declared &lt;code class="literal"&gt;volatile&lt;/code&gt;, in which case the Java Memory Model
                     ensures that all threads see a consistent value for the variable" .&lt;br /&gt;
&lt;br /&gt;
Please note, that volatile doesn't imply atomic.&amp;nbsp; So that if your code is like this:&lt;br /&gt;
private volatile int var = 0;&lt;br /&gt;
var = var+1;&lt;br /&gt;
and you run increment in 2 threads then result won't be 2 in all situations.&lt;br /&gt;
In other words volatile fix visibility problems but not race conditions. &lt;br /&gt;
&lt;br /&gt;
I recommend to go by following link https://docs.oracle.com/javase/specs/jls/se7/html/jls-8.html#jls-8.3.1.4 and take a look at example.&lt;br /&gt;
&lt;br /&gt;
From Concurrent programming in Java 2nd:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Declaring a reference field as volatile does not ensure visibility of non- volatile fields that are accessed via this reference.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Similarly, declaring an array field as&amp;nbsp; volatile does not ensure visibility of its elements.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Volatility cannot be manually propagated for arrays because array elements themselves cannot be declared as volatile.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
Declaring fields as&amp;nbsp; volatile can be useful when you do not need locking for any other reason, yet&lt;br /&gt;values must be accurately accessible across multiple threads. This may occur when:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;The field need not obey any invariants with respect to others.&lt;/li&gt;
&lt;li&gt;Writes to the field do not depend on its current value.&lt;/li&gt;
&lt;li&gt;No thread ever writes an illegal value with respect to intended semantics.&lt;/li&gt;
&lt;li&gt;The actions of readers do not depend on values of other non-volatile fields. &lt;/li&gt;
&lt;/ul&gt;
</description><link>http://tduglas.blogspot.com/2018/06/java-volatile-keyword.html</link><author>noreply@blogger.com (Alexander Chernykh)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7705869048643923027.post-3728046487838304570</guid><pubDate>Thu, 28 Jun 2018 21:36:00 +0000</pubDate><atom:updated>2018-06-30T17:28:50.270+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">java interview questions</category><title>Stages of the programmers interview</title><description>Here is a short list of possible stages of the interview.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Phone screening.&lt;/b&gt; Usually is conducted by recruiter to assure that your phone is correct and you remember what is written in your resume. :-)&lt;br /&gt;
Time spent: 20-30 minutes. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Tet-a-tet meeting or Skype interview.&lt;/b&gt; This meeting is usually a technical interview where people try to check what you know and what you don't. Resembles like an oral exam. If you prepared well then you can come through it. But sometimes you are given a task which you need to solve or design a system. &lt;br /&gt;
Time spent: 1-1.5 hours.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Technical test over the Internet.&lt;/b&gt; As a rule you are given some time for a couple of easy technical tasks or a test with answer options. Many companies have their own platforms for such tests, but as a rule no one is supporting them, but the tests are chosen from a given limited set.&lt;br /&gt;
&lt;br /&gt;
But there are exceptions. Some companies use third party sites which provide tests with different type of difficulty: from the middle one to hardcore.&lt;br /&gt;
Time spent: 1-1.5 hours.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Testing task.&lt;/b&gt; Usually you are given a code for refactoring or being asked to write a simple implementation of some task like a REST controller. It is not recommended to spend more than 3-4 hours on it. The less the better. Value your time. If necessary you can add something by saying when your task will be reviewed. If you are given a real peace of code and asked to do some "production" task then it is better to deny such offer as it may turned out that a company is doing its job for free.&lt;br /&gt;
Time spent: 1-3 hours. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Live coding.&lt;/b&gt; The most stressful part. People are watching you and how you code. Imagine how your productivity goes down with this approach? Usually no difficult tasks are given, but it is easy to fail. People try to check how you think, but in my opinion this way allows only to check your stress resistance.&lt;br /&gt;
Time spent: 0.5-1 hour. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Meeting with manager.&lt;/b&gt; At this stage manager is trying to understand how adequate you are and who you are from a business point of you? Are you a team player?&lt;br /&gt;
Time spent: 0.5-1 hour. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Mostly this is it. Usually there are no more then 3 stages including phone interview. This process is&lt;br /&gt;
very time consuming for you and a company. So it is better to keep short all the stages as possible.&lt;br /&gt;
&lt;br /&gt;
If we'll talk about time then if we sum up all the timings it will be between 4 hours 20 minutes and 8 hours. Usually not all stages are being conducted. For example live coding is often omitted. This timings doesn't include your questions to the company. So expect to add between 0.5 and 1 hour for your questions and company's answers.</description><link>http://tduglas.blogspot.com/2018/06/stages-of-programmers-interview.html</link><author>noreply@blogger.com (Alexander Chernykh)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7705869048643923027.post-164499535920934878</guid><pubDate>Thu, 28 Jun 2018 19:26:00 +0000</pubDate><atom:updated>2018-06-30T17:25:43.262+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">java interview questions</category><title>Java 8 programming interview questions</title><description>Hi all.&lt;br /&gt;
I decided to share with you some stuff which could be useful for the beginners.&lt;br /&gt;
&lt;br /&gt;
Every time you go to the Java interview you almost always get the familiar set of questions. Here is the list of questions that in my opinion are commonly asked at the interviews.&lt;br /&gt;
&lt;br /&gt;
I won't give answers in this post for now. Feel free to explore them on your own.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Class Object in Java. Methods equals, hashCode, toString. Default implementation. &lt;/li&gt;
&lt;li&gt;StringBuilder and StringBuffer. What is the difference? Compare strings by == and equals. String pool. &lt;/li&gt;
&lt;li&gt;Collections. Basic interfaces and collections. ArrayList and LinkedList. HashMap default implementation. Difference between HashMap and LinkedHashMap and TreeMap.&lt;/li&gt;
&lt;li&gt;Threads. Thread class. Interface Runnable. Monitor object. Methods wait, notify, notifyAll. Interface Executor. Synchronized keyword. Volatile keyword. Thread-safe collections. Dining philosophers.&lt;/li&gt;
&lt;li&gt;Difference between interface and abstract class.&lt;/li&gt;
&lt;li&gt;Lambda expressions. Default methods in interfaces.&lt;/li&gt;
&lt;li&gt;Exceptions. Checked and unchecked. Difference.&lt;/li&gt;
&lt;li&gt;Keyword final on class, method, instance member variable, method argument.&lt;/li&gt;
&lt;li&gt;Try/catch/finally. Cases when finally block will not get executed.&amp;nbsp; &lt;/li&gt;
&lt;li&gt;Basic principles of garbage collector.&lt;/li&gt;
&lt;li&gt;GoF templates. Examples. Do not mention Singleton. Visitor, Adapter, Builder, Template method, Strategy.&lt;/li&gt;
&lt;li&gt;Basic SOLID principles.&lt;/li&gt;
&lt;li&gt;What is TDD?&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp;One of my favorite question is the following: you've got a class which contains one synchronized and one non synchronized method. What will happen if on one instance of this class will operate two threads, one will call synchronized method the other one will call non synchronized method? Is it possible to occur at once?&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Answer&lt;/b&gt;: One thread can call synchronized method and another one can call&amp;nbsp; non synchronized method. Synchronized keyword means that a thread needs to obtain object's monitor first. If there are no such word on a method then nothing stops the second thread to operate on an object.&lt;br /&gt;
&lt;ul&gt;
&lt;/ul&gt;
Usually there are other questions about Spring, Databases, J2EE but let's leave it for now.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
That is all for now. Good luck! &lt;br /&gt;
&lt;br /&gt;</description><link>http://tduglas.blogspot.com/2018/06/java-8-programming-interview-questions.html</link><author>noreply@blogger.com (Alexander Chernykh)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7705869048643923027.post-6034967338755625349</guid><pubDate>Sat, 21 Apr 2018 11:25:00 +0000</pubDate><atom:updated>2018-04-21T14:25:30.903+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Java 8</category><title>Java 8. Files.lines() can cause possible resource leak.</title><description>Files.lines() method allows to receive stream of lines from file.&lt;br /&gt;
It seems to be very convenient apart from one thing - it can cause resource leak.&lt;br /&gt;
You must close this stream explicitly or use try with resource block.&lt;br /&gt;
&lt;br /&gt;
It seems to be strange that terminal operations in this case doesn't close the resources underneath a stream.</description><link>http://tduglas.blogspot.com/2018/04/java-8-fileslines-can-cause-possible.html</link><author>noreply@blogger.com (Alexander Chernykh)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7705869048643923027.post-5242262839396999929</guid><pubDate>Sat, 07 Apr 2018 19:12:00 +0000</pubDate><atom:updated>2018-04-07T22:12:49.366+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">java</category><category domain="http://www.blogger.com/atom/ns#">Kotlin</category><title>Kotlin. Good point.</title><description>Hi!&lt;br /&gt;
Long time no see.&lt;br /&gt;
&lt;br /&gt;
What I'm currently observing is the rise of Kotlin language. Kotlin is the child of JetBrains company which brought to us IntelliJ.&lt;br /&gt;
Why Kotlin could in the future replace Java? What are the selling points of Kotlin?&lt;br /&gt;
Let's try to figure this out:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Kotlin works on JVM.&lt;/li&gt;
&lt;li&gt;Kotlin can use all the java libraries.&lt;/li&gt;
&lt;li&gt;Java can call code written in Kotlin.&lt;/li&gt;
&lt;li&gt;Kotlin is open source.&lt;/li&gt;
&lt;li&gt;Kotlin is developed and supported by JetBrains.&lt;/li&gt;
&lt;li&gt;Google officially supports Kotlin as a second development language on Android platform.&lt;/li&gt;
&lt;li&gt;IntelliJ has very good support tooling for Kotlin.&lt;/li&gt;
&lt;li&gt;Spring Boot supports Kotlin.&lt;/li&gt;
&lt;li&gt;Spring Framework 5 supports Kotlin.&lt;/li&gt;
&lt;li&gt;Kotlin can be translated to java script.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
With Kotlin you can migrate the project in Java in small steps.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Is not it enough to sell Kotlin to management and start using it in production?&lt;/div&gt;
</description><link>http://tduglas.blogspot.com/2018/04/kotlin-good-point.html</link><author>noreply@blogger.com (Alexander Chernykh)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7705869048643923027.post-7953428110134816995</guid><pubDate>Mon, 25 Dec 2017 17:57:00 +0000</pubDate><atom:updated>2017-12-25T20:57:16.934+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">prolog</category><title>Prolog ideas</title><description>Here is my list of Prolog ideas:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;JSON parser&lt;/li&gt;
&lt;li&gt;HTTP requests parser&lt;/li&gt;
&lt;li&gt;Declarative UI&lt;/li&gt;
&lt;li&gt;Validation rules for UI&lt;/li&gt;
&lt;li&gt;Business logic in C\C++\Java&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
The idea of declarative UI I borrowed from the Turbo Prolog 2 User guide and Turbo Prolog Toolbox. It could be useful to have some intermediate UI form representation&amp;nbsp; in order to be able to translate it into different languages.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
As for the last topic it turned out to be easy embed tuProlog in Java. And I had a prototype where I call java methods from Prolog.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The later topics need to be researched further.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://tduglas.blogspot.com/2017/12/prolog-ideas.html</link><author>noreply@blogger.com (Alexander Chernykh)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7705869048643923027.post-6770227657121540487</guid><pubDate>Mon, 25 Dec 2017 15:40:00 +0000</pubDate><atom:updated>2017-12-26T17:01:54.034+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">turbo prolog</category><title>Turbo Prolog 2.0. Changes from 1.x.</title><description>&lt;h2&gt;
&lt;b&gt;&amp;nbsp;Turbo Prolog 2.0 change list&lt;/b&gt;&lt;/h2&gt;
- external database support with protected memory access&lt;br /&gt;
&lt;br /&gt;
- BGI interface support&lt;br /&gt;
&lt;br /&gt;
- improved text editor&lt;br /&gt;
&lt;br /&gt;
- ability to save trace to file&lt;br /&gt;
&lt;br /&gt;
- integers overflow check&lt;br /&gt;
&lt;br /&gt;
- stack check&lt;br /&gt;
&lt;br /&gt;
- error level&lt;br /&gt;
&lt;br /&gt;
- ability to call prolog predicates from Turbo C&lt;br /&gt;
&lt;br /&gt;
- conditional compilation support&amp;nbsp; (ifdef, ifndef, elsedef, enddef)&lt;br /&gt;
&lt;br /&gt;
- standart trap predicate&lt;br /&gt;
&lt;br /&gt;
- build with Turbo C 1.5&lt;br /&gt;
&lt;br /&gt;</description><link>http://tduglas.blogspot.com/2017/12/turbo-prolog-20-changes-from-1x.html</link><author>noreply@blogger.com (Alexander Chernykh)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7705869048643923027.post-2056472149897765653</guid><pubDate>Thu, 21 Dec 2017 09:35:00 +0000</pubDate><atom:updated>2017-12-21T12:35:27.129+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">prolog</category><title>W.F. Clocksin, C.S. Mellish. Programming in Prolog</title><description>Hi everyone.&lt;br /&gt;
&lt;br /&gt;
I have just read "Programming in Prolog" and wonder why this book is recommended for beginners?&lt;br /&gt;
&lt;br /&gt;
The most useful tip in this book is located at the end of it in appendix C:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
This book describes Prolog version which is not related to any particular existing version. The idea was to create the description of "general" Prolog which applies to all systems at once.&lt;/blockquote&gt;
&lt;blockquote class="tr_bq"&gt;
&amp;nbsp;The best way to learn Prolog system you have -- is to read user documentation supplied with it. &lt;/blockquote&gt;
&lt;br /&gt;
Wow! Such a wonderful advise. Why I have to read all the book till the end in order to find out this?&lt;br /&gt;
Beginners&amp;nbsp; will suffer a lot and will complain about Prolog. This shouldn't be like this.&lt;br /&gt;
&lt;br /&gt;
Please treat the book as an approach to explain ideas behind Prolog, not a tutorial.</description><link>http://tduglas.blogspot.com/2017/12/wf-clocksin-cs-mellish-programming-in.html</link><author>noreply@blogger.com (Alexander Chernykh)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7705869048643923027.post-6231442886941743693</guid><pubDate>Fri, 24 Nov 2017 09:13:00 +0000</pubDate><atom:updated>2017-11-24T12:13:24.688+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">prolog</category><title>Adventure in Prolog</title><description>Ever wanted to learn logic programming?&lt;br /&gt;
Wanna know how to program in Prolog?&lt;br /&gt;
&lt;br /&gt;
Wanna know how to integrate Java with Prolog?&lt;br /&gt;
&lt;br /&gt;
A lot of questions arise when we face with a "new" language such as Prolog.&lt;br /&gt;
After Java, Prolog looks like a fresh air. It has simple syntax, small number of concepts comparing to the OOP. For me the main advantage that it is a declarative language, not imperative.&lt;br /&gt;
&lt;br /&gt;
If you deal a lot with business rules in your programs you know how ugly imperative implementations look like. This could be the opportunity for Prolog and constantly changing business world.&lt;br /&gt;
&lt;br /&gt;
A lot of information exist about Prolog. What to start with?&lt;br /&gt;
IMHO &lt;a href="http://www.amzi.com/AdventureInProlog/" target="_blank"&gt;Adventure in Prolog&lt;/a&gt; could be a good introduction to Prolog. All concepts are introduced and presented with examples and small tasks.&lt;br /&gt;
&lt;br /&gt;
Examples could be run on almost any Edinburgh compatible Prolog. I use &lt;a href="http://apice.unibo.it/xwiki/bin/view/Tuprolog/WebHome" target="_blank"&gt;tuProlog&lt;/a&gt;. It runs on top of the JVM. Also it has a simple IDE, so you can just move straight to executing your code.&lt;br /&gt;
&lt;br /&gt;
I also started a new repo on &lt;a href="https://github.com/chernykhalexander/PrologExperiments"&gt;https://github.com/chernykhalexander/PrologExperiments&lt;/a&gt; for Prolog experiments.</description><link>http://tduglas.blogspot.com/2017/11/adventure-in-prolog.html</link><author>noreply@blogger.com (Alexander Chernykh)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7705869048643923027.post-8558982481698540155</guid><pubDate>Thu, 05 Oct 2017 20:44:00 +0000</pubDate><atom:updated>2017-10-06T15:10:00.551+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">thoughts</category><title>Blog promotion</title><description>Hi everyone!&lt;br /&gt;
&lt;br /&gt;
It is been a while since I wrote here. But in order to give some excuse I would like to present you the blog of a programmer:&amp;nbsp;&amp;nbsp;http://www.yegor256.com/.&lt;br /&gt;
&lt;br /&gt;
Why do I post it here? Well, I like that this man has his own opinion and he express it. A lot of computer topics are described - not only programming techniques, but management also. What is more - his opinion could be against with what everyone silently agree on. I like it. The more different angles of view we have at the topic the faster we can improve ourselves.&lt;br /&gt;
&lt;br /&gt;
The same thing could be applied to the project. I do not like when everyone is silently agreed on something in a project. If all the team is agreed on it means that either no one doesn't care about the project or there is no atmosphere where each member can express their opinion safely.&lt;br /&gt;
&lt;br /&gt;
Let's improve our projects.</description><link>http://tduglas.blogspot.com/2017/10/blog-promotion.html</link><author>noreply@blogger.com (Alexander Chernykh)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7705869048643923027.post-1122015026562343604</guid><pubDate>Wed, 30 Aug 2017 09:53:00 +0000</pubDate><atom:updated>2017-08-30T12:53:24.347+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">android</category><title>My top Android applications</title><description>&lt;br /&gt;
&lt;br /&gt;
I was disappointed that Microsoft doesn't produce windows phones any more and Nokia was sold. I have bought recently an Android phone Motorola Moto G4 plus and discovered Android and Play market.&lt;br /&gt;
&lt;br /&gt;
Android seems to be very attractive and positive. I use version 7. I like fingerprint authentication very much. But... Why by default a lot of settings are turned on considering information sharing and statistics gathering? I need to go through&amp;nbsp; the settings of Android and apps and turn off spy features.&lt;br /&gt;
&lt;br /&gt;
Play contains a lot of apps but a lot of them are a crap. I have also a concern why actually some applications asks for a permissions not related with a purpose of application? That is why it is better not to install the application but instead use web site.&lt;br /&gt;
&lt;br /&gt;
But anyway I decided to create my own top of applications I use.&lt;br /&gt;
&lt;br /&gt;
Productivity and entertainment: &lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Skype&lt;/li&gt;
&lt;li&gt;Whatsapp&lt;/li&gt;
&lt;li&gt;Google Chrome&lt;/li&gt;
&lt;li&gt;Google Gmail&lt;/li&gt;
&lt;li&gt;Google Maps&lt;/li&gt;
&lt;li&gt;Google YouTube&lt;/li&gt;
&lt;li&gt;Google Photos&lt;/li&gt;
&lt;li&gt;Google Calendar&lt;/li&gt;
&lt;li&gt;Google Translate&lt;/li&gt;
&lt;li&gt;RAR&lt;/li&gt;
&lt;li&gt;micro Mathematics&lt;/li&gt;
&lt;li&gt;TuneIn Radio&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Aviasales&lt;/li&gt;
&lt;li&gt;Gazeta.ru&lt;/li&gt;
&lt;li&gt;Moto File Manager&lt;/li&gt;
&lt;li&gt;Pocketbook&lt;/li&gt;
&lt;li&gt;FM Radio&lt;/li&gt;
&lt;/ol&gt;
Technical apps:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Speedtest&lt;/li&gt;
&lt;li&gt;CPU-Z&lt;/li&gt;
&lt;/ol&gt;
What are your favorite apps on Android? </description><link>http://tduglas.blogspot.com/2017/08/my-top-android-applications.html</link><author>noreply@blogger.com (Alexander Chernykh)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7705869048643923027.post-3695220637945217472</guid><pubDate>Wed, 23 Aug 2017 14:20:00 +0000</pubDate><atom:updated>2017-08-23T17:20:00.254+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">programming general</category><title>Static versus dynamic functional languages</title><description>Here is a nice post about choosing your future language: &lt;br /&gt;
http://blog.samibadawi.com/2016/03/static-vs-dynamic-functional-languages.html.</description><link>http://tduglas.blogspot.com/2017/08/static-versus-dynamic-functional.html</link><author>noreply@blogger.com (Alexander Chernykh)</author><thr:total>0</thr:total></item></channel></rss>