Sunday, August 31, 2008

Summary of summer 2008

So here we are, two weeks left out of the vacation.This summer was really short.I had big plans but it didn't quite work out the way I planned.Still, many things happened and I reckon that it's about time I wrote a blog post.
When summer began I had plans for qOrganizer.These involved optimizing the database handling and removing the option of storing all data in text files.The database needed optimization because qOrganizer was my first project and I was quite a noob.I made many mistakes and if I want to continue this project I have to clean up that mess.But people can't use data so I have to write an importer tool to convert data into the new database format.
I did write that.It uses threads and it's quite a nice piece of code.I call it DBConvert module.
It makes efficient use of inheritence.But database optimization is one of those things that don't require too much creativity.Frankly it's quite boring and I would have someone else do it if I could.So I left it half incorporated, and haven't touched the code ever since.
I still have my plans though, like implementing a nice plugin system to enable third parties to write extensions for it.Among other things I would have liked to do a nice statistics module.
Lets face it, people are lazy.I'm lazy too.I'm too lazy to write every event on every day and keep my stuff organized.It's too much for me.So I want qOrganizer to count recurring events, to search for a pattern and present me with a list of the most frequent events so I can just click them and focus on writing only new events.This is one of the small things that separate something good from something great.But none of this is implemented yet, these are still plans.

My summer was very busy.My main aim, which I did acomplish, was to get my drivers license.
I'm 18 now.And this summer was the only time where I had the time to learn how to drive and learn the legislation and everything else.I was right, it took me a while.I started it on June 17, on the first day of vacation, and got my license in august.I'm still glad to be over it, some of my friends still couldn't pass the exams.It's really not easy that easy to get a driver's license in Romania.It's mostly because of the new examination system.Now we have touchscreens and cameras staring at us.The new questions are harder and they do differ from a lot from the things we learned.Anyway, this is done.Thank God.

Among other things I did, I spent a wonderfull week at the shores of the Balaton in Hungary.
Lasting friendships have developed there.The only one I missed was my girlfriend.
Yes, I'm defying a stereotype.Open source developers do have girlfriends.I'm in this relationship for 2 and a half years now.And it's ok.Altough she does have a hard time understanding how important coding is to me.

I titled this blog "The place where I coredump when my brain segfaults", yet all I did was write articles about coding, so I reckon it's about time I get a bit more personal.This won't change the main topic of this blog though.
I know a lot of open source developers and many people ask us why we do what we do,why write code for free and make it accessible to everyone, why bother, we don't get paid for it.
I had a donate link on my site for almost a year now but I didn't even get 1 Euro from it.
I did win a contest in Hungary with qOrganizer and I got a 400GB sata hard drive out of it, but other than that it's not a really profitable bussiness.Of course I'm not disapointed by this fact, it was never ment to be that way.I wouldn't have it any other way and neighter would my friends.
But in this cutthroat capitalist world we live in outsiders find it hard to understand why anyone would ever do anything for free.That's the reason why many people attributed Linux with communism, although this is very far stretched.
I had the rare opportunity to meet someone with poetic inclinations, someone who writes poems and makes them available for other poets and literature lovers to see, on the Internet.
So I was curious.Me, an outsider to poetry, asked this person about the reason for writing, just like outsiders ask us why we code for free.
I was told that writing poems is something that comes from the hearth, it is an uncontrolable urge to express one's feelings in this form of art, to exploit one's creativity.
I was also told that this person wants to print a book someday and the reason for that was not making profit out of it, it was to reach a bigger audience.
So, I feel like poetry is a lot like writing code.My friends and all the developers I know have this curiosity about how things work, how ideas can be implemented.It's something that also comes from the hearth, it's a natural consequence of ones personality.And in my opinion it is an art form, just like poetry,scultpure and painting.
At first this seems like a bit of an absurd affirmation, code seems to have the same logic, the same structure, no matter who writes it.Every ftp client has a method of connecting to the server.Every word processor has a function to save files.It seems like writing code leaves no space for self expression and creativity.Well nothing could be further from the truth.
Every developer has an unique style of coding.Everyone thinks differently.Every code is different, even if it does the same.It contains the fingerprint of it's author.It's like there are many surrealistic paintings but every painter has his own style.
Altough, many problems follow a pattern.I recently looked into implementing design patterns.
I'm not really good at following the rules.I like to have the freedom of making my own rules, I like to think outside the box, but if an existing solution has obvious benefits when comparred to my own idea, I'm happily willing to compromise.It's the only way to learn.

Another important event of this summer was that I started a new project.
I was talking to a friend one day, and I had a nice little story to tell, one that happened to me when I'm was 16, but it just wasn't the same when I wrote it down, I had to tell it in person, and I knew that.So here I was messing with my friend, his curiosity grew bigger by every minute, he was wandering what secret I had, that I wasn't willing to let it pass the yahoo servers.Of course it wasn't a secret or anything big in fact, it was just one of those nice stories one tells to make time pass faster.But it raised an interesting point.Secure chat.We started talking about security.
What can one trust to be sure of his privacy?Well the answer was obvious for me.Encryption.
Banks use it, companies use it.What better option do we have? Oh, of course.Direct connection, we don't want our messages to pass one centralized server where who knows what happens to them.One centralized server owned by big company.We joked about the guys at yahoo having good laughs at our stories.So I started searching the net for a little utility.Something that lets you connect directly and uses SSL to encrypt all data.To my surprise I couldn't find one I was happy with.I don't like java, I don't like .net.I want it to work under linux too.I couldn't find one written in Qt.So I decided to write one, I figured it would be nice and I eagerly awaited seeing what kind of code I would write, having all the experience I had with qOrganizer.So I looked into the use of QSslSocket and QTcpServer.And started writing my new program, cleverly and creatively entitled qSslChat :)).At least I gave it a name that would give a great hint to what the program does.And yes.Here I am.It works.It also has smileys, file sending everything to cover our chatting needs.I would call it beta quality.Today I filled the form at SourceForge to host it.
So maybe tomorrow the code will reach the CVS repository.
Anyway it's a nice project.I'm really enjoying it.I learned a lot.And the code is pretty readable too.

