Hope everyone is doing good. Sorry guys but I do keep getting a couple of Anonymous comments which keep on going into the spam folder of my comments in the dashboard so as off now only "Registered Users" can comment. I am a bit unsure about exactly who registered users are but according to the information in the setting section its only people with an OpenID which according to me should be anyone with an email address but I ain't entirely sure.
Thanks and hope you still keep reading this blog.
Monday, 28 November 2011
Sunday, 27 November 2011
Environment Variables... So Thats How Its Gonna Be
OK. So I tired a couple of things that I thought might work and came across this way that I thought might actually work. You see anyone who has used Linux knows that there is such a thing as an ALIAS command. An Alias in computing is more or less the same as in normal language but if your interested this is what it means in English. So any way the theory behind it is that you take a huge command such as in my case.
And assign a smaller easier to remember command to it like just calling
As it is I used to use ALIASes all the time when I just started off using Linux cause I couldn't remember ls and instead just kept of typing dir. Anyway I figured why not try and implement that on Windows so a quick Google search later I found this http://www.unix.com/windows-dos-issues-discussions/74664-what-dos-equivalent-alias-command.html.
So I quickly fired up the command prompt and tired the one with the "doskey" command cause frankly I don't have to patience or time to figure out how the registry editor in Windows works. I have used it a couple of times before and I would just stick to what I was told in the tutorials. So anyway this is what I type in on the command prompt.
Now this is what I undertand by this I have assigned the string "adb" the value of a program with the absolute path (which I aint repeating) after which one more argument that should be supplied to the program I just called. So after setting this up I try the "adb" command on its own which should produce the help screen for the command explaining all the various commands that should be followed. I cross my fingers and press the enter key and thats it, it worked... I can honestly say that at this point in time I slap myself on my forehead with excitement. I spent almost 2 days trying all sorts of clever ways to link up the commands to the command prompt and this worked!!!
OK now time to get some work done...
OK so if you got here you probably knew there was something wrong. Yeah so when I typed in "adb devices" which is to check which devices are connected to the computer in debug mode I still get the help screen. So, I think to myself huh maybe I have forgotten the command and it should be "adb device" but no its not that either so I try one that I am 100% sure works cause it is the one that visible on the help screen "adb version" and guess what, that don't work either. So after reasonable amount of testing I figured out that although the alias has worked but it doesn't seem to be sending any arguments to "adb" therefore, my search carries on :(. Sorry guys still now solution but if you guys have any suggestions please do share :).
--UPDATE--
Holly crap sorry guys I was being dump but after having a look at the help file for "DOSKEY" again I figured that it needs $1 instead of %1 so the command
works fine. Yes after enough testing it can be concluded that I have found my solution :D... Now time to make aliases for some other commands
--/UPDATE
> "C:\Program Files (x86)\Android\android-sdk\platform-tools\adb"
And assign a smaller easier to remember command to it like just calling
> adb
As it is I used to use ALIASes all the time when I just started off using Linux cause I couldn't remember ls and instead just kept of typing dir. Anyway I figured why not try and implement that on Windows so a quick Google search later I found this http://www.unix.com/windows-dos-issues-discussions/74664-what-dos-equivalent-alias-command.html.
So I quickly fired up the command prompt and tired the one with the "doskey" command cause frankly I don't have to patience or time to figure out how the registry editor in Windows works. I have used it a couple of times before and I would just stick to what I was told in the tutorials. So anyway this is what I type in on the command prompt.
> doskey adb="C:\Program Files (x86)\Android\android-sdk\platform-tools\adb" %1
Now this is what I undertand by this I have assigned the string "adb" the value of a program with the absolute path (which I aint repeating) after which one more argument that should be supplied to the program I just called. So after setting this up I try the "adb" command on its own which should produce the help screen for the command explaining all the various commands that should be followed. I cross my fingers and press the enter key and thats it, it worked... I can honestly say that at this point in time I slap myself on my forehead with excitement. I spent almost 2 days trying all sorts of clever ways to link up the commands to the command prompt and this worked!!!
OK now time to get some work done...
OK so if you got here you probably knew there was something wrong. Yeah so when I typed in "adb devices" which is to check which devices are connected to the computer in debug mode I still get the help screen. So, I think to myself huh maybe I have forgotten the command and it should be "adb device" but no its not that either so I try one that I am 100% sure works cause it is the one that visible on the help screen "adb version" and guess what, that don't work either. So after reasonable amount of testing I figured out that although the alias has worked but it doesn't seem to be sending any arguments to "adb" therefore, my search carries on :(. Sorry guys still now solution but if you guys have any suggestions please do share :).
--UPDATE--
Holly crap sorry guys I was being dump but after having a look at the help file for "DOSKEY" again I figured that it needs $1 instead of %1 so the command
> doskey adb="C:\Program Files (x86)\Android\android-sdk\platform-tools\adb" $1
works fine. Yes after enough testing it can be concluded that I have found my solution :D... Now time to make aliases for some other commands
--/UPDATE
Friday, 25 November 2011
Environmental Variables... We meet again!!!
So for those of you who don't know what Environmental Variables are here is a quick and dirty explaination. When you open the command prompt/terminal in your Windows, Mac, Unix or Linux computer and type a command the operating system looks for that command in a bunch of folders/directories in your file system. These bunch of folders is called the "Path" variable which is basically just a string that gives the absolute path to the folder that contains different commands. So on the Windows side of things some of the places that the system looks into include.
If you are interest in finding out your path variable in the command prompt/terminal type this for Windows users:
echo %PATH% (Windows will accept everything in small letters)
On the Linux/Unix/Mac side of things type in:
echo $PATH (Depending on the shell and the Linux variant you are running it may accept things in small letters but to be safe use caps).
Now since I have been using Ubuntu 11.10 for about a month or so exclusively I have become used to how you can add software packages and commands to the list of commands that are built into Linux. This process can probably also be called softlinking applications. This therefore, allows me to stay in the terminal and when I want I can open the program that I want with a simple command. If you are interested in seeing how to soft link applications in Linux please refer to this article not written by me.
On the Windows side of things it is a bit different instead of creating a link to the application you want to be available in the command line you simply add the path to the folder to the Environmental variable by following the following simple steps.
The goal for this exercise is to have the adb tool available to me in the command line so I don't have to be in the Android-SDK folder and in the Platform-Tools folder to be able to access it. For those who don't know adb is a command line utility that is part of the Android SDK for developing applications and connecting to your device through the terminal and accessing things that even Eclipse with ADT installed will not let you.
Attempt 1
So, since I am so used to the Linux way of doing things I thought making a shortcut of the executable file and placing that in the C:\Windows directory would do the trick. So after I made a shortcut to the adb executable and placed it in the Windows folder and tired to run in the command line this was the result.
OK so maybe I should have renamed the shortcut so the name is just "adb.exe". So I did the renaming and still same result :(. Needless to say I was just a bit annoyed at this point in time. Although guess what, even though I have extensions turned on and I had explicitly named the file how I wanted it to be named when I did a "dir" command guess what I notice.
Yup... Windows will add the lnk extension even though I had renamed it. OK no problem so the lnk extension is still there I decided to rename the file in the command prompt itself so that it doesn't have the lnk extension.
So I have reached a deadend. I know that the program can be executed on the command prompt but thats only if I am in the folder that contains the file or if the path variable has been set.
So I leave you guys at a bit of a sad ending. I am continuing my pursuit or finding a way to solve this problem. Unfortunately making a symbollic link to the application doesn't solve the problem either. If anyone has any ideas please let me know as well.
C:\Windows;
C:\Windows\system32;
And loads of other places. In the Linux/Unix/Mac side of things one of the directories include.
\usr\bin;
\usr\local\bin;
And loads some other places that usually depends on your flavor of the operating system.If you are interest in finding out your path variable in the command prompt/terminal type this for Windows users:
echo %PATH% (Windows will accept everything in small letters)
On the Linux/Unix/Mac side of things type in:
echo $PATH (Depending on the shell and the Linux variant you are running it may accept things in small letters but to be safe use caps).
Now since I have been using Ubuntu 11.10 for about a month or so exclusively I have become used to how you can add software packages and commands to the list of commands that are built into Linux. This process can probably also be called softlinking applications. This therefore, allows me to stay in the terminal and when I want I can open the program that I want with a simple command. If you are interested in seeing how to soft link applications in Linux please refer to this article not written by me.
On the Windows side of things it is a bit different instead of creating a link to the application you want to be available in the command line you simply add the path to the folder to the Environmental variable by following the following simple steps.
- Right-click on the "My Computer" icon on the desktop or press Windows + Pause/Break (another shortcut that I need to add to the previous post).
- Click on "Advanced system settings".
- Then click on "Environment Variables...".
- Look for a variable called "PATH" and double-click it or select it and click on "Edit".
- In the "Variable value:" textbox at the end of the string that already exists add a semi-colon if its not already there and paste the path to the folder that your interested in. Note the path has to be the absolute path.
The goal for this exercise is to have the adb tool available to me in the command line so I don't have to be in the Android-SDK folder and in the Platform-Tools folder to be able to access it. For those who don't know adb is a command line utility that is part of the Android SDK for developing applications and connecting to your device through the terminal and accessing things that even Eclipse with ADT installed will not let you.
Attempt 1
So, since I am so used to the Linux way of doing things I thought making a shortcut of the executable file and placing that in the C:\Windows directory would do the trick. So after I made a shortcut to the adb executable and placed it in the Windows folder and tired to run in the command line this was the result.
OK so maybe I should have renamed the shortcut so the name is just "adb.exe". So I did the renaming and still same result :(. Needless to say I was just a bit annoyed at this point in time. Although guess what, even though I have extensions turned on and I had explicitly named the file how I wanted it to be named when I did a "dir" command guess what I notice.
Yup... Windows will add the lnk extension even though I had renamed it. OK no problem so the lnk extension is still there I decided to rename the file in the command prompt itself so that it doesn't have the lnk extension.
So I have reached a deadend. I know that the program can be executed on the command prompt but thats only if I am in the folder that contains the file or if the path variable has been set.
So I leave you guys at a bit of a sad ending. I am continuing my pursuit or finding a way to solve this problem. Unfortunately making a symbollic link to the application doesn't solve the problem either. If anyone has any ideas please let me know as well.
Monday, 31 October 2011
Windows Shortcuts
I
have been using Windows for a considerably long time and although I
don't consider myself an expert in Windows support I think I can help
people out when they are stuck in something relatively easy. This is not
a guide on troubleshooting Windows but I am hoping to make it an
evolving list of commands and keyboard shortcuts that most Windows users
and all power-users should know.
Please do feel free to leave a comment and add any of your favourite commands/tips/tricks. I must point out that I am using Windows 7 on this machine but I hope to point out which commands will work on older versions of Windows.
A couple of things to note at this point before we start. When I say the "Windows key" I mean
key. And when I say "Run" I usually mean pressing the Windows key + R
or go to the start button and on Windows 7 and Vista just type in the
command in the search bar and hit "Enter" or in older Windows Click on
"Start" and look for "run".
When I say Windows (capital W) I mean the operating system while when I say window (lowercase w) I mean an application that is open or just anything that is open in general.
Now with the formalities out of the way here are some of the most used commands by me.
General Purpose Commands
These are commands that can usually be done from within any program and window and sometimes that commands actually work on the window that is in focus.
--Update--
Since the time that I wrote this blog post I discovered one more shortcut. If you hold down the Windows key + the spacebar it will temporarily display your desktop. I personally dont have much use for it because I have absolutely no icon displaying on my desktop but there you go one more shortcut for you to show off with.
Hope this has been helpful and watchout for the followon of the shortcuts that are still to come and a bunch of useful Run commands that might actually let you do things slightly faster.
--/Update--
Please do feel free to leave a comment and add any of your favourite commands/tips/tricks. I must point out that I am using Windows 7 on this machine but I hope to point out which commands will work on older versions of Windows.
A couple of things to note at this point before we start. When I say the "Windows key" I mean
key. And when I say "Run" I usually mean pressing the Windows key + R
or go to the start button and on Windows 7 and Vista just type in the
command in the search bar and hit "Enter" or in older Windows Click on
"Start" and look for "run".When I say Windows (capital W) I mean the operating system while when I say window (lowercase w) I mean an application that is open or just anything that is open in general.
Now with the formalities out of the way here are some of the most used commands by me.
General Purpose Commands
These are commands that can usually be done from within any program and window and sometimes that commands actually work on the window that is in focus.
- Windows key + E: This porbably one of the most used shortcuts for me. It opens up a new Windows Explorer window. The location that the explorer is usually pointing towards is usually the "My Computer" one.
- Windows key + Num: This command is probably one that
sold Windows 7 to me. The idea is that you pin applications to your
start bar and then hitting the Window key along with the position of the
application you want to be opened will open the application. In my case
I have the following configuration.
So in my case Windows key + 1 would open up Firefox, Windows key + 2 would open up Internet Explorer
and so on. The maximum number of application you can pin to the start
bar does depend on your personal perferance but Windows + 11 will not
work to open the 11th application on your start bar, am just saying. - Windows key + Directional Arrows: Another one of those features that sold Windows 7 to me. When a window is in focus you can make it take up half of the screen by using Windows + Left direction arrow to make it take up the left half of the screen and Windows + Right direction arrow to make it take up the right side of the screen. In addition Windows + Up direction arrow will make the current window maximised and Windows + Down direction arrow will either minimise your window or restore it to its original size.
- Windows key + R: Opens up the Run dialogue box. This one might not be very important for a normal user but I tend to use this quit a bit even though its just to open up the command prompt. Some of the commands you can type into the Run dialogue are given later on in this post.
- Windows key + D: Not used as much by myself but I see the usefulness. This will show and hide your desktop. If there are windows open and covering the desktop then this shortcut will show you the desktop and if you press it again it will get the windows back up hiding the desktop. A funny thing though this command does not work if you manually minimise all the windows yourself and want to bring them back up.
- Windows key + M: This will simply just minimise all the windows showing you the desktop.
- Windows key + U: Opens up the utilities window. In Windows 7 this is the settings for the screen reader, mangifier and some other usability stuff, but in Windows XP this would open up the Control Panel so I would use it as a fast way of getting into the Control Panel.
- Windows key + P: Another one of the shortcuts I can no longer live without. On any Windows 7 and I think Vista machine hitting this key combo will bring up a dialogue for selecting the output of the monitor.
- Windows key + F: This is probably one of the most well known commands. This key combo opens up the search window to look for a file or folder on the computer.
- Windows key + L: This will lock the computer.
- Windows key + N: Focuses on the notifications. Probably most useful when the annoying bubble pops up instead of clicking on it just press this combo and voila.
- Windows key + X: This is one very useful command available in both Windows 7 and Vista. It opens up the "Mobility Center" although it works on desktops as well. It will let you do many things like change brightness, volume and set your battery profile.
--Update--
Since the time that I wrote this blog post I discovered one more shortcut. If you hold down the Windows key + the spacebar it will temporarily display your desktop. I personally dont have much use for it because I have absolutely no icon displaying on my desktop but there you go one more shortcut for you to show off with.
Hope this has been helpful and watchout for the followon of the shortcuts that are still to come and a bunch of useful Run commands that might actually let you do things slightly faster.
--/Update--
Thursday, 27 October 2011
Saturday, 9 October 2010
Final Year Project III
And what would probably be the final installment of my final year project followup. This is an update to project idea. So I emailed Alexandar Bolotov late on Thursday 7th Oct 2010 at probably about 12:25am to confirm to him that I will be following his advice and be doing a game engine for Chess. So basically I requested Alexandar to be my supervisor for the project and to complete that process I had to get his signature on a form which had the last day of submission as 8th Oct 2010. He prompty replied back at about 7:30am (which is way better than some other lecturers) saying that he will not be in office on the 8th but he does agree in being my supervisor. At this point needless to say I did start freaking out because it was the last day for the form submission, my sister was coming back to London and I would finally get to spend some time with her and I had to sort out my final year fees...
Although since I was reading on my phone I scrolled slightly down to read the rest of the message after having freaked out that is. He went on to say that I should put his name down and leave his signature blank and he will sort it out with the campus office and stuff. I truely can not thank him enough for not giving me a hard time about the whole situation.
OK one down and two major things to do... So at about 9:00 am I got out of the house (trying to avoid rush hour :)) and got into London at about 10:10am and headed directly towards the university's international students' office. This was because I did my foundation year at this university which meant that I am entitled to getting a refund of my foundation year fees. This would therefore mean that instead of paying £10,000 for this year I would have to pay less than that (which made me a very happy bunny). On my way I ran into Peter and I do recommend that you guys check out his website by clicking on this link. Peter came with me to the international office and they told me to talk to the finance office. Cutting a long story short I am eligible and I am now a very happy bunny :P.
And finally the part of the day that I was actually looking forward to I headed to Victoria station to pick my sister up :) (btw this is her blog so check it out for a small break :)). She was in the UK for about 10 days for an education conference from work and was just getting back from Brighton. So the plan was that she would spend the rest of the day with me and we would watch movies the whole night and she would be leaving for Kenya the next day in the morning.
So basically spent some time with her and she knocked out while watching the movie... lol... she was pretty tired in her defence. And on Saturday I had to see her off :( so pretty sad about that... But enjoyed the time with her :D.
Although since I was reading on my phone I scrolled slightly down to read the rest of the message after having freaked out that is. He went on to say that I should put his name down and leave his signature blank and he will sort it out with the campus office and stuff. I truely can not thank him enough for not giving me a hard time about the whole situation.
OK one down and two major things to do... So at about 9:00 am I got out of the house (trying to avoid rush hour :)) and got into London at about 10:10am and headed directly towards the university's international students' office. This was because I did my foundation year at this university which meant that I am entitled to getting a refund of my foundation year fees. This would therefore mean that instead of paying £10,000 for this year I would have to pay less than that (which made me a very happy bunny). On my way I ran into Peter and I do recommend that you guys check out his website by clicking on this link. Peter came with me to the international office and they told me to talk to the finance office. Cutting a long story short I am eligible and I am now a very happy bunny :P.
And finally the part of the day that I was actually looking forward to I headed to Victoria station to pick my sister up :) (btw this is her blog so check it out for a small break :)). She was in the UK for about 10 days for an education conference from work and was just getting back from Brighton. So the plan was that she would spend the rest of the day with me and we would watch movies the whole night and she would be leaving for Kenya the next day in the morning.
So basically spent some time with her and she knocked out while watching the movie... lol... she was pretty tired in her defence. And on Saturday I had to see her off :( so pretty sad about that... But enjoyed the time with her :D.
Thursday, 7 October 2010
Final Year Project II
A followup from my last post :)... So I had a very nice 45 min long meeting with a tentative supervisor to discuss my project. The idea that I pitched to him was a Chess game that utilises Artificial Intelligence to play against a player. I had thought of this project as sort of a last resort if all else fails (pretty clever :p). This idea actually got the tutor pretty excited and he suggested a couple of things that I could look into if I do want to go on with this project.
I was initially not too keen in doing the chess project because I think it has been done so many times that it may not impress anyone, but my tutor (it would probably be better to give his name here :)...) Alexander Bolotov (guy not a girl) reassured me that the project is complex enough to impress most people. He also suggested on creating a game engine for chess rather than the complete game and make it modular enough to be reused by other people. To be honest, I have always been intrigued by AI and this project will definately feed my curiousity but I was really hoping to do something for the developers and specific to web development. Hopefully, I will find a way to start both projects in parallel and make the browser open source with limited functionality and publish it on source forge. I will definately keep my fingers crossed and hope this will not be one of my projects I never get down to.
At this point I may have been sorted for my project but funny enough I had scheduled another meeting for the project with Sean Tohill anoth tutor of mine. This idea actually came from him and he said that it has never been done before atleast at this university. The idea was benchmarking networks. Which would mean that I would setup a small network and use skype or some other similar VoIP software to communicate internally. Then I would keep on adding load to the network and seen how good/bad the voice quality would be and so on so forth.
This idea has me a bit excited as it deals with some sort of hacking the network and causing interference and stuff. But this has also added to the difficulty of me having to chose one project.
I am taking the whole of this day to research on what each project will involve and should hopefully make up my mind on which one I should chose. Please help me make my mind by commenting on which project you would do.
I was initially not too keen in doing the chess project because I think it has been done so many times that it may not impress anyone, but my tutor (it would probably be better to give his name here :)...) Alexander Bolotov (guy not a girl) reassured me that the project is complex enough to impress most people. He also suggested on creating a game engine for chess rather than the complete game and make it modular enough to be reused by other people. To be honest, I have always been intrigued by AI and this project will definately feed my curiousity but I was really hoping to do something for the developers and specific to web development. Hopefully, I will find a way to start both projects in parallel and make the browser open source with limited functionality and publish it on source forge. I will definately keep my fingers crossed and hope this will not be one of my projects I never get down to.
At this point I may have been sorted for my project but funny enough I had scheduled another meeting for the project with Sean Tohill anoth tutor of mine. This idea actually came from him and he said that it has never been done before atleast at this university. The idea was benchmarking networks. Which would mean that I would setup a small network and use skype or some other similar VoIP software to communicate internally. Then I would keep on adding load to the network and seen how good/bad the voice quality would be and so on so forth.
This idea has me a bit excited as it deals with some sort of hacking the network and causing interference and stuff. But this has also added to the difficulty of me having to chose one project.
I am taking the whole of this day to research on what each project will involve and should hopefully make up my mind on which one I should chose. Please help me make my mind by commenting on which project you would do.
Wednesday, 6 October 2010
Final Year Project
So, its the middle of the night, I have a cold and I absolutely cannot sleep. What do I do you ask? I take out my Android phone, fire up Blogger Droid and start typing this post :).
As always a post after a long time discussing future plans of my life. As those of you who know me I am in my final year of my undergraduate degree in Software Engineering and desperately looking for a project idea that could possibly blow peoples mind and also be simple enough for me to finish over the course of this year.
I have been thinking of doing a developer tool for programmers of any platform and possibly any language could use. This got me thinking of what I have been doing over summer, which has been loads of web development and design with creating cross-browser friendly CSS, which contrary to my belief is not easy. You have to first make a base stylesheet which is compatible with your favourite browser (in my case FireFox) and code for it, then you open your second browser and check the website there and so on so forth. At the end of the day you hope to come up with code that makes the website look more or less the same throughout all the browsers and screen sizes you could get your hands on (i actually recommend using different operating systems as well cause for some reason FireFox for ubuntu doesn't render the page the same way as FireFox for Windows, who knew). So anyway after hours and hours and possibly days of tweaking a testing your finally done with the website and are happy with the way it looks and feels everywhere. After this you give your client the good news and he/she decides to check in an obsolete browser like internet explorer 6 or something and calls you back with hopefully a screens of how the page is rendering.
Know I do know that IE6 should not be supported and a lot of my friends feel very strongly about that but sometimes you just don't have a choice.
So anyway before I go on another tangent, I just got an idea of making a web browser with interchangeable rendering engines, screen simulations, OS simulations and etc. This is however just an idea and I hope to have a word with one of my lecturers tomorrow. In the meantime please leave a comment on this post with any ideas, or just anything you would like to say of my half baked project proposal. I do hope to read your comments soon.
Good night.
As always a post after a long time discussing future plans of my life. As those of you who know me I am in my final year of my undergraduate degree in Software Engineering and desperately looking for a project idea that could possibly blow peoples mind and also be simple enough for me to finish over the course of this year.
I have been thinking of doing a developer tool for programmers of any platform and possibly any language could use. This got me thinking of what I have been doing over summer, which has been loads of web development and design with creating cross-browser friendly CSS, which contrary to my belief is not easy. You have to first make a base stylesheet which is compatible with your favourite browser (in my case FireFox) and code for it, then you open your second browser and check the website there and so on so forth. At the end of the day you hope to come up with code that makes the website look more or less the same throughout all the browsers and screen sizes you could get your hands on (i actually recommend using different operating systems as well cause for some reason FireFox for ubuntu doesn't render the page the same way as FireFox for Windows, who knew). So anyway after hours and hours and possibly days of tweaking a testing your finally done with the website and are happy with the way it looks and feels everywhere. After this you give your client the good news and he/she decides to check in an obsolete browser like internet explorer 6 or something and calls you back with hopefully a screens of how the page is rendering.
Know I do know that IE6 should not be supported and a lot of my friends feel very strongly about that but sometimes you just don't have a choice.
So anyway before I go on another tangent, I just got an idea of making a web browser with interchangeable rendering engines, screen simulations, OS simulations and etc. This is however just an idea and I hope to have a word with one of my lecturers tomorrow. In the meantime please leave a comment on this post with any ideas, or just anything you would like to say of my half baked project proposal. I do hope to read your comments soon.
Good night.
Published with Blogger-droid v1.6.2
Sunday, 26 September 2010
Saturday, 25 September 2010
Wednesday, 2 June 2010
First Screencast/Tutorial
Hi everyone, as some of you might know I released my first tutorial yesterday which marked the start of my screencasting/podcasting project that I planned to do over the summer.
YouTube link of screencast
The tutorial was about a feature in Microsoft Word that I think is the most underused. I am saying this because when I look at fellow students writting reports I often see them on the last minute sorting out the table of contents by hand which is weird cause Word allows you to totally automate the process and finish the table of contents in less than 4 clicks. Anyway I hope you enjoy it and please leave some feedback so I can try and incorporate it in the next screencast.
YouTube link of screencast
The tutorial was about a feature in Microsoft Word that I think is the most underused. I am saying this because when I look at fellow students writting reports I often see them on the last minute sorting out the table of contents by hand which is weird cause Word allows you to totally automate the process and finish the table of contents in less than 4 clicks. Anyway I hope you enjoy it and please leave some feedback so I can try and incorporate it in the next screencast.
Labels:
first tutorial,
ms word,
quick styles,
table of contents
Monday, 31 May 2010
Update 31-May-2010
Hey guys and girls :). Hope everyone is in high spirits. Its been really long since I last blogged and this was partly because of the huge amount of courseworks that I and the rest of my classmates had to hand and partly also because I have just been plain lazy (big character flaw). Anyway I had my last exam on the 24th of May 2010 (which frankly speaking was terrible) and so I decided to take a break from anything and everything computer and work related and chill out. Anyway alot has happened over the past couple of months that has got me really interested in doing several things some of which I hope to start as off tomorrow (1st June) God willing.
Heres the breakdown of what I hope to achive.
Anyway guys and girls hope you can join me in this weird sort of quest thingy that I have got going on. See you later ;).
Heres the breakdown of what I hope to achive.
- Update blog more frequently
- Start a series of video tutorials (hopefully technical based)
- Plan out my final year project and blog about it so I can get some input from you guys about it
- Learn programming from the ground up to have a very strong foundation in
- C++
- C
- Java
- JavaScript(including the frameworks such as AJAX and JQuery)
- PHP
- MySQL
- Develop apps for the Android platform and hopefully document that as well
- And probably the most important thing LEARN NEW THINGS!!!
Anyway guys and girls hope you can join me in this weird sort of quest thingy that I have got going on. See you later ;).
Labels:
31-05-2010,
Updates
Monday, 18 January 2010
XMLHttpRequest
Hi guys hope everything is going well. Its been a hacktic 2 weeks for me and I am really glad to finally be able to finish the AJAX tutorials that I started a couple of weeks ago as an endeavour to teach myself the concept. By the way if anyone wants to check out my coursework for the AJAX based dictionary click here and log in using your university id and password. For those who are not at the university sorry I don't have a domain where I could upload my scripts but I am looking into it.
Now getting back to business. At the beginning of your JavaScript you need to make a new XMLHttpRequest object which can be made by simply typing in
At this point let me add that the code written for the declaration will only work in Internet Explorer 7 and later and any non-Microsoft browser that exists. If you want to check for what browser your client is using to still run AJAX on it, it is recommended by almost everyone I know to check for the existance of the XMLHttpRequest object which will be a simple if-statement
So after you make the declaration and it is successfully executed you will have to tell the object which file you want to open on the server, how you want to access it and whether or not this process should go on in the background while the user continues to browse. To open a file called "openThis.txt" and get information from it the code will be as follows
At this point I would also like to add that the file being fetched can be an XML file a PHP script or a normal text file. I am not entirely sure what types of files the request object can open but for our purposes lets just say that these are the only types of files that can be opened.
After opening the file the next thing you would like to do with it would probably do something with it, like display the contents or something of that sort. However, we need an event to trigger the action and that event will be
Now the thing that I didn't include in the xmlHttp.onreadystatechange event was sending this action somewhere which would usually be a function that you would define later on in the script but for the sake of completing the code I will be sending to a function that does absolutely nothing :P.
Now typically in this function you which would first check if the readyState property is 4 which means that everything has been executed with no problem and than tell it to do something.
Ammm seeing that this has turned out to be a longer post than intended I will be continuing on how to display the file to the user in the next which should be the last step in AJAX. Remember if you have problems with your program let me know I just may be able to sort out the error that you get if not will try and give you some advice. Untill next time take care.
Now getting back to business. At the beginning of your JavaScript you need to make a new XMLHttpRequest object which can be made by simply typing in
var xmlHttp = new XMLHttpRequest(); please note that JavaScript IS case sensitive so if you make a mistake in the declaration it will not work. Now abit about what this code does. The line of code is placed outside any JavaScript function so that it is available globally to all the functions that will be written later on and any changes that have been made to it in one function will affect the next time it is being used. This way of coding is somewhat lazy but works as good as any other method. A sort of better way of achieving the same outcome would be to declare the request object in the first function that you want to make the request from and send it as a param to any other function that will be using it.At this point let me add that the code written for the declaration will only work in Internet Explorer 7 and later and any non-Microsoft browser that exists. If you want to check for what browser your client is using to still run AJAX on it, it is recommended by almost everyone I know to check for the existance of the XMLHttpRequest object which will be a simple if-statement
if(XMLHttpRequest) than create a new instance of the object by executing the declaration above. Otherwise declare the request object as follows xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");. At this point I would also like to say that the variable in which I declare the request object I call it xmlHttp but please feel free to use any name that makes sence to you because you will be the one writing the code but please make sure that if anyone else was to read your code it should be readable and understandable by everyone.So after you make the declaration and it is successfully executed you will have to tell the object which file you want to open on the server, how you want to access it and whether or not this process should go on in the background while the user continues to browse. To open a file called "openThis.txt" and get information from it the code will be as follows
xmlHttp.open("get", "openThis.txt", true). What this is doing is pretty much self explaintory it uses the "get" method to get information from the file "openThis.txt" in a true asychronise manner. At this point I would just like to remind you that for HTML forms there are usually two methods of dealing with them, the POST method and the GET method. Where the POST method sends data somewhere and the GET method gets data from somewhere.At this point I would also like to add that the file being fetched can be an XML file a PHP script or a normal text file. I am not entirely sure what types of files the request object can open but for our purposes lets just say that these are the only types of files that can be opened.
After opening the file the next thing you would like to do with it would probably do something with it, like display the contents or something of that sort. However, we need an event to trigger the action and that event will be
xmlHttp.onreadstatechange;. Now since you will be communicating with the server there are some steps and states you have to go through before you can actually get stuff off the server and onto the client machine. The state in which the connection is in. The way you find out about this is using the readyState property of the request object. The readyState property may have 1 of 5 values that are listed below:| Value | Meaning |
|---|---|
| 0 | Unintialised or connection established but nothing is being done |
| 1 | Initialised or connection established and something has started to be done |
| 2 | Request has been sent |
| 3 | Interactive or the request is in the process of execution |
| 4 | Ready or request has been executed and the server is ready for the next one |
Now the thing that I didn't include in the xmlHttp.onreadystatechange event was sending this action somewhere which would usually be a function that you would define later on in the script but for the sake of completing the code I will be sending to a function that does absolutely nothing :P.
xmlHttp.onreadystatechange = function (){};.Now typically in this function you which would first check if the readyState property is 4 which means that everything has been executed with no problem and than tell it to do something.
Ammm seeing that this has turned out to be a longer post than intended I will be continuing on how to display the file to the user in the next which should be the last step in AJAX. Remember if you have problems with your program let me know I just may be able to sort out the error that you get if not will try and give you some advice. Untill next time take care.
Labels:
AJAX,
empty function,
JavaScript,
onreadystatechange,
readyState,
XMLHttpRequest
Sunday, 3 January 2010
Sorry :(
Hi guys hope everyone had an excellent New Year. I know I sure did :D... Guys this message is an apology for not being able to continue with the tutorials on AJAX and not having started Samba yet. You the New Year started really well for me as I got a freelancing project through one of the programming forums where I sorta help out. The project is to make an event poster, tickets and several other graphical elements for it. Know although it would usually take me about 3-4 days to complete this task its taking me longer because I finally made the jump from the Adobe CS3 products to the Adobe CS4 products which has forced me to relearn all the command locations again. The project is due to be completed on the 4th of Jan and after which I should be in a better position to post another tutorial. Again my apologies for the delay and Happy New Year.
Labels:
apologies,
happy new year
Wednesday, 30 December 2009
AJAX - Theory
OK so one of the first thing that I would usually ask is what is AJAX. Well it stand for Asynchronous JavaScript And XML which basically means interacting with a web page using JavaScript in an Asynchronous way i.e. the JavaScript interacts with the webserver to change the contents of the static HTML page sort of on the fly. That been said the web browser interacts with the web server using a thing called HTTP requests (HyperText Transfer Protocols) and what this basically does is that the user enters a URL and the web browser sends a request to the web server requesting the contents of the page. The web server responds with by sending the marked up page with any client side scripts. Please note that for server side scripts such as PHP the scripts are executed on a PHP enabled server before the markup is sent back to the browser. Once the brower recieves the marked up page(HTML) and the scripts it executes the scripts and displays the web page to the user following the rules that have been set for it in the CSS and stuff.
Now AJAX is a funny concept, it is JavaScript in the sence that it is executed on the client side but it also communicates with the server to load bits and pieces of the page. The communication is usually triggered by a user action such as a click on a button or the pressing of a key on the keyboard or basically anything that JavaScript can acknownledge. The requests that are being made are through a method called XMLHttpRequest. Now traditionally this would mean only getting XML from the server but from what I understand you could ask for anything to be imported like XHTML.
Next up will be how to make a request and please do correct me if I go wrong anywhere :).
Now AJAX is a funny concept, it is JavaScript in the sence that it is executed on the client side but it also communicates with the server to load bits and pieces of the page. The communication is usually triggered by a user action such as a click on a button or the pressing of a key on the keyboard or basically anything that JavaScript can acknownledge. The requests that are being made are through a method called XMLHttpRequest. Now traditionally this would mean only getting XML from the server but from what I understand you could ask for anything to be imported like XHTML.
Next up will be how to make a request and please do correct me if I go wrong anywhere :).
Labels:
AJAX - Theory
Web Development Tools
Hi guys hope everyone is doing well and ready to start learning. First of all let me just aplogize for the delay in putting up this tutorial for everyone, as it turns out that making tutorials is way harder than I originally thought. This tutorial may not be very useful to people who already have a foundation in web development, and I will basically be sharing the resources and tools I usually use for making my web pages and stuff.
Starting with the tools, you will most definately need a text editor and for those on Windows you should already have Notepad, for Linux regardless of the distro that you are running you should already have my favourite text editor called Gedit and lastly for Macs you should already have TextMate. For Windows however I would strongly recommend getting Notepad++ which gives you alot more functionality than Notepad. Notepad++ can be found at the File Hippo website and download the latest version. One more thing you definately need is a web server, I am using WAMP server for Windows, you can even get a MAMP server for Mac, a LAMP server for Linux (the link provided is to the instructions of how to install it) or if want to install on any machine at all simply install the XAMPP server.Since AJAX is a server side language you WILL HAVE TO INSTALL THE APPROPRIATE SERVER. Oh by the way still on the note of text editors there is no harm in using a WYSIWYG editor like Dreamweaver or the Visual Web Developer(which is free for the express edition) as long as you understand what you are doing. One more thing I would recommend getting if you already haven't got is Firefox because it has alot of nice addons and built in tools to debug your code.
I do understand that alot of times when we work on our own we don't really have anyone around to help us out and what I am going to do for that is build an archive as a side bar of useful websites for programming in general. On that topic though if you don't already know about it you should bookmark W3Schools on your favourite browser.
Now that you should be up and running the next post will be introduction to the AJAX way of thinking. Please do bare with me as I am not too good at giving tutorials so comments on these would be highly appreciated :).
Starting with the tools, you will most definately need a text editor and for those on Windows you should already have Notepad, for Linux regardless of the distro that you are running you should already have my favourite text editor called Gedit and lastly for Macs you should already have TextMate. For Windows however I would strongly recommend getting Notepad++ which gives you alot more functionality than Notepad. Notepad++ can be found at the File Hippo website and download the latest version. One more thing you definately need is a web server, I am using WAMP server for Windows, you can even get a MAMP server for Mac, a LAMP server for Linux (the link provided is to the instructions of how to install it) or if want to install on any machine at all simply install the XAMPP server.Since AJAX is a server side language you WILL HAVE TO INSTALL THE APPROPRIATE SERVER. Oh by the way still on the note of text editors there is no harm in using a WYSIWYG editor like Dreamweaver or the Visual Web Developer(which is free for the express edition) as long as you understand what you are doing. One more thing I would recommend getting if you already haven't got is Firefox because it has alot of nice addons and built in tools to debug your code.
I do understand that alot of times when we work on our own we don't really have anyone around to help us out and what I am going to do for that is build an archive as a side bar of useful websites for programming in general. On that topic though if you don't already know about it you should bookmark W3Schools on your favourite browser.
Now that you should be up and running the next post will be introduction to the AJAX way of thinking. Please do bare with me as I am not too good at giving tutorials so comments on these would be highly appreciated :).
Labels:
web developments tools
Monday, 28 December 2009
Samba and AJAX
Hi guys hope everyone is doing well and enjoying their holidays before the New Year :)... Now getting down to business... over the past like week or so I have been trying to get started on my courseworks and have had very little success, so I thought to myself "Hey I got a blog, why not post tutorials for myself and my ckassnates". In doing this is anyone with any knowledge on the subject is reafing the blog entries than they could correct me and plus if anyone can benefit from the tutorials than thats just basically a plus on both our sides :). So basically this post is just to let everyone know that the next couple of posts will be tutorials in both Samba and AJAX. So sit back relax and happy learning...
Labels:
announcement,
introduction
Saturday, 26 December 2009
Merry Christmas
Hi guys. First of all a very Merry Christmas to everyone and also a very happy Shahidi of Chote Sahibzade. For those not too familiar with the second event please click here to go to the Wiki page. Know as this is just my second post I would like to let everyone know that the contents of the blog will most probably be changing with each new post and I will be taking any requests for topics to cover via email or any other way you can get your suggestion to me.
Now a small update... I finally got a new laptop so "Yippeee" and Dhan Guru Nanak, and like most geeks out there I took my own sweet time in customising and getting well versed with my new Windows 7 PC and am loving every minute of it. Now that I have a new PC I will most definately try and be much more regular with new posts. As for my old lovely laptop... well I finally got it running again but it doesn't seem like it will be alive for too long I am still trying to make every minute I have with it count by installing Ubuntu 9.10 on it as the primary OS.
Anyway I am finally shifting gears from repairing PC to studies mode and I really want to finish my assignments before the new year so that I can start revisions for the exams and get to spend some time with my cousins :). Until next time take care guys and please check back for updates.
Now a small update... I finally got a new laptop so "Yippeee" and Dhan Guru Nanak, and like most geeks out there I took my own sweet time in customising and getting well versed with my new Windows 7 PC and am loving every minute of it. Now that I have a new PC I will most definately try and be much more regular with new posts. As for my old lovely laptop... well I finally got it running again but it doesn't seem like it will be alive for too long I am still trying to make every minute I have with it count by installing Ubuntu 9.10 on it as the primary OS.
Anyway I am finally shifting gears from repairing PC to studies mode and I really want to finish my assignments before the new year so that I can start revisions for the exams and get to spend some time with my cousins :). Until next time take care guys and please check back for updates.
Monday, 21 December 2009
Ammm... :'(
Hi guys. I am sorry sad starting this new blog at a very sad note... You see about 4 years ago something pretty wicked happened in Canada, I bought my very first Toshiba laptop. Ahhh those were the days I just fell in love with it the moment I laid my eyes on it, and I remember that day like it was yesterday. Microsoft was on the verge of releasing its latest Operating System, Windows Vista. At that time I was really excited especially seeing how much I liked XP. Anyway cutting the whole story short my laptop who I lovingly called my "WIFE" is officially dead and I am really really really sad.
I should post something nice after getting a new one because typing from my phone is honestly not fun anymore.
I should post something nice after getting a new one because typing from my phone is honestly not fun anymore.
Subscribe to:
Posts (Atom)


