Some thoughts about the fear of new

In software development there will always be the moment where you have to think of something new. This can have various reasons. It may be because there are new and better developer tools (frameworks, IDE’s, VCS and so on) out there. It can also happen if the requirements have changed drastically. Or simply because the code can’t be maintained anymore (this happens usually because of badly written code, but it must not be your fault).

When this moment comes my experience has mostly been the same. There’s the “But we’ve always done it this way”-fraction and the “Finally clean everything up”-guys. I can definitely understand both parties and it’s hard to judge if a change is essential under certain conditions (deadlines coming closer, risk of failing and so on).

At this point i’d like to reference a quote from Wikipedia:

Neophobia is the fear of anything new, especially a persistent and abnormal fear. In its milder form, it can manifest as the unwillingness to try new things or break from routine.

What i want to say is that the risks will always exist and there won’t be a time without deadlines. If change improves your code/product/basically anything then there’s no reason to fear new.

The most dangerous phrase in the language is, “We’ve always done it this way.”

There’s a famous quote from Grace Hopper and i think it nails it to the point.

(UPDATE) My opinion about web based mobile apps

It has been almost a year since i wrote the last article on that topic. Since then i’ve been actively developing web based mobile apps and i made various experiences. At this point i’d like to update my opinion about web based apps and explain what makes me doubt.

Apps != Websites

When developing a mobile website your first goal is to make it user friendly and good looking. You style the buttons round, you create some fancy navigation animations, you put the back button on the top right, et cetera. You do that because it’s your taste and that’s totally fine for a website.

But with mobile apps it’s different. Your app has to feel the same way like other apps do when using it. The user expects a button to look the same like it does in other apps, the app should use the same animations and the back button has to be at the same position. If it doesn’t, it won’t feel like a “native” app. As if that’s not enough every operating system behaves differently. When developing a real native app, you use the operating system’s SDK (eg. iOS SDK, Android SDK and co.) which has everything preset to create your app.

Websites != Web based apps

A web based app is NOT a website. Just because an app is based on web technologies, it doesn’t mean it’s a website. But that also means, that such a web based app should behave like a regular native app.

And that’s where the problems start to come in. You will realize that a lot of functionalities have to be re-implemented, because they simply don’t exist or at least not in the same form as in a native app. And you have to do such implementations for each platform separately because as we know iOS and Android apps behave differently.

Ionic may be the savior

In my older post i mentioned the downsides of having a custom framework at your job. Well that has changed some days ago and we started using Angular at work. In this case i started looking into Ionic and NativeScript for my own apps. And i must say i am impressed what the team at Ionic has managed to create. They created a framework based on Angular to create web based mobile apps on top of Cordova. The Ionic components do really have a native feel and that’s something i really like about that. Besides that it has excellent documentation with working live examples and it really is a blast working with Ionic.

I’m currently working on a private Ionic project and i’ve made a lot of progress in almost no time. I will keep you up to date ;)

My experience at the Climathon Zurich 2016

This was my first Hackathon and i must admit i am impressed. I always wanted to participate at HackZurich with a friend of mine but our application was not successful. They didn’t tell us a real reason :(

But then some day my friend discovered the Climathon which is a Hackathon where you’ll develop a solution in 24 hours to improve the climate. You can meet new people, have fun together, develop cool stuff and do something for the environment. Sounds great, right? It is! Before that i didn’t know there are so many Hackathons in Switzerland (i only knew about HackZurich).

Our application got accepted because we are awesome :D

A third friend joined us later on, so we participated in late November without any idea or whatsoever. Our goal was not to win, we just wanted to have fun because we enjoy coding.

After the introduction we started brainstorming some ideas and got to the point where we made our decision.

The team developed an app that allows the uploading of pictures of food that is not being consumed anymore to a virtual shelf. Take a picture of an item you don’t plan to eat before the expiry date and instead of throwing it away it can be posted on Foodshelf, making it available for other people, meaning that there will be less food wastage.

I was amazed how everything was well organized by the ImpactHub Zurich team. Workshops, food, drinks and even Yoga was on the list. Though we were too busy coding to participate at most of those events :P

With every hour that passed i was getting more and more stressed because we started getting problems and that did cost time. But at the end luckily we found a compromise solution for everything. And finally after 24 hours of coding without real sleep, we made it to our presentation. Everything went pretty well and we even made it to the winners list.

But I don’t want to dive too much into detail about our application because i will do some posts later on when we published the app ;)

