I'm going to JFokus in February. Is anyone else coming? :)
There's also an awesome opportunity to join the Vaadin team at the boat to Stockholm from Helsinki - don't miss it!
Pages
Friday, December 9, 2011
Sunday, October 23, 2011
Sublime: The Awesome Text Editor
What is your favorite text editor? Not only to edit text but also to write some code. Emacs? Vim? Notepad++ or SciTE? Yeah, for code you can use IDEs, but sometimes it is just too much.
Myself, I'm a long time Vim fan. I know emacs is really-really powerful, but I could not quite understand the ideology behind it. Sometimes I use Notepad++, just because it works really well for log files. Just recently I discovered Sublime. This is a really awesome piece of software!
Sublime is available for OS X, Linux and Windows. It feels really lightweight, and the UI is quite responsive. In Sublime's blog you will find nice tips and tricks on how to use the editor. And if you take a look at the support forum, it seems that the guys are quite busy making the editor even more awesome. This all together just makes you want to by a license! :)
Myself, I'm a long time Vim fan. I know emacs is really-really powerful, but I could not quite understand the ideology behind it. Sometimes I use Notepad++, just because it works really well for log files. Just recently I discovered Sublime. This is a really awesome piece of software!
Sublime is available for OS X, Linux and Windows. It feels really lightweight, and the UI is quite responsive. In Sublime's blog you will find nice tips and tricks on how to use the editor. And if you take a look at the support forum, it seems that the guys are quite busy making the editor even more awesome. This all together just makes you want to by a license! :)
The UI is rather minimalistic, and all the required windows and dialogs appear on demand by pressing a relevant shortcut. What I really like is the file outline on right (see the screenshot below).
Sublime comes with a huge number of code snippets available out of the box and you can define your own.
Regarding the features, you're almost able to use Sublime as a full-featured IDE, not as intelligent as IntelliJIDEA, but still - you can edit code quite efficiently, compile source and execute the apps. Also, Sublime is quite extensible - you can create your own plugins, customize the layout, shortcuts, etc.
I think, Sublime could be the new tool in my toolbox if I'd need to code something besides Java :)
Tuesday, October 18, 2011
Friday, September 9, 2011
JavaZone 2011: Bytecode for discriminating developers
View more presentations from Anton Arhipov
Labels:
asm,
bytecode,
Java,
JavaZone2011,
job,
presentation,
video
Saturday, September 3, 2011
Destination: JavaZone, Oslo, Norway
I'm presenting at JavaZone the next week.
There's plenty of interesting sessions on the schedule that I'm tempted to attend myself.
There's plenty of interesting sessions on the schedule that I'm tempted to attend myself.
Labels:
bytecode,
Java,
JavaZone2011,
job,
presentation,
travel
Wednesday, August 31, 2011
Tuesday, August 30, 2011
GeeCON 2011: Java Bytecode For Discriminating Developers
In May this year I had a pleasure to talk at an awesome conference in Krakow - GeeCON. Here's the video taken at the talk and the slides are below.
The related blog posts:
The related blog posts:
Monday, August 29, 2011
What’s Cool In IntelliJIDEA. Part III: External Tools
Previous posts about IntelliJ
What’s Cool In IntelliJIDEA. Part I
What’s Cool In IntelliJIDEA. Part II: Live Templates
Although there is almost any kind of functionality available in IntelliJIDEA, either as a base functionality or via plugins, there's still a fraction of probability involved that you might want to do something that goes beyond the power of the IDE. For such rare cases you might want to take a look at External Tools in IntelliJ.
Just recently I've encountered such a case myself - I wanted to use an utility from JDK, but in a more flexible way than just switching to command line and navigating to the correct location. My idea was that I should just press an arbitrary shortcut and get the result. So I decided to give External Tools a try.
The utility I use a lot when studying Java is javap - the java class file disassembler. This is due I study the bytecode sometimes. And although there's ASM plugin available for IntelliJ that basically can provide me the result I needed, I still prefer to read the raw javap output.
To setup javap in Intellij as an External Tool go to Settings >> External Tools and press Add... . You can then define the location of the tool, the working directory, and the parameters.
The nice part of it is that IntelliJ provides some basic macros in order to dynamically resolve the parameters for the tool. So for javap it was enough to set $FileClass$ for the parameter, and $OutputPath$ as the working directory. And that's it - the tool is now ready for use.
You can also define a "group" which is then used to group the external tools in the popup menu. I use "jdk" as a group name for javap so here's what it looks after:
So that's cool but you might have noticed that it is not that comfortable to use - have to right-click the file, navigate to "jdk" group, expand it, and only then can execute javap. Well, shortcuts to the rescue! Browse to Settings >> Keymap, and there you can define any sortcut for the tool. The nice part of it is that IntelliJ detects if you select a conflicting shortcut and notifies you.
One more tweak left to do. Once I press the shortcut that I've assigned to javap, the result of decompilation is printed out to the IDE console, which is just below the source code. But it would be more convenient to see it side by side. For that, it is possible to drag-and-drop the Run window to the side panel in IntelliJ so the result can be observed right next to the source I'm currently working with.
The only thing that is probably missing is the syntax highlight for the javap output, but that is probably too much to wish.
What’s Cool In IntelliJIDEA. Part I
What’s Cool In IntelliJIDEA. Part II: Live Templates
Although there is almost any kind of functionality available in IntelliJIDEA, either as a base functionality or via plugins, there's still a fraction of probability involved that you might want to do something that goes beyond the power of the IDE. For such rare cases you might want to take a look at External Tools in IntelliJ.
Just recently I've encountered such a case myself - I wanted to use an utility from JDK, but in a more flexible way than just switching to command line and navigating to the correct location. My idea was that I should just press an arbitrary shortcut and get the result. So I decided to give External Tools a try.
The utility I use a lot when studying Java is javap - the java class file disassembler. This is due I study the bytecode sometimes. And although there's ASM plugin available for IntelliJ that basically can provide me the result I needed, I still prefer to read the raw javap output.
To setup javap in Intellij as an External Tool go to Settings >> External Tools and press Add... . You can then define the location of the tool, the working directory, and the parameters.
The nice part of it is that IntelliJ provides some basic macros in order to dynamically resolve the parameters for the tool. So for javap it was enough to set $FileClass$ for the parameter, and $OutputPath$ as the working directory. And that's it - the tool is now ready for use.
You can also define a "group" which is then used to group the external tools in the popup menu. I use "jdk" as a group name for javap so here's what it looks after:
So that's cool but you might have noticed that it is not that comfortable to use - have to right-click the file, navigate to "jdk" group, expand it, and only then can execute javap. Well, shortcuts to the rescue! Browse to Settings >> Keymap, and there you can define any sortcut for the tool. The nice part of it is that IntelliJ detects if you select a conflicting shortcut and notifies you.
One more tweak left to do. Once I press the shortcut that I've assigned to javap, the result of decompilation is printed out to the IDE console, which is just below the source code. But it would be more convenient to see it side by side. For that, it is possible to drag-and-drop the Run window to the side panel in IntelliJ so the result can be observed right next to the source I'm currently working with.
The only thing that is probably missing is the syntax highlight for the javap output, but that is probably too much to wish.
Tuesday, August 2, 2011
Code Snippet: Redirecting Standard Output to File
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;
public class SystemOutRedirect {
public static void main(String[] args) throws FileNotFoundException {
System.setOut(new PrintStream(new FileOutputStream("stdout.txt")));
System.setErr(new PrintStream(new FileOutputStream("error.txt")));
System.out.println("hello"); //goes to stdout.txt
System.err.println("error"); //goes to error.txt
}
}
Subscribe to:
Posts (Atom)