Preparing the airline interview

icon-603x Aviation

This app focuses on the technical side of the airline interview.

After browsing couple of technical interview samples, and adding my little touch on the subject which I think will be interesting for the student and even the veteran pilots, here it is…

Always nice to revisit the theory, which for some of us, were a long time ago…

So rewarding to achieve something after so much frustration and so much pain of learning by yourself. I had my sacrifices and felt I was crossing the desert…

Worth every moment of it! 🙂

The app is available on the App Store.

Re-inventing yourself at 53!

iphone-63x

I can not believe that it is now 9 years since my first website was published on the net.

I had to learn funny languages which brought other languages, to finally being able to publish some apps on the App store by using modern programming languages, such as Objective-C and the latest new language from Apple, Swift which was launched in 2014.

Wow! What a journey…

The DIY (Do It Yourself) acronym really sticks to me and fits perfectly my way of learning 🙂

The other day, the TV news was talking about people being discriminated for jobs above 45. One of the reasons was because people above that age were not good in modern technologies.

Really?… I think I have no problem to compete with the young guys coming out of universities with a computer degree. 😉

Do not kill the old guys too fast!

But reality is as it is, yes, modern technologies are moving with the speed of light…

So, what is the best way to surprise people or future employers/collaborators?

Re-invent yourself and in my case, use what I have learned and publish it! Is it going to work? Maybe, maybe not, but at least I am trying and maybe, will surprise few people…

This app “Freelance pilot”, is just another way to put your cv/resume online. Be modern, be imaginative, be different…

How many future employers/collaborators do carry their smartphones with them? 99,99999 % I would guess. How about being on their smartphones as well as an app?

But beside putting your cv/resume online, I have added a functionality to make it even more attractive. Ok, this is aviation stuff, but I am a pilot after all, no?…

Few years ago, a former colleague asked me to make an app which could calculate the distance between 2 airports and give the estimated time en-route between those airports. Bummer! I was not ready or even close from this required knowledge…

Few weeks ago, I was reading an article in one of those specialised forum which was talking about latitude and longitude and how to use them in your app.

Yeah baby, challenge accepted!… 🙂

After trials and errors, the help of stackoverflow (famous among programmers) and specialised forums, I managed to install a file of over 28.000 airports and link the file with my code.

The end result is that the app will calculate pair airports distance (great circle) and time from any airports around the world without the need of being connected to the internet.

Big deal Didier, it exists already you would tell me. Yes, of course! I do not re-invent the wheel but for that information, you will need to connect to the internet…

Here, no internet connection. The file is embedded in the app, so you can access the information from anywhere without asking: “Is there wifi here?“…

The app is built with Swift 3.0, requires iOS 10 or later and is available from the following URL: https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=1157894398&mt=8

May the force be with the 45+… 🙂

 

 

Another frustrating day!

img_5657

Can’t make the code work! Time to take a step back… Have grabbed my bicycle for a spin to clean-up my mind.

Am gonna get it, am gonna get it!…

I checked everything, the latest update, the minimum required. This compiler is still giving me errors…

Is it the Beta version of Xcode or something else? I thought I nailed it yesterday but today I hit the button build and… Build failed!… Over 20 errors!… Grrrrr!…

Time to read instructions carefully again…

The behind the scene of an app.

intro

What you see is a screenshot from X-Code, the IDE from Apple. Also the simulator on the foreground where you can check and feel how it looks when modifying your code.

Building an app from scratch is of course very rewarding but can be very frustrating as you progress into your project. You very often end up being stuck as the language used is very strict.

This app is built in Swift, the new language introduced by Apple in 2014. As a new language, there are always flaws and of course and as it matures, the language gets a lift-up every now and then. Sometimes minor changes, and sometimes a bit more than that…

Swift 3.0 is coming very soon, and of course all apps I have built so far will need an upgrade to reflect those changes working with iOS 10.

In the left column, you can see couple of files where your code lives. The famous M-V-C model is the norm when coding an app. It’s basically an architecture where you split your code for better reading…

If I would have written the same app in Objective-C, the other language used by Apple, I would have had to add double files as that language needs .h and .m files, thus adding memory to the app itself.

I dropped on this very interesting article comparing the two languages, and it seems that Swift is definitely the winner…

Honestly, it took me a while to migrate to Swift as I was too lazy to learn something new. Yeah! At 53 years old, it takes a while before the wheel starts to turn… 😦

