Sunday, August 1, 2010

Being Numero Uno!

Half a decade into the technology industry, primarily software development, and post working on varied nature projects, with some of the most diligent and unswerving programmers I ever came across, this intends to be a succinct summary of what in essence could assist in being the numero uno in the surroundings we live in. Even though some slices of this post relates to the Information Technology landscape, this could easily map to any other industry or sector you recognize.

Irrespective of the organizations I worked for, there always were few elite professionals that stood apart right from the inception. It was surprising to observe that they just excelled at a quantum pace while all others seem to have had trouble placing their foot in place. There were some common characteristics that could be discovered from their conduct and their supremacy in their relevant world.

Listed below are some of the base (deriving from my programming background in OOPS) characteristics that I came across which might propel you to the right track of being the chosen one (the Matrix effect):

  • Professionally yours: If you are one of the types who choose to dabble into the tasks assigned, you will wind up with a dabbled life. There'll be no satisfaction in it because there will be no real production you can be proud of. Society does not emphasize the importance of professionalism, so people tend to believe that amateur work is normal. Even businesses accept sub-standard results, but that shouldn’t ever be consumed as an excuse for being unprofessional in whatever you do. Our professional careers are a long and the most significant journey of our lives. Think twice before compromising on the output you contribute, the impact could be everlasting!

  • Evaluate feasibility not possibility: A common behavior exhibited by most software developers is to jump straight into the problem domain and declare or decide on its possibility. The elite are seldom concerned about the possibility of the solutions. Their seasoned experience and confidence allows them to leverage that advantage. What sets them apart is the ability to peek into the future and evaluate the scenarios that may curtail future existence of the business domain they are working in and contributing to. A practice that every software developer must inculcate is to consider himself/herself as a consultant and not an ordinary employee of an organization. Irrespective of the role you play, expand your horizon by placing yourself as a consultant to the client, the results would mostly be positive and obvious.

  • Context switching abilities: No matter where you work, and irrespective of the size of the team and the environment you are in, the key to understanding and infusing trust and confidence among fellow developer colleagues is to put yourself into their shoes before even distantly deciding to criticize their actions or doings. Very few amongst us have this unique and most wanted characteristic of being able to switch contexts and place ourselves in other’s place before deciding on issues relating to them. Conveying a mistake is way dissimilar than blaming it upon and most of the elite people I come across had a chiseled way of conveying the mistakes I kept constructing and it was more of learning than embarrassment.

  • Passion is the key: Long term success or real success is hard to achieve than short term or virtual success. And there is a very simple and almost overlooked reason for that. There are difficult times in the journey to real success when you feel like you are working for nothing, that you don’t get anything in return for all your effort. In such difficult times, only passion can keep you moving forward! The beauty of being passionate about the things you do is that it will show up in your work without you having to put that extra tiring effort.

  • Clearly defined goals: A pre-requisite to success and an omnipresent quality in the elite group of people, clear goals ensure and increase the chances to succeed by manifolds. Its importance can never be over-emphasized. While most of us compromise for short term goals, it is surprising to note that the top-notch pros compromise and adjust keeping in view the primary long term ones.

All of us have an innate desire to succeed and lead the space we exist in, either professionally or personally and the list above could well contribute in focusing on the more relevant spheres leading to our relevant destinations.

The motivation for this post came from a very small and surprisingly truthful and influential quote I read on success, which for me, answered approximately 90% of the questions I had left unanswered to myself:

“deserve before you desire!”

Saturday, July 17, 2010

Theme Up!

With the dawn of the last decade, user-centered design and end-user customization of literally every fragment of an application (web, client or phone) has taken a quantum leap. It has virtually become quintessential to have multiple ways of allowing end users to customize their experience with the software. With the advent of graphics cards and graphics accelerated hardware, pixels literally lit up, giving a whole new dimension to user experience and enabling creation of stunning user interfaces.
Abstraction, which is the dominantly prevailing concept, in every software methodology or framework today, impacted the design process as well, and what once was limited to selection of colors, got somewhat abstracted to selection of themes, even though the underlying idea was to only change the colors and at times, background graphics.
For business application (smart client or desktop) developers, the change was almost forced by popular applications like browsers, instant messaging tools and utility applications. It was amusing to note that even Antivirus applications themed their UI to better present their functionalities. The nail was hit by Microsoft’s Office suite v2007, when Office applications allowed users to select a theme for its UI.
Office 2007 themes
Once Office themed up, jinx, if any, that existed, preventing business apps from looking attractive was broken. It almost made it conventional for business applications to expose sleek interface that enabled innovative user experiences, irrespective of the type of application. Also, it enabled data entry applications to look far less tedious and cumbersome; a snap from them Dynamics CRM follows.
 Dynamics CRM data entry
