Systems Thinking

Systems thinking is a new and evolutionary way of looking at a problem and attempting to gain understanding and knowledge about a system. A system is “set of elements standing in interrelations” as defined by Ludwig von Bertlanffy in his book General Systems Theory. My understanding of this is that a system is a mathematical set of physical parts and a set of physical relationships between the parts. It should be noted that the parts themselves are often but not necessarily systems too. It is important to understand what a system is before trying to how a system operates and why it does.

As Systems thinking is the topic this week for my subject “Systems Engineering for Software Engineers” there are associated readings (and viewings) to push us to think about the topic. The first is a short lecture given by Dr Russel Ackoff. In the video he briefly goes into his view of systems thinking and what it actually is.

He defines systems thinking to be synthetic. By nature we think analytically, pulling apart a system to analyses it as a collection of components and then combining the individual understanding of each component in an attempt to understand the system as a whole. He posits that this gives us no understanding, only knowledge (which is still very useful).

Synthetic thinking is in direct opposition to analytical thinking, it requires that you view the system as a component in a larger containment system, communicating with other components. By determining the behavior and functionality of the containment system as a whole and them dismantling the containing system by identifying the underlying functionality of the system as a component. Dr Ackoff stresses the importance of considering the function of the system as being more important than the internal knowledge of how the system works.

This seems counter intuitive to me. A system is the product of the sum of its parts and the sum of its internal interactions. Considering this, analytical thinking is often flawed by ignoring the interaction. Chemistry education relies on this flaw to help students understand quantized energy of electrons in an atom. By ignoring the interaction of the electrons with each other (by considering on the base case hydrogen) we can grasp the way that energy can influence the properties of an atom and we can do so without much difficulty. In order to overcome the challenge of considering the electron-electron interactions (which often depend on complex computational math) chemistry appears to have developed a similar approach to systems thinking in regard to the wider context of a chemical in a system.

Chemistry is defined as “the science of substances: their structure, their properties, and the reactions that change them into other substances” in Linus Paulings Text book ‘General Chemistry. This definition embodies the systems thinking process. Chemistry takes a molecule and looks internally at it’s structure (analytically) and at its properties as it interacts within a neutral context as well as the reactions that it undergoes within the system that it came from (systematically). A chemist would then attempt to match the properties and reactions in its natural context to the molecules internal components and there interactions (atoms, electrons, protons etc.)

We can see that chemistry is an example of where analytically assessing a system (a chemical or a molecule) gives only half the picture, and that we quite often need a context and a functionality of the system as a whole to even comprehend its internal interactions. As systems become more complex not only does analytic thinking not provide real understanding of a system but without a systematic thought process, we may misunderstand the way that the internal interactions either should or do behave.

This brings us to the relevance at the core of the subject. Why should software engineers think about systems engineering and systems thinking? Without a greater understanding of the larger system, a software component may not function appropriately within the system or by misinterpreting the system provide a flawed or incorrect implementation of what is required. It is only by considering the larger system as a whole that we can effectively develop correct and appropriate software.

Powernap – The Server Power Management

I recently moved into a new home and one of the first things that I HAD to do was setup the home media server with a XBMC front end. So I set it up and I have been watching movies and television happily for a month now. All was going well until I got my first electricity bill. Wow was it painful. Of course it include the usage of a fridge and other appliances, but the media server had not been turned off for the whole month even though I only used it maybe 2 hours a day.

To this end I set out to find a way to reduce power consumption. The first thing that I thought of was a simple shutdown script for the XBMC front end that would turn off the server before it turned off. This worked well but there where problems, that sometimes the front end wasn’t turned off for long periods with idle time, or sometimes after I turned off the front end I still wanted to access the server and I still had to manually turn the server on. Clearly this was not a long term solution.

The next concept was to get the computer to be turned on via Wake On Lan. Wake On Lan (WoL) is a method of sending a special command to a computers motherboard via an Ethernet connection. This is easy to setup but hard actually do. Searching around online I found a program Powerwake written by Dustin Kirkland which using a very simple interface can perform as required. On Ubuntu this can be installed and used to wake a computer like so:

