Author: Gökmen Görgen

  • Lost in Conversation

    Lost in Conversation

    Bill Murray’ın Scarlett Johansson ile birlikte oynadığı 2003 yapımı Lost in Translation filmini, bu karantina günlerinde izlemenizi tavsiye ediyorum. Ben seneler önce ilk izlediğimde çok sıkılmıştım; ama sonra tekrar tekrar, severek izledim ve bir şekilde hayatımda yer edindi. Bu yazının başlığını oradan türettim.

    2018’de Berlin’e göç ettik. Eski iş arkadaşımın tavsiyesiyle merkeze uzakta yaşamaya karar verdik. Aileye uygun, bizi tatmin eden bir ev bulduk. Evimize beş dakika yürüme mesafesinde olan kreş de kızımızı kabul edince kendimizi epey şanslı hissettik. Ofise gitme zorunluluğum olmadığı için istediğim yerden çalıştım. Eskiden ev dışında kütüphane ve Bäckerei denilen kafelerde çalışmak mümkünken, şimdi evden çalışmak tek seçenek. Bu yazıyı yazdığım gün yaklaşık üç haftalık gönüllü karantinayı, stoktaki eksikliklerimizi tamamlamak üzere deldik ve sonrasında karantinaya devam edeceğiz.

    Yıllar sonra bu yazıyı okuduğumda, herhalde Covid19’u unutmam; ama bu günlerde başka nelerle uğraştığımı da iyi hatırlamak isterim. 2019 yılı Temmuz ayında doktora gittim ve yaşadığım sağlık sorunlarının çözümü için doktorum ameliyat olmamı tavsiye etti, bir cerraha yönlendirdi. Tedaviye başladık ancak sürecin ortasında bir virüs salgını yüzünden eve kapandık. Eşimin arkadaşı bir gece bizi arayıp “Size eşyalarımı bırakacağım, ben Çin’e dönüyorum.” deyince, Almanya’daki durumun ciddiyetini kavradık, Çin o dönemde daha iyi durumdaydı. Ardından seyahatler yasaklandı, tuvalet kağıdı bulamaz olduk, markete girmeden önce içerideki insanların çıkmasını bekledik, el teması olmaması için nakit kullanmaz olduk. En kötüsü, ameliyat olacağım hastane kapandı, tedavim durdu, uçak biletlerim iptal oldu, katılmak istediğim etkinlik ertelendi, buluşmayı planladığım arkadaşlarla buluşamadım. Muhtemelen yaz tatilimizi de iptal edeceğiz.

    Benim karantinam tecrit gibi geçiyor. 8 yıllık uzaktan çalışmanın hiçbir döneminde böyle bir psikolojiyi deneyimlediğimi hatırlamıyorum. Normal zamanda birisi bana üç hafta evden çıkmadan durabilir misin dese bunu rahatlıkla yapabileceğimi söylerdim; ama dışarıda bir tehdit olduğunu bilmek başka bir duygu. Bu dönemin kendine özel sıkıntıları var; neyse ki çözümsüz değil.

    Şuanda yaşadığım en büyük sıkıntı, hareketsizlik. Çok fazla oturuyorum ve üniversite zamanlarımdan kalma, gitarın omzumda bıraktığı ağrıyı tekrar hissetmeye başladım. Çalışırken kullandığım bir oyuncu koltuğum var, rezalet. Bu koltuklar çok rahat; uzun süre bilgisayar başında oturmanıza yardımcı oluyor. Bu koltukların tek avantajı, bir taburede bile uzun süre oturma kabiliyetiniz varsa, oradan gelecek olan hasarı minimize etmek. Ama esas sorunu çözecek olan şey hareket etmek, hareketsiz saatlerce oturmamak. Ayrıca bu koltuklar genelde sıcak günlerde terin sırtınızda birikmesine veya kurumasına sebep oluyor. Hala koltuk arayışındayım, Varier Variable Balans almayı düşünüyorum.

    İkinci büyük sıkıntı, duyguların kısa süreli ve sürekli olarak dışarıdan gelen şoklarla değişmesi. Şok Doktrini kitabında bir işkence metodu olarak, günlerce karanlıkta ve hapiste kalmış insanların, ani bir ışık ve yüksek gürültüye maruz bırakılması ve bunun belirli aralıklarla sürekli yapılması anlatılıyordu. Bunun kıyaslamasını yapmak çok haksızlık olur, farkındayım. Ama şöyle düşünün, akşam işiniz bittiğinde, kahve veya çay içerken hafif bir beyin yorgunluğu oluyor ve tam da bu zamanda dinlenip enerji toplamak yerine, online medya kaynaklarından gelen haberlerle duygusal şoklar alıyorsunuz. Paylaşımlar çoğunlukla üzücü, şikayet dolu, negatif duygular içeriyor. Hep iyi şeyler okumak da sıkıntılı. Modunuz iyiyken canınız bir şeye sıkılabiliyor, kötüyken birden canlanabiliyorsunuz. Çözmeniz gereken sorunları, hoşunuza gidecek paylaşımlar okuyarak unutup erteleyebiliyorsunuz. İnsanın duygusal stabilite için bazen gerçekten offline olması, yalnız kalması gerekiyor.

    Bir diğer sıkıntı da erişilebilirliğe gereken önemin gösterilmemesi. Benim özellikle herkesin uzaktan çalıştığı bu dönemde beklentim, iş yaparken erişilebilirliğin artmasıydı; ama şuan gördüğüm kadarıyla ters istikamette seyrediyor. Herkes toplantılardan şikayetçiydi, bu toplantılar niye sıklaştı ve uzun hale geldi? Zaten Slack başıma belaydı, şimdi yerini Zoom’a bırakmış gibi. Anlık iletişim araçları üzerinden işin detaylarını konuşup, sonra “toplantıda konuştuğumuz gibi” diye bir görev açıklaması yazılmamalı. Text, erişilebilirliği en yüksek iletişim yöntemi. Unutmak diye bir şey yok, istediğin zaman okuyabilirsin, istediğin zaman cevap yazabilirsin. Konuşmak istediğinde bile on dakikada anlatacağın işi iki dakikada anlatmana yardımcı olur, toplantı süreleri kısalır. Niye yazmak ve okumak sevilmiyor, anlamıyorum.

    Beden sağlığı, duygusal balans, ve erişilebilirlik. Bu üç şeyi ne kadar iyi çözerseniz, uzaktan çalışmak o kadar verimli ve zevkli, iletişim o kadar kolay ve güzel. İsterdim size önerilerle geleyim; ama herkesin durumu kendine özel.

  • Rust Essentials

    Mostly I do not prefer to read the books written for teaching a programming language. Because a good language community already places the importance on their websites to promote the programming language beautifully as in Python and Rust. In these websites, you can find documentation, tutorials, even a free ebook that allows you to read from the website directly, and they’re mostly up-to-date.

    As you know, Rust is not an easy-to-learn programming language. So I frequently look at the official documentation of Rust, and sometimes I choose a random topic and read them again and again. Before starting to read this book, I took a look at the pages and saw some details that I still missed on the Rust documentation. Then I read the entire book thoroughly.

    My ebook was the first edition, and there were missing topics like async programming. The author published the second edition in 2017, and it seems he will need to prepare a new version to include the last changes in the language. That’s why I do not prefer to learn a programming language from a book. Rust is improving rapidly, so you need to follow the official documentation always.

    Another issue that I feel most lacking right now is macros. I know that they’re similar to Lisp macros, but I still couldn’t have a chance to try it in my pet projects yet. The book shows me an example of usage, but I don’t understand how and where to use it. I wish to see the samples from a specific project or all samples come from the same project.

    Finally, I share a table about the pointer types in Rust, when I started learning Rust, it was pretty intimidating. Now it seems a little more meaningful.

    TypeNameDescription
    &TReferenceOne or more references to read T
    &mut TMutable referenceSingle reference to read and write T
    Box<T>BoxHeap-allocated T with a single owner that may read and write T
    Rc<T>Rc pointerHeap-allocated T with many readers
    Arc<T>Arc pointerLike Rc, but enables safe mutable sharing accross threads
    *const TRaw pointerUnsafe read access to T
    *mut TMutable raw pointerUnsafe read and write access to T
  • Inmost

    I have a gaming PC for two years but couldn’t have time to play a game. So I decided to change my priorities in my life and will try to play more games and read more books this year.

    My first plan was to play this game with my daughter, but I realized that it was not a suitable game for kids after I bought it, so I’ll pay attention to use the family filter from now on.

    Fortunately, I did not regret it. There are some characters you play in the game. And the painful past of them is creating the story of the game. Especially the imagination of the girl was very shocking for me. I’ll not give you a spoiler, but the story helps you to understand what depression is and how human relations are so crucial for the traumatized people.

    This game is first for me in many ways. It’s my first indie game, first story-driven atmospheric game, and the first game that I played with a game controller. If you want to spend a weekend playing a game, I recommend Inmost.

  • Oceanhorn 2

    I had trouble understanding the story of the game because I didn’t play the first one. You start to play the game in the middle of the adventure. You have a sword and shield, so you think that the story is in the past, but you also have a kind of motorcycle that has no wheels but can fly. Also, you have a brother in arms named Gen, and it’s a robot. The other friend Trin tells you the story during the game, help you to solve the puzzle.

    Warlock Mesmeroth is the primary foe in the game; he is coming back somehow. So the first goal is to convince the knights of the lost realm to be together against him. It’s beneficial to learn of the abilities of your character to solve the puzzles quickly. It can’t jump, can’t swim more than ten seconds, but it can burn somethings and throw them away, can sweep the grass to find heart, coin, or bullet. It can blow up the walls with a bomb. Also, you can give some directions to Trin or Gen to do something that you want.

    The maps of the sections are too large, so it may take a while to find a way to pass to the next section. It was the first time that I played a game in a PC quality on the iPad. But the game poorly finished; it is as if the development of the game has been left unfinished. I think the third version of Oceanhorn will come out.

  • Being a Polyglot Developer

    My objective for the year 2019 was joining one more programming language community after Python and Lisp. I followed .NET Core in my first six months and did some projects using C# and F#. But then, I decided that learning Rust is a better idea. Some of the Python and Django developers I’ve followed have had a significant impact on my decision.

    Python is a programming language that easy to learn, it has a significant and active community, and I believe that it will keep its popularity for a longer time. Therefore, when choosing another programming language, I make sure that it has different features and priorities. I’m not sure, but I think that that’s why I couldn’t continue with .NET community. I already produce microservices, REST API, gRPC server, or even classifying things using machine learning libraries in Python. But I would not have preferred Python if I want to make a mobile application, that would not make sense. Or I would use Rust for embedded or blockchain projects; I would code data or text mining tools in Lisp, for example.

    In the past, being a full-stack developer was an extremely wanted job position. Now I don’t know how it is, but I suggest you stay away and become a polyglot developer instead.

  • Data Types in Programming

    I started to take a look at C++ courses to understand Rust better because it helps me to see the advantages of Rust. The following images are from a Linkedin course, the instructor is Bill Weinman, and his courses are perfect if you want to program with C++.

    If you have a photographic memory to remind something quickly, then you may like these images explaining data types in programming.

  • First Review on My iPad

    I started using an iPad instead of a second laptop for more effective use. Although it is excellent for reading things, answering emails, checking tasks, it is still not possible to use as a laptop with these devices.

    So I tried to connect to my primary PC remotely. But this was not satisfactory for me either. I took some notes to compare when iOS 13 and some updates came.

    Pros

    • In tablet mode, all screens are full-sized automatically.
    • The density of UI components is more comfortable to manage cursor with touching.
    • Firefox has a tablet mode; it supports touch scrolling, easy to click bookmarks.
    • The virtual keyboard is great! I didn’t need to use the iPad’s native on-screen keyboard.
    • We can’t see the running apps in the taskbar in tablet mode, but it’s possible to use the gestures to show all running apps.

    Cons

    • You need a remote desktop or a server. It’s impossible to work offline.
    • If you decide to use a remote desktop and you are obsessed about fonts, there’s no way to fix screen quality.
    • I’m not sure that I can code with iPad for hours even I have a good physical keyboard.

    So..

    • With the new updates in macOS and iOS 13, it will be possible to run iPad applications on macOS. So iPadOS may affect the quality and variety of applications.
    • I’m still waiting for a new version of Microsoft Surface or Surface Go that using ARM CPU, has Thunderbolt 3 and USB-C ports.
    • I still didn’t investigate how Google Pixelbook is but seems a good alternative.
  • My First Wrong After The Vacation

    At the end of my three-week vacation, I was asked for a seemingly easy task. We were going to release the new version of the project we developed:

    • Is today is the last working of the week? No.
    • Is there any problem with the unit tests? No.
    • Are all changes confirmed by the product manager, in the staging server? Yes.

    I always note everything, and so I write this article to remind this experience. My other habit is to define dosh sub-commands to access frequently used commands in my whole projects. It doesn’t matter if the project is written in .NET Core or used Django;

    • I know that the project will start in my development environment with dosh start,
    • I know that the project will build with dosh build,
    • I know that dosh deploy command will be running if I push my commits to some specific git branches. All these things are common sub-commands in my projects.

    So what was not a standard?

    I manage everything in a project except the server maintenance. Today the site was offline about an hour because of the communication failure. Sometimes there are small but critical upgrades on the servers, and one of them broke SSL module of the project’s psycopg2 dependency. I had only these logs:

    DAMN ! worker 1 (pid: 28018) died :( trying respawn ...
    Respawned uWSGI worker 1 (new pid: 28021)
    !!! uWSGI process 27988 got Segmentation Fault !!!
    *** backtrace of 27988 ***
    /usr/bin/uwsgi-core(uwsgi_backtrace+0x2a) [0x55a0ad5c498a]
    /usr/bin/uwsgi-core(uwsgi_segfault+0x23) [0x55a0ad5c4d73]
    /lib/x86_64-linux-gnu/libc.so.6(+0x3ef20) [0x7f4811ecaf20]
    /project/venv/lib/python3.6/site-packages/psycopg2/.libs/./libssl-8bb9b3dd.so.1.0.2o(ssl3_cleanup_key_block+0xb) [0x7f480a747cbb]
    /project/venv/lib/python3.6/site-packages/psycopg2/.libs/./libssl-8bb9b3dd.so.1.0.2o(ssl3_clear+0x16) [0x7f480a7455b6]
    /project/venv/lib/python3.6/site-packages/psycopg2/.libs/./libssl-8bb9b3dd.so.1.0.2o(tls1_clear+0x9) [0x7f480a751229]
    /usr/lib/x86_64-linux-gnu/libssl.so.1.1(SSL_new+0x3f2) [0x7f4812b429d2]
    /project/venv/lib/python3.6/site-packages/psycopg2/.libs/libpq-239f9ac8.so.5.10(+0x23399) [0x7f480a9dc399]
    

    You may know Segmentation Fault if you coded in C or if you worked with a package manager. Some included libraries that are coming with psycopg2 binary package are linked to the old version of libssl, so the last server update broke the dependencies1.

    lib/python3.6/site-packages/psycopg2/.libs/libssl-8bb9b3dd.so.1.0.2o   # from 1.0
    lib/python3.6/site-packages/psycopg2/.libs/libssl-7a80b951.so.1.1.1b   # to 1.1
    

    In some projects, it’s not possible to solve the problems as we wanted because of some regulations and source limits. I could find prevention for that case, but somehow, I forgot to check the updates in the source code and server packages and tried to make the deployment. And the worst thing, I didn’t realise the problem until someone warned me.

    So, I added one more rule for myself to make a deployment:

    • Is today the first day after the vacation? Yes (so, don’t touch it.).

    1. “Don’t break the dependencies”, I missed contributing a Linux distro like Pardus. ↩︎
  • Configure Windows for Development

    Environment Variables

    I still use some development tools that are used by most Linux users and these tools need some environment variables like LC_ALLHOME, etc. When I have a new PC with Windows 10, I start to use with defining these variables. Take a look at this post for more detail.

    PowerShell Core

    It’s possible to use BASH on Windows indeed, but I think PowerShell Core is a good alternative. Git integration is working well, defining aliases and functions is easy:

    # Extensions
    Import-Module posh-git
    Import-Module PSReadLine
    
    # DOSH settings
    $env:ENV = "DEV"
    Set-Alias dosh .\do.ps1
    
    # Readline settings
    Set-PSReadLineOption -EditMode Emacs
    
    # Git prompt settings
    $GitPromptSettings.DefaultPromptPath.ForegroundColor = 0xFFA500
    $GitPromptSettings.DefaultPromptWriteStatusFirst = $true
    $GitPromptSettings.DefaultPromptBeforeSuffix.Text = '`n$([DateTime]::now.ToString("MM-dd HH:mm:ss"))'
    $GitPromptSettings.DefaultPromptBeforeSuffix.ForegroundColor = 0x808080
    $GitPromptSettings.DefaultPromptSuffix = ' $((Get-History -Count 1).id + 1)$(" >" * ($nestedPromptLevel + 1)) '
    
    # Helper commands
    function which ($command) {
        Get-Command $command | Select-Object -ExpandProperty Definition
    }
    
    function touch ($filename) {
        $null > $filename
    }

    Readline is a familiar extension for BASH users. If you want to use Emacs key bindings in PowerShell, I suggest you add Readline to the dependencies list.

    What if we want to use a Linux command-line app? Like Nano? Indeed, it’s possible to use it as a default git-commit editor but, let’s consider it’s a program that only available in Linux. I use WSL for that case. Just install Ubuntu or another Linux distro with WSL, open PowerShell and run this command:

    > wsl -e nano README.md

    So you can reach all Ubuntu programs using this magic command. There’s only a little problem here, you have to keep your configuration files (like .nanorc) in your WSL instead of in your local. You can find my configuration repo here.

    Git-apply EOL Problem

    If you don’t ignore space changes in your patch command, you will get an error because the whitespaces in Linux environments. To solve this problem, use git-apply with these parameters:

    $ git apply --ignore-space-change --ignore-whitespace a.diff
  • Consumer

    For good things in life, you need labour, patience, and time.

    • To draw a picture,
    • To play an instrument,
    • To program software,
    • Or to produce something,
    • Even to complete a book,
    • To translate a text,
    • To tell the troubles,
    • To write what you think,
    • To prepare a broadcast,
    • For everything.

    Just sharing something in social media and consuming it is easy.