Friday, July 31, 2009

Spam Blogs - Splogs



TV-Spam and Email Spam
First spammers invented the Spam via the TV. Advertise to Millions of People on Channel 7 whether they like it or not on. Then when TV ads become so expensive while the Internet is booming. They invented the Email Spam. Send thousands of emails to unknown people for free!

Splogs
And now this, Spammers create a Blog using a free blogging service like Blogger.com. They want to get quick traffic. So they create multiple blogs talking about the same stuff, same duplicated posts, same concept, and then link them to each other. This increases the PageRank and number of visitors. These type of blogs are called Splogs (with p).

Are they Bad, Shall I worry?
If it weren't for the Splogs, you would find anything you want in the search engine much easier much faster.
Splogs pollutes the search engine results and waste disc space, the bad thing is that it can be done automatically via a program, especially because Blogger have an API, this will make it even easier for Spammers.

Message for the Spammers
If it is worth it, I'll take it and talk about it

Wednesday, July 29, 2009

Twitter followers decrease

If you have faced this, don't worry all of us did. The number of followers dramatically decreases by 80 or 100 sometimes. I here by list some of the reasons why this is happening.

TwitSpam
Some accounts were created just to spam or promote some porn sites. These accounts may have found their way into your followers. Twitter runs a batch to detect those bad accounts and bans them say each month. That's why you notice this great cut of followers.

Promotional Programs
Some accounts follow random people (including you) after a certain amount of time if you don't follow them back, they will automatically unfollow that account.

Follower/Following Counts bug
Twitter is currently working on this bug, the number might mismatch the actual followers.
Intentional Unfollowing
Don't you sometimes look at your following list and decided to "Clean" them. Well other people do that too, might be you are becoming boring, or tweeting too much or your topics are just not interesting to some people. With tools such as TMUT (Twitter Mass Unfollow Tool) they can easily follow or unfollow in bulk!

After all the number of followers is just a number, don't imagine that if you have 20,000 followers that means all of them are your faithful readers. Only 1/10 of the followers might click your link.


Tuesday, July 28, 2009

What is the blog posting frequency you prefer

As a blogger, I love to write everyday. However, some of my readers emailed me about this habit. They told me having writing frequent IT posts everyday make it hard to digest and quickly lose interest.

Anyway, I leave this to you, What do you think?

What is the blog posting frequency you prefer?


Monday, July 27, 2009

Kill Screens

In games Kill screens happen when there is a series of actions happened unexpectedly and not tested probably that lead to what Programmers call a bug.

Here is a video of Donkey Kong Level 22 Kill Screen.

Some of the OLD Kill Screens I found









Now If most of you didn't see the games Kill screens, I am pretty sure she had seen the Windows Version of Kill Screen.

The Blue Screen of Death




Thanks to Alhalwchi, he introduced us to an other Kill screen that Microsoft used to have on its Long horn, and on playstation The Red Screen of Death





Old Mac


Saturday, July 25, 2009

Are Ghosts Dimensional?

In his post Lets talk Dimensions Elie Nasr pinpointed a really interesting concept of what dimensions really are.




Objects living in 2D don't know about the 3D
I stumbled upon a great video that explains the world in 2D and how impossible the objects living in it find a 3rd dimension. To 2D world they only know left, right, up and down. There is no above or beneath, its physically impossible as Elie stated.

We live in 3D we don't know about objects living beyond that
3 Dimensional world is what we know, we don't know and we find it difficult to feel anything that is not in 3D. Just like 2D, just because we can't feel anything non-3D doesn't mean there are not other objects living in other dimensions.

The Time Dimension (4D)
We all know the Time as the Fourth dimension we can't imagine it yet we live in it. We see how a a 3D object changes with Time, I'm a 3D object, I get old? I get tall my 3 Dimensions are a function of time. Without Time I will stay still.

However, the Time itself can be applied to a 2D object or to a 1D object too, correct? So Time is a fixed dimension.

Who lives in the 5D then?
So the real question is, are there any living creatures who can see us but we can't? Do they live in another dimension that we can't really see yet we live it?

Ghosts Do Enter our 3D Sometimes
If you watched the video I linked earlier in this post, you will see how Dr Quantum entered messed with the circle in the 2D. Ghosts do the same. Some ghosts play around with us and enter our dimension to mess with us. Some for curiosity, some for good, some for evil.