sudo apt-get install powerwake

sudo powerwake 10.0.0.12

*Replace 10.0.0.12 with the the address of the computer you want to wake.

This can be used to wake a sleeping computer. I use a simple script built into the front end which when runs wakes the server, waits about 30 seconds and then tries to remount the fstab file. If it the remount fails it waits another 30 seconds and then tries again. When the remount succeeds the computer reloads XBMC – easy.

This leaves only the problem of getting the server to turn off after inactivity. For this I installed the powernap program. This is a great application, again from Dustin Kirkland, which acts much like a screen saver for a server or non-GUI system. It is was quite complex to setup, but once you understand how it works it becomes much simpler.

Unfortunately time has run out and this post must end now. Stay tuned for updates of how I installed Powernap and a better look at how the program works.

As power is becoming a more and more costly and a limited resource (until we switch to renewable energy sources) tools such as powernap and powerwake will become more and more necessary for both hobbyists and professionals alike.

Children on Facebook

If you’re a parent, you generally have a fairly intense concept of right and wrong, despite there being differences within your general and wider communities. I am not judging, everyone has the right to raise their children how they see fit. Despite that this will inevitably lead to a destructive discussion, I would like to raise a point about the posting of images of children on Facebook and other websites, and how this could be a potentially dangerous habit.

When a child is born, they have very little impact on society. This is important because it enables parents to steer the child away from the lessons that they themselves can teach as a parent, rather than a let the child make unnecessary failures. When a parent posts a picture of their child onto the internet they are leaving an impression of them on the world that the child has no control over. The issue is that parents who are children of a social disconnection (via social media websites with physical separation) have not learned the lessons that come with such interaction. In fact no one knows what the true lessons of the internet and how it may be used in the future. The internet is only just graduating from college (in a figurative sense) itself and entering the workforce, at a meagre 25 years old. If you think of the internet in useful terms, it is only been about 15 years since the notion of being able to do anything other than share documents.

With the internet as young as it is, and the lessons that have not yet been learned about the power and appropriate respect that is necessary when dealing with it, parents need to think twice before posting images of their child onto the internet for the world to see. Now this is solely conjecture, I don’t have an answer as to whether there are any consequences to this habit. But I understand the power of the internet and can recognise that the public exhibition of children could be potentially harmful to them later in life. The point is, we don’t know so lets be a little cautious.

To that end I would ask that parents, in all their wisdom, ask themselves whether they would like a random stranger to walk into their house, unannounced, to look at their child. Now that’s a scary proposition, but it’s the truth. If you put a picture onto the internet, no matter how ‘secure’ or how much privacy you think you have, you still must consider that it is PUBLIC and that anyone can see it. You can never know what will happen to you ‘private’ data in the future if it sits on a server in a factory somewhere in the world and could be robbed, stolen or even just sold without being securely wiped clean.

Now I am not trying to scare people or make them take any action at all. I want parents and everyone else, to take a moment and think about the possible consequences of posting pictures of their children, or children in general on a website like facebook.

This is a potentially contentious topic and I would love to know what you think about it.

Of Spirituality and Belief

I live in a world of spirituality and belief, of happiness and joy, of pain and suffering, of understanding and doubt, of faith and trust and of imagination and reality. I live in a world without god.

For many years I have grappled with the concept of god. Perhaps a better wording is ‘my’ interpretation of god. This distinction needs to be made because the nature of god is not a singular structure that exists, but that god is presented to the world as representations of religions AND the introspection of the self.

This personal struggle has lead me to cover much of the ground that surrounds god. Starting at religion, which seems to be the first instance of god that a child has, to belief and faith and onto spirituality. I have journeyed to my conclusions on spirituality and belief that I am sure I will continue to address for the rest of my life, and yet my internal answers serve as a great comfort in easing my inner duality that we all have to come to terms with.

