jay's old blog

this blog will be deleted soon - please visit my new blog - https://thesanguinetechtrainer.com

2016 to 2017 - of setbacks and successes



As 2016 draws to its timely end, I felt compelled to blog about what a fantastic year it was. For me, this year was the end of an important phase of my life. A phase that started when I told a boss of mine in 2012 that I am finally ready to reign in complete control of my professional and personal life, and that means, taking some drastic stuff. Then, against almost everybody's wishes (parents, friends, female acquaintances, co-workers, neighbors, landlords, shopkeepers, housemaids, drivers, that guy at the supermaket and not to forget that super hot HR who took the exit interview and got an earful about how the entire system is rigged against performance), I decided to carve my own style of profession and a way to earn money to pay my bills.

The story from 2012 from 2016 will probably come out in an autobiographical book some day, but for now, I know that I have had an interesting life. Not an entirely happy life but an interesting life for sure. I have so many odd experiences, I could sit and write about it for 1000 pages and still have something left to write another 1000 page. I dont know how many can claim to have hundreds of interesting stories to tell, but i sure can.

All in all, what started in 2012 reached a mostly happy ending this year, and that is why, I have hope. Hope that if you persist enough, perhaps it is possible to do what one sets out to do. Hope that sometimes, the only investment you need to have is an unshakable conviction that if you sacrifice (and compromise enough), stuff can happen. For the last 4 years, a lot of folks have helped me out but five individuals come to my mind, and this is my thank you to them.

  • my mom, well, for all that is good and great about my life.
  • my professor mentor who I met almost 10 years ago. Thanks to him, for the green.
  • my tech mentor who I met almost 4 years ago. Thanks to him, for the tech.
  • my friend who I met almost 10 years ago. Thanks to her for the green and food.
  • my friend who I met 5 years ago. Thanks to him, for the green and food.

As the year 2017 rolls into my view, I am filled with optimism and hope. Of course, as one ages (I am well past my youthful days now, and perhaps already missed my wedding date in the one way street that is life), one gets hit by a healthy dose of reality check almost everyday.

Still though, like the good people in middle earth say, there is always hope.

Follow me on twitter, facebook and instagram for more updates. Thanks!

Weeds - Season 1 - interesting insight into the weed culture



The thing about sitcoms is that, they are sitcoms. They have to follow a template, whether they like to or not. you take a bunch of the usual bunch of characters (the funny guy, the teens, the old people, the married, the slacker and so on and so forth) and put them in a situation. If the situation is good enough, and you can plan stories that can give rise to some funny scenarios, you have a television series.

Weeds does the usual sitcom stuff, and the situation (premise) is like this. The Botwin family was doing good. Nice father, nice mother, two kids, and respectable neighborhood and all that. Then, Mr. Botwin dies and now it is up to the mother to take care of the family expenses. Most people would probably have some kind of retirement or financial planning in place. It is not revealed as to why, the Botwin family has become so desperate for money. Also, why Mr. Botwin never saved some is also not clear. It is also not clear why Mrs. Botwin wont cut down some expenses (she still wants to drive around her expensive car, expensive maid and have all the usual expensive stuff) and of course, find employment. What is clear is that, she is hell bent on maintaining her cushy lifestyle despite the changes in the economic scenario and she becomes a drug dealer.

That is where the narrative starts and usual stuff happens. The drug dealing business takes its toll on her because she is forced to it hide it from everybody. Of course, its like the cat closing its eyes when drinking milk. She is not earning a paycheck and the gossipy neighbors probably know that the family does not have anything in terms of savings. One by one, everybody figures out that she is, well, a drug dealer. In fact, I am surprised that she still thinks that nobody knows what she is doing. A one day 'following her around' will reveal what she does for a living.