So many questions, I'll just leave you to think about it freely.

Welcome to the Quantum world.

Wednesday, July 22, 2009

Google Maps VS Bing Maps

Microsoft rebranded its Virtual Earth now into Bing Maps, I thought I Would like to list a quick comparison between the two.


Click here to go to Google Maps

Click here to go to Bing Maps

Here is a mashup of Google Maps and Bing Maps

Here is a mashup of Google Maps + Google Earth + Bing Bing + Yahoo Maps

1. Data
The data is way more updated in Google Maps then in Bing, But its just a matter of time until bing update its data.

2. Developers
I suffered while I want to develop a small example in Bing Maps, didn't easily found a "Hello, World" Bing Maps. Google Maps are much easier to develop through Ajax API.

However I found it so easy to develop an ASP.NET application with Bing Maps, its greatly documented here for those interested.

3. Documentation
Google Maps are rich in its documentation with all its examples and Ajax-PlayGround. Call me stupid but I just get confused with Microsoft way in documentation Here is Bing API. They write ALOT and I hardly see any example. I would love some live examples. More examples, more code, less talk please.

4. Browser Support
Google Maps support 3D images without any plug-in, Bing Maps need to install a 3D plug-in. Sadly that plug-in is not avaiable for my Mac - Firefox yet.

5. GeoProcessing
I liked this one, you can do geoProcessing and return Imagery data from Bing, I don't know if Google Maps supports that, please correct me if I'm wrong.

6. Accuracy
Big claps for Bing in this, I searched for Bahrain in Google Maps, it pointed me somewhere in the sea, however, when I searched in Bing Maps, it directly hit the center of the Island (Y), same goes for Sakigahara the Village in Japan.


More Details

Here is a quick "Hello World" for Bing Maps

Here is a quick "Hello World" for Google Maps

More Google Maps Bing Maps Comparison

Also, our friend Andrew have done a quick comparison between most of the maps applications, you can find the pdf here.


 . . .

ArcGIS Twitter Extension

This may sound weird and you are like, "whats the use of this anyway?

If you don't want to setup any Database system and you just want a quick login to your ArcGIS and you want the user to feel confidant without specifying any password, you can simply Authenticate her with her Own Twitter Account!

I built this Extension with VB.NET for ESRI ArcGIS. When you start the GIS it simply start a Login Form and ask you to login to Twitter using oAuth (no password there)

When you login, I return a class filled with the most important information about the Twitter User, Name,ScreenName,Location and picture where you can easily use to customize.

I've also placed a sample button to tweet. You can easily build your own client based on this, like when someone Edited a feature you can use his Twitter Account to log on his name details.

I just know that someone will make use of this one day, so I thought I just develop it.

Download the script here.

Enjoy

Friday, July 17, 2009

New Technologies we should know about?

Everyday we hear of a new technology or a new programming style or a new invented device or a new application or a new hardware.

It would be fun if you share your list of what new technologies that are currently blossoming in your opinion. Heard it in the news? stumbled upon? read it in a blog. Just list it and let us know about it.

Just share with us anything related to Technology.
I'll start

Silverlight
Web application that look like desktop, so easy to use.

Visual cryptography
Encryption in such a way that decryption can be done by human vision, no computers needed.

MMOG
Massively multiplayer online game, can support hundreds of players online.

The Mother of All Bombs
A bomb developed by the USA is said to be able to destroy an area as large as nine city blocks.

You add to this list

Let us know more guys! Life isn't getting any shorter. If you know something share it please, we would love to know.

Wednesday, July 15, 2009

Arc2Google

This is a dedication to my smart GIS readers, I decided to do something simple and easy to setup, and intuitive to use and make your life much easier for free.

Arc2Google Official Page


I called it Arc2Google. This tool is not sponsored by or affiliated with Arc2Earth

This tool combines ArcMap with Google Maps And Google Earth.
When you activate the tool it open a dockable window inside ArcMap and show you the current Extent on the Map in Google Maps or Earth, it get refreshed whenever you change the view in GIS too.


Watch a Video demonstration of the tool


Or Let the pictures speak.









Click Here to Download The Tool (9.x)


Click Here to Download The Tool (9.x/10)



See the previous tool Integrate ArcMap with Google Earth (VBA)