For now the only conclusion that I would like to put forward is that I whole heartedly believe that the notion of a benevolent god, an external entity from me the self and mostly associated with a religion although not by necessity, to be non-existent. That for all common purposes I am an Atheist.

From this point forward, I would love nothing more than to delve deeper into my journey, telling tales of adventure and discussion with long nights around a table with friends and family and trips out of town to further my understanding of the world. But the truth of the matter is that much of my discovers come through quiet contemplation, through reading and watching documentaries, and that my answers are my own, and not fed to me through external sources such as revelation of mind.

Perhaps the reason for this is that this issue is as much of spirituality and belief as it is about my own identity, after all we are nothing without an identity except a body. My identity to me is me, being more than just who I am to others and myself, but the choice in the delicate path that I weave through space and through time. My identity includes my perception of me, in what and how do I see myself.

So with this in mind, my journey through spirituality and belief as well as the search and discovery of my own identity will begin, and with the recognition that I am not and can never have finished this journey, I will discuss some of the major hurdles that I have crossed in my struggles.

Does God Exist

This is THE fundamental question that we must all contemplate with discussing any issue relating to spirituality and belief because it so intimately shapes the way in which we make related decisions. If a person believes that a god exists, then the self reflection and internal dialogue will be swayed to mirror this, and they may disassociate themselves from their identity. This is reflected in the Christian (and maybe others) religious concept of being a ‘child of god’. If however, we consider a person who does not believe in god, then they will without a doubt place a different association on their internal dialogue with their identity.

The association with the identity is the key, and the existence of god, or the personal perception of god, plays a vital role. This concept does nothing to shift my point of view, nor should it make a person feel any different at all, what it should show is that people will have a different identity, based upon the answer to the question.

One of the toughest concepts of the existence of god that I have ever worked through is that of the quote by an ancient Greek scholar Epicurus

"Is God willing to prevent evil, but not able?
Then he is not omnipotent.
Is he able, but not willing?
Then he is malevolent.
Is he both able and willing?
Then whence cometh evil?
Is he neither able nor willing?
Then why call him God?"
— Epicurus (ca. 341-270 BCE), Greek philosopher

This quote really made me think. What did I have to say about this. This scholar has come from a time and place where considerable advances where made in academia, yet too early to do anything but think and play with some rudimentary mathematics. Yet here is a man who rationally questions the notion of god.

The first thought that comes to mind is perhaps some part of his logic is misconceived or misunderstood and yet, at least to me, this is a valid argument. Of course the religious schooling in me tells me that the line ‘whence cometh evil?’ is an answerable question, in such that god ‘allows’ evil to persist for any number of reasons, most notably free will. But to me these answers are too simple and avoid the question’s true essence. That if he is willing and able, and has a capability beyond human reason, why is there evil at all. If a god is so determined to have us love him because we as humans want to, doesn’t that make him a narcissistic character on a level that could by human standards by unacceptable.

To me personally, this quote does have it’s flaws, but it also encapsulates the way that I feel. “Why call him God” is a great question to ask, for why do we need god. I can understand a need for religion, in that a set of beliefs helps society to function. But history tells us that it doesn’t help keep society at peace, and often causes far more problems than it solves and most importantly, provides it’s followers a means to stop behaving rationally. But a need for religion without a need for god suggests that we could choose to live without both and build for ourselves a world where we have the values and morals that allow us live socially and at peace.

Because of this conclusion, I can say that I don’t believe in god. I wish that I could say that god doesn’t exist. I wish that I had some evidence to prove that there was no god and that we would all be better off without his concept. What I do have is the writings of many philosophers, scientists and great thinkers, who have all weighed into this question and came to relatively the same conclusion. Because of that I am happy to be part of the society who chooses to accept in the non-existence of god, a part of the atheistic society who lives by rational and logical reasoning.

But just because I deny the existence of god, does not mean that I cannot be a spiritual person. Spirituality can be separated from god and religion such that an identity can be had from an internal perspective. However that is for the next post.

