What benefits Xamarin Android developers outside of plain Android?

Hey everyone,

Ever thought about what the differences are from Xamarin Android outside of just plain Android?

Honestly, the differences are very marginal.

You still have these classes and interfaces that you can write. You still have all these pure and impure functions as well.

I’ve known that Java has been an OOP paradigm for years. They are now introducing functional programming, but I’m not sure it is yet supported in Android, though Kotlin might already be doing that.

In Xamarin Android with C#, you can do that almost out of the box.

It forces you to think differently. You might be familiar with doing something on plain Android already, however, Xamarin Android provides more flexibility and cleverness with its own ways of doing things.

For example, with the .NET library, you can pass in a function as an argument and also return something from it. That’s pretty nice.

Java 8 as I remembered had problems with older Android SDKs, therefore doing the above is probably useless. In the .NET world, it’s fine just writing something not too specific to the SDKs, and just making an operation.

Now this is not to say Xamarin is the be-all, end-all solution. The platform also has some shortcomings, especially if the codebase gets very large. It takes longer to compile and deploy, and if your app crashes somewhere then you’ll have to start over. All developers know that this isn’t exactly fun stuff, though this also happens with pure Android as well.

Anyhow, Xamarin Android developers can also benefit from how other platforms’ codes are written. Therefore, want to learn iOS? Just load up the project, and have a look at the code! You’ll see that the skeleton is pretty much the same, but the meat is different.

However, if you’re the type that just wants to think for one platform, that’s fine to do for now. However, this is how one should think for oneself:

Until next time!

Brian.

Why that extra piece of code you write can be worthless

Hey guys,

Just a little back story here…

I think I talked about going to a boot camp doing Android development in one of my posts. I had at it since it was free which, by the way, if any of you readers are living in the Bay Area, you might want to check them out here: https://codepath.com.

The program was very intense, and although at the time I was working with a startup for 10 hours weekly, I got lucky since they required all of their students are actual software engineers willing to learn either iOS or Android. I opted in for Android since it was open-source, which I thought meant a lot more support for the platform from different sources.

The time I was actually doing projects was great! It gave me more confidence, in which, I was able to make Android apps from scratch.

Now let’s enter the workforce…

My first job doing Android development was contracting. The problem was that stuff didn’t get done on time, and the founder was pushing me with 50% of how much I was working hourly. During this time-frame, in either case I was trying to just get the stuff done, all custom made, plugging in libraries almost without any idea if I was doing things the “right” way or not. That was a monkey-coding job, not exactly software development.

The next contract was better. Although I was building a chat app for another startup from scratch, I was doing things that were within what Android wanted (Material Design, new/old APIs, etc…), along with what I learned within the first Android job I had. It took me 3 months to make a port from their iOS app to build it perfectly, and it was successful! That was great since I was a one-man person who did it.

Later, I had another contract at another startup, and this time it was along with a team. Now, what’s good about this startup was that they had a process. I had a hard time with this in the beginning, but within a few weeks I became used to it. We had code reviews. I remembered one time, there was a tasked bug where I was following how iOS developed it. What happened in Android was every time the app went into the background and received a push notification, and once the user clicked on the notification, the app went into authorization mode, then just logged in and that’s it. In iOS, once the user clicked a notification, the app opened up and, then it went to the window that corresponded along. I tried doing the same in Android by saving the data into preferences as the app went to the background, then tried doing all this logic once the user clicked the notification going to login, and then saving that data into the main activity which will launch the corresponding activity it needed. Heck, I learned about shared preferences in the boot camp and thought at the time that would be what Android wanted.

Guess what? Once it got into code review, my boss said it was too complicated. He drew out the app’s process on a piece of paper to just analyze how the app is behaving, then how the app will behave. He asked to do it simpler by making a session when the notification is clicked, and then check the ID that corresponds against the needed activity. I did it, and this worked perfectly.

Here’s also something he told me with a smile that I kept in mind. You can write the best code in the world, but if it doesn’t solve the problem, then it’s worth nothing!

And friends, that is why if you want to know your net-worth as a developer, then evaluate yourself along with other team members you work with. Do what you think is right, and never stop learning.

Until next time!

Brian.

Just stick with what you are required to do

Hey there,

Have you ever done something that you think was just brilliant for this one bug? Something brilliant that you’ve gone the extra mile in thinking that it will be “better”?

Here’s news for you: what you perceive that is “better” will probably not be what your peers think. In fact, they might have a better solution that will fit the whole picture, whereas your version could be a narrowed-down one. This is why communication is important.

However, let’s rewind for a bit. Before diving into the code, it’s always good to spend at least a few minutes to think. Because to achieve something, you’ll always want to find the easiest way in getting there. Sure, you can code it straight away without thinking much, but that takes a lot more work with more unnecessary steps, which is probably going to even be that “brilliant” code you’ve written.

However, minimal and simple is key. For example, if that piece of code is not part of that bug, please don’t include it.

Rather, if it’s more of an improvement, then it’s much easier to file an improvement over that bug, and then include that piece of code, so then everything can be tracked down in each release.

Then probably another person can also work on it, or you, or both of you by pairing.

For most developers, this is how we work with code. A friend of mine told me this a little over a year ago:
Think of the simplest solution. In other words, how good is it? Can it be simplified further, or is it already optimized (usually this is within the coding phase)?
Does the code that you’ve written solve the problem?
How would another person feel about what you’ve written?

And that’s it. Once this is done, move on to the next task. Rinse and repeat. It’s a process that, if you haven’t developed it yet, it’ll benefit you in the long run when you are, or will be, working with a company.

So if you want to stay, stick with the requirements and that’s it!

Until next time and the next topic,

Brian.

Being sick…

Hey guys,

How do you guys feel?

Okay, sometimes I understand that you feel sick. Heck, I remembered when I had my cold the past fall/winter that came up.

– But Brian, I don’t feel so hot and therefore am not sure if I’m able to work today.

Ah, you’ll be fine. The colds usually peak out on the third day once you catch it, then it starts depleting. You could work and drink up on your fluids.

– But, but Brian, I really really don’t feel so hot and am feeling like something’s up with me…

Hmm, I never heard that one from you, at least not in a long while. Okay, just stay at home, and rest it up.

Actually, as I’m speaking, I did feel pretty miserable this past weekend. I originally thought that I had a cold the week before, and therefore I worked from home and had thought that I could return to work this past Monday. This Sunday’s doctor visit proved me wrong. Though, I also have a feeling that the doctor was wrong.

Today is Wednesday, and I’m feeling about the same as I did on Monday. Therefore, what’s going on with my flu, it’s hard to say. I’m not doing my regular jogs however in hopes that I’ll recover faster.

The doctor told me to rest up until this past Tuesday. I did. I felt no results. But what’s to understand? Your resting period is to get you away from stress, and that is because stress is a stimulant that, if you have viruses in your system, will have them act up.

Anyway, hopefully those 2 days helped out and did me some good whilst being outside work. Although I don’t feel like I’m at 110%, I believe I can get by just by being at 80%.

Therefore, let’s see how today will play out. Until next time!

Brian.