preDict

My smart phone is smarter than my Offices on my PC when it comes to text entry. Somehow MS Office Word and LibreOffice Writer just have not kept up. They are smarter than a typewriter (and sometimes spell better than me… well most of the times they do : ), but not as smart as they could be. Instead of redesigning the user interface every few year, Microsoft should focus on usability features rather than a shiny UI. It’s nice for a few seconds to look at something pretty, but when you are actually working with it, and using it to type in text, than that is what matters the most, and that is what you are looking at (or your keyboard if you are not typing blind). The GUI redesign is also annoying when you have to relearn using it. I’m still sometimes spending more time googling how to do something simple in Word 2007, 2010 (or LibreOffice) than actually doing it (and thinking “I could have already finished this in Word 2003”). Same for Windows 7, 8 vs. XP. But this post is not about that…

This post is about predictive text. Something that my Samsung phone (the virtual keyboard) does pretty well. It’s not perfect, but at least tries. I cannot say the same thing about Office or PC keyboard. We had some kind of predictive text on phones for a while. T-9 dictionaries and typing helpers. But the Text input on the Android based Samsung phone is amazing. (The handwriting recognition is also pretty accurate and faster than typing if you are not jogging or traveling on a bus.) I start typing in a word and it provides a list of guesses (words that start with those characters, or words that might have been mistyped…). It not just does that, but after finishing a word it also guesses words that usually follow the previous. You can almost type an entire sentence just by accepting guesses. Where is this on PC?

Visual Studio has intelli-sense that helps a lot with code writing. Microsoft should implement a form of that in Word. Just exchange dot to space and treat sentences as qualified variable names. (It’s not that simple, but it basically needs to just accept every word in the dictionary and use some probability algorithm to order the suggestions.)
Other IDEs have some kind of code completion too. (Delphi, Eclipse, even Notepad++ and Far manager …)

Here is a predictive text plugin for MS Word to fill this feature hole.
preDict
It’s a good start, but it’s not complete, and Word should support this internally.

There are some other tools that you can use.

You can configure AutoHotkey to fix your commonly miss typed words for example.

There was also Google Scribe. No longer…
AIType won’t let me register…
LetMeType might actually work.

Meggyfa R.I.P.

A héten kidÅ‘lt az egyik meggyfánk 🙁

A hétvégét a fa eltakarításával, illetve a meggy leszedésével töltöttük. Így kicsit egyszerűbb volt a mennyet szedni, nem kellet létrára mászni…
Több mint 50 kg meggyet mértünk le válogatás után, úgy hogy körülbelül a szomszédok is leszedtek ennyit. A másik két meggyfához hozzá se nyúltunk.
A hétvége másik fele a meggy feldolgozásával telt.

Why Delphi / pascal is better than C++

Ok, there are characteristics where c++ has the advantage, but I’m not talking about that now.

Delphi has properties! They are great if you are in the process of creating a new library. Why? Because when you start you can just set a bunch of variables public, you do not need to implement setter and getter functions. Later you can decide to make some of those variables private, and create properties and setter functions for them (checking, limiting range, do stuff on change). Usually you do not need to write getter functions at all.

private
FPosStart,FPosEnd:integer; /// ...
protected
procedure SetPosStart(value:integer); /// ...
published
property PosStart:integer read FPosStart write SetPosStart;

The main advantage here is not that we do not have to write getter function.
Imagine that the library is used extensively (by you, or others). AFAIK in C++ a change like this would break compatibility. Code would have to be changed to PosStart() / getPosStart() and setPosStart(…) form ‘… PosStart’ and ‘PosStart = …’

In Delphi constructors are inherited. It’s not a big deal, I did not even realize it until now. I’m reading Large Scale C++ Software Design about cyclic dependencies, levelization, mutually dependant components. It suggests not to write constructors that convert between classes, but rather write separate converter class with static methodes. But that does not seem very objectum oriented to me. It reminds me of itoa() and stuff like that. It works but still… So, I was wondering why not create descendant classes (or ancestor classes) and implement an additional constructor in the descendant class, that converts form the ancestor classes. It’s a little more typing but not much… or so I thought, then I realized that I needed to reimplement all the ancestors constructors… which is not the case in delphi. It’s a rather common practice to use your own descendant classes of standard controls from the start, just in case you will ever need to add some functionality. It’s easy, and cheap.
TMyCollection = class(TCollection) end;