Tuesday, October 23, 2007

Business slides, finally!

Fundamentals of Business slides, all 18 chapters (50 MB, RAR compressed file): download now!

Monday, October 22, 2007

Sorting techniques and algorithms (1)

Have an array you need to put in order? Keeping business records and want to sort them by ID number or last name of client? Then you'll need a sorting algorithm. To understand the more complex and efficient sorting algorithms, it's important to first understand the simpler, but slower algorithms. In this article, I'll talk about the 3 algorithms we studied at college which are bubble sort, including a modified bubble sort that's slightly more efficient; insertion sort; and selection sort. Any of these sorting algorithms are good enough for most small tasks, though if you were going to process a large amount of data, you would want to choose one of the sorting algorithms that I'll talk about in the next posts isA.

Bubble Sort:
The bubble sort is the oldest, simplest and generally considered to be the most inefficient sorting algorithm in common usage. Unfortunately, it's also the slowest. It works by comparing each item in the list with the item next to it, and swapping them if required. The algorithm repeats this process until it makes a pass all the way through the list without swapping any items (in other words, all items are in the correct order). This causes larger values to "bubble" to the end of the list while smaller values "sink" towards the beginning of the list.

Since the worst case scenario is that the array is in reverse order, and that the first element in sorted array is the last element in the starting array, the most exchanges that will be necessary is equal to the length of the array. Here is a simple example:

Given an array 23154 a bubble sort would lead to the following sequence of partially sorted arrays: 21354, 21345, 12345. First the 1 and 3 would be compared and switched, then the 4 and 5. On the next pass, the 1 and 2 would switch, and the array would be in order.

The basic code for bubble sort for sorting an integer array using C looks like this:

A better version of bubble sort, known as modified bubble sort, includes a flag that is set if an exchange is made after an entire pass over the array. If no exchange is made, then it should be clear that the array is already in order because no two elements need to be switched. In that case, the sort should end. The new best case order for this algorithm is O(n), as if the array is already sorted, then no exchanges are made. After modifying the code it will be like this:

In part two I will talk about insertion sort and selection sort. Please post a comment if you have any questions :)

Tuesday, October 16, 2007

Developers developers developers developers...!!

A couple of years at Microsoft and you should start acting like this!!



In this video: Steve Ballmer, Microsoft CEO.

Monday, October 15, 2007

You are a Programmer IF...

1- You have more than a document file on your desktop called "To Do".
2- You start counting from zero.
3- You can find some code in a folder on ur PC & you wonder when & how you made this code.
4- You may stay awake a whole night trying to fix a bug, then when u go asleep, you dream of the solution.
5- You don't like most of the softwares in the market.
6- You forget to eat or sleep cause you were too busy writing some piece of code.
7- You stress the words IF, THEN & ELSE while speaking.
8- You always search for the undo button (ctrl+z) when u mistake in doing any handwritten stuff.
9- Most of your speech is not understood except by your colleagues in college or work.
10-You find yourself writing a semi-colon at the end of any sentence instead of a full stop;
11-You estimate lengths better in pixels than in meters & centimeters.
12-You use the eye-drops as frequent as you use the toothpaste.
13-The First words you write when trying sth new are "Hello World".
14-You never used that device that looks like a computer screen & called "TV".
15-You - every now & then - wake up with the keyboard imprinted on your face.
16- You have a volatile Memory like RAM.
17- You write C++,C# or Java better than u write your own language.
18- You don't think wearing sports shoes with a suit is strange.
19- You remember all your passwords, but fail to remember you own birth date.
20- The word 'Engine' reminds you of games more than of cars.
21- Anytime you see a penguin, you think of Linux.
22- You have a LAN in your room.
23- You're the highest-paid yet the worst-dressed person in the office.
24- You follow the instructions only if everything else fails.
25- You use F1 instead of SOS.


Source: JetBrain blog (a blog by Roaa Mohammed, an MSP at Ain Shams university)

Wednesday, September 19, 2007

Imagine Cup

Mohab and Marwan (MSPs at the AAST). CCIT's Imagine Cup booth

What is the Imagine Cup?

The world’s premier student technology competition, Imagine Cup is one way Microsoft is encouraging young people to apply their imagination, their passion, and their creativity to technology innovations that can make a difference in the world – today. Now in its fifth year, the Imagine Cup has grown to be a truly global competition focused on finding solutions to real world issues. In 2007, more than 100,000 students from 100 countries entered the Imagine Cup competition.

The 2008 Theme: The Environment
This year, Microsoft is calling on young programmers, artists and technologists around the world to "imagine a world where technology enables a sustainable environment." We’re challenging students to bring their ideas to life in a multifaceted competition that comprises nine categories, each catering to a different technological or artistic affinity. Students’ work will reflect valuable, real world solutions, while giving them the opportunity to compete for cash prizes. When coupled with the power of technology the potential of young people is unlimited and the ideas they develop for the Imagine Cup could significantly improve the lives of millions of people around the world. In this competition, everyone wins. The 2008 World Finals will be held in Paris France from July 1-8, 2008.

