Pages

Wednesday 7 May 2014

Exploring The Raspberry PI

Taking ownership of a Raspberry PI-B (RPI) had eluded me for far too long since it was launched early 2012. I had read a lot about this diminutive device fitted out with an ARM processor, HDMI, USB ports, an ethernet port to mention a few.

Since the RPI runs primarily (if not almost exclusively) on a Linux based operating system, prior knowledge of basic Linux is of immense benefit considering that:
  • Remote SSH connectivity allows for operational flexibility.
  • Installation of new applications extends overall features.
  • Headless server configuration mode is the strength of the device

Warning: The RPI being a Single Board Computer (SBC) and dressed out as such, requires prudent handling. All due care must be exercised to avoid damage through unintended forceful handling, unforeseen antistatic discharge, accidental short-circuiting of pins and any other exposed components.

The installation procedure is briefly listed below:
  • Download Raspbian Wheezy.
  • Download Win32DiskImager and install it (Windows OS based procedure).
  • Use Win32DiskImager to burn the Raspbian image to an SD card (I used an 8GB card).
  • Optionally: connect RPI to a monitor via an HDMI cable.
  • Optionally: connect a wireless dongle for a keyboard and mouse (this allows for 1x USB port to remain free).
  • Optionally: plug in an ethernet cable into the ethernet socket.
  • Insert the SD card into the RPI slot.
  • Plug in the micro USB power adapter connector.
The RPI then lights up, commences and completes the boot procedure. The boot procedure can be followed visually if the monitor is connected and switched on.

Raspberry PI - B


There is a sense of achievement when the monitor confirms a functional RPI, ready awaiting you to take control over it. From there on it is really about experimenting with the various configuration options available.

One is tempted to undermine the capability and performance of RPI, however, within a few days from installing the RPI, I managed to configure a LAMP environment. I had strange problems installing the necessary packages only to find that my 3G based broadband connection was too weak and erratic. After moving to another location, the installation proceeded seamlessly.

Presently, the RPI LAMP system has temporarily replaced the erstwhile PC based LAMP server platform. I am strongly considering a permanent arrangement at a later stage once the temporary setup has been comprehensively assessed and evaluated.

The RPI has proven to be a device that is certainly capable and easy to use - a worthwhile investment indeed.

Thursday 27 February 2014

Programming As A Hobby

The word "programming" generally refers to the activity of writing software code for use by some form of a computing device. Allow me to share how I became introduced to programming.
If you are looking for:
  • A definition of a programming language,
  • A comparative assessment of programming languages,
  • Introduction to programming,
  • Sample codes to solve that tricky code that simply refuses to run correctly,
  • A doctoral thesis on computer languages,
  • A flame war on languages,
then this post will not meet your expectations.

I was introduced to programming in my last year of high school many years ago in 1989, mainly out of curiosity more than anything else. At that time, tinkering with electronics gadgets (transistors, resistors, capacitors, bread/vero boards, soldering iron and so on) was my formal hobby.

At high school, my first introduction to a programming language was some variant of BASIC - to be honest, I had no clue what I was supposed to do with that so called "simple" language.

I do grasp the concept of languages - that is spoken languages I am referring to. I myself speak a couple of languages, others better, Other languages I write better and of course, others are so foreign both in terms of writing, reading, speaking never mind trying to listen and understand.

Learning a programming language, though in many respects akin to learning a spoken language, has a particularly invisible, yet effective barrier that I call the Concept of Implied Systematic Logic (CoISL). Without going into details of CoISL, have you ever had someone remark to you something to the effect of:

"...This is logical...", "...Based on common sense..." or "...You  should have known that if x = x + 5 is equal to x + 5..." 

After my high school I studied electrical engineering (light current) as it was called then. Light current implied focus on electronics, digital systems and telecommunications. It was in the same year when I started the engineering course that my real interest in programming developed. We had a module on MS-Basic. It was now less arcane then when I saw it in high school. There was a lecture who introduced the class to True Basic - what a phenomenal variant of Basic it was. I was then able to draw sine waves and other graphics on that poor little CRT monitor.

Well, it did not take long and I started to learn Pascal using the Turbo Pascal compiler. That was even more phenomenal for reasons I do not remember now and probably are less important as well. Post Turbo Pascal I was introduced to Borland Delphi 2 at a store when I was inquiring about Visual Basic. I opted for the Borland IDE and eventually upgraded to Delphi 3 followed by Delphi 4. Now I primarily use Free Pascal due to its strong similarity to traditional Delphi.


Well the rest is history. Over the past years I have learned other languages such as Java, Ruby, PHP and C#. I have also dabbled with C/C++, Perl and Python. C/C++ is still useful when programming up microcontrollers. It would be misleading on my part if I did not mention HTML, CSS, JQuery and JavaScript - and yes, there was a time when I thought and believed that JavaScript was the same as Java. I learned very quickly how ignorant. Trust me, that believe was quickly and quietly discarded.

Of course, I have made it a point to learn SQL, it is immensely beneficial  for database administrations. I can now confirm that CoISL is not an issue for me any longer.