Still though, she keeps persisting in her trade. Each episode finds her facing some new challenge, and she somehow overcomes them. Some of them are drug dealing related. Others are issues that all parents face, like her children getting into trouble. Her younger kid is trouble maker because that is the stereotyping. Her older is a teen, so its always about sex and drugs. Of course, there need's to be men in her life so we have the slacker brother in law, the obvious love interests and so on and so forth. The season does try to touch upon her missing her hubby, but it seems half baked. She also try to start a business front, but over all, it looks like almost everything is beyond her grasp but she persists anyway.

As the season reaches its conclusion, it does look like she is taking a level up in her business management skills. As a character, all I see is someone who is digging deeper and deeper into the black hole.

The show itself seems to be some kind of a social commentary (all sitcoms are) about how some folks cannot come to terms with changing situations. Clearly, the Botwin family could have done something else. The children could be more understanding for instance. The mother could figure something out as well. Instead, she is decidedly against working too hard for anything and embarking on a lifestyle that might just turn things bad, today or tomorrow. In the short term, she might be doing stuff to make things right for her children but in the long run, things might just blow up in her face.

Some of the characters are outright annoying, like the younger kid and the slacker brother in law. Other characters are okay, although the limited run time and limited episode count does not allow for much time to be spent on anyone other than the lead character. The show can be funny at times, but it is more drama. It's not a deep drama either. Perhaps, it is deep and I haven't been able dig below the surface. I doubt if I will re-watch the season again but I don't mind finding out what will happen to Mrs. Botwin in the season 2.

Follow me on twitter, facebook and instagram for more updates. Thanks!

Detective Byomkesh Bakshy - a wasted opportunity


The thing about detectives is that, they represent a odd profession with few rewards (Very rarely do we come across wealthy private investigators, although, these folks seem to play above such things as money) and obviously, very fictional representation of what actual investigators do. Yet, there is such an excitement when one notices that a detective of Indian origin is popular enough to warrant a proper adaptation with a decent cast and all that.

I am a huge fan of detective fiction. I have read all the stories of Sherlock Holmes, multiple times. All the works of Raymond Chandler and in general watch a lot of detective television show. Obviously, Bakshy is not going to match up to such high levels but there is always some fun to be had in everything. I gave the movie 10 minutes to see if some plot kicks in. Then, I gave it another 10 minutes, and then at the 30 minute mark, I just gave up. The movie gets only one thing right, and that would be the set design which mimics the time period it is set in. Otherwise, the whole thing is a dull affair.

Now, I dont know if the source material was already slow paced to start with. If so, perhaps the issue is not the adaptation. Yet, there are some liberties that need to be taken when a story is adapted and slow pacing is something that needs to be avoided. I have no complaints against the lead actor either, but, the character of bakshy itself is not well represented. Any movie that is introducing a character, especially a detective character has to do a sharp introduction.

Detectives need to be snarky, and be totally dickish to those around them. Perhaps they do it because think (and usually they are) they are smarter than most. Perhaps it comes with the territory because most people think that private investigators are folks with a camera that take dirty pictures. Then, there is the morality factor. Detectives bend rules, and they dont have a choice. They dont strictly follow the law but they dont break it outright either. They need to be sharp but also resourceful and have super cool friends. More importantly, this impression needs to be pre-established or established at the outset.

The movie seems to be building up to that, and then, nothing really happens. Our protaganist gets slapped in his supposedly character establishing moment. I just could not identify a detective character with that. Then, in the next 30 minutes, he lacks clarity and makes deductions which kids would do because many of us have something called common sense. So, no, the movie simply did not do anything to me. Heart breaking is the knowledge that the movie wont turn into a franchise. There is a lot of effort that has gone into making the movie. The music is there, the actors are there and the set design is just amazing!

Alas! some things are not meant to be.

Follow me on twitter, facebook and instagram for more updates. Thanks!

a game of solitaire OR klondike



One of the benefits of having a lot of free time is that it allows one to think and do stuff. Since I am officially suffering from farmers syndrome most of the time (especially these days), I need to come up with ways to pass time in a way that is useful to my mental faculties in the long run. One such 'way' I ran into or rather, rediscovered, is Klondike, more popularly known as Solitaire.