Who can enter the Imagine Cup?
You are eligible to enter any invitational that is a part of this Contest if you meet the following requirements at the time of registration:

  • You are 16 years of age or older.
  • You are actively enrolled as a student at an accredited educational institution that grants high-school or college/university (or equivalent) degrees any time between January 1, 2007 and May 31, 2008.
  • You are not an employee or intern of Microsoft Corporation, or an employee of a Microsoft subsidiary.
  • You are not involved in any part of the execution or administration of this Contest between.
  • You are not an immediate family member of (parent, sibling, spouse, child) or household member of a Microsoft employee, an employee of a Microsoft subsidiary, or a person involved in any part of the administration and execution of this Contest.
  • You are not a resident of any of the following countries: Cuba, Iran, Iraq, North Korea, Sudan, and Syria.
  • If you are a Microsoft campus representative (such as Microsoft Student Partners http://student-partners.com/) and you meet the eligibility criteria set forth above, you may enter, but you are prohibited from using Microsoft property or resources, including without limitation, Microsoft networks, hardware tools and technology resources and/or the counsel of Microsoft employees, in connection with the creation or execution of your entry.

Competition Categories
Below is a list of the 2008 Competition invitationals.

  • Software Design
  • Embedded Development
  • Game Development
  • Project Hoshimi
  • IT Challenge
  • Algorithm
  • Photography
  • Short Film
  • Interface Design
Visit http://imaginecup.com for more information about the Imagine Cup and to register for the 2008 competition. Good luck! ;)

Wednesday, August 29, 2007

Guess who's back, back again!

YES! I'm back to the web hosting business :) It has been more than 1 year since I sold my beloved company NileServers (which is displaying an "Account Suspended" message right now by the way!). My new company's name is VergiSolutions (don't like the name? try to come up with a better one!), and its website was supposed to be launched one month ago! (who needs a website for a web hosting company anyway :P) I had to postpone it to work on the new web-based Information System of MetalMax which I will (hopefully!) finish very soon. So wish me luck (and move all of your websites to VergiSolutions :P)

The first Egyptian 3D game

Have you ever heard about the first Egyptian 3D game? It's called Abou 7adeed (previously named Boo7a) and it's based on the character of Mohamed Saad's famous movie "Boo7a" and how he and his friends rally together to take revenge on evil-doers. I'm officially the first one to buy the final version of this game :) Although I'm not into gaming at all but I just got very excited about the idea of playing a game with Egyptian characters, culture, folklore, environment...etc, specially when I met the young, talented and ambitious developers of the game, and founders of Khayal Interactive Entertainment, AhmedEl-Deeb, Mostaf Ashour and Ahmed Sabri, at last year's Cairo ICT when they where promoting there game at TE Data's booth.
My game download progress has reached 71% (of approx 378 MB), so I will be writing a review about the game very soon :) Till then, watch the video below, it will give you an idea about the game.

Update: After my download reached 96%, some one from TE Data called and asked me to reconfigure my router with him on the phone, so I had to pause my download. When I tried to resume it later, the file I was downloading disappeared from Abo 7adeed's server! DAP keeps displaying the "File requested does not exist" message :@ I contacted support@abo7adeed.com, few minutes later I got a "delivery failure" message!! So I had to contact info@khayalie.com directly. Hope they are not one of those wait-48-hours-to-get-a-reply companies!

Update 2: About 4 or 5 hours after I sent the email to Khayal IE, I thought about trying the download for the last time before going to sleep, and IT WORKED! Few minutes later, I was installing the game :) The installation ran for a few minutes then it returned an error message. The file is corrupted! :( I sent another email to Khayal and went to sleep. I woke up next day to find a message from them telling me that they have re-uploaded the file and double checked that it's working fine. I downloaded the game again, installed it and happily played till level 4 (or 5, can't remember exactly). I'm not going to review the game now, but I'll just give ratings about a few aspect about the game:
Gameplay: 6/10
Graphics: 7/10
Sound: 4/10
Value: 6/10
Overall rating: 5.75
Final comment:
Not very good, but not that bad either (if you compare it to international games). BUT it's a excellent start for the Egyptian games, but will need TONS of work/improvements if they are planning to publish another version of this game.
Wait for the detailed review....

Monday, August 27, 2007

How to get a Blue Screen of Death!

Did you know typing into Internet Explorer Version 4 through 7 "about:mozilla" in the address bar would cause a Blue Screen of Death (BSoD) (well, humor me here, its just a blue screen, but still funny).
If the above doesn't work, you are running Windows XP SP2, so type: "res://mshtml.dll/about.moz" and you will get it!

I just hate that stupid BSoD!! :@ It keeps popping up every now and then ever since I bought my laptop, and now one is able to know what the problem is! :S