Please report any bugs found here or email it to me. Any suggestions too. I'll reply immediately

Enjoy

Monday, July 13, 2009

Design flaw in PS2 keyboards allow hackers to retrieve all your key strokes

Scary isn't it, Exactly, this is the main source of this news.

I'm going to summaries this briefly. If you use a PS/2 keyboard hackers can know all the characters you typed using that keyboard from your main socket plug. So they don't your password and they don't care what OS are you using.

The study briefs that the bad shielding of PS/2 wires, allows the information traveled to leak into the earth wire, eventually transfer it into the main PC plug. And it stays there. I don't know The technical part of it maybe Electric Engineers can help elaborate on this technically.

The guys who wrote this paper are Andrea Barisani (Chief Security Engineer) and Daniele Bianco (Hardware Hacker)

There website
http://www.inversepath.com

And here is their original paper


Thanks GOD these keyboards are dieing.

1/10 of your Twitter Followers will click your link according to Google Analytics

According to Google Analytics, approximately 1/10 of twitter followers will click a link that you tweet.

I have run a test on several on my blog pages that I tweet about, and noticed that. Not convinced by that since I don't have that much of followers, I started to analyze my pages with other twitter users.

I noticed the same rounded factor emerge from people retweeting my pages. Here are some of the statistics to totally unique pages


Twitter1: 6800 Followers -> 670 visits
Twitter2: 580 Followers -> 50 visits
Twitter3: 10,200 Followers -> 1011 visits
Twitter4: 220 Followers ->19 visits
Twitter5: 900 Followers -> 88 visits




So If you repeat your tweets, the other 9/10 of followers can get to see it and click it. Of course it depends on the way you tweet too.

Again that doesn't mean this is absolutely true, maybe you guys will come up with different results.

Saturday, July 11, 2009

Microsoft VS Google: Is this going to be the end for one of them?

I've really enjoyed John Naughton post Now Google parks its tanks right outside Microsoft's gates. Lets trigger our time machine for a second.

Google started with Search, strengthen its defenses very will in that area, swiftly moving to other fields while maintaining its core business.

Microsoft was watching this swift move all the way and come up with its own great inventions too along the way. The Windows operation system is not wildly used for no reason. It's flexibility is highly commended. Here is a post I wrote about Windows Flexibility.

Microsoft was very careful to watch every step Google makes. Google stayed away from Microsoft main business for almost 10 years. Until now.

The Battle
Google armors it's tanks to Microsoft OS by releasing Its own Chrome OS. It came in the right time, with the Powerful Windows 7. The IT world will witness a great battle.

Define: Winning?
If Google wins, Microsoft will be highly affected. No body knows what will happen. But I'm sure there will be a huge inertia released from Microsoft 25 Years of Experience. That will remain for few more years.

If Microsoft wins, Google will witness its first failure that will potentially wound and harm the Google Brand. Google doesn't have that Microsoft Inertia.

I even don't know what 'winning' is in this case. Still there will be fans for Google, Microsoft, Linux and Mac.

What are your most significant work achievements and Crazy Ideas?

You may have great ideas, you really do. But there are these walls of fear that prevent you from disclose them. The fear of being wrong.

If you have that fear. Perhaps your answer to that question might be 1, 2 or none.

If you are willing to be wrong, and you love to fail, just like me. Then you would discuss your crazy ideas. Then increase your chances in work achievements.

Break these fear walls with the hammer of joy and the desire to learn.

Here is my list of achievements

1. This blog
I've been writing IT and Business stories for 5 months

2. Over 15 GIS Applications
In my Company I've designed and developed over 20 GIS applications with Object Oriented Design. That made me Effective in Resolving Business problems using Object Oriented Design Patterns.
That made me aware when to utilize GIS to solve business problems

3. EarthTwit
Mashup of Google Earth and Twitter

4. MapTwit
Mashup of Google Maps and Twitter

5. TwitTube
Mashup of YouTube and Twitter

6. FileTwit
Desktop app to twit your files

7. TwitColr
A website that will generate random color schemes and allow you to twit them

8. geShout
A website on top of Google Earth that allow you to share locations and connect with friends


Here is a list of some of my crazy ideas

1- Ceed: An idea that will change the world

2- An Idea: The NewsTouchPaper

