# Links 2010.09.01
File under: linux : {2010.09.01 - 01:46} : Comments (0)
a tech blog, by Colin Pretorius
File under: linux : {2010.09.01 - 01:46} : Comments (0)
File under: java : {2010.08.30 - 03:14} : Comments (0)
File under: java : {2010.08.14 - 17:34} : Comments (0)
Git/Windows/Eclipse line ending fun. I've already set up Eclipse to create new files as Unix but git has other ideas.
GitHub help: dealing with line endings
To fix an already duffed file in Eclipse, go to File | Convert line delimiters to...
File under: programming : {2010.08.14 - 06:51} : Comments (0)
Hmmm.
File under: java : {2010.08.14 - 03:15} : Comments (0)
Bah. Wanted to take a peek at something running on my laptop but JVisualVM grumbled about unable being able to detect local apps. Helpfully had a link to the trouble-shooting page and the underlying issue, which is that HotSpot won't write the necessary perf stuff to the temp dir if it's on a FAT partition because it'd be world readable. Thanks Acer.
The trick is to run both the app you want to look at and JVisualVM with the argument -XX:+PerfBypassFileSystemCheck.
File under: java : {2010.08.12 - 16:48} : Comments (0)
Or is the new offical Javadocs site at download.oracle.com a helluva lot slower and more sluggish than java.sun.com ever was?
File under: java : {2010.08.08 - 09:01} : Comments (0)
I created a local clone of my main (in git-speak 'origin') repo for one of my projects, and after committing locally and then doing a git push I got this error:
remote: error: refusing to update checked out branch: refs/heads/master remote: error: By default, updating the current branch in a non-bare repository remote: error: is denied, because it will make the index and work tree inconsistent remote: error: with what you pushed, and will require 'git reset --hard' to match remote: error: the work tree to HEAD.
After reading this it started to make sense. My main/origin repo looked like a first-class, in-use repo, and git thinks that since it might be an active repo, pushing to it would be a bad idea.
The solution was in the post above. Step 1 is to change to the directory containing the origin repo and execute
git config --bool core.bare true
With that done, git knows that the repo is bare, and you can push to it.
Step 2 would be to delete of any checked out code in the origin directory so that all that directory contains is the .git directory.
File under: programming : {2010.08.06 - 17:50} : Comments (0)
At Artima:
In which I argue that (a) Generics have done egregious harm to both the elegance and readability of the Java language and, (b) they prove by example that static type checking is a linguistic dead-end. Are you persuaded? Do you agree? Read on...
I'm really busy at the moment so I must admit I haven't yet read on, yet I will say three things because the themes come up so often:
Generics do suck until you remember how ugly code used to be when you needed monstrosities like ((Widget)list.get(0)).foo().
I also remember how much effort it was when you couldn't type list.get(0) Ctrl-2-L and have your IDE autosuggest a sane local variable, etc etc. I also remember how I used to think C++ templates were much better - and in many ways they are, but the one downside is how easily templates break the IDE's autocomplete and navigation functionality.
the benefit of static typing isn't about the compiling, it's about the navigating and the typing (of the keyboard variety). A modern Java IDE allows you to move around and analyse code and autocomplete and generate code and refactor in ways that dynamically typed languages just can't hope to match. As I like to say, Java may be horrendously verbose, but when your IDE allows you to type in paragraphs and sentences instead of words and phrases, it doesn't seem to matter as much.
I suspect that many people in the anti-static/Java camp haven't seen and aren't aware of what an accomplished Java dev can do. Which isn't to say that I think static typing is necessarily or always better than dynamic typing, just that I don't think IDE capability is fully considered in the debate.
File under: java : {2010.07.26 - 15:09} : Comments (0)
Eclipse has a bookmarks feature, but the keyboard support is limited. The Eclipse Bookmarks Plugin does the job nicely.
As a poster in this StackOverflow thread mentions, when installing the new plugins via the update site, you have to uncheck "Group items by category" in order to see (and install) both features.
File under: eclipse : {2010.07.22 - 14:54} : Comments (0)
eclipse
java
linux
programming
2010.09
2010.08
2010.07
2010.06
2010.05
2010.04
2010.03
2010.02
2010.01
2009.12
2009.11
2009.10
2009.09
2009.08
2009.07
2009.06
2009.05
2009.02
2009.01
2008.12
2008.11
2008.08
2008.07
2008.06
2008.05
2008.04
2008.03
2008.02
2008.01
2007.12
2007.11
2007.10
2007.09
2007.08
2007.07