Should I go back to Cross-Platform Mobile App Development?

Mobile App Development

With nothing much specific to develop in mind, today I decided to do some mobile app development.

Immediately after I made this decision, I was bombarded with waves of questions regarding which language/framework I should pick. The mobile app development market is full of  platforms like Android Native Java/Kotlin, React Native, Xamarin, Ionic and NativeScript and many more. Although I have already worked with Phonegap, Xamarin, Ionic and even Android Native in the past, my current mind set is that I am not at ease with any of those.

My Experience With Various Cross-Platform App Development

Phonegap

My journey into Cross-Platform app development had started back in 2015 with Phonegap. I was delighted to be able to develop apps just using Javascript, HTML and CSS. I even built one and shipped it to Google Play Store. It was quick and easy. But later as I wanted to add some Native features to it, I realized it would have me go bald for sure. I realized it was just a WebView and I am completely restricted from the native hardware. So, I quit pursuing Phonegap development.

Xamarin

After a few years, I was again delighted when Xamarin became freely available in Visual Studio. Coming from a .NET background, I immediately dived into it. It was definitely a lot better than Phonegap but definitely not as easy as I had expected just because it was .NET. It had it’s own platform specific libraries that I needed to master. I would have given time to master those, however, there was this another big issue with Xamarin.

Just simple package downloads or updates from Nuget would explode and blow up my projects and they would stop building. Even though I tried to stick with it, I couldn’t find much resources/community around it. And that was the end of Xamarin for me.

Ionic

By this time around, Ionic 2 was already in the market so I decided to take my chances with it. Again, I could use Javascript, HTML and CSS to build apps with it. I was happy again. I could build apps rapidly again, but there was just this another problem of generating the APK builds. While with Xamarin, I could easily generate builds with Visual Studio, with this Ionic, my Command Prompt wouldn’t listen to me at all! No matter what I installed, I could never have the right kind of Environment to generate the apk.

I believe I had all the necessary setup in my machine like Android SDKs and Gradle, but I kept facing different issues when I tried building for Android. I had written my app in just a few days but couldn’t get it to build even after trying for 4 days. And that was it for me with Ionic.

One good thing I got from Ionic though was I got to learn Angular which I absolutely love.

NativeScript

After that I also tried NativeScript but again I had similar issues as that of Ionic. I didn’t even write a single line of code on it because I couldn’t setup my environment for it.

React Native

No experience here. But from what I have read, I would need to learn React first then move onto React native. Plus it has it’s own learning curves.

Native Android

After pursuing all these frameworks and platforms, I realized that if I had actually picked up Android Native development platform back in 2015, I would have been at least quite proficient with it by now. So, I decided to give it a try. I mean I can already code in C#, how hard would JAVA be?

After downloading Android Studio and playing around with it, I was able to create an app (IT Work Remotely) and push it to Play Store. Although there is a large learning curve associated with developing Native apps, in my experience, it is definitely worth learning and developing on the native platform itself if somebody wants to stick with Mobile App Development industry.

Nothing (at least the ones I tried) can compare to Native app development. And I am not just talking about performance-wise. From the perspective of learning curve as well, I think one has to spend equal amount of time to master either Cross-Platform framework or Native framework.  So, why not rather invest that time and energy on learning the Native framework?

I know it is definitely tempting to write once and deploy in multiple phone environments. However, with my own experience, I have never deployed anything on iOs play store ($99/month Developer fee!! Are you kidding me?) and I think I will mainly stick with Android phones for now, at least for the apps that I create for fun.

So, if I am just targeting Android, I feel like there isn’t much use for me to learn a Cross-Platform platform given that the Cross-Platform environments are always either lacking in native performance or have unpredictable environment/build failures.

Concluding Thoughts

Yet, again for someone like me, who isn’t much proficient with JAVA or Kotlin, developing complex apps on Android demands long hours of research and study. I would have loved if I could build mobile apps with just the tools that I already had in my pocket. That’s the only reason I am not at ease with Android Native development.

With that thought, coming back to today, I actually had decided to give Ionic one more shot (just for the sake of Angular).

After installing the framework on my machine and following their tutorial to create a “Hello World” app, guess what I received?

Error on Ionic Start Project

Error on Ionic Start Project

Good bye cross-platform?

Becoming An Indie Game Developer From A Programmer Background

