On Respect and Taking Responsibility…

I have always believed that a person’s lack of respect toward me and anything I stand for, is simply due to my own utter failure and inability to command such respect from said person. Of course, such a stance is probably not completely logical.

Indeed, there are people who lack a sense of respect for anything and anyone. Nevertheless, taking responsibility for actions, mistakes and events in your life, is definitely not a habit that is formed by expecting others to be different.

Life’s lessons are beautiful.



Python Implementation of TextRank (Github Repo)

Find it on Github: https://github.com/davidadamojr/TextRank

A few months ago, I wrote an implementation of “TextRank” in Python. TextRank is an algorithm for automatic keyword and sentence extraction (summarization) proposed by Rada Mihalcea and Paul Tarau in this paper. However, unlike the approach taken in the paper, this implementation uses Levenshtein Distance as the relation between text units.

This implementation carries out automatic keyword and sentence extraction on 10 articles gotten from http://theonion.com

It achieves the following:

  • Generates a 100 word summary for each article
  • Number of keywords extracted is relative to the size of the text (a third of the number of nodes in the graph)
  • Adjacent keywords in the text are concatenated into keyphrases

Obviously, this algorithm is useful for automatically extracting relevant keywords and automatic summarization of a given body of text.

The implementation has the following dependencies:

Find it on Github: https://github.com/davidadamojr/TextRank

Love & Relationships

There are women…

This post is based on an earlier article titled “There are men…” by Lindsay that can be found here: http://loveaddictnyc.com/2012/04/23/there-are-men/. I found it quite interesting. You may want to read it first.

There are women out there who will respond to your text messages like it’s the most important thing in the world. Women who will initiate conversations because they simply cannot wait to see what you will say next and do not care about playing hard to get. There are women who will never be too busy or too preoccupied to wish you good morning, regardless of whether they are a country or a block away. Women who will remember to call when they say they will, not because you have complained a thousand times about how they never call, but because they want to. There are women who will surprise you with their curiosity about your sometimes monotonous days. There are women who do not try to be fashionably late, show up on time – or even early – women who are genuinely excited to see you.

There are women who want to go out on dates and never actually expect you to pay each and every time, but absolutely appreciate the fact that you do so anyway. There are women who do not expect you to beg and grovel just so they can see you for one drink after work. Women who are not purely motivated by what you can do for them, but just simply love being around you. There are women who will not wait three days – or even three hours – to call you back. Women who have grown past games and cryptic messages that you do not have the time to decode.

There are women who love it when you hold their hands in public. Women who enjoy walking around department stores completely comfortable with the fact that you cannot afford a lot of things but simply love the feeling of your hands interlaced with theirs while you walk around dreaming and wishing you could afford those things. There are women who love sitting next to you while you both do absolutely nothing, just so they can look at your face even if they notice the uneven lines and imperfect skin, because they cannot imagine another way to spend their Saturday afternoon. Women who wish they could capture the appreciation on your face when they tell you they are happy to have you despite all your flaws. Women who want to show you off to strangers on the street because they find you so incredibly amazing. There are women who are happy to be seen by your side, thankful that you are someone they chose to roam around town with.

There are women who want to be your girlfriend; who are totally excited to introduce you as their boyfriend to their friends, families and to the men who try to pick them up in bars. Women who are not unavailable, who are ready for a relationship, who are not ripe with excuses why the timing or the situation, the feeling or the possibility just isn’t right. Women who will not blame yesterday on their inability to develop something today and imagine a better tomorrow. There are women who will not pass up a chance to be yours because they know how amazing – how special – how superbly wonderful you are and that they are lucky you want to be with them, and only them. There are women who do not hesitate on title changes or commitment. Women who want to grow with you and learn with you, love you the best they can, be with you as long as you prove that you really want them. Women who do not reply “thank you” when you say those precious three words. There are even women who say that incomparable phrase first, not second.

There are women who are proud, inspired and motivated by your successes, not intimidated by them. Women who are amazed by your determination and passion, who see things inside of you that you cannot even notice yet, or decide to ignore. There are women who believe in your future as much as they believe in the world you can create together. Women who want to witness your bad times and your good, be there when you fail and celebrate when you find that sense of belonging that we all look for. There are women who remember you are sometimes too proud to take their advice in the worst of situations but you will want to hear it in the morning. Women who remind you of all the things to come and promise to be there when you get to the top of that mountain you are climbing. There are women who do not just say that, but really mean it and are there at the peak, and in the valley.

