Tuesday, August 23, 2011

When true IS false the hope IS lost

{Imported from my previous post in vstretch blog}

Logic, mathematical logic is one of the most pure concepts that serves as the basis for the programmers value system, core beliefs or even in the extreme cases the religion. One of my university professors used to draw a simple logical chart that is universally true in programming and the life:

Devil exists
In other words both true and False results can be inferred from a true statement, and only false results can be inferred from the initially false statement. In the case if false assumption results into a true statement, the logic is non-existent, and your core beliefs are fractured, might as well be the end of the word, or for the devil to exist.

Having a special fondness for the programming language Perl, which I use for most of my coding (as a job requirement) I grew fond of it over the years, through it's wonderful unpredictability and sometimes weirdness, there is a powerful open source community backing it, and the general easiness of using the scripting language versus general purpose languages, I was caught by a surprise running into a pure existence of devil the other day. A code snapshot, to better prove the point:

use strict;
use warnings;

my $var1 = '';
my $var2 = '';

$var1 = (1 == 1)
        ? "true"
        : "false";

(1 == 1)
        ? $var2 = "true"
        : $var2 = "false";

print "var1 $var1\n";
print "var2 $var2\n";

Can you guess the value of $var2?
The value is false, this is the proof that Perl is evil, and human race should avoid it. This is the prove that the condition when logic stops working and devil exists, consuming your reality and beliefs.

Saturday, July 30, 2011

Servers in the fog

Server in the fog...
{Imported from my post in Vstretch blog}

Cloud computing is the direction most successful software firms are heading today, it is the future of technology, when instead of buying servers and hardware, one day enterprise clients will have the tools to utilize all their tools through an Internet browser. Browser being the window to the enterprise cloud offered by so many companies today.. Amazon, Microsoft offer hosting your files, your documents remotely on their clouds. Companies giving access to their programs and your personal directories, like mail archives, server backups in the remote clouds on the other side of the country.. The tendency is that the hard disk sizes on the computers sold in few years will not increase, and that the external hard drives sales will decrease in the years to come, letting the way to the cloud. Like these days Ipad2 is advertised as fashion accessory in glossy magazines, one would foresee Amazon file hosting as the next "Hot thing of the season" in Vogue September  2014 issue.

Cloud is the new buzz word, the sexy term everybody is using... Recently I worked on a project of transferring files from backups from one cloud, through multiple filters breaking the file into into chucks for simultaneous streaming through the second cloud to finally transferred to a third cloud. As crazy as it sounds it is no much different than working on multiple physical servers in one room, but instead of local IP addresses using IP gateways to the Great Cloud. With all its adverseness and modernity, cloud has some disadvantages. The downside is when poetically speaking the clouds disappear in the fog, in more technical terms, the trouble comes whenever your Internet connection is drifting. Because of the weather, or overload, or your Internet provider failing to supply decent service, the Internet goes down.. and so does all your information... That did sound a bit too pessimistic, your information is still on the remote cloud, behind the lakes and the mountains, just the fog and the distance do not allow you to see it. 

More people will start using better Internet connection packages both in the US and worldwide, and mobile coverage with data plans will improve allowing to tether and use your wifi connections with the phone. Since the beginning days of the operating systems such as Windows, there have been ill-wishers, hackers, and with the rise of the Internet the interest in the information theft has only increased. More minds are committed into finding efficient ways to find your social security number, credit card number and bank account number being transferred over the network, by click of the wrong button, and submission to wrong URL. This will rise with the cloud obsession.

With one of the most reliable companies in the world Sony PlayStation network being hacked and unrecoverable for over next two months, this is the time to deeply analyze which clouds you are going to trust. There is no guarantee, whatsoever that this information, your privacy on Google or Facebook will not be once in the hands of those ill-wishers, but before submitting all your information to some anonymous cloud, before shopping for the best price it is the time to carefully consider how much do you trust the website you are about to share some personal details with, and how much do you believe in the security of that cloud, that it will not soon be hacked and your life stolen.

Not to sound paranoid with the technological advancements, we all are target of attacks, and research (note Google is not always synonymous for the world research) is the key of finding the trustworthiness of your connection medium, of your cloud and of your fog.

Tuesday, May 24, 2011

Recursion in the real life

{Imported from my post in Vstretch blog}

Recursion is one of the most interesting concepts I have found in the software development, when a function calls itself in order to efficiently reach a solution. Most of the models used in the science and technology are based on the real-world entities at the first place, neural networks, artificial intelligence.. For many years now I had the thought of finding the analogy of the recursion in reality.

There are many aspects that are recursive, although your first tough usually doesn't land on those, like the parallel mirror positioned ideally so that one reflects the reflection of the other and the other one the reflection of the other one... But there are two problems with this instance, first that wherever you position the camera (viewpoint) it won't be reflecting the reflection of one mirror into the other, since it is going to be pointed onto one of the mirrors at a time. Second problem is that in the actuality there is no such thing as ideally positioned mirrors, likewise there is no such a thing as parallel lines.