3- An Idea: Saving data in water

4- An Idea: Geographic File System (GeoFS)

5- An idea: The Human API

6- The golden spoon application

7- Saving feelings and retrieve them back




We would love to hear your ideas and achievements too guys.

Thursday, July 9, 2009

What is GIS?

Yes, you might find thousand of sites that explains the GIS, but most of them are way to technical to digest.

This blog post is for people who just want to grasp a quick idea about GIS so you can engage into conversations easily.

So I'm going to make it really simple, straight to the point and yes, concrete.




What is GIS?
Now GIS stands for Geographic Information System, but really I love to treat it more like lens

Lets take a bird-eye view at your town. You see buildings, streets, people walking. There are things you don't see like underground electricity cables, water networks. There are things you might not care about like Post offices or supermarkets or small buildings or trees.




What GIS does is separate all these elements into "Layers" that you can turn off and on so you can have a clear bird-eye view of what you "care" to see.

Questions that pop-up to your head now can be answered easily, like, how many buildings surrounds this lake? or What is the largest building in this area. Such questions involveing a combination of these layers together form the IS part of GIS. The Information System.


GIS Examples
A Geographic Information System that represent the Electric Network in Bahrain
A Geographic Information System that shows the Sewerage network in London
A Geographic Information System that shows the high signals in my Left Brain.
A Geographic Information System that shows Nuclear Plants in the World.

You may add to the list.

Answer Interesting Questions
You may also combine GIS systems together to answer questions like, how many High-Voltage Cables passes near the Nuclear Plants in UK?


GIS Applications

Here are some GIS Applications
ESRI ArcGIS
Google Earth

Wednesday, July 8, 2009

Google Chrome OS Fits my Geo-UI idea!

Finally, the guru releasing an Operating System. Google didn't wait all this time to release an OS unless it have really good things to offer.

Here is a small description of what Google Chrome is just to give you a quick idea. To read the full article click here.



1. Built over a Linux kernel
Google Chrome uses Linux as its base core kernel, so that explains the drivers and memory stuff.

2. It's actually a Browser
Yes, Google Chrome the OS is the Browser, its build as a web-based sort of OS.
So build applications that can run on the web, and it will run on Google OS.

3. Open Source
Great! Just perfect for my idea!
Now we can't stop asking Microsoft for their source.


These are the main features, it might have more. Developers will start their creativity here I come.

My proposed Geographic User Interface for Google Chrome OS
This is the best time to introduce my idea about the Geographic User Interface, basically my idea is to create a 3D sphere. This sphere is divided into sections, your files are arranged on the sphere. As you zoom older files started to appear. Same goes with the options.

You can read about my full GeoUI idea here.

Monday, July 6, 2009

How to use Twitter to Control Army of Machines




Give me a Centralized Command Center and a faithful army and I will conquer the world.

Twitter is a live stream of feeds that get updated online each millisecond. In fact you can treat it as a very strong Centralized Command Center.


Now, imagine this:
Conscript
The conscript is a small client program that can be installed quietly in a machine. This program reads a particular twitter feed. Continuously awaits orders.
Install set of conscripts on a network machines and make them ready.

Centralized Command Center
Twitter is the Centralized Command Center database. It sends particular commands that Conscripts can read and understand, the conscripts are then to execute the command in parallel.

Imagine how this can be fruitful. This architecture can be used for good or for bad.

You have a huge army of machines that can do you almost anything with a single twit, You may use them to do a various good stuff such as:

1. Compress a large file
Large files cannot be compressed easily, with a twit you can ask an army of machines to compress a file, each conscript take a piece and do the job.

2. Encrypt a set of files in parallel
Encryption takes time, especially if you want strong one, you may order an army with a twit (even if you are away) to encrypt a set of files in parallel, repeatedly.

3. Decipher an encrypted file
You may have an encrypted file that you want to decrypt, with a twit you can order an army to try various unique decryption algorithms on this file in parallel.

4. Handle Fail-over operations
In case one of your servers fail down you can order an army with a twit to take over that servers processes.

5. Do Load-Balancing for your servers.
You may have an army of 100 machines, with a twit you may pull the load from your busy servers to those 100 machines while you do some maintenance on your servers.

6. Run a complex query in parallel
Complex SQL queries can take quite large of time, how about if you can dissemble this query into multiple query and ask your army to execute it with a twit.

