header image
 

DevOps Myths : Reinventing The Wheel

“Don’t reinvent the wheel” is one of the most common mantra one can hear around software developers today. It might only come second to “use the right tools for the right job”. While I agree more or less with the formal I’m way more sceptical of the first one. It is not like the statement does not hold any true and it definitely makes sense when put to context. Looking at the origin of the statement and how it came about, as to the best of my knowledge,  we can see the idea of reusable code in the form of general algorithmic routines, e.g. sorting. Such routines are often readily available as software libraries and every now and then a peer will remind you of the compete wasted time of trying to come with your own solution and that you should not try to reinvent the wheel. However, with just a bit of scrutiny on the validity of the statement to be generally true I quickly realized there is a big misconception surrounding it. Indeed when one consider an IT solution to be nothing more than moving data, transforming data, all together crunching numbers it might seem all you need is a wheel. Anyone with more than one shipped software product in the real life will tell that’s not entirely true and the reason being so: missing details. Then it struck me, what we deliver is not wheels but tires! If you agree so far the most natural question I would ask you next is: Why do we have so many different tires today, after all we need is wheel rolling around right?

Well… WRONG, unless you give me one design to fit all three cases in the picture below:

one_tire_fit_all_NO

While in the case of the left most image low requirements might fit almost any wheel, the cases for the image in the middle and right you must agree demand for deeper engineering thought and design. We still talking tires here, hardly the highest tech achievement of today! If the mantra in question is hardly holding true for wheels how misleading truly is for IT?

Why this blog is not on GAE SQL PHP

Just before the end of 2013 I decided to give Google App Engine (GAE) for PHP a try. Together with Google GAE SQL instances available, it seemed easy enough to setup. Yes it was. In fact I went further to configure multi-site WordPress feature, quite valuable for multi language support for your sites. This is going to be a short post, so what did backfire? The GAE SQL has no free quota, that is to be free under certain load, so just for the first few hours setup and play time (no data import) a 0.30usd charge. Of course that was not such a deal. What really made me reconsider was the SQL instance spikes per 24h. Every 30min or so by downtime were followed by a 30min load spikes. AND YOU PAY for it. After 48 hours I had accumulated almost 2 USD on my account. Consider it running for a month and comparing to my current hosting plan of about ~6EUR per month and it is a no-brainer.

As it currently stays, GAE SQL seems quite a hefty price to pay for very small sites and casual blogs. Otherwise happy to report it was quite seamless experience.

 

Windows 9 Blue (PREVIEW)

First Look at Windows 9 (Blue)

Windows Blue

Microsoft has finally released a preview of its highly anticipated yet windows 9, code name Blue. As you can see from the screen-shot above, fully deserving it’s name :D

Yes, this is a joke! All the rumours of Windows 9 were short lived (delayed till late 2014 at best) , now that Microsoft had officially announced Windows 8.1 and 8.2  to be the next breed of the long line of Redmonds’ winsss.

 

Now seriously how about Windows 8

Is it a flop or is it just a slugger and does it really matter? FI

 First of all, it might be still too soon to claim whether Windows 8 has flopped. So far all numbers, which mostly come from Microsoft themselves, are pointing to very sluggish Desktop adoption of Win8 both on personal and enterprise PCs. On the mobile front, however, it is clear by now to both Nokia&M$ that win8 mobile has failed to gain any traction, regardless of the good hardware review of Nokia Lumia etc.

Still, Microsoft recent history of getting it almost right any other time might repeat itself and all we need is to wait for Windows 9 or 8.1 , 8.2 ???

The Big Elephant In the Room

The Big Elephant in the room hardly anyone talks about, is the fact M$ are closing their ecosystem and apparently shifting from OPEN to CLOSE. What becomes apparent with each passing year is how much really the Redmon’s crew (or at least the higher  management) want to be like Apple, but and that’s a BIG BUT, without any of the innovation. Thats is, they would like to take ~30% royalties off developers… for …. WHAT? Is it for the overhyped, by Microsoft alone, Metro UI. Left alone, whether it is a genuine Microsoft innovation or NOT, it seems not compelling enough reason for most people to consider switching from win7 to win8. Under such circumstances, it stroke me by surprise the lack of FREE available Win8 for DEVELOPERS ONLY.  It seem such copies were exclusively distributed  on MS tech events and only at the very beginning.  Or maybe ,they finally had figured it out, it is about : users, users, users and not developers, developers, developers.

 

