tag:blogger.com,1999:blog-1392748891339897691.comments2024-01-04T10:07:45.465+01:00Thomas Andreas Jung's BlogThomas Junghttp://www.blogger.com/profile/13153488692248832865noreply@blogger.comBlogger44125tag:blogger.com,1999:blog-1392748891339897691.post-18943772389884216082022-01-29T13:42:55.346+01:002022-01-29T13:42:55.346+01:00Revert as a comic: https://theoatmeal.com/comics/c...Revert as a comic: https://theoatmeal.com/comics/creativity_erasers.Thomas Junghttps://www.blogger.com/profile/13153488692248832865noreply@blogger.comtag:blogger.com,1999:blog-1392748891339897691.post-88560845573120770842018-02-04T13:20:37.603+01:002018-02-04T13:20:37.603+01:00Not much love for Clean Code, mocks and small func...Not much love for Clean Code, mocks and small functions<br /><br />https://medium.com/@copyconstruct/small-functions-considered-harmful-91035d316c29Thomas Junghttps://www.blogger.com/profile/13153488692248832865noreply@blogger.comtag:blogger.com,1999:blog-1392748891339897691.post-87199807936473580412018-02-04T13:19:23.101+01:002018-02-04T13:19:23.101+01:00This comment has been removed by the author.Thomas Junghttps://www.blogger.com/profile/13153488692248832865noreply@blogger.comtag:blogger.com,1999:blog-1392748891339897691.post-9197194344056473502015-04-23T18:11:59.527+02:002015-04-23T18:11:59.527+02:00You have a spelling error in:
import static net.ja...You have a spelling error in:<br />import static net.java.quickcheck.generator.PrimitiveGeneratrsIterables.*;<br />import static net.java.quickcheck.generator.PrimitiveGeneratorsIterables.*;Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1392748891339897691.post-74998510847276958972015-02-15T18:03:41.577+01:002015-02-15T18:03:41.577+01:00awesome list of examples that really helps to clar...awesome list of examples that really helps to clarify usageAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-1392748891339897691.post-5687582188077997832013-09-26T19:18:59.894+02:002013-09-26T19:18:59.894+02:00Nice article. Help us restore the history of a fil...Nice article. Help us restore the history of a file which was deleted and recreated, resulting in loss of history.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1392748891339897691.post-21018244423604025272013-07-26T04:07:39.148+02:002013-07-26T04:07:39.148+02:00This comment has been removed by a blog administrator.Velvahttp://topconvertiblecarseatreviews.net/noreply@blogger.comtag:blogger.com,1999:blog-1392748891339897691.post-47063122059618211752012-05-11T07:41:58.148+02:002012-05-11T07:41:58.148+02:00Thank you so much! I was looking for the solution....Thank you so much! I was looking for the solution... great, now I've also figured out what mvn archetypes are for.<br /><br />Thank you!!!Vlad Patryshevhttps://www.blogger.com/profile/13466586996802181998noreply@blogger.comtag:blogger.com,1999:blog-1392748891339897691.post-32587029079389171772012-04-05T22:42:22.912+02:002012-04-05T22:42:22.912+02:00Work well along with TheoriesWork well along with TheoriesPaweł Włodarskihttps://www.blogger.com/profile/04891037231290616803noreply@blogger.comtag:blogger.com,1999:blog-1392748891339897691.post-9211947826655234292012-03-26T21:45:53.494+02:002012-03-26T21:45:53.494+02:00Very interesting! Why should QuickCheck only be fo...Very interesting! Why should QuickCheck only be for the funkies!?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1392748891339897691.post-73229798688211416032011-02-10T10:14:05.959+01:002011-02-10T10:14:05.959+01:00I think here are two conflicting forces at work. O...I think here are two conflicting forces at work. One of the forces is to write the tests down as clear as possible (=> not hiding the intend of the test with technical details like the usage of the API). This tests assert that the program does something but don't test how it is done. Ideal tests from this perspective may look like this:<br /><br /> "test" => ID<br /> "test or test2" => ID OR ID<br /> "!test" => NOT ID<br /><br />This is not possible in plain java, my tests try to be as near on this as possible.<br /><br />The other force witch you rank higher is to test the API (or the HOW it's done). I think both test types have a reason to exist. You should test that the program does what it should and you should test it does it the way it should.Arnehttp://idedeluxe.blogspot.com/noreply@blogger.comtag:blogger.com,1999:blog-1392748891339897691.post-5322155567504711152011-02-09T22:01:46.948+01:002011-02-09T22:01:46.948+01:00You provided another example of the test style I d...You provided another example of the test style I don’t like and it can be done even without members.<br /><br />I’d say you’re doing exactly one test in your examples: “Parse IDs separated by operators (AND, OR)”. I would like to test it like this:<br />assertEquals(newArrayList(ID, AND, ID), newArrayList(new DependLexer("test and test2")));<br /><br />(Actually, I would use Quickcheck to create tokens, serialize the tokens to create the lexer input string and compare the resulting tokens with the input tokens.)<br /><br />The test style somewhat forces you to do an API that is usable. Here it’s done by implementing Iterator and using Lists.newArrayList from Google Guava (you can find similar implementations in different places). If your test is redundant user code is probably also redundant.Thomas Junghttps://www.blogger.com/profile/13153488692248832865noreply@blogger.comtag:blogger.com,1999:blog-1392748891339897691.post-51346594225156178752011-02-09T09:59:31.820+01:002011-02-09T09:59:31.820+01:00I would say it depends on context. I prefer to wri...I would say it depends on context. I prefer to write some tests as you suggest to test the API and (a lot more) in the style of Martin.<br /><br />Take a lexer implementation for example. For the implementation of an lexer I have to write many many tests. I love to write tests the following way:<br /><br />@Test public void value() throws Exception {<br /> assertTokens("test", ID);<br />}<br /><br />@Test public void valueAndValue() throws Exception {<br /> assertTokens("test and test2", ID, AND, ID);<br />}<br /><br />@Test public void valueOrValue() throws Exception {<br /> assertTokens("test or test2", ID, OR, ID);<br />}<br /><br />@Test public void valueOrValueAndValue() throws Exception {<br /> assertTokens("test or test2 and test3", ID, OR, ID, AND, ID);<br />}<br /><br />private void assertTokens(String input, DependTokenType... types) {<br /> DependLexer lexer = new DependLexer(input);<br /> for (int n = 0; n < types.length; n++) {<br /> assertEquals(types[n], lexer.nextToken().type);<br /> }<br /> assertNull(lexer.nextToken());<br />}<br /><br />Writing the tests this way is much more clear as if I have to repeat the testing code in each test. And the API is exactly the way I want it to be!Arnehttp://idedeluxe.blogspot.com/noreply@blogger.comtag:blogger.com,1999:blog-1392748891339897691.post-60096007268498084022011-02-09T03:44:59.037+01:002011-02-09T03:44:59.037+01:00I can't speak for netbeans, but IntelliJ beat ...I can't speak for netbeans, but IntelliJ beat Eclipse hands down when it comes to Scala support. I just wrote a whole post on Scala tooling as a 1 year recap on a project that now has ~ 20LOC of Scala and > 200 source files:<br /><br />http://agile-automata.net/?p=346<br /><br />Thomas: Are you using Idea10? I can't speak for previous versions, but 10 is very stable for our medium sized project.Adam Crainhttps://www.blogger.com/profile/06693752079244575032noreply@blogger.comtag:blogger.com,1999:blog-1392748891339897691.post-42589920496466802572010-12-10T14:13:36.229+01:002010-12-10T14:13:36.229+01:00Scala IDE for IntelliJ is not much better than the...Scala IDE for IntelliJ is not much better than the one for Eclipse. It consumes all CPU and memory it can get and hangs frequently. At least with project over 50 files.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1392748891339897691.post-60354949464080407742010-11-09T12:28:32.546+01:002010-11-09T12:28:32.546+01:00Very useful for programmersVery useful for programmersanehra63http://webhostingreview.infonoreply@blogger.comtag:blogger.com,1999:blog-1392748891339897691.post-36004732754170720392010-07-09T23:26:28.477+02:002010-07-09T23:26:28.477+02:00@iirekm
To late for the flame war: http://codemon...@iirekm<br /><br />To late for the flame war: http://codemonkeyism.com/scala-unfit-development<br /><br />Yes, Scala versions are not source and binary compatible. Get over it. If this does not fit your neads pick another platform. <br /><br />And please pick a correct title: Scala IDEs – can we use them?Thomas Junghttps://www.blogger.com/profile/13153488692248832865noreply@blogger.comtag:blogger.com,1999:blog-1392748891339897691.post-8487979467182793812010-07-09T20:25:02.091+02:002010-07-09T20:25:02.091+02:00This plugin doesn't work on Windows 7 64-bit, ...This plugin doesn't work on Windows 7 64-bit, no refactoring support, no equivalents of tools like Checkstyle or PMD. What's more, the new Scala 2.8 is not binary compatible with Scala 2.7.<br />It's a pity to say, but unfortunately: Scala is still not production-ready.<br />More info: http://coding-masters.blogspot.com/2010/07/scala-not-quite-yet.htmlIrek Matysiewiczhttps://www.blogger.com/profile/02786161827081997066noreply@blogger.comtag:blogger.com,1999:blog-1392748891339897691.post-54309947097987496802010-07-09T10:45:26.423+02:002010-07-09T10:45:26.423+02:00GreatGreatAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-1392748891339897691.post-262093456606981432010-07-09T09:28:58.262+02:002010-07-09T09:28:58.262+02:00wow! please let this be true for JDK7.wow! please let this be true for JDK7.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1392748891339897691.post-12235521214750716062010-07-08T22:59:26.805+02:002010-07-08T22:59:26.805+02:00Yey!Yey!Ran Bironhttps://www.blogger.com/profile/13745439632196949633noreply@blogger.comtag:blogger.com,1999:blog-1392748891339897691.post-37308419238867907912010-07-07T09:01:38.920+02:002010-07-07T09:01:38.920+02:00As far as I do remember he didn't liked the fe...As far as I do remember he didn't liked the feel of IDEA per se (like auto save). It's different from Netbeans.Thomas Junghttps://www.blogger.com/profile/13153488692248832865noreply@blogger.comtag:blogger.com,1999:blog-1392748891339897691.post-43558354832068817972010-07-07T07:12:34.755+02:002010-07-07T07:12:34.755+02:00David Pollack says IntelliJ sucks big time! (the f...David Pollack says IntelliJ sucks big time! (the fact that Scala support is acceptable is a minor plus compared to the described problems). Or is he talking about a really old version? I'm confused.<br /><br />http://blog.lostlake.org/index.php?/archives/91-IntelliJ-update-its-still-a-piece-of-junk-but-Scala-support-isnt-bad.html#extendedGerman Viscusohttps://www.blogger.com/profile/05542920325440015442noreply@blogger.comtag:blogger.com,1999:blog-1392748891339897691.post-18926420166775715042010-05-28T08:03:08.316+02:002010-05-28T08:03:08.316+02:00+1 !! Surprising though....+1 !! Surprising though....Antony Stubbshttps://www.blogger.com/profile/11776027112330595831noreply@blogger.comtag:blogger.com,1999:blog-1392748891339897691.post-79939417496767702302010-04-01T14:01:43.648+02:002010-04-01T14:01:43.648+02:00Adding the dependency to scala-compiler is require...Adding the dependency to scala-compiler is required by IDEA (bug ?) not by your project (except if you use class from the compiler of course).<br /><br />So I suggest you change the scope from compile to provided or add <optional>true</optional>. So user of your jar will not have required dependency to scala-compiler.David Bernardhttps://www.blogger.com/profile/10258681071629942075noreply@blogger.com