Sunday, July 5, 2009

How to remove computer viruses with no AntiVirus

There is no by-the-book method to do that. I will suggest the approaches I'm using to remove the viruses. It works 95% of the time.

Usually, Viruses install themselves in the startup, so they can rerun every time Windows start.

The key thing is to remove them is to disable them from running when Windows start.

Here are some quick and dirty methods I use.

DISCLAIMER: DON'T DO THESE STEPS UNLESS YOU KNOW WHAT YOU ARE DOING

1. System Restore
I always try this step first, restore the machine to an earlier time. But most of the time this doesn't work because viruses turn it off.
Go to Run
paste this
%SystemRoot%\system32\restore\rstrui.exe


2. MsConfig
Go to Run, and type msconfig
Go to StartUp and click Disable All
Restart the machine.
This will normally disable all the programs running in the start, so the virus.

3. Rename suspicious files
After step 1, go to task manager, if you still see some weird processes (this lists might help) Find the file and rename it, then restart the machine. This method can even kill the chain processes. (Processes running each other).

CTRL+ALT+DEL to run task manager->Processes

4. Turn off System Restore and Turn it back on.
Viruses aren't getting any dumper, they use System restore as reproduction environment. By turning System Restore off, you actually delete the entire restore points and possible reproduction of viruses.
Right click my Computer->Properties->System Restore
Check the Turn off System Restore, then check it out again.


Here are some good sites I found on

How To Remove Virus Without Using Antivirus Program

Programming: 7 Advices to a Cleaner User-Friendly Form

We (Developers) are left brained, we love to add buttons, toolbars, more textboxes, checkboxes, menus.. We just love it! because it shows how much we put effort in our work.

That unfortunately confuses users, and made them quit using our applications.

I wrote an article titled what happens when musicians and artists started to write code? It explains how much simpler user friendly design we can really get if we think KISS. (Keep it Simple Stupid)

Here by I compile a list of things to keep in mind so we can increase the simplicity of the form for people to actually use it.


1. Get rid of Apply, Close, Ignore, Retry buttons.
You really don't need these buttons, if you have an option form and you need to apply the changes, think of it this way, as user change the options, save directly. He wouldn't change the option unless he wanted to save. As for the close button user can always use the X button.

This will simplify the design.

2. Don't place options in the main form
Consolidate all the options in one form and the user can click a button that displays that form if needed. This will make the main form very simple and neat.

3. If an action can be done with one click, do it.
Developers love to drag the user to click more than once, try to avoid that if you can. Let a process completes with one click instead of 10 clicks. This is difficult but give it some time to think.

4. Use more defaults
Defaults are great, instead of placing options for the user, place carefully selected default values. So the user can click on button without specifying any confusing options. For geeks who wants more customized view, you can allow them to change the options in another form.

5. Show what matters
Display only the important objects and leave the less important things away for the time being. Leave only controls which the user CANNOT live without. Hide the geeky menus and commands and toolbars when the current action doesn't need it

6. Don't use Wizard
If you don't need a wizard don't use one. If the user will simply click next and next and next, don't bother him. Place one button in an empty form and when the user click it, use default values to finish the process.

7. Use simple images
If you must use an image in your form, use simple images with one or two objects inside it to avoid the confusion.

Saturday, July 4, 2009

6 ways to use twitter as a leading tool

A leader is a person who have an decent idea or a message or a vision and people who care about this thought follow him.

Twitter is an effective tool for leaders, only if used properly.

I have compiled a list of 6 advices to use twitter as a leading tool.




1. Avoid Twitter Spam
its becoming a trend for some website to increase the followers by sending automated twits. People hate this.


2. Talk to your Followers or Retweet them.
From time to time go through your followers list and retweet what you liked of their twits. You can also ask questions to a particular active follower, this will destroy any possible barriers between you and your followers and increases the trust.


3. Your twits should reconcile into one message
If you are leading a tribe of classic music, 90% of your twits should benefit your musical followers. Because the more you twit about classic music, your followers will retweet it. Interested followers of followers will retweeted. You will get even more followers


4. Don't ignore @s or Direct messages
You have to create a connection between you and your followers, no matter how many followers you have, do not ignore @Replies or DMs try to reply them all.


