오늘 슬쩍 만져본 C++ IDE들에 대한 단상

Qt Creator: 아무래도 현재 쓰고 있는 것이다 보니 어쩔 수 없이 팔이 안으로 굽을 수밖에 없긴 하지만, 아무래도 최강이라고밖에는 할 말이 없습니다. 게다가 이 녀석은 지금도 계속 진화중이에요.

Code::Blocks: 현재로서는 Qt Creator에 대항할 수 있는 유일한 제품이라고 생각합니다. 만일 제가 Qt를 쓰지 않았다면 아마 wxWidgets와 함께 이 녀석을 쓰고 있었을 거에요. 여러가지로 만족스럽습니다.

CodeLite: 어…… 일단 보기엔 좋습니다. 그런데 그게 다에요. code completion 라이브러리의 데모로 출발한 녀석치고는 code completion이 별로 맘에 안든다는 것만 빼고요. 좀 어색하게 움직일 뿐더러, 반응도 늦습니다. 그나마 예전에는 refactoring때문에 CodeLite를 쓰시는 분들도 계시긴 했습니다만, Code::Blocks 13.12에 포함된 refactoring이 훨씬 더 강력해 보입니다.

Eclipse CDT: 느리고 무겁습니다(그리고 이게 제가 Java를 좋아하지 않는 이유라지요). 너무 복잡하고요. 좀 뒤져보니 서로 다른 여러가지 이유들로 인해 불평하는 C++ 개발자들이 꽤 많이 보이는데, 문제(?)라면 이것들이 다들 공감이 가는 이유들로 채워져 있었다는 겁니다.

First impressions of C++ IDEs I tried today

Qt Creator: OK. I’ve got to admit that I’m skewed, but it’s the greatest, yet still evolving.

Code::Blocks: A great alternative to Qt Creator. If I were not using Qt, I’m certain I’d use this cool thing with wxWidgets.

CodeLite: Eh…… Looks good. And that’s all. Though started as a demo for code completion library, its completion is below my expectation - it behaves a bit awkward to me, and reaction is slow. Refactoring? Forget it. Code::Blocks 13.12 has it all.

Eclipse CDT: Slow and heavy(and that’s the reason I don’t like Java). Too complicated. There were so many complaints among C++ developers for so many different reasons, and I totally agree with each of the claims.

라자루스로 돌아오다

6개월인가, 8개월인가정도만에 라자루스를 다시 설치했습니다. Qt가 거의 모든 기능을 제공해줄 뿐 아니라, Boost와 함께 쓰면 더이상의 것은 필요없다는 말이 나올 정도로 완벽했지만, 아무래도 덩치가 너무 큰게 마음에 걸리더군요. 예. Qt의 단점을 논할때마다 꼭 나오는 말이지만, 기능이 너무 많아서 라이브러리가 무식하게 커지는 단점이 꼭 켕겼습니다.

최근에 Qt를 가지고 간단한 GUI 프로그램을 만들 일이 있었습니다. 별건 아니고 libssh를 사용해서 SCP로 다운로드받은 내용을 Qt Quick Control에 있는 테이블로 보여주는 프로그램이었는데, 이게 이것저것 다 합치니 50MB정도가 되더군요. 뭐, 반정도는 ICU(27.5MB)였으니, ICU를 빼고 Qt를 다시 빌드하면 크기가 좀 줄어들긴 하지만 EXE, DLL, 그리고 Qt Quick Control을 구성하는 QML 파일들을 모두 합치면 이것도 여간 번거로운게 아니죠.

가장 큰 문제가 되는 부분은 프로그램의 cold start가 일어날 때입니다 - 제 Core i5에서도 프로그램이 인터페이스를 띄우는데게 3초가 넘게 걸렸습니다. 이정도 시간이면, 사용자가 “왜 프로그램이 실행이 안되냐” 하면서 프로그램 아이콘을 다시 클릭하고도 남을 시간입니다.

하여간 이래저래 켕기는게 있어서 대안을 좀 찾았습니다. 그리고 그 물망에 오른건 wxWidgets와 Lazarus였습니다. 사실 첫번째 후보는 wxWidgets였습니다 - 어쨌든 C++ 사용자는 Object Pascal 사용자보다 많은게 현실이니, 도움은 더 받을 수 있으리라는 생각이 들더군요(뭐, 제가 따로 조사해본 결과를 통해 추측해보면 wx 사용자나 Lazarus 사용자나 수는 대충 비슷해 보이긴 합니다만……).