There are women who listen. Women who linger on each and every word you say because they know they will never know too much about you and are intrigued to always learn more, regardless of how long they have known you. There are women who have an astounding ability to nurture, to put your needs before their own, who remember the first time they noticed something different about you. Women who like the way you look when you are dressed to go out and when you’re in your boxer shorts and “morning wood” right out of bed. Women who see your insecurities but find them only a tiny, insignificant part of what makes you amazing. There are women who will remember the moment they knew they loved you and when you made them want to be a better person. There are women who love your thoughtful heart as much as they love your masculine features. Women who are not afraid to explore their unique bodies, tell you how they like it and guide you to the right places whenever you cannot exactly figure it out yourself. There are women who will accept you for whatever and whoever you are. Women who will stand by you – and fight for you – because they know you’re worth it, because they know you will do the same for them.

There are women who will surge with excitement rather than sigh in regret when they tell the children you do not have yet, how you spent weeks, months or even a year planning the perfect way to propose. Women who will realize how much nervousness and worry you had to deal with while wondering whether they will say YES or NO. There are women who will respond gleefully to your sweet – or “dirty” – text messages at work, even after you have been married twenty years.

There are most likely no women who will do each and every one of these things. But there are women who will try with everything they’ve got. There are women who will not be too afraid, too guarded or too arrogant to truly, honestly and completely love you.

Internet, Open Source Projects, Programming, Software

Building an “Intelligent” Search Engine in Perl

Many months ago, I undertook the task of building an “intelligent” search engine in Perl. This was to be part of a class I was taking. Call me naive, and indeed I was! I had little to no idea how mathematically-rooted the process of searching and retrieving relevant information from documents actually is. I was quite taken aback by the amount of vector algebra I had to deal with. This turned out to be one of my most valuable learning experiences. With time, I gained a new-found respect for Google, Njorku and other companies that try to provide users with innovative ways to effectively search the web.

The specific intention was to build an “intelligent” search engine in Perl that would crawl, index and retrieve relevant web pages (as requested by a user-formulated query), from the University of North Texas web domain. The search engine was to have some sort of “intelligent component” that tries to improve the quality of search results by employing some form of heuristics. Furthermore, I had to document and explain the techniques I employed in the process of building the search engine from start to completion.

Accomplishing this task required quite a number of steps, most important of which was a clear understanding of the vector space model representation of documents and queries. Essentially, the following steps were necessary:

  • Build a web spider/crawler that gathers URLs from a web domain using a breadth-first strategy.
  • Build a text preprocessor responsible for extracting the contents of URLs, stripping the content of html tags, tokenization, removing stopwords/punctuations and word stemming.
  • Create a (word-level and document-level) inverted index that holds the vector space model representation for each of the web pages gathered.
  • Create a query engine responsible for processing queries provided by a user. This processing involves converting text queries into vectors and comparing these query vectors to the document vectors stored in the inverted index.
  • Build a web-based Graphical User Interface (GUI) for the search engine.

I have provided links to the complete project. I hope these resources serve as instructional material for anyone else trying to get up to speed with the basic information retrieval concepts demonstrated therein.

A usable demo can be found here: http://students.cse.unt.edu/~dta0022/searchengine/

The complete project report can be found here: https://www.dropbox.com/s/ru6mbawf04pl448/report.pdf

The complete source code and supporting files can be found here: https://github.com/davidadamojr/TinySearch



Why I Do What I Do

Read Quote of Nadeem Mohsin’s answer to Computer Science: What is so great about graduating with a major in Computer Science? on Quora

When I say I’m LAZY, this is exactly what I mean; a massive hatred for tedium. I guess that’s why I’ve chosen to do what I do… something whose entire premise is LAZINESS. I automate stuff ‘cos I don’t wanna have to do it myself. I write code and I enjoy it, most of time.

I’m lazy!


Record Labels are Rubbish!

A musician is considered independent if he or she is not signed to any major record labels. I’ve always wondered why some particularly awesome artistes choose to stay independent. A lot of people get the impression that artistes who are not signed to any major record label are independent because they are not good enough. That’s mostly wrong and there’s a lot more to it!