If you have an opinion about something that I have said in this post please leave a comment.

Start using Fuel PHP today

The last few days I have been busy looking at the Fuel PHP framework. And it’s AWESOME. That’s not a great description, its not even very objective, but none the less it is true (you will have to take my word for it now). The framework can be found at fuelphp.com.

Today I am going to give a quick guide for installing and running Fuel PHP on a linux machine and some extra cool tricks to make the setup easier. First what things do you need, assuming that you have a fresh linux install.

  • apache webserver
  • php 5.3 (needs to be at least 5.3)
  • php cli (command line interface)
  • mysql database server
  • command line editor vi or vim (not totally necessary but i will assume that you have one as I believe command line file editing to be the easiest option)
  • wget or curl (fuel documentation uses curl but either could be used)

I will also assume that you have root access and that you are on a home computer using localhost for your domain. Production environments require more careful setup and I will address those issues in a completely different post.

Lets Go

1. install all the necessary components

sudo apt-get update
sudo apt-get install php5 php5-cli apache2 mysql-server phpmyadmin curl vim git-core

2. install the fuel PHP oil installer. (that sounds strange)

curl get.fuelphp.com/oil | sh

3. change into the directory that you want to build you fuel application in and run the fuel PHP oil create script. replace {user} with your username and {app name} with the name you want to give your application. it doesn’t matter what the name is as it wont get used in the website URI

cd /home/{user}/Public/
oil create {app name}

4. Now it that’s as far as the basic section of the documentation on the fuelphp.com documentation website. However you cannot access the app in the browser yet. Before you can do that there are a few steps that you must take. We have to set up the apache virtual host. This greatly varies on you operating system, but for simplicity I will cover just Ubuntu, and will cover different OS’s later. We need to alter the virtual host so that it follows symbolic links and knows what the root directory of the website is. Because the fuel index.php file is in the public folder in the actual top directory we will include the public directory in the website root directory.

sudo vim /etc/apache2/sites-enabled/000-default

Now make the file look like this:

<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /home/{user}/Public/{app name}/public
        <Directory />
                Options FollowSymLinks
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>
        <Directory /home/{user}/Public/{app name}/public>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>
</VirtualHost>

Restart apache to apply the configuration changes

sudo /etc/init.d/apache2 restart

5. If everything worked you should now be able to go to http://localhost/ and the fuel app page should be visible. It looks a little bit like the codeigniter welcome page. (most of the developers of fuel have or still do contribute to codeigniter).

Conclusion

Hopefully this is guide is a relatively straight forward explanation of how to set up fuel on a new development environment. Any questions or comments are appreciated. I’m sure I made a mistake somewhere in there or perhaps it just didn’t work on your computer. I would also love to get some suggestions on what you would like to see next.

Websites I’m In Love With

I have a list of websites that I visit habitually that don’t include social media websites. This habit has at times been a problem, I can’t remember how many times I was late to class because of a new blog post on a website that I just had to read. Today I thought I would share these with you. Maybe you could suggest some that you like to visit habitually.

Revision3.com
I love revision3. Plain and simple video content that’s fresh and original AND technology related that is rare to find. There are some great independent publishes that use revision3 such as hak5 and Geekbeat.tv. Basically Revision3 is a web publishing tool for video content. Think publish as an author would publish a book (means you only get ‘good’ content and all in HD content).

Nettuts+
Net tuts is a great website which publishes blog post tutorials, web development articles and inspirational type posts. They are insightful and good reading (as well a watching). Part of the Envato family, You know that your going to get good quailty posts 2 or 3 times a week. I also like reading other tuts+ websites such as webdesign and wp (wordpress). One of the things that I really like about these websites is they often gives me ideas about completely different concepts.

hack’a'day
Quick simple posts, 5 or 6 a day, often including videos. The main point of the website is to collect together cool ‘hacks’, usually hardware related combinations of components to achieve a specific task. The website is great for inspiration.

