Final Thoughts

Time to wrap up another semester. Personally, I thoroughly enjoyed this class, It really helped me as a programmer quite a bit. I had adopted Ubuntu about a year before this class started, but I never let it live up to it’s potential. I had never used the terminal, and I didn’t know any Unix commands. This class changed all that.

Almost every aspect of my day to day life involves my laptop, and Linux makes that time even more productive and useful. Looking back to when I primarily used windows, I had no qualms with it, but I don’t think I could ever shift back. I am permanently changed for the better with the introduction of Linux, as well as several other topics covered in this class.

I find myself commonly using the terminal, almost daily. The command $ find / -name <insert target here> has become my best friend, as has $ nautilus ., which opens a file browser in your current directory from the terminal. While it may seem counter-intuitive  there are times when a GUI for a directory is just more helpful personally.

I had never actually used python prior to this class, but love it now. This summer I will become even better with it, as I plan on converting many of my scripts to it from java. I do love how almost every programming language is so well documented on the internet. It allows me to teach myself any of them with relative ease. I taught myself java over Thanksgiving break last year, and it has been an indispensable tool. It is a good thing to know, and quite easy to get the hang of. My final project (project obelisk) was written in it, and it has been a massive help with my internship.

I do admit though that the code itself for project obelisk is not elegant. Quite the opposite actually, I would have loved to spend a day or two and optimized it. Being developed by two different people simultaneously lead to lots of repeated code and no set style. But the deadline came up too fast, and we rushed to get it working and bug free instead. Of course then other classes demanded our attention and we haven’t had time to go back and make the code more elegant.

I was reading an article a few days ago about how several companies now look for a well rounded github profile alongside a resume. It makes total sense, as an active and used github profile means that the owner is actively contributing to open source projects and software on his own time. Not to mention the fact that he would be already familiar with git and software development as a whole. I will maintain my profile and probably put up several scripts I’ve written and been actively using and expanding. They were initially created for my internship, and are used to handle large scale Html and Xml parsing/editing/downloading.

I feel like knowing python, java, and C/C++ is a good well rounded basis, as you can do almost anything between all three languages. I do like the fact that knowing the languages themselves is only the start of my job, writing elegant and effective code seems to be an art. The more languages and libraries I’m familiar with, the better art I can come up with. My favorite part though is that I’m just getting started.

Final Project Review: Descrambler and Hotel-Reservation-Project

Descrambler:

I first cloned into it, and read the readme. It contained clear instructions and compiled no problem. It gave me a few warnings about a variable “curr” being set but not used, but they did not affect functionality.

The descrambler appears to work as intended, correctly descrambling scrambled text. The only thing I could possibly think of to change would be to add a button for opening a file under the left-most window for symmetry and ease of access. But that is certainly a design choice and by no means incorrect or broken.

Looking at the source code it is very well structured and formed. A few more comments may have been nice, but the bulk of your code is self explanatory. Well done.

 

Hotel-Reservation-Project:

