Samuel Kroslak’s blog

Archive for February 2008

Intellij IDEA after install tips

without comments

I worked with IDEA on OpenSUSE 10.3 linux distribution, but most of the mentioned settings should be cross OS. I also found blog post by Hamlet D’Arcy over THERE. Hamlet describes his top 10 list for IDEA. Check it out too.

  1. Set proper VM setting for IDEA, according to your machine. You can find one useful and straightforward property file at %idea_install_dir%/bin/idea.vmoptions. I don’t remeber defaults, but I have 2 GB of ram so I set it like this:-Xms64m
    -Xmx768m
    -XX:MaxPermSize=768m
    -ea
  2. Print-out keymap and stick it somewhere where you can see it. You can find it at IDEA welcome page. From the beginning, IDEA keymap seemed a little unconfortable to me, but after a while, I get used to it and now my writing – generating :> – speed is much faster than in eclipse. Early investment into keymap is totally worth it.
  3. IDEA has best plugin system I ever seen. Look into Amount of plugins isn’t as huge than eclipse repository, but it’s big enough. It’s worth to notice that most useful plugins are installed by default. Browse to File -> Settings -> Plugins. Most of the time there is no need to go to internet, complete plugin repository is here and can be installed on click. From optionals, those are quite good in my opinion:
    1. ‘Identifier Highlighter’ – if you are used to have variable usages highlighted (as in eclipse), this is it. Most of the people disagree and find it annoying, but I like it. It has many settings.
    2. SQL Query plugin – very nice universal SQL client built in to IDE. Contains DB browser and many features you could expect from others stand-alone SQL clients.
  4. use keyboard shortcuts! Main strength of IDEA is in high-quality editor, which is not perfect, but surely better than other two’s (eclipse, netbeans)

Written by Samuel Kroslak

February 29, 2008 at 10:47

Posted in Java, Linux

Stop being lazy programmer!

without comments

I recently read two articles – Fire and Motion by Joel and The theory of one by Michael. It is very interesting reading for somebody who is interested in idea to be more efficient in his life. It doesn’t matter in which area.

What? One line of code every day? Why should I write one line of code only for sake of fulfilling some kind of daily routine? And, honestly, what can one line of code achieve? When I was reading Joel’s post for the first time, I was on my way to leave – I don’t believe in such psychological theories. But as I was digging into it deeper and deeper I realized that this one could work, and the best part, it does (for me).

When one decides to be more successful in something, one can have pretty strong attitude and be able to commit huge amount of energy in the beginning towards this thing. I see it on myself. However in my case, long-term focus on one thing is a problem. After few days (weeks) I always see myself watching movies in free-time, playing games… let’s say I’m trying to amuse myself with everything else except the thing that I’m supposed to focus at. Maybe it’s personality thing, maybe not. Good news is, we can fight with that. Don’t get me wrong, I can deliver some kind of product almost every day, sometimes it is school lab, sometimes work. Now we are talking about what to do with time that left, and sometimes, there is a lot of time that left and I decided from now on, not to waste that time.

I wrote myself spreadsheet with “one line that goes to x”, I have to accomplish every day. x = { book, blog, code } in my case. This one line of x really isn’t as important as you can see. Important thing is to get up and write that 1 line. Sometimes it will be only this 1 line (when you really don’t have time or mood), sometimes it can be 100. Important is to do it and break that barrier in your brain. As far as it is 2 weeks now, I forced to be self-disciplined in this and to finish at least one line of x every single day, without exception. And I must say I just love it. Last two weeks I am more productive than ever. Every day after I finish my daily duties, I will sit down and write few lines to my book, few lines to my blog (as today) and few lines of code. It really doesn’t have to be much and it costs me only few minutes per day. This approach is very refreshing and it confirmed, once again for me, that I need some kind of policeman sitting on my shoulder to look after me, because long term self-discipline simply doesn’t work for me. When pressure or attitude fades out, my effort tends to be lower and lower through time. This is my success story and I thank to guys mentioned at the beginning for great articles, lots of good points were mentioned there.

Written by Samuel Kroslak

February 24, 2008 at 15:37

Posted in Thoughts

Writing with LaTeX on linux with pleasure

without comments

For last 3 years, I was balancing between OpenOffice and Latex and I always slipped back to OpenOffice, just because the comfort that OO provides. But beautiful Latex world was so desirable for me, that it couldn’t let me sleep.

Finally, after 3 years of wandering I managed to get it working as I expect it to work. Of course Latex is here and working for very very long time and it is still professionals choice, however with installation and configuration it is pretty challenging to get it into a shape you expect it to be. I moved recently to OpenSUSE with KDE environment and I had some free time, so I decided give it a shot here. Best user friendly tool I found on KDE is Kile, so why not:

yast -i kile texlive-latex

And guess what. Everything just works out of the box. I mean, I managed to install Latex on other distribution (even on one especially crazy called MS Windows XP…), but I never manage to get it into right shape with my primary language – Slovak. We have some pretty crazy diacritics here, I just can’t help it, I want it all there :> Few times I got it working, but diacritic was just ugly (misplaced). After I installed Kile and texlive-latex package on OpenSUSE 10.3, I opened Kile and with simple wizard I generated header which looks like this:

\documentclass[a4paper,12pt]{book}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage[slovak]{babel}
\usepackage[T1]{fontenc}
\usepackage{graphicx}

From now on I’m lucky Latex newbie user with really nice looking .pdf output with correct diacritics. See it for yourself – HERE. I’m not into technical details of Latex, I just want to use it, so I don’t know what’s right here or what’s wrong there, I just wanted to make report of successful out-of-box installation with OpenSUSE 10.3

Written by Samuel Kroslak

February 23, 2008 at 16:13

Posted in Latex, Linux