My personal experience so far

It can be briefly summarized as confusing and dull. I consider myself  advanced user, having worked with all major OSs, yet I was struggling big time getting familiar with the band new win UX (Metro UI). Similar to many others, first and foremost frustration was the lack of start menu, with some indication of START button coming back. It took me 2 weeks to find out where exactly is my shutdown button. ‘Settings’, is the last place on Earth I expected it to find. Even more, it took me quite a while to get a hold on how exactly all sliding panels are getting invoked. For one think the lack of sticky edge/area makes sudden abrupt pop-ups a daily annoyance.

Although I wouldn’t go to the extend of the viral Windows 8 Under The Influence video, I must admin to the very EMPTY feel, which WinRT apps give. Ahhh all that waste of UI space.

The one Metro/WinRT app to summarize a lot about my win8 experience is none other but the recently acquired new toy in the arsenal of Microsoft, the infamous Skype.

  • Skype in full screen #@$%????

Here it comes: Hellloooo? Skype in full screen.!? An app that is primarily used as a chat program with contact list for calling! you make that a full screen on 24″+ screen and regardless of how many and big tiles my contacts are showing like, it still remains a huge waste rather than be slick and minimalistic.

  • Running 2 Skype Instances

That’s simply the culmination of retardness you can find in Win8 design. Application live double life. One can easily download in a few clicks a WinRT Skype. In my case, after a few seconds of shock and dismay I jumped on trying to install Skype for Win7. So far so good, it run and install perfect, after all it is just Windows7 in new clothes ;) Only then, did I realize the dual parallel co-existing of 2 Skype Instances running at the same time. The WinRT, which I had little success trying to kill it since it is not visible in standard task manager, was keep ringing while I’ve already picked a call on the classical desktop Skype client! Something, Skype is designed to prevent, being a single instance app.

 

 

What Microsoft should have done

It is not in my position to give advice on how … neither I enjoy to do so, but ….. this one comment from a post really stuck with me:

Have win8 and winRT as two distinct brands.

I’m great opponent of 1-fit-all models. What we observe is exactly the type of short sightedness in regard to user experience. The Desktop is not dead! Simply there is too much hype and hysteria around mobiles those days. You know, the cool new kid on the block. However, as far productivity goes, nothing beats a big screen with agronomic set of mouse and keyboard.  It might be because I’m getting old, or simply the lack of killer apps on mobile, but I see no way in hell I can start doing my job on anything but good old PC. Having Windows8 as just the next Windows7 is what many of us expected. On the other side, all hipsters could enjoy WinRT, a whole different experience with touch screen in mind.

 

Conclusions

If I dig not that deep into my imagination and look into the crystal ball it shows Windows7, becoming the new WinXP. Giving hard times to Microsoft when systematically try to deprecate it and any future support along along with it!

WOW Where my free space at?

… to be Continued … a quest for space and more….

UPDATE (23/10/2013)

I’ve just stumbled on a very recent article discussing Win8 IDLE battery life.  Why does Windows have terrible battery life. It is very relevant to the topic of how really suited Win8 is for mobile and tablet use.

 

 

Why XML?

Preface

Well… XML has been around for quite a while, since 1998 to be precise. Yet, I still find quite a few folks in the soft. industry to not getting it. Why XML? What really made it such a revolution for the web we still relish till today. One comment I’ve heard recently made it over the top: “Let’s do it XML, because it is easy for the computer to parse”. Now, XML is possibly the single worst format for a computer to parse. FKS comma separated file is even more efficient. In case an efficiency of data format is the most sought for feature, nothing beats the binary. However, it also lacks any structure, and is commonly referred to as BLOB. Usually a description to the data, a.k.a. metadata, is maintained in the form of format header with fixed size and format in the header, or maybe footer, of the file/BLOB. Where the format of the header you can usually find from some documentation.

So far this is all common knowledge, all well known. XML is descriptive language and we can easily format structured data, keeping both data and metadata tight together. However, this alone is only part of what makes XML so great. To summarize, the reasons for a developer to consider XML goes as follow:

  • open standard specification
  • structured data
  • the XML stack (XML, XSD, XSLT)

The real power about XML comes from the third bullet point. That is the XML stack, or more precisely XML and the two other technologies, the schema definition language XSD and the XML transformation language XSLT. Unless, you are planning on using XML with any/both of the other two you might as well be much better using JSON. For being more efficient, less verbose, serving nicely the need of structured data alone.