I first cloned into it, and read the readme. It was missing any instruction on compiling, but I assumed make was to be used because it came with a makefile. An understandable thing to leave to assumption. However, when running make, it says ”main.cpp:12:26: error: ‘atoi’ was not declared in this scope”. Looking at the source, I noted that the standard library wasn’t included, so I added the following line to main.cpp [ #include <stdlib.h> ]. With this addition, make completed successfully.

Upon trying the command, $ ./hotel  with no arguments, I get “Segmentation fault (core dumped)”. While I realize that the readme did say any invalid command would produce an error message, I assumed no command was considered an invalid one.

Come to find out that no matter what I do, I get a segmentation fault. I am either a fool and missing something, or the program is broken. I’ll look into the code to see what is going on.

Upon closer inspection, It would appear I was a fool. I misunderstood the readme, and thought the command line arguments of the number of rooms was optional or something, I don’t know. Apparently 3pm is too early for my brain. Anyway, after using the proper commands, It appears to work.

I strongly suggest adding prompts for the user, as referencing the readme for each subsequent command is slightly annoying and confusing at first.

However, looking at your code, it is well formatted. Could use a few more comments, but not difficult to understand. I suggest more thorough testing, the addition of prompts for commands from the user, and a better explanation in the readme for the initial command to start the system(Or I’m just too picky, that’s a possibility too).

 

Friday Morning Thoughts

I found myself wondering what everyone’s habits were when it came to writing code. Personally I need my music playing , and generally need to be away from my apartment to stave off distractions. After about ten or twenty minutes, I find myself “in the zone” so to speak, where nothing distracts me and I can get major progress done.

What are some of your habits or tips when it comes to coding? And also if you listen to music, what type? I often wonder if i’m the only person who listens to metal on campus. (Dark Tranquillity’s new song “The Science of Noise” is what I’m listening to right now) However I do like almost everything, with the notable exception of country and most rap.

 

Also, everyone has probably bought a Cerebot board by now, and is either currently using it or it’s sitting on a shelf collecting dust. If yours isn’t collecting dust yet, It will be after micro. I dislike that, I’ve been trying to think of the best use for it. I would love to make some kind of RC car with it, but then i’d toy around with it for a month and it would go back to collecting dust.

Currently my best idea is to get the bluetooth and RF PMODs and write some code that will let me connect to my Cerebot from my smartphone, and then emulate the TV remote. I’m not entirely sure that the RF PMOD covers the same spectrum as a universal remote, but I’d do some research before buying parts. I’ve written android apps before, and know how I’d code this project.

How are you using your Cerebot? Or what Ideas do you have on a better use for it? I plan on doing something with it over this summer, but want to make the most of it.

 

To continue with my random train of thought, I guess I’ll bring up the newest release of Ubuntu. ‘Raring Ringtail’ (13.04) is now stable and released. I’ve read reviews on it that seem unimpressed, but that’s because they haven’t delivered on certain featured that were scheduled to appear. However, things like the “smart scopes” that were supposed to be arriving would have contributed to bloat in my opinion. I’d much rather them work on minimizing the memory footprint and increasing performance.  The biggest thing they’ve done in 13.04 is optimizing the graphics and making other incremental steps towards a unified mobile/desktop release.

As soon as finals are done, I’ll be backing up everything important from Ubuntu and Windows on my laptop and wiping it. Then I’m putting either Windows 7 or 8 on it, as well as Ubuntu 13.04. Although as I type this, I’m wondering about other distributions. I very well may try out Linux Mint or Debian, only time will tell.

 

Ubuntu

     I was going to blog about a discussion between me and some friends about  synthetic versus organic computing, but I find myself a little too short on time to do it justice. Instead I’ll bring up canonical’s attempts to branch out. Most interesting to me is their development of Ubuntu for multi-core smartphones.

     My smartphone, a galaxy note II, has much better specs than my first laptop. However, It’s not quite at the same level of convenience yet.  Also at times, I feel like it’s not as fast as it should be given the specs. I’m hopeful that Ubuntu will be an even more capable os than android. I like the fact that canonical is further blurring the lines between mobile and desktop os by having the phone run a full desktop os while docked.  I realize many people dislike that phone screen size is increasing, instead preferring them to remain minimal. However, I personally love the fact that phones are getting larger and more powerful. I desire a phone which is closer to a tablet, as opposed to one closer to a watch.  I believe canonical’s development of Ubuntu for smartphones is more aimed at people like me, who could use their large phone screens as a desktop while docked.

     However, this is not the only way canonical is branching out. At the link below you’ll find information on all the devices canonical is working on bringing Ubuntu to. I will certainly be, at the very least, checking them out when released and stable, if not using and enjoying them as much as I am Ubuntu on my laptop.

Sources:

http://www.ubuntu.com/devices

What is the far future of computing?

I had planned on making my second blog post about Wine, however my last week was more difficult than I anticipated. I have not had time to mess around with it, and instead spent my time writing software.  

I had quite the interesting conversation with my friends about the future of computing. We started with the concept of security, and what it took to safeguard systems as well as break into them. We came to the conclusion that it all seemed to be a numbers game. Given a certain amount of processing power, you had to use it cleverly to safeguard a system. With the same amount of processing power, you can utilize brute force to break into a system. That loosely translates to it being more difficult to safeguard a system than it is to break into it. Of course there are notable exceptions, such as clever exploits which could bypass security in entirety. While it would rarely be that straightforward, and sometimes not true, we called it a general observation.

Next we got into the topic of what computing was at its most fundamental level. At first we thought of alternate bases, instead of binary. But the conversation quickly evolved to thinking further outside the box. We discussed optical computing, but again came to the conclusion that it was merely a different implementation of modern computing. We then thought of organic computing, and talked about the lab which managed to store data in synthetic DNA. The more surprising part of it to us was the fact that they managed to retrieve the data with 100% accuracy. But again, it was only an organic method to store bits in a conventional computing system.

We tried to come up with an entirely different form of computing, but couldn’t. Everything we could think of was related to current methods. I have been wondering if that’s because we are trained to think about it in one way, or if the current methods are truly the most simplified possible. Granted we did come up with some unique ideas, but they were different implementations of current systems, not a new system in and of itself.

My linux history and favorite tips

I have been using windows for almost all of my life. It came installed on every computer or laptop, and seemed to be the only viable option, as far as I knew. I started thinking of alternatives when I started building custom computers.

I did some research, and learned that buying a copy of windows would set me back by about two hundred dollars. This alone was a strong incentive to search for alternatives. I read about ubuntu, and it sounded great. The downside was that it could not run the games I was designing the computer for in the first place.

Fast forward four years, and I found myself in college, with little or no linux experience. To change that, I looked into configuring a dual boot for my laptop between windows 7 and ubuntu. I succeeded, but was completely new to ubuntu, and would become more and more familiar with it as time went on.

Present day, I find I prefer linux over windows. I had been told windows was “bloated”, but never realized how much until I was accustomed to ubuntu. It takes a few seconds to boot to ubuntu, and at least a full minute to boot to windows. This includes every optimization that I could do to windows to increase boot time. I find that I boot to ubuntu in all of my classes but one, for the sole reason that I cannot get the software we occasionally use in class to run on linux. I would stop using windows entirely, but I still require it to run certain programs for school, and video games. I have heard of wine, a compatibility layer for windows on linux, that may allow me to do more of what I want. I believe I will look into it and include my preliminary results in my next blog post.

I suppose I can share some of the tips and tricks I’ve picked up on in my time using ubuntu. Three of my personal favorites follow:

First off, if you use google chrome and can’t live without it, I recommend using the chromium web browser, not google chrome. I started on google chrome and found it crashed and was pretty unstable in ubuntu, whereas chromium has been working perfectly. The only difference is that chromium is a blue tinted logo and works much better. However, it has been a long time since I tried google chrome, and they may have since fixed the bugs.

Also, if you use google drive, the folder synchronization is not supported on linux. To get around that, I created a dropbox account and set its location to be within my google drive. This allows me to keep documents in the cloud but still access them using my google drive as opposed to dropbox.

If you find yourself needing to navigate to distant directories in the terminal, you can make a set of scripts to get you there faster. Rather than typing cd Projects/IntrotoUnix/mult, you can simply type bash mult_goto.sh. Make the name of the target directory first, so you can start typing it and complete it quickly with tab. I’d like to even have an icon on the desktop to open the terminal and navigate to directories for me with the click of a button. I’m sure it wouldn’t be difficult, but I’m lazy and/or busy and haven’t gotten around to it yet. I probably will and will visit that for my next blog post.

 

If anyone has additional tips or better ways to do things, please add them in a comment!