승부는 빈 창을 띄우는 프로그램을 빌드한 이후 갈렸습니다. wxWidgets는 7.45MB짜리 프로그램을 만들어냈고, (개인적으로 심한 애증관계에 있는)Lazarus는 1.44MB짜리 파일을 만들었습니다. 둘다 cross-platform이고, native widget을 사용하는 동일 구조라는걸 고려해본다면, 승자는 Lazarus더군요.(참고로, Qt는 native widget을 사용하지 않습니다. 단지 인터페이스를 native처럼 그려내기 위해 관련 DLL을 참고할 뿐입니다.)

하지만, 그럼에도 불구하고, 그놈의 적은 사용자 수가 끝까지 제 발목을 잡았습니다. 주변에 물어볼 사람도 없이 혼자서 맨땅에 헤딩하는 상황이 될게 뻔했던거죠.

그런데 이 때, 제 친구 중 한 분이 중요한 한마디를 하더군요:
“좋아하는 걸로 하세요.”
삽질을 각오할 열정이 있다면(……), 사용자 수가 적은건 별로 문제가 되지 않습니다. 사실 모든 사람들이 아무 생각 없이 몽땅 다 주류만 쫓아갔다면, D나, Vala나, Haskell같은건 있지도 않았을거고, LISP같은 것들은 아마 살아남지 못했을 겁니다.

결국 이놈의 애증 만발한 라자루스가 다시 제 시스템에 설치되었습니다. 이걸로 뭘 더 하게 될지는 모르겠지만, 어쨌든 언젠가는 뭔가 하게 되겠죠.

추신:
Lazarus를 떠나있는 동안 instantFPC라는게 나왔더군요. 이게 뭔가 하니 파스칼 소스코드를 스크립트처럼 쓰는건데…… 사실은 실시간으로 후딱 컴파일하고 돌리는 거랍니다. 뭐 파스칼 컴파일러가 무식하게 빠른거야 어제오늘 일이 아니라는걸 보면, 이렇게 무식한 구조로 JIT(..??) 컴파일러를 만들어도 크게 문제는 없을 것 같긴 합니다.
(제 Core i5 시스템에서 Lazarus IDE를 -O3로 처음부터 다시 컴파일하는데 2분이 채 안 걸렸습니다.)

Back to Lazarus


I reinstalled Lazarus. It’s been a while - about 6 to 8 months or so. Using Qt, though the library provided almost everything, especially when used with Boost, I was always concerned with the fact that it’s too heavyweight - yes. Qt is feature bloated and the size of library is sometimes too big.

Recently I developed a simple GUI application, which downloads something using SCP and show on a grid. It was based on Qt Quick Controls and libssh. Later I found out that the package was bigger than 50MB. Of course half of the library was ICU(about 27.5MB) so I could remove it if I rebuild Qt without ICU, but still it’s 25MB with lots of files(EXE, DLL, as well as a lot of Qt Quick Controls QML files). The size of file matters, especially in cold start - in my Core i5 system, the application needed more than 3 seconds to show its main interface. It’s slow enough for the user to click the icon again, thinking that Windows in some way ignored user’s click.

So I searched for some alternatives. I considered two: wxWidgets and Lazarus. My first consideration was wxWidgets - well, anyway there are far more C++ users than Object Pascal users so I may get more helpful materials(though according to my short research on a few sites, actual user base would be about the same for both).


The winner was clearly Lazarus. Both are cross-platform, and use native widgets, meaning smaller application = simpler architecture = faster speed. After building a GUI application with empty form, I turned to my beloved love-hate Lazarus again - wxWidgets gave me an EXE of 7.45MB, while Lazarus gave me one of only 1.44MB.
(c.f. Qt is not native - it just ‘refers to’ native GUI library to draw the interface in native way.)

But I was still reluctant to use Lazarus again, because I clearly know how small the user base of Object Pascal is, meaning I may be the lone survivor after all other developers turning back to other environment, fighting the hard fight.

And this time, one of my friend said something important:
“Do whatever you’d like to do.”
Small user base is not a problem so long as you have passion. If everyone mindlessly follows the mainstream, there would be no D, Vala, Haskell, etc., and LISP and others would not have survived.

So I landed again to the land of my beloved love-hate Lazarus. I’m not sure what I’ll do with this thing, but I’m sure that some day I’ll do something with it.