The game of Solitaire is known to most of us who grew up on windows computers. Microsoft has been packing Solitaire in one form or another in all their operating systems. Originally, they did this so people can get used to using the mouse (which was a big deal back then) but somehow, folks got used to playing Solitaire. I also played Solitaire, and I have begun to realize that the game is a lot more complicated than it appears. Then, it occurred to me that the game can actually be played in real life as well. So, I asked my dad to get me a pack of cards, and lo behold, I am now playing Solitaire, for reals with real playing cards.

Assembling a game of solitaire, is pretty straightforward. In short, here is how it works.

  1. shuffle the cards like a crazy person. I went days before I could actually shuffle and I seem to be getting good at it each day.
  2. Then, mark (in invisible areas in front of you) 12 rectangular places about the size of your card in front of you.
  3. On the top, mark 5 locations. One for the drawing stack, and the remaining for the stack that will start with the Aces card and go up from there.
  4. On the bottom, mark 7 locations.
  5. The cards will be laid out in the bottom 7 locations.
  6. First location, gets 1 card face up, and 0 card face down.
  7. Second location, gets 1 card face up, and 1 card face down.
  8. Third location, gets 1 card face up, and 2 cards face down.
  9. Fourth location, gets 1 card face up, and 3 cards face down.
  10. Fifth location, gets 1 card face up, and 4 cards face down.
  11. Sixth location, gets 1 card face up, and 5 cards face down.
  12. Seventh location, gets 1 card face up, and 6 cards face down.

The remaining cards go to the first location, from left, at the top. And then, using the standard rules of solitaire, you play.

For me, the game of solitaire has this unique feature, where in, you cannot always win. That means, for every 100 games you play, there is a good chance that you will lose. At the same time, there is a good chance that you will win as well. More importantly, when you lose, its impossible to say, did you lose because the game was unwinnable from the beginning or you made a wrong move, and hence turned a winnable game into a losing one?

That means, each time you draw, you are constantly wondering...are you making the wrong move? are you making the right move? Unlike in the PC, you dont have an UNDO button, at least not an unlimited UNDO button. Which means, each card that is moved becomes something of a puzzle.

On top of this, there is the fact that, in some cases, the game is unwinnable from the get go. Which means, no matter how thoughtful the moves are, eventually, you are destined to lose.

On so many levels, the simple game of solitaire questions what you do? Sometimes you lose not because you are bad. You lose because you are meant to lose and no amount of effort from your side can change that.

Just like real life, eh?

Follow me on twitter, facebook and instagram for more updates. Thanks!

Dangal - standard tropes play their tune



Perhaps the most surprising thing about this movie is how much less time aamir khan spends on the screen. Thanks to his larger screen presence, the spotlight will  be on him. i am thinking of movies such as Lagaan, that movie about Mangal Pandey, Ghajini. Of course, Dhoom 3 which was more about Aamir Khan than anything else. He sells tickets, so it makes sense that he is on the screen a lot, and he gets the best scenes, and best song locations, the best heroine...Hence, the reduced on screen presence in the movie is a good sign. That alone makes this movie better than almost any sports movie.

It is difficult not to think of Dhangal and not think of other sports movies, especially, Chak De India. In fact, they both deal with literally the exact same plot. A sport that is not appreciated. Women/Girls. A lead actor who has been de-glamorized. Patriotism. The ability to win despite limited facilities, encouragement, money and all that. I kept getting a sense of dejavu about this movie, if only because another movie doing almost the exact same thing had come decades prior.

