Thursday, January 17, 2013

New year, new challenges

The new year brought a lot of change to my life. I have kind of returned to my C++/Qt roots. I've recently switched jobs, I've left enterprise java web development for C++ Qt development on embedded devices.
While using cutting edge web technologies with well organized and solid java frameworks is nice, I've received an e-mail on one of the mailing lists that a company in my hometown was searching for Qt developers, so I went to see what it's about. I'm currently working on a very interesting and challenging project with direct assistance/guidance/review from very good German engineers from KDAB, the leading Qt consultancy firm in Europe. I get to use ubuntu linux, git and the latest Qt 5. I'm finally putting the knowledge I've gained with my biggest projects to use. To familiarize myself with Qt5, before starting the job (and as a project for the university) I wrote an aggregator that takes articles from Reddit and Hacker news and shows them in the same list.

This showcases the capabilities of QML and webkit.

Check it out here: https://github.com/balazsbela/qgator

Monday, July 30, 2012

Thesis summary article and updates

As I promised, I'm posting the article about my license thesis that was presented at a local conference held by the two prominent faculties in Cluj (UBB and UT). I've won first prize in the category of UBB students and I would like to thank Siemens Romania for the laptop they've offered as a prize.

Here you can download the paper:

3D Software Visualization Tool for Enhanced Code Comprehension

If there is interest, I will post my entire thesis.

Other than that, I'm busy with work and I will be doing my Master's Degree in Software Engineering.That will keep me busy for another two years.


Monday, June 18, 2012

Symbion 1.0 Released


Symbion 1.0 was released on sourceforge, you can now download it at           http://sourceforge.net/projects/symbion/


Symbion was chosen as a name because the profiler attaches itself to the host program in a way that resembles symbiotic relationships in nature and also because the visualizer uses different interconnected nodes that form a mistletoe-like structure.

I finished writing my thesis today, I also wrote an article about Symbion which will be presented at a conference. I will post both online after they are presented.

Until then, I made a video demoing the new capabilities:



Sorry for the ultra-low quality.






















Saturday, April 21, 2012

Source code browsing

I've implemented the source code viewing. Here's a screenshot:

You simply click a node, it turns orange and appears in the source code viewer, it also has some really basic syntax highlighting. With right click, you can expand nodes.You can also select expanded nodes for source code viewing. It also automatically scrolls near the function definition in the source file, the method name is also highlighted.

What I've been up to lately

Yes, it's been a year again and while writing yearly blogposts is not my intention, this is how it happened.

I've been busy.Now that I check my blog and see all the C++/Perl posts it may come as a surprise to some that I have a new job. For the last 8 months I've been working as a Java Developer at ISDC. We do enterprise web development, yeah, I know what you're thinking, but you're wrong. It's not boring at all, I've had the chance to work on some really interesting projects, one of them was recreating a simpler version of google earth using HTML5 and canvas and laying out some geographical data on it, it was a really interesting R&D project.Other than that it's still challenging, enterprise needs are very different from standard, traditional web application needs. What I like the most is, that we try to do things by the book, reviews are strict, business processes are a priority, our aim is quality.I feel like I'm a lot more disciplined coder.

So if work (part time, 20 hours a week), school (3rd year, final) wasn't enough to keep me busy, I've started to work on my thesis project.

Ever had the heart warming experience of maintaining a huge project you haven't worked on ? Thousands of modules, packages, classes of unfamiliar code. It's hard to decide even where to start. Well this is what my thesis project would like to address. Using the JVMTI a profiling agent attaches itself to the execution of a java program and gathers data about the execution. This data, for now, is limited to all the function calls that match a specific ruleset.This process is done using the ASM API, which lets you hook into the JVM class loading process, and rewrite the classes at runtime, before they are executed.

The gathered data is stored in a huge XML file and a 3D visualizer, written in JMonkey, reads it and allows you to visualize the callgraph, jumping to the relevant source-code portion. This allows you to execute a very simple use case and follow the execution path, without going through every detail a debugging process would force you to. You can give regular expressions matching the classes you would like to record, the rest is ignored. This lets you focus on your code.

