Monday, November 27, 2017

Mobile Games for Kids

Below is a list of mobile (Android) games that my 5 year old plays on his tablet and I recommend:
  • Minecraft
  • Monument Valley 2
  • Alto's Adventure
  • Samorost 3
  • Cat Quest
  • War Robots
  • Badland 2
  • Contre Jour
  • World of Goo
  • Bowmasters

Thursday, October 19, 2017

Stop worrying that your expertise isn't worth much

Today I was talking with a chemist friend of mine who complained that he could rarely use his chemical expertise and was spending most of his time with jobs at the technician level. While I am in a slightly better situation, mine is not that much different.

My expertise is in dynamic flight simulations of 6DoF rigid bodies. Outside of my day job, its value is zero. However, while gaining that knowledge I have also learned a lot of tools and methodologies that could be used elsewhere. Here is a short list:
  • How to verify data/code prepared by others before using them in your own project.
  • How to write good reports
  • How to manage engineers
  • How to design complex software
  • Matlab/Simulink
  • C/C++
  • Java
  • C#
These skills and tools can easily be translated to other domains, which makes them very valuable. Concentrate on what skills you will acquire while pursuing your topics of interest and make sure that they have some use other than your own narrow field.

Thursday, October 05, 2017

Çocuklara yazılım eğitimi

2014 yılında Facebook WhatsApp'ı 19 milyar dolara satın aldığından beri memlekette yazılım geliştirmeye ilgi arttı. Bu aralar çocuğu olan kişiler benim yazılımcı olduğumu öğrendiklerinde "çocuğumu programlama konusunda nasıl eğitebiliriz" diye soruyorlar. Okullar programlarına kodlama dersleri koymanın telaşı içindeler.

Daha da büyüyecek bir alan olması nedeniyle yazılıma yatırım yapmak mantıklı. Çocuğun yaşına göre müfredatın, özellikle de ilk adımın nasıl olması gerektiği mühim. Önerim öncelikle velinin temel becerileri edinip çocuğuna yol göstermesi, yoksa çocuğun gelişimi tesadüflere kalıyor. Eğitim/ilham başkalarına devredilemez.

Lego Mindstorms güzel bir platform. Veli internetten Lego Mindstorms'un nasıl kullanılacağını öğrenmeli, sonra seti alıp ilk adımları kendi atmalı. Böylece çocuğuna yardımcı olabilir veya göndermeyi düşündüğü okulun/kursun kalitesini değerlendirebilir. Kendi öğrenmeden Mindstorms'u alırsa çocuk altından kalkamayabilir ve birkaç gün içerisinde sıkılabilir. Birkaç ay yardımcı olduktan sonra ilgi uyanmışsa çocuk giderek daha bağımsız devam edebilir.

Geçen yıl 12 yaşında bir tanıdığa Lego Mindstorms ile yazılım/robot eğitimi verdim. Eğitimde yazılımın yanısıra hataların öğrenme fırsatı olduğunu, bir işi başkalarına anlatabilmenin önemini ve yönetimlerini vurguladım. Birlikte çektiğimiz video bu linkte.

Güncelleme 27 Kasım 2017: Neredeyse tüm çocukların oynadığı Minecraft üzerinde Scratch ile program yazarak kodlamaya giriş:

Monday, September 18, 2017

Using images as resources in C# WPF

To use images as embedded resouces in C# WPF (Visual Studio 2017):
  1. Go to Project properties / Resources tab.
  2. At the tab top menu, click the down arrow to the right of Add Resource and click Add Existing File.
  3. Select image files on disk. The files will be displayed on resouces tab. You will also notice that a Resources folder has been created in solution explorer.
  4. In solution explorer, select the image files under Resources and right click, select Properties
  5. Change Build Action to Resource
  6. In your code: MyImage.Source = new BitmapImage(new Uri("pack://application:,,,/Resources/" + imgFileName)
  7. Clean Solution, Build Solution
  8. Now your code will run correctly. The image files will be embedded into the exe file, you won't need to distribute the images as separate files.

Friday, September 15, 2017

Software in the loop simulation

When developing software that will interact with electronic hardware, it is important to have abstractions for hardware, i.e. software modules that mimic hardware behavior. Electronic components can have many problems that are not related to logic, e.g. loose components, need to reset from time to time, delays and data loss. With software abstraction, you can test 90% of logic without dealing with hardware complexities. Even better, you can easily automate your tests.


Once you establish that you are 90% correct, you can start testing with hardware to tease out the remaining 10% of bugs (real time issues etc.). The cost of software abstraction is that your design gets a little more complex and you need to write a couple of additional classes and interfaces to simulate the hardware logic. But it is well worth the effort because it decouples you from the hardware, saving you lots of work and frustration.

As an example, I am currently developing a desktop software that will be used to configure an electronic card through the serial port. I wrote a CardSimulator class and implemented the response of the electronic card to inputs from desktop in that class. On startup, my software can be configured to run in simulated or real mode, real mode meaning working with the real card. I have unit tests providing me with confidence that the desktop side of the equation is correct and when there is a problem, we only need to focus on the electronic card side.

Sunday, July 16, 2017

CI for C# projects: AppVeyor

I tried Travis CI for continuous integration of a C# WPF project and it failed because Travis CI uses Mono and that is not sufficent for WPF apps. So I tried AppVeyor and was successful. My minimalist appveyor.yml file is as follows:
image: Visual Studio 2017
configuration: Debug
before_build:
  - nuget restore