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.

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.

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 mainly, it is not mandatory. That side someone who 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 come up with web applications, web application developer requires someone to have some good coding skill to come with such a tool.

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.


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.

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.

 

 

 


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 bordered 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 and use a different route.

At the moment he recalls, they requested him to close the door closest to him properly, not giving him room to concentrate they asked him where he was going exactly and before his answer, as he trying to figure out where his bag has disappeared, they sent him out of taxi, later speeding to avoid being caught.

What does this mean?

The incidence means Calvin won’t be able to earning a living until after several months, our website development will stale and our community technology skills program.

We have to find a way of protecting ourselves more than ever before in addition to raising over $1200 to be able to replace the two laptops.

 

 


Web design vs Graphics design, my honest opinion

A few days a friend came to me with a question. I believe it was a result of looking a web design as a tough game. Since profound web designers have to pull off a lot of skills to be able producer an above average website.

Her question was. Of graphics design and web design which one is smaller than the other? Find what I answered below.

Though the answer I gave to her was brief, let me try to elaborate.

By definition.

Graphic design is the process of visual communication and problem-solving using one or more of typography, photography and illustration. – Wikipedia

Web design is the process of creating and updating websites.

Web designers may have some level of graphics design skill especially. Say they could use a graphics tools such as Sketch or Photoshop or Adobe illustrator to be able to create mock-ups which are the static none functional representations of a website, that to me doesn’t qualify web design as the bigger brother here. Rather it’s a symbol of a balanced ecosystem.

Further more, I consider graphics design is divided into primary categories.i.e. Screen and print graphics. Under the screen graphics branch I put sub branches like motion graphics, web design, video editing and animation to mention be a few whereas I put the would be printed at the end of the day like magazine and book publishing, calendars, flyers, brochures, business cards etc under the print graphics branch.

 

 


What will be able to do in 2018?

From experience I know either set your goals for the new year a few months before the end of the current year and be guaranteed some success or end wondering why you’re not developing as some of your colleagues and age mate. Not to mean to compete though, just emphasizing taking full responsibility.

Last year, I planned to be a better coder, tech trainer, team member than the years before.

At the moment of this writing am enjoying every moment I spend with fellow founders and employees at Gagawala Graphics limited. A branding agency located in Kampala, Uganda along Nasser road, where I double as a web developer and operations manager. We intentionally work in an open work space, producing crystal  clear prints, graphics, webs and mobile apps. Doubling responsibilities has never been as easy as said however much it’s a joy to see accomplishments in a good timing and through a peaceful way. Ours is a brand where people don’t get bigger salaries but everyone reports at work everyday, inclusive weekends sometimes.

Towards mid 2016, I met someone who would actually be a fellow coder and great friend. I hadn’t found a challenge before until I met him. We shared ideas about our work and personal goals. You can really see someone energized and ready to face any code challenge in favor of helping businesses improve. He sets himself deadlines and meets them most of the time, he loves to help out friends if they are failing with a code challenge. It’s for Ronkas that I manned up and coded my first ever Hybrid Mobile app, which has taken me about 10 months. Being able to extend WordPress and build a custom API which serves our mobile app, has not only challenged me, it has made me a better coder and a web developer.

I have also held a couple of tech training classes throughout this year teaching the basics of technology in local communities, to web development at Hostalite Cyber Academy and Metajua a coffee processing company.

To be sincere am happy 2017 have achieved some and looking to 2018’s task. So what’s in the goals?

Languages.

With the availability of internet which looks to get cheaper next year, I hope to use this opportunity to learn some French and Swahili, which will be a big inspiration for the taking on Chinese. China an interesting country that I would love to visit someday maybe to import some tech items to my country or even export skills. I decide to learn French, because I love it and am looking forward to make friends which our neighbors in Kenya and would love to communicate effectively as much as possible.

Career upgrade

My path into technology started with selling translated movies to being a typing to serving in an internet cafe as assistant helping clients who were not comfortable to search on their own, repairing and troubleshooting computers and networking them to make sure they share resources efficiently.

During my free time, I could learn about coding in HTML, PHP and little bit of JavaScript. When I left internet cafes, I co-found a business offering computer repair, network setups and consultation to internet cafes and small offices. Cutting the long story short I was aspiring to be a web designer which have done for some years and now want to upgrade to web and hybrid mobile app development. That said, in the new year I should be a MEAN or MERN stack developer. Able to use Mongo db, Express, ReactNative and NodeJs efficiently.

Music

As of now all I can say is that the piano has got 8 notes which are C, D, E, F, G, H, A, B also called 1,2,3,4,5,6,7,8 keys on the scale. These notes run across the low and high pitch sides whereby the low pitch is the left whereas the high pitch is the right of the piano. The player has got 10 fingers numbered started from the thumb as 1 to the little(pinky) as 5,

At the moment am able to play the 8 notes as well as the C, D and F chords. Looking forward to a better piano and guitar player before end of 2018.

I have a feeling I want to communicate and connect with many people of different life backgrounds and my involvement in such things will help.

Want to advise me anything or wanna share with me your goals, let’s meet in the comments.

 

 

 

 

 

 


Our dreams have been awaken!

One of the reasons we started a community Mobile Digital Hub, is to introduce as many people as possible to technology in Uganda and around the world. Fulfilling this that task won’t only teach most Ugandans about technology, it will also encourage learning of many important skills for life.

We discovered that most people who applied for the training were older than 19 years and had either little education background or none at all. When we introduced them to internet, and they learned how to carry out simple research with the internet you could see each of them one searching something of their own interest. One of them was searching about money lending businesses, the other was searching about the best schools in Uganda perhaps because she has a daughter who could start to go to school soon.

On the graduation day we gave out both certificates of completion and participation, we also received a lot of feedback from the learners. [Photos coming soon]

 

 

 


Aspiring to be a programmer?

Since I started programming I have been asked one question, isn’t what you’re doing hard?

I think it’s in human nature to be afraid of something we don’t have an idea about or we extremely have little information about. In fact most of the time it’s because of lack of passion that will make things look hard.

First of all they are many types of programming, depending on the type one can be harder than other for some people.

That said in my opinion don’t judge programming before you actually get involved, because if you do chances are you may love it more than anything else you’ve ever done before.

Programming has helped me help businesses in my country establish a website, it is also helping me learn a lot of different things in life because of the tasks am sometimes presented to besides of helping teach others about something life changing.

My advise. If you are to try programming and don’t want to waste time.

  1. Don’t live in fantasy, live in reality. Give it a try and if things are not interesting feel free to quit and try something else.
  2. Learn the programming fundamentals before diving into a programming language. Learn the theoretical definition of programming, variables, functions, conditions, loops, initialization, declaration, construction, destruction, instantiation, data types, identifiers, expressions, statements, termination, invoking.
  3. Make friends with programmers in your city. Programmers don’t have a life indeed but they can create one with people who understand them most. That way it’s easy to exchange ideas.
  4. Choose the type of programmer you want to be so that you can specialize in tools required of that particular programming type. For example, you may concentrate on HTML5. CSS3, JavaScript if you want to be a web frontend programmer or JAVA if you want to be an applications developer. You may even want to take a computer science course, if you want to one day develop things IDEs, Text Editors and compilers.
  5. Keep revising, practicing, sharing and learning. Remember moving forward like a snail is much better than moving backword like a landslide.

The above are my personal opinions and I have developed them based on the 5 years of web development experience.

You’re welcome to program.