So now the summer is on it's last legs.I guess it was ok, but I do regret not doing more.
The biggest cause of this regret is that now school will start.This is my last year of highschool so it will be even worse than the other ones.And by worse I mean that it will require even more dedication.My school is pretty Spartan and takes things really seriously.I'm not familiar with the notion of free time during school.The Romanian education system is harsh enough but my school takes it to whole new levels.And since coding is art, I require it to be the only thing on my mind to do it right, so I can't really do a lot of coding during school.Anyway, I'll try my best in making things work out.

I think this concludes this long and boring blogpost no one will ever read.I figure that at this point I could write anything, because no one ever reads this far.
Take care everyone.

Wednesday, October 24, 2007

Just to let you guys know why I don't write new posts.
I'm really busy at school, learning and stuff sucks up all my time.
I'm currently trying to learn (besides doing homework for every day) some algorithms and methods for some competitions. I'm trying to polish up my knowledge of Dynamic programming and stuff like that, so I'm quite busy ;)

Saturday, October 6, 2007

New website for qOrganizer is now available!

I just finished qOrganizers new website. It contains information about how to use the program, and answers to some important questions.
Hope you like it:

http://qorganizer.sf.net

Friday, September 7, 2007

Added two new icons for the toolbar.

I added two new, modded nuvoX icons to the toolbar, now the toolbar is officially full.
One saves the current tables into the SQLite database, the other to MySQL, and there is also one for text files but the one for the current storring mode is not displayed.
Also added an option to the setting dialog, so these can be turned off.

Also I had my time with QMap, and added the ability to assign dates to marks, the date is updated when the current cell changes in the table with marks, it's in a QDateEdit next to the averages.
This is a new sweet feature too.

After long hot days now it's really cold, and I'm kind of sick.
School is almost here, but I feel that I can release before school starts (here on September 17).

Thursday, September 6, 2007

On the way to 3.0


qOrganizer got a new iconset today, I replaced my modified nuvoX 0.6 icons with original nuvoX 0.7
icons, now it looks more nice.I'm not happy with the booklet icon though, but I couldn't find a better one in nuvoX.
Here you can download nuvoX: http://kde-look.org/content/show.php/nuvoX?content=38467
All icons are png now, now more xpm.

You can see a screenshot of the new tabbed settings dialog too.


Now all settings are stored in QSettings using ini files in the folder ~/.qOrganizer (except one which is stored in the registry, this is the path to the .qOrganizer folder), the user can now change between folder paths, without restarting the application, the content will just load.
So this was cleaned up too.


Tuesday, September 4, 2007

Now we can drag and drop images to the journal.


qOrganizer got another nice feature, now we can just open konqueror (explorer) or any other program that deals with local files and just drag an image to the QTextEdit, it will get displayed and stored.

Drag and drop looks pretty nice and here's the code to do it:

void CQTextEdit::insertFromMimeData( const QMimeData *source )
{

if (source->hasFormat("text/uri-list"))
{
QTextCursor cursor = this->textCursor();
QTextDocument *document = this->document();
QString origin = source->urls()[0].toString();
#ifdef Q_OS_LINUX //toLocalFile() doesn't work
origin.remove("file://");
#endif
#ifdef Q_OS_WIN32
origin.remove("file:///");
#endif
QImage *image = new QImage(origin);
if(!image->isNull())
{
document->addResource(QTextDocument::ImageResource,origin,image);
cursor.insertImage(origin);
}
delete image;
}
}

We have to subclass QTextEdit and reimplement insertFromMimeData()

Saturday, September 1, 2007

SQLite storing and search capabilityes finished.



I finally finished the SQLite database managing functions, now the user can freely choose what storing mode he/she wants.Other than that, it decreases the overall lameness factor of the program (text files are primitive, but nevertheless fast :) ).
I also implemented the ability to search through events and words in the journal so now the user can easily find which event occurred when.
That looks pretty nice, I'm satisfied with it. I thought I would spare the translators from some work and just use < > for previous and next, well if it's pretty obvious.
Also added some functions to save between storing modes. Example: when you are using text files as a storing mode and you have all your data in text files, you click File/Save to/Database and it saves your to-do list,timetable,booklet, and the schedule and journal for the current day into the SQLite database,
so if you stored all your schedules in text files, you just click through them and press Ctrl+D (the equivalent of File/Save to/Database for each and you got your stuff stored in the DB.
It's not the best mode but it should be ok, since you only have 2 months of stuff (if you were using the program from when it got stable).

Also thought about making a config file with XML and moving every setting from the registry and from the current (lame) config file to it.But I realized that XML was an overkill for this kind of task so I think I'll move every setting (the ones from config.txt) to the registry (~/.config under linux, using QSettings), since every user has a different registry.Of course a config file would be better since several people could store separate data using a single system user, but why not create a new one for this kind of stuff.
That will be decided.
Just glad that SQLite and searching works nicely.
Now I need to figure out how to achieve compatibility with MySQL :)

The bigger problem is that I'm writing these on September 1, I'm drastically running out of time.
I want to finish everything important until school starts, and when there is school I want to do easy stuff like webpage for the project, and documentation (yes I have 0 of it :D ), along with fixing bugs and adding minor features.
Because when school is on I just don't have time for anything, not that it's that hard (mentally) it's just a lot of things to do. So I virtually have no free time, only on weekends.
Yeah I know, that sucks :)