For me, the ultimate sports movie would be the first Rocky Movie. it is not fair, but it is not possible for me not to compare the two sports movies - Chak De India and Dangal - and Rocky. They are both about winning against all odds. However, the circumstances are different. The odds that are stacked against them are different. For instance, when Rocky decides to fight, nobody tries to discourage him or make fun of him. if he is training, he gets to train in peace. It's his business and nobody else's. He does not have to worry about getting proper food, although he is as poor as it can get. He has no difficulty managing his love life along with his boxing goals because, it is something he can pursue without worrying about it. In the above two sports movies, what the girls are up to suddenly becomes everybody's business. Further, perhaps the biggest challenge for them is getting proper food to support their rigorous regime. Further, at the end, the movie says that the two sport stars have won more than a dozen medals. However, no mention is made if the economic fortunes of the family have improved. Where as in Rocky, he is doing alright. He is making big bucks and living a much better life.

Perhaps, that is the real commentary of these movies. Perhaps it is all about the economy. Perhaps it is about access to essentials and what is a priority. For a sports person in the developed nation, she/he is motivated because she/he, for reasons of his own, gets up does stuff. For a sports person in a developing nation, the motivation is perhaps derived because something is not allowed to happen but one has to rebel to get it.

The dark spot (and it is a larger share of the big circle) is that a lot of folks choose to fold when the going gets tough. The bright spot, at least some people dont fold. For that, I am thankful. Movies such as these are but commercialization of a social issue, but hey, if not for the movie, I would not have heard of this wrestling family. For that I am thankful.

Like they say in Lord of the Rings, there is always hope.

Follow me on twitter, facebook and instagram for more updates. Thanks!

explaining to mom what I do for a living


'Process and data modelling' image from wikimedia. link
Everybody has to do something for living. I of course, also do a lot of stuff for a living, and you can find more details here. Unlike other industries, the software industry is very...young! People have been building houses for centuries (civil engineering). Machines have been built in one form or other, again, for centuries. Same goes to chemistry and even medicine. Perhaps the most recent and relatively young industry would be automobile development, which is perhaps a couple of centuries old.

This creates a lot of problems, especially folks like me who not only write code but also design systems, propose solutions and keep on the edge of new stuff. When non-IT folk ask me what I do for a living, I can simply say 'software developer' (which is not entirely true because I do a lot more that just develop software) and get away with it. However, when old friends and mom asks that question, I cannot just say the same and get away with it. Such an incident happened recently, and suddenly, I was back in a class room and I was explaining software development using stuff that she would understand. Yes, I used cooking as an example. Come to think of it, cooking and coding are not that different. You are taking stuff that is in raw form, and giving it a shape that makes it easy for folks to consume.

After an hour, when i was done explaining, she seemed to get the gist of it. Perhaps, if I was only a 'basic developer' the explanation would have been simpler. I am anything but that, and that made way for complicated explanations. When it is not my mom, but my friends (who have education level similar to mine) things are easier but no less complicated because none of them are in IT. My small collection of friends (which keeps getting smaller every year) are business degree holders and although their paycheck comes from IT, they themselves dont know much about software development. Still though, they try.

Interestingly enough, I still remember like it was yesterday that my mom, despite her limited education is the one who taught me the 26 alphabets. She is the one who paid for my first computer, and she is (at that time) the only one who was happy I chose computer science (everybody else wanted me to take electronics). She was also the one who gave me the seed money (along with one major benefactor) when I decided to go all entrepreneur on my career. Heck, on many many occasions, she was the only one who stood by me, when everybody else was convinced that I am smart guy who always takes poor decisions.

Overall, yeah, thanks mom!

Follow me on twitter, facebook and instagram for more updates. Thanks!

Async and Await Revisited - Update 1

I have already written about async, here. yet, thought I will just revisit here.

The thing is about async and await is all about improving responsiveness. What is responsiveness though? In different context, it takes on different meanings. In a website, the ability to move content around to suit the screen size is responsiveness. You see this a lot in mobile websites which also look equally good on desktop. In a application though, responsiveness comes down to the ability to keep the user engaged when stuff is happening in the background.

A simple everyday application activity is waiting for a photo to load. There would be a photo area, which will be surrounded by the usual application buttons and options. While the photo loads, the rest of the application should still be usable. Perhaps a loading screen with a percentage to show what is happening. Stuff like this is what async and await is all about. It is about making sure that the thread that manages the user interface is able to isolate itself from other stuff such as data queries and processing of data which is happening in the background.

