In the beginning, there was this blog. And it was largely a place where I ranted. Not just about technology but other stuff that life brings my way, which not surprisingly, was mostly about technology…it also doubled up as some sort of journal.
But somehow somewhere down the line, it stopped being an avenue for expression: a place to capture my thoughts. Somehow somewhere, my writings morphed into mostly technical, tutorial like posts.
For instance, looking at all the post in 2013, they were all technical related, except the April 30, 2013 post which was supposed to be an attempt to add some personal touch by doing monthly recaps. That did not go very far.
Why was this? Pondering on it for a while, it hit me. It was because of the inroad of social networking sites into my everyday life: because I was spreading myself too thin all over Facebook and Twitter, sharing everything that was on my mind as status updates, sharing everything on my mind as comments to other peoples posts. Liking pictures, re-sharing links etc...
Twitter also, was the perfect place to let out burst of thoughts and emotions that should or could have coagulated into well formed posts...
But I am fed up. Fed up with all these social networking sites. Especially Facebook. I have long realised that it was having detrimental effects on my productivity and emotional well being…I am also fed up with the forced terseness of 140 characters that Twitter imposes. If I want to express myself, I want the liberty of being able to do this with as many words I deem fit.
And as such…I am going, going, going...back...back, to blogging blogging (in Biggie smalls voice)…not that I actually stopped blogging, but I am going back to having my blog as my primary avenue for capturing my thoughts.
I am avoiding Facebook by all means now. I still keep using twitter though, but majorly as a source of discovery for things around my area of professional interests, and once in a while, a place to engage in ephemerial and disjointed rants. If I have something on my mind I really feel the need to share or capture, I write a coherent post instead. No, sorry: fusilade of tweets is no longer for me.
It is time to get back to blogging and get personal here again.
Friday, March 21, 2014
Thursday, March 20, 2014
When CSS position: sticky doesn’t work.
I spent a huge chunk of time at work yesterday trying to figure out why the hell webkits implementation of position: sticky, position: -webkit-sticky wasn’t working.
Applying it on the tablet site I was working on had no effect but when I viewed a demo site: http://html5-demos.appspot.com/static/css/sticky.html it works perfectly; so it was not a case of my browser not supporting the feature, It was definitely something in the markup or css that was screwing things up.
After some couple of hours hunting about, I found the culprit:
#bodyconstraint {
overflow: hidden !important;
}
A parent element has got overflow:hidden, and this, apparently throws position: -webkit-sticky off.
So in case you run into a situation where position: -webkit-sticky isn’t working, an heads-up: check to see if the element you want to position as sticky is not a child of a parent element that has had its overflow set to hidden.
Also, you need to set the top property of the element you want to position sticky. if not, it doesn't work too.
Applying it on the tablet site I was working on had no effect but when I viewed a demo site: http://html5-demos.appspot.com/static/css/sticky.html it works perfectly; so it was not a case of my browser not supporting the feature, It was definitely something in the markup or css that was screwing things up.
After some couple of hours hunting about, I found the culprit:
#bodyconstraint {
overflow: hidden !important;
}
A parent element has got overflow:hidden, and this, apparently throws position: -webkit-sticky off.
So in case you run into a situation where position: -webkit-sticky isn’t working, an heads-up: check to see if the element you want to position as sticky is not a child of a parent element that has had its overflow set to hidden.
Also, you need to set the top property of the element you want to position sticky. if not, it doesn't work too.
Tuesday, March 18, 2014
Now I understand...Death, Life, Celebration...
I never really understood that part of my culture where we throw a party at the demise of an aged person. I always thought that no matter how old someone was, death is death and should be something of sobriety not something that deserves fanfare.
I never got it. Until now.
My grandpa just passed away. And for the past couple of days, I have being trying to grapple with the reality of it all; he is really gone? It feels surreal…
Then I understood why celebration after death makes sense.
All of a sudden I feel this strong need to throw a party and proclaim to the whole world, what great man my grand father was. A man of character. A man of valour. A family man. A principled man who has guided not just me but a lot of people that were blessed to be under his tutelage. I have this strong desire to have a musician…not just any but a distinguished one come rain praises to his name. While everybody celebrates and acknowledge truly the greatness of his life.
The second reason why the tradition of throwing a funeral party now makes sense is how I see it bringing closure. I have been in a reflective mood ever since and deep down inside I feel a need for some sense of closure. A sense of having said the final farewell. And now I can just appreciate how the fanfare and merriment of a party can bring such a closure. The final farewell done with the utmost gusty celebration that we can muster.
I can appreciate how it all makes sense now and how therapeutic it can be. Some listen to music, some write, some cry, some spend time with cherished memorabilia...all we all yearn for is a way to deal with loss.
sigh...
Death is part of life I guess. And it adds yet another twist to this unexplainable miracle that our reality is.
I never got it. Until now.
My grandpa just passed away. And for the past couple of days, I have being trying to grapple with the reality of it all; he is really gone? It feels surreal…
Then I understood why celebration after death makes sense.
All of a sudden I feel this strong need to throw a party and proclaim to the whole world, what great man my grand father was. A man of character. A man of valour. A family man. A principled man who has guided not just me but a lot of people that were blessed to be under his tutelage. I have this strong desire to have a musician…not just any but a distinguished one come rain praises to his name. While everybody celebrates and acknowledge truly the greatness of his life.
The second reason why the tradition of throwing a funeral party now makes sense is how I see it bringing closure. I have been in a reflective mood ever since and deep down inside I feel a need for some sense of closure. A sense of having said the final farewell. And now I can just appreciate how the fanfare and merriment of a party can bring such a closure. The final farewell done with the utmost gusty celebration that we can muster.
I can appreciate how it all makes sense now and how therapeutic it can be. Some listen to music, some write, some cry, some spend time with cherished memorabilia...all we all yearn for is a way to deal with loss.
sigh...
Death is part of life I guess. And it adds yet another twist to this unexplainable miracle that our reality is.
Sunday, March 16, 2014
To Birth or not to Birth
From fairest creatures we desire increase,...and there goes the opening of Shakespeare's first sonnet. Where he waxed lyrical about the importance of procreation and its role in preserving and perpetuating beauty in nature. In this sonnet and the couple of sonnets that followed, Shakespeare was addressing a dear friend who was beautiful to the eyes, but whom to reasons best known to him, was unenthusiastic about finding a woman, settling down and start having children.
That thereby beauty's rose might never die,
In the same sonnet, Shakespeare went further to chide him on this unexplainable reluctance to settle down, marry and procreate:
But thou, contracted to thine own bright eyes,You should read the complete sonnet here.
Feed'st thy light's flame with self-substantial fuel,
Making a famine where abundance lies,
Thyself thy foe, to thy sweet self too cruel...
This poem is one of my favourite and one of the first few ones I got committed to memory; maybe because I sort of empathise with this unknown friend of shakespeare regarding his reluctance to procreate.
I got an email yesterday from one of my closest pal back in high school. Actually literally, he was the closest as we shared the same desk. And he told me that his wife just gave birth...
See, I have gotten to that age where questions from my parent and siblings about when I would marry and start having kids have stopped being subtle and are now outrightly blatant. I have also gotten to that age where not just my female friends from high school are getting married and having kids but also my male friends are birthing their first children...
So when I got this message you would assume that I would take some moment to reflect on this news and ask myself what's up with me? I did take a moment to have this reflection and the interesting thing is that I could not be bothered to feel perturbed. Neither did I have a sense of needing to have a child...or start a family...
...Because I don't know what this all means! Yes, this life! I don't know what it all means and why! I am yet to come to terms of it all, something I think I need to do before I can feel comfortable bequeathing life onto another...
Life feels more like a big mystery...a very haunting one and I am not sure of the advantage of bringing yet another life to come live through it.
It is a big conundrum we are all forced to live in (and through) which we do not really understand. Where do we all came from, why are we here? to what purpose? and where do we go after here? And the uncertainty of what lays after here, if anything at all, after death is decapitating.
Why do we have to live to die?
This is all really scary thought. A painful state of being. if feels existence is one big scary captivity. One we don't understand the reason behind, one in which no matter how we scream and yell, we can't get out of. We can't get answers, we can only hang on faith and believe or not and come to terms to the uncertainty and maybe hopelessness of it all.
And yes we lose ourselves to the hustle bustle of life and most of us try to push this gloom to the back our minds, but unfortunately I cant. I really cant help slip into this state of utter uncertainty now and then, and feel helpless over what this all means. I really find it incredulous that we all get so caught up in living this life and yet no one knows...
Is this what I would bring another life to come and experience? this unexplainable abject sense of hopelessness? This huge conundrum?
Life is a bitch and then you die?
Some hold the philosophy that if life is a bitch, then bang the hell out of her before you die. All good and dandy but I just cant get it out of my head that you still die? what happens next? Really?
Which is why I am in no way excited at the prospect of bringing another life in here yet. (at least not until I come to reconcile our fate) right now I have not. Which pushes me to contemplate the conclusion that maybe the best gift I can ever give my children is not to give birth to them?
Spare them all these haunting.
Between the time I started writing this post and the time I got it finished my Grand Daddy passed on to glory. A man who has had tremendous positive influence on my life and the life of people around him. A man of conviction, of strength of character, a family man. A source of confidence and stability. His passing somewhat changed the emotion I started off this post with...Maybe just for the family, maybe just for the sense of security it gives, the companionship as we go through this life...maybe just for that we have no choice but to keep bringing forth life as it makes passing through it a lot more bearable?...
Sunday, January 26, 2014
Effect of Setting setTimeout to 0 and Explanation of JavaScript's Single Threaded, Non Blocking I/O, Async Event Driven Model
If you have two functions:
Checking your console, this is what you see:
If you were expecting to see "f1 First function call..." first, then you are not alone. This is what I initially expected based on my assumption that having a setTimeout set to 0 milliseconds, well mean, execute right away. Apparently this is not how things work.
This post is about how this unexpected behaviour led me into having a refresher of some of the core concepts regarding how JavaScript executes.
var f1 = function () {
setTimeout(function(){
console.log("f1", "First function call...");
}, 0);
};
var f2 = function () {
console.log("f2", "Second call...");
};
and then you call them:f1(); f2();
Checking your console, this is what you see:
If you were expecting to see "f1 First function call..." first, then you are not alone. This is what I initially expected based on my assumption that having a setTimeout set to 0 milliseconds, well mean, execute right away. Apparently this is not how things work.
This post is about how this unexpected behaviour led me into having a refresher of some of the core concepts regarding how JavaScript executes.
Thursday, October 24, 2013
Understanding Entity Relationship Mapping, Part 2: Annotating Entity Relationships
In Understanding Entity Relationship Mapping, Part 1: The basic concepts I glazed over some of the basic concepts that would be encountered when dealing with establishing relationships between Entities. This post would take a look at how to use Annotations to specify these relationships.
The relationships that would be annotated are the four types that you have in relational data model:
If concepts like Cardinality, Direction of Relationship, Cascades, Owning side and Inverse side of Entity relationship is new to you, then it is would be good to first read Understanding Entity Relationship Mapping, Part 1: The basic concepts
The relationship would be classified into two: Single Valued Mappings and Collection Valued Mappings. It is worth stating that the examples were written with Hibernate's implementation of JPA in mind, but would work with any other standard implementation of JPA 2, as no Hibernate specific annotation is included.
So let us begin.
The relationships that would be annotated are the four types that you have in relational data model:
- One-To-One annotated with @OneToOne
- Many-To-One annotated with @ManyToOne
- One-To-Many annotated with @OneToMany
- Many-To-Many annotated with @ManyToMany
If concepts like Cardinality, Direction of Relationship, Cascades, Owning side and Inverse side of Entity relationship is new to you, then it is would be good to first read Understanding Entity Relationship Mapping, Part 1: The basic concepts
The relationship would be classified into two: Single Valued Mappings and Collection Valued Mappings. It is worth stating that the examples were written with Hibernate's implementation of JPA in mind, but would work with any other standard implementation of JPA 2, as no Hibernate specific annotation is included.
So let us begin.
Understanding Entity Relationship Mapping, Part 1: The basic concepts
It is possible to create a working functionality of a system using tools/technologies that is not fully understood, as long as some minimal knowledge is present: what things are, where to find them, and how to wire them together in other to get them to work. And thank heavens, with the help of search engines, you can easily scour the web for solutions to anomalies that pops up, due to the lack of complete grasp of the tool being used. But without a more in-depth knowledge, or at least a grasp of the basic fundamental concepts, it would become difficult to accomplish more complex or customized tasks, troubleshoot issues and general extend beyond the basic functionality.
This was how I was treating mapping entity relationships in the ORM domain, via Hibernate's implementation of JPA, for a time now. I had the basic knowledge of relational database modelling, how relationships are constructed using primary keys and foreign keys in SQL, how data can be fetched from tables that are related using joins: basic knowledge that has its roots solely in the relational way of looking at databases. So I was able to annotate up entities and set up relationships. Get stuff persisted and maybe updated. But I kept running into minor errors now and then, configuration issues, minor oversights etc.
One of the areas these annoyances kept popping up was in how to describe relationships between entities. After I have had enough of head banging against the wall, I decided to just take a step back to understand, at least, a little bit more, the tool I am using and what I was dealing with here.
This blog post is the outcome of that stepping back. It has two parts to it. This post, which describes some basic terminologies that you would come across while working with most JPA implementations and the second: Understanding Entity Relationship Mapping, Part 2: Annotating Entity Relationships, which shows how entity relationships are annotated.
So here we go:
This was how I was treating mapping entity relationships in the ORM domain, via Hibernate's implementation of JPA, for a time now. I had the basic knowledge of relational database modelling, how relationships are constructed using primary keys and foreign keys in SQL, how data can be fetched from tables that are related using joins: basic knowledge that has its roots solely in the relational way of looking at databases. So I was able to annotate up entities and set up relationships. Get stuff persisted and maybe updated. But I kept running into minor errors now and then, configuration issues, minor oversights etc.
One of the areas these annoyances kept popping up was in how to describe relationships between entities. After I have had enough of head banging against the wall, I decided to just take a step back to understand, at least, a little bit more, the tool I am using and what I was dealing with here.
This blog post is the outcome of that stepping back. It has two parts to it. This post, which describes some basic terminologies that you would come across while working with most JPA implementations and the second: Understanding Entity Relationship Mapping, Part 2: Annotating Entity Relationships, which shows how entity relationships are annotated.
So here we go:
Subscribe to:
Posts (Atom)
