Home

  • ObjectMapping in Java : Effective JSON Serialization and Deserialization.

    ObjectMapping in Java : Effective JSON Serialization and Deserialization.

    Object Mapping is key in programming for converting objects and data between formats, such as JSON (JavaScript Object Notation). Serialization converts an object to a raw data format (sometimes a JSON string), while Deserialization converts raw data back into an object.

    One of the most popular libraries used for object mapping in Java is Jackson. This powerful library simplifies both serialization and deserialization processes, making it an essential tool for Java developers working with JSON data.

    Configuring ObjectMapper
    @Bean
    public ObjectMapper objectMapper() {
    return new ObjectMapper();
    }

    Registering a new ObjectMapper bean without custom configuration as shown above uses default behaviours and may work, but its effectiveness depends on your use case. A mismatch between configuration and expectations can lead to errors, especially when handling specialized data types.

    One common issue in Java is the handling of time-related fields. This challenge arises from the evolution of time handling across different Java versions, which can lead to discrepancies in how time data is serialized and deserialized. Fortunately, Jackson’s SerializationFeature and DeserializationFeature classes offer customizable configurations to manage these behaviors and ensure that time-related fields are handled properly according to your needs.
    Below is a more detailed configuration

    @Bean
    public ObjectMapper objectMapper() {
    ObjectMapper objectMapper = new ObjectMapper();
    objectMapper.registerModule(new JavaTimeModule());
    objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true);
    objectMapper.configure(DeserializationFeature.ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT, true);
    objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
    objectMapper.setPropertyNamingStrategy(PropertyNamingStrategies.LOWER_CAMEL_CASE);
    objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);

    return objectMapper;
    }


    1. Deserialization in Jackson: Handling Unrecognized Properties

    When deserializing JSON, you may encounter UnrecognizedPropertyException if the JSON contains properties not present in the target object. To handle this, Jackson’s ObjectMapper provides the DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES setting. By default, this is set to true, and setting it to false allows Jackson to ignore unrecognized properties and continue deserialization.

    Note that FAIL_ON_UNKNOWN_PROPERTIES differs from FAIL_ON_IGNORED_PROPERTIES, which handles properties explicitly marked as @JsonIgnore and controls whether those properties are ignored during deserialization.


    2. Configuring Jackson’s Property Naming Strategy in Java

    Ensuring consistency between Java objects and the JSON format is key, and choosing the right naming strategy (e.g., KebabCase, CamelCase, or SnakeCase) is crucial for proper configuration. To configure the naming strategy in Jackson, you can set it on the ObjectMapper using the setPropertyNamingStrategy method. For example, if you want to use CamelCase (lower camel case) for the property names in the serialized JSON, you can configure it like this:
    objectMapper.setPropertyNamingStrategy(PropertyNamingStrategies.LOWER_CAMEL_CASE);

    Choosing the appropriate naming strategy depends on the external systems you’re working with, as some APIs or databases may have specific requirements for how property names are formatted.


    3. Serialization: Inclusion of Null and Empty Properties

    By default, Jackson serializes all properties of an object, including those with null or empty values. However, in many cases, you may not want to include such properties in your serialized JSON. For example, when sending data to an external system, including null or empty values can result in unnecessary data transfer.
    objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);

    4. Serialization: Formatting Date Fields

    Jackson allows you to control how Date fields are serialized. By default, Jackson serializes Date fields as numeric timestamps (i.e., milliseconds since the epoch). However, in some cases, you may prefer to serialize dates in a human-readable textual format (such as YYYY-MM-DD or MM/DD/YYYY).
    objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
    This ensures that Date fields are serialized as ISO-8601 formatted strings (e.g., 2024-12-28T10:00:00Z) rather than numeric timestamps.

    5. Registering Modules in Jackson: Joda, JavaTime, and JDK Modules

    In Jackson, module registration allows you to extend the default serialization and deserialization capabilities by adding support for custom data types. This is especially useful when working with libraries or frameworks that require special handling for certain data structures. Three common modules frequently used to enhance Jackson’s functionality are:

    1. JodaModule: This module adds support for Joda-Time types (such as DateTime, LocalDate, etc.) in Jackson. If your project uses Joda-Time for date and time handling, you’ll need to register this module to properly serialize and deserialize Joda types.
    2. Jdk8Module: The JDK modules provide support for Java 8 features like java.util.Optional, java.time (via JavaTimeModule), and others. These modules are especially important when integrating legacy systems that may use Java 8 features or have specific serialization needs.
    3. JavaTimeModule: This module is essential for handling Java 8’s java.time API (e.g., LocalDateTime, LocalDate, ZonedDateTime) in Jackson. If you’re working with time-related fields, you must register the JavaTimeModule. Failure to do so may lead to errors such as:
      Type definition error: [simple type, class java.time.LocalDateTime].

    Here’s how you can register the JavaTimeModule in your ObjectMapper:
    objectMapper.registerModule(new JavaTimeModule());
    This ensures that Jackson can correctly serialize and deserialize Java time types such as LocalDateTime and Instant.

    6. Using Multiple Jackson ObjectMapper Beans for Different Configurations

    When consuming data from multiple external systems with different strictness or naming strategies (e.g., CamelCase vs. SnakeCase), a single Jackson configuration may not suffice. In such cases, creating multiple ObjectMapper beans with tailored configurations ensures each system’s requirements are met without conflicts.

    Here’s an example of how you could define multiple ObjectMapper beans with different configurations:

    @Bean
    public ObjectMapper camelCaseObjectMapper() {
    ObjectMapper objectMapper = new ObjectMapper();
    objectMapper.setPropertyNamingStrategy(PropertyNamingStrategies.LOWER_CAMEL_CASE);
    // Additional configuration…
    return objectMapper;
    }

    @Bean
    public ObjectMapper snakeCaseObjectMapper() {
    ObjectMapper objectMapper = new ObjectMapper();
    objectMapper.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE);
    // Additional configuration…
    return objectMapper;
    }


    This approach ensures flexibility, allowing you to handle different naming strategies, serialization features, and other configurations required by each external system.

    Reference(s)
    https://github.com/FasterXML

  • Migrating to Spring Boot 3

    Migrating to Spring Boot 3

    Two years after the official release of Spring Boot 3, you’ve decided to migrate your application. It’s important to note that you will need to upgrade your Java version to at least Java 17, as well as upgrade to Spring Framework 6.0 and Spring Security 6. These are the minimum requirements for the migration

    According to the official migration guide, it’s recommended to upgrade from the latest version of Spring Boot 2.7 to version 3. This is due to the significant changes between major versions. So, if your application is running on a version older than 2.7, you’ll need to first upgrade to 2.7 before migrating to version 3

    Migrating to a new major version of a core platform like Spring Boot can come with unexpected challenges. Here are a few key changes to watch for in your application to help minimize errors during both compilation and runtime.

    1. Renaming of the javax to jakarta.
    Spring Boot 3 uses Jakarta EE 10, which includes updates to the Servlet and JPA specifications. One major change is the renaming of packages from javax to jakarta, except for the javax.crypto package, which was not migrated. As part of the migration, you will need to update all import statements in your application from javax to jakarta. Additionally, you may need to upgrade any libraries you’re using that still reference javax, to their latest versions that include the Jakarta refactoring.

    2. If you’re using Feign Client, Spring Cloud, and OAuth2 for (internal) HTTP communication with autoconfiguration, you will need to update the configuration in your properties file as follows:

    spring.cloud.openfeign.oauth2.enabled: true
    spring.cloud.openfeign.oauth2.clientRegistrationId: yourClientId

    2. Deprecation of antMatchers, requestMatchers and mvcMatchers
    To retain the old behavior of ant-style path matching, especially for how Spring Security resolves paths with wildcards (e.g., /greetings/**/summary/**), you need to explicitly set the matching strategy to ANT. You can do this by adding the following to your application properties:

    spring.mvc.pathmatch.matching-strategy=ANT_PATH_MATCHER

    You can also refactor your security configuration to use the AntPathRequestMatcher class instead.
    Other related migration details are described here – https://docs.spring.io/spring-security/reference/5.8/migration/servlet/config.html

    4. TrailingSlashMatch is now set to false by default
    The implication of this change is that URLs like /greetings/today/ and /greetings/today will no longer resolve to the same target. The former (/greetings/today/) will result in a 404 error. However, if you want to preserve this behavior without refactoring your endpoints, you can add the following configuration to your project:

    @Configuration
    public class UrlFilterConfig implements WebMvcConfigurer {
    @Override
    public void configurePathMatch(PathMatchConfigurer configurer){
    configurer.setUseTrailingSlashMatch(true);
    }
    }

    5. There are several configuration changes in other Spring projects like Actuator, Data, and Management in Spring Boot 3. Some properties have been renamed or removed, so you will need to adjust your configurations accordingly. It’s important to review the updated documentation for these projects to ensure that any old configuration properties are replaced with the new ones, and that your application continues to function smoothly. This might involve modifying your application.properties or application.yml files to reflect the latest changes.

    Make sure to check the migration guides for each of these projects to identify any other specific updates or required actions.

  • Optimizing for Learning In Your Professional Career

    Optimizing for Learning In Your Professional Career

    There is this popular career advice that goes thus “Learn or earn. If you get nothing, then quit and move on”. As much as I agree with this, I have also come to understand how active and intentional one needs to be to follow it to a good extent. How much you earn is a reward for what you have done, are doing, or are expected to do – gravitating towards a sense of satisfaction, while learning is more about becoming better at whatever you chose, which then plays a role in how much you can earn in the nearest future.

    The remuneration part is arguably the easiest one out of the two since this usually takes place during the interview process and is made explicit on your agreed binding contract after possibly multiple rounds of negotiations. It is also not a continuous process and therefore, requires less effort to stay active.  Learning, on the other hand, is continuous and requires more effort. Learning carries as much importance as remuneration in that it has a direct correlation not only to your personal growth and impact but also to how motivated and optimistic you become about your contributions towards your organization’s goals.

    It is, therefore, advisable that when you are choosing a new job, accepting a promotion, relocating to a new place or making a career pivot, you should optimize for both good remunerations as well as a good learning path. There are more than enough publications on how to be better at these two. However, this article will try to expand on how to become active with the latter.

    However, the important question to ask remains, how do I become intentional and active as regards my professional learning? How can I achieve this in a more deterministic way?


    We spend about one-third of our productive life on our professional careers and therefore, we must make it fundamental to how we and what we learn. The steps below enumerate what you can do to be active with your learning as it relates to your professional career in a measurable approach.

    1. Self-evaluation:

    It is very important to be able to identify where you stand right now. Presumably, you also know where you want to be in an estimated future time and all that is left is the path to follow to get there. There is, therefore, a need to evaluate where you are on your career journey, what you have in your skill toolset, and your proficiency level on them as well as those you don’t have but want to. This will help you to determine what your next level of priorities should be, what fits and what does not. It might help to take an audit of your previous activity and ask trusted friends, colleagues, and families about this to get a correct evaluation.

    Using an example of a Software Engineer, you will need to draw out your skill matrix and identify where you are now as well as your next logical step. You can check out https://progression.fyi/ for examples of frameworks from some of the best organizations on both matrices as well as a career path.

    2.  Going after what fits

    This goes beyond just identifying but also intentionally choosing what, who, and where will increase the feasibility of your identified next logical step.  This might lead to you joining a new group of more knowledgeable persons, getting a mentor or a coach, buying and reading new books, paying for that training or course, attending relevant events, and changing departments or companies. Albeit a possibility, it is not a must that this must lead to a change of employer. This also helps you in filtering prospective job offers, since this now presents itself as an additional question to subject every seemingly exciting opportunity to.  An additional question to ask that persuasive recruiter, a filtering yardstick for the career page of your favorite companies and a reasonable check on those recommendations coming through your career network.

    3. ASK: Your Contact Persons

    The moment you start the interview process is when you start asking the necessarily related questions to get as many answers as possible, from all the contact persons from the organization present throughout the interview process. This is the first way you can validate every point written on the career page and in the job description. 

    Questions like what learning looks like in the organization, the organization’s culture on collaboration, communication, and knowledge sharing, if there exists an individual learning budget and how to access it, how the organization is structured for personal growth, how the organization innovates, do research and development exist. For a software and product-related position, how is the product organization structured, and what does the software delivery process look like? These are just examples of questions one can ask during the interview process.

    4. ASK – Your Stakeholders

    Identifying the people who are responsible or the system in place to aid your learning is the next line of action. This is the follow-up to the questions asked during the last step. The focus here is more on gathering more information about how well the organization supports learning and the definition of this support: regular training, reimbursement for personal training, regular learning programs, trial projects, career pathways, etc. This generally helps in determining the shape your learning will eventually take.

    This is the point where you make your quest known to the identified and relevant persons and this often starts with aligning with your direct manager, then teammates and colleagues. The assumption here is that with the preceding steps, you are already in a team or company that looks right for you, and this step is for activation and making it right for you. Just as we are encouraged even in the bible, to ask so that we can receive  https://www.bible.com/bible/97/LUK.11.9.MSG, you need to do the asking. Also, if you are struggling with asking due to cultural or other valid reasons, a book I will recommend for you to read is The Aladdin Factor [ https://www.amazon.de/gp/product/0425150755 ].

    Depending on the size and structure of your organization, an inconspicuous benefit of doing this is how well it opens you up to receive information about opportunities that exist but are not [yet] written anywhere. You also get to know early enough about things that are possible to achieve, when they are possible, and those that are not. Lastly, it is very important to communicate this as needs and not wants.

    5. Be dynamic with what’s obtainable but do not settle [For Long].

    The graph of life is not in any way linear and expecting that things will go perfectly according to the way one plans it every time is delusional at best. Therefore, there is a need to be a bit flexible about the plan if they happen not to be going well as expected. Spending more time to understand why they are not momentarily achievable and factoring that into your decision is critical at this point. Situations like, there could be people ahead of you in your chosen learning path and your organization is prioritizing them, a start date of a much-coveted project just got moved due to external economic factors, or maybe your manager is a first-time manager who is also just learning about how to successfully navigate the culture of your organization. Things do take time sometimes, don’t be too hard on yourself.

    However, your plan should also include a reasonable constraint within which you can operate and live with such unforeseen circumstances without feeling unhappy for long and should your stay in an organization fall below that, it might just be the best time to start working on your exit.

    A useful question to ask at almost any point is this if I am to start making regular updates to my resume, will there be meaningful and impactful additions to make every time [month, quarter, year] if I continue along my present path?

    To summarize:

    • Have a professional career plan (short or long-term) with a focus on how much learning you would like to get.
    • Lead your professional life with it.
  • Technology, Digital Payment Solutions and Africa’s Future

    Technology, Digital Payment Solutions and Africa’s Future

    Note: This post originally published on 03/11/2017 on my old blog

    It is almost a year since I submitted a short write-up on the above topic for the Africa Technology Summit Ticket to serve as a personal guide not only as a technology enthusiast but also as an active member of the ecosystem.

    History is there to guide us when it comes to decision making and at the heart of Africa’s history, we have the trade (i.e. education, goods and services, tourism. etc.) not minding the formalities and legality. African countries should, therefore, identify their individual strengths (values), develop them to a marketable and exportable level so as to benefit other nations who may need them as finished products or as prerequisites to produce theirs thereby continuing the value-exchange cycle.

    Payment in numerous forms lies at the centre of every exchange of values with its digital approach over the years proved to be a better and preferable way while there are continuous efforts to make it even better. The volume of value-exchange taking place will be a function of the number of participants (population) which is not a limiting factor for Africa.

    We, therefore, must identify ways to offer digital payment solutions that will first absorb and educate African “traders” considering the level of literacy, infrastructure and her multi-lingual, multi-currencies, multicultural dynamism.
    Africa future lies in exchange of values within her nations, at the centre of this exchanges is the need for payment and which has its digital approach as the best.

  • of the many problems hindering HealthCare digitization in Nigeria

    of the many problems hindering HealthCare digitization in Nigeria

    Note: This post originally published on 03/11/2017 on my old blog

    “Things may come to those who wait, but only the things left by those who hustle.” -Abraham Lincoln.

    Permit me to substitute the word “work” for “hustle” in the above quote. I often wonder if we have to play catch-up in everything while dwelling on things that other developed nations have or are already successfully moving away from. I believe that if we work in the right direction, our transition from the “catch-up” phase to the “racing-with” phase will be seamless and faster than we might have ever thought. In this short article, I will be highlighting three issues that I think are presently militating against development in the healthcare-IT space especially as regards its adoption and benefits.

    I focus on HealthCare-IT not only because I am a trained medical professional but also because I have worked with some of them as a Software Developer. In addition, I have also gathered experience over the years while working on CareMedica and other HealthCare-IT solutions. Currently, there are several indigenous solutions in the healthcare-IT space covering several issues such as maternal health, blood banks, health insurance, and personal health records. I think that existing solutions need to be maximized while more solutions need to be created. There are several factors militating against the actualization of progressive digitized healthcare, some of these factors will be highlighted in this paper with the hope that it will spur discussion that will lead to a change in the status quo.

    Digitization of health care has its advantages and drawbacks. I am however of the opinion that the advantages far outweigh whatever disadvantages that presently exist. Some of which have been discussed extensively in this overview. I will look at these issues from the perspective of a healthcare service provider’s problem.

    Will / Expertise?

    Digitization of medical activities depends heavily on the computer literacy level of the service providers. A larger percentage of the few healthcare organizations I have been privileged to come across and work with in the past are chaired or owned mostly by mostly owned by persons from older generations who are wary of fully embracing digitization. With the majority of the private healthcare service providers being controlled by this set of people, the chance of successfully implementing any form of digital approach might remain very minimal as some even term it “Laziness”. It is hoped that soon when younger people who are more open to information technology become key players in the healthcare sector, there will be a positive change in trends.

    In a few cases, we have had to rework the general user experience of CareMedica before and after initial deployment based on user preference but I must still mention that the lack of will of an average healthcare worker to adopt the digital approach to his/her work cannot be overemphasized. This is more so because a “notable” percentage still views it as a way to reduce the importance of their task(s) rather than viewing it as a viable means to improve their productivity. The reluctance to adopt digitization is due to their lack of expertise, their unreadiness to learn a modern way of doing things, and the misconceived notion that their jobs are threatened by the process. It is therefore obvious that to digitize any healthcare setup, both top-level management and employees must be sensitized about the advantages of the process to ensure that misconceptions do not discourage adoption.

    Any organization seeking to digitize must at a preliminary stage, consider these issues so as not to waste limited resources that might be committed to the process as this can frustrate the solution provider and hinder implementation.

    To prepare employees for the digitization process Healthcare organizations can organize related training(s) for their employees or where convenient encourage and sponsor them to seek external training within a stipulated. The human resource management department may also factor in and prioritize computer literacy with a set proficiency level in its subsequent recruiting criteria. While some Heads of HealthCare setups have shown a great commitment towards going completely paperless, I will also advise that digitization can be best achieved gradually in stages. This will members of the organization a chance to become familiar with and increase their expertise in the new approach.

    Infrastructure.

    The core infrastructural requirements for the successful digitization of any healthcare setup are a reliable computer network and “POWER”. Epileptic power supply remains a recurring issue in Nigeria. To bypass this problem, a few healthcare setups are adopting alternative renewable energy options at a great cost. Owing to the increased costs incurred by providers from having it rely on alternative sources of power, one may argue that the growth of the healthcare digitization market may be stalled owing to the high cost of maintenance. A company seeking to be digitized must first address its power issues before starting the digitization process as resources will be greatly wasted if this issue is not resolved early. The cost of setting up a computer network is arguably the easiest in the whole healthcare digitization process as its mode and type are always more of a function of preference and capital provided by the organization and less of the solution’s requirements.

    As has been stated, setting up a computer network is very easy as it can be scaled up to the desired level at any point in time when deemed necessary. The cost of setting up a renewable source of energy can, however, be very expensive but that seems like the only feasible option at the moment for any healthcare to avoid any issue in terms of availability and reliability.

    Policy Implementation?

    The vision of the National Health ICT Strategic Framework (2015–2020) vision statement read thus “By 2020, health ICT will help enable and deliver universal health coverage in Nigeria.” While the 2014 National Health Act states that:

    (1) The Federal Ministry of Health shall facilitate and coordinate the establishment, implementation and maintenance by State Ministries, Local Government Health Authorities and the private health sector of the health information systems at national, state and local government levels in order to create a comprehensive National Health Management Information System.

    (2) The Minister may, for the purpose of creating, maintaining or adapting databases within the national health information system desired in subsection (1), of this section prescribe categories or kinds of data for submission and collection and the manner and format in which and by whom the data is to be compiled or collated and shall be submitted to the Federal Ministry of Health.

    Also,

    (1) All private health care providers shall:-

    (a) establish and maintain a health information system as part of the national health information system as specified under section 35(1) of this Bill; and

    (b) ensure compliance with the provision of sub-section (1)(a) as a condition necessary for the grant or renewal of the Certificate of Standards.

    There is currently no data documenting the implementation of the road map and the act which should serve as the backbone of the digitization process. Despite these challenges, I would love to encourage all our medical professional bodies to continually demand the full implementation of the Health Act as well as other supporting policies deemed fit to move digitized healthcare in the right direction.

  • We are not cursed and there is nothing pitiful about IT.

    Note: This post originally published on 26/04/2018 on my old blog

    So a close friend of mine posted and asked this question on his Facebook wall on the 10th of April, 2018

    “It is pitiful that those talking against the Presidential ambition of young minds are young minds. Are we cursed?”

    What I have below represents my long comment under his post (with little edit after proofreading it afterward but exactly the same submissions) which surprisingly created different reactions positively and negatively. I have decided to also publish the comment here, first to serve as a personal guide in the future, if I ever have to do anything along this line politically, and to possibly initiate further discussion on the same topic with interested persons.

    Here you go:

    In as much as I don’t have anything against any young people running for any political seat, I will also not vote in one, just because he or she is young because that is the least factor I will consider in making a decision that has to with political leadership and I will try to explain my reasons as short as possible.

    SYSTEMs and STRUCTUREs

    Since this is purely political. One of the things we lack in our political space is ideology; as a person, as a political party, and largely as a society. So these young people we are talking about, what are their ideologies on key National, State, or Local Government issues? What is their understanding of the present political system and structure of the country?. I know the existing structures are bad and unattractive, but sadly that is what presently binds us as a country.

    So how do we change these systems and structure ? from within ? from outside? I will posit that it is as much as difficult to change it from the outside if not more so than changing it from within. Most Youths want the “CHANGE” but they are not ready to work or lead GENUINELY? How do you change something you don’t understand how it works? and I am sure you will agree with me that a larger percentage of Nigerian youths don’t adequately know how the present system works.

    Most of the democratic Young leaders we always use as examples worldwide are arguably and largely products of and have worked diligently to improve their political system at one point in time. So they work with their like minds to build ideologies, share/deepen narratives, and generally have a stand, whether relatively right or wrong. So, coming out to run for a political position a few months before the election, hoping to bank majorly on the incumbent’s failure is nothing but wishful thinking at best. Being a young person is just a narrative without a strong foundation and definitely not core to our governance as it stands. Also, I can only, at the moment point to REVOLUTION/COUP as the only way to change the system from the outside and if you will agree with me, that is presently not feasible in Nigeria due to other dynamics we have; amidst which we have heterogenous culture, ethnic and religions.

    GOVERNANCE

    Sequel to my first point, I personally rate governments or societies worldwide based on these yardsticks; LAWs, POLICIES, and REFORMs. So, the younger ones running for political leadership seat need to come up with these things and how they want to achieve them. Our Education is bad, how do you want to improve it? Do we have a high rate of unemployment? how do they want to reduce it? Inflation? What reforms, laws, and policies are they going to push forward to solve these problems (which hopefully they have identified), same can be said about our internal securities and healthcare systems and not just mere making noise about CHANGE !!, TRANSFORMATION !!, CHANGE THE CHANGE !!  everywhere. What is their stand on these young people on issues like LandUseAct, State Policing, Resource Control, and Local Government autonomy?

    POLITICS and WINNING ELECTION

    Also, politics is a game of numbers especially in a democratic setup and the same goes for winning elections. For the young people, have they personally and objectively evaluated their political weight before deciding to run for a position? Even in saner democratic societies, elections are largely won by political parties and very few based on individual popularity. To be clear on political popularity which is also directly based on their political parties or personal political stand. You don’t expect Bill Gates or Mark Zuckerberg to win the US presidential election just because they are wealthy, well-traveled, internationally renowned, young or old? Do you?

    These young people, what political party are they representing? To be clear again, what is the number of their political party/groups registered members in their respective Local Government of origin? in Alimosho LG in Lagos state, UVWIE in Delta state, or EGBEDA in Ibadan? I won’t be able to summarize how this helps in winning elections and I have seen and read about the same thing even in our highly revered saner climes.

    This weight can only be built based on political popularity which is also a function of how much “Human Face” your supposed leadership or party has. How do people connect with your leadership? Where are these young people during the #OccupyNigeria? Where are they during the recent Fuel pump price increment? Where are they during the #OtodoGbame issue in Lagos state? where are they or what is their stand on the Boko Haram, Fulani Herdsmen issue? Because these are arguably their potential voters, they are supposed to vote for them based on what?
    It is when they show workings on issues like these that we can now start bringing in other distracting but also important factors like Age, Experience, Foreign Exposure, Wealth, etc.

    NOTES:
    1. Fela Durodoye cannot win any state in Nigeria as it stands and the same goes for Sowore whom I guess you are indirectly talking about if you objectively look at my reasons as discussed above, you can deduce the position they both should be running for instead of the presidency.
    2. In as much as we like it, we are not going to have a “youthful” president until we start producing competent ones at the National Assembly as well as at the state levels. Yahya Bello and Dino both of Kogi, Dimeji Bankole of Ogun, and Adesina of Oyo State quickly come to mind.
    3. True political leadership is HARD WORK and yes I mean SERIOUS HARD WORK and that is why you see most intellectuals always getting appointed positions instead of elective ones.
    4. There are good people and potential leaders in APC, PDP, SDP, etc. in as much as we will agree there are, generally in Nigeria.

    Let me end this with a favorite quote of mine:

    Nigerians likes to speak in English but think in Vernacular – Father Kukah

  • Stop Bashing Tithe and Offerings, Make Your Pastor More Accountable Instead

    Note: This post originally published on 09/11/2017 on my old blog

    It is always funny and annoying sometimes, that every time we have to rant about clergymen living or spending lavishly, we always stir the argument towards the point where it becomes an attack on Tithe and Offerings or those that try to pay it faithfully and diligently. This is largely done in disguise as an attempt to educate or liberate faithful payers. ..then you will know the truth, and the truth will set you free. 

    The fact is that an average registered and regular churchgoer does not pay his/her tithe faithfully, give or take a maximum of 60%. I am saying this based on personal experience and closeness to the Altar a couple of times. You can also verify this if you are close to your church finance committee (if you have one) or if you have the time to go to your church’s monthly, quarterly, or annual report meetings if your church does.

    Paying Tithe is solely based on belief and is more like a contract between you and your God, not you and your Pastor. The benefits are far beyond financial prosperities which we always overemphasize around here, maybe due to our economic situation. The condition around it is very simple If you don’t believe in it, don’t pay it.

    I have yet to meet any faithful Tithe payer complaining about how his/her Tithe is being spent and I have also met quite several non-tithe payers who are financially doing fine. You don’t need to be a tither to be monetarily rich, you don’t even need to be a Christian. There are succinct non-tithe related, biblical, and non-biblical principles that guide one as regards being rich, diligence is just one of the many. If you are paying your Tithe solely because of financial breakthroughs, I will say you are doing it wrong. Also, the modalities of where and how to pay your Tithe and Offerings are well stated in the Bible. Still not sure whether paying Tithe is biblical or not? Read your bible, and pray for guidance from the holy spirit.

    HOW COME CLERGYMEN HAVE OR MAKE SO MUCH MONEY? FROM WHERE?

    From Outsiders:
    Some clergymen do get quite a handful amount as “blessings or rewards” from outsiders who might have come for spiritual guidance or assistance, based on recommendations from someone who has had an earlier successful encounter with the “man” or from a church member and they tend to reward the clergyman afterward for his supposed successful divine intervention. Whatever proceeds come out of this, is for the clergyman and not for the church. I will say a clergyman will get more of this based on his or her audience, strategy, manifestation, and anointing.

    Personal/Impromptu Projects:
    I have observed this one long enough and I think it generally fits in with our ego as Nigerians: always looking for an avenue to show off. I am not saying this is bad or not, each man to his own. All I am saying is people tend to answer a public (altar) call for donation/giving, which is sometimes done with additional “emotional” exercise from the clergyman rather than a secret one where people will not notice the donor/giver. Proceeds from this too rarely go into the church account unless clearly stated that it is a church project which might also be a deciding factor in determining the form of emotional gymnastics applied.

    Honorarium:
    This affects clergymen who are rewarded when invited to programs outside their primary place of worship. Programs such as Bible study, conventions, revivals, and the like and I don’t think most of them reject it nowadays, which is also fine and can be quite a handful. This also includes respected church workers e.g. instrumentalists, Teachers, and Deliverance ministers and it has nothing to do with the church account but that of the individual.

    Personal Ventures:
    Also, just like any human being, quite a number of clergymen have their personal ventures which they run and through which they make additional income. Some are prolific writers, teachers and speakers and this is their money and not that of the church.

    I support taxing:

    • for-profit ventures of churches or any religious setup e.g. Educational Institutions, Consulting arms, Sports Institutions e.t.c because they are businesses regardless of who runs them.
    • Clergymen with a notable and regularized income because they are not different from regular tax-paying persons.
    • For-profit ventures of clergymen (this I think they do already, not too sure).

    MY CHALLENGE TO YOU:

    • If you are not comfortable with the lifestyle of your pastor, you can change your worship center. Your aim is to worship God and not your pastor.
    • You are free to criticize your(any) Pastor’s lifestyle but not Tithe (since they are arguably not feeding off it as argued ) nor the faithful payers. Most of the prominent pastors supposedly living large are arguably doing so mostly through personal incomes not limited to the aforementioned ones.
    • Ask your Pastor or church committee to start giving out general reports (finance inclusive) monthly, quarterly, or annually as best suited.
    • Ask your church to set up a finance committee if you don’t have one already. This will help everyone to be more accountable.

    THE SOLUTION:

    The state needs to come up with a structure to tax as much as possible these high-earning clergymen just like it will tax any high-income earners. It might be difficult to achieve as this is a subset of a larger state system or structural failure and some of these income routes are passive.

    My argument, in conclusion, is, therefore, that, if every faithful church member stops paying Tithe and Offerings today (the regular victim of our rant), that will not stop our clergymen from making money and inadvertently spending lavishly.

    …the argument of whether clergymen are supposed to morally or rightfully live-large will be for another day after all “dey sef, dey be human beings

  • Election is here again. Be Selfish, Be Responsible : USE YOUR HEAD

    NOTE: This post was originally published on 21/10/2018 and was later migrated here from my old blog

    Politicians will always do politics as much as they can, morally right or not. I will, therefore, say you must do the same with your single and precious vote in the next coming election. This season of election is upon us all, do not allow anyone to give you something to hate thereby doing the thinking for you, your focus should solely be on what you want to achieve via the government in the next four years, they (politicians) are doing or have done the same. Anyone telling you who you should vote for and why you should vote for them is nothing but a politician and I can assure you, they have done a similar evaluation. So, I say again, you must also be selfish even as you prepare for the election.

    It is very easy for an average human being to point out what they don’t like or want, but clearly stating what they want and why they want it (them) is much more difficult. Your favorite or most disliked politicians have done almost the same thing and that is why some of them present themselves as if they are only passionate about solving your problems while in truth, their first priority is actually solving theirs or to put it in a better way, achieving their dreams. Therefore, your main focus should be on which of them possesses the highest potential or presents the highest probability of helping you in fulfilling your dreams while they fulfill theirs, positioning yourself accordingly and I must say, voting for them is one of the easiest ways in achieving that.

    Do a list of the things (top three) you want to achieve via the government, carefully evaluate and rank each of the candidates based on that, and see which of them is likely to help you in achieving those three things. Evaluating each of the candidates is not as complex as many might like to think and these are some of the points I think may be of help:

    o    Who is the person?

    o    What has he/she done about your listed three points?

    o    What has he said about the three points?

    o    What is his/her political party saying about those three points?

    o    What has his/her political party done about those three points?

    o    What is his/her party doing about the three points?

    The evaluation weight attached to those questions is clearly your choice.

    Taking a use-case, let us assume you are still in your early twenties, about rounding up your first or second degree. Therefore, there is a likelihood that stability of education and job creation is going to be on your top three list as both are likely going to be your focus in the next four years. Therefore, you need to do the hard work of evaluating which of the candidates is educated? Cherish and respect education? What has the person done about education before? Has he/she created the kind of job you would like to have before? Will you prefer the kind of jobs he/she has created (if he/she has created any) or promising to create? What is his/her party saying as regards education or job creation? What has his or her party done as regards education or job creation?

    To some, issues like affordable health care, adequate pension payments, easy access to forex, getting government contracts, the possibility of a political appointment, free primary education, adequate power supply, freedom of speech, tax clearance, etc are going to be in their priority list and they are all valid.

    You can see that this is not going to be the same as that of your Uncle/Aunt who lives in Manchester and has been trying to tell you who you should vote for or support. It is also not going to be the same as that of your Pastor/Iman/Babalawo. If you are in doubt, the next time they try to pull the same campaign stunt on you, bring out your list, roll out your set of questions, and ask them to provide answers to all of them before you buy whoever they are selling. I will say again, USE YOUR HEAD.

     Religion, age, ethnicity, societal perception, and family background of the candidate are going to top or be part of the evaluation criteria of some people and there is absolutely no problem with that in as much as they can achieve their (next four years) dreams with that and it is also their constitutional right. However, if the case is not the same for you, there is no point in joining issues with them, at least politically. Again, USE YOUR HEAD.

    Once you have properly evaluated and concluded about your candidates, if you can, you can seek additional people that your list is similar to theirs and you can project your candidates as much as possible. Campaigning solely against another candidate is nothing but political vanity, your focus must majorly be on projecting yours.

    Whether your candidate finally wins or not, one thing I can assure you that you will gain from this kind of exercise is that you will have things to stay informed about when governance starts and criticize in case your candidate starts derailing (as usual) from what they initially said or promised. It also helps you to seek alternatives if and where possible as time passes.

    The most important point I actually want to pass across is the fact that “Election decision has consequences and we need all to be more responsible when making that decision”

  • WHY and WHEN you should consider a Graph Database for your next project: NEO4J

    I am presently working on a team project where we were tasked with the responsibilities of developing a biology domain-driven application. Of course, it is a research project and part of the requirements for my present academic program, therefore I will only be able to talk about the generic part as regards technologies learned and used. I must say I was very excited about this project, especially concerning the data storage and processing part where we need to work with NEO4J. I will try to document my thoughts and experience here as much as possible as things unfold.

    This article is just a quick overview of the said topic and much more details can be found in the book Learning Neo4J by Rik Van Bruggen which I reference a lot. The book, as well as other interesting ones, can be obtained for free from the official NEO4J website here 

    What is Neo4J?

    An open-source graph database system,  based on the graph theory Wikipedia. Generally, it belongs to the NoSQL classification of database management system even though it inherently belongs to a class of its own as you will discover later in this write-up. The NoSQL database management system family can be further categorized as follows:.

    •    Key-Value stores eg. Redis and DynamoDB.
    •    Column-Family stores e.g Google’s Big Table.
    •    Document stores e.g Couchbase and MongoDB.
    •    Graph databases e.g Neo4J, OrientDB, and FlockDB.

    They have also been tagged “task-oriented” database management systems as they focus more on tasks that need to be performed in order to meet certain goals or to achieve a certain performance standard instead of generics and this makes them more adaptable and suitable when developing domain-driven applications.

    A graph structure means that we will be using vertices and edges (or nodes and relationships, as we prefer to call these elements) to store data in a persistent manner. As a consequence, the graph structure enables us to:

    • Represent data in a much more natural way, without some of the distortions of the relational data model.
    • Apply various types of graph algorithms to these structures

    Why Neo4J?

    1. Built for graphs, from the ground up.
    2. Transactional, ACID-compliant database.
    3. Made for Online Transaction Processing.
    4. Designed for scalability.
    5. A declarative query language – Cypher

    Software Engineering “Best Practices” emphasizes the constant and continuous need to always use the best tool(s) for every task as there is no tool; be it programming language, development tool, technologies e.t.c that has the fit-for-all attribute at the “best” category. The same applies to Graph Database as they are not fit-for-all scenarios when it comes to database management systems but is developed just like other technologies to address specific needs.

    Why NOT Relational Database Management Systems

    For someone whose first encounter with a database management system more than a decade ago was with a relational one (MySQL) and who has used the same ever since for almost every application development involvement. I had another but short encounter with NoSQL (CouchDB) about two years ago when an application I was working on at that time was scaling fast than planned, required that we perform analytics on the data at a faster rate and expanding use cases, which came with the need to have a flexible “schema”. Thanks to my then Technical Team Lead for suggesting and arguing in favor of NoSQL. It is also safe to conclude that one might never experience any of the relational database management system’s limitations until there is a need to scale.

    Summarily, the issues with relational database systems are:

    • Relational Database Systems suffer at scale as growth emerges, and query response times become poorer.
    • Relational Databases are quite “anti-relational”: complexity in designing one grows as we move towards different domains and as this occurs the complexity in joins operations become worse which affects performance.
    • Relational databases impose a schema even before we put any data into the database and this is not applicable in a lot of domains where the need for flexibility is primary.

    PROPERTY GRAPH: The Data Model for Graph Database

    A data model refers to the logical inter-relationships and data flow between different data elements involved in the information world.  It also documents the way data is stored and retrieved. Data models facilitate communication business and technical development by accurately representing the requirements of the information system and by designing the responses needed for those requirements. Data models help represent what data is required and what format is to be used for different business processes. Technopedia

    A data model is an abstract model that organizes elements of data and standardizes how they relate to one another and to properties  of the real world entities. Wikipedia

    Property Graph defines how we will be storing and retrieving our data in the graph database.

    Features of the Data Model: 

    1. There is no fixed schema.
    2. Partly because of the schema-less nature, it seems to be a very nice fit for dealing with semi-structured data. If one node or relationship has more or fewer properties, we do not have to alter the design for this; we can just deal with that difference in structure automatically and work with it in exactly the same way.
    3. Nodes and node properties seem to be quite easy to understand. They are analogous to tables we have in relational systems.
    4. Relationships are a bit different and directional. They always have a start- and an endpoint and be self-referencing. They are explicit and can also have properties.

    WHY and WHEN to use a Graph Database:

    1. When you are dealing with complex queries: These are the types of questions (queries) that you want to ask that are inherently composed of a number of complex join-style operations. This poses a problem that becomes exponentially bigger when dealing with multiple tables and large datasets with every table join that you add. A simple hypothetical example can be: finding all the restaurants in a certain London neighborhood that serve Indian food, are open on Sundays, and cater to kids. In relational terms, this would mean joining up data from the restaurant table, the food type table, the Opening hours table, the Caters for a table, and the zip-code table holding the London neighborhoods and then providing an answer.
    2. When you need to perform In-the-clickstream queries on live data:  This has to do with performance as regards query response time and Graph Databases’ Index Free Adjacency property is one of the reasons.  You can read further on this here
    3. When performing path-finding queries: This type of query is extremely well suited for graph databases, they are queries where you would be looking to find out how different data elements are related to each other.

    When not to use a Graph Database

    1. Large, set-oriented queries: If you are trying to put together large lists of things, effectively sets, that do not require a lot of joining or require a lot of aggregation(summing, counting, averaging, and so on) on these sets, then the performance of the graph database compared to other database management systems will be not as favorable. It is clear that a graph database will be able to perform these operations, but the performance advantage will be smaller, or perhaps even negative. Set-oriented databases such as relational database management systems will most likely give just as or even more performance.
    2. Graph global operations: finding clusters of nodes, discovering unknown patterns of relationships between nodes, and defining centrality and/or in-betweenness of specific graph components are extremely interesting and wonderful concepts, but they are very different concepts from the ones that graph databases excel at. These concepts are looking at the graph in its entirety, and we refer to them as graph global operations. While graph databases are extremely powerful at answering “graph local” questions, there is an entire category of graph tools (often referred to as graph processing engines or graph compute engines) that look at graph global problems.
    3. Simple, aggregate-oriented queries: simple queries, where write patterns and read patterns align to the aggregates that we are trying to store, are typically served quite inefficiently in a graph, and would be more efficiently handled by an aggregate-oriented Key-Value or Document store. If complexity is low, the advantage of using a graph database system will be lower too.

    PS: This post was migrated from my old blog. Its original version was published sometime in 2017.

Leave a comment

Blog at WordPress.com.

Up ↑