The following is a list of some popular applications along with the associated resources to theme them. The list was never meant to be exhaustive, besides care has been exercised not to list untrusted sites to the extent possible.
Disclaimer: Users are informed to exercise caution before downloading third party extensions, themes and similar add-ons from untrusted sources.
  • Windows 7 – Prior to Windows 7, Microsoft didn’t provide an active support for themes to the earlier versions of Windows, primarily XP (and yes I almost forgot there was Vista too). The support was mostly commercial in nature from vendors, mostly Microsoft Partners. With Windows 7, a change in strategy implied better and newer themes for end-users thanks to the Themes gallery.
  • Visual Studio 2010 – Having a brand new code editor and huge chunks of it’s codebase in WPF enabled the extension developers of Visual Studio 2010 to incorporate themes into the most popular (I don’t care if you disagree) IDE of all times. Visual Studio color theme editor comes in with pre-defined themes and allows you to customize or create new themes.
  • Mozilla Firefox – The leading (again who cares if you disagree) open source browser incorporated and provided themes right from its early versions and an active community meant Firefox users never faced any scarcities in terms of themes. However, with Personas, a graduated project of Mozilla Labs, themes became lighter and somewhat better.
  • Twitter clients – The ever expanding universe of twitter clients is more of an amusing for me considering the fact that twitter is just slightly older than a toddler. Seesmic Desktop and MetroTwit surely standup for a mention with theme enabled sleek user interface.
  • Mobile Phone Themes: I regularly use themes from Zedge for my Nokia phone (5800 XpressMusic), and have found some certificate issues with the themes they list. Hence, exercise your judicious half before installing or even downloading any themes on your mobile phones.
  • WPF applications: As a WPF (Windows Presentation Foundation) developer, a good collection of themes is available from Codeplex.
  • Blogger themes: If you are like me and are overly uninterested by the default themes provided by blogger you may visit bTemplates for refreshing and mostly free blogger templates/themes.
  • Website themes: Looking for free website themes for general usage? Try OSWD.

The above mentioned are just some of the common popular apps that enable you to theme up the experience.

To conclude, I would like to mention some apps that I wish had themes, the sooner the better:

  • Internet Explorer – The most arrogant software ever sent to production tops my wish list for theme enabled apps. When the entire world embraced tabbed browsing, MS IE was arrogant enough to wait until v7 with undoubtedly the slowest implementation of tab switching. Continuing with its tradition, even now, with v8, it’s incapable of providing a simple downloads management snap-in. Microsoft has time and again ended up being complacent and literally handed over its market share to its competitors.
  • SQL Server Management Studio – Like every other Microsoft technology enthusiast, the legitimate next step with Management Studio seems to be a T-SQL IDE based on WPF and then following up with themes. Awaiting SQL Server 2012 may be (who knows?). There surely wouldn’t be Office 2013, so SQL Server 2013 seems unlikely too.

Please feel free to enlist any application that you use which already provides support for themes or should provide them at the earliest!

The list above only limits to the applications I use to ease out my work/good life.

Theme Up!

Sunday, June 27, 2010

Reacting to Exceptions

While preparing my slides for the Community Tech Days at Kolkata, I encountered a very interesting exceptional situation. Just to sync you up, I was evaluating Office 2010, specifically PowerPoint 2010. The very first slide had an effect exclusive to the 2010 version of PowerPoint. Just to check the compatibility I ran the slides on another system with PowerPoint 2007 version installed. To my amazement, the slides ran without any effects. No messages or warnings whatsoever! I went berserk (and FYI when I go berserk, that ends up into a new blog post).

