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.
Davinderpal Singh
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
Subscribe to:
Posts (Atom)