As Wikipedia defines it,

Independent video game development is the video game development process of creating indie games; these are video games, commonly created by individual or small teams of video game developers and usually without significant financial support of a video game publisher or other outside source.”

While both game development and regular software development share a few things in common, the differences weigh a lot more.

Unlike a software, a game is a mix of many other components besides regular programming logic. Graphics, sound and animation play vital roles in any game and these are not the objects of regular interactions for a software programmer. It takes years and years to become masters of these arts in themselves. Plus a game requires advanced knowledge of Math and Newtonian Physics!

So it’s not an easy switch from software development to game development.

Here’s a very good read on Quora on this topic:

https://www.quora.com/Can-one-developer-make-a-successful-indie-game

As you can read from the answers on Quora, there are some people who have “moderately” successfully managed to jump into indie game development coming from programming background.

While revenue wise, the first few years do not look as good as the regular full-time software development jobs, if someone keeps at it for a long time, there could be a brighter future.

If all goes well, as Joe Cassavaugh dreams,  maybe someday indie game developers could stop being a one-man-shop and turn their games into a game like Clash Royale that generate daily revenues of $1,992,870.

Freelance Developers Now Earn Through Writing

Since popular freelancing sites are overrated, today I would like to share with you guys one another way to generate extra income.

Freelance Writing!

Get paid to write articles and tutorials.

There are tons of sites on the internet that are craving for excellent content to be published on their sites.

Writers In Charge lists 110 such sites for freelancer writers. These sites pay anywhere between 50 to 300 Dollars per article which I believe  is way way better than many of the freelancing jobs where developers have to battle among one another to get paid in nuts like 5 and 10 dollars.

Here I would like to list some sites which are excellent platforms specifically for Developers/Designers to write and get published.


CodeTuts+

You can submit articles and tutorials about any programming language. I have seen people write about Javascript frameworks, .NET, SQL, WordPress and Game Development and many other topics.

Even I have written few articles for them!

You’ll be paid $100 for a quick tip tutorial and $250 for a regular tutorial; if you are a high profile author/educator, you could earn more.


Smashing Magazine

Based in Freiburg, Germany, Smashing Magazine works with writers from all over the world.They accept articles about web development and web design, and they would prefer a rough draft of your article if you have it already.

Again developers from many different backgrounds can write and publish their articles here. Smashing Magazine even publishes e-book where your article could get published!


Sitepoint

SitePoint pays $150 for articles and $200 for tutorials and are even willing to pay more quality posts. They focus articles mainly on HTML, CSS and Javascript technologies. But they seem to have posts on mobile development and even Entrepreneurship topics so I guess they take any good topic as their content to publish.


Developer Tutorials

You can submit articles about anything related to design, programming, marketing, management and business tips. They have a preference for list articles and prefer tutorials to be at least 1,000 words.


CodingSight

Codingsight is a community platform created and maintained by Devart.They accept articles on SQL Server, Azure, MySql and .NET topics from writers. Besides getting payments, writers also get benefit of up to 3 licenses for any Devart product: one license for a published article


So, this is just a small list of platforms where programmers, developers and designers from any background can write and get paid for their content. I am pretty sure there are many more than listed here available on the web.

Please feel free to add any other platforms that you guys know on the comments below.

Are you ready to work as a SQL Developer?

A SQL Developer is responsible for managing data in a relational database. Database Providers like Microsoft, Oracle and MySql have their own IDE for managing data. For example Microsoft has SQL Server Management Studio for this purpose and Oracle has Oracle Developer Studio. A SQL Developer makes use of these IDEs for managing data.

Today I would like to list down the most common tasks that every SQL Developer must be familiar with as these will often come up as a requirement in the course of their day to day to work. This list will also serve as a guideline for anyone who wishes to advance their career towards becoming a SQL Developer.

