I had decided to switch to Linux a few weeks ago but I knew it would not be until I had completed all my school related work so I can get my degree. In the meantime, I had planned on continuing to test Ubuntu on a virtual machine. As days passed however, I found myself rarely opening the virtual machine, old habits die hard. This occurred to me because I was thinking of what to put on my final blog post and I did not get any ideas. I have to begin organizing my files and storing them on the cloud so I can format my hard drive and begin anew with a dual boot setup. I guess I was in denial to a certain extent because the virtual machine had this occasional lag that I would rather do without, and I did, by using Windows instead.
Monthly Archives: February 2014
Hindsight is 20/20
So I read through the first few chapters of “The Art of Unix Programming” by Steven Raymond. My initial intention was to find topics to help me complete the blogging assignment but I have stated in a few blogs already that I intended to give Ubuntu a more concerted effort this time around. However, reading through chapter 3 about the various advantages of Linux in terms of security, multitasking, having a unifying idea of everything being a file and using pipes as connectors, etc really made me go out and a google an explicit comparison between Windows and Linux, a comparison here intended for the average user favors Linux by a small margin. Another comparison shown here is was a response to the same question by a freshman looking to study computer science. I am a little embarrassed that I had not done this research a long time ago and made myself informed. I am about to make a permanent switch to Linux as far as all non-gaming computing is concerned.
Based on Historical Events
I was reading about the early history of Unix and how Bill Gates became a multibillionaire after buying rights to QDOS for $50,000 and marketing it as MS-DOS. I would think just that shrewd maneuvering which eventually led to Microsoft dominating the PC market well into the 21st century would have earned him a biographical movie, “The Operating System” maybe? Further, I found it even more interesting how the various owners of Unix throughout the years managed to botch every single attempt at turning it into a viable commercial product while non commercial versions initiated by hackers and the open source culture have become viable products. Consequently, I am slowly moving towards the “free software because it works better” camp.
While completing the python multiplication assignment, I was able to gain a little insight into how python treats standard input from the keyboard. It seems that python can be told to treat STDIN as a list so a user can iterate through it in a for loop however if this is the case, the for loop waits until the entire input is given from the user with the EOF character before it starts go through the for loop. This creates limits on line based interactive programming. The solution was to place STDIN in an iterator and have the for loop iterate through the iterator which then allowed for each line of the code entered by the user to be inspected individually.
My entire programming experience prior to this class has been based on Windows machines using tools like Eclipse, Visual Studio 2008 and MPLAB. I did not have to use a command line while using any of them because they all have GUI option for doing almost anything. The process of resolving dependencies, compilation and producing an executable were streamlined by these tools. It was interesting to see how its done manually and then to streamline the process using a makefile. While my initial exposure to makefiles has been in the context of compiling programs and creating executables, it can be a very useful tool to streamline any process with a dependency and a target. I have seen an example where it is used to replace a missing file by first downloading it and and unpacking it from a compressed file. I’m sure I’ll discover interesting ways to use it soon enough.
Pipes and Whatnot
Many rules in Unix philosophy explicitly or implicitly including those of simplicity and modularity encourage writing simpler smaller programs with limited scope and to avoid unneeded complexities. I understand the advantages to that and I think it is one of the things that becomes intuitive with more programming experience. What I actually had issues with was that so far, all communication I have seen between small programs was limited to input output files being shared or the sort of resources sharing between different threads running on the same program. The assignment about Pipes and Forks was a very good introduction of a new method of inter-process communication which I was not aware of before. While I was able to have a good enough understanding to complete the assignment, just the sheer potential utility of the mechanism for creating programs tells me I have a lot more to learn about it. Another good reason to keep using Ubuntu.
Standalone Ubuntu Installation
I am currently running Ubuntu 13.04 as a virtual machine on Windows 7, performance is reasonably smooth for the most part. It does get noticeably slower if my laptop went to sleep or hibernation without suspending or shutting down the virtual machine in advance. Further, it’s just not very good at multitasking when run as a virtual machine. It is increasingly becoming clear to me that I need to have a standalone installation in a dual boot setup as I once did on my old laptop to really start exploring. This made me reflect on why I never developed as much interest the first time around, I had Linux Mint then and the start menu and other UI seemed very similar to windows and I had a painful wireless driver issue. I suppose it didn’t help that I always had to be in Windows to run programs for the electrical engineering classes I was taking at the time. Perhaps now that I’m done with school and promptly unemployed, I will find an addictive RTS game I can pick up on Ubuntu and let that help me stay grounded, ultimately, I would like to be well versed on this system because I believe it will soon become an occupational necessity.
Well Hello There!
This will be my blog for the class ECE 2524: Intro to Unix. I hope you all enjoy!