Steve Duke Photography :: flickr
Ok, this is a little bit of a shameless plug, it is my dad’s photo stream on flickr. He is a great amateur photographer and budding professionally, and while he does not have a website yet (I’m working on it), he updates his stream quite often and it is a great source of inspiration and enjoyment.

This list is not all my favourite websites, but they are the ones that I visit the most. I would love some suggestion of websites that I should visit and of course why :P

Quick Note on fuelphp transfer.

Yesterday I blogged about the need to change the underlying framework from codeigniter to fuel. This I have discovered was a lapse in judgement due to the desire for certain pre-built functionality that is not wholly necessary for version 1. I went through fuel and come to the following conclusions.

1. Fuel (fuelphp) is a great framework. It has functionality that is incredibly desirable such as a database interaction through object relation mapping and a authentication frame (not authentication but more a model in which to build upon).

2. My current framework codeigniter, while suitable for small fast prototyping, does not have all the tools that I need to create exactly what I feel that I need they way that i want it.

3. This is the most important thing. What I desire is not what i am trying to do immediately.

My project, for those who haven’t read about what I am trying to do, is create a custom content management system, along with a set of tools, for developing large back end systems for specific clients.

Right now I am working on a prototype system. This is more of an idea implementation as it is a releasable project.

Conclusion:
For now I am going to stick with codeigniter for version 1 of my project and learn the details of fuel during the next few months for a transfer to fuel for version 2 (maybe 3 not sure yet).

Despite this I will still be post lots about my discoveries of fuel, mainly because it is new and it strikes me as the next big thing in php frameworks.

Fuel PHP – First Impressions

There are two main competing objectives of any framework. It needs to be fast and it needs to do everything that the user needs. The irony is that often the users needs are greater than the speeds they desire. This Dichotomy of a users desires may drive diversity, but it also encourages the search for the perfect medium, speed and functionality.

Fuel – The php framework – is simple and easy to use, provided that you are comfortable using the command line enough that you can change directory and edit a few files. It is fast. The first thing that I did in testing was download, install and load it up in the browser. The page rendered in less than 0.01 seconds and used only 1.34mb of memory (same speed but less memory footprint than the base codeigniter install). The design of the home page was fresh and clean. If nothing else it leaves you feeling optimistic. Always a good feeling to have when you first start using a new technology.

Something that strikes my as clever is the simplicity of the framework. It gets out of your way when you coding. In other attempts to do this you always felt like you have to completely separate your code from the frameworks and carefully knit them together later. Fuel has cleverly taken design initiatives that web developers have been discovering of over the last 2 years and applied them into a clean, fresh and unobtrusive style. Allowing a free flowing feeling when a user is coding.

The Fuel website is a real gem (no ruby intended :) ). Clean and simple and has everything you need. The documentation is good, but probably not awesome. It can be a little fiddle to navigate, maybe I need to spend a little bit more time using it.

On doing some research, there appears to be a slight ‘contradiction’ between the use of codeigniter and Fuel, as much of the functionality is quite similar. In my opinion however, I feel that this Fuel is quite an improvement upon this and other php frameworks but hey, I only just started.

I would like to finish this short post with a quick question. Do you use a php framework, and what do you think of the ones you use.

Making the jump – Codeigniter to Fuelphp

One of the issues that seems to come up for me often is the need to rapidly create a launchpad for my ideas. Usually this means some form of webpage that performs a particular function or perhaps a blog post or something creative. The problem is that creation takes time and as a university student I don’t have the time to spend fiddling around with a development environment to achieve exactly what I need.

Up until now I have used Codeigniter as my default development platform. I haven’t created any live pages as I can not afford to have a server off campus to host my “dev doodles” and my university blocks outside access into my web home web server. None the less, I have been using Codeigniter for some time now and I love the simplicity of it, and have built much of my own functionality into it. For those who do not know, Codeigniter is like the pre-made foundations to a backend of a website.

But today I ran into a realisation, like a truck bearing down on me. I have been noticing that my code it getting bloated, for example I was needing 8 lines of code to load a view instead of one. And while normally this wouldn’t bother me, I have come to the conclusion that Codeigniter is no longer performing optimally for my needs.