Top 10 Reasons Firefox "Owns" Internet Explorer

  1. Tabbed Browsing
    Firefox rocks at tabbed browsing. Not only does the tabbed browsing work really well, but it also is blazing fast! Tabbed browsing in Firefox completely dominates and should embarrass the tab browsing developers at Microsoft.
  2. When Windows Crashes, Firefox Recovers Your Tabs!
    If you use Windows, you will have lots of crashes! I love how Windows is CLUELESS on what the heck was open after recovering from a crash. I mean, on top of it crashing on me, it makes me log back in, re-launch whatever I had open, and then make me want to kill myself. The saving grace I have now is Firefox saves all the latest tabs I had open, and asks me if I'd like to open them! What a concept! Thanks Fox for making my Windows Blue Screen of Death experiences slightly more enjoyable.
  3. Find Stuff On Web Pages Without A Pop Up Box!
    I hate when I try and find something on a web page in Internet Explorer! It creates a "pop up box" for me! which I then type in, and it try's to show me where it found things... Firefox Find is not intrusive at all, and super fast! It will even highlight multiple instances of the search term, so I can skim the document quickly.
  4. Way Faster than Internet Explorer
    Firefox is super fast! Even after Windows crashing, Firefox will load your many tabbed pages instantly at the same time, and your CPU does not get totally used and destroyed, and you have plenty of RAM left! I dare you to load 10 Internet Explorer 6 windows, or even load 10 windows in "tabbed" browsing in Internet Explorer 7. I hope you have an infinite supply of RAM.
  5. Customizable, and Plug-In Friendly
    It's so easy to download awesome plug-ins for Firefox! It's easy to install them, and it's easy to remove them if you don't like them. Internet Explorer didn't even have this ability until Internet Explorer 7, which is useless anyway for another 100 reasons I'm not even going to bother going into.
  6. Great Download Manager
    Firefox has an awesome download manager that shows you the progress of your downloads, lets you specify default download locations, and lets you keep things clean. Try downloading multiple items in Internet Explorer and your poor taskbar will start sucking wind fast!
  7. Simple User Interface
    Simple is awesome, and Firefox understands this. Internet Explorer is freaking complicated! The way I rate a user interface successful is by the interface behaving how I expect. If I click things, and they don't do what I think they should do, I get upset because that's a bad interface!
  8. Less Crashing
    Internet Explorer crashes all the freaking time! You'd think the browser made by the company that wrote the operating system, and integrated into the operating system, would not crash! Wait... I get it.. lol. I have yet to see Firefox Crash!
  9. Small Install!
    Internet Explorer is the biggest browser I have ever seen. Firefox is a 5MB file, and Internet Explorer is at least a 20MB download depending on your options.
  10. Built-In Google Searching
    Google rocks, so does Firefox with Google Toolbar. Internet Explorer does not rock, and neither does MSN Search. If you use Internet Explorer, you have to know how to change the default search provider, where as Firefox comes built in with Google Search, and the Google Toolbar!

Saturday, August 11, 2007

Web Site Top 10 Things to Consider!

So you are creating a new web site! That's fantastic! But what do you need to make sure you consider when you embark on the project? Below is a list of 10 things that you must consider before you build your site.
  1. Browser Resizing
    Does the web site resize nicely in different browser window sizes. What is the target size you are designing your site for? A site can look great on 1024 by 768, but what happens when you put your site on a high resolution 21inch LCD Panel. Your site should look good on any resolution!
  2. Background Color
    If you use white background colors, do you actually specify white, or just leave it as default? A lot of people have their default background colors set to grey instead of white. When you load a site up that does not explicitly set the background color to white, it shows up as whatever the user has set up as his default.
  3. Site Alignment
    Will the site be aligned on the left, right, centered? Very important decision to make! Ensure you have this question answered before you begin, although it can be changed later, it can be a pain.
  4. Will the header and footer of the site resize?
    Does your header need to resize every time the browser window is resized? what about the web page footer? Make sure you speak with the designers if you have any working on the project and get this detail hammered out!
  5. Browser Compatibility
    Will the site need to be 100% compatible with all browsers? Opera? Safari? Internet Explorer? Firefox?
  6. Dynamic Rollovers
    Does the site require dynamic rollovers for navigation buttons and hyperlinks?
  7. No Tables
    Do not use any tables, use DIV tags or SPAN tags for everything.
  8. Standards
    What standard will you follow? W3C Valid HTML 4.01, W3C Valid XHTML 1.0 Transitional, or W3C Valid XHTML 1.0 Strict.
  9. Make sure to use SEO Semantic Coding with complete presentation separation.
    You are probably really familiar with normal HTML coding. SEO Semantic Coding, or Semantic Markup focuses on writing code that is descriptive. It enables search engines and other web site indexers to categorize your site properly, and give it more weight in search results.
  10. Web Site Loading time.
    Make sure you know all the basics about saving images. Doing this piece wrong can cause your page load times to increase exponentially! PNG/JPG/GIF... make sure you know which file type to use in the right situation.