Wednesday, February 25, 2009

196 Algorithm

This is one of the Open Math Problems..
The problem is simply is "Determining if the 196 algorithm will halt on the number 196". The 196 algorithm is very simple, reverse the input number, add it to the original input number, and halt if you have a palindrome, if you don't re-execute the algorithm with the new number. I wrote the 196 algorithm in java, and I just gave it a try by running it for a while, and writing the results to a file, I got a 39 MB file in 1 minute approx. and the algorithm didn't halt of course. Now am thinking about approaching the problem with a pen in my hand. If you think about it, the 196 algorithm will directly halt if you give it a number where all digits are less than 5, or otherwise, if every 2 opposing digits sum up not to yield a return ( > the output on a file to store it).

Code -> http://pastebin.com/f53aa5124

The Netbook Effect: How Cheap Little Laptops Hit the Big Time

A very nice article Here.

Saturday, February 21, 2009

Linux FAQ

A friend of mine asked me some questions, and I though they might be helpful for other people.

Some how I feel that my linux is slower than windows XP, not the boot up time but the reponses on button click,opening a web page etc..
I am using mac4linux theme , will it consume any CPU bandwidth?


This doesn't necessarily mean that your theme is the reason, there are other factors that can slow down your response time. This could be something like compositing (a program called compiz, that does some sort of animation and effects forlinux desktop), compiz requires some high capabilities, like a good graphics cards... disabling compositing will greatly improve your response time.

Also this could be due to some malfunction in a program that sucks your resources, by experience, firefox sometimes does that especially if there is some flash running. Also firefox leaks some memory (the memory it takes keeps growing and never shrinks with time), this will cause your RAM to be full after sometime, and this will cause your computer to start using the swap space on your Hard Drive, which will really slow down the response time. Both can be solved by closing firefox (Closing the page containing flash sometimes doesn't solve it), please not that when you close a program it doesn't get closed immediately even if its window disappears, it will probably will take some time, 1 to 30 seconds, it might not even close at all. I would rule out the theme as the reason and check compositing and firefox, although this might not be true.

There is something really useful that you can do to have a guess about what is sucking your resources. Right-Click on the pannel (top or bottom of the page), select "+ Add to Panel", then select "System Monitor" (you can use the search field on top), then click "+ Add" once and then close. A new Item will appear in your panel, Right-Click it, Choose "Preferences". Now select all the Check-Boxes, Decrease the "System Monitor Width" to 10 pixels and set the "System monitor update interval" to 500 milliseconds, and click close. This will put a graph for most of your computer/laptop resources in the panel, that will show you what was happening in the last 5 seconds (you can Increase this amount by either increasing the width or the interval, but 5 seconds do really well for me). Now keep your eye on this graph while using your competer/laptop. Check where are the spikes that stay high for a long time, (you can know the colors from the Preferences window). Now if you want more details, for example something uses your processor, or memory. Give a single-click to the graph, which will open the System Monitor. There you can see bigger graphs, but now let's go to the processes tab. There you can see each process running and its resource usage. If you press the field "CPU" (or Memory) from the table this will sort the processes according to their processor (Memory) usage. Now you can see clearly what is sucking up your resources and handle it.

I also just wanted to know the best softphone available for Linux... I came across some phones on web, the quality of the audio is not so good..... can you please suggest any?

I understand you need a SIP phone, which uses the SIP protocol to make calls through a VOIP provider.. Personally I couldn't get any to run correctly.. But there is some phones that people say are really good like Ekiga for example.

Also please feel free to ask about anything you would like about linux or other things at anytime, I am not a very terribly good expert, but at least I know some stuff.
Also, with linux googling your problem and reading some forums usually does it. If the problem is somehow extreme, you could join an IRC channel related to your problem and ask there, there is usually somebody to help.

Friday, February 20, 2009

Quote

Lead, follow, or get out of the way. [Laurence J. Peter]

Monday, February 16, 2009

One of my dreams coming true - Shooting



So finally I found a club nearby in Stuttgart where I could learn shooting competition Air Rifles. Yesterday was my first time :D. I used a 16,000 LE for 2 HOURS. Did aprox. 100 shots. You can see my results below :D. Hopefully I will go regularly and I hope those holes get a little more towards the center.











Saturday, February 14, 2009

CUDA Project and Presentation - Steganography

So, finalizing the semester and submitting everything....
Today I had my presentation for the General Purpose Programming with Graphics Card. Here are the presentation along with the project code.
Here you can find the code, the presentation and the report.
Project

Monday, February 9, 2009

Advanced Topics in Distributed Systems [SEMINAR]

Today I finished my presentation for the seminar. It was about Reliable Gossip Based Multicast. Take a look if it's beneficial for you.
Report
Presentation

Saturday, February 7, 2009

Linux is

Let me explain some stuff about linux. First of all, about the safety, Linux is structured in a such way that the system is relatively safer than windows, and limiting the control of program (compared to your control) over your system. That's what have prevented Linux from the Virus explosion that happened for windows.
But away from safety, personally I don't use linux because of safety, I use it for 2 exact reasons, "Stability" and "Control" over my OWN hardware :D. That's what windows lacks generally. We could get into details here, if you'd like. There's a lot of examples where you don't have control over your own hardware in windows. For linux, in most cases, this doesn't happen at all. For example, once I had a couple of my friends over in my room, and we all needed internet access... I was able within 10 minutes to turn my laptop to a wireless router. To be honest, this worked for may b 6 months and they did some changes to the driver that made problems. This is control over my hardware. Talking about drivers, one of the main issues with linux, in my opinion is the quality as well as the availability of drivers for the various hardware. The hardware manufacturers are the one to blame for these problems. The usual scenario is that the manufacture makes the hardware and only provides drivers for windows, then the linux programmers have to reverse-engineer the device and write drivers for it. This solution provides a working driver, but sometimes not supporting the full functionality of the hardware. The hardware manufacturers could release the APIs for their devices and thousands of linux programmers would be more than happy to develop the drivers. OR they could write linux drivers for their own hardware as they do for windows, by the way, NVidia started with the second option.
Also, did you know that a lot of the very famous programs were first developed for linux.. like firefox, thunderbird, apache web server, sqlite and a lot of other software.

About stability, we should take a look at the servers field, where stability and reliability (uptime) is the key issue. http://news.netcraft.com/archives/web_server_survey.html take a look here... Linux software (apache) takes more than half the market share for web servers.

One last thing, if we judge linux before really trying it for a relatively long amount of time, our judgment will will biased. Because the linux things will be really hard and annoying, and the tasks will seem long and complex.. just as they seemed when we started using windows.. we just need to get used to it first, and then judge the difference.

Myself, I used windows form 1998 - 2006 and linux 2006 - current. If, at least for my own needs, windows was a better operating system, I wouldn't have made the switch or I would have switched back.

Give it some thoughts, and may be if you'd like, give it a try.

Andrew Boktor