Friday, July 27, 2007

Still there

Hey,

well long time no sign from me. Last time was pretty stressful, as always when the term-time reaches the end. On Monday I have a written exam in 'Communication and Databases' so no time for coding or doing anything else. Then I have 3 weeks holidays which I spent at my parents and one week in Spain; but that also means no updates on my website cause I have no access to the internet the whole August! In fact I have no idea what to code or reverse anyway...
Apropos Internet: I changed from German Telecom to o2 and this caused a lot of problems! In fact I had no telephone and no access to the net for more than two weeks! o2 is completely incompetent - they really suck!
So, I hope all of you reading this enjoy the summer and relax in the sun - exactly as I will do in the next weeks!
bye Sunshine

Thursday, June 28, 2007

'Hexen hexen'

Hey out there,

just updated my website yesterday evening with a page about the game 'Hexen hexen' in the java section. This is a little card game from my childhood which I accidentally recovered. In fact that is already 2 months ago, but I didn't had time for coding. Interestingly I was quite motivated to create the backtracking solver and finished it quite soon but I was too lazy to code the applet. This was somehow less fun and that's why only now everything was finished. Putting the solver online without applet had been stupid cause you wouldn't have known what's all about. So hopefully you tried the game yourself :-) Perhaps you even found both solutions...
What I will do next (concerning my website) is not clear. I noticed that everywhere you come across the CRC32 (like in all packing programs) but I don't know much about it. Perhaps I will try to code it myself. But let's see... Now I have to go to university to attend some lectures...
So keep cool & see you soon.

Monday, June 04, 2007

Huffman finished

Ok, today I finished my implementation of Huffman compression. It works quite stable and fast but the compression ratio sucks. Perhaps I'm gonna improve it a bit, but I'm not sure if and when. But as it was not easy to code, I hope somebody will find the source useful when trying to code it himself.
As always, you find the executable and source on my website (in the C section).
Have fun!

Thursday, May 31, 2007

Huffman Compression

Well, as mentioned above, I spend more time with coding in the last few weeks. I tried myself with my own implementation of Huffman Compression. (see Huffman Compression for more information).
While doing the huffman compression for a sentence with pen&paper is really easy and intuitive, writing a C programm is quite difficult: it took my really some time to build the huffman tree. Ok, I made two stupid typo-errors and linked the child leafes wrong... this resulted in time-consuming debugging. Well, sometimes I'm an idiot ;-)
But the compression itself was really hard! First I printed the huffman codes out as strings to be sure it works... not that big thing. But really save the codes as bits was pretty difficult and time-consuming and needed some fancy 'bit action'. Again, I made a stupid mistake by saving the codes in wrong direction in the compressed file, so decompressing failed for sure.
Finally, it works... but: it's really really slow and the compressed file is bigger than the original file cause of the overhead I save (the huffman tree). This must definitely optimized. But what sucks most is that my little programm hangs if compressing files larger than about 5MB. I fuckin' don't know why! So it will take some time till I will release the source on my site.
Have a nice weekend!

Monday, May 28, 2007

Got a new laptop... and Vista.

So,

a few days ago I started with some coding and reversing after I had done nothing for a long time. I code a little game in Java and also a bruteforcer which can give the solution, but there will be more information about that on my website in a few weeks. I also thought about coding my own implementation of Huffman-Encoding-Algorithm, but I'm not sure if I should do that.
Anyway, one incident stopped me: my laptop finally broke down. I had problems with it for some time: the battery didn't charge anymore, the touchpad didn't react and, most important, the display often flickered and switched itself off. And now the graphic card broke down, more than some purple lines on the display could not be seen.
So I decided to spend my saved money for a new laptop: I decided myself for a HP Pavilion dv6000. Main features: Core 2 Duo, 1GB Ram, 160GB and a lot of additional stuff. Runs very nice, but... oh no... no XP was shipped but Vista!!! Well after 3 days I slowly feel comfortable with this new OS, but I like XP more. Perhaps it will just take some time.
But I needed a patch to start Visual Studio 2005!!! What's that? Up-to-date Microsoft products are not compatible with Vista? They are all stupid...
Fortunately till now I had no further problems, but they will come... Let's see what will be next...

Tuesday, April 24, 2007