The XML Stack

The XSD schema language is where one can describe a particular format for an XML file for his/her application. The benefit being that you can validate any XML against the XSD schema usually with one line of code. That feature alone makes classic SOAP Web Services still common today where any consumer of the service can validate its input data. However, combined that with the possibility to transform, that is to change the format of any XML from one to another, using XSLT and you end up with quite powerful stack.

The fact XML is standardized and it’s been around for more than a decade, gone through several revisions, makes it mature and quite well adopted. There are stable libs available for almost any platform you can think of.

Good Intermediate Format

Have you realised the power of the full XML stack, you can easily see that it helps you create CORRECT solutions to a common scenario. The scenario being: data shuffling and mapping. Which often encompass the bulk of most IT solutions out there.

It is easy to derive domain specific dialect. Making it, extremely easy to create open specifications. The most infamous example I can think of is HTML. Surprisingly many people are not aware that HTML is nothing more than specialized XML.

Although, the XML stack helps derive a correct solution, not necessary it is an efficient one.

Optimizing XML

One of the most common drawback of using XML boils down to the following points:

  • too verbose
  • size overhead
  • XSLTs are hard
  • XSDs are limited

I will cover only bullet point 2, size overhead. Since the rest I consider more or less, it is what it is, leave it or live with it. Still, the size overhead mostly has to do with the verbose expressions in XML.

There are plenty of things one can do to keep the size of XML to reasonable size. Starting from least intrusive, switching compression on HTTP transport level, to more intrusive like creating a lookup table of tags. Let me elaborate a bit more on the second option. The idea is to have on both end of communication, the same lookup table which maps verbose to HEX , and vice versa. Most cases will require less than 256 big dictionaries of tags, thus the 1byte size will suffice, in the range 00 – FF.

Keep in mind. I’ve not seen this second approach to mitigate hefty XML sizes, neither I’ve attempted myself doing so. I guess first approach is easy and good enough.

Structured Binary Data

In case performance is not mission critical and interoperability of binary data is of any concern, there is the public BSON binary format. Short for binary JSON. It is lightweight, traversable and efficient. http://bsonspec.org/

Another alternative is Google’s Protocl Buffers, http://code.google.com/p/protobuf/

Conclusions

To wrap it up, here is the moral of the story. Formatting the data is as important, if not even more, as the data itself. I’ve seen over and over again where developers makes the decision quickly on the fly. Often the wrong one!

Skype Virus Swipe Through Eastern Europe

In the past 2 weeks a huge wave of windows infection was observed on the Skype network. Mostly in the eastern Europe, Ukraine, Russia, Romania, … including Bulgaria.

It starts with a friendly message from someone from you contacts list, asking you to check out a photo of his/hers.

Here is a zip file of the file in question. MG0540250-JPG.scr

https://www.box.com/s/bapf8d0cy9qsm0wafehk

A Tribute to Aaron Swartz

[blog][twitter][latest@boingboing.net]

Aaron Swartz, at the age of my brother, found hanged to dead in his own NY apartment.

Only 26 and he had already accomplished more than any of us could do in a lifetime. His impact is remarkable of both his technical skills and the way he utilized his gift to steer a wider social impact through technology. See @wikipedia.

After a case like that there are way more questions than clear answers. Was his soon to come court appeal, the nasty prosecutor or the severe depression alone that he had openly admitted about? What really drove him to do it? Regardless of his reasons WE all ought a small tribute in his memory. PLEASE share a paper, book or anything you deem significant to spread wild!

Here is my humble contribution:

 The Art of Electronics 2nd ed. Horowitz and Hill pdf

https://dl.dropbox.com/u/13368335/The%20Art%20of%20Electronics%202nd%20ed.%20Horowitz%20and%20Hill.pdf

Tribute By Sharing PDF

See the on-going campaign to share a pdf for free download in his name. @storify.com

 Follow the Campaign on Twitter

#PDFtribute: https://twitter.com/search?q=%23aaronswartz

 Aftermath

It seems Mr Obama has granted Zwartz’s Wish, see here. (All Publicly Funded Research in US becomes FREE) Indeed some good news. Of course ‘publicly funded’ is debatable. Most serious research always involves both academia and industry. Who and How will draw the boundary still remains open IMHO.