5. Don't leave your twitter idle for more than 2 days
Leaving the twitter idle tortures the enthusiasm of your followers and eventually kills it.


6. Avoid TwitsChats
You must have friends in twitter that may ask you some personal questions, replying back with a laugh or some unknown code will storm your followers with something they really might not be interested about. You can follow back your followers so they can send you Direct messages, or use another account just for replies just like GuyKawasaki does.


Always remember, your followers trust you, that's why they followed you. So don't break this trust. Mind each tweet.

The Alphabets of Design Patterns

You might have heard of Object Oriented Design Patterns or you may have not. That's fine in both cases, I'm going to explain it in a very brief way, when to use it, and the most important question should you use it?

Design Patterns
Once upon a time there were some guys who loved programming. Designing applications for so many years. As they design their class diagrams they've noticed some repetitive pattern emerging.

Those Patterns makes the life of designing and the code maintenance much more easier.

They compiled the list of repetitive patterns into a list they called Design Pattern. They give each pattern a name.

Didn't get it?
Think of it this way. You write a program and use a function that will send an email. You write an other program that have the same functionality of sending an email so you re-use the same function you use. That's it.

OK. Do I have to memorize those Patterns?
Absolutely NOT. You just read these patterns once, it got installed in your brain that's it. As you design your application you will automatically reterive them without knowing.

The book I recommend for the patterns is Head First Design Pattern and of course the Gang of Four (GoF) who compiled the patterns.

When to use the Patterns anyway?
There is no by-the-book formula on when to use the Design Patterns, once you read the patterns and see their structure BANG!, they get burn in your memory. As you design your next application you will be automatically pointed out to the right pattern (if needed). It happened with me so many times.

So don't get upset if there is a pattern there that you didn't use. And DON'T Ever try to force a pattern in your application because that will be a tragedy. Let your application just flow. Learn the basic concept of design. The head first book explains those nice neat concepts too.

Whatever! Should I use'em?
Nope! Maybe your application is so simple that you don't even need to use a pattern. You just need to prune your design and apply the 5 golden steps I suggest before writing code.

My Favorite Pattern?

Strategy Design Pattern, I just love this, 90% of my applications directly fit to this design.
This pattern is really great. I'm gonna use the example I read in the Head first book.

Classes
Warrior
Weapon as IWeapon
Attack

Hammer Implements IWeapon
Sword Implements IWeopen
Knife Implements IWeopen
Hand Implements IWeopen

So the fun part is that I can be a Warrior and I don't care what weapon I'm using, I can change them in runtime, as long as the weapon Implements IWeopen you can do whatever you want write your own fancy weapon that implements IWeopen and directly apply it to the Warrior class.

5 things to keep in mind before start coding

Most of the time, programmers start coding quickly because we think we understand what is to be done. From my 10 years experience in development I've discovered that this leads to a complete mess and hard maintenance.

Here I compile a list of 5 things to do before writing a single line of code.


1. Don't write an application without a soul.
Yes, the soul of any application is the actual purpose out of it. If you start coding the requirement without fully understand the use of the application, users will not use the application.

2. Don't open the Code Editor until its time
Just opening the code editor switches you brain to the left side, i.e. you will dive into the ugly if statements and the How-Tos of coding. I'll explain. How to I join two tables from different connections? How to populate a list grid from a database without looping? .etc.
Users don't care how you join tables and write your SQL.

3. List the engine players in the applications
After understanding the requirements, draw boxes of the entities you might think of in a paper. These players will form the engine (think of the engine is the hidden cogs of the application).

4. Run the application engine in your head
Just imagine the application is written on this paper, now try to execute it. No form design. Just run the engine. Draw arrows and attribute as you need them.

P.S. Remember you can't run the application properly if you keep thinking about your If statements, Loops, SQL. So clear it, clear it now.

5. Add/Remove attributes and methods as fit
As you virtually run the engine in your head you will find new attributes to be added to the classes. You may realize that you even need to remove some unneeded methods.


Until you feel comfortable with your paper (the Class Diagram), start the editor and enjoy coding.

Wednesday, July 1, 2009

How to avoid the fear of being wrong

Avoiding fear is something that you can do, it's there, deep inside you, but its just the fear layers that stacked up inside you preventing you from taking risks and trying new things.

