Subject: Good Code: State-of-the-Art Best-Practice Knowledge Diagram
From: http://xkcd.com/844/
Via: http://tech.slashdot.org/story/12/12/21/220255/real-world-code-sucks?utm_source=rss1.0mainlinkanon&utm_medium=feed
Software development woes. Java-based development in particular. Also, philosophizing, architecture, design.
Invalid filesystem path syntaxThat's the literal message. All of it. Ends in nothing.
svn: Cannot replace a directory from within
The meaning of the blue is simple - the affected resources is "switched",
i.e. the working copy is mixed and the blue file is from different branch
than its parent directory.
cd $(dirname $0)And then "svn cleanup". Refresh, Subclipse icons back to question marks again.
$SHELL
bash-3.2$ svn stat
? .classpath
? .project
? .settings
~ target
(And why not lose those package and import semicolons...)package com/mylib/somepackage;import com/mylib/somepackage/misc/*;import com/mylib/someotherpackage/thispackage/ThisClass;import com/mylib/someotherpackage/3d-math/SomeModule;public class Contrafactual3dDemo { //...}
I have found it to be a nice pedagogical tool. It's of course not much different from doing it manually but it saves work. I've put it in a 'mvn-deploy.command' file next to the 'pom.xml', which also makes for quick deploys -- it's just a double-click to start from inside Eclipse (provided you set the 'executable' property/flag under Properties); no having to navigate to the right directory in the terminal.cd $(dirname $0)ls -lecho -----------------------------------echo deploying...echo -----------------------------------mvn javadoc:jar deployecho -----------------------------------echo deploy script done.echo -----------------------------------echoecho -----------------------------------echo damage report...echo -----------------------------------find /tmp/maven-tmp-repoecho -----------------------------------echo now back to your regular shell, see you later.echo -----------------------------------$SHELL
Pardon the formatting. (EDIT: Shit, now it looks even worse: '& gt;' and all. Damn you, blogger editor. -- No wait, it looks ok in 'print'.)<distributionManagement><repository><id>local-tmp-repo</id><name>Temp Folder</name><url>file:///tmp/maven-tmp-repo</url></repository></distributionManagement>
An internal error occurred during: "Launching TestTemplate".Restart, clean, refresh, nothing helped so far. Is it something in the code itself? Weird. Only other symptoms: 'misplaced' breakpoint (due to quick edit somehow) can't be removed, and no new breakpoints can be added anywhere.
java.lang.NullPointerException
Exception in thread "main" java.lang.NoClassDefFoundError: org/pub/TemplateTest
Caused by: java.lang.ClassNotFoundException: org.pub.TemplateTest
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
lsof -i:8181 -t | xargs kill -9
Sorry about the formatting. (Doesn't the Blogger editor suck something awful for quotes and code? ...hmm...can one blog on Github?)<build><plugins><plugin>maven-compiler-plugin <configuration><source>1.6</source><target>1.6</target></configuration></plugin></plugins>
<project.build.source>1.6</project.build.source>
<project.build.target>1.6</project.build.target>
(Again, sorry about the formatting.)
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
Then, what you do is this: simply "Disable Dependency Management" and then "Enable Dependency Management" from the "Maven" menu in the contextual menu from the project. If you keep the ".classpath" file open, you'll be able to see the what happens.
<classpathentry kind="output" path="target/classes"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>Then, in the 'Enable' step, the entries which enable the build appears:
kind="src" output="target/classes" path="src/main/java">
<classpathentry kind="src" output="target/test-classes" path="src/test/java">along with the 'MAVEN2_CLASSPATH_CONTAINER' thing mentioned above. Done!
1023 Google Chrome Helper 81.9 5 111.9 MB Intel 1025 Google Chrome Renderer 70.3 6 78.5 MB Intel
api/pub/annot%C2%A8/ApiPath.javaSo then I looked in the GUI, and sure enough, there is some trema-looking extra character there that I didn't see, that I must've added inadvertently.
* no chunk, no close, no size. Assume close to signal endAha! Yes of course. This is what the words 'good feedback' can mean.
It's a fantastic little program which cannot be terminated.http://trialepicfail.blogspot.se/2012/10/digging-trenches.html
"King Stanis, lord of Dragonstone, younger brother of the late king,"
15:02
"Robert, has dark blue eyes and only a fringe of the black hair remaining on his"
15:06
"head"
15:07
"circling behind his ears like the shadow of a crown (crab?)"
15:10
incredibly useful
maven-dependency-plugin (goals "copy-dependencies", "unpack") is not supported by m2e
Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (execution: default, phase: initialize)
Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (execution: create_db_and_user, phase: initialize)
Plugin execution not covered by lifecycle configuration:
org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (execution:
create_test_db_and_user, phase: initialize)
However, the problem is much more widespread than m2eclipse. It’s very similar to issues adressed in Andrew Spencer’s post, only more so since if we don’t upgrade, we may have to keep an Eclipse instance for each project, that has to be shared between all team members. Right now, I don’t have any solutions for this problem, apart from changing the code to keep in synch with the tool.