It was all pretty fun and i think i’m going to do it next year again!

The downside of having a custom framework at your job

If you enjoy coding as a hobby while doing the same at your workplace, you’ll stumble upon a problem which i didn’t see before. Most companies will come up somewhen in their lifetime with the strategical decision to develop their own framework. This has various reasons and all of them are totally legit. As example they’ll keep the flexibility and don’t have to rely on other developers. The company where i work at has come to the same decision and from the business aspect i’m very happy with that. We never had problems, where we didn’t find a solution for it. Yes we made some mistakes and refactored a thousand times, but we did always find a solution in almost no time and everything’s running pretty stable now.

However it has brought some downsides with it for me as a developer. Yesterday i’ve setup my new Macbook with all the dev tools i need and i had a lot of ideas what to code first. But heck, i didn’t know where to start. So i started researching what frameworks are available out there and tried out various but i’m having a hard time finding the right one. I need something which is similar to the custom one which i’m using at my workplace, so i don’t have to rethink the whole time when i switch between private and work coding. Besides that, using a custom framework at your work doesn’t really help your business skills. But that’s another topic :)

My opinion about web based mobile development

==UPDATE: My updated opinion about web based mobile apps (31 January 2017)==

I can exactly remember when i made my first mobile app. It was at the time where Apple ruled the world with iOS and you had very limited possibilities in comparison to what we have now. I tried to get used to objective C, but there was something about it i couldn’t stand. It was completely different to all languages i’ve known then. As a result i looked up for alternatives and i found some. I tried out Phonegap and that was the moment i wrote off web technology (at first). It was all laggy and not comparable to the real native thing. So i’ve ended up using Appcelerator’s Titanium Framework.

It has been over 6 years since then and technology has moved forward. With more and more HTML5 and CSS3 features, we’re getting great performance of our web apps with such little optimization. With my new job i started using more and more web based technology. I realized if you do web stuff the pro way, you can get unbelievable performance out of it. With the time i completely changed my opinion on that topic. Actually i think with todays technology you can develop web apps which feel the same as a native app and if you don’t screw it up it can even run better. And the best part about it: You’re completely independent on which OS it’s gonna run on.

Use 3D acceleration for heavy animations

You want to move something around? Use transform3d. Even if it’s just for one axis. With the magic word “3d” you’re telling the browser to use the GPU leaving you with a free CPU which you can use for other calculations. And there’s much more. You can rotate, skew, scale, change the opacity, the background color and much more. Even all together. Be careful to not overuse this extra boost and test on mobile devices.

Web workers for multi threading

Dual cores, quad cores, hexa cores, octa cores, etc. It’s crazy how much cores a mobile CPU packs these days. Wondering why your app still doesn’t run faster? A reason may be you’re not using web workers. What that means is you’re doing all your stuff on a single core/thread. Use those extra cores by using web workers.

JavaScript the clean way: TypeScript

Coming from a object oriented world? Have a look at TypeScript. It will make your life a whole lot better.

Web technology will move forward. Even without you.

This one is an important thing to know when developing web based applications. Even if you don’t do anything, your app will become faster and better. With other developers pushing those web technologies forward you don’t have to touch a line of code.

With all those great experiences i’ve made in the past years, i can’t live anymore without the web and it’s technologies. Heck you can even doweb based robotics (see: Cyclon.js). I won’t decline that there are still some cases where you have to go native but it’s just a matter of time.

Socket.IO and game server hosting

This is something i’ve been thinking about a lot lately and finally i decided to give it a shot. And to make it short: it is possible, without any problems or whatsoever. In fact somebody already tried to run Box2D server side (!!) and sync the animations with all clients. Heck that’s a lot of traffic but Socket.IO doesn’t give a damn.

https://www.youtube.com/watch?v=5ty6wA2wSX4

But to start small i created a prototype to test out the player position syncing with Node.js and Socket.IO and a simple HTML5/CSS snippet i made.

See: GitHub project
Short explanation: When a client connects it gets a message with the assigned player and the other ones which are already connected. The players which are already connected will get a message that a new player joined, so they can create a new div representing the new player. When a player moves, it will send it’s new position to the server, so he can emit the new position to the other players. When somebody leaves, everybody get’s informed to remove the player from the DOM.