The project is called Symbion (because of the Symbiosis-like relationship between the profiling agent and the profiled program). While it's heavily work in progress, you can check it out here: http://sourceforge.net/p/symbion/

I've attached a few screenshots below:

I've made an artificial starting node, so I won't have multiple trees.You can expand each function node and get what functions it calls. The source code display is not implemented yet.

I've taken a week off to work on this project, but it's not expected to be stable anytime soon.I'll have to defend my thesis in June,so it should be done by then.

Here's a pic of the profiler and the console, you can see each class that matched your rules.It's profiling a very simple application I had as homework for school back in the second year.

So yeah, this concludes my little adventure in software visualization.The finer details are yet to be dealt with.I hope it will be actually useful.

Saturday, March 12, 2011

Nokia Qt-Developers Contest

On a boring Friday afternoon I was just boarding the bus, coming home from the university when a friend of mine called me and told me about the Nokia Qt-Developers Contest organized by Nokia Romania.

We immediately established a team and went to the most silent pub we could find in Cluj for brainstorming.

The idea we ended up deciding on was my idea, inspired by looking at the ncmpc source code which I studied for building the 2d spectrum analyzer.

Basically the idea is to write a mobile MPD (Music Player Daemon) client. This is not special, there are many MPD Clients (MPC for simplicity) for every platform known to man. But MPD has http streaming and can basically stream your music back at you like a Shoutcast/Icecast radio station.

So our idea is to write a music player which lets you remotely control playback on your server and connect to the radio-stream and play it back, thus eliminating the need to store your huge N GB collection on a small memory card and leaving space for other stuff.
There are many technical problems with this idea, one is the data traffic cost, so you have to be on unlimited 3G data-plan or on a wireless connection (but these things are not as rare nowadays). The other is network latency (we need to carefully plan buffering) and also the effect on battery life.

So yeah, there are many challenges but if other projects could do similar things, it probably means it's possible and I have seen many great things happen under Qt.

I have already coded a working prototype , I am still battling Phonon because it doesn't really want to do what I tell it to, maybe I will rewrite the player part in QtMultimedia, we shall see.

I like this idea and I find it fun to code, mainly because I think it's relatively original (point me to a working implementation on a mobile platform if you think otherwise).

The other reason why I chose this idea is that it fits the spirit of Symbian and Nokia phones in general, since it targets as it's main audience the geeks, the power users, people who buy Symbian phones to connect through ssh to their server.
This is even more so in our days when Symbian is basically dead, Nokia abandoned it for Windows Mobile, so mainly the people who buy/have Symbian ^3 phones are developers/power users/geeks/business guys.

Even though this app doesn't seem very marketable for average users I believe there is a need for such a thing in the Symbian/Maemo/Meego/Android/Qt crowd.

Oh yeah, and now if we write it in Qt, the Android guys can use it too, thanks to a Romanian hacker named Bogdan Vatra.

I'm not sure that this is the most competitive idea on the list but feel free to vote for anything you like on this link.


Also this app would enable friends to connect to the same server and listen to the same song at the same time and also control playback.


So yeah, wish us luck! :)

Tuesday, March 8, 2011

Visualizing Music - Part 2

I've finally managed to fix the crash.It was quite an ugly race condition, the rendering thread wanted access to the same scene node as the music playback thread, it's not exactly clear where and why, it's hidden in the internals of Ogre, I guess.
Anyway, I've managed to fix it by locking on the same semaphore as used in the callback function in frameStarted() and unlocking it in frameEnded(). So it's finally working, thanks to my friend for pointing it out. Release comming soon.

Meanwhile, I've been experimenting a bit with perl, I rewrote the SDL Music Visualizer example to render a frequency spectrum (aka bars).
I found a nice module for doing the Fourier Transform, Math::FFT.

You can find the code here: https://github.com/balazsbela/Visualizer/blob/master/frequency.pl

And here's a screenshot:




All this in 210 lines of Perl. Perl is indeed awesome.