Major record labels can be really annoying, and although they may make you famous, they could also destroy your artistry in the course of doing that. This is why the world of independent artistes is where I choose to find my music. That is where unadulterated artistry is to be found.

The music industry really amuses me. Here is a video by independent artiste Alex Day speaking about his experience with some record labels.

Love & Relationships

No one really gives a sh*t!

In an ideal world, honesty would be a trait that is typically held in very high esteem. But at many different points of one’s existence in this world, one begins to realize that very few people actually really care or appreciate your honesty. Simply put, no one gives a sh*t about how honest you are or were, when you told them the truth they didn’t want to hear. All a human ever remembers is how you made he or she feel bad.

Such hard lessons I’ve come to learn in recent times.

And yes, I know. This has to be one of my most random blog posts EVER!

Feminism, Programming, Technology

Girls Who Code?! Well, is it about the Girls or the Code?

Female programmers have to excel in a profession that is notorious for having a dearth of females and a general condescending attitude toward the few that seek to thrive in it as equals. Thankfully, Tech Cabal has a hugely popular series dedicated to identifying and brain-picking “Girls Who Code” in the now-virile Nigerian software development community. The series is quite eye-opening. However, it is the response within the community that seems to be even more amusing.

As inferred by the Geek Feminism Wiki, female programmers have quite a few not-so-trivial things to worry about, including but not limited to:

  • Being called “the lady programmer”.
  • Wondering whether you’re well-known in your community simply for being “the female one”.
  • Worrying about the possibility that people won’t believe you when you say you are a programmer.
  • Being described as “hot” first and a competent professional second.
  • Wondering whether you got hired at your job because of affirmative action or “quotas” relating to male-female staff ratios.
  • Your peers writing articles and posting pictures of you on Twitter solely because people of your gender are a novelty (See this tweet).
  • Feeling exploited when companies make a show of supporting gender equality in their promotional materials, but do not actually practice what they preach in terms of hiring and promoting.
  • Worrying that if you switch to a less technical career, you’d be betraying the cause of gender equality.

There are hundreds of other reasons which when taken into consideration, can give people the strong impression that “Girls Who Code” deserve accolades and conscious recognition for getting into and staying in a profession where females are typically considered to be an anomaly. Indeed, focusing a great deal of attention on female programmers could yield a huge number of benefits, including helping to identify typically hard-to-find role models for other women trying to navigate the same testosterone-driven waters of the computer programming profession. However, one could also wonder whether a female programmer should be singled out and applauded as some sort of hero specifically because she is a “girl” who codes.

The world is now more sensitive to issues of gender equality than ever before, a tad too sensitive, I might add. This popular story is a case in point (I got an email pointing out some inaccuracies in the story as portrayed by the linked article. A supposedly more accurate representation of the story can be found here and  a reaction to the incident by a ‘female tech person’ can be found here). Tangentially, giving special attention to female programmers can simply come across as Exceptionalism. According to the Geek Feminism Wiki:

Exceptionalism is when women in geek communities become extremely well known not for their geeky work but for being a woman, or when a woman’s arrival in a geek community is heralded with a great deal of excitement focused on her being a woman.

If the hoopla about gender equality is to be taken in a strict sense, would it not be quite astute to say that unless a female programmer achieves something extraordinary from a gender-neutral perspective, there is really no need to make her seem extraordinary?

Obviously, articles, blog posts and entire websites dedicated to discussing and drawing attention to women in computing often have entirely noble causes. However, it might be necessary to constantly reiterate what these purposes are, in order to avoid the highly probable event that the wider community begins to lay excessive emphasis on the “female-ness” of the individuals rather than how exceptional their contributions to the “geek” community actually are from a gender-neutral perspective. Geek Feminism Wiki goes as far as saying:

…excessive emphasis on and attention paid to the female-ness of an individual woman by the wider community can make her feel isolated, and, paradoxically, invisible in the sense of not being able to do any work, no matter how exceptional, that is more important to the community than her being a woman.

We would all love to see more women in technology. However, we should always resist the temptation to grant overt recognition and applaud for the mere fact that they are women in technology, but instead do so because they are fellow soldiers who have made great and exceptional “kills” in the same battle we all fight in… as equals.

So, she’s a “girl”, and she writes code. Do we need to collectively hand her a giant cookie, and a Nobel prize for added effect? Probably not.