This is the whole point of writing asynchronous code. keeping things from freezing or becoming unresponsive when stuff takes longer than expected.

To this effect, c sharp provides the async and await keywords. These keywords allow a particular method to be marked for the benefit of the compiler, indicating that stuff that follows will be asynchronous. Then, the compiler can go ahead create the necessary task related code. This is the key stuff about async and await. It takes the load off the developer from having to write actual asynchronous code, reducing errors in the process. This also means, all that stuff you know from reading about tasks and threads will come in handy here as well.

As always, find the code sample for this entry at my repo.

Follow me on twitter, facebook and instagram for more updates. Thanks!

Threads and Tasks Revisited - Update 1

I have already written about threads and tasks here, here, here, here, here and here. I thought, perhaps it is time to revisit those topics.

Tasks and threads in c sharp are interconnecting concepts. Both allow you to build an application that can mimic the behavior of a multi threaded application. The idea behind any multitasking application is the same. There is just too much power at disposal and by switching them fast, you are able to give the impression that many things are happening at the same time. Perhaps the best example would be when you are driving. Obviously, your eye is on the road, but your hands are on the wheel, your legs on the breaks. While driving, you are able to glance at the speed, fuel level, and so on, all without ever stopping the  vehicle itself. You are doing many things at once, however they are not happening in a parallel fashion. Your attention does go from the road to the speed dial and come back, fast.

Same things happen in applications. Most computers today have super fast processors. It is possible to ask these processors to work with multiple 'thread' and make them do many things at a given unit of time, like per minute or per hour or per day. That is where threads and tasks come into the picture.

The primary difference between threads and tasks is the amount of control you have. With a thread, you simply assign stuff to another thread, and that's pretty much it. Threads do not return stuff, which make it 'not so easy' to use them when you are trying to make things happen after something has happened. You could say, a thread is like a one way street. Stuff goes away from you, but nothing comes back. With tasks, you have an option to keep track of things.

You use threads when you dont want to have extra control over the multi threading you are attempting to do. You use tasks when you want that extra control. Almost in all real life situations, you will end up tasks and threads. Also, when using tasks, you end up using a lot of lambda expressions as well.

As always, find the code at my bit bucket repo right here.

Follow me on twitter, facebook and instagram for more updates. Thanks!

Rogue One - Better than expected star wars movie



I am not exactly a fan of the star wars franchise, but as a standard sci-fi movie guy, I like the movies the franchise puts out. The last year movie, Force Awakens was essentially a rehash of everything that was good about star wars 4 - 5- 6. It was a neat movie but it wasn't exactly original. With that as the context, I went to rogue one with extremely minimal expectations. Surprise...surprise, this was actually a good star wars story. It also had enough entertainment value to keep my movie companion happy, which means, the movie is doing justice to viewers who are familiar with the franchise, and those that are not. Excellent balancing act.

Although the poster puts the female lead front and center, as she (and her friends) reach their logical ends, I could not help but wonder that she did not do much in the narrative. Sure, she 'rebelled' at the right moment to get some gears and nuts moving, but otherwise, she wasn't exactly the 'female lead' who takes charge kind of impression the movie poster and the trailer seem to give. Fortunately, she did not end up doing stuff with the male lead, so that's something, I suppose.

The story is standard fare. The rebels need to steal some plans, and they form a team, and they succeed to do it at great cost. As many have pointed out, the plot is pretty much the opening crawl which comes at the beginning of the star wars 4, a new hope. Not much of a breakthrough is being done in terms of story. The character development is also pretty simple. What really sells the movie, is how incredibly the look of 'a new hope' is replicated here. I was surprised to see thumb sized buttons in almost every display. I was equally surprised to see old fashioned uniforms. The aliens look not too CGI, but they look alright. The movie has that classic star wars look.