The app in this article is  CAT-C Airports in Europe. Another app I use every now and then when going to special airports.

It’s on the App Store for sale of course! 😉

 

 

 

Publishing your app on the App Store

vaac_prom

Finally there! After months of development and study, here comes the big day…

Publishing your app on the App Store. It’s like giving birth…

It seems so easy but believe me, you have to go through a lot of trials and errors before it can be published.

Even though approved by the store and published, sometimes the appearance is not what you were expecting, or the market was not interested at all in your app for different reasons, or just there are millions out there, very often much better than what you published. Yeaph! You’re not the only one…

That’s ok! Think like this is your first marathon and obviously, your don’t expect to finish within the ten first runners. I wish but the world is not made like that…

From 2013 to 2016, what did I learn? Well, first two programming languages (Objective-C and Swift) and for a guy of my age, that’s a win baby! 🙂

Is that it? Oh no!… Those technologies are moving with the speed of light and everyday new things come into play.

This app is built with Swift 2.2 and guess what? Swift 3.0 with IOS 10.0 is coming in fall if not tomorrow already… 😦

I feel like that as soon I finish to print one book, I can throw it already and print a new one…

If at least those politicians in charge of education could see that it is so important to learn at least one programming language or the foundation as soon as possible, even in primary school.

I was shocked to hear that in my country, on the French speaking side at least, one third of the population could not use internet or send an email??? Can’t believe it…

This is going to be my fight with the education system. Completely obsolete what we’re teaching and will not make our kids in a better situation on the work market tomorrow…

Enough said about politics, obviously we all have our opinions and my blog was not made for it, sorry. Just sometimes I need to express myself to get rid of the frustration…

Just if someone reads this blog, please keep on studying. Don’t stop after school, the world is moving with the speed of light…

If interested in the Volcanic Ash Advisory Centres App, please visit the iTunes or App Store.

The app represents the 9 VAAC centres which cover the world. I have been using and still use it for situation awareness when flying. VAAC give you the latest alerts on volcano activities.

Important of course for the aviation and travel industry!

You can see a preview on my YouTube channel or my personal web page.

Completely free and built for iPhones and iPads. No Android yet, sorry! Another language to learn 😦

Brainteaser

casseTete

Every now and then, you get this assignment where you have to resolve a logical mathematical question.

I don’t know for you but for me, it’s always a challenge…

Here was a question on the https://projecteuler.net website for the first question:

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000”.

It’s like whaaaat???… Oh, boy!

What is a natural number by the way? The first thing that came into my mind… Sorry, I was at school but that was a long time ago…

Hopefully, Google came to the rescue… Of course! How could I forget about it? Shame on me! 😦

But how do you translate this logical mathematical question into code?

Baby, I need coffee! And make it strong! Just keep the aspirin not too far…”

For a definition of the natural number, see this site: https://www.mathsisfun.com/numbers/evolution-of-numbers.html

Natural number below 10: which means 1, 2, 3, 4, 5, 6, 7, 8 and 9.

Multiple of 3 or 5, which means:

1 x 1 = 1

1 x 2 = 2

1 x 3 = 3 ==> good

1 x 4 = 4

1 x 5 = 5 ==> good

1 x 6 = 6 ==> 3 x 2 ==> good

1 x 7 = 7

1 x 8 = 8

1 x 9 = 9 ==> 3 x 3 ==> good

 The sum of these multiples is 23.

3 + 5 + 6 + 9 = 23

Pfff! One thing done! Coding is like trying to solve one thing and then jumping onto the next one…

Ok! Here I need a kind of loop to go through from 1 to less than 10.

“MAYDAY! MAYDAY! MAYDAY!”

Swift language to the rescue, or any other programming languages will do the job.

For the loop, I am going with the “for.. in” loop, foundation of the programming language.

for i in 1..<10 {

// do something

}

So translate like: for each index from 1 to less than 10, do the following inside the curly braces.

“i” is the name of the variable ( “i” like index) that will change every time you reiterate through the loop until you hit the wall of less than 10.

1..<10 ==> range from 1 to less than 10.

Ok, I need 3, 5, 6, and 9. How can I tell the code to highlight those numbers between 1 and less than 10?