In no particular order, here’s the list of tasks:

  1. Connecting to different SQL Servers using Windows and SQL Server Authentication.
  2. Creating  new databases in many different ways.
  3. Backing up and restoring databases.
  4. Designing and Normalizing Tables as per need.
  5. Using Primary Keys, Identity Columns and Foreign Keys for table creation.
  6. Altering Tables and Columns.
  7. Properly using Data Types and Column Size Limits.
  8. Writing basic to advanced level queries for SELECT, UPDATE, INSERT and DELETE.
  9. Writing table JOIN statements.
  10. Filtering Rows using WHERE clauses and JOIN statements.
  11. String manipulation using functions like Replace, Stuff, Trim and Substring.
  12. Creating tables on the fly.
  13. Using Cursors for looping.
  14. Writing Stored Procedures.
  15. Writing Functions.
  16. Writing Triggers.
  17. Using Linked Servers.
  18. Adding Indexes on tables.
  19. Using aggregator functions like Sum, Count, Group By, Order By, Row_Number and Distinct.
  20. Accessing table and column information across databases using Information_Schema.
  21. Generating Scripts to re-create database objects like tables and functions.
  22. Importing Data from external sources (mainly csv files sand excel sheets).
  23. Creating and authorizing  Database Users.

Note: Many of these tasks can be completed in two different ways i.e. either using the GUI or using Structured Query Language.

Using the GUI

Writing Queries

While it may be easier to operate through a User Interface for a newbie as he doesn’t have to remember the necessary queries, but on the long run it is better and also important to be fluent in performing these tasks writing queries.

Once you get the hang of it, you will find that writing query is more easier and faster than operating through UI as you no longer have to worry about where a particular function is located to perform a task. You just have to write the query on the query editor window.

Conclusion

The intention for this post was to identify the common operations that a SQL Developer must be fluent with in order to work in any professional environment. While this is not an an inclusive list of tasks and I may have left out a few other essential tasks, but nevertheless, if you are familiar with the tasks listed above, surely you can call yourself a SQL Developer ;).

A Knight’s Watch

Recently I came across this interesting problem through Toptal (on Codility) which kept me thinking hard for a few days. Finally, I now have a solution to this problem and would like to share it here.

Problem:

Basically, the problem deals with a knight piece on an infinite chess board. Assuming the knight is positioned at (0,0) you are asked to calculate and print the shortest path that the knight can take to get to the target location.

knight1

My Approach:

So what is given here?

  1. The Knight’s movement is well defined i.e. it can only move in a ‘L’ shape.
  2. The Knight has option to move to any of the 8 different locations from it’s current position.

 

knight4

Now with these key points in mind, we can calculate which move will take the Knight closest to the given target i.e. move the knight in the direction of shortest distance.

For example: Suppose our target is located at (6,7).

cap1.PNG

Now, from (0,0) the Knight can move to following points: (1,2), (2,1), (-1,2), (-2,1), (-1,-2), (-2,-1), (1,-2) and (2,-1).

But out of these 8 points, the closest one is (1,2). So we move the knight to this position in first move. For each step we can use the same logic to move the Knight.

Hence, the Knight moves to (1,2) in first step, (3,3) in second, (4,5) in third and (6,6) in fourth move.

However, once the Knight reaches a proximity distance of 1 unit, we will have to keep in mind a separate logic to hit the target.

This is because if we stick to our logic of moving the knight towards the shortest distance in all places, what will happen is once the knight reaches a close proximity, the Knight will start going round and round the target but never actually hit the target.

From (6,6), the Knight could jump to (7,8). From (7,8) it could jump to (5,7) and to (7,5) and all but never actually jump to (6,7).

So, we have to create a separate rule for this scenario for our Knight.

Close Proximity Rule:

There are again 8 different close proximity points from the target location’s view point : (7,7), (7,8), (6,8), (5,8), (5,7), (5,6), (6,6) and (7,6).

These eight points can be categorized into 2 types. Either they lie on the axes or they lie on the diagonals from the given target.

Points on Axes: (7,7), (6,8), (5,7) and (6,6)

cart1

Points on Diagonals: (7,8), (5,8), (5,6) and (7,6)

cart2

Based on these two types, the Knight can hit the target in either 2 or 3 moves.

If the Knight was at a point on the diagonal say (5,6), from there it can jump (7,5) and then to (6,7) in 2 two moves. All diagonal points can access the target in the center in two steps.

Similarly, all points on the x-y axes can hit the target in 3 steps. For example, if the Knight was at (6,6), it can jump to points (8,7), then to (7,9) and finally t (6,7).

Now with this much knowledge we can create a program that can calculate the shortest path that our Knight has to take to hit any target on an infinite chess board!

My Implementation:

I have created a console application in C# to calculate the shortest path for the Knight to reach any stated target point with the above mentioned logic.

