• mina86.com

  • Categories
  • Code
  • Contact
  • Z archiwów polskich mediów

    Zdjęcia kota wewnątrz obudowy komputera z opisem „Nie martw się. Jestem z pomocy technicznej.”
    Pracownik helpdesku ubrany we frak.

    Przeglądając archiwa swoich starych dysków, natknąłem się na niesłychanie ciekawy artykuł z Gazety Praca. Czas zrobił swoje i na stronie Gazety już go niestety nie ma,1 a szkoda aby zniknął po nim ślad. Pozwolę więc sobie go zacytować w całości, aby przetrwał dla potomności:

    Informatycy najgorzej ubrani

    Michał Stangret, 25-11-2005

    Są przepoceni, rzadko myją włosy i noszą flanelowe koszule wciągnięte w spodnie. Komputerowcy zajęli pierwsze miejsce w rankingu najgorzej ubranych zawodów. Dostało się też księgowym, urzędnikom i dziennikarzom.

    AI images should be copyrightable

    In September 2022, ‘Théâtre D’opéra Spatial’, a work submitted by Jason Allen, won Colorado State Fair’s annual fine art competition in the digital art category. What made the success noteworthy was that the image had been AI-generated. Mr Allen eventually tried to register the work with the US Copyright Office but his attempts turned out fruitless. In September 2023 the Office refused his registration.

    ‘Théâtre D’opéra Spatial’ by Jason M. Allen ‘A Recent Entrance to Paradise’ by Steven J. Thaler’s Creativity Machine
    First, ‘Théâtre D’opéra Spatial’ by Jason M. Allen. Second, ‘A Recent Entrance to Paradise’ by Steven J. Thaler’s Creativity Machine.

    I didn’t think much of it at the time. I wasn’t that invested in the consideration of what kind of ‘two-dimensional artworks’ are protected by copyright and, more notably, I somewhat agreed with the decision. Perhaps the prompt was protected, but if only minor manual edits were made to the image, it felt like a stretch to say the image as a whole could be covered by copyright law.

    Beware of Composable Foundation

    So far I have been lucky in my professional life. I have never had any conflicts with my employers and for the most part maintained good rapport with coworkers and managers alike. Alas, my luck has finally run out.

    Long story short, I left Composable Foundation in October and I am still waiting for my final paycheck. TL;DR: If you are doing business with them make sure you are paid in advance.

    Chronological order of The Witcher

    Last updated in April 2025. See updates below for a full list of changes.

    Ever since Witcher games took off the franchise skyrocketed in popularity. Books, comics, TV show, games, more comics, another TV show… The story of Geralt and his marry company has been told in so many ways that it’s becoming a wee bit hard to keep track of chronology of all the events; especially across different forms of media.

    In this article I’ve collected all official Witcher works ordering them in chronological order. To avoid any confusion, let me state up front that if you’re new to the franchise or haven’t read the books yet this list might not be for you. If you’re looking for the order to read the books in, I’ve prepared a separate article which describes that.

    Skip right to the chronology

    Reading order of The Witcher

    Updated in November 2024 to include Crossroads of Ravens.

    Without beating around the bush, the reading order for the Witcher books is as follows:

    1.The Last WishShort
    stories
    2.Sword of Destiny
    3.Blood of ElvesThe Witcher Saga
    4.Time of Contempt
    5.Baptism of Fire
    6.The Tower of the Swallow
    7.The Lady of the Lake
    8.Season of Storms
    9.Crossroads of Ravens

    Pro tip: You can put URLs in C & C++ code

    Documenting source code is important part of software engineering. Code is read more often than it’s written making it crucial to provide enough context for reader to understand what the implementation is doing. This can come in the form of links to external resources providing description of an algorithm, reference for an API or historic context justifying the code.

    As it turns out, C and C++ languages offer a little-known feature which allows URLs to be included directly in the function source code. For example:

    static float rsqrt(float x) {
    	https://en.wikipedia.org/wiki/Fast_inverse_square_root
    	static_assert(std::numeric_limits<float>::is_iec559);
    	auto i = std::bit_cast<uint32_t>(x) >> 1;
    	auto y = std::bit_cast<float>(UINT32_C(0x5F375A86) - i);
    	y *= 1.5f - x * 0.5F * y * y;
    	return y;
    }

    Primes ≤ 100 in Rust

    In a past life I’ve talked about a challenge to write the shortest program which prints all prime numbers less than a hundred. Back then I’ve discussed a 60-character long solution written in C. Since Rust is the future, inspired by a recent thread on Sieve of Eratosthenes I’ve decided to carry the task for Rust as well.

    To avoid spoiling the solution, I’m padding this article with a bit of unrelated content. To jump straight to the code, skip the next block of paragraphs. Otherwise, here’s a joke for ya:

    Names of operands of arithmetic operations

    Every now and again I need a specific name for operands or results of various arithmetic operations. It usually takes me embarrassingly long time to look that information up. To save time in the future, here’s the list: augend+addendsummand+summandterm+term}={sumtotalminuendsubtrahend=differencemultiplier×multiplicandfactor×factor}=productdividend÷divisornumeratordenominator}={ratiofractionquotient+remainderbaseexponent=powerradicanddegree={rootradicallogbase(anti-logarithm)=logarithm

    † Occasionally used to mean any operand of addition.
    ‡ Occasionally used to mean the fraction itself rather than only the integer part.

    List in big part thanks to Wikipedia.

    Most vexing parse

    Here’s a puzzle: What does the following C++ code output:

    #include <cstdio>
    #include <string>
    
    struct Foo {
    	Foo(unsigned n = 1) {
    		std::printf("Hell%s,", std::string(n, 'o').c_str());
    	}
    	~Foo() {
    		std::printf("%s", " world");
    	}
    };
    
    static constexpr double pi = 3.141592653589793238;
    
    int main(void) {
    	Foo foo();
    	Foo bar(unsigned(pi));
    }

    Strach

    English version available on The Codeless Code.

    Niedawno przyjęty do świątyni mnich zbliżył się do mistrza.

    — Otrzymałem zadanie dodania kilku nowych funkcji do systemu obsługi zamówień Cesarskiego Szewca, ale nie jestem w stanie zrozumieć, jak on działa. Logika jest rozproszona pomiędzy wiele aplikacji zaimplementowanych przy użyciu najróżniejszych technologii. Zamiast stworzyć wspólne biblioteki, autorzy najzwyklej skopiowali fragmenty kodu pomiędzy różnymi miejscami, często wprowadzając subtelne rozbieżności. Zadania pracujące w tle wyszukują i modyfikują rekordy w bazie danych bez żadnego udokumentowanego powodu. Sama baza danych wydaje się spiskować przeciwko mnie: prosta modyfikacja jednej tabeli może wyzwolić kaskadę zmian w wielu innych.