Tag: linux

  • How did I Meet Pardus?

    When someone asks me about the starting point of my career, I always tell them about my Linux/BSD adventure. These operating systems still exist and most people know them, but not everyone knows about Pardus, and even if they do, it is not the same Pardus I mean.

    I grew up in a house without internet and the only connection to the world was through technology and gaming magazines. I used to rewrite the articles in magazines that I liked and wanted to understand on my typewriter because I read too fast and didn’t understand anything, so the typewriter was kind of slowdown for me. Sometimes codes were shared in magazines and they would also write what the output would be when we compile and run these codes. That’s something a typewriter could never do. So I grew up dreaming of owning a personal computer until I started university.

    When I got my first computer, I remember that the operating system installed on it was FreeDOS. Honestly, I didn’t even know how to connect to the internet, so I looked into installing another operating system instead. Windows was a very nice alternative, but it was expensive and I had to buy a license. Then I had heard a lot about Linux from magazines, but before that I want to try FreeBSD first, I don’t know why but I thought that it may easier than Linux. There were many distributions of Linux and I couldn’t decide which is better for me. But FreeBSD is already a ready-to-use operating system. I already had magazines with information on how to install FreeBSD and how to connect to the internet. I managed with that for a couple of months.

    Then I discovered some great Linux communities: forums, rooms on Freenode, events, new friendships, spontaneous meetings, and so on. The strongest of these communities, in my opinion, was Pardus. It’s a Linux distribution that is developed by TÜBİTAK, and I did my intern in this significant instituon. TÜBİTAK means “Scientific and Technological Research Council of Türkiye”, is the leading agency for management, funding and conduct of research in Türkiye.

    When I started to use Pardus, most of the core tools of the operating system was developed in Python: PiSi, Kaptan, YALI, pyxemel, etc. Normally I was planning to learn Ruby but all my friends in Pardus community preferred to continue with Python. I don’t regret it but since I couldn’t use Ruby on Rails in any project, it remained a disappointment to me. But on the other hand, I got my first salary with Django and it wasn’t bad either.

    Pardus is a Debian based distribution anymore. I don’t know what the community is doing these days but I think those old days are over for me.

  • How to Fix Default Fonts Problem on Firefox

    Most of the websites are using Helvetica as an alternative font, and Ubuntu is trying to set Nimbus Sans as a similar font even you have Helvetica font. Also, the default font on Firefox is DejaVu Sans, but the default fonts are working just if the styles don’t specify a font family in a website.

    Nimbus Sans comes with fonts-urw-base35 package, and it’s ubuntu-desktop’s dependency, direct or indirect. I need ubuntu-desktop to use GNOME, so the best solution here is to disable the font altogether and refresh the fonts cache.

    Let’s go step by step. First of all, if you don’t have it yet, start with installing ttf-mscorefonts-installer package, Arial is the best alternative font for Helvetica, and it comes with that package. Then, confirm if the system finds Nimbus Sans as an alternative font for Helvetica:

    $ fc-match "Helvetica"
    NimbusSans-Regular.otf: "Nimbus Sans" "Regular"

    Ok, so we’re sure that we understood the problem correctly. We will try to reject that weird font and recheck the output until it finds Arial. To do that, we need to create a fonts.conf file and keep it on the correct path. On my Ubuntu (20.04), the path will be ~/.config/fontconfig/fonts.conf, but if you’re using a different distribution, learn the correct path from Google.

    After you created the file, fill it with these lines:

    <selectfont>
      <rejectfont>
        <patelt name="family">
          <string>Nimbus Sans</string>
        </patelt>
      </rejectfont>
    </selectfont>

    Then, let’s clear the fonts cache and recheck the fc-match output:

    $ fc-cache -rv
    $ fc-match "Helvetica"
    n019003l.pfb: "Nimbus Sans L" "Regular"

    Okay, yet another weird font. Let’s ignore this font too and try again:

    <selectfont>
      <rejectfont>
        <patelt name="family">
          <string>Nimbus Sans</string>
        </patelt>
      </rejectfont>
      <rejectfont>
        <patelt name="family">
          <string>Nimbus Sans L</string>
        </patelt>
      </rejectfont>
    </selectfont>
    $ fc-cache -rv
    $ fc-match "Helvetica"
    Arial.ttf: "Arial" "Regular"

    Finally! Now we can restart the Firefox and check the fonts on the browser:

    That’s all.

  • İşletim Sistemi Tercihini Geliştiriciye Bırakın

    Bir yazılım projesine başlarken ihtiyaç duyacağımız ilk şey ne olur diye soracak olursak, sanırım buna “geliştirme ortamı” diye cevaplayabiliriz. Örneğin bir Android projesi için şunlar gerekli:

    • Android Studio veya Eclipse (ADT)
    • Android Java SDK
    • Android yüklü donanım veya emulator
    • İşletim sistemine göre emulator hızlandırıcı eklentiler (HAXM, qemu, vb)

    Bu ortamı işletim sistemimize kurduğumuzda, iki şeye sahip oluyoruz: Birincisi kod yazabiliyoruz, debug edebiliyoruz, sorunları düzeltebiliyoruz; ikincisi sonucu görmek için uygulamayı yükleyip çalıştırabiliyoruz, test edebiliyoruz, yayınlayabiliyoruz. Bir Windows Phone veya IOS projesi olsaydı, geliştirme ortamı gereksinimleri arasına işletim sistemi de (Windows veya OS X) girecekti; ama Android SDK tüm popüler sistemleri destekliyor, tercih geliştiriciye kalmış.

    Peki web projelerinde durum nasıl? Web projesi için geliştirme ortamı konusunda şu üç yoldan birine başvuruyoruz:

    1. Geliştiriciden projeyi, kullandığı sistemin içine kurmasını talep etmek.
    2. Geliştiriciye GNU/Linux kullanmaya mecbur bırakmak.
    3. Emulator kullanmak, geliştiriciler için sanal sunucu paketi oluşturmak.

    1.’si bence çok kötü fikir. Geliştirici Windows kullanıyorsa karşılaşacağı handikapların sonu yok, production için fayda etmeyecek bir sürü gereksiz düzeltme yapmak zorunda kalabilir. 2.’si de bence kötü fikir. Geliştiricinin alışkın olmadığı bir sistemde, alışkın olmadığı birtakım araçlar kullanarak verimli ve pragmatik olmasını beklemek ne kadar doğru? Velev ki işe alımlarda GNU/Linux kullanıcısı olmak diye bir filtremiz olsun, doğru geliştiriciyi işe almada ne kadar adil ve yardımcı olabilir? Daha önemli bir soru, neden kişisel kullanım için tasarlanmış bilgisayarı bir server’a dönüştüresin?

    O nedenle, tıpki mobil uygulama geliştirirken kullandığımız gerçek donanım veya emulator gibi, web geliştirmede de benzer bir yöntem uygulamalıyız. VMware veya Virtualbox ile, olabildiğince production’u taklit edebilmeliyiz. Ben bunu vagrant ile çok kolay bir şekilde yapabiliyorum, istediğim işletim sisteminde kullanabiliyorum ve taşıyabiliyorum. Bir başka geliştiriciyle de geliştirme ortamımı paylaşabiliyorum.

    İşletim sistemi tercihi, IIS’ye ihtiyaç duymak gibi çok özel durumlar olmadıkça geliştiriciye bırakılmalı. En verimli nasıl çalışabileceğini en iyi geliştiricinin kendisi bilir.