I drafted this text around 10 years ago, but was not satisfied, hoping to finish it. However didn't have time and energy to complete. So I just post it as as. Maybe will edit later. Disclaimer: banalities and naivety to be expected. People fall into all kinds of believes: one race is superior to another, private property is the root of evil, Trump is a Russian spy, US 2020 election was forged,…
Google login dialog does not have the "stay signed-in" checkbox anymore - you session is always persistent. Once logged in, this web browser will have access to your account even after reboot. Yandex does the same: How insecure. In case of Google, if that's really the first time you login on this machine, there is a hint: "Not your computer? Use a Private Window to sign in." But that is my…
To prevent a part of our web application from being scanned by search engines and other web crawlers, we add a robots.txt like User-agent: * Disallow: /path It's so simple, what can go wrong? A real story happened to me. Turns out, my cloud platform - Google App Engine - has a caching and compression layer between the application and the Internet. It can gzip content for one client, cache it, and…
Stackoverflow and related sites repeatedly display their cookie confirmation dialog. So many times I had to press "Customize settings", and there select "Confirm my choices". This time I mistakenly pressed "Accept all cookies". How to undo that? Why do they show it every time? Will they continue showing it, or it only annoys you until you press "Accept all cookies"?
копичатка - мелкая ошибка, сделанная в результате копи-паста. Напрмер, забыли заменить всё, требующее замены. Скопировали сточку кода. Переменную, передаваемую в параметре, заменили на нужную, а объект, у которого вызывается метод, забыли заменить.
A database storing a bank account with balance $100 is replicated to two nodes. A network partition happens between the nodes. I am withdrawing $20 cash from an ATM which has access to a replica on one side of the partition. At the same moment I'm charged $10 for hosting and the payment gateway has access the replica on the other side of the partition. That's OK, the DB nodes process the…
How to automatically transform any imperative code into a functional code? Think for a moment before opening the answer: >> Copy all the data before invoking the imperative code. That's not a joke. There are techniques (e.g. copy on write) and data structures which can make it efficient. I have no time to write-down all the existing analogies coming to my mind now. What I want to say, the…
One javascript feature I learned while working on POCL . Consider: function foo() { try { throw 'hello' } catch (e) { return function inner() {return e} } } foo()() => 'hello' function foo2() { try { throw 'hello' } catch (e) { function inner() {return e} return inner; } } foo2()() Uncaught ReferenceError: e is not defined Why do the results differ? In the first case INNER is a function…
An idea I kept in mind for several years. Finally experimented with it: https://github.com/avodonosov/pocl . I consider the experiment successful. It could be a useful technique of application acceleration.
Don't just use gray text on white background. If you really want to make your text difficult to read, you will achieve even better results with white text on white background. Upd: I am not alone who thinks so: http://contrastrebellion.com/
People often think they can introduce incompatible changes in their library API, and just increase major version number, as semantic versioning proposes, to save the library clients from problems. It is not true. Consider a dependency tree: my-application web-server 1.1.1 commons-logging 1.1.1 db-client 1.1.1 commons-logging 1.1.1 authentication 1.1.1 commons-logging 1.1.1 Now commons-logging…
How many more years it will take Chrome and FireFox to learn display text properly? These are original size screenshots of some page heading. I think such bad results may be achieved if Chrome and FireFox rasterize first and scale after that, instead of scaling first and then rasterizing. To reproduce, here is the code: <h1 style="font-size: 300%; color: #4f81bd; font-style: italic; font-family:…
Давно думаю, не противоречит ли указ №60 принципам Единого экономического пространства Беларуси, России и Казахстана? Вроде у нас свобода торговли, и вдруг раз - на территории Беларуси при оказании услуг с помощью информационных систем могут применяться только информационные сети, системы и ресурсы "национального сегмента сети Интернет, размещенных на территории Республики Беларусь и…
Github support for org-mode in READMEs is unsatisfying - no code coloring and sometimes it even fails to render to html at all. I am migrating all my README files to markdown. Googled also this tool for automatic conversion: https://github.com/alexhenning/ORGMODE-Markdown . Will try it next time. Apart from READMEs I also would like to represent TODO.org files online. While org -formatted READMEs…
For cl-test-grid I need an online storage for static files - library test logs. The requirements: Permissions: Upload new file - anyone (because the tests may be run by anyone) Delete or modify existing file - forbidden for public. Current upload rate is around 50 000 small files per month, usually uploaded during several days after new Quicklisp is out. In the future it may increase to 100 000 or…
In the Go Concurrency Patterns presentation Rob Pike demonstrates how unbuffered channels are enough for many concurrency tasks. (NB: use Left/Right arrow keys to scroll the presentation) It reminded me of the Forth chips produced by Chuck Moore and colleagues. The current version contains 144 cores per square centimeter chip. The machine language is Forth and each core is equipped with its own…
Linux memory over-commit. Previously I've only read about it, but now I am bitten by it. When cl-test-grid agent (a CCL program) starts ECL and ECL starts gcc, linux on my VPS kills someone of them (usually CCL). Sometimes it just doesn't allow to fork new process. Why do CCL and other Lisps allocate so large heap at startup?
I once made a small invention: the simplest way to join values in a collection using comma as a separator: result = ''; maybeComma = ''; for (val : collection) { result += maybeComma + val; maybeComma = ','; } If collection = [1, 2, 3], then result = '1,2,3'. I invented this almost 10 year ago, and it was useful many times. There are environments, like shell scripts, where there is no…
It is usually advised to use closures to emulate private class members in javascript. Like this: function MyClass(param) { var privateVar = 1; function privateMethod(a) { return a + 2; } this.publicVar = param; this.publicMethod = function(x) { return x + this.publicVar - privateVar; } } var my = new MyClass(); my.publicMethod(1); I find this approach inconvenient for various reasons. Right away I…
Tried today some small changes in cl-openid and faced various problems (in 3rd parties! verified it by unchanged cl-openid and also by testing with other online services). Blogger OpenID provider is just broken ( http://www.google.com/support/forum/p/blogger/thread?tid=120fff3e2b1a061d&hl=en ) Livejournal OpenID provider started to violate the spec (as I read it) by returning error response with…