--JaroslavTulach 06:27, 22 October 2016 (UTC)
Keynote at GeeCON Prague - 2016-10-22 06:27:00
Beware of DefaultMethods - 2016-09-24 10:42:00
Distribute Non-distributable - 2016-09-12 08:55:00
Swing's Bad Reputation - 2016-08-26 10:37:00
Become Polyglot by Learning Java! - 2016-07-22 05:33:00
I was invited to give a talk at CurryOn 2016 about Truffle called Become Polyglot by Learning Java!. It provoked tweets like: If you only watch one talk from @curry_on_conf, this one from @JaroslavTulach on Graal/Truffle is stunning. Here is its recording:
Or go to YouTube page.
--JaroslavTulach 05:33, 22 July 2016 (UTC)
Pitfalls of APIReviews - 2016-07-17 13:38:00
There are two pitfalls of an APIReview. Either there is no code to review or there is too much code already written. The too little code case can easily be fixed. As Linus Torwalds use to say: Talk is cheap. Show me the code!
However what to do when APIReview brings in complex, complete solution with code almost ready for integration? Isn't that insulting? What kind of review one is supposed to perform then? Claim that the solution is completely wrong? That won't make the author happy. On the other hand coming for an architecture advice with fully working version isn't polite to reviewers either. Shall we read it as: Look how great I am! Approve the APIReview now!
Maybe there is a way to handle such review as well. But it remains to be seen if it works. Wish me luck.
--JaroslavTulach 13:38, 17 July 2016 (UTC)
Test your APIs Easily with Maven SigTest Plugin - 2016-07-15 17:52:00
The NetBeans API & Maven community (e.g. me and Miloš Kleint) is proud to announce the immediate availability of sigtest-maven-plugin. Signature testing has never been easier: just follow the tips on the SigTest main page and you'll never make an incompatible change since then!
--JaroslavTulach 17:52, 15 July 2016 (UTC)
Make Your Builder Whine! - 2016-06-26 20:00:00
Chameleon Builder: Changes its Return Color! - 2016-06-16 09:34:00
Hear the news! A new creature of the API design patterns rare species has been discovered. It looks like a builder pattern, but it ducks like something else. If you take a closer look you'll find out it is a chameleon! It changes its return type depending on its state.
Once you discover the beauty, you'll not stop until you get your own chameleon builder into your own design!
--JaroslavTulach 09:34, 16 June 2016 (UTC)
Builder to Tame Your Checked exception! - 2016-06-13 08:00:00
Boost Your Career: Become an API Tester! - 2016-06-06 08:13:00
Motto: the easiest way to learn something about a code base is to fix bugs. The easiest way to learn something about design API is to join an APIUsabilityStudy!
There are many reasons why you should care about the Truffle framework (please check the changelog of just released version 0.14 to learn more), but the most important one is related to API Design and your career:
I need API testers! I need to organize a usability study of the Truffle API and I need developers to perform it. How can you help?
Originally I wanted to repeat the previous success of netbeans:Html4JavaUXStudy2014, but the then used service is no longer available due to small demand. Understandable, but a shame! I know the demand for API related courses is low (I do one once a few years), but it is always very valuable to seek an advice when it comes to API - the on-line API usability study was really great idea! Alas, we need to organize it ourselves.
Are you interested to help us? If your want to be an API tester for a few hours, please write to my email firstname.lastname@example.org and I share more details. Thanks in advance!
--JaroslavTulach 08:13, 6 June 2016 (UTC)
Write Business Logic First, Choose UI Later! - 2016-05-09 03:45:00
This shows how extremely portable applications written with netbeans:Html4Java APIs are! In fact you can write your application code first and because it is completely independent from the UI, you can completely revamp the UI later.
Isn't this the flexibility we always wanted? Read the whole story...
--JaroslavTulach 03:45, 9 May 2016 (UTC)
Run JUnit in Your (Java Plugin-less) Browser! - 2016-04-30 07:24:00
- Better support for Annotation - so good that bck2brwsr can now execute JUnit tests
- Support for all classes from java.util.concurrent package, so JUnit runs without problems
- Switching to version 2.1.0 for retrolamda
- Uses version 1.3 of netbeans:Html4Java API.
- Record name of an OSGi bundle to be used when Maven coordinates are missing like in JUnit case
- Don't convert Date objects to current time millis
- Use boolean.valueOf() to simplify mixing of boxed and unboxed booleans
- Launcher.createBrowser can specify its own page
- Make sure class cast exception contains the same message as produced by JDK
- Convert undefined value read from arrays into null
- Turning the bck2brwsr VM into an OSGi bundle
- Introducing vmtest.precompiled=<regexp> property to verify that bck2brwsr generated resources are really used
- Don't include VM in VMTest initialization, let it be loaded on demand
- System.exit terminates associated launcher
- Don't report warnings when generating minified version of bck2brwsr libraries
Get the bits from the Maven central repository!
--JaroslavTulach 07:24, 30 April 2016 (UTC)
Giving Up on Apple AppStore - 2016-04-09 06:13:00
My MineSweeper application available from AppStore is gone. Apple wants me to pay remedies every year! For what!? Apple has no cost distributing my application. I am giving up. If somebody wants to distribute my MineSweeper, please go on, but I am giving up - giving up on Apple.
--JaroslavTulach 06:13, 9 April 2016 (UTC)
HTML/Java API 1.3 is Released! - 2016-04-08 03:33:00
HTML/Java 1.3 comes with many improvements that will make your life easier and enlarge the options you have when mixing Java and HTML. Let me quote the Javadoc:
--JaroslavTulach 03:33, 8 April 2016 (UTC)
Uncheck Your Checked exception! - 2016-04-06 16:26:00
Do you believe people should only use runtime exceptions? That checked exception add too much overhead? Then you are wrong!
--JaroslavTulach 16:26, 6 April 2016 (UTC)
API Design under Attack! - 2016-02-10 19:54:00
Today my colleagues from NetBeans noticed that my website - wiki.apidesign.org is under attack. Yes, since Jan 16, 2015 there were more than 5000 randomly modified pages. Maybe my talk in Grenoble was so popular that it attracted that much attention!?
Anyway I had to revert back to older copy of the database and re-apply my edits manually. Not everything looks the same as it did before, but hopefully no texts are lost.
--JaroslavTulach 19:54, 10 February 2016 (UTC)
Snowcamp in Grenoble gave Bck2Brwsr 10x Speed Up! - 2016-01-28 07:56:00
The daily work on Truffle compiler team and the time I got when traveling from Snowcamp at Grenoble gave me a chance to speed Bck2Brwsr up. The sieve being a nice - e.g. small and focused - benchmark. Originally the algorithm couldn't be finished in a reasonable time when running on old version of Bck2Brwsr, but knowing what optimizing compilers seek for, it was relatively easy to speed it up ten times.
With great pleasure I announce that Bck2Brwsr, the most complete Java VM in browser (that can run Javac as shown by Dew project) has been sped up many times being at most three times slower than HotSpot. Given the primary goal of Bck2Brwsr is modularity and not speed, I consider it a good sped up even knowing there is a room to make it even faster.
Enjoy the Bck2Brwsr 0.17's speed!
--JaroslavTulach 07:56, 28 January 2016 (UTC)
Improve Javadoc of Your API: Stop showing crappy code samples! - 2015-12-30 15:59:00
Btw. it surprises me I am the first one who created something like this! Showing snippets in documentation is so common. But maybe it is the same issue as with TheAPIBook - it was the first book that ensured all the code samples are compilable by extracting them from real source code (using similar infrastructure as Codesnippet doclet provides). And it worked - while Errata of every book is full of comments about incorrect code samples, there is none for TheAPIBook.
--JaroslavTulach 15:59, 30 December 2015 (UTC)
MineSweeper 3.0 for Your iOS Device. The Christmas Thriller Edition! - 2015-12-18 05:07:00
Well, Apple's itunesconnect website is unusable - it isn't enough to upload new version of your application and press button Request Review. The user interface is completely messed up and hidden to make the process as obscure as possible. As a result MineSweeper was laying on the AppStore for six weeks before I found the right address (also pretty hidden) to complain at and was explained what is wrong.
Then, of course, the usual reject. This time it was due to Using images that resemble(!) Apple logo - yes, the MineSweeper is using Safari and iOS icon (check the on-line version). But these icons were present in the previous AppStore version as well. And version 2.3 was approved! Clearly the whole review process suffers from the human factor of the reviewer. What some reviewers find appropriate isn't appropriate for others.
How can I know this is a human factor? Because the new version of the MineSweeper of iOS comes with three translations - English, Czech and German (thanks to Toni) - and I am sure the reviewers checked just the English one. If the check was automatic - e.g. some scan through the binary - my submission might have been rejected again. Thankfully it wasn't. It is great we made it before Christmas, as next week the whole AppStore team is going for a vacation...
Here are the changes against standard MineSweeper source code to make the application releasable on the AppStore this time: https://github.com/jtulach/minesweeper/compare/9fc7970496a...0d6984c73
Enjoy version 3.0 of Fair MineSweeper on AppStore. Visit https://itunes.apple.com/us/app/fair-minesweeper/id903688146 to play fair!
--JaroslavTulach 05:07, 18 December 2015 (UTC)
Introducing Sigtest into Your Project Workflow! - 2015-11-23 10:34:00
Truffle project is using Sigtest since today. I am maintaining the Truffle APIs since May, 2015 and I was applying my best knowledge and skills to design it properly. However I have to admit, I was operating in a blindness. Without having tests it is hard to decide whether your code change doesn't break your product. When designing API, it is important to know whether a change is or isn't backward compatible. Without a tool like Sigtest, it is almost impossible to do that manually!
--JaroslavTulach 10:34, 23 November 2015 (UTC)
OracleLabs in Prague is Hiring! - 2015-10-07 07:44:00
OracleLabs has a team in Czech Republic and is looking for new candidates to expand it. Innovation is feeding us, but that doesn't mean you have to be a scientist. We have enough clever people - we need also somebody to work!
--JaroslavTulach 07:44, 7 October 2015 (UTC)
Can Java Speed Ruby up? Yes, ten times! - 2015-10-02 12:28:00
Speed of Ruby has never been great. There were many attempts to improve it, but none delivered on its promise. All failed, but one! JRuby implementation running on top of JVM spiced with a bit of Truffle and Graal is in fact ten times faster than standard Ruby version.
--JaroslavTulach 12:28, 2 October 2015 (UTC)
Speaking at JDD in Krakow - 2015-09-25 09:31:00
I enjoyed Krakow JDD conference in 2013 and based on my experiences I wrote the languages essay. Now I am invited to speak at JDD 2015 about Truffle and Graal and while there I am also going to do a workshop about DukeScript.
If you have a message that I should share with visitor's in Krakow, leave it here:
--JaroslavTulach 09:31, 25 September 2015 (UTC)
Truffle Debugging in NetBeans 8.1 - 2015-09-11 14:10:00
HTML/Java version 1.2.1 has been Released! - 2015-09-02 06:16:00
Cross platform UI library called HTML/Java API (which is developed by the NetBeans project) is proud to announce that version 1.2 has just been released on Maven central. See javadoc to find out what is new in this version!
The project is also glad that binaries of the new HTML/Java version 1.2 are now included in forthcoming NetBeans 8.1 release making it easy to develop wizards as well as components and dialogs in a cross-platform manner (e.g. able to run in NetBeans platform applications, IDE, Eclipse RCP, plugin-less browser and thanks to adoption by DukeScript project also on iOS and Android).
--JaroslavTulach - HTML/Java inventor 06:16, 2 September 2015 (UTC)
Design with Truffle. Get Debugger for Free! - 2015-06-24 16:04:00
The picture shows NetBeans debugger stopped in middle of simple language (an artificial language used for demo purposes) method. NetBeans knows nothing about simple language (that is why syntax coloring is missing), but as NetBeans understands the Truffle AST, it can still provide enough valuable information in the debugger.
Please note that the name of the method is properly recognized and shown on top of the stack. Variables a and b and their values are properly shown as well.
--JaroslavTulach 16:04, 24 June 2015 (UTC)
Enforcing Proper API Usage by Law - 2015-06-15 09:21:00
Enforcing proper usage of an API is hard. One needs to strive for clarity, one can invent engineering solutions to the problem, but at the end clever hacker always find a way around it. But there is a cure: Let's choose our licenses wisely and scare the hackers with legal actions!
At the end it could also solve the famous sun.misc.Unsafe issue...
--JaroslavTulach 09:21, 15 June 2015 (UTC)
Is localizing an API bad idea? - 2015-05-31 07:48:00
--JaroslavTulach 04:10, 29 May 2015 (UTC)
API Design as a Service - 2015-05-17 10:26:00
Domain Expert is a person who has knowledge of a particular system. With such knowledge it may seem easy to design APIs for the domain. However without understanding the API Paradoxes the quality of such API may not be high. It is likely going to cover the domain field, but the API usability or readiness for evolution will very likely suffer (unless such Domain Expert reads TheAPIBook first).
This is a new situation for me: In case of NetBeans or in case of HTML/Java APIs, I was also the architect of the system. I knew it by heart. Now I barely understand how Truffle works and what makes it the fastest execution system for dynamic languages. My biggest fear is that I will design something that will be inherently slow.
On the other hand, I am not yet damaged with the expert knowledge. I can still see the system with new comer eyes - just like you, users of Truffle will. As such I can perform a usability study on me, at least initially.
If I can design easy to use APIs for Truffle, then I can create a perfect API facade around everything! Soon we'll have a chance to see whether one can be good API designer without being real Domain Expert. Soon we'll find out if API Design can be offered as a service!
--JaroslavTulach 10:26, 17 May 2015 (UTC)
NetBeans History: University Beginnings - 2015-03-20 16:04:00
The original name of the project was Xelfi and it started at MatFyz faculty of Charles University in middle of 90-ties. However it was so successful that it had to turn into something as successful as NetBeans. In case you are satisfied with your IDE, consider reading about its root...
--JaroslavTulach 16:04, 20 March 2015 (UTC)
Gradle belongs to Stone Age! - 2015-03-15 15:56:00
ConfigurationObject Pattern in Java - 2015-02-22 12:44:00
Final interface. Finally Done Right! - 2015-02-04 16:53:00
Maybe there is nobody interested in final interface API Design Pattern anymore! Now when there is JDK8 with extender methods people may always mitigate bad design (e.g. using final interface at all) by adding methods with default bodies. Still I found it important to cover this pattern in my API Design Patterns Collection.
Let's me guide you through the short and incomplete history of final interface design pattern with small excursion to JDK's own itches and specifics of designing for OSGi to finally describe how to do final interface pattern right!
Let you find such description useful!
--JaroslavTulach 16:53, 4 February 2015 (UTC)
Bck2Brwsr @ 0.13 Released - 2015-01-12 09:27:00
Impossible. Part II. - 2015-01-03 19:23:00
Everybody understands threading is complex. Yet almost everyone believes that with good methodology it is possible to do threading right. Well, it is not. There is no theory to eliminate deadlocks. Achieving proper threading is impossible. Still people keep asking for it. When you tell them it is impossible, you may get fired. Just like me few years ago! Here is my story.
--JaroslavTulach 19:23, 3 January 2015 (UTC)
Bck2Brwsr @ 0.12 Released - 2015-01-01 21:53:00
Bck2Brwsr 0.12 has been released. What is new?
Libraries can be pre-compiled and published as Maven artefacts (see Bck2BrwsrLibraries how to). The Knockout4Java Maven archetype has been modified to use the precompiled version of Bck2Brwsr rt. jar emulation library and HTML/Java APIs:
$ mvn archetype:generate \ -DarchetypeGroupId=org.apidesign.html \ -DarchetypeArtifactId=knockout4j-archetype \ -DarchetypeVersion=1.1.2 \ -Dbck2brwsr=true # answer few questions... $ cd nameofyourproject # run on desktop $ mvn process-classes exec:java # run in a browser $ mvn -Pbck2brwsr clean package bck2brwsr:show
--JaroslavTulach 21:53, 1 January 2015 (UTC)
BinarySelection - #1 Rule of HR - 2014-12-23 06:20:00
BinarySelection plays (except having its classical search meaning) an important role in theory of HR management. It defines what happens when employees are leaving the employer (either voluntarily or after being fired):
BinarySelection means, that "ones" leave and "zeros" stay.
I mention this definition whenever we chat about life of software developers and it always generates grin smile. Of course, because it is so true! I can confess that as for last seventeen years I have been sticking with my job surviving any layoffs and acquisitions: I've seen so many "ones" leaving, but the rest of us is still marching on!
--JaroslavTulach 06:20, 23 December 2014 (UTC)
Publish Bck2Brwsr Libraries as Maven Artifacts - 2014-12-07 05:21:00
Wrap Your JAR as OSGi Bundle via Maven Easily! - 2014-11-29 13:07:00
Not all artifacts in a Maven repository are packaged as OSGi bundles. Yet, some systems (like for example the Bck2Brwsr ahead-of-time compiler) require JAR to contain OSGi meta-data. Luckily there is a simple way to turn any JAR into OSGi bundle by creating a simple Maven project. Here is the sample pom.xml:
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" > <modelVersion>4.0.0</modelVersion> <groupId>your.group.id</groupId> <artifactId>jar-id</artifactId> <version>1.0-SNAPSHOT</version> <packaging>bundle</packaging> <!-- we want to produce an OSGi bundle --> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <repositories> <!-- we are wrapping a JAR from NetBeans Maven repository --> <repository> <id>netbeans</id> <name>NetBeans</name> <url>http://bits.netbeans.org/maven2/</url> </repository> </repositories> <dependencies> <!-- specify the dependency you want to wrap as OSGi bundle --> <dependency> <groupId>org.netbeans.external</groupId> <artifactId>nb-javac-api</artifactId> <version>RELEASE80</version> <!-- we need the dependency only during compilation --> <scope>provided</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>2.3.7</version> <extensions>true</extensions> <configuration> <instructions> <!-- export the packages that should be externally accessible --> <Export-Package>javax.*</Export-Package> <!-- list other packages that should be included in your bundle --> <Private-Package>com.sun.*</Private-Package> </instructions> </configuration> </plugin> </plugins> </build> </project>
And that is all! After building the project, you'll get an OSGi bundle that contains all the classes from the specified dependency found in exported and private packages. Just copy the above text into pom.xml file and in its directory execute yourself:
$ mvn package $ unzip -l target/jar-id-1.0-SNAPSHOT.jar # shortened ... 4539 2014-02-14 11:52 com/sun/source/util/Trees.class 125 2014-02-14 11:52 com/sun/source/util/package-info.class 5109 2014-02-14 11:53 javax/annotation/processing/AbstractProcessor.class # ...shortened $ unzip -p target/jar-id-1.0-SNAPSHOT.jar META*MAN* Manifest-Version: 1.0 Bnd-LastModified: 1417267436493 Build-Jdk: 1.8.0_25 Bundle-ManifestVersion: 2 Bundle-Name: jar-id Bundle-SymbolicName: your.group.id.jar-id Bundle-Version: 1.0.0.SNAPSHOT Created-By: Apache Maven Bundle Plugin Export-Package: javax.annotation.processing;uses:="javax.lang.model,java x.tools,javax.lang.model.element,javax.lang.model.util";version="1.0.0. SNAPSHOT",javax.lang.model.util;uses:="javax.annotation.processing,java x.lang.model,javax.lang.model.element,javax.lang.model.type";version="1 .0.0.SNAPSHOT",javax.lang.model;uses:="javax.lang.model.element";versio n="1.0.0.SNAPSHOT",javax.tools;uses:="javax.lang.model.element,javax.an notation.processing,javax.lang.model";version="1.0.0.SNAPSHOT",javax.la ng.model.type;uses:="javax.lang.model.element,javax.lang.model";version ="1.0.0.SNAPSHOT",javax.lang.model.element;uses:="javax.lang.model.type ,javax.lang.model";version="1.0.0.SNAPSHOT" Import-Package: javax.annotation.processing,javax.lang.model.element,jav ax.lang.model.type,javax.lang.model.util,javax.tools Tool: Bnd-1.50.0
--JaroslavTulach 13:07, 29 November 2014 (UTC)
Bck2Brwsr and Images as Resources - 2014-10-30 01:19:00
Impossible. Part I. - 2014-10-20 14:25:00
Explaining that something is impossible is, well impossible! Here is a link to one viral video and one story from my computer science student years, which is so true, I would almost cry. In case you find my impossible story interesting, let me know. I have at least two more on the same impossible topic!
--JaroslavTulach 14:25, 20 October 2014 (UTC)
Duke Choice Award - 2014-09-29 17:37:00
invokeDynamic is wrong idea. Especially for implementation of lambdas! - 2014-09-25 12:50:00
When I was younger I used to believe that having invokeDynamic instruction in JVM can be beneficial. Now, few years later and after spending time to implement lambdas in my Bck2Brwsr VM and seeing things from the other side I have to admit I was wrong. invokeDynamic is wrong idea (especially for implementation of lambdas).
It is JavaOne time, I have a talk about my Bck2Brwsr together with Niclas from RoboVM, so let's show I understand what is wrong with JVM and start a little rant! I need something from the JDK guys, so let's give them a reason to welcome me with open arms when we see each other in San Francisco:
--JaroslavTulach 12:50, 25 September 2014 (UTC)
Lambdas Go Bck2Brwsr! - 2014-09-15 17:48:00
--JaroslavTulach 17:48, 15 September 2014 (UTC)
Play MineSweeper to Become iOS, Android, JavaFX & co. Developer - 2014-09-15 10:57:00
JavaOne2014: Need Speakers for My Session! - 2014-09-10 18:56:00
JavaOne2014 is around the corner and my sessions have been scheduled. I start with a BOF on Monday evening called Virtually Inside-Out! - it is going to be discussion between authors of alternative JVMs. So far we are two: I have mine Bck2Brwsr and Niklas has RoboVM.
Don't you know a developer working on own JVM who will be at JavaOne2014? If so, please tell him to contact me and stop by! I plan to make the BOF a lively chat (how did you implemented lambdas?, how did you implemented defender methods?), but in case we don't have a topic to talk about, I am ready to explain why value classes should not be in JVM and why InvokeDynamic is a completely stupid idea. Anyone from JDK team to defend these proposals?
On Tuesday morning Toni and me will continue with DukeScript tutorial. In case you use Java and want to learn how to code for iOS, Android, JavaFX and browsers, stop by. We will help you create your first application that is written once and displayed anywhere!
I'll finish on Tuesday noon talking about API Design checklist. I'd like to name at least ten things one should check for, but so far I have about two. Don't you have any idea what could be in such checklist? If so, please talkback!
--JaroslavTulach 18:56, 10 September 2014 (UTC)
Develop in NetBeans and Deploy to AppStore - 2014-08-21 15:29:00
Minesweeper for iOS has been published. First iBrwsr powered DukeScript application has been deployed to AppStore. If you own an iPad or iPhone, give it a try: https://itunes.apple.com/us/app/fair-minesweeper/id903688146
--JaroslavTulach 15:29, 21 August 2014 (UTC)
Sources for the Practical API Design book - 2014-08-08 11:16:00
Hear the news: Sources in ZIP format are back!
My Hudson server crashed in early months of 2014. I had to configure it from scratch. While doing so, I forgot to configure the job to produce apidesign.zip file with sources. Has anyone noticed? Nobody sent me an email! Just yesterday Jáchym, my co-worker, who I torture by forcing him to read TheAPIBook and become good API designer, stopped in my office and timidly asked: Where can I get the sources? There is no ZIP file!
For a while I tried to blame him for not using Mercurial, but after a while I realized the problem is on my side. As a result, the zip file with sources is back as of Aug 8, 2014. Will anyone use them? It would be nice as reading Practical API Design book without having whole sources at your hand is like trying to understand Swing just by reading its Javadoc.
--JaroslavTulach 11:16, 8 August 2014 (UTC)
Develop in NetBeans and Deploy to GooglePlay - 2014-07-31 05:17:00
Minesweeper for Android has been published. First DlvkBrwsr powered DukeScript application has been deployed to GooglePlay. Give it a try: https://play.google.com/store/apps/details?id=org.apidesign.demo.minesweeper
--JaroslavTulach 05:17, 31 July 2014 (UTC)
Japanese Translation is Real - 2014-07-17 06:51:00
Use NetBeans to Deploy Everywhere! - 2014-06-18 11:09:00
Client Java everywhere is now possible thanks to essential part of DukeScript - its capability to deploy to almost any device on the planet (that can render HTML). One can configure everything in an IDE independent way, but the best way to start is to get your instance of NetBeans 8.0 and follow few easy steps described in the official DukeScript getting started document.
--JaroslavTulach 11:09, 18 June 2014 (UTC)
Bck2Brwsr Revision 0.9 is Released! - 2014-06-10 06:34:00
Version 0.9 eliminates useless stack assignments. Instead of doing
var stI0 = lcI0; var stI1 = lcI1; var stI0 = stI0 + stI1; return stI0;
the now generated code is
return lcI0 + lcI1;
Optimized the ahead-of-time compilation, so now the http://xelfi.cz/minesweeper/bck2brwsr/ demo starts up instantly. I had to do it, because it was so embarrassing to see TeaVM to boot the same application so quickly: The initial delay is gone, and moreover it downloads necessary libraries in parallel and on background. Now we are ready for next step: share the libraries between different applications.
--JaroslavTulach 06:34, 10 June 2014 (UTC)
Podcast related to Japanese Translation - 2014-06-02 18:45:00
MineSweeper on iOS - 2014-05-21 14:13:00
Epistemology of Software Design - 2014-05-15 20:01:00
Epistemology of software design by Nathan is online! I greatly recommend it to everyone who wants to produce software that lasts! After all those years with NetBeans I can only confirm everything Nathans describes!
If you want to stop being a software engineer and become software architect, epistemology of software design is one of the things you have to memorize!
--JaroslavTulach 20:01, 15 May 2014 (UTC)
Lower Your Profile! Adopt JDK8! - 2014-03-23 11:40:00
TeaVM Can Execute DukeScript Applications! - 2014-03-20 14:27:00
Alexey just released his first version of TeaVM. Congratulation!
Well, everyone now writes virtual machines that run in a browser, but TeaVM is special - rather than separating and playing on its own sand field - Alexey decided to speak DukeScript. As a result, the same application can now be deployed to Bck2Brwsr and TeaVM and we can compare which virtual machine is better - or at least play minesweeper 1 and minesweeper 2.
--JaroslavTulach 14:27, 20 March 2014 (UTC)
--JaroslavTulach 15:53, 20 February 2014 (UTC)
Avoid Synchronization Problems - 2014-02-14 16:24:00
It, this and that: Optimizing for Cost of Ownership - 2014-02-11 10:53:00
Good Advice - 2014-02-06 08:04:00
How do you recognize Good Advice? We already know what a good technology is, can we use the same concept to evaluate whether an advice is good or not? Let me answer that by a quote from TheAPIBook which Yoshiki asked about:
Part 1 presents all of API design as a scientific discipline with a strong rational background, not as the art that it sometimes pretends to be. It defines terminology and initial prerequisites that can objectively help us measure if an API design is good. These rules try to be language neutral and applicable to any programming language, not just Java. The theory is unlikely to be complete. Other principles of API design exist elsewhere or are still waiting to be discovered.
However, that should not scare us, as Chapter 1 gives us a tool to evaluate the quality of various principles to find out whether a certain piece of advice helps us design better shared libraries and their APIs or not. It gives us the grand meta-principle: selective cluelessness. This cluelessness is a tool that can measure whether various goals really help. That’s because if they allow people to know less while achieving more and building better software systems more easily, then this advice is good. There is a need for this advice, especially in the future, when software systems will outsize the intellectual capacity of any of their designers.
Yoshiki: What do you mean by this advice?
"this advice" is a reference to advice mentioned in "to find out whether a certain piece of advice helps us design better shared libraries". To rephrase: any advice that helps users increase cluelessness is good and it will be even more valuable in the future when we start to build even bigger systems.
--JaroslavTulach 08:04, 6 February 2014 (UTC)
Japanese Translation of Practical API Design - 2014-01-27 09:28:00
--JaroslavTulach 09:28, 27 January 2014 (UTC)
Changes: HTML for Java, videos and hosting - 2014-01-14 08:24:00
I'd like to announce few changes related to apidesign.org site.
First of all, the Knockout4Java is now a NetBeans subproject and yesterday I managed to release its first bits as a stable version 0.7 - follow three simple steps to see how powerful Java/HTML user interface can be.
The other change is that I am migrating the whole website to new hosting infrastructure. Sources are up, mediawiki as well. However I still need to recover mailing lists, etc. If you find something that is not working and should, please Talkback. Thanks in advance.
One thing you don't have to complain is lack of videos - this is what one gets when using a cloud service! My uploaded screencasts had been found inappropriate and were deleted - after four years of being OK! Should I upload the backup copies (that I can find) elsewhere or rather host it myself?
--JaroslavTulach 08:24, 14 January 2014 (UTC)
Unify Eclipse and NetBeans UI - 2013-12-21 18:01:00
--JaroslavTulach 18:01, 21 December 2013 (UTC)
JavaFX for iOS via NetBeans - 2013-12-10 12:42:00
With the help of Prague's JavaFX iOS team we now have a NetBeans plugin that helps anyone develop JavaFX based Java apps for iOS. Many thanks should also go to RoboVM guys for creating such easy to use Maven plugin.
--JaroslavTulach 12:42, 10 December 2013 (UTC)
API Design Guidelines - 2013-12-02 09:30:00
Cloud IDE for Kids - 2013-12-02 08:48:00
The Smallest Linux JDK - 2013-11-27 15:12:00
DEW - Java Meets Web with Your Help! - 2013-10-28 16:56:00
--JaroslavTulach 16:56, 28 October 2013 (UTC)
Pervert Your Language to Become a Better Programmer - 2013-10-16 13:02:00
Do You Know What a WeakReference Can Do to Your API? - 2013-10-11 08:50:00
Maven and Bck2Brwsr 0.8 - 2013-09-29 12:22:00
Can Deserialization Change Value of a Final Field? - 2013-09-23 16:58:00
The Art of Writing Equals in Object Oriented Languages - 2013-09-06 08:53:00
Use the Debugger, Stupid! - 2013-08-20 09:17:00
JDK8's Profiles in the Light of Harmony - 2013-08-12 14:54:00
A curious translator of my book asked me about project Harmony. That motivated me to sit down and write an incomplete and mostly wrong history of open source java implementations. While incomplete (for example it does not talk by whom Harmony was founded and why), it explains why JDK8 is/will be a huge step forward and what will be its most important feature. Btw. if you thought lamdas, you were wrong.
--JaroslavTulach 14:54, 12 August 2013 (UTC)
Bck2Brwsr Goes Server Side: Run the Same Code on Server and Client! - 2013-05-20 12:45:00
I'd like to introduce my small contribution to Jersey project. It provides (yet another, but this time very lightweight) converter from Java to JSON and back. Together with Bck2Brwsr or FXBrwsr you can now smoothly execute the same Java code on client as well as on your server.
--JaroslavTulach 12:45, 20 May 2013 (UTC)
Introducing Knockout4Java - 2013-05-16 21:32:00
Bck2Brwsr 0.7 Released! - 2013-05-09 07:50:00
- FXBrwsr with full debugging support and a demo
- Dual Twitter demo - single source code, dual deployment (watch the same demo)
- Lightweight, generic JSON <-> Java mapping: javadoc
- ProviderAPI and a TCK to bind to other technologies than Bck2Brwsr, Knockout.js and FXBrwsr: javadoc
- Follow naming convention -- now bck2brwsr-maven-plugin -- thanks to Miloš Kleint
--JaroslavTulach 07:50, 9 May 2013 (UTC)
Introducing FXBrwsr - 2013-04-30 09:25:00
Bck2Brwsr 0.6 is Released! - 2013-04-14 21:24:00
Now you can write your own real applications for browser in Java:
- Full featured demo Twttr demo
- Bck2Brwsr provides better binding of complex classes (defined by a special @Model) annotation
- The @Model classes can be obtained from a server via JSON and JSONP. Use @OnReceive annotation
- Browser testing harness has nicer output with UL and expandable LI
--JaroslavTulach 21:24, 14 April 2013 (UTC)
Older Blog Posts - 2013-04-14 21:00:00
Cimrman's Planning - 2013-03-19 15:10:00
Javadoc for Coding for Your Browser Published! - 2013-03-01 09:11:00
Platón's Theory of Ideas for Developers - 2013-01-21 08:45:00
Those of you who heard about Platon in school probably also hard about his allegory of a cave (at least I did when I was at high school). It is not often easy to imagine what Platon meant by the cave, shadows, etc. Luckily (at least for developers who know what geometry is), there is a better explanation which which explains Platon's theory of ideas via geometry.
This geometric way of explaining [[ideas was much easier for me to swallow. That is why I decided to share it here.
--JaroslavTulach 08:45, 21 January 2013 (UTC)
On the fact that the Atlantic Ocean has two sides - 2013-01-17 11:56:00
Here are selected notes from my favorite write up by Edsger W. Dijkstra (the guy that invented semaphore). Few decades has passed since the initial publication and the difference between U.S. and Europe may not be as sharp anymore. Still, a lot of Dijkstra's comments apply - especially when it comes to the clash between programmers educated in soft vs. real science schools!
Btw. should this kind of analysis be found interesting, I can share another one: Why our U.S. friends can't read maps and are not aware of that. Just let me know if I should publish it.
--JaroslavTulach 11:56, 17 January 2013 (UTC)
Having a Hammer All Problems Look Like a Nail - 2012-11-12 13:37:00
TransitivityOfIncompatibleChange - 2012-11-07 02:00:00
A nice clash between real world and academic attempts to describe it can be seen on the case of TransitivityOfIncompatibleChange. While such transitivity is an easy to grasp concept, it is too simplistic and often too hard to apply for the real world of software dependencies. It took me a while to understand its alternative, but now I think I see it.
Last week I had a presentation about the topic of NP-Complete problems in module dependencies at MatFyz and one of the questions was: Why am I not using TransitivityOfIncompatibleChange in case of repositories with RangeDependencies? Well, I don't as it does not have a clear meaning. But the question forced me to sit and write the answer down.
--JaroslavTulach 02:00, 7 November 2012 (UTC)
Is Java a Language or a Framework? - 2012-10-18 09:06:00
20 API Paradoxes Published! - 2012-10-11 18:11:00
Today I am ready to announce great news. My new book about 20 API Paradoxes is now publicly available. I'd like to thank everyone who helped me get it to e-readers all over the globe. Jeff corrected my English and made the structure of the book more consistent. Clay stopped me when I wanted to expand the scope and delay the publication. And, most importantly, Clay is responsible for this fantastic cover:
I hope you like the cover too. And not only that, I hope you'll like the content as well. Buy & enjoy!
--JaroslavTulach 18:11, 11 October 2012 (UTC)
C++ May Not Be As Bad As Thought! - 2012-09-27 07:40:00
Do you remember my recent post about object oriented encapsulation and performance? It was written in a response to an article that claimed C is much better than C++. There in given example nicely illustrates that by giving up on encapsulation one can implement more effective linked list. In my recent post I managed to prove that by using traits, one can easily get the same performance while keeping encapsulation in modern object oriented language. Only one question remained: Can one do the same with C++ templates?
I am glad to report we have an answer with a sample code. There is a way to write generic template (well two of them) and orchestrate them in a way that keeps encapsulation and maintains the C linked list performance. C++ is not as bad as I thought.
Last note related to this incident (influenced by book I am currently reading). There are tons of comments attached to the original article yet most of them are really shallow. Usually along the line of that is a non-sense!, use STL! or C rules, I knew it!. I guess this has something to do with Thinking, Fast and Slow: people were provoked to react instantly by seeing a topic they had already have an opinion about. Without really giving the issue a though, they replied using fast thinking.
It took me a weekend to come up with the trait solution and we needed about a week to polish the C++ sample code. Looks like a little bit of slowness can worth tons of fast made opinions. But that is for another story - first of all I need to finish reading Thinking, Fast and Slow book.
--JaroslavTulach 07:40, 27 September 2012 (UTC)
Older Blog Posts - 2012-09-27 07:00:00
100th Monkey Principle. Multicasting in a Nature? - 2012-08-08 19:29:00
James Borowski on 100th Monkey principle:
Found reading some stuff on your site really interesting. I have not finished reading yet, so, forgive me if you already know this, but I was reading the article DiamondsVsStars and wondered as I read your comments regarding the "something in the air" as people around the world all discover something at the same time, if you were aware of the 100th Monkey principle?
There are different versions of the tale, but essentially, there was an island with a load of monkeys that learnt a trait one at a time of how to knock nuts with a rock to get inside them (other versions of the story are about learning to wash them, but the principle is the same). It took a while for monkeys to copy each other, one at a time, and the speed of uptake was essentially linear and at a fixed rate until they reached the 100th Monkey. At this point, every monkey on the island, and every monkey on the three neighbouring islands all started the same trait, almost instantly. The point is: A species appears to be connected at some vibrational level to the extent that they share certain thought processes/notions. There is a tipping point (apparently this is the square route of 1% of the population pool / or 100 monkeys ) where once reached, this information is availiable to all. Almost as if an entire species are listening on the same multicast address.
Anyway, hope you find as interesting as I found your stuff. For more info see 100th Monkey at wikipedia.
Thanks, for sharing this observation, James!
--JaroslavTulach 19:29, 8 August 2012 (UTC)