So I have decided to make the jump, to stop using codeigniter and start using fuelphp. Fuelphp, is a knew discovery, sort of. I have seen it before, and even viewed it’s source but until now it has been in development, only just having released its version 1.0.

Over the next few days I have decided to transform my current project, a personal cms for my dads photography from codeignier code into fuelphp code. I am hoping for a smooth transition, but we all know thats not going to happen, lifes just not that fair. And so I will document the transformation and let you know just how it works out.

Working For a Client – Building a Computer System

At one point in time, those people with a rough to well formed knowledge of a computer have been asked to help out a family member or friend with an ‘silicon’ based issue. It is usually a case of having clicked on a suspect link or open a attachment from a phishing email and more often than not there is either a quick fix or no fix(other than a clean OS install). Sometimes though, very occasionally, you might get asked to setup an entire home computer system.

This is what I intend on being a series of posts, not so much on the nitty gritties of setting up individual components of a system, but creating the entire workable system. At the conclusion of the series I will be releasing my backup program written for the system in a form that everyone can use.

A point that should be made is that this is the first time I have done this is at a non personal level. The resources that I have used range from manuals to forums and wiki’s to websites and is by no means a complete body of knowledge, and it should never be expected to be complete. The point is that what I have done is not necessarily the quickest, most efficient way of doing things (although it might be). Hopefully if nothing else it leads to a thorough discussion and a greater understanding if computer systems as a whole.

Project Outline

This project is centered around a small photography hobby as well as general data storage. There where a number of considerations when taking into account the clients needs.

  1. How much data storage would be needed in the long and short term.
  2. How often would files need to be moved around and accessed
  3. What peripherals would be used now and in the future and what would the level of difficulty be to add them at creation date or later.
  4. What would the future needs of the client be in 1 year, 5 years, 10 years time

Concern 1

The first concern is how much data storage is needed. This usually isn’t the first question I would ask when discussing the needs of a client, however, I soon found that depending on the size of the system the physical needs vary greatly. If only a small volume of storage is needed then a centralized server may not be needed. If a large system is needed for working with large files then working over a network is preferable to a adding a USB HDD to a pre-existing computer.

The client is a hobby photographer and works with often large photo’s (>20 Mb) and in large collections. They need to be able to have fast access to the images as well know that they can not lose any data by accident. I calculated from the information that I was able to gather, that a file space of approximately 4Tb (Terabytes) would be sufficient.

Concern 2

The second concern, following directly from the first, is how often will the files need to be accessed and used. This is relatively straight forward, In this case, the files need to be both backed up and stored on a local server and will be accessed many times a day. This helps us determine the way that we will arrange the HDD arrays and define the backup scripts.

Concern 3

The third concern is what peripherals will be needed now and in the future and hard difficult they will be to setup. The first and foremost is the camera’s themselves, then any portable devices such as tablet PC’s and smart phones. There is also guest computers for collaborative work and visitors, A potential Home theater PC and lastly printers.

Most of these are relatively straight forward. Most just require the setup and regular rotation of a password, The camera’s come with software and The media based computer can be built on a UPnP system. The only difficult setup would be the network computers.

Concern 4

The forth, final and most important concern is, what are the FUTURE needs. This is a difficult question, and one that i was not able to answer due to a lack of foresight of the technology industry. Who knows what level of technology will be accessible in 1-5 years time (at the time of writing only ADSL internet at 1500 kbps is accessible and afford-ability of wireless devices is very low).

Conclusion

This now leaves us at the starting point in our build. We have a general overview of the needs of our client, and roughly an outline of the types of services that will be integrated.

In the next part of the series, I will be going through the basis of the network topology and the hardware that was purchased prior to and during the build.

If there is any questions or comments please leave a note, I would love to start some discussion on this topic as it seems to becoming more and more requested by the community.

Follow

Get every new post delivered to your Inbox.

Join 199 other followers