The application/project is available in git hub @ https://github.com/psovit/knightswatch

Please feel free to like, share and comment.

Thanks!

vitChess.jpg

Affiliate Marketing

I know this is not a new topic in today’s world but despite the fame of this idea, I hadn’t really looked into the details of how things work in this domain until now. I had been seeing a lot of posts/sites/articles all around the internet where people claim to be making this much money (like thousands of dollars and even millions of dollars) just using their blogs and sites. I always had a doubt whether this was true.

But recently, I came across a guy, a friend of friend of mine who is really doing this business. A real person and not just a thread on the internet! Well, he doesn’t claim to be making a lot of money like Charles NGO does (https://www.youtube.com/watch?v=PqqMtvgKzjA), but nevertheless, from what he says, he is making quite a lot (as compared to what I am earning doing a full time job as a programmer).

So, this aroused in me a curiosity whether I too could get into Affiliate Marketing and earn some extra bucks:).

So yesterday I started looking into this topic, read a few articles, watched a few videos and came to this conclusion: It is definitely possible to for me or anyone like me to start making money using Affiliate Programs.

From what I have understood, the things that one would require to start this program are:

1) Signing up with Affiliate Program: This is basically the company that will pay you money for promoting your company. So, what type of company would you promote? Basically it is advised that you promote companies of the domain that you are familiar with so that it would be easier for you to write about it. After thinking for a while about what things could I promote, I came up with this topic: “Guitars”. Since I have been playing music for about hmm almost 10 years, I have a pretty good library of this domain build up in my head. Then I googled if affiliate programs exist in this domain and VOILA! Lots of results!

2) A Good Working Site: This is a place where you would be promoting other businesses. It’s very easy to set up blogs these days (both free which are provided by blogger/wordpress or in a domain of your own). What is important here is that you got be able to create a lot of good contents. Things that would draw people to your site. Now you might think this is not that difficult right? Like you would say I can easily come up with contents with topics like:

a) acoustic fingerstyle or electric guitar?

b) how to start learning guitar?

c) know your playing styles
-> different styles
-> popular musicians in each styles
etc. etc.

Well, I am not saying these are bad ideas but one must understand that people have been doing this and writing about similar topics since 2002 (at least 2002 because I found a site that claims so):
http://guitarz.blogspot.com/
The quality of the content in the sites like mentioned above and below are also quite good.
Other similar sites:

http://guitarpraise.blogspot.com/2006/01/theory-archive.html

http://acousticguitarists.net/2008/05/22/guitar-scale-c-major-a-smoother-way/

http://www.guitar.markantony.net/

http://dutchbopper.blogspot.com/

I am not sure if all of these sites are involved with Affiliate Programs but still they already do have contents that you might think of writing about.
Please keep in mind that I am not mentioning these facts as statements of discouragement but only to bring to light that good content is very important to bring visitors to your site.

3) A paypal account: This is where you get your money collected, where all the good things happen.

Once you have these geared up, you are ready to start your business in the world of Affiliate Marketing.

2 important things to keep in mind before jumping into development:

1) Understand their requirement completely.

 Maybe a simple desktop application or MS-ACCESS data application is what your client needs. Now if you design a hi-fi web application, something that is responsive and mobile friendly, built with superb grids, making ajax calls and what not, imagine all the development time and development cost that you are wasting in this situation.

What is the purpose of this application? Or in other words, what does the client plan to do with data in the database?  Who is going to be using it? Which device will be running the application?

The answers to these questions will help you determine how you should design the application.

2) Confirm with the client what they will be getting.

Once you have understood their requirements and come up with a design for their needs, present your proposed solution to the client. Make them clear about what they are getting at the end of the development. Now depending upon how literate the client is regarding software and its development, you might have to be explicit/implicit in your explanations here. But keep in mind this is single most important thing that you will have to keep in mind.

Imagine giving a rough idea of what you will be developing in the beginning and then working on your development. You complete the whole project and bring it happily to the client.
The client looks at it and says, “This is ok but what we need is …“.

You then realize what you have is completely different from what they need. Poles apart. All those happy thoughts of project being completed fade away and you are confronted with another long development period. On top of that, all current development is going to waste!

Even during the development phase, remove assumptions from your end as much as you can. Propose your assumptions before turning them into hard code.