Exams are over!

Wow, now I'm feeling relaxed :-)
Had three oral exams during the last seven weeks: in Automotive Mechatronics, Automotive Engineering and the most important one, in Embedded System, which was today.
I'm really fed up of learning... it's too strenous and takes too much time. I had no time for coding or anything else that's why there was no update in this blog and on my website. Hopefully that will change now and I'll get more constructive...

Friday, February 23, 2007

Brainfuck Studio released!

Finally I have managed to finish the first public release of Sunshine's Brainfuck Studio and put it online at my site.
If you don't know: it's a little development environment/interpreter for Brainfuck files written in C#.
This version (0.6) should be to some extent stable ;-) It works quite fine, but syntax colouring and interpreting sources is even slower than I thought... As it's my first c# project, I don't know how to improve the performance, but let's see.
Also many features I am thinking of are not implemented yet. But there are newer versions to come, one day or other...

Enjoy it and keep cool!

Wednesday, February 14, 2007

Working at my Brainfuck Studio

So, today I had some time, so I continued coding my Brainfuck interpreter in c#.
Well, most basic things work: step-by-step, run-to-cursor and normal execution work fine. Also do saving/loading files, syntax highlighting, a comment feature and much more do what they should... But also a lot of minor bugs impede working with it. And when I look at some parts of the source code, my eyes bleed... too ugly, but it gets better :-)

Also I have really many ideas I want to implement, so it will last a couple of weeks till I'm going to publish a beta version on my site.

But here a screenshot of its current state:

Monday, February 12, 2007

A visit @ IBM

Last week a group of students from the courses of Embedded Systems (including me :-) made a study trip to the IBM research center in Böblingen. Quite cool to have a look behind the scences...
First the building is quite modern and has a nice atmosphere. And very important: the meals at the staff restaurant taste really good! ;-)
We listened to some interesting speeches about IBM servers and of course about the architecture and development of the brandnew Cell processor! Wow! We got also some information about the 'blue gene' and made an excercise for training soft skills.
I think working at IBM is really interesting and must be fun! But to get there a job is very hard for sure... Well, that's future. I have some terms left with learning and exams... So I should get back to work...
Bye

Tuesday, January 30, 2007

Touching .NET

Hey,

again long time no post :-( Well, as always: friends, family and my studies are more important and time is limited...

But I finally managed to have a look at .NET and C#. As you perhaps know, I code Java and C/C++ (with Windows API) for some time. And I'm pretty impressed!
C# looks as I could like it - but as I'm used to Java I have still some problems to find the right commands. And a C language without real pointers? Unusual ;-)
But it seems that you can really fast develop windows applications. Compared to GUI Programming with Windows API, it's like heaven!

Interestingly it remembered me coding with Delphi and its VCL several years ago. So Microsoft needed more 5 years longer than Borland to provide us coders with a useful 'forms designer'. Better late than never...

Currently I'm working with Visual Studio 2003 and .NET FrameWork 1.1; I really like it although it's always difficult to dive into a new language. I thought as a first project (to get familiar with all those new things) of a simple Brainfuck Interpreter. I know, there are more than enough to find in the www, but I wanted to start easy :-)

Started some days ago, I found some strange things. Most annoying till now was the RichtextBox control. I derived a new class from it just to add some simple special functionality. Surprisingly that was not that easy!
* There is no function to get the line and column of the caret - you have to code it yourself (column is not that easy).
* You can specify automatic scrollbars if the content fits not into the visible area. But how to set/get the position of a scrollbar (as with GetScrollPos/SetScrollPos in WinAPI)? How to scroll by code?
In the end, I created my own scrollbar as a child window of the richtext control, but that meant some work and still contains errors... Not the best solution.
* Also using syntax highlighting/coloring (for which the richtextbox was designed) need pretty much programming effort.

Well, I thought these things would be easier than they actually are. Hopefully in Framework 2.0 or 3.0 there are some improvements concering these points.

So in the next days I want to continue coding... hope it progresses faster.

Till then, here is a image from the current status: (as you see, still a lot to do)

Tuesday, November 14, 2006

Sudoku Solver finished!