There is a trick, and it is called the modulo (see YouTube example at: https://www.youtube.com/watch?v=b5cb_nfDyyM)

In other words, you’re looking to have a remainder of 0.

3/ 3 = 1.0

5 / 5 = 1.0

6 / 3 = 2.0

9 / 3 = 3.0

Multiples of 3 and 5; I’ll need to check those 2 numbers within the loop.

% is the symbol for modulo.

i % 3 or i % 5 must equal to 0, where “i” is the index I pass on every time the loop goes through, yeah? So i = 1 the first time, then 2, 3, etc. until it hits the less than 10 condition.

if (i % 3 == 0) || (i % 5 == 0) {

// if one condition or the other is true, do something.

}

|| = “or” in this language.

== is the equal we know.

if (i % 3 == 0) || (i % 5 == 0) {

sum += i

}

“sum” is the variable I have declared on line 5 in my playground (var sum = 0).

“var” stands for “variable”, a drawer from my closet that I have reserved to contain my variable, so to speak.

The “+=” is a short cut for “sum = sum + i”. Easier to write “sum += i”.

Like you would say “FYI”, for “For Your Information”. Just a question to get used to it…

Then on line 12, I just print the result of my variable “sum”.

“Open the drawer baby and show me what you’ve got!”

Pfff! Brainteaser…

Like the iron man, you need to train your brain to resolve problems. 😦

Same in aviation, we train a lot. Actually, I found a lot of similarities between piloting and computing. Pilots have a real potential of becoming good coders (problem solvers) 😉

See one solution here below. All roads go to Rome, so there is more than one solution 😉

solution

I’ve used Xcode IDE, the IDE for building apps for Mac, iPhone, iPad, Apple Watch, and Apple TV.

For more information please visit https://developer.apple.com/xcode/ide/

 

DRY principle

dry

So many times, you hear the instructor saying: “Use the DRY principle, DO NOT REPEAT YOURSELF!” during one of his multiple videos.

Yeah, yeah, yeah, I go it, thanks! It’s not going to happen to me, don’t worry…

One of my kids used to come once in a while to check my code to see how I was doing. I could see a smile on his face and I was asking what was the problem?

Dad, you are repeating yourself”...

What do you mean I am repeating myself? Of course, I have no choice if I want the code to work.

Then, by magic he showed me in a simpler way for the exact same result.

Gash! I hate this when your kid makes you feel as if you understood nothing…

Again, I was reviewing the video and comparing with my solution. What is the problem? Ok, it’s a different route, longer, but it doesn’t affect the end result…

Then, every now and then, I had to revisit my code because I wanted to change a date or just wanted to add something I thought was relevant.

Guess what? Obviously, I had to check line by line and figure it out what was I thinking at that time? Was it this line or that one that I had to modify? Not very efficient I would say…

Obviously, I could see that I was repeating and repeating the conditions. This is what the instructor was calling “code smelling” in his videos.

I should have known that the simpler, the better of course. This makes sense…

One old pilot told me one day when I was a young co-pilot to keep aviation bloody simple. Coding is very similar…

Code files are available on my GitHub account. Those codes are written in php, a scripting language that is especially suited for web development.

One file is the original and the second, is the same but re-factored to obey the DRY principle. Less code, easier to read and maintain… I am sure, I can still improve it but it’s ok for the moment.

What is this code doing?

Uploaded to a server, the file is checked every day, and if a condition is met, the program will execute the file which will send an alert, in this example an alert for Blue and Red disk (charts and navigation database), and terrain data base (TDB) updates to the pilots.

This code example can be used for other repeating tasks, of course.

My old captain should be proud of me. I listen what he told me at that time J

The frustration…

Learning a programming language can be so rewarding but also so frustrating.

This technology is moving with the speed of light. You learn one thing today and tomorrow it is already obsolete, so to speak.

When I started to search for those languages, I found out that there were so many information on Internet, YouTube videos, chat rooms, etc.

But many were out of dates without knowing about it!

Of course, at the beginning you have no idea and jump on every single piece of information you can find. One is showing you something without really understanding the ins and outs. You just try to follow, paste and try codes…

Your first success finally arrives. You say to yourself, yes I made it! It wasn’t so hard after all. What was the fuss all about?

Soon after you realise that you completely forgot what those lessons were talking about as you were just copying and pasting codes and tried to put the puzzle together without really understanding the foundation of the language.

The road back to the dark side of the moon was a common feeling… I felt like one step forward, two steps backwards…

“That’s it I give up! “ I told myself so many times…

But for some reasons, I came back and during my search I started to find myself being able to figure it out which was old and which was up to date faster and faster.

Then, came 2014 when Apple introduced this new language called Swift.

For me, this was a Tsunami. What to do now? Of course, there was not much info on search engines if you were getting stuck during your project and looking for help.

But if a firm like Apple was behind, there was a reason to listen and start to learn this new language.

My God! I had to start from ground zero again… No, please! I felt desperate and again, I wanted to throw everything by the window…

I was spending days and weekends, trying to master the beast. Everyday I was telling myself, why am I doing this? I don’t need it; I have a job. I am good in what I am doing (or at least, let me dream about it). Why learning something which is painful to understand?

As a pilot, I have learned in the teaching and learning, that sooner or later you get a plateau during your learning experience. Nothing seems to improve anymore or get into your head. Some people take longer than others but at the end, the plateau finishes and you learning curve grows again.

Well, here I felt like the learning curve was more like a roller coaster than anything else I have experienced so far. Fasten your seat belts! Mamma mia!…

Yes I know, title of a famous song from the Swedish group ABBA. They were my favourites when I was in high school J

As I come from a technical background and having a Cartesian logic, I could not understand why I couldn’t get it. Something was wrong, but what?

Yes I know, I am not the smartest guy on earth, I got it! But there must have been something else, which did not click yet in my head.

This plateau, even a roller coaster one, could not keep on going forever.

Finally, the light from the end of the tunnel could be seen from far away. Still a long way to go though, but it’s on the right track…

What I learned is not to give up. Anyone can do it, you just need to be stubborn and believe what you do is right. It is like building a house, you first need to start by the foundation and then build the rest around it.

Yes, a computer science degree is not something for everybody but you know what? If a 52 years old guy can do this, anyone can 😉

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The path I took learning to code

Everything started in 2007 while on a rest day in Washington DC when I was working for a fractional aviation company.

The day before, we flew from Luton, UK. We had a couple of days off in the US capital, before heading back to Europe…

I was in my hotel room getting bored as usual, so I decided to have a walk downtown. During that afternoon, I came across a library while walking.

Here I went, thinking about buying a book related to aviation but ended-up in the computer science section. Wrong turn, no idea why!?

I started to look some books and dropped on one, which had the title “ Learning HTML and CSS”. I told myself: “What on earth is that?”.

After reading the back page content, I realised that this book was about learning to make a website with those funny languages mentioned in the book title…

Bought it! Went back to the hotel and started to read the few first chapters…

Here there was a challenge to created a headline with the <h1>Title</h1> HTML tag.

That is how everything started!

After HTML, came CSS, then came JavaScript and other languages used for building websites.

I do run for couple of years now my own personal website dedicated to the plane I fly and long-range operation.

The URL is http://www.bizavintelligence.com

I built it with the course title: responsive web design, I followed on Lynda.com (see the URL below).

Even though the first language mentioned was not a programming language, but rather a marker language. Nevertheless, this helped me building some sort of foundations. Dealing with code editors, understanding code files, web server, dealing with different web browser and so on…

Frankly speaking, HTML and CSS were a walk in the park but JavaScript was, oh my! Not an easy beast to master… Obviously, this language was the first one, which is a programming language. Here I came with new vocabulary, talking about variables and functions. There were talking about object an Object Oriented Language. Well, actually more like a script Oriented Language… What on earth those new terminologies met? I had no idea…

Google and of course, one of my kid came to the rescue to explain me the concept of oriented programming languages, objects talking to objects… What!?… What is an object in computer language anyway?

Oh boy, oh boy, oh boy! Where did I get myself into?

We are now few years down the road and knew that if I wanted to keep on going, I’d better have a private teacher/coach to help me out…

I was looking around but couldn’t find what was I looking for…

My kid, being at the university at that time, told me why not joining one of the university computer lectures (we can do it freely here in Belgium but can not get a certificate or diploma of course).

Do you see your dad back in school? I will look completely stupid!” I innocently replied…

The idea was actually not stupid but because of my work, I couldn’t attend frequently those classes, thus losing the benefit of having a teacher…

So, I was on my quest to find another solution. After some times browsing the Internet, I found that there were a lot of help online; guys who were freely teaching those oriented programming languages. But somehow, it wasn’t for me yet! I was so confused about the zillions inputs they were giving, vocabulary I was not accustom to, and the foundation wasn’t there anyway to follow what they were demonstrating…

Finally, I found a website that were teaching the things I was really interested in. I say why not, what do I have to lose?

So I joined paying 25 USD/month and could watch those lessons at my paste and at any time. Perfect, it fitted my work schedule…

One website lead to another one where I was paying about 199 USD for the course and that’s was it! The advantage is that you paid once and were not billed every month to stay a member… Now, those courses dropped to about 50 USD. What a bargain!

I will tell you which sites I checked, some are French-speaking but most of them are English-speaking and based in the US. Don’t know why, I love the way Americans explain things… They are so much more pragmatic than our counter parts. Sorry! Not met to hurt anyone, but the American way works for me…

Anyway, after trying to learn Objective-C, which was one of the toughest languages I came across, Apple hopefully came up with a new language called Swift. I said hopefully but at that time, I wasn’t that much enthusiast, as I had to re-learn another language from ground zero. “No please! Be gentle with the old guy”, I was whispering…

But what on earth was I doing? Being a pilot was so much easier.

You pull in the stick, houses get smaller; you push in the stick, houses get bigger. Once in a while you either turn left or right. But you know what? Autopilot does that much better than us… So true… Ok, ok, we have to know regulations, weather, aerodynamics, airplane systems, performance, aviation English and so on and so on… But, oh boy! Object Oriented Programming, this is another beast to master…

Ok, fine but what can we do with this OOP (*)?

Well, those small applications that you have on your smartphones, they’re using OOP languages to make them work. Your smart phone, tablets are computers, literally.

Whatever you use a weather or a game app; they are all using objects, classes, functions or methods, properties or variables, making logic decisions. It is just pure programming…

Starting an app from ground zero, being able to use your aviation technical knowledge if you are building an aviation app. Being able to write codes you learned and, at the end to publish it to the App Store. Wow! What a boost when you see where you came from!

Course online I have checked (there are much more courses of course):

https://www.coursera.org

https://www.udemy.com (follow)

https://openclassrooms.com (French course available. Follow partially)

https://www.lynda.com (bought by LinkedIn. Follow)

http://fr.tuto.com (French course available. Did one course with them)

https://www.codeschool.com

University online courses:

http://itunes.stanford.edu (followed some classes but too much theory for me)

http://www.harvard.edu/itunes (same as above)

Where to get help:

http://stackoverflow.com

http://devslopes.com

Instructor I follow:

An instructor I just love to listen is Mark Price from devslopes.com. Fantastic guy, the best sense of humour instructor I came across (my point of view). He goes through some deep stuff that no other instructors are talking about… And with his sense of humour, things that look complicated at first, at the end there are not or at least, you are more willing to replay the course again and again until you get it.

I actually follow some of his classes on Udemy. He also launched a boot camp, which I haven’t checked yet but looks great as well.

I also like to watch this British instructor that has created a company called VEA software. You can find him on YouTube channel at: https://www.youtube.com/channel/UCAHVgG4R3JBzO9fUDvQ0M7g

Excellent small tutorials, but some knowledge about X-code and Swift are highly recommended.

Whatever your choice of learning tools, please pay attention not only about price but if the instructor provides a kind of support, chat room or something else.

If you decide to learn one of those languages, you don’t need to be a rocket scientist! Well, I am not…

You just need to be persistent, go step by step, and you’ll be able to do fantastic things yourself, you will be surprised… J

(*) OOP = Object Oriented Programming.

Check Wikipedia for the definition at:

https://en.wikipedia.org/wiki/Object-oriented_programming

 

 

First blog post

Introduction.

Hello,

My name is Didier Delhaisse, Belgian citizen,  and this is my blog about my long journey learning to code.

I am 52 years old, father of three, never had the chance to learn a programming language when I was at school.

I am this generation who saw Apollo landing for the first time on the moon in 1969, with a black and white TV and no remote control 😉

I thought this blog could be interesting for some folks of my generation to see and/or follow the long journey of trying to learn a new skill…

I will show my failures, my frustrations, my successes and motivations, the path I took, which can inspire some of you who will read this post and maybe share some equivalent or other experiences.

English, as you can see is not my mother tongue, nonetheless I have decided to publish this blog in English as it is the universal language…

 

post