P.S:
During the time I left my FreePascal/Lazarus world, the Lazarus team made something fun; instantFPC. It reads FPC source code and run it as if it’s a script. In fact it compiles the source code and run the binary, but please remember, Pascal compilers are among the fastest compilers in the world(in my Core i5 system it took less than 2 minutes to fully rebuild Lazarus IDE with -O3 switch).

"Why Boost doesn't boost my productivity"

I found a good article on learning Boost, C++ libraries.
http://agentxcpp.wordpress.com/2013/05/18/why-boost-doesnt-boost-my-productivity/

To make a long story short, the author wants to say that “Boost requires unnecessarily complicated coding style, which decreases code readability quite a bit.” Of course Boost contributed to the C++ a lot, for example boost::thread became the standard for C++11 std::thread. Yet, for some, libraries discourage readabilities of the code, and documentation lacks necessary information, resulting in making big wall against the newcomers who want to enter the world of Boost.

One thing fun is that the target being compared is Qt, which I rely on the most. Say, even myself sometimes asked myself that “why do people use Boost?”, because most of the features are already ready-made in Qt and Qt tries to reimplement main features of Boost.

I agree with the author most of the time, but considering boost::thread or boost:signal, which don’t require much time to learn, the viewpoint is not always applicable to all of the components - it’s just case by case.

Well, please regard this memo as one small opinion of a programmer who didn’t take any formal programming course, but by chance earn money by programming in a niche market.

"Why Boost doesn't boost my productivity"

어제 C++ 라이브러리 모음인 Boost에 대해 이것저것 찾아보다가 읽어보게 된 글입니다.
http://agentxcpp.wordpress.com/2013/05/18/why-boost-doesnt-boost-my-productivity/

내용이 좀 깁니다만, “Boost는 똑같은 결과를 내기 위해 가독성이 떨어지는 복잡한 코드를 요구한다”가 골자가 되겠습니다. 물론 boost::thread 등이 C++11에 채용되는 등 C++에 대한 Boost의 기여도가 적지 않음을 알고 있습니다만, 몇몇 소스 가독성을 떨어뜨리는 코딩을 유도하는 라이브러리와 부족한 문서화는 분명 Boost에 입문하려는 사람들에게 커다란 장벽으로 자리잡는다 할 것입니다.

게다가 하필 비교대상이 제가 가장 많이 의존하는 Qt더군요. 그러고보면 요즘 웬만한건 Qt로 다 되는데다가 Boost의 주요 기능들이 Qt에서 재구현되는 경우가 꽤 있는걸 보면 가끔은 ‘Boost를 왜 쓰지?’ 하는 생각이 들 때도 있습니다.

일견 공감이 많이 됩니다만, 한편으로 boost::thread나 boost::signal같은 것들은 별다른 공부 없이도 쉽게 쓸 수 있는걸 보면 이 건은 case by case라고 보는게 옳지 않을까 싶습니다.

뭐 정식(?)으로 프로그래밍을 배운 적이라고는 한 번도 없이, 모든걸 독학으로 공부했지만 얼떨껼에 니치 마켓(?)을 찾아 프로그래밍으로 밥벌어먹게 된 사람의 쓸데없는 뻘소리였습니다.

넥서스 5와 내 영어실력

넥서스 5를 구매하다.
그 유명한 “OK Google”은 미국식 영어만 알아듣는다는 사실을 확인하다.
자, 그럼 이제 미국식 영어발음을 연습해볼까나. :P

P.S:Google Now가 U.S. English 세팅에서 내 발음을 거의 다 알아듣는다!
내 발음은 세계적인 글로벌 기업 구글이 인정한 발음이야!
내 쩔어주는 미국식 영어발음을 보고 다들 열폭하라고!

Nexus 5 and My English

Bought Nexus 5.
Found out that the famous ”OK Google” feature is available only when you set your language to U.S. English.
Time to practice “standard” U.S. English pronunciation. Hmpf. :P

P.S:Fortunately Google Now understand my English quite well.lol lol lol
OK Google. You accepted my pronunciation is quite that of American Native. ;)

블로그를 이전합니다

뭐, 이런 작은 변방의 블로그에 관심있으신 분들은 아무도 없으시리라 생각합니다만...... (웃음) 블로그 플랫폼을 블로거에서 dev.to로 옮겼습니다. 새 URL은 아래와 같습니다: https://dev.to/teminian 새로운 거처에서 뵙겠습니...

Popular in Code{nested}