Author: David

  • The difference "" vs null vs 0

    The difference "" vs null vs 0

    Recently as I was conversing with my young friend, he looked at some of my code and wondered why I was using a zero or null or empty string (“” or ‘ ‘ ) instead of using one wherever I wanted.
    Programming is an interesting though weird or confusing discipline, especially to the novice things don’t mean a lot because most novices concentrate on the output than the efficiency and effectiveness of the output. For the mature programmers optimization is key, after all at the end of the day a user wants something working but requires less attention than something erroneous and slow.
    So let’s get to it. How does null, empty string and zero differ?
    Similarities
    First of all the similarity is of the three is that they are all values to variables and mostly used as the initial value of a variable.
    Second the empty string and null will usually output nothing if printed on the screen.
    Differences
    Differences might be defined differently per programming language.
    For example in Python there is no null but there is None which means the same as null in other programming languages.
    To find out the datatype of None and other values in python use the type( ) function e.g type( None ), will return NoneType data type in python. While in JavaScript we use typeof value to find out the Data type of a value stored in a variable. i.e. console.log( typeof null ) will return object as the data type of null.
    PHP 4+ we use gettype( ) function to find out the datatype of the value stored in the variable. For example gettype( null ) will return for NULL.
    If you are a JavaScript novice it’s good to pay much attention to null values since they are of data type object. For example find out how object data types are treated in JavaScript before you hit a nail in your foot.
     
    Almost all programming languages “” or ” is treated as a string and it occupies the space in memory of the size that is occupied by a string or char datatype. In fact in JavaScript if a value starts with ” even if it’s proceeded by a number or decimal it will be type cast to a string so that the resulting value will of data type string.
    So be careful initializing variables with ” especially if they will be used in mathematical expressions.
    In Java, Python and PHP 0 is treated as an integer whereas it’s treated as a number in JavaScript because in JavaScript integers and floats are number data types. I know most people might be wondering why not a Boolean?
    Though 0 or 1 might represent false/true they are not treated boolean data types.

    Why care?

    It’s always good to code what a programmer and fellow programmers understand to avoid spending time in refactoring than improving functionality and optimization.
    It’s also important to ship a software which will give more predictable results than not to avoid the users plucking hair out of their heads, assuming they’re wrong yet it’s the programmer is the calprit.
    DataTypes determine how big your program will be and how it nay handle memory, avoid confusing by planing to code rightfully from the beginning.
    Note: 
    This tutorial assumes you have some programming knowledge and some level of practice with the one or more of the programming languages cited in the tutorial.
    The tutorial is dedicated to Were Calvin a Ugandan African motion graphics designer and emerging front-end developer practicing at Gagawala Graphics limited.

  • Web application development – Part 5

    Web application development – Part 5

    Welcome back, today in the web application development series, part 5 we look at how WordPress makes the task easier than ever before. Previously in part 4 we covered the components that make up web applications, which you can find here if you missed.
    Of course they are many tools in contention but of all why WordPress?
    Truth be told for over a decade, developers have used and are still using a Model View Controller aka MVC pattern architecture to develop web applications. Giving security, separation of interface from logic, maintainability and scalability as reasons for the pattern’s popularity. Popular web applications providing this architecture are Laravel, cakePHP, CodeIgnitor among others.
    WordPress follows a MAP aka Monolithic Architecture Pattern which is defined as, a monolithic application describes a single-tiered software application in which the user interface and data access code are combined into a single program from a single platform by wikipedia.
    Not to conclude that MAP methodology is better than MVC in comparison. The fact is that both are good fit for different scenarios. My major reason to use WordPress is to help someone learn an alternative way of powering web applications if  they know of another way.
    To come up with a fully functional application we shall have develop a theme and plugin, thereby learning about developing a WordPress theme and plugin.
    The tutorial will also offer a good opportunity to discover WordPress plugins you might have never heard of.
    WordPress comes with
    A database
    Already available to us is the a small but powerful WordPress database with fewer tables than other systems for which you have to create your own database. WordPress’ consideration to introduce meta tables is one of the best things about it.
    User management and authentication
    Additionally one of the most hardest part about developing web applications is the authentication system, which can easily be broken if developed poorly.  This is what we have to be happy about with WordPress, they provide an easily extendable yet secure authentication system.
    Back-end user interface.
    For the biggest part of our development we shall engineer the front-end system because WordPress has got us covered with a fully customizable back-end user interface called the WordPress Dashboard.
    Let’s tune in next time and get the job done.
    Meanwhile you can take a look at Custom post types, custom fields, custom taxonomies, theme and plugin development in WordPress by searching in google. I recommend reading articles of codex.org and wpbeginner.com.
    Cheers!
     
     

  • Learn to develop web applications the modern way – Part 4

    Learn to develop web applications the modern way – Part 4

    Hi, there!
    Before we continue into the 4th of part of the series, I would like to put forward a word of thanks to everyone putting in the effort to consistently follow my tutorial. I’m sure it will pay off in the long run, don’t give up yet!
    So far we have looked at the requirements, compared web designing and web application developing  and looked at extending as being a smart practice that every coder must adapt.
    I would like us to continue by looking at the components which make up a web application. It’s important to understand the basics which is a good fallback as you continue in the journey of a great career.
    Let’s get to it.
    In a nutshell they are two components which make a web application i.e. the User interface and the storage engine.
    Continued on 1/14/2018
    User Interface also known as UI is the component through which we (users) interact with the web applications. A fully functional web application’s UI is divided into two parts; one being the front-end and other the back-end. The front-end usually used by the public whereas the back-end used by users who are allocated special privileges  of the web application.
    A good example of a web application is WordPress and using it as an example, the administrator can add new users who can be administrators, contributors, subscribers and editors. Additionally if you create a Website/blog on WordPress, the public looks at the front-end to read your posts while you login to the dashboard to write posts.
    Storage engine commonly known as a database. This makes the major difference between a website and a web application. Not to say, that websites don’t have databases or storage engines. Rather to emphasize that web applications will normally have some sort of storage engine. Databases can come in many types depending on the type of content to be stored and used. Example of databases powering web applications today are MySql, PostgreSQL, SQLite and WebSQL.
    You want to learn more about these components which make up web applications? Just visit google and start your research, you will find millions of helpful information.
    Let’s go straight to the next part of the series about learning how to develop web applications utilizing modern methods.
     

  • You will most certainly love this reading about coding

    You will most certainly love this reading about coding

    If you want to be a relevant developer 5, 10 or 15 years to come, don’t make no mistake and ditch JavaScript.
     
    Avoid the hype of emerging frameworks if you don’t trust your JavaScript vanilla knowledge and skills. Of course many smart developers in your network will put up a strong challenge which will most certainly make you feel irrelevant but man up and stick to what’s fundamentally right.
     
    Don’t take it for granted, if you have strong vanilla skills you would be able to learn and grasp almost any JavaScript framework or library or plugin in less than 72 hours or so.
     
    Have an understanding that competent developers, don’t work solo, they have an ecosystem consisting of teams. You’d rather code a process in vanilla that you understand than copying and pasting some library code in the app but you can’t answer why, what, when and how. Efficient software is developed by patient and efficient coders.
     
    On top of that learn C++ or Java which languages have been around for forever on top of having top notch OOP maturity level. Which any JS library is embracing but sometimes it’s harder to grasp in JavaScript if you don’t compare it to how it’s done in another language.
     
    Since most processes in JS are asynchronous it’s the not the same in JAVA and C++ perhaps giving you a big opportunity to understand both entirely.
     
    Last but not least, relevancy is subjective though the more efficient solutions you put out in production is relative to the large number of human problems you are helping to solve but you can’t achieve that if you don’t learn and practice breaking down complex tasks into simple modules on paper before getting your hands dirty.
  • Learn to develop web applications the modern way – Part 3

    Learn to develop web applications the modern way – Part 3

    In the programming industry like others, you will find many terms(vocabulary) which are not usual in  common speech. In this article of the series about “learning how to develop web applications in the modern way”, allow me introduce to some of those terms. In case you missed reading some parts,  click here to read part one or click an item in the table of contents below.

    1. Prerequisite
    2. Web design vs Web applications development
    3. Extending is smart!
    4. Components of a Web application.
    5. Powering web applications with WordPress
    6. The do list application

    What is extending in programming? 
    In simple terms it’s the opposite of developing applications from scratch. In detail it means a coder will write his/her own application from the start to finish without using and relying on other programmers code. Therefore to extend is when a coder starts with someone’s code to develop an application or feature.
    In Object Oriented Programming paradigm, to extend means to derive/instantiate objects which inherit features in terms of method and properties from existing class(es).
    What are the advantages of extending?

    1. It makes programming a lot easier because you don’t have to write every line of code by yourself.
    2. It is cheaper than starting from scratch which will require a bigger team and tools for the team besides investing in the team to learn how to work together.
    3. Availability of help from all corners though this depends on the choice of framework. Most programmers choose a framework which has a large number of contributors, the profile of the founder, the number of tools in place and how old it is.
    4. Easier learning curve due to availability and supply of learning material on top of a comprehensive documentation.
    5. Ask me how people become better than others at coding and I will tell you that the secrete is hidden in reading code written by others whether good or bad coders.

    My personal recommendation is to spend more time creating solutions than learning how to create solutions. In the upcoming part, share about the basic and major components of a Web application.
    Merry Christmas and a marvelous New year.

  • The difference! Website designing and Web application development.

    The difference! Website designing and Web application development.

    Are these just industry terms to confuse the novice and the customer? Is the difference really worth knowing and understanding or is it a wastage of time? As we continue on the journey to learn how to do develop web applications, I thought it would be good someone clear the question before us.
    What is web design?
    In my opinion is the process of using a set of tools to create and put together a navigable elements and content accessible through a web browser. The set of tools are majorly the graphics design applications such Adobe illustrator, Adobe Photoshop, GIMP, Sketch and content management systems such as WordPress etc. Though web designing could involve use of coding with HTML, CSS and JavaScript, code is not mandatory. That said someone who has never touched code can put things together and produce a highly performance website.
    What is Web application development?
    In my opinion is the art and science of using coding to develop software that is accessible through a web browser. Though they are tools like script-case that help I.T professionals to come up with web applications, web application development requires someone to have some good coding skill to come with a fully functional web application. Examples of web developers are people capable of developing systems like facebook, linkedin and WordPress to mention but a few.
    Why even care?
    You may wonder, why of all things must I know about the differences between website designing and web application development. Many people’s reasons could differ from mine. I think if you want to become something, there is something that competes with what you have in mind, therefore you must ultimately pay attention because it’s very vital in helping one choose the right path sooner than later in life. Since developing a career involves investment of valuable resources… it’s always good to look at the right direction and avoid destruction.
    Let’s meet next week for the next item on the agenda of How to develop web applications utilizing modern ways which is Extending is smart!

  • How to develop web applications. Prerequisites

    How to develop web applications. Prerequisites

    Allow me start by apologizing for missing to post in the previous week. Without further a do, let me start from where we stopped in part one of the series about learning the modern way of developing web applications.
    But who am I and why do I fit to be your tutor this festive season?
    I’m an African Ugandan internet student, businessman and trainer. Besides technology, I purposely encourage and guide people through the process of becoming self-aware for mindfulness and peace.
    Over the years I have studied and learned about PHP, JavaScript, HTML, CSS, SQL and Content Management Systems which has helped build a skill, career and establish Gagawala Graphics Limited a business offering web hosting, web management and web design in addition to printing and graphics design to people of Uganda both within and in diaspora.
    I tut at Hostalite Cyber Academy and part of the core volunteer team at You Inspire You.
    What do I need to know before following the series?

    • I wouldn’t say you need much if you’re passionate besides being able to code in HTML, CSS, JavaScript(jQuery) and VueJs, and PHP(OOP).
    • You should also be able to find a web host to practice or alternatively install Lamp(linux) or MAMP(iOS) or WAMP or XAMPP(windows).
    • Ability to install and setup WordPress.
    • Lastly but not least you should be able to read and understand English.

    What next?
    For now get ready for next part of the series which is Web design vs Web applications development.
    In that article I will share my opinion backed by 5 year experience about the differences between web design and web application development. I find this necessary because many people confuse the two.
    See you next week.

  • Learn the modern way of developing Web applications this festive season for free.

    Learn the modern way of developing Web applications this festive season for free.

    If there is anything I’m passionate about nothing beats the passion to use technology to benefit fellow humans.
    Since I got the opportunity to live in the generation where the world is a global community because of internet, it gifts me the privilege to learn and share. This festival season, I would like teach you about developing functional web applications using modern tools and approaches.
    Take a look at the table of contents.

    1. Prerequisite
    2. Web design vs Web applications development
    3. Extending is smart!
    4. Components of a Web application.
    5. Powering web applications with WordPress
    6. The do list application

    At the end of the tutorial I expect the reader to:-

    • To differentiate web design from web development.
    • To learn the different components together with their functionality in web applications.
    • To develop web applications using WordPress as an underlying framework.

    Stay tuned for the next post, in which I will reveal my experiences and the requirements you need to benefit from this short but practical tutorial.
     
     
     

  • A brief wonder about Uganda's leadership.

    A brief wonder about Uganda's leadership.

    Democracy.
    – A system of government by the whole population or all the eligible members of a state, typically through elected representatives.
    – a state governed under a system of democracy.
    – control of an organization or group by the majority of its members.
     
    Where is inclusion or leadership in the definitions above?
     
    But it doesn’t mean we have to act deaf and blind. If you participated in the bush war using the guns, it’s unnecessary to keep fighting in modern society using words and suppression methods to the population. As young Ugandans can feel the pain and see scars that the war left, probably the catalyst to the leadership negative behavior.
     
    Modernity encourages equity on top of the freedoms of speech, financial inclusion, education, inclusive leadership, share of leadership, mentor-ship, communication, health and security and protection that you promise.
     
    In observation the divide between the poor, middle and rich class is increasing day by day. The fear among citizens is increasing day by day and is observed from some who vote for your leadership just for the fear of the war which could stem if you lost.
     
    Is it what many of you in the army and governance of Uganda fought for? You would need to take a strategic step back and reflect, drawing from the examples of having members of parliament fighting in parliament before the nation, the expense of UGX29M on each individual parliament member to promote the change of article 102b in the constitution in a country where not even the senior public doctors and educators, earn a quarter of the equivalent. Yet the citizens pay taxes on a daily.
    Attached is the picture of Army in Zimbabwe capital Harare after what many refer to as a military coup to overthrow the oldest state leader in the world!
  • Our volunteer's hurting set back!!!

    Our volunteer's hurting set back!!!

    The trendy today in a country commonly known as peaceful and a pearl of Africa since the landing of the Europeans dating back 100s of years ago is the total opposite.
    It is sad to accept but it’s true, the reality and what we have to find a solution for. I used to hear the so called group of angry youths going around Kampala beating innocent civilians and stealing from them what belonged to them. This were just stories on the internet until recently when 3 of my own people, one of them almost lost life to this group. The other two lost belongings such phones, laptops etc.
    One of my people is a young skilled, hard working web design and volunteer aspirant who volunteered to redesign our website youinspireyou.org. Whose way of living has been made difficult by the greedy lazy group of thugs who stole two laptops from him while in a public taxi.
    How did it happen?
    At around 10:00am Calvin took a taxi from Bukoto heading to Kampala city center, on their way they realized there was a lot of traffic jam which prompted them to U-turn through a different route.
    He recalls, being requested to properly close the door closest to him. Then a lot of things happened in this short period of time.
    Upon noticing disappearance of the bag were the laptops, that’s when he was sent out of the taxi.
    What does this mean?

    • Reporting the case to police won’t really help because so many people have lost their belongings in a similar or worse process but no help has been offered to them besides spending some amounts of money to police.
    • We have to take it and agree that Calvin won’t be able to earning a living until after several months.
    • The development of youinspireyou.org website will pause until further notice. Meaning the arrangement of our community technology skills program( Mobile Digital Hub) has been dented/negatively affected since one of the most active volunteers has no means of contributing anymore.
    • Most importantly is to replace the laptops, therefore we have to raise above $1200 and replace the two laptops.

    How do you handle such cases in your location?
     

Verified by MonsterInsights