Lizards - by M. C. Escher (one of the most recursive painting known)
As a kid I was amazed when on tv, the cartoon actors where watching TV. I would guess that those could be watching another cartoon on their TV, why not? That's like a wander to a kid -- recursive cartoon!

The best instance of recursion for me has been for a long time and to this day.. dreaming... Have you ever had a dream in your dream?
Think about it, and before you ever heard of  the movie Inception, but when you are dreaming inside your dream, which is the serious second level dreaming. But who restricts you to have another dream when you are dreaming in your dream? With enough imagination that is very possible and achievable.

What's your instance of real-world recursion?

Monday, May 16, 2011

Programmers vs Non-Programmers

{Imported from my post in Vstretch blog}

Buzz words, like: business logic, analytics diagrams, project estimation, cloud computing.. are ones that business people build their career on, managers try to use in most of the applicable and not so much circumstances and programmers try to run as far and hide.. Hide when possible to avoid being trapped into committing to finalization of development phase within certain period of time. Programmers do realize that estimating far ahead of time, committing to the project, that relies on other code you have never seen before is a trap.

All the hot-shot "young" programmers believe that given some time, they would re-implement the buggy modules given, rather than spend tedious hours debugging and trying to make sense of project components, that your managers have bought the sales pitch for. With years of programming comes wisdom, and with wisdom comes realization that you will never be able to sell your top-notch perfect solution that you enjoyed every second developing... Your so-perfect solution with never be able to compete with competitors solutions, since with the really ugly interface and much more uglier back-end they were able to bind a couple of open source projects together, reuse some other components, and within fraction of your development and deployment time, and fraction of the man-hours spent on the project release their solution to the market with the fraction of your price.

Relatively early in my career, Graduate Student Research Assistant was my title. Given freedom to choose what project I want to work on, what results I was pursuing, it seemed I had all the time in the world to convert my dreams into C# lines of code. Armed with resources as time, caffeine and Internet, and thrown into the dark woods of exploring the great and grand world of Artificial Intelligence. Overwhelmed with all the possibilities, I worked on the interface for displaying the algorithms for five months, writing polished and re-usable code, and re-thinking every detail of the project. Needless to say, I never quite finalized the project, although parts and pieces of it were perfection, the time came to move to a "real" job, where everything is much better structured, and my dream project was left unfinished.

Looking back, and analyzing the value of the re-usable and clean code I used to cherish so dearly, I conclude - the experience was a great exercise, and made great "code sample" asked at some interviews. However what counts is, that nobody ever re-used a single module from that code, and the project was left undone. Comparing this with the model of successful small to medium scale software companies, comes the realization of fact that marketing folks [that announce worldwide about non-existence features of your product], sales folks [that hide the truth from your customers about pricing going up], support [that tell your customers that feature they requested will be soon added, although from engineering perspective it is near-impossible], project management [that forces developers like yourself to commit to deadline, which seems unrealistic], are so very important for the success of your company, for generating the revenue and keeping you employed.

They will never understand the pure joy of writing beautiful code, the importance of scientific discoveries you are about to make, but this collaboration, often disagreements and compromised between engineering and non-technical stuff is what keeps your product revenue and sales high, and keeps the balance ensuring all the effort is utilized optimally.

Wednesday, May 11, 2011

We speak so many languages... and not only programming languages

{Imported from my post at Vstrech blog}

Hello World, I am a Note
For those of us addicted to Facebook already know, few months back they expended the profile options for adding more personal data, such as interests - movies, books [all displayed with thumbnails] and languages. And for those of us - the geeks, the options are restrictive and do not allow listing our beloved programming languages as spoken on Facebook?

When measuring if somebody can really speak the given language the person is usually asked a series of questions, like how would you say "Hello", "How are you", "I love you", "Bye" in the langauge. To prove the point I can say the prase you chose in many programming languages, going with a sample phase this is the list of my non-listed spoken lanuages, enjoy:) 

#include <stdio.h>
#include <stdlib.h>
int main(void) {
    printf("Hello World, I am a Note\n");
    return EXIT_SUCCESS;

#include <iostream>
int main() {
   std::cout << "Hello World, I am a Note" << std::endl;
   return 0;

class Hello {
  static void Main() {
     System.Console.WriteLine("Hello World, I am a Note");   }

public class Hello {
    public static void main(String []args) {
      System.out.println("Hello World, I am a Note");

 document.writeln("Hello World, I am a Note");

Perl / Python
print 'Hello World, I am a Note';

puts 'Hello World, I am a Note';

echo "Hello World, I am a Note"


I wouldn't mind the distiction of natural versus artificial languages, and prevension of fake languages being listed as spoke, but if one can add "alian" to the list, there should be option to at least add Lisp to the same list.