So,
I finally get my sudoku solver finished. While the bruteforce-backtracking variant is still not properly working, I completed the (in my opinion) more difficult one:
It's using Algorithm X by Knuth along with it's 'Dancing Links': That's a clever method for handling a spare matrix with a double-linked list, make changes to this matrix and later easily undo these changes. Algorithm X is non-deterministic alogrithm for solving an exact cover problem given in matrix form.
The point is now that: a sudoku puzzle can be transformed into an exact cover problem and therefore be solved with the algorithm X.
It took me really some time to understand how this all works, and even longer to implement it correctly (!), but it's pretty fast (much faster than the bruteforce-backtracking approach)! And once you understand it, it looks so elegant :-)
You can download the source from my site of course.

Apart form that, everything is fine. A lot to do for my study, but it's fun and quite interesting. A very good friend of mine moved into my flat, so now there is even more party in the evening.

And I want to emphasize it again: listen to Flyleaf. Such great music, I listened to them all the time while coding. So give it a try!

Ok, so keep on coding & reversing,
Sunshine

Monday, October 30, 2006

Life sign from me....

So, I'm back again... Last week the new university term began and I have a lot to do. It's the first time I could choose all the subjects myself... I decided to attend all about embedded systems and as minor field of study vehicle construction. Seems quite interesting, hopefully it's not getting too difficult!
I haven't coded nearly anything during the last weeks cause I have broken my arm on October 3rd :-( And typing with just one hand is not that funny... A few days ago, I started my own sudoku solver. It's working, a bit slow but working. But testing if a self-generated puzzle has just one solution is NOT working. I don't know why... I hope I get it soon but my motivation is fading away...
Furthermore, I have a new girlfriend, and spending my spare time with her is much more better than sitting in front of a monitor. So let's see what comes next...
I'm out...
C ya

Tuesday, September 19, 2006

Infected by a trojan...

Yesterday I went mad... Altough I use Antivir, a firewall and have all windows updates installed, I fucking little file called 'ibm00001.exe' infiltrated my system. It injects itself into explorer.exe, opens some ports and as soon as there is an internet connection, it sends data out in the world and you cannot use your internet connection anymore.
So I searched from another pc for information and first it looked pretty easy: booting in windows emergency mode, kill the file, kill some registry settings and everything should be fine... and I tried really a lot! And altough I killed everything (all registry info etc.) and there was no sign that this fucking thing is running, as soon as I connected to the web, the same shit again. It has been a long time ago that I was so angry than yesterday. I wasted hours to kill this bastard, but it didn't worked. Seemed I had another harder version than the users in the forums out there. Finally I re-installed my windows and after nearly 6 hours, my system was running again....
WHAT A FUCK!!!!!!! HATE!
If I ever meet a trojan coder, I will kill him!
Bye!

Tuesday, September 12, 2006

Came across a new band...

Hi,
while surfing the net and listening to some music on amazon, I found a new band which I definitely like. Perhaps you had a look at the music section on my website, so you probably know that it's a rockband :-) I'm talking about 'Flyleaf'. I've seen their best song (in my opinion) on TV and bought the album. The come from Texas and played already as introducing band for Korn. Although the music is not as hard as I wish it to be (some songs sound like a harder version of Avril Lavigne), they have some awesome songs! Be sure to check it out > http://www.flyleafmusic.com/

Keep cool...
Sunshine

Wednesday, August 30, 2006

Hey out there,

pretty long no post by me :-( Well, since beginning of August I have holidays and I spent most of the time @ home with my parents and there I have just a lousy internet connection... with that surfing is no fun anymore.
But I updated my homepage with a little tool called 'Desktop Symbol Utility'... was quite funny to code it... dll injecting into explorer process... Would I have done it in Win9x, I would have seen more blue screens than anything else, but fortunaly XP is much more stable if you crash explorer.exe :-))))

Till now, I had just one written exam (in Computer Architecture) this summer. The subject matter was pretty easy but the exam was a bit strange... won't be a good result I guess. After that, I had enough time to relax, to meet old friends and to make party... it's the time of the wine festivals now :-) Unfortunately the weather here in Germany was really terrible, just rain, and I didn't make holidays somewhere else. I was out of luck this summer. Slowly I have to start learning fot the other two exams... well no stress, some time left.