What really carries the weight of the movie is the invisible influence of the emperor and also darth vader. When Vader eventually shows up, he mostly walks and talks and delivers a cool pun. Otherwise, he seems just alright. However, as the movie reaches its end, he just unleashes the full force and just takes care of everybody. That is perhaps the biggest take away of this movie. Also, the movie justifies the 'hole in the center' fun thing about a new hope. Further, it connects directly to the events of episode 4.

The last part about connecting things is what makes me love this movie so much. Since it is connected to the events that follow (and also because all the characters are dead), there will be no sequels to this movie. That's good because, almost every movie these days seems to leave threads hanging so there can be sequels and endless stories. For once, it is nice to see a movie that does not leave unnecessary sequel hooks that give me that feeling that man, I am getting only half the pie for full price. Glad to see a movie that has a clear beginning, middle and end. Thank god that I dont have to suffer through same old characters again and again.

Follow me on twitter, facebook and instagram for more updates. Thanks!

Barbarella - sci fi that takes the crazy, pushes it beyond 11



There are very few movies that can surprise me these days, and Barbarella happens to be one of them. The film has classic written all over it, and there are so many things packed, the editing so tight, each frame filled with so much 'oddities', wow! Just wow! Perhaps the sad part about watching this movie is realizing that it is impossible movies like this will be made at present time. However, I am fortunate that streaming services such as Amazon Prime Video and Netflix are keeping stuff like this online, so a new generation of fans like me could be created.

Right, so, the movie. Let's see with the plot here. The plot means a lot only if we understand the setting. The setting is that of some futuristic society where space ships and interplanetary is real. (yes, if you like such settings, please check out my novel on amazon, and buy it, of course) The culture is such that all savageness has been removed (this means, there is literally no concept of shame, killing and other human stuff, if you know what I mean) and people are used to it. For instance, our heroine stands in her birthday suit talking to her boss, and neither of them reacts to the state, for such emotions have long been lost.

Some super cool engineer has built some weapon (although weapons are banned) and he was on some mission. He is now lost and it is now up to Barbarella to find it. Obviously, she takes that mission. Although, why she is the chosen one is never explained. It is difficult to care as well because she is mostly undressed most of the time. Now, the movie does objectify her like crazy, but the thing is, the movie objectifies men as well. Any man in the movie who is even half way good looking, is wearing nothing or wearing something to cover the essentials. The movie is sexist, but it is an equal opportunity sexist so people of all orientations can enjoy and chill out.

Other than the obvious sexism (of both genders), the movie is filled with craziness of all sorts. The special effects are all very well done. It is all practical effects, so what you see what you get. Despite growing up in the golden age of special effects, I found the effects interesting and appealing. The visuals are crazy and makes you wonder every minute, 'what were they thinking'. If not the effects there is also the thing about sets. There is the space ship interior set, and then there is that north pole kind of set, then there is that underground hell set, and then that flying action scene set, then that sleeping room set, and the torture room set, the underground revolution set and the final living planet kills everybody set.

There are so many sets, and each of them is filled with enormous contraptions. Each set has a unique sensibility about it, and perhaps on repeat viewings I will be able to get in more of it. The movie begs to be watched multiple if only to take in all that is happening on the screen. The writing is extremely good, and the cheesy dialogue complements what is happening on screen. A lot of things dont make sense (like the many, many revealing outfits that Jane 'hot' Fonda wears) but it does not matter.

For all its crazy sets, hammy acting and over the top effects, there is a lot of meta commentary going on in the movie. I could catch a few about human nature, and I am sure, repeat viewings will reveal the genius of the entire movie. I also feel that the actress was in on the sexism and the comedy nature of the movie. She does an excellent job, and perhaps that proves her acting ability for she went on to win two oscars, later in life. Yeah, she totally was in on most of the jokes and sexual objectification.

While I am sure I will watch it again and again, I need to now go and find other cult movies like this. The movie also makes me watch star trek classic episodes for some reason. Yep, got to do that.

Follow me on twitter, facebook and instagram for more updates. Thanks!