The immediate question that spring up was: shouldn’t PowerPoint protest about missing effects? Should it just skip the problem-causing effect, and continue with the show (and prove itself to be robust) or at least caution the user about something that did go wrong at execution or runtime? This spawns up a simple yet important question for us developers: how should we react to exceptions that we don’t predominantly expect and when should we completely disregard them?

Missing effects in a PowerPoint show is surely not a consistent exception. In my personal view (and that’s what this blog is all about), the Office team has full rights to expect a v12 presentation to be opened with v12 of PowerPoint. When I ship an app’s v2 version and supposedly I have a custom document type registered with my application (say .vaibhav or .vaibhavx, to better match the document format trends), I surely would expect a v2 file to be opened by v2 of my app. If the user attempts to open my custom document with an earlier version, I would simply penalize the user for not using the most recent version of my app by throwing an exception, and maybe (I do this for fun) shutting the application. This, I believe is a common trail that most (if not all) of us take when determining on similar problems (saves time and heaps of code, trust me). But then, where exactly does app compatibility fit in?

Software is backwards or downwards compatible when it can work with input generated by an older version. If software designed for the new standard can receive, read, view or play older standards or formats, then the software is said to be backwards-compatible. Forward compatibility or upwards compatibility (sometimes confused with extensibility) is the ability of software to gracefully accept input intended for later versions of itself. The introduction of a forward compatible software technology implies that old software partly can understand data generated by new version of itself. A forward-compatible system is expected to "gracefully" handle input which is intended for a newer version, by ignoring the unknowns and selecting the known subset of the data that the system is capable of handling. Forward compatibility is harder to achieve than backward compatibility because a system needs to cope gracefully with an unknown future data format or requests for unknown future features.

The keyword above (for me at least) is graceful. But, should I leave the user in an indecisive status by removing the obtrusive exception messages? Will that tantamount to a tolerable UX (user experience)? Wouldn’t it be better if I could inform the user, what the problem was, and what its probable solution would (could) be?

How would you resolve a similar situation?

And in the meantime, let me continue to discipline my users with beautiful dialog boxes with subsequent calls to Application.Exit()

Happy Coding!

Saturday, June 5, 2010

Heard it somewhere!