If you don't have this will to be wrong, you will not end up with something creative.

As for How to avoid fear, I will tell you a little story by Sir Ken Robinson, you can do the Math and conclude what to do.

The Little Girl Story
There was a school girl who don't pay attention to classes. One day in the drawing class, the teacher noticed that she is really focusing on her drawings The teacher approached her and asked her.

Teacher: "What are you drawing?"
Girl: "I'm drawing a picture of GOD"
Teacher, amazed: "Okay, but, no one knows what GOD looks like."
Girl: "They will in a minute."

The girl didn't put any restrictions, its in her nature, she just want to try everything. I previously wrote an article about thinking like kids. Here it is if you are interested more in this subject.

Passing a function as a parameter to another function

You may have wanted to do this. Its actually very important and useful.

We use to pass variables to functions, but passing functions to functions is really a purely object oriented mechanism and really saves you a lot of work.

I'm going to write this example in VB.NET

The Example
Lets say you have a function that somehow loops through all your devices in your house.

You want to create a function that turns off all devices.
Another function that turns on all devices
Perhaps a function that will maintain your devices.

If you want to do that, you'll properly end up duplicating the loop code in all the three functions.


So here is the solution.

Lets first create our mother function, the one which loops through the devices.

Public Sub LoopThroughDevices()
Dim pDevice As IDevice
For Each pDevice In Home.Devices
'---Do Something
Next
End Sub


Now we will create the 3 function, a function that turn a device off, on and maintain

Public Sub Deviceoff(ByVal pDevice As IDevice)
pDevice.off()
End Sub

Public Sub DeviceOn(ByVal pDevice As IDevice)
pDevice.on()
End Sub

Public Sub MaintainDevice(ByVal pDevice As IDevice)
pDevice.Maintain()
End Sub


If we can now pass each function to our LoopThroughDevices function the problem is solved.

We can do this by declaring a Delegate that have the same signature as our 3 functions

Private Delegate Sub DoActiononDevice(ByVal pDevice As IDevice)


Then we will modify our LoopThroughDevices function

'Notice I declared a variable of type DoActiononDevice which is technically a function
Public Sub LoopThroughDevices(ActionFunction as DoActiononDevice)
Dim pDevice As IDevice
For Each pDevice In Home.Devices
'---Call the function
ActionFunction (pDevice)
Next
End Sub



We're done, we just need to call the functions

'To Turn all devices off
LoopThroughDevices (AddressOf Deviceoff)


'To Turn all devices on
LoopThroughDevices (AddressOf Deviceon)


'To Maintain all devices
LoopThroughDevices (AddressOf MaintainDevice)


We used the AddressOf keyword to send-in the function as a variable, it will get a pointer of the address of the function for the LoopThroughDevices to execute it.

Enjoy.


Digital Seeds




I enjoyed Elie's new post, it made me think that objects is constructed from basic elements. If you looked at a complicated problem with this transparent type of lens, you could see a crystal-clear view of simplicity. Its like a Zen way of looking at things.

Any music is a set of signals.
Any liquid is a set of basic elements.
Any book is a set of letters.
Any file is a set of bytes.

We can refer to the signals, elements, letters and bytes as Seeds. You combine the Seeds in a non-random way to produce a unique result.


Fourier Series
I would love to bring one of the greatest success in history in this matter.

The French mathematician Joseph Fourier discovered that a periodic signal can be broken to set of SIN waves. He looked at the basic SIN wave and tried to recreate the periodic signal. Now if you look at a peridoic signal if it is repeated overtime, that signal can be decomposed back into a formula after a set of analysis. This is what is called Fourier series.


Question
Can we have our own digital Fourier series? Here where we should back to my proposed Ceed idea. For those who are new to Ceed is, its an idea I proposed to replace the current compression algorithms with a new modern digital analysis of any file. The idea vision is to compress a 1GB file into a 20KB of size. Crazy, I know.

Now lets look at the digital era, any file is a set of bytes, bytes can be placed in a non-random (and I insist to call it non-random) to create a certain executable or document or even music file.

Answer
- Convert each file into a graph.
- Study the graph and try to find pattern.
- Try to define a series of these bytes.
- Disassemble the series into a formula.
- Use the formula to recreate the file back.

Sound simple, but its not, I just want to treat the idea as simple so it could remain simple.