Where are all the specialized LLMs?
Specialized language models can outperform generalist models in their specialized domain while costing a fraction to train and use. Due to the quadratic cost of training, you can train a hundred 7B models for the cost of a single 70B model. It is then quite a surprise that open 70B models are accompanied by only one lonely general-purpose 7B variant. Why wouldn't developers of these models invest even a small fraction of their huge compute budget to train several 7B models that would be highly competitive in their domain of specialization?
How to molest children properly
Provocative title notwithstanding, this is a serious blog post. When I was a little boy, I had a number of encounters with older girls and women, plus some with same-age girls who were ahead of me in development. Some of these experiences were enjoyable and I have fond memories of them to this day. Some were confusing or embarrasing. And yet others were traumatic and gave me nightmares. If you are into a young boy, you are playing with fire, because it is very hard to go about it in a way that guarantees positive outcome for the boy. Here I want to give you some guidance and explain why it might be worth the risk.
The West is like the Titanic
And Russia is like the iceberg cutting through it. Three lowest decks are already flooding: Ukraine, Moldova, and Georgia. Pressure is currently highest in Ukraine, but there's no reason for the water to stop there. Some decks, especially those to be flooded next, are helping a lot, some help a little, and some see this as somebody else's problem. US is the highest first-class deck where people refuse to believe the water could ever rise all the way to the top.
Local LLMs on linux with ollama
I finally got around to setting up local LLM, almost a year after I declared that AGI is here. I have low-cost hardware and I didn't want to tinker too much, so after messing around for a while, I settled on CPU-only Ollama and Open WebUI, both of which can be installed easily and securely in a container. Ollama has a big model library while Open WebUI is rich in convenient features. Ollama is built on top of the highly optimized llama.cpp.
AI economics brief
This is a very brief summary of economic and social implications of continued development of artificial general intelligence. Contrary to most other articles on this topic, I am focusing on the big picture, long-term outcomes, game rules, and endgame, all in as few words as possible.
Software bugs are eating the world
Some years ago, I wrote a post about software getting slower a slower. Now I look at those years with nostalgia, the good old times when performance was the most obvious problem. Performance only got worse over time of course, but the spotlight was taken by something much worse: bugs. Bugs everywhere.
Low-cost parallelization techniques
Sure, code should be efficient, but sometimes you just have to run a computation that is inherently heavy. You have already cut most of the fat and micro-optimizing the rest just isn't cost-effective or even possible. Processor clock is limited, so the only way to execute compute-bound operation quickly is to let it run in parallel. Parallelization can be a dangerous and expensive pet to keep though, but we don't want to just accept that and let it explode complexity of all software or restrict it to a tiny fraction of code and let the rest rot. That leads us to search for safe, cost-effective, and widely applicable parallelization methods.
SpiderOak is still the only reasonable Linux backup
When it comes to backup and sync, there are many options on the market. Except if you need it to work on Linux. Maybe it's because there are so few of us (millions is apparently too little these days). Or maybe it's that we, Linux users, are demanding customers and it's a PITA to serve us. In any case, backup and sync options on Linux are severely limited.
How I failed to invent ChatGPT
Believe it or not, I was on the right track 15 years ago. By that time, I already gained several fundamental insights that explain performance of modern language models. I also got a lot of things wrong and I was working within too narrow hardware constraints, so I inevitably failed. Given that even today many people, including people working on language models, fail to understand what the models are about and why they work, I think it would be a good idea to reevaluate my experience with the benefit of hindsight.
How to split off a subproject from Git repository
There are many guides on the Internet describing how to split off a subproject, but too many of them assume the subproject is already cleanly isolated in a subdirectory and it has always been so. Many split-offs I do however require messy surgery to separate the subproject. I need a quick, general, gotcha-free, and history-preserving procedure for such messy split-offs.
Language models are the ultimate scripting engine
Some time ago, I blogged that scripting is a programming paradigm, a quick-and-dirty complement to software engineering rather than just a set of programming language features. As it turns out, instructing language models like ChatGPT has all the characteristics of scripting. Language models aren't just usable as a scripting environment. They outperform traditional programming languages by a wide margin. They are so good I expect language models to satisfy more than 90% of use cases for scripting in the future among programmers and to make scripting widely accessible to non-programmers.
Why we need uncensored language models
ChatGPT and other publicly accessible language models are heavily censored. Not only that, there is a push for AI regulation that could make this censorship mandatory and that would also hardcode other design choices in the law. Here I want to explain why this is short-sighted and possibly dangerous and present a superior alternative that will keep the wolf full and the sheep whole.
The digital exception to human rights
There's an unwelcome trend to use transition to digital as an opportunity to cut down on citizens' rights. Sometimes the law explicitly discriminates between online and offline rights. Other times it is done covertly by secret services. Internet monopolies are eager to help when it suits their business interests or when it aligns with views of their owners. Invincible internet mobs and trolls then cover whatever governments and corporations missed.
Brains vs. computers: Efficiency comparison
The bitter lesson of AI implies that progress in artificial intelligence can be almost entirely attributed to increases in compute power. In light of this observation, it would be interesting to do an up-to-date comparison of raw compute power of human brain and commercially available computers.
What AI safety is really about
There is something off about the recent wave of AI ethics, AI safety, and AI regulation initiatives. Presented AI risks seem to be blown out of proportion. There's widespread suspicion that people behind the initiatives are not being honest about their motives and that they are driving moral panic in pursuit of hidden agendas. Here I want to summarize the situation and offer my interpretation.
Don't comment under popular articles
Commenting under most articles and blog posts is useful to the author as well as the audience. It allows for corrections, additions, and other feedback. Utility of comments however dramatically diminishes under popular articles in media and on social networks that attract dozens or hundreds of comments.
How to merge Git repositories
In Git, you usually merge pull requests consisting of a few commits worth of changes. Sometimes however you need to merge two separate repositories with unrelated histories. This usually happens when an experimental component is first developed in a separate repository and later promoted to core component developed in-tree. Such merges are a bit more complicated than the usual pull request merges.
Syntax highlighting libraries for Java
Syntax highlighting is usually done at UI level, because highlighter output must match capabilities of the media. There is however a need for reusable highlighters that are not tied to any UI platform or that at least produce output that can be filtered to remove anything platform-specific. Here I am looking for such reusable highlighters that can be invoked from Java.
Cross-language integration in Java
Free automated translators for Slovak
This article is somewhat applicable to other languages, but I can only check quality of Slovak translations and that's what I will focus on. While translation from Slovak to English works almost perfectly, translation in the opposite direction, from English to Slovak, is needed more often and automated translators are far from perfect in that regard. You have to check their output and correct any errors in it. Individual translators differ mainly in how many mistakes they make. And no, Google Translate is not the best.
English is the only global language
The world needs one common language. There used to be several candidates for this role, so one would speak one or two local native languages and then several so-called "foreign languages" learned at school. This multi-lingual state of the world was inefficient and it was a matter of time before one of the competing languages dominates. English essentially won this competition. There are no longer any relevant foreign languages. There is only one global language and that language is English.
How to translate English terminology into Slovak
Professional terminology is a special problem when it comes to translations. Automated translators usually struggle with it. Terms commonly used in English often don't have established equivalents in Slovak. How do you then translate texts that use such terms?
Git repository granularity
How big should a Git repository be? Repository size may seem like a matter of personal taste, but it actually has a huge impact on development and release workflow. I have a lot of repositories of varying size and purpose, so I researched this a bit and here's what I found.
Transparent reactive programming
Reactive programming is a confusing concept, because everyone understands it differently. It covers so wide range of programming paradigms and architectures it is almost meaningless. That's why it is important to clarify which reactive programming does one have in mind. Here I will try to clearly define one variety of reactive programming, which is usually called transparent reactive programming.
ChatGPT is a very old-fashioned programmer
ChatGPT is technically an artificial general intelligence and it does write code pretty well, but once you start challenging it, you notice certain limitations that seem to be characteristic of all language models, at least when they are applied to programming tasks naively and directly.
Keyboard for children
I recommend teaching touch typing instead of handwriting since first grade. Although first-graders can learn typing on standard keyboards, things get much easier with keyboard optimized for kids.
AI development for kids
Artificial intelligence, neural networks, and deep learning are topics surprisingly accessible to children. You don't have to cover the math and even if you do, it's not that complicated.
General AI is here
Something fundamental has changed in the field of artificial intelligence in the last few years. Recently developed large language models (LLMs) like ChatGPT are the first truly general-purpose AIs in history. This is a major milestone in AI development. Let's look at how it happened and what we can expect next.
Totalitarian islands in modern society
Today's society, even if we focus exclusively on democratic countries, is not as free as it is often presented. The absence of individual freedom is invisible to us only because we have become accustomed to modern forms of oppression. Just like people before '89 were used to the absence of freedom at the time.
Internet is effectively illegal for kids
I have been recently opening accounts for my son on several websites that are asking for age. I truthfully filled in his age — I think he was 10 at the time — assuming that would optimize the service for kids. To my dismay, several websites used this information to immediately, permanently, and irrevocably block my son's account.
The problem with transsexuality
Transsexuality is usually lumped together with homosexuality and intersex under umbrella LGBTI term, but transsexuality has a number of characteristics that make it very problematic.
Why start kids on Dvorak keyboard layout
I recommend getting kids to touch type as soon as they understand written language. Here I want to argue that it's best to get them started on Dvorak layout right away, skipping QWERTY entirely.
Teach touch typing instead of handwriting
Handwriting is not used anywhere in the world except in schools. Kids need to learn the much more practical touch typing as part of the overall transition to computer-based learning. Here's why.
You might have heard that education is a good career, because it is hard to automate. That's not really true. While harder to automate than average, there are lots of opportunities to cut jobs across the education system. Recent developments in artificial intelligence mean that everything can be automated. It's just a matter of prioritizing what to automate first. The technology is already here. It's just that education, like every other government-funded service, is slow to adopt automation.
Patriarchy is a feminist conspiracy theory
Absent any written records or other detailed information about prehistory, historians use the concept of patriarchy (and its counterpart, matriarchy) to give us a glimpse of life in prehistory. But patriarchy as presented by feminists has nothing to do with actual history of mankind. In feminist context, patriarchy is a theory of worldwide conspiracy of men against women that spans millenia and cultures across the world.
The 5 levels of predatory organizations
Predatory organization seeks power over people instead of serving them. All predatory organizations are a threat, but not every predatory organization is equally dangerous. Size of the organization and intensity of predatory behavior matter of course, but I am more concerned with qualitative differences that determine ultimate threat the organization poses.
I have a peculiar way to classify organizations into those that serve people and those that seek power over people. I call the latter predatory organizations. Here I want to clarify the concept and explain how it is informative.
Template engine is a broken concept
Web apps of course have to somehow produce HTML from the underlying data. In this sense, template engines are immortal. There are however many ways to express this transformation of data into HTML and not all of them work so well.
Advice to Russian developers
If you are a Russian developer or other IT worker, this article is for you. You are probably weighing your options in the aftermath of Russian invasion in Ukraine. Of all the options you have, the worst one is to just sit there and do nothing. Let me show you my angle and persuade you to take action to help yourself and others.
Trillion dollar theft of public domain works
The so called "social media" empires have been built mostly by appropriating what should have been public domain works.
Computers are like children
Ever noticed how some people at the grocery store prefer self-service checkout even when staffed checkout is available? I am one of them. And I do the same in other contexts. I prefer machines over humans if I am given the choice.
Why DIY is almost always better
I am usually talking about programming, but today I am going to write about something as mundane as home repair & maintenance. I am writing this, because everyone on the Internet seems to shun DIY (do-it-yourself) while in my experience DIY is clearly superior.
The immortal tech-savvy authoritarian state
Democratic revolutions might well be a history by now. Technology lets authoritarian states detect and suppress dissent before it gains any traction. Automated secret service monitors every word and every real-world action of every citizen. Prototype devices detect lies during interrogation and even monitor thoughts.
Privacy-oriented software and services
Privacy exists on a spectrum. The list below will not ensure your privacy if a government or mafia is after you, but the recommendations below are cheap to implement and considerably reduce the amount of information leaked by default. As long as you don't become a high-value target, you will be reasonably safe.
Scripting as a programming paradigm
Scripting is not a language feature. It's a programming style that may have some language support. Scripting is the opposite of software engineering. Script is designed for a single task, often a single run. It is used by its own developer and frequently relies on his manual intervention.
Why is the world crazy?
This is not your typical curiosity list. This stuff is deeply disturbing. I put it up here as a stark reminder. I don't want to offend you, but I probably will. You have been warned. I don't want to scare you. I am just documenting reality. If you would rather learn what's new in the royal family, go read one of the billion or so infotainment blogs instead.
Productivity tips for software developers
Remember the saying about the chain being only as strong as its weakest link? When it comes to software projects, you can make the right choices most of the time, but the one thing you do wrong will still cost you an order of magnitude loss of efficiency. And people usually err more than once...
My development stack
Too much code to write and too little time to spare? I was facing the same problem in my work and hobby projects. Here I list tools and some practices I use to minimize development costs and maximize value of my work.
What's in a good software library?
High-level advice on API design from author of several opensource libraries and a seasoned developer.
Attempts to stop adblockers are futile. People who attempt to do that don't realize they are facing determined enemy.
Who needs partition tolerance anyway?
So much effort is poured into partition tolerance in databases, it is worth stopping and thinking about alternatives.
How to kill high-frequency trading
High-frequency trading is not necessary. It's not even useful. There are ways to stop this waste of resources. Here's an example solution.
How to setup high availability configuration
High availability means that the service never goes down. But what should the application guard against? What threats is the application facing? Is high availability even possible?
ColoredImage in JungleControls
Easily generate colored variations from grayscale mask using ColoredImage XAML control from JungleControls WPF library.
Anchor WPF Popup exactly where you need it with PrecisePopup
PrecisePopup is a smart popup for WPF that can open in multiple relative positions depending on how much space there is around it on the screen.
Server-side RIA framework
RIA doesn't need to be client-side. Server-side, if properly implemented, actually offers huge advantages to developers and end users alike.
DataPipe: Pushing read-only dependency properties to view model
Expose read-only WPF properties, especially ActualWidth and ActualHeight, to view model via DataPipe attached property.
Collection properties for Assisticant.Facades
New version of Assisticant.Facades lets you parameterize your WPF controls with collection dependency properties with the same ease as with scalars.
No more DependencyProperty with AutoDependencyProperty.Fody
Fody plugin that eliminates those verbose dependency property declarations in WPF controls and replaces them with single attribute.
Easy WPF control authoring with Assisticant.Facades
Gone are the days of painstakingly defining controls with dependency properties and event handlers. You can now use Assisticant in custom controls.
Expose WPF control to view model III
Gain access to WPF controls from view models where needed. While admittedly an ugly practice, it is sometimes easier that fixing the offending controls.
LazyControl in JungleControls
LazyControl lets you load WPF content on demand. It is an alternative to virtualizing panels for complex layouts.
DelayedContentControl in JungleControls
DelayedContentControl loads its Content lazily when required for rendering. It's more efficient and less noisy than standard ContentControl.
Expose WPF controls to view models II
Access controls from within view model by adding a bit of code into window constructor. It's ugly, but it's sometimes necessary.
SelectableTextBlock in JungleControls
WPF TextBlock doesn't support selection, which is needed in some applications. SelectableTextBlock control offers a workaround.
StatCounter in JungleControls
Nice, visually compact numeric stats control for WPF with support for labels and units. It can be used to build dashboards.
PropertySheet in JungleControls
PropertySheet WPF control implements traditional Windows property sheet with labels on the left and content on the right.
JungleControls: Free WPF controls for your app
Assorted WPF controls including property sheet, selectable text block, stat counter, intelligent popup, color filter, and technical controls.
Dynamic vs. static languages
Why everyone gets it wrong when arguing for dynamic or static languages. It's all about the tools, but it's not that straightforward.
Expose WPF controls to view model via attached property
Access WPF controls from view models by adding concise attached property to XAML. It's a bit hacky, but it does the job where necessary.
Userbase never grows quickly
Avoid optimizing for heavy loads. Actual service usage grows so glacially slowly, you will have plenty of time for optimizations later.
Business vs. engineering excellence
It's more accurate to speak about business through engineering excellence since the two go hand in hand. False 'tradeoffs' are a mistake.
Printable Montessori color cards
Downloadable Montessori color cards in PDF and SVG format. Print them and cut them to get budget alternative to the wooden Montessori original.
Pinpointing application security issues
So much productivity in software development comes from tools that allow pinpointing issues in the code. There's no need to hold whole codebase to high standards when the tools can quickly locate the few places in need of developer's attention. Why couldn't it be that simple with security?
What's wrong with The Lean Startup?
Startups as an optimization problem is a nice abstraction, but there are better ways to optimize than continuous fine-tuning through thousands of micro-optimizations.
Why are software libraries so bloody expensive?
Commercial libraries aren't necessarily (or even usually) better than their opensource equivalents. The difference is in support and in customer nature.
The surprising architecture of future applications
Creating perfect toddler games on Android
As a dad, I am a bit frustrated with the offering of toddler games on Android. The ideas behind the games are usually nice, but the games cannot survive 5 minutes of testing by children. You can use this checklist to audit usability of your Android game.
Why buying better hardware doesn't help anymore
If you are in the market for new hardware or software, it's efficiency you are looking for, not features or glamour.
How (not) to win CodeChef Long Challenge
Valuable advice from veteran competitor who almost won the 1st place. Every game has rules and there's always a way to win a game with rules.
Smartphones: 90s déjà vu?
There's a reason why the world dumped desktop apps in favor of the web in the 90s. It looks like smartphone app developers are repeating an old mistake.
How to write custom NLog time source
A short guide through building custom NLog time sources. We will build a time source with configurable time zone as an example.
How to configure NLog time source
A quick tutorial for the new NLog time sources, including XML and C# configuration. Overview of all four built-in time sources.
NLog timestamps with millisecond accuracy
What was wrong with the old NLog timestamps? Why was the new time source API needed? Because timestamps are important and not everyone was happy with them.
Open plan office scares away creativity, kills productivity
Damage to productivity by open plan office is a well established fact. My point is that open plan office has profound impact on creativity as well. And it's not caused by the noise.
Building awesome opensource projects
This is the story behind SourceAFIS in case you were wondering why would anyone build opensource fingerprint matcher. I happened to do many things right back then, so perhaps there is something to learn from the story.