The world it seems, is moving towards an age where an intellectual person will be judged based on the blog posts per week he writes, the tweets he generates (or regenerates) per day, the number of new jargons demystified or created by him per minute and the number of questions he answers per second on stackoverflow.com (think before you rule out the possibility of such a world in near future). To validate myself as a deserving citizen of that world (as and when it comes to existence), I went ahead to demystify certain words and phrases which the gigantic personas of technology in general (credit for the inspiration of this post should go to Erik Meijer, Anders Hejlsberg, Scott Hanselman, Scott Guthrie and so many more who couldn't be declared for genuine space constraints), often use without even considering the fact that some of their audience (read me and only me) have no idea of what that word or phrase corresponds to.
This is an attempt to collate certain phrases which most of us have heard numerous times but haven't essentially researched our way into understanding them comprehensively.
  • Domain Specific Language (DSL): It's a programming or specification language dedicated to a particular problem domain or a particular problem representation technique. The concept isn't new—special-purpose programming languages and all kinds of modeling/specification languages have always existed, but the term has become more popular due to the rise of domain-specific modeling. Examples of domain-specific languages include Logo for children, spreadsheet formulas and macros, SQL for relational database queries, YACC grammars for creating parsers, regular expressions for specifying lexers.
  • Mashup (Web application hybrid): In web development, a mashup is a web page or application that uses or combines data or functionality from two or many more external sources to create a new service. The term implies easy, fast integration, frequently using open APIs and data sources to produce enriching results that were not necessarily the original reason for producing the raw source data. In the past years, more and more web applications provide APIs that enable software developers to easily integrate data and functions instead of building it themselves. Mashups can be considered to have an active role in the evolution of social software and Web 2.0. The term mashup is also used to describe a remix of digital data.
  • Cloud computing: It is Internet-based computing, whereby shared resources, software and information are provided to computers and other devices on-demand. It is a paradigm shift following the shift from mainframe to client–server that preceded it in the early 1980s. Details are abstracted from the users who no longer have need of expertise in, or control over the technology infrastructure "in the cloud" that supports them. Cloud computing describes a new supplement, consumption and delivery model for IT services based on the Internet, and it typically involves the provision of dynamically scalable and often virtualized resources as a service over the Internet. It is a byproduct and consequence of the ease-of-access to remote computing sites provided by the Internet.
    The term "cloud" is used as a metaphor for the Internet, based on the cloud drawing used in the past to represent the telephone network, and later to depict the Internet in computer network diagrams as an abstraction of the underlying infrastructure it represents. Typical cloud computing providers deliver common business applications online which are accessed from another web service or software like a web browser, while the software and data are stored on servers.
  • Atom: It is an alternate XML format for easily sharing content, much like RSS Really Simple Syndication (format). Blogs for example, publish Atom feeds. Atom and RSS have very similar uses; the motivation behind Atom sprang from a desire to add improvements to the RSS specification. Apparently the keeper of the RSS specification froze the spec (declaring that RSS 2.0 would be the last version) and so the authors of Atom felt that a new format was necessary.
  • OAuth and OpenId: OAuth is a simple way to publish and interact with protected data. OAuth attempts to provide a standard way for developers to offer their services via an API without forcing their users to expose their passwords (and other credentials). OAuth is not an OpenID extension and at the specification level, shares only few things with OpenID – some common authors and the fact both are open specification in the realm of authentication and access control. If OAuth depended on OpenID, only OpenID services would be able to use it, and while OpenID is great, there are many applications where it is not suitable or desired. OAuth talks about getting users to grant access while OpenID talks about making sure the users are really who they say they are.
  • OData: The Open Data Protocol (OData) is a Web protocol for querying and updating data that provides a way to unlock your data and free it from silos that exist in applications today. OData does this by applying and building upon Web technologies such as HTTP, Atom Publishing Protocol (AtomPub) and JSON to provide access to information from a variety of applications, services, and stores. The protocol emerged from experiences implementing AtomPub clients and servers in a variety of products over the past several years.  OData is being used to expose and access information from a variety of sources including, but not limited to, relational databases, file systems, content management systems and traditional Web sites.
  • Mixin: In object-oriented programming languages, a mixin is a class that provides a certain functionality to be inherited by a subclass, while not meant for instantiation (the generation of objects of that class). Inheriting from a mixin is not a form of specialization but is rather a means of collecting functionality. A class may inherit most or all of its functionality from one or more mixins through multiple inheritance. Mixins encourage code reuse and avoid well-known pathologies associated with multiple inheritance. However, mixins introduce their own set of compromises. A mixin can also be viewed as an interface with implemented methods. When a class includes a mixin, the class implements the interface and includes, rather than inherits, all the mixin's attributes and methods. They become part of the class during compilation. Interestingly enough, mixins don't need to implement an interface. The advantage of implementing an interface is that instances of the class may be passed as parameters to methods requiring that interface. A mixin can defer definition and binding of methods until runtime, though attributes and instantiation parameters are still defined at compile time. This differs from the most widely-used approach, which originated in the programming language Simula, of defining all attributes, methods and initialization at compile time.
  • Monads: A monad is a construction that, given an underlying type system, embeds a corresponding type system (called the monadic type system) into it (that is, each monadic type acts as the underlying type). This monadic type system preserves all significant aspects of the underlying type system, while adding features particular to the monad. In functional programming, a monad is a kind of abstract data type used to represent computations (instead of data in the domain model). Monads allow the programmer to chain actions together to build a pipeline, in which each action is decorated with additional processing rules provided by the monad. Programs written in functional style can make use of monads to structure procedures that include sequenced operations, or to define arbitrary control flows (like handling concurrency, continuations, or exceptions). Formally, a monad is constructed by defining two operations (bind and return) and a type constructor M that must fulfill several properties to allow the correct composition of monadic functions (i.e. functions that use values from the monad as their arguments). The return operation takes a value from a plain type and puts it into a monadic container of type M. The bind operation performs the reverse process, extracting the original value from the container and passing it to the associated next function in the pipeline.
  • Type Safety: In computer science, type safety is the extent to which a programming language discourages or prevents type errors. A type error is erroneous or undesirable program behaviour caused by a discrepancy between differing data types. Type safety is sometimes alternatively considered to be a property of a computer program rather than the language in which that program is written; that is, some languages have type-safe facilities that can be circumvented by programmers who adopt practices that exhibit poor type safety. The formal type-theoretic definition of type safety is considerably stronger than what is understood by most programmers. Type enforcement can be static, catching potential errors at compile time, or dynamic, associating type information with values at run time and consulting them as needed to detect imminent errors, or a combination of both. Type safety is closely linked to memory safety, a restriction on the ability to copy arbitrary bit patterns from one memory location to another. For instance, in an implementation of a language that has some type t, such that some sequence of bits (of the appropriate length) does not represent a legitimate member of t, if that language allows data to be copied into a variable of type t, then it is not type-safe because such an operation might assign a non-t value to that variable. Conversely, if the language is type-unsafe to the extent of allowing an arbitrary integer to be used as a pointer, then it is clearly not memory-safe.
  • Immutable Objects: In object-oriented and functional programming, an immutable object is an object whose state cannot be modified after it is created. This is in contrast to a mutable object, which can be modified after it is created. An object can be either entirely immutable or some attributes in the object may be declared immutable; for example, using the const member data attribute in the C++ programming language. In some cases, an object is considered immutable even if some internally used attributes change but the object's state appears to be unchanging from an external point of view. For example, an object that uses memoization to cache the results of expensive computations could still be considered an immutable object. The initial state of an immutable object is usually set at its inception, but can also be set before actual use of the object. Immutable objects are often useful because some costly operations for copying and comparing can be omitted, simplifying the program code and speeding execution. However, making an object immutable is usually inappropriate if the object contains a large amount of changeable data. Because of this, many languages allow for both immutable and mutable objects.
  • Thread safety is a computer programming concept applicable in the context of multi-threaded programs. A piece of code is thread-safe if it functions correctly during simultaneous execution by multiple threads.
    Thread safety is a key challenge in multi-threaded programming. It was not a concern of most application programmers but since the late 1990s has become a commonplace issue. In a multi-threaded program, several threads execute simultaneously in a shared address space. Every thread has access to virtually all the memory of every other thread. Thus the flow of control and the sequence of accesses to data often have little relation to what would be reasonably expected by looking at the text of the program, violating the principle of least astonishment. Thread safety is a property aimed at minimizing surprising behavior by re-establishing some of the correspondences between the actual flow of control and the text of the program.
  • Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime. In many cases, this allows programmers to get more done in the same amount of time as they would take to write all the code manually, or it gives programs greater flexibility to efficiently handle new situations without recompilation.
    The language in which the metaprogram is written is called the metalanguage. The language of the programs that are manipulated is called the object language. The ability of a programming language to be its own metalanguage is called reflection or reflexivity.
    Reflection is a valuable language feature to facilitate metaprogramming. Having the programming language itself as a first-class data type (as in Lisp, Forth or Rebol) is also very useful. Generic programming invokes a metaprogramming facility within a language, in those languages supporting it.
    Metaprogramming usually works in one of two ways. The first way is to expose the internals of the run-time engine to the programming code through application programming interfaces (APIs). The second approach is dynamic execution of string expressions that contain programming commands. Thus, "programs can write programs". Although both approaches can be used in the same language, most languages tend to lean toward one or the other.
  • Lambda lifting or closure conversion is the process of eliminating free variables from local function definitions from a computer program. The elimination of free variables allows the compiler to hoist local definitions out of their surrounding contexts into a fixed set of top-level functions with an extra parameter replacing each local variable. By eliminating the need for run-time access-links, this may reduce the run-time cost of handling implicit scope. Many functional programming language implementations use lambda lifting during compilation.
    The term lambda lifting was first introduced by Thomas Johnsson around 1982.
As expressed, it was never my intent to demystify all the trendy concepts in technology and programming world. Thanks to the definite source of information, Wikipedia, for assisting in collating the above information.

Hope you find some of it (if not all) useful.

Thanks Mr. Reader for your time! Comments as always, are cherished and welcomed!

    Sunday, April 11, 2010

    Let’s Zune

    As a professional developer (don’t care if you disagree) one thing that has always stayed on my priority list is UX (User eXperience). UX is what makes an ordinary app stand out in the crowd and boost its adoption rate. There has been a sudden upsurge in the resources that are now being directed towards designing and developing effective UX.

    Media players have been there since forever (it almost seems so) and we all have our personal favorites. Our boxes come bundled up with something default which for some cynical reasons never suffices our hunger for the numero uno media experience. And there begins a never ending exploration for the most amazing media player. It’s surprising though, all that a media player (and I am directing my focus on music primarily) is supposed to do is yell out noise (dear music lover, no hard feelings intended), allow repeat, shuffle and essentially play a single song at a time (how many of you play multiple songs in parallel? Try it out, its fun!).

    Developers are always criticized for making simple things complex and that’s indeed true. Media players today have a fortune of features, 90% of which are unknown to lay end users while the remaining 10% of the end users are too busy comparing and contrasting these features with a rival player. With smart media devices rolling out, features like synchronization with the devices and amongst devices, cd ripping and burning from within the player have graduated to become the minimal set of features that a media player must expose to be even considered a decent enough option. When it comes to playing my songs I usually limit down to two players (again, a single player doesn’t simply suffice and I know not why), the primary being Windows Media Player 11 and the secondary being WinAmp, the modest media player for the masses. I stumbled upon Zune Software, the premiere media playing application for the PC primarily targeting Microsoft’s Zune player (aka the iPod killer). For more information about Zune MP3 Player visit here.

    The Zune software is what startled me and my curiosity grew when I read the tag line of the Zune software home page which declared: browse music, not spreadsheets. I like the concept and went ahead and decided to try it out. I might sound like the Indian TV news media, but it was AWESOME! AWESOME! AWESOME! (the words repeated directly correspond to propose the degree of awesomeness experienced). What follows is a quick overview of what looked to me as a really cool (again, I don’t know what this word means but it sounds geeky, so must over use it) media player and let me remind you, I don’t own a Zune MP3 Player and I don’t intend to rip music or buy music online. So I was totally concentrated on playing (offline) music that occupied very precious bits on my HDD.

    The Now Playing view impressed me a lot especially with the innovative UX that it proposed. Have a look at it:

    clip_image002

    This single view has colossal amount of functionality and the reason why I love it lies in its unobtrusive UX design. To quickly sync you up with my point, notice the red wave at the bottom center of the window; that’s the visualization, very elegantly forming the part of the player experience. That to me was the Aha! moment. Also notice the basic media player controls and the track bar alongside the play list, completely forming the part of the player but elegantly sidelined for the premiere music playing experience. The player background served the album art of most of the songs that were in my music library (a Windows 7 feature). Hope you notice the back arrow on the top left corner of the window that takes you to the wealth of features that the Zune software supports. Very elegant, more so, mashing up with the general Windows 7 UI experience.

    Next up was the mini view; I had experiences of the mini view(s) of many other media players but this looked cooler (yes, I am sounding biased, but you have to try it out yourself to believe me).

    LearningCenter_7_MiniPlayer

    There were two other major views that looked astounding to me and if you are like me and keep your music organized and updated, editing even the least used tags of the individual MP3 songs you would love what this software has in store for you.

    The collections view looked really simple to me, just displaying enough information as I would need and abstracting away the chores of it. Also, this window links you to all the major functionality of the software. Notice the sign in option that connects you to the world (literally).

     

    clip_image006

    The final screenshot I wanted to share was that of the edit screen which to say the least, lived up to my expectations:

     

    clip_image008

     

    This post was never intended to be a product review of Zune software, rather it just wanted to express the really innovative, unobtrusive UI design that seems to be taking the threshold now a days with consumer software.

    Leave out your comments (if any) about your experience with the Zune software or any other application that stood out from the rest.

    Must admit, the primary reason that made me inclined to try it out was the fact that it was a WPF application (that’s geeky, but then that’s what the developer in me is).

    Happy listening!

    Sunday, March 28, 2010

    Installing Life or Uninstalling it?

    But now I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth”.

    It’s astonishing to discover how many of us are existing without doing the most imperative thing in our life – living! Bizarre, but true, don’t know if anyone of you have observed it, but we (most of us, if not all) suddenly have become enclosed and to some extent aggrieved by the toxic environment encompassing us. And before you start dwelling into the Go Green initiatives, I must declare, this is not about carbon footprint, greenhouse gases or for that matter, earth hour! We are no longer happy (attempts to inherit virtual happiness have failed time and again).

    The global economic downturn certainly triggered and aggravated it, but to solely blame it and move on would be an under-observation, indisputably leading to a lethal mistake. A quick glance down memory lane would bring back what now has become the epitome of happiness. School and/or college days, once sloppily spent, have now become desperately desired. Most of us would agree, we all were passionate about our to-be jobs. Why are we then loosing what’s called life – the intrinsically simple phenomenon of enjoying atomic moments sans dependencies?

    At the time of inception, happiness, in general was supposed to encompass monetary capacity in general and fulfillment of passion, in particular. Most, if not all of us, have reached a point whereby the monetary fulfillment is somewhat achieved (before you start shouting no ways, ask yourself how much was the first paycheck that you got and how satisfied you were with that and what do you draw today), if not surpassed. What went missing was that flare, that passion which in the first place drew us to what we are into today.

    For you Mr. Reader who is still figuring out what this post is all about, let me decompile the above LIL (Life Intermediate Language) code for you. It’s about our (you are allowed to exclude yourself if you so consider) inadequacy to achieve something simple, something atomic – a sensation called happiness! Every other disremembered friend I encounter nowadays seems to have a problem (the dictionary meaning of which is a state of difficulty that needs to be resolved). And regardless of the gravity of his problem, he simply wishes to resolve it! The keyword here is wish (the dictionary defines it as an expression of some desire or inclination), and also consider that one is wishing for the problem to be resolved and not making earnest attempts to do the same. My intent here is to express the undeclared, catastrophic phenomenon that is taking away life as it exists in the purest acceptable form, from most of us.

    What follows might be considered a litmus check that attempts to compute whether you are missing life or living it.

    If you don’t find yourself reacting yes to most of the points below, then must say
    Houston! We have a problem!”


    1. Do you like your company? (Intellisense suggests like as find enjoyable or agreeable)
    2. Do you like to work with your immediate superior?
    3. Do you like the people adjacent to you?
    4. Do you like your day-to-day work?
    5. Do you have time for yourself at the end of the day?
    6. Do you spend adequate time with your family?
    7. Do you have a private domain to cater to? (no Intellisense for this)
    8. Do you think your current professional step would lead you to your esteemed destination?
    9. Do you consider yourself to be adequately skilled and improving on a routine basis towards your desired level of expertise?
    10. Do you believe in yourself and your aptitude to change the tide in your favor?

    Shout out your Yes scores in the comments section, would be prodigious to know!

    The programmer in me couldn’t resist myself from injecting some code (dependency injection?) into this post, so here we go.

    The LINQ query for the above resulting questions could look something like this:

    var query = from Moments in Life
    where LifeTime != Timespan.Future
    select Moments
    order by gravity descending; //vital criteria appears first
    query, in this case would be an IOrderedQueryable<Life> and not an IQueryable<Life> (I am just venturing into LINQ, so do bring out the compilation errors and/or warnings in the code above).

    Happy living and for that, Happy coding too!

    Sunday, March 14, 2010

    Awaiting .NET 4

    The .NET Framework version 4.0 is slated for release in April 2010 and everyone seems to be excited about it (everyone by definition includes everyone, so me too). Being the next big release of the framework, there exists number of enhancements and fusion of several new ways of writing old and new smart applications.
    I sat down searching for what’s in it for me, the conventional (it’s the most reputable word I could afford for myself, corollary to calling bugs as exceptions) .NET developer for whom writing .NET code is not only about developing cool new smart applications (hardly get to do it thanks to the huge number of legacy and combo apps we need to upgrade day-in day-out) but also write that enlightening code quickly and smartly.
    I have made an honest (as if honesty still exists?) attempt to compile what I felt was just so super cool changes to the framework or language in general. Let me #warn you not to expect the entire v4 enhancements from the lines that follow. That won’t ever happen (if I could do that MSDN would be hosted at my local desktop, right?).

    1. StringBuilder.Clear(): I was surprised to see this as an addition to the v4 version, as all this time I had expected this member function to be omnipresent in the StringBuilder class (going by the superior and smart design of the .NET framework). Just recently while using it for dynamic html generation (I was using VB9 and still didn’t use VB XML Literals for some bizarre reason, which is indeed classified), I found the absence of this method. The workaround was setting the Length property to 0 which would then clear the contents of the StringBuilder object.
    2. String.IsNullOrWhiteSpace(): As is eminent from the name of the method, it checks not only the Null or Empty content of the string object but also helps avoid the use of the Trim() method to make certain we don’t end up with a string of precious whitespaces. An authentic admittance though, I already had added my own extension method in my v3.5 extension methods repository that did verify the absence of both Null and Whitespaces before performing any further string operations and was aptly named String.HasValue(). I am indeed smart (I always knew this, but formally broadcasting it on this DateTime.Now).
    3. ServiceProcessInstaller.DelayedAutoStart: While developing Smart Client applications it is a very common requirement to register the application to launch on Windows startup. However, as is eminent, too many applications loading on startup will upsurge the boot time significantly deteriorating the end user experience. This feature comes to the rescue by delaying the start of the application until all other auto-start services have already started.
    4. SMTP Client enhancements: Some of the enhancements include enabling SSL mode in application configuration files, specifying heading encoding and most importantly, multiple replying to addresses through MailMessage.ReplyToList().
    5. Guid.TryParse(): The TryParse method has now been added to the Guid, Version and Enum types and behaves exactly as its counterparts in other types.
    6. 64Bit enhancements: Recognising the mainstream adoption of 64 bit systems the Environment class has been decorated with: Environment.Is64BitProcess and Environment.Is64BitOperatingSystem.
    7. IEnumerable<T> everywhere: New overloads of String.Concat() and String.Join() now support IEnumerable elements so that you don’t have to convert them to strings prior to performing Join or Concat operations on them. Also enhanced are several System.IO members like the new File.ReadLines() which returns an IEnumerable<String> rather than a string array. This in turn gives superior performance benefits as its always (read mostly) desirable to read a file one line at time rather than loading the entire content in memory as in File.ReadAllLines().
    8. Corrupted State Exceptions: How many times have I written the following?
    try{
    // Something that should fail, or else why did i incur this try cost, right?
    }
    catch(Exception ex)
    {
    // Never do anything here. Let them come back to me for fixes (guarantees job security)
    }
    In .NET 4.0, corrupted state exceptions will never be caught even if you specify a try… catch block. Even though this is a huge obstacle (a setback or even a crisis) on my attempts towards my job security, yet I welcome it as it encourages writing more stable (in theory) code. Before you start depreciating your intentions to upgrade to .NET 4 for this particular reason, there is a switch that allows you to get the old behavior back by setting the following attribute LegacyCorruptedStateExceptionsPolicy=true in the config file.
    This behavior can also be enabled on individual methods with the following attribute:
    [HandleProcessCorruptedStateExceptions]
    9. System.Data.OracleClient: Before you plunge into thinking why MS shelled it’s resources to enhance OracleClient, instead of their own franchise SQL Server, there is a surprise awaiting you. OracleClient is available in .NET 4 but marked as deprecated. Don’t believe me? No need to, just help yourself by visiting http://blogs.msdn.com/adonet/archive/2009/06/15/system-data-oracleclient-update.aspx .
    10. VB Auto Implemented Properties and C# Named and Optional Parameters: These are some of the language specific enhancements essentially following Microsoft’s strategy of co-evolving the two languages.
    VB now has auto implemented properties thereby reducing the amount of code generated significantly (I hated VB Dev Center for not introducing it in VB9).
    C# developers now stand equal by having named and optional parameters (which to me should have been there at least since v2 of the language).  

    The list above was never meant to be exhaustive, it does not even attempt to touch the Parallel computing extensions and dynamic (or functional) enhancements to the framework, but it surely addresses most of us, the conventional .NET developers, writing managed code that manages our company, our clients and primarily us!

    Happy Coding!