Every now and then, I coded a little bit my project called FolderInfo. It's gonna be a little tool which shows information about harddrives, folders and files (which type of files are most in a specific folder, which subfolder is the biggest and so on). But I'm quite bored coding it: cause it's plain Win API in C++, I have to code the whole GUI with the fancy Windows API and this is killing me! So I decided to freeze this little project... perhaps I have more motivation one day or other... Here a screenshot of the current state:




Cya.... and keep party!!!

Thursday, July 20, 2006

Nice Article

Hi,

well I spent most time outside in the sun, so only few time for computer. But I came across a nice article about some pitfalls in c++... just wanna give it to you. Worth reading for beginner/intermediate c++ coders... Enjoy it
-> Click here

C ya

Thursday, July 06, 2006

We badly lost....

Hey out there,

well, no post for a long time. But I really enjoy summer (great weather for several weeks here in Germany) with all its partys. Really cool! And yes, a bit work for my study also... Exams are getting nearer :-(

I was never really a soccer fan, but the Fifa World Cup this year definitely changed my mind. Okay that's probably because it's in Germany which makes it a bit special for me. Thousands of people go to the parties in the city, everybody is nice and happy... it's just another nation. I would have never ever thought that it's would become such a cool event and that so many people make party and enjoy it. Just gorgeous!
Well, but I have to admit that I was really disappointed on Tuesday when Germany has lost against Italy. I know, they played a bit better, but it would have been so fantastic if Germany would have reached the final :-( Cause I was also a fan of the Australian team (they stayed in a hotel just a few kilometers away from my home) and they also lost against Italy... Hm, I have the feeling Italy will win the championship... but let's see what will happen on Sunday.

Btw, my BAC calculator is now available on my site in English and Germany. Works fine, but the database is a bit small... hope I will feel like adding some more items.

Enjoy the World Cup Final on Sunday!

Thursday, June 08, 2006

BAC Calculator in progress...

Hm... finally summer arrives here again in South Germany after two weeks of rain and coldness. Although I chill the most of the time in the sun I find some time for coding... I'm working at a little applet matching perfectly the summer party time: a blood-alcohol-concentration-calculator (hope that's not too wrong and you can understand me). It uses two scientific formula (Watson & Widmark formula) which give a good approximation of the alcohol in your body. Well, it's nearly finished, here a pic of its current stage:


There will also be an English version of it. The data is stored in an xml file so I can easily update it. Nearly all functions work by now, but perhaps I improve the layout a bit....
Well let's see...

Monday, May 29, 2006

Problems with Outlook :-(

Hi,
just started Outlook to check my mails... and all my contacts were gone! Hm... strange... a few hours ago everything was fine. Clicking on the adress book just gave me a nice message telling me that it is corrupted and I should reinstall it! But all my emails were still there...
Ok, so I searched for the adressbook file (*.wab), and doubleclicked it.... same message. Importing it in outlook also failed (what a surprise ;-)
So I searched in the world wide web... and found:
1) the path in the registry pointing to the adress book is most likely corrupted -> so I had a look but everything was fine
2) the adress book file is write-protected -> no it was not in my case!

So searching again and finally I found it... Three days ago (!!!) I installed the security update KB911567 from microsoft's windowsupdate.com ... That's s the reason. It modifies outlook files and kills the adress book. Fortunately you can uninstall it! But I don't get why it still worked the last days and suddenly (3 days after installing this update) it collapsed.

Well, I hate such shit. You think you do something right by installing updates and then it fucking kills your adresses! Bah! PURE HATE!!!!
I think I will drink a beer know to come down....
Good night!

Monday, May 22, 2006

Fancy code for swapping integers

Good evening.

While surfing the internet, I just came across some articles about bitwise operations in C. There I found a fancy code snippet for swapping two 'ints'. Well I never thought about it but if I had to code a little swapping procedure, it would probably something like this:

void swap(int* x, int* y)
{
int z = *x;
*x = *y;
*y = z;
}


Ok, quite easy. Just use a temporary variable... but there is another approach without a third variable, just look at this:

x ^= y;
y ^= x;
x ^= y;

Really cool xor-action, isn't it? Try to figure out what's going on here. (Tip: x ^ x = 0)
Well, every